Commit Graph

28 Commits

Author SHA1 Message Date
Dan Halbert
bc510e714f merge 3.0.2 to master 2018-09-18 15:38:12 -04:00
Dan Halbert
c3918bae57 PWMOut was not claming channels on shared TCCs 2018-09-11 19:46:47 -04:00
Dan Halbert
9ea809bef7 add pin claiming to devices 2018-08-31 18:38:05 -04: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
Scott Shawcroft
a5e03b76a6 Split out the peripherals library in preparation of sharing with MakeCode. 2018-06-15 16:16:21 -07: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
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
Roy Hooper
a0954b9e11 Fix for Issue #770 - Provide a better error message when timers are still available. 2018-05-14 13:52:32 -04:00
Jerry Needell
fe738598da modify tick.c to simplify - remove interupt disable from common_hal_pulseio_pulsein_resume 2018-04-20 11:59:33 -04:00
Jerry Needell
e09d95067c update tick.c (fix LOAD value) update PulseIn.c (do not enable interrupts for trigger_duration > 1000 2018-04-17 21:46:15 -04:00
Jerry Needell
e55e06d501 modify tick.c to work when interrupts disabled - modify PulseIn.c to cast argument to common_hal_delay_us 2018-04-16 08:11:14 -04:00
Scott Shawcroft
28642ab10d Add audio output support!
This evolves the API from 2.x (and breaks it). Playback devices are now
separate from the samples themselves. This allows for greater playback
flexibility. Two sample sources are audioio.RawSample and audioio.WaveFile.
They can both be mono or stereo. They can be output to audioio.AudioOut or
audiobusio.I2SOut.

Internally, the dma tracking has changed from a TC counting block transfers
to an interrupt generated by the block event sent to the EVSYS. This reduces
the overhead of each DMA transfer so multiple can occure without using up TCs.

Fixes #652. Fixes #522. Huge progress on #263
2018-04-12 16:35:13 -07:00
Scott Shawcroft
a2b18b75d4 Fix loops and comma style. 2018-02-16 10:05:28 -08:00
Scott Shawcroft
538081528d pulsein works on m0 2018-02-15 16:04:39 -08:00
Scott Shawcroft
fcde138ea3 pulsein works on m4 2018-02-15 15:12:58 -08:00
Scott Shawcroft
07230f2637 pulsein compiles but doesn't work 2018-02-14 16:59:04 -08:00
Scott Shawcroft
c7af17525b m4 pulseout works 2018-02-14 11:38:52 -08:00
Scott Shawcroft
6a7d889dd4 m0 pulseout works. Factored out shared timer code. 2018-02-13 18:17:20 -08:00
Scott Shawcroft
8479eef578 m0 tc and tcc work 2018-02-13 16:44:04 -08:00
Scott Shawcroft
6c3075bec6 m4 tc and tcc works. multi-tcc channels ok too. 2018-02-13 14:22:55 -08:00
Scott Shawcroft
cc616aea4e m4 tc output works. Watch out for the PAC! 2018-02-12 23:41:26 -08:00
Scott Shawcroft
0397202288 m4 compiles, pwmout implemented but TC0 (A1) doesn't run 2018-02-09 17:21:06 -08:00
Scott Shawcroft
0398f308fa m4 compiles, pwmout implemented 2018-02-09 16:37:27 -08:00
Scott Shawcroft
190e7d629e WIP 2018-02-09 16:37:27 -08:00
Scott Shawcroft
73c15dcf8b Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge
This is prep for merging in the NRF5 pull request.
2017-10-24 22:31:16 -07:00