summaryrefslogtreecommitdiff
path: root/supervisor/shared
AgeCommit message (Collapse)Author
2020-02-25Merge pull request #2655 from jepler/thing51Jeff Epler
samd51 thing plus: new port
2020-02-25samd51 thing plus: new portjepler
testing performed: * successfully store and retrieve a 500kB file on the flash * square wave output on each pin appears on o'scope * board.SPI(), board.SERIAL(), board.I2C() all construct
2020-02-24Fix Mac crash when waking up with an ejected CIRCUITPYScott Shawcroft
We now correctly set the reason for the unit not being ready and always start the unit. Fixes #2567
2020-02-20Disable BLE file service for nowScott Shawcroft
Fixes #2633
2020-02-12Merge pull request #2615 from mubes/label-driveScott Shawcroft
Allow drive name to be set per target
2020-02-12Allow drive name to be set per target, with fallback to pre-existing behaviourDave Marples
2020-02-12Added fix to allow remount when usb enabled but msc is ejectedGadi Rotenberg
2020-02-06Add support for external flash device Winbond.com W25Q80DVLangston Nashold
Currently, we only support external flash device W25Q80DL. This adds support for the W25Q80DL. tweak
2020-01-29Merge branch 'master' into stm32-meowbithierophect
2020-01-28Implement requested changesLucian Copeland
2020-01-27Merge pull request #2532 from tannewt/teensy4-devScott Shawcroft
Refine iMX RT memory layout and add three boards
2020-01-24pygamer and pybadge boards were not resetting neopixelsDan Halbert
2020-01-23reset NeoPixels on CPB on soft reloadDan Halbert
2020-01-17Refine iMX RT memory layout and add three boardsScott Shawcroft
Introduces a way to place CircuitPython code and data into tightly coupled memory (TCM) which is accessible by the CPU in a single cycle. It also frees up room in the corresponding cache for intermittent data. Loading from external flash is slow! The data cache is also now enabled. Adds support for the iMX RT 1021 chip. Adds three new boards: * iMX RT 1020 EVK * iMX RT 1060 EVK * Teensy 4.0 Related to #2492, #2472 and #2477. Fixes #2475.
2019-12-20Merge pull request #2390 from jepler/displayio-set-rotationScott Shawcroft
displayio: make 'rotation' property settable
2019-12-17Improve USB eject by resetting on replugScott Shawcroft
2019-12-16displayio: make 'rotation' property settableJeff Epler
2019-12-12make translate and remove backslash-r'sDan Halbert
2019-12-12Fix flash write error handling; clean up safe mode message printingDan Halbert
2019-12-10supervisor: external_flash: don't call m_free when it's badJeff Epler
It's extremely dubious that we have these handles that we think are to GC'd memory at a time when the gc pool may not be initialized. Hopefully, they WERE valid GC memory and are undisturbed by the teardown of the interpreter that can lead to this state. In this case, don't try to m_free them, the memory will become free when the GC heap is reinitialized. Closes: #2338 (together with previous commit)
2019-12-10supervisor: external_flash: don't call m_malloc_maybe when it's badJeff Epler
2019-12-06Comment supervisor ble data arrays.Scott Shawcroft
2019-12-04Add connection interval and debuggingScott Shawcroft
This also sets TinyUSB to master and to not include its submodules. It also fixes an old displayio example comment and retries gattc reads.
2019-12-02Merge pull request #2345 from jepler/compressed-unicodeScott Shawcroft
translation: Compress as unicode, not bytes
2019-12-02translation: Compress as unicode, not bytesJeff Epler
By treating each unicode code-point as a single entity for huffman compression, the overall compression rate can be somewhat improved without changing the algorithm. On the decompression side, when compressed values above 127 are encountered, they need to be converted from a 16-bit Unicode code point into a UTF-8 byte sequence. Doing this returns approximately 1.5kB of flash storage with the zh_Latn_pinyin translation. (292 -> 1768 bytes remaining in my build of trinket_m0) Other "more ASCII" translations benefit less, and in fact zh_Latn_pinyin is no longer the most constrained translation! (de_DE 1156 -> 1384 bytes free in flash, I didn't check others before pushing for CI) English is slightly pessimized, 2840 -> 2788 bytes, probably mostly because the "values" array was changed from uint8_t to uint16_t, which is strictly not required for an all-ASCII translation. This could probably be avoided in this case, but as English is not the most constrained translation it doesn't really matter. Testing performed: built for feather nRF52840 express and trinket m0 in English and zh_Latn_pinyin; ran and verified the localized messages such as Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzài. and Press any key to enter the REPL. Use CTRL-D to reload. were properly displayed.
2019-11-29Merge remote-tracking branch 'origin/master' into tick-refactorJeff Epler
2019-11-26update filesystem.cAyan Pahwa
2019-11-26Not creating code.py file for non-express boardsAyan Pahwa
2019-11-25Fix build failure for boards with less memoryAyan Pahwa
2019-11-23Enable creation of code.py only for full buildsAyan Pahwa
2019-11-23Passing address of char_written at f_writeAyan Pahwa
2019-11-23Add \n to file endAyan Pahwa
2019-11-20supervisor: tick: add supervisor_fake_tickJeff Epler
2019-11-20supervisor: tick: documentJeff Epler
2019-11-20supervisor: tick: Rewrite without atomicsJeff Epler
2019-11-19Supervisor: create code.py file with sample codeAyan Pahwa
2019-11-18run_background_tasks: Do nothing unless there has been a tickJeff Epler
This improves performance of running python code by 34%, based on the "pystone" benchmark on metro m4 express at 5000 passes (1127.65 -> 1521.6 passes/second). In addition, by instrumenting the tick function and monitoring on an oscilloscope, the time actually spent in run_background_tasks() on the metro m4 decreases from average 43% to 0.5%. (however, there's some additional overhead that is moved around and not accounted for in that "0.5%" figure, each time supervisor_run_background_tasks_if_tick is called but no tick has occurred) On the CPB, it increases pystone from 633 to 769, a smaller percentage increase of 21%. I did not measure the time actually spent in run_background_tasks() on CPB. Testing performed: on metro m4 and cpb, run pystone adapted from python3.4 (change time.time to time.monotonic for sub-second resolution) Besides running a 5000 pass test, I also ran a 50-pass test while scoping how long an output pin was set. Average: 34.59ms or 1445/s on m4, 67.61ms or 739/s on cbp, both matching the other pystone result reasonably well. import pystone import board import digitalio import time d = digitalio.DigitalInOut(board.D13) d.direction = digitalio.Direction.OUTPUT while True: d.value = 0 time.sleep(.01) d.value = 1 pystone.main(50)
2019-11-18Supervisor: move most of systick to the supervisorJeff Epler
This code is shared by most parts, except where not all the #ifdefs inside the tick function were present in all ports. This mostly would have broken gamepad tick support on non-samd ports. The "ms32" and "ms64" variants of the tick functions are introduced because there is no 64-bit atomic read. Disabling interrupts avoids a low probability bug where milliseconds could be off by ~49.5 days once every ~49.5 days (2^32 ms). Avoiding disabling interrupts when only the low 32 bits are needed is a minor optimization. Testing performed: on metro m4 express, USB still works and time.monotonic_ns() still counts up
2019-11-15add missing includeHierophect
2019-11-15Add never_reset and reset to pin common hal, adjust filesHierophect
2019-11-04Add board configuration for Winterbloom SolThea Flowers
2019-11-04Merge pull request #2236 from tannewt/bleio_tweaksDan Halbert
Refine _bleio
2019-11-01Merge remote-tracking branch 'adafruit/master' into bleio_tweaksScott Shawcroft
2019-11-01Reduce DotStar status brightness; macros for status colorsDan Halbert
2019-10-25add object types to rgb status objects;mark spi rgb objects as never_resetDan Halbert
2019-10-25Initial Itsy nRF52840 defnDan Halbert
2019-10-22Fix build by removing unused varsScott Shawcroft
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-18Use get top and limit stack functionsKamil Tomaszewski
2019-10-14Merge branch 'master' into masterScott Shawcroft