Skip to content

Commit 5ea6e09

Browse files
authored
Merge pull request #10851 from tannewt/fix_tinycircuits
Fix tinycircuits boards after base branch didn't catch the issues
2 parents fd4226b + d6afaf7 commit 5ea6e09

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

ports/raspberrypi/boards/tinycircuits_thumby/board.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ void board_init(void) {
3737
bus->base.type = &fourwire_fourwire_type;
3838
common_hal_fourwire_fourwire_construct(bus,
3939
spi,
40-
CIRCUITPY_BOARD_OLED_DC, // Command or data
41-
CIRCUITPY_BOARD_OLED_CS, // Chip select
42-
CIRCUITPY_BOARD_OLED_RESET, // Reset
40+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_OLED_DC), // Command or data
41+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_OLED_CS), // Chip select
42+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_OLED_RESET), // Reset
4343
10000000, // Baudrate
4444
0, // Polarity
4545
0); // Phase

ports/raspberrypi/boards/tinycircuits_thumby/mpconfigboard.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@
1818

1919
#define CIRCUITPY_BOARD_SPI (1)
2020
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = DEFAULT_SPI_BUS_SCK, .mosi = DEFAULT_SPI_BUS_MOSI, .miso = NULL}}
21-
22-
// For entering safe mode
23-
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO6)

ports/raspberrypi/boards/tinycircuits_thumby_color/board.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ void board_init(void) {
6262
common_hal_fourwire_fourwire_construct(
6363
bus,
6464
spi,
65-
CIRCUITPY_BOARD_LCD_DC, // DC
66-
CIRCUITPY_BOARD_LCD_CS, // CS
67-
CIRCUITPY_BOARD_LCD_RESET, // RST
68-
80000000, // baudrate
69-
0, // polarity
70-
0 // phase
65+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_LCD_DC), // DC
66+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_LCD_CS), // CS
67+
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_LCD_RESET), // RST
68+
80000000, // baudrate
69+
0, // polarity
70+
0 // phase
7171
);
7272

7373
busdisplay_busdisplay_obj_t *display = &allocate_display()->display;

ports/raspberrypi/mpconfigport.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@
3636

3737
#define CIRCUITPY_PROCESSOR_COUNT (2)
3838

39-
// For many RP2 boards BOOTSEL is not connected to a GPIO pin.
40-
#ifndef CIRCUITPY_BOOT_BUTTON
39+
// For RP2 boards we use a custom way to read BOOTSEL
4140
#define CIRCUITPY_BOOT_BUTTON_NO_GPIO (1)
42-
#endif
4341

4442
#if CIRCUITPY_USB_HOST
4543
#define CIRCUITPY_USB_HOST_INSTANCE 1

0 commit comments

Comments
 (0)