Skip to content

Commit

Permalink
Various config and structure changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Aug 17, 2023
1 parent 30686d6 commit e11b6ae
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "mpconfigboard.h"
#include "hardware/gpio.h"
#include "hardware/i2c.h"
#include "drivers/tca9555/tca9555.h"
Expand Down
1 change: 0 additions & 1 deletion firmware/PIMORONI_YUKON/micropython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ include(pimoroni_bus/micropython)

# Sensors & Breakouts
include(micropython-common-breakouts)
include(pcf85063a/micropython)

# Utility
include(adcfft/micropython)
Expand Down
4 changes: 2 additions & 2 deletions firmware/PIMORONI_YUKON/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# cmake file for Pimoroni Yukon
set(MICROPY_BOARD "pimoroni_yukon")
set(MICROPY_BOARD "PIMORONI_YUKON")

# Allow Pico SDK to locate "pimoroni_yukon.h" in this directory.
list(APPEND PICO_BOARD_HEADER_DIRS "${CMAKE_CURRENT_LIST_DIR}")

set(MICROPY_SOURCE_BOARD
${CMAKE_CURRENT_LIST_DIR}/board_init.c
${CMAKE_CURRENT_LIST_DIR}/board.c
)

# Board specific version of the frozen manifest
Expand Down
2 changes: 1 addition & 1 deletion firmware/PIMORONI_YUKON/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
#define MICROPY_BOARD_EARLY_INIT board_init
void board_init(void);

#define MICROPY_BOARD_PRE_RUNTIME_RESET board_reset
#define MICROPY_BOARD_EARLY_RESET board_reset
void board_reset(void);
48 changes: 44 additions & 4 deletions firmware/PIMORONI_YUKON/pins.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,69 @@ SLOT1_FAST1,GPIO0
SLOT1_FAST2,GPIO1
SLOT1_FAST3,GPIO2
SLOT1_FAST4,GPI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T_GPIO13
ADC_ADDR_3,EXT_GPIO14
ADC_MUX_EN_1,EXT_GPIO15
ADC_MUX_EN_2,EXT_GPIO11
SW_A,EXT_GPIO17
SW_B,EXT_GPIO18
LED_A,EXT_GPIO19
LED_B,EXT_GPIO20
LCD_BL,EXT_GPIO16
LCD_DC,EXT_GPIO24
LCD_CS,EXT_GPIO25
86 changes: 86 additions & 0 deletions firmware/filesystem/lib/pimoroni_yukon/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# The entire lib dir gets added to a LittleFS filesystem and appended to the firmware
from machine import Pin
from ucollections import namedtuple

Slot = namedtuple("Slot", ("ID",
"FAST1",
"FAST2",
"FAST3",
"FAST4",
"SLOW1",
"SLOW2",
"SLOW3",
"ADC1_ADDR",
"ADC2_TEMP_ADDR"))

SLOT1 = Slot(1,
Pin.board.SLOT1_FAST1,
Pin.board.SLOT1_FAST2,
Pin.board.SLOT1_FAST3,
Pin.board.SLOT1_FAST4,
Pin.board.SLOT1_SLOW1,
Pin.board.SLOT1_SLOW2,
Pin.board.SLOT1_SLOW3,
0, # 0b0000
3 # 0b0011
)

SLOT2 = Slot(2,
Pin.board.SLOT2_FAST1,
Pin.board.SLOT2_FAST2,
Pin.board.SLOT2_FAST3,
Pin.board.SLOT2_FAST4,
Pin.board.SLOT2_SLOW1,
Pin.board.SLOT2_SLOW2,
Pin.board.SLOT2_SLOW3,
1, # 0b0001
6 # 0b0110
)

SLOT3 = Slot(3,
Pin.board.SLOT3_FAST1,
Pin.board.SLOT3_FAST2,
Pin.board.SLOT3_FAST3,
Pin.board.SLOT3_FAST4,
Pin.board.SLOT3_SLOW1,
Pin.board.SLOT3_SLOW2,
Pin.board.SLOT3_SLOW3,
4, # 0b0100
2 # 0b0010
)

SLOT4 = Slot(4,
Pin.board.SLOT4_FAST1,
Pin.board.SLOT4_FAST2,
Pin.board.SLOT4_FAST3,
Pin.board.SLOT4_FAST4,
Pin.board.SLOT4_SLOW1,
Pin.board.SLOT4_SLOW2,
Pin.board.SLOT4_SLOW3,
5, # 0b0101
7 # 0b0111
)

SLOT5 = Slot(5,
Pin.board.SLOT5_FAST1,
Pin.board.SLOT5_FAST2,
Pin.board.SLOT5_FAST3,
Pin.board.SLOT5_FAST4,
Pin.board.SLOT5_SLOW1,
Pin.board.SLOT5_SLOW2,
Pin.board.SLOT5_SLOW3,
8, # 0b1000
11 # 0b1011
)

SLOT6 = Slot(6,
Pin.board.SLOT6_FAST1,
Pin.board.SLOT6_FAST2,
Pin.board.SLOT6_FAST3,
Pin.board.SLOT6_FAST4,
Pin.board.SLOT6_SLOW1,
Pin.board.SLOT6_SLOW2,
Pin.board.SLOT6_SLOW3,
9, # 0b1001
10 # 0b1010
)
1 change: 0 additions & 1 deletion firmware/filesystem/lib/yukon.py

This file was deleted.

0 comments on commit e11b6ae

Please sign in to comment.