Skip to content

Commit d47bd55

Browse files
committed
Fix neopixel macro issue, set default neopixel color
1 parent 78d049d commit d47bd55

File tree

6 files changed

+18
-25
lines changed

6 files changed

+18
-25
lines changed

ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@
2929
#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wroom"
3030
#define MICROPY_HW_MCU_NAME "ESP32S2"
3131

32+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO18)
33+
3234
#define AUTORESET_DELAY_MS 500

ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ
1010
# so increase it to 32.
1111
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
1212

13-
CIRCUITPY_NEOPIXEL_WRITE = 0
14-
1513
CIRCUITPY_ESP_FLASH_MODE=dio
1614
CIRCUITPY_ESP_FLASH_FREQ=40m
1715
CIRCUITPY_ESP_FLASH_SIZE=4MB

ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ
1010
# so increase it to 32.
1111
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
1212

13-
CIRCUITPY_NEOPIXEL_WRITE = 0
14-
1513
CIRCUITPY_ESP_FLASH_MODE=dio
1614
CIRCUITPY_ESP_FLASH_FREQ=40m
1715
CIRCUITPY_ESP_FLASH_SIZE=4MB

ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ USB_PRODUCT = "FeatherS2"
44
USB_MANUFACTURER = "UnexpectedMaker"
55
USB_DEVICES = "CDC,MSC,HID"
66

7-
87
INTERNAL_FLASH_FILESYSTEM = 1
98
LONGINT_IMPL = MPZ
109

1110
# The default queue depth of 16 overflows on release builds,
1211
# so increase it to 32.
1312
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
1413

15-
CIRCUITPY_NEOPIXEL_WRITE = 0
16-
1714
CIRCUITPY_ESP_FLASH_MODE=qio
1815
CIRCUITPY_ESP_FLASH_FREQ=40m
1916
CIRCUITPY_ESP_FLASH_SIZE=16MB

ports/esp32s2/mpconfigport.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ USB_SERIAL_NUMBER_LENGTH = 12
1212
# Longints can be implemented as mpz, as longlong, or not
1313
LONGINT_IMPL = MPZ
1414

15-
CIRCUITPY_NEOPIXEL_WRITE = 1
16-
1715
# These modules are implemented in ports/<port>/common-hal:
1816
CIRCUITPY_ANALOGIO = 0
1917
CIRCUITPY_NVM = 0

supervisor/shared/rgb_led_status.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,22 +387,22 @@ void prep_rgb_status_animation(const pyexec_result_t* result,
387387
if (!status->ok) {
388388
status->total_exception_cycle = EXCEPTION_TYPE_LENGTH_MS * 3 + LINE_NUMBER_TOGGLE_LENGTH * status->digit_sum + LINE_NUMBER_TOGGLE_LENGTH * num_places;
389389
}
390-
if (result->exception_type) {
391-
if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) {
392-
status->exception_color = INDENTATION_ERROR;
393-
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) {
394-
status->exception_color = SYNTAX_ERROR;
395-
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_NameError)) {
396-
status->exception_color = NAME_ERROR;
397-
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_OSError)) {
398-
status->exception_color = OS_ERROR;
399-
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_ValueError)) {
400-
status->exception_color = VALUE_ERROR;
401-
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_MpyError)) {
402-
status->exception_color = MPY_ERROR;
403-
} else {
404-
status->exception_color = OTHER_ERROR;
405-
}
390+
if (!result->exception_type) {
391+
status->exception_color = OTHER_ERROR;
392+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) {
393+
status->exception_color = INDENTATION_ERROR;
394+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) {
395+
status->exception_color = SYNTAX_ERROR;
396+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_NameError)) {
397+
status->exception_color = NAME_ERROR;
398+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_OSError)) {
399+
status->exception_color = OS_ERROR;
400+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_ValueError)) {
401+
status->exception_color = VALUE_ERROR;
402+
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_MpyError)) {
403+
status->exception_color = MPY_ERROR;
404+
} else {
405+
status->exception_color = OTHER_ERROR;
406406
}
407407
#endif
408408
}

0 commit comments

Comments
 (0)