summaryrefslogtreecommitdiff
path: root/supervisor
AgeCommit message (Collapse)Author
2020-07-22Add externs. GCC10 complains about duplicate definesScott Shawcroft
2020-07-20supervisor: rename some locals for clarityJeff Epler
It's perfectly OK for these variables with static linkage to have the same name, but it's inconvenient for humans like me.
2020-07-20background callbacks: Clear any callbacks that were queuedJeff Epler
Before this, a background callback that was on the list when background_callback_reset was called could have ended up in a state that made it "un-queueable": its "prev" pointer could have been non-NULL.
2020-07-17background_callback_gc_collect: We must traverse the whole listJeff Epler
2020-07-17background_callback: Add gc collect callbackJeff Epler
A background callback must never outlive its related object. By collecting the head of the linked list of background tasks, this will not happen. One hypothetical case where this could happen is if an MP3Decoder is deleted while its callback to fill its buffer is scheduled.
2020-07-15supervisor: usb: note that it's unusual to need to call usb_backgroundJeff Epler
2020-07-15supervisor: factor supervisor_background_tasks from sundry portsJeff Epler
2020-07-15supervisor: factor out, Handle USB via background callbackJeff Epler
2020-07-15background_callback: Avoid CALLBACK_CRITICAL_BEGIN with nothing to doJeff Epler
CALLBACK_CRITICAL_BEGIN is heavyweight, but we can be confident we do not have work to do as long as callback_head is NULL. This gives back performance on nRF.
2020-07-15supervisor: tick: only run background tasks once per tickJeff Epler
2020-07-15supervisor: Add a linked list of background callbacksJeff Epler
In time, we should transition interrupt driven background tasks out of the overall run_background_tasks into distinct background callbacks, so that the number of checks that occur with each tick is reduced.
2020-07-15tick.c: adjust whitespaceJeff Epler
2020-07-06Add license to some obvious files.Diego Elio Pettenò
2020-07-01Merge pull request #3083 from tannewt/esp32s2_busioJeff Epler
Add busio support for the ESP32-S2
2020-06-29Fix debug UART callScott Shawcroft
2020-06-25Merge pull request #3046 from jepler/same51Jeff Epler
Add basic SAM E54 support and SAM E54 Xplained board
2020-06-24Merge pull request #3038 from jepler/compute-usb-devicesJeff Epler
Compute USB_DEVICES instead of requiring it to be specified
2020-06-24supervisor.mk: Conditionally assign USB_DEVICESJeff Epler
This restores the ability to remove CDC and/or MSC, at the price of giving up the new automatic check that USB_DEVICES is correct. Since devices have to have CDC and MSC to be "CircuitPython", this is not a facility that is going to be used by any in-tree drivers.
2020-06-23supervisor.mk: Compute USB_DEVICES; remove from boards and portsJeff Epler
Since Actions passed on the previous commit, where this computed value was checked against the specified value (if any), this is no net change, except that we no longer need to specify it for particular boards or ports.
2020-06-23Merge pull request #3043 from DavePutz/Issue-2865Scott Shawcroft
Issue #2865 -Clean up after ctrl-c interrupt in sleep
2020-06-23Update handing of a CTRL-C exceptionDavePutz
2020-06-23atmel-samd: Add SAM E54 Xplained boardJeff Epler
Few peripherals are actually tested. However, USB, I2C and GPIO seem to work. Most pins are silkscreened with the "PX00" style, so the board module only includes the small number that are screened differently. The default SPI, I2C, and UART are the ones on the EXT2 header. This is arbitrary, but the I2C on this connector is shared with the on-board I2C devices and the PCC header, making it the most versatile.
2020-06-22Update tick.cDavePutz
2020-06-22flash: Correctly signal error on invalid flash readJeff Epler
This logic was intended to mirror what is done for "write", but the wrong variable name was repeated twice.
2020-06-21Rework handling of ctrl-c interruptDavePutz
2020-06-19Generate stacktrace and reset exception for ctrl-c interruptDavePutz
Added code in mp_hal_delay_ms() to generate stacktrace and reset exception for ctrl-c interrupt
2020-06-15supervisor.mk: Compute what USB_DEVICES should be, and check it against what ↵Jeff Epler
it is
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-01Merge remote-tracking branch 'adafruit/master' into wdt-nrfScott Shawcroft
2020-05-29.../devices.h: Add GigaDevices GD25S512MD 64 MiB flash chip support.Brian Dean
2020-05-29Merge remote-tracking branch 'adafruit/master' into wdt-nrfScott Shawcroft
2020-05-28translations: document the compressed formatJeff Epler
2020-05-28string compression: save a few bits per stringJeff Epler
Length was stored as a 16-bit number always. Most translations have a max length far less. For example, US English translation lengths always fit in just 8 bits. probably all languages fit in 9 bits. This also has the side effect of reducing the alignment of compressed_string_t from 2 bytes to 1. testing performed: ran in german and english on pyruler, printed messages looked right. Firmware size, en_US Before: 3044 bytes free in flash After: 3408 bytes free in flash Firmware size, de_DE (with #2967 merged to restore translations) Before: 1236 bytes free in flash After: 1600 bytes free in flash
2020-05-27watchdog: move timeout exception to shared-bindingsSean Cross
Make this exception globally available to all platforms that have enabled the watchdog timer. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27supervisor: tick: check for watchdog exception if enabledSean Cross
Check to see if the current exception is a Watchdog exception, if it's enabled. This ensures we break out of the current sleep() if a watchdog timeout hits. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27supervisor: add a new WATCHDOG_RESET safe mode reasonSean Cross
This mode will be used if the board is reset due to the watchdog expiring. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27tick: break on watchdog timeout exceptionSean Cross
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21supervisor: support debugging tinyusbSean Cross
Allow for passing `-DCFG_TUSB_DEBUG=1` or `-DCFG_TUSB_DEBUG=2` on the command line to enable debugging tinyusb within circuitpython. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19Merge pull request #2910 from tannewt/esp32s2Scott Shawcroft
Add initial ESP32S2 support
2020-05-19bleio: adapter: add advertising timeout and statusSean Cross
Add a field to allow specifying a timeout when initiating advertising. As part of this, add a new property to determine if the device is still advertising. Additionally, have the `anonymous` property require a timeout, and set the timeout to the maximum possible value if no timeout is specified. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19_bleio: support anonymous advertisingSean Cross
Add a new parameter to the `start_advertising()` function to enable anonymous advertising. This forces a call to `sd_ble_gap_privacy_set()` with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and `private_addr_type` set to `BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`. With this, addresses will cycle at a predefined rate (currently once every 15 minutes). Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18Merge pull request #2837 from k0d/serial-debugScott Shawcroft
Add support for a debug console, such as ST-Link VCP.
2020-05-19Enable showing the console on a debug uartMark Olsson
2020-05-15Initial ESP32S2 port.Scott Shawcroft
Basic blinky works but doesn't check pins.
2020-05-09More erroneous else statementsMax Holliday
2020-05-09Unified single_status_byte & no_reset_cmd behaviorMax Holliday
2020-05-09Removing erroneous else statements Max Holliday
2020-05-09Replacing device that was accidentally deleted Max Holliday
2020-05-04Merge branch 'master' into non-standard-nvmDan Halbert
2020-05-03.../external_flash.c: Don't attempt to issue CMD_READ_STATUS2 forBrian Dean
devices with only a single_status_byte.