summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmain.c7
-rw-r--r--ports/atmel-samd/boards/blm_badge/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pybadge/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pygamer/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h2
-rw-r--r--ports/esp32s2/common-hal/alarm/time/TimeAlarm.c1
-rw-r--r--ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h2
-rw-r--r--supervisor/shared/board.c2
-rw-r--r--supervisor/shared/board.h2
13 files changed, 9 insertions, 21 deletions
diff --git a/main.c b/main.c
index 9eb478729..5aa9131a0 100755
--- a/main.c
+++ b/main.c
@@ -391,7 +391,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
int64_t connecting_delay_ticks = CIRCUITPY_USB_CONNECTED_SLEEP_DELAY * 1024 - port_get_raw_ticks(NULL);
if (connecting_delay_ticks > 0) {
// Set when we've waited long enough so that we wake up from the
- // sleep_until_interrupt below and loop around to the real deep
+ // port_idle_until_interrupt below and loop around to the real deep
// sleep in the else clause.
port_interrupt_after_ticks(connecting_delay_ticks);
// Deep sleep if we're not connected to a host.
@@ -414,6 +414,11 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
if (!asleep) {
tick_rgb_status_animation(&animation);
} else {
+ // This waits until a pretend deep sleep alarm occurs. They are set
+ // during common_hal_alarm_set_deep_sleep_alarms. On some platforms
+ // it may also return due to another interrupt, that's why we check
+ // for deep sleep alarms above. If it wasn't a deep sleep alarm,
+ // then we'll idle here again.
port_idle_until_interrupt();
}
}
diff --git a/ports/atmel-samd/boards/blm_badge/mpconfigboard.h b/ports/atmel-samd/boards/blm_badge/mpconfigboard.h
index 4f56d23b0..7343455b8 100644
--- a/ports/atmel-samd/boards/blm_badge/mpconfigboard.h
+++ b/ports/atmel-samd/boards/blm_badge/mpconfigboard.h
@@ -13,8 +13,6 @@
#define DEFAULT_UART_BUS_RX (&pin_PA01)
#define DEFAULT_UART_BUS_TX (&pin_PA00)
-#define USER_NEOPIXELS_PIN (&pin_PA05)
-
#define IGNORE_PIN_PA09 1
#define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA13 1
diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
index 4321335e5..e46e477e4 100644
--- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
@@ -30,8 +30,6 @@
// Increase stack size slightly due to CPX library import nesting
#define CIRCUITPY_DEFAULT_STACK_SIZE (4248) //divisible by 8
-#define USER_NEOPIXELS_PIN (&pin_PB23)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
index 5673be290..bc4055421 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
@@ -24,8 +24,6 @@
#define CALIBRATE_CRYSTALLESS 1
-#define USER_NEOPIXELS_PIN (&pin_PB23)
-
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n")
diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
index fab235149..4b0c324fa 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
@@ -30,8 +30,6 @@
// Increase stack size slightly due to CPX library import nesting.
#define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8
-#define USER_NEOPIXELS_PIN (&pin_PB23)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.h b/ports/atmel-samd/boards/pybadge/mpconfigboard.h
index 74a13eb1c..435185322 100644
--- a/ports/atmel-samd/boards/pybadge/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.h
@@ -14,8 +14,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
-#define USER_NEOPIXELS_PIN (&pin_PA15)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
index a37d7ceec..921669d8c 100644
--- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
@@ -14,8 +14,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
-#define USER_NEOPIXELS_PIN (&pin_PA15)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.h b/ports/atmel-samd/boards/pygamer/mpconfigboard.h
index 21f75d272..102c25956 100644
--- a/ports/atmel-samd/boards/pygamer/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.h
@@ -13,8 +13,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
-#define USER_NEOPIXELS_PIN (&pin_PA15)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
index 7c631d1c3..fbe946b72 100644
--- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
@@ -13,8 +13,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
-#define USER_NEOPIXELS_PIN (&pin_PA15)
-
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
index 34c8b0052..d5e896c01 100644
--- a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
+++ b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
@@ -51,6 +51,7 @@ mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *
}
alarm_time_time_alarm_obj_t *timer = m_new_obj(alarm_time_time_alarm_obj_t);
timer->base.type = &alarm_time_time_alarm_type;
+ // TODO: Set monotonic_time based on the RTC state.
return timer;
}
diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
index ef34465dc..da32230a6 100644
--- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
+++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
@@ -54,8 +54,6 @@
// Disables onboard peripherals and neopixels to save power.
#define POWER_SWITCH_PIN (&pin_P0_06)
-#define USER_NEOPIXELS_PIN (&pin_P0_13)
-
#define DEFAULT_I2C_BUS_SCL (&pin_P0_04)
#define DEFAULT_I2C_BUS_SDA (&pin_P0_05)
diff --git a/supervisor/shared/board.c b/supervisor/shared/board.c
index 111aa0e3c..30603aa66 100644
--- a/supervisor/shared/board.c
+++ b/supervisor/shared/board.c
@@ -33,7 +33,7 @@
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/neopixel_write/__init__.h"
-void board_reset_user_neopixels(mcu_pin_obj_t* pin, size_t count) {
+void board_reset_user_neopixels(const mcu_pin_obj_t* pin, size_t count) {
// Turn off on-board NeoPixel string
uint8_t empty[count * 3];
memset(empty, 0, count);
diff --git a/supervisor/shared/board.h b/supervisor/shared/board.h
index cdeefbf22..fe887a933 100644
--- a/supervisor/shared/board.h
+++ b/supervisor/shared/board.h
@@ -31,6 +31,6 @@
#include "shared-bindings/microcontroller/Pin.h"
-void board_reset_user_neopixels(mcu_pin_obj_t* pin, size_t count);
+void board_reset_user_neopixels(const mcu_pin_obj_t* pin, size_t count);
#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_H