summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)Author
2021-02-15wip: usb_cdc.serialsDan Halbert
2021-02-04shrink a couple of buildsDan Halbert
2021-02-04add usb_background_schedule()hathach
unconditionally schedule usb background after background_callback_reset()
2021-01-20Fix press any key messageScott Shawcroft
2020-12-31update wake-alarm implementationmicroDev
2020-12-22A couple sleep fixesScott Shawcroft
* Better messaging when code is stopped by an auto-reload. * Auto-reload works during sleeps on ESP32-S2. Ticks wake up the main task each time. * Made internal naming consistent. CamelCase Python names are NOT separated by an underscore.
2020-12-22mark alarm.wake_alarm during gc sweepDan Halbert
2020-12-15Add alarm.pin that wakes on pin levelScott Shawcroft
Fixes #3787
2020-12-11SleepMemory + set alarm.wake_alarmDan Halbert
2020-12-10Fix some spelling mistakesMike Causer
2020-12-08Fix build and more commentsScott Shawcroft
2020-12-08Add `board_deinit` for use with sleepScott Shawcroft
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
2020-12-07Include wifi.radio singleton in gcDan Halbert
2020-12-02Merge pull request #3767 from dhalbert/sleepScott Shawcroft
Initial alarm and sleep PR: time alarms with light and deep sleep; PinAlarms not yet implemented
2020-12-01address review commentsDan Halbert
2020-11-28Add movable allocation system.Christian Walther
This allows calls to `allocate_memory()` while the VM is running, it will then allocate from the GC heap (unless there is a suitable hole among the supervisor allocations), and when the VM exits and the GC heap is freed, the allocation will be moved to the bottom of the former GC heap and transformed into a proper supervisor allocation. Existing movable allocations will also be moved to defragment the supervisor heap and ensure that the next VM run gets as much memory as possible for the GC heap. By itself this breaks terminalio because it violates the assumption that supervisor_display_move_memory() still has access to an undisturbed heap to copy the tilegrid from. It will work in many cases, but if you're unlucky you will get garbled terminal contents after exiting from the vm run that created the display. This will be fixed in the following commit, which is separate to simplify review.
2020-11-26deep sleep working; deep sleep delay when connectedDan Halbert
2020-11-25merge from upstream + wipDan Halbert
2020-11-25changed alarm.time APIDan Halbert
2020-11-24some API renaming and bug fixes; fix docsDan Halbert
2020-11-23working, but need to avoid deep sleeping too fast before USB readyDan Halbert
2020-11-22wipDan Halbert
2020-11-21wip: ResetReason to microcontroller.cpuDan Halbert
2020-11-19wip; not compiling yetDan Halbert
2020-11-19wipDan Halbert
2020-11-16wip: initial code changes, starting from @tannewt's sleepio branchDan Halbert
2020-10-27Start tweaking the workflow to sleepScott Shawcroft
2020-10-27Implement sleep on code.py exitmicroDev
2020-10-27Get io wake workingmicroDev
2020-10-27Update soft reboot messagemicroDev
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