Commit Graph

144 Commits

Author SHA1 Message Date
Scott Shawcroft edc8383e22
Improvements thanks to danh's review 2019-01-18 16:37:06 -08:00
Scott Shawcroft 760bd8d8a4
share fourwire and make nrf compile 2019-01-17 15:15:59 -08:00
Scott Shawcroft 2d136d58bf
Fix other builds and hallowing 2019-01-17 14:45:29 -08:00
Scott Shawcroft 84292ad890
External fourwire works and blinka splash after 2019-01-17 00:20:16 -08:00
Scott Shawcroft 05d8885a1a
Rework displays in prep for dynamic support and 8bit parallel. 2019-01-16 12:05:20 -08:00
Scott Shawcroft a14762a16c
Add support for rendering a shape.
Fixes #1171
2019-01-14 17:29:15 -08:00
Scott Shawcroft 19db886645
Support the display on the pyportal.
Also fix #1390, reload during sleep broken.
2019-01-10 17:29:34 -08:00
Scott Shawcroft 7ad2e6ace3
Add stack validity check and raise an error when it happens.
The backtrace cannot be given because it relies on the validity
of the qstr data structures on the heap which may have been
corrupted.

In fact, it still can crash hard when the bytecode itself is
overwritten. To fix, we'd need a way to skip gathering the
backtrace completely.

This also increases the default stack size on M4s so it can
accomodate the stack needed by ASF4s nvm API.
2018-12-04 23:26:04 -08:00
Dan Halbert 63cd9209f1 allow KeyboardInterrupt on UART read; fix nrf UART pin claiming; rename feather 52840 UART pins 2018-12-04 15:05:39 -05:00
Dan Halbert 80db2cec99 UART changes: timeout in secs, write bytes, etc. 2018-12-03 12:04:32 -05:00
Dan Halbert 11de8fdca7 merge 3.x swap of /lib and .frozen; update frozen libs 2018-11-15 15:00:23 -05:00
Scott Shawcroft a3a690dc01
Add pragma to ensure neopixel_write is always -Os 2018-11-13 10:56:00 -08:00
Scott Shawcroft 43f7ca7985
Incorporate feedback:
* Clean up board defines.
* Add flush on eject and stay ejected.
* Swith back to NONE protocol for CDC.
2018-11-09 11:33:56 -08:00
Scott Shawcroft 9d91111b1b
Move atmel-samd to tinyusb and support nRF flash.
This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.

Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the flash API as
well. This PR also includes the QSPI support for nRF.
2018-11-08 17:25:30 -08:00
ATMakersBill 4f2f571536 Adding the serial_bytes_available() method to the 3.x branch 2018-11-03 14:01:30 -04:00
Scott Shawcroft 4eb1fe18e5
Tweaks from feedback:
* default_value is now quiescent_value
* Use step = -step format for sign switch
* Add note about analogout_reset being empty
2018-10-17 11:31:08 -07:00
Scott Shawcroft c209165d43
Ramp values to and from a default value while active.
This reduces the popping sound on initial playback of an audio
sample.

The M4 DAC has a pop on startup that cannot be prevented. It also
does not allow readback so current values of the DAC are ignored.

Fixes #1090
2018-10-16 16:23:29 -07:00
Scott Shawcroft df80ad8e6e
Merge pull request #1193 from ATMakersBill/master
Add supervisor.runtime.serial_bytes_available so that input() can be used without blocking.
2018-10-09 23:58:43 -07:00
ATMakersBill 9f94712ad1 replacing change to input() with separate method to check for USB Serial input 2018-10-09 18:37:52 -04:00
Scott Shawcroft a9d094ab74
Fix translations 2018-09-21 12:24:04 -04:00
Scott Shawcroft e5274959f2
Merge remote-tracking branch 'adafruit/3.x' into merge_3x 2018-09-21 12:22:26 -04:00
Scott Shawcroft 655f223916
Clock the SAMD21 much faster so it can actually convert at its max
sample rate of 350ksps.

Also added an error check of sample rate.

