Add board_deinit
for use with sleep
This changes lots of files to unify `board.h` across ports. It adds `board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to deinit the board before deep sleeping (even when pretending.) Deep sleep is now a two step process for the port. First, the port should prepare to deep sleep based on the given alarms. It should set alarms for both deep and pretend sleep. In particular, the pretend versions should be set immediately so that we don't miss an alarm as we shutdown. These alarms should also wake from `port_idle_until_interrupt` which is used when pretending to deep sleep. Second, when real deep sleeping, `alarm_enter_deep_sleep` is called. The port should set any alarms it didn't during prepare based on data it saved internally during prepare. ESP32-S2 sleep is a bit reorganized to locate more logic with TimeAlarm. This will help it scale to more alarm types. Fixes #3786
This commit is contained in:
parent
1df033465a
commit
40118bcf57
2
Makefile
2
Makefile
@ -265,7 +265,7 @@ update-frozen-libraries:
|
||||
@echo "Updating all frozen libraries to latest tagged version."
|
||||
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done
|
||||
|
||||
one-of-each: samd21 samd51 esp32s2 litex mimxrt10xx nrf stm
|
||||
one-of-each: samd21 litex mimxrt10xx nrf stm
|
||||
|
||||
samd21:
|
||||
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-11-27 23:57-0500\n"
|
||||
"POT-Creation-Date: 2020-12-08 09:56-0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -498,8 +498,8 @@ msgstr ""
|
||||
msgid "Buffer must be a multiple of 512 bytes"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/I2C.c shared-bindings/busdevice/I2CDevice.c
|
||||
#: shared-bindings/busio/I2C.c
|
||||
#: shared-bindings/adafruit_bus_device/I2CDevice.c
|
||||
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
@ -1296,7 +1296,7 @@ msgstr ""
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/busdevice/I2CDevice.c
|
||||
#: shared-module/adafruit_bus_device/I2CDevice.c
|
||||
#, c-format
|
||||
msgid "No I2C device at address: %x"
|
||||
msgstr ""
|
||||
@ -1503,6 +1503,7 @@ msgstr ""
|
||||
msgid "Pin does not have ADC capabilities"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/adafruit_bus_device/SPIDevice.c
|
||||
#: shared-bindings/digitalio/DigitalInOut.c
|
||||
msgid "Pin is input only"
|
||||
msgstr ""
|
||||
@ -1555,7 +1556,11 @@ msgid "Prefix buffer must be on the heap"
|
||||
msgstr ""
|
||||
|
||||
#: main.c
|
||||
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
|
||||
msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n"
|
||||
msgstr ""
|
||||
|
||||
#: main.c
|
||||
msgid "Pretending to deep sleep until alarm, any key or file write.\n"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/digitalio/DigitalInOut.c
|
||||
@ -2026,6 +2031,10 @@ msgstr ""
|
||||
msgid "WiFi password must be between 8 and 63 characters"
|
||||
msgstr ""
|
||||
|
||||
#: main.c
|
||||
msgid "Woken up by alarm.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
74
main.c
74
main.c
@ -46,6 +46,7 @@
|
||||
#include "background.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "supervisor/background_callback.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "supervisor/cpu.h"
|
||||
#include "supervisor/filesystem.h"
|
||||
#include "supervisor/memory.h"
|
||||
@ -64,8 +65,6 @@
|
||||
#include "shared-bindings/microcontroller/Processor.h"
|
||||
#include "shared-bindings/supervisor/Runtime.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
|
||||
#if CIRCUITPY_ALARM
|
||||
#include "shared-bindings/alarm/__init__.h"
|
||||
#endif
|
||||
@ -303,13 +302,6 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
|
||||
if (result.return_code & PYEXEC_FORCED_EXIT) {
|
||||
return reload_requested;
|
||||
}
|
||||
|
||||
#if CIRCUITPY_ALARM
|
||||
if (result.return_code & PYEXEC_DEEP_SLEEP) {
|
||||
common_hal_alarm_enter_deep_sleep();
|
||||
// Does not return.
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Program has finished running.
|
||||
@ -326,24 +318,47 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
|
||||
|
||||
rgb_status_animation_t animation;
|
||||
prep_rgb_status_animation(&result, found_main, safe_mode, &animation);
|
||||
bool asleep = false;
|
||||
while (true) {
|
||||
|
||||
RUN_BACKGROUND_TASKS;
|
||||
if (reload_requested) {
|
||||
#if CIRCUITPY_ALARM
|
||||
if (asleep) {
|
||||
board_init();
|
||||
}
|
||||
#endif
|
||||
supervisor_set_run_reason(RUN_REASON_AUTO_RELOAD);
|
||||
reload_requested = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (serial_connected() && serial_bytes_available()) {
|
||||
#if CIRCUITPY_ALARM
|
||||
if (asleep) {
|
||||
board_init();
|
||||
}
|
||||
#endif
|
||||
// Skip REPL if reload was requested.
|
||||
bool ctrl_d = serial_read() == CHAR_CTRL_D;
|
||||
if (ctrl_d) {
|
||||
supervisor_set_run_reason(RUN_REASON_REPL_RELOAD);
|
||||
}
|
||||
return (ctrl_d);
|
||||
return ctrl_d;
|
||||
}
|
||||
|
||||
// Check for a deep sleep alarm and restart the VM. This can happen if
|
||||
// an alarm alerts faster than our USB delay or if we pretended to deep
|
||||
// sleep.
|
||||
#if CIRCUITPY_ALARM
|
||||
if (asleep && alarm_woken_from_sleep()) {
|
||||
serial_write_compressed(translate("Woken up by alarm.\n"));
|
||||
board_init();
|
||||
supervisor_set_run_reason(RUN_REASON_STARTUP);
|
||||
// TODO: Reset any volatile memory the user may have access to.
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!serial_connected_before_animation && serial_connected()) {
|
||||
if (!serial_connected_at_start) {
|
||||
print_code_py_status_message(safe_mode);
|
||||
@ -351,7 +366,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
|
||||
|
||||
print_safe_mode_message(safe_mode);
|
||||
serial_write("\n");
|
||||
serial_write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload."));
|
||||
serial_write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload.\n"));
|
||||
}
|
||||
if (serial_connected_before_animation && !serial_connected()) {
|
||||
serial_connected_at_start = false;
|
||||
@ -360,12 +375,47 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
|
||||
|
||||
// Refresh the ePaper display if we have one. That way it'll show an error message.
|
||||
#if CIRCUITPY_DISPLAYIO
|
||||
// Don't refresh the display if we're about to deep sleep.
|
||||
#if CIRCUITPY_ALARM
|
||||
refreshed_epaper_display = refreshed_epaper_display || result.return_code & PYEXEC_DEEP_SLEEP;
|
||||
#endif
|
||||
if (!refreshed_epaper_display) {
|
||||
refreshed_epaper_display = maybe_refresh_epaperdisplay();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Sleep until our next interrupt.
|
||||
#if CIRCUITPY_ALARM
|
||||
if (result.return_code & PYEXEC_DEEP_SLEEP) {
|
||||
// Make sure we have been awake long enough for USB to connect (enumeration delay).
|
||||
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
|
||||
// sleep in the else clause.
|
||||
port_interrupt_after_ticks(connecting_delay_ticks);
|
||||
// Deep sleep if we're not connected to a host.
|
||||
} else if (!asleep) {
|
||||
asleep = true;
|
||||
new_status_color(BLACK);
|
||||
board_deinit();
|
||||
if (!supervisor_workflow_active()) {
|
||||
// Enter true deep sleep. When we wake up we'll be back at the
|
||||
// top of main(), not in this loop.
|
||||
alarm_enter_deep_sleep();
|
||||
// Does not return.
|
||||
} else {
|
||||
serial_write_compressed(translate("Pretending to deep sleep until alarm, any key or file write.\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!asleep) {
|
||||
tick_rgb_status_animation(&animation);
|
||||
} else {
|
||||
port_idle_until_interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
// Author: Bryan Craker
|
||||
// Date: 2020-05-20
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void)
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void)
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
@ -35,5 +35,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PA05, 10);
|
||||
}
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// This file defines board specific functions.
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H
|
||||
#define MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
// Initializes board related state once on start up.
|
||||
void board_init(void);
|
||||
|
||||
// Returns true if the user initiates safe mode in a board specific way.
|
||||
// Also add BOARD_USER_SAFE_MODE in mpconfigboard.h to explain the board specific
|
||||
// way.
|
||||
bool board_requests_safe_mode(void);
|
||||
|
||||
// Reset the state of off MCU components such as neopixels.
|
||||
void reset_board(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARDS_BOARD_H
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
@ -53,5 +53,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PB23, 10);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
@ -53,5 +53,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PB23, 10);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
@ -53,5 +53,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PB23, 10);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "shared-bindings/displayio/FourWire.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
void board_init(void) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) },
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void)
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
@ -123,5 +123,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PA15, 5);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
@ -101,5 +101,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PA15, 5);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "py/mpconfig.h"
|
||||
#include "shared-bindings/nvm/ByteArray.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) },
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "py/mpconfig.h"
|
||||
#include "shared-bindings/nvm/ByteArray.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) },
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
@ -123,5 +123,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PA15, 5);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
@ -101,5 +101,5 @@ bool board_requests_safe_mode(void) {
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels();
|
||||
board_reset_user_neopixels(&pin_PA15, 5);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
// This mapping only includes functional names because pins broken
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
// This mapping only includes functional names because pins broken
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
#include "common-hal/digitalio/DigitalInOut.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "supervisor/board.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user