summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)Author
2020-10-26Fix lost board.SPI and board.I2C after being used by display.Christian Walther
Fixes #3581. Pins were marked as never_reset by common_hal_displayio_fourwire_construct() and common_hal_sharpdisplay_framebuffer_construct(), but these marks were never removed, so at the end of a session after displayio.release_displays(), {spi|i2c}_singleton would be set to NULL but the pins would not be reset. In the next session, board.SPI() and board.I2C() were unable to reconstruct the object because the pins were still in use. For symmetry with creation of the singleton, add deinitialization before setting it to NULL in reset_board_busses(). This makes the pins resettable, so that reset_port(), moved behind it, then resets them.
2020-10-07Factor out code.py status messagesmicroDev
2020-10-07Disable auto-reload in safe modemicroDev
2020-09-21canio: rename from _canioJeff Epler
This reflects our belief that the API is stable enough to avoid incompatible changes during 6.x.
2020-09-21main.c: Correct CANIO if-guardJeff Epler
2020-09-21_canio: Minimal implementation for SAM E5x MCUsJeff Epler
Tested & working: * Send standard packets * Receive standard packets (1 FIFO, no filter) Interoperation between SAM E54 Xplained running this tree and MicroPython running on STM32F405 Feather with an external transceiver was also tested. Many other aspects of a full implementation are not yet present, such as error detection and recovery.
2020-08-30merge from upstreamDan Halbert
2020-08-21Add PSRAM support to ESP32S2Scott Shawcroft
When configured the CircuitPython heap will be on the external RAM. When not available, the heap will be 48k inside the IDF heap.
2020-08-20merge from upstream; working; includes debug_out code for debugging via ↵Dan Halbert
Saleae for posterity
2020-08-13fix reset logic to not do pin ops or heap ops at bad timesDan Halbert
2020-08-11Merge pull request #3232 from hierophect/esp32-neopixelScott Shawcroft
ESP32-S2: Add Neopixel support
2020-08-10Add skip for rgb matrix exception handlingLucian Copeland
2020-08-04service discovery works; need to work on char and descriptor discoveryDan Halbert
2020-08-04main: Allow these arrays to reside in ROMJeff Epler
The missing second "const" made these mutable arrays pointing to const string data.
2020-08-04main: Drop "double extension" detection if not FULL_BUILDJeff Epler
This saves nearly 200 bytes. Curiously, it also saves RAM.
2020-08-04Combine some "safe mode" messagesJeff Epler
2020-07-22Add externs. GCC10 complains about duplicate definesScott Shawcroft
2020-07-22Merge branch 'main' into memmonitorScott Shawcroft
2020-07-20Tweak declaration for boards with TCMScott Shawcroft
2020-07-17Get AllocationAlarm workingScott Shawcroft
2020-07-17Enable PYSTACK to keep function state out of the heapScott Shawcroft
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: factor supervisor_background_tasks from sundry portsJeff 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-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-19Merge pull request #2910 from tannewt/esp32s2Scott Shawcroft
Add initial ESP32S2 support
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-03-13Fix autoreload, neopixel, monotonic_ns and sleep w/o SDScott Shawcroft
2020-01-29Move board_init to main.cLucian Copeland
2019-12-12merge from masterDan Halbert
2019-12-12Fix flash write error handling; clean up safe mode message printingDan Halbert
2019-12-05wipDan Halbert
2019-10-21Refine _bleioScott Shawcroft
This PR refines the _bleio API. It was originally motivated by the addition of a new CircuitPython service that enables reading and modifying files on the device. Moving the BLE lifecycle outside of the VM motivated a number of changes to remove heap allocations in some APIs. It also motivated unifying connection initiation to the Adapter class rather than the Central and Peripheral classes which have been removed. Adapter now handles the GAP portion of BLE including advertising, which has moved but is largely unchanged, and scanning, which has been enhanced to return an iterator of filtered results. Once a connection is created (either by us (aka Central) or a remote device (aka Peripheral)) it is represented by a new Connection class. This class knows the current connection state and can discover and instantiate remote Services along with their Characteristics and Descriptors. Relates to #586
2019-10-20Parameterize linker scriptDan Halbert
2019-10-18Use get top and limit stack functionsKamil Tomaszewski
2019-08-22Fix builds without displayioScott Shawcroft
2019-08-22Refresh ePaper displays once code.py is done runningScott Shawcroft
2019-07-24Requested changes, general cleanupHierophect
2019-07-22Fix LED misuse interfering with atmel buildsHierophect
2019-07-22Add feature conditionals and clean upHierophect
2019-06-28remove build, fix link issues)Hierophect
2019-06-28first commit, very crudeHierophect
2019-06-06Include display objects in gc.Dan Halbert
2019-04-17Unify VM cleanup codeScott Shawcroft
Before we were skipping reset of the standard busses after boot and repl which could lead to a crash in a subsequent VM run. Fixes #1806
2019-04-09Merge pull request #1773 from dhalbert/no-recursive-background-tasksScott Shawcroft
Don't let a background task call run_background_tasks()
2019-04-09Don't let a background task call run_background_tasks()Dan Halbert
2019-04-08Reorganize board busses into shared-bindings and shared-module.Scott Shawcroft
2019-03-16also flush fileystem on soft reboot from replDan Halbert
2019-03-16after code.py runs, flush filesystem before resetting heapDan Halbert