Skip to content

Commit 58630a8

Browse files
committed
Add feature conditionals and clean up
1 parent 10b9ca5 commit 58630a8

File tree

32 files changed

+95
-103
lines changed

32 files changed

+95
-103
lines changed

main.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545

4646
#include "background.h"
4747
#include "mpconfigboard.h"
48-
//#include "shared-module/displayio/__init__.h"
4948
#include "supervisor/cpu.h"
5049
#include "supervisor/memory.h"
5150
#include "supervisor/port.h"
@@ -58,6 +57,10 @@
5857
#include "supervisor/shared/stack.h"
5958
#include "supervisor/serial.h"
6059

60+
#if CIRCUITPY_DISPLAYIO
61+
#include "shared-module/displayio/__init__.h"
62+
#endif
63+
6164
#if CIRCUITPY_NETWORK
6265
#include "shared-module/network/__init__.h"
6366
#endif
@@ -187,7 +190,7 @@ void cleanup_after_vm(supervisor_allocation* heap) {
187190
supervisor_move_memory();
188191

189192
reset_port();
190-
//reset_board_busses();
193+
reset_board_busses();
191194
reset_board();
192195
reset_status_led();
193196
}
@@ -392,8 +395,10 @@ int __attribute__((used)) main(void) {
392395
safe_mode_t safe_mode = port_init();
393396

394397
// Turn on LEDs
395-
//init_status_leds();
396-
//rgb_led_status_init();
398+
#if MICROPY_HW_LED_RX && MICROPY_HW_LED_RX
399+
init_status_leds();
400+
rgb_led_status_init();
401+
#endif
397402

398403
// Wait briefly to give a reset window where we'll enter safe mode after the reset.
399404
if (safe_mode == NO_SAFE_MODE) {

ports/nrf/common-hal/microcontroller/Pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void reset_pin_number(uint8_t pin_number) {
105105
#ifdef SPEAKER_ENABLE_PIN
106106
if (pin_number == SPEAKER_ENABLE_PIN->number) {
107107
speaker_enable_in_use = false;
108-
common_hal_digitalio_digitalinout_switch_to_output();
108+
common_hal_digitalio_digitalinout_switch_to_output(SPEAKER_ENABLE_PIN, true, DRIVE_MODE_PUSH_PULL);
109109
nrf_gpio_pin_dir_set(pin_number, NRF_GPIO_PIN_DIR_OUTPUT);
110110
nrf_gpio_pin_write(pin_number, false);
111111
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ports/stm32f4/boards/stm32f411_disco/stm32f4xx_hal_conf.h renamed to ports/stm32f4/boards/DIS_F411RE/stm32f4xx_hal_conf.h

File renamed without changes.

ports/stm32f4/boards/stm32f411_disco/stm32f4xx_hal_msp.c renamed to ports/stm32f4/boards/DIS_F411RE/stm32f4xx_hal_msp.c

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)