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
Dan Halbert
a20ab40ed2
Merge 3.0.0 final bugfixes and changes to master
2018-07-16 09:01:46 -04:00
Dan Halbert
e2e01efa84
compiles and runs; hangs on import storage;storage.VfsFat.<tab>
2018-07-13 22:51:10 -04:00
Dan Halbert
8bb363f7c4
must set pull after setting direction with gpio_set_pin routines
2018-07-09 17:18:06 -04:00
Dan Halbert
52a11547cb
fix OneWire timing and DigitalInOut.switch_to_input()
2018-06-28 23:32:20 -04:00
Scott Shawcroft
a5e03b76a6
Split out the peripherals library in preparation of sharing with MakeCode.
2018-06-15 16:16:21 -07:00
Scott Shawcroft
ee817a2fa8
Correct UART reads to return error on timeout.
...
This causes read to correctly return None instead of b''.
Fixes #874
2018-06-12 14:03:27 -07:00
Dan Halbert
4691b30c02
PDMIn: turn serializer on when starting DMA
2018-06-12 12:35:51 -04:00
Dan Halbert
b2d98edb4e
Merge pull request #901 from tannewt/pulseio_too_fast
...
Prevent freezing USB during high frequency PulseIn.
2018-06-08 17:59:06 -04:00
Scott Shawcroft
8fb34a5846
Use bool not int.
2018-06-08 14:57:20 -07:00
Scott Shawcroft
2fbab8067a
Prevent freezing USB during high frequency PulseIn.
...
We now track the last time the background task ran and bail on the
PulseIn if it starves the background work. In practice, this
happens after the numbers from pulsein are no longer accurate.
This also adjusts interrupt priorities so most are the lowest level
except for the tick and USB interrupts.
Fixes #516 and #876
2018-06-08 12:56:32 -07:00
Dan Halbert
218930d18b
Check for PDMIn DMA getting stuck.
2018-06-08 08:23:52 -04:00
Scott Shawcroft
717199018b
Adapt for feedback and hack around pIRkey size constraint.
2018-06-01 15:08:52 -07:00
Dan Halbert
f386144428
redo state algorithm
2018-06-01 15:08:52 -07:00
Scott Shawcroft
9920f0a5de
atmel-samd: Make ticks more atomic.
...
Always use current_tick when sub millisecond precision is required.
Otherwise getting the ms/us to correspond is tricky.
2018-06-01 15:08:52 -07:00
Scott Shawcroft
d0fb6e7a2f
atmel-samd: Add rotary encoder support.
...
Fixes #283
2018-06-01 15:08:48 -07:00
Scott Shawcroft
fd71e56891
atmel-samd: Re-org helper peripheral files into their own subdirectory.
...
Ideally in the future they won't depend on ASF4 or MicroPython.
2018-06-01 15:07:31 -07:00
Scott Shawcroft
bf1f0b3d11
Turn off timer on AudioOut deinit.
...
Thanks to @sommersoft for spotting the error.
Fixes #850
2018-06-01 13:32:45 -07:00