Fixes #1196
2018-09-18 15:29:46 -07:00
Dan Halbert bc510e714f merge 3.0.2 to master 2018-09-18 15:38:12 -04:00
Dan Halbert 6a046f55c4 UART fixes and enhancements; default board object fix 2018-09-12 17:19:43 -04:00
Paul Kierstead 02b3f62460 When UART timeout of zero is given, make read() return data already available 2018-09-12 13:25:49 -04:00
Dan Halbert c3918bae57 PWMOut was not claming channels on shared TCCs 2018-09-11 19:46:47 -04:00
Scott Shawcroft c2e49dc87f
Merge remote-tracking branch 'adafruit/master' into hallowing 2018-09-06 14:54:55 -07:00
Scott Shawcroft 1683eb913d
Minor tweaks based on feedback 2018-09-06 14:49:49 -07:00
Dan Halbert 4c3b4cacfa Merge remote-tracking branch 'adafruit/master' into nrf-pin-claiming 2018-09-05 13:15:22 -04:00
Paul Kierstead 2d3f1a10bf When UART timeout of zero is given, make read() return data already available 2018-09-01 17:07:30 +00:00
Dan Halbert 9ea809bef7 add pin claiming to devices 2018-08-31 18:38:05 -04:00
Scott Shawcroft 121903b6ee
Tweaks based on feedback 2018-08-31 14:21:48 -07:00
Scott Shawcroft 6697544cdf
Introduce displayio to render graphics to displays.
It's designed to minimize RAM footprint by using Sprites to
represent objects on the screen. The object model also facilitates
partial screen updating which reduces the bandwidth needed to display.

This is all handled in C. Python simply manipulates the objects with
the ability to synchronize to frame timing.
2018-08-31 12:31:52 -07:00
Jerry Needell e8b94d0024 adjust SAMD51 neopixel_write timing 2018-08-24 07:01:50 -04:00
Scott Shawcroft 44de3d49a8
Speed up zero neopixel pulses.
SK6812 on 5v is pickier than WS2812 on 5v.

Hopefully fixes #1083.
2018-08-20 17:04:46 -07:00
Noralf Trønnes eefb6842a0 i2cslave: Fix missing translate() when raising exceptions
The translate() changes where applied after travis had checked the
i2cslave PR so this wasn't caught.
2018-08-18 16:00:06 +02:00
Scott Shawcroft 4a4d84ba42
Merge pull request #1064 from notro/i2cslave
Add busio.I2CSlave
2018-08-17 16:51:45 -07:00
Scott Shawcroft 2cd166b573
Fix esp and samd 2018-08-16 17:41:35 -07:00
Scott Shawcroft de5a9d72dc
Compress all translated strings with Huffman coding.
This saves code space in builds which use link-time optimization.
The optimization drops the untranslated strings and replaces them
with a compressed_string_t struct. It can then be decompressed to
a c string.

Builds without LTO work as well but include both untranslated
strings and compressed strings.

This work could be expanded to include QSTRs and loaded strings if
a compress method is added to C. Its tracked in #531.
2018-08-16 17:40:57 -07:00
Noralf Trønnes 11cbeb87ad ports/atmel-samd: Implement i2cslave.I2CSlave
This adds support for SAMD acting as a I2C slave in polled mode.
2018-08-16 17:20:49 +02:00
Noralf Trønnes b6822b86ac busio/I2C: Split out samd_i2c_get_sercom()
It will be shared with I2CSlave.
2018-08-16 17:06:40 +02:00
Scott Shawcroft 86d2154d71
Change file mode back. 2018-08-09 09:14:14 -07:00
Scott Shawcroft 94c5ceab36
Initial SAMR board revision. 2018-08-09 05:36:46 -07:00
Jeff Epler b0e33f6a11 atmel-samd: UART: allocate rx buffer in long-lived region
This is not strictly needed in order for #1056 to be resolved,
because the "make long-lived" machinery is unaware of this pointer.

However, as UARTs are assumed to be long-lived, this change is
beneficial because it moves the long-lived buffer into the upper
memory area with other long-lived objects, instead of remaining in
the low heap.
2018-08-08 19:21:57 -05:00
Dan Halbert 2e80f37709
Merge pull request #1096 from tannewt/tune_neopixel
Retune neopixel timings on SAMD51. They were too slow.
2018-08-07 21:33:12 -04:00
Scott Shawcroft b0dd645e27
Retune neopixel timings on SAMD51. They were too slow.
Fixes #1083
2018-08-07 16:58:37 -07:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Scott Shawcroft 168aa394db
Move pin struct to the peripherals library.
Its slimmed down by removing the qstr and bit packing TCC info.

The trinket m0 build actually grows by 20 bytes. The arduino zero
build shrinks by 188 bytes.
2018-08-02 13:59:05 -07:00
hathach 533d8dda96 fix samd usb hid typo 2018-08-01 08:40:04 +07:00
Dan Halbert 2809b4f9dd Merge branch 'master' into micropython-25ae98f-merge 2018-07-16 19:36:40 -04:00