Merge branch 'main' into ota-s2

This commit is contained in:
microDev 2020-12-12 05:25:46 +05:30
commit 37ee5e683d
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
263 changed files with 645 additions and 722 deletions

View File

@ -35,6 +35,7 @@ jobs:
python-version: 3.8
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy

View File

@ -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

View File

@ -421,7 +421,7 @@ SPI Example
"""Widget's one register."""
with self.spi_device as spi:
spi.write(b'0x00')
i2c.readinto(self.buf)
spi.readinto(self.buf)
return self.buf[0]
Use composition
@ -462,7 +462,7 @@ like properties for state even if it sacrifices a bit of speed.
Avoid allocations in drivers
--------------------------------------------------------------------------------
Although Python doesn't require managing memory, its still a good practice for
Although Python doesn't require managing memory, it's still a good practice for
library writers to think about memory allocations. Avoid them in drivers if
you can because you never know how much something will be called. Fewer
allocations means less time spent cleaning up. So, where you can, prefer
@ -471,7 +471,7 @@ object with methods that read or write into the buffer instead of creating new
objects. Unified hardware API classes such as `busio.SPI` are design to read and
write to subsections of buffers.
Its ok to allocate an object to return to the user. Just beware of causing more
It's ok to allocate an object to return to the user. Just beware of causing more
than one allocation per call due to internal logic.
**However**, this is a memory tradeoff so do not do it for large or rarely used
@ -580,4 +580,4 @@ MicroPython compatibility
--------------------------------------------------------------------------------
Keeping compatibility with MicroPython isn't a high priority. It should be done
when its not in conflict with any of the above goals.
when it's not in conflict with any of the above goals.

View File

@ -12,7 +12,7 @@ Adafruit CircuitPython Library Bundle
We provide a bundle of all our libraries to ease installation of drivers and
their dependencies. The bundle is primarily geared to the Adafruit Express line
of boards which feature a relatively large external flash. With Express boards,
its easy to copy them all onto the filesystem. However, if you don't have
it's easy to copy them all onto the filesystem. However, if you don't have
enough space simply copy things over as they are needed.
- The Adafruit bundles are available on GitHub: <https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases>.

View File

@ -20,10 +20,10 @@ be implemented:
* SHA1 - A previous generation algorithm. Not recommended for new usages,
but SHA1 is a part of number of Internet standards and existing
applications, so boards targeting network connectivity and
interoperatiability will try to provide this.
interoperability will try to provide this.
* MD5 - A legacy algorithm, not considered cryptographically secure. Only
selected boards, targeting interoperatibility with legacy applications,
selected boards, targeting interoperability with legacy applications,
will offer this.
Constructors

View File

@ -21,7 +21,7 @@ standard Python library.
You may need to change your code later if you rely
on any non-standard functionality they currently provide.
CircuitPython's goal long-term goalis that code written in CircuitPython
CircuitPython's long-term goal is that code written in CircuitPython
using Python standard libraries will be runnable on CPython without changes.
Some libraries below are not enabled on CircuitPython builds with
@ -69,7 +69,7 @@ CircuitPython/MicroPython-specific libraries
--------------------------------------------
Functionality specific to the CircuitPython/MicroPython implementation is available in
the following libraries. These libraries may change signficantly or be removed in future
the following libraries. These libraries may change significantly or be removed in future
versions of CircuitPython.
.. toctree::

View File

@ -71,7 +71,7 @@ parameter should be `id`.
(password) required to access said service. There can be further
arbitrary keyword-only parameters, depending on the networking medium
type and/or particular device. Parameters can be used to: a)
specify alternative service identifer types; b) provide additional
specify alternative service identifier types; b) provide additional
connection parameters. For various medium types, there are different
sets of predefined/recommended parameters, among them:

View File

@ -106,7 +106,7 @@ request a safe mode state which prevents the supervisor from running user code
while still allowing access to the REPL and other resources.
The core port initialization and reset methods are defined in
``supervisor/port.c`` and should be the first to be implemented. Its required
``supervisor/port.c`` and should be the first to be implemented. It's required
that they be implemented in the ``supervisor`` directory within the port
directory. That way, they are always in the expected place.

View File

@ -13,7 +13,7 @@ When CircuitPython restarts it will create a fresh empty ``CIRCUITPY`` filesyste
This often happens on Windows when the ``CIRCUITPY`` disk is not safely ejected
before being reset by the button or being disconnected from USB. This can also
happen on Linux and Mac OSX but its less likely.
happen on Linux and Mac OSX but it's less likely.
.. caution:: To erase and re-create ``CIRCUITPY`` (for example, to correct a corrupted filesystem),
follow one of the procedures below. It's important to note that **any files stored on the**
@ -43,7 +43,7 @@ ValueError: Incompatible ``.mpy`` file.
This error occurs when importing a module that is stored as a ``mpy`` binary file
(rather than a ``py`` text file) that was generated by a different version of
CircuitPython than the one its being loaded into. Most versions are compatible
CircuitPython than the one it's being loaded into. Most versions are compatible
but, rarely they aren't. In particular, the ``mpy`` binary format changed between
CircuitPython versions 1.x and 2.x, and will change again between 2.x and 3.x.

View File

@ -1560,7 +1560,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
@ -2035,6 +2039,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 ""

81
main.c
View File

@ -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
@ -216,7 +215,7 @@ STATIC bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec
STATIC void cleanup_after_vm(supervisor_allocation* heap) {
// Reset port-independent devices, like CIRCUITPY_BLEIO_HCI.
reset_devices();
// Turn off the display and flush the fileystem before the heap disappears.
// Turn off the display and flush the filesystem before the heap disappears.
#if CIRCUITPY_DISPLAYIO
reset_displays();
#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,52 @@ 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
// 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.
} 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 {
// 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();
}
}
}

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void) {
}

View File

@ -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) {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
void board_init(void)

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
void board_init(void)

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -25,7 +25,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -25,7 +25,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -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);
}

View File

@ -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)

View File

@ -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);
}

View File

@ -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")

View File

@ -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);
}

View File

@ -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)

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -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"

View File

@ -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"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
void board_init(void) {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
void board_init(void) {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -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"

View File

@ -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[] = {

View File

@ -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"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void) {
}

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -27,7 +27,7 @@
#include <string.h>
#include "boards/board.h"
#include "supervisor/board.h"
#include "py/mpconfig.h"
void board_init(void) {

View File

@ -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) },

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
void board_init(void)

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -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"

View File

@ -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[] = {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -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"

View File

@ -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[] = {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void) {
}

View File

@ -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"

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void) {
}

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
void board_init(void)
{

View File

@ -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);
}

View File

@ -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)

View File

@ -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[] = {

View File

@ -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);
}

View File

@ -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)

View File

@ -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[] = {

View File

@ -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"

View File

@ -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) },

View File

@ -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"

View File

@ -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) },

View File

@ -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);
}

View File

@ -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)

View File

@ -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[] = {

View File

@ -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);
}

View File

@ -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)

View File

@ -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[] = {

View File

@ -24,7 +24,7 @@
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More