Fix build and more comments
This commit is contained in:
parent
40118bcf57
commit
0b4bcd9599
7
main.c
7
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();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user