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
Scott Shawcroft
3607d3ba2c
Correctly reset the PTC
2018-05-22 14:20:35 -07:00
Scott Shawcroft
31bcd1c45c
Fixup gclk init
2018-05-22 13:56:12 -07:00
Scott Shawcroft
99123a8621
Turn on touchio for M0 boards. M4 will come later once its supported
...
by FreeTouch.
Fixes #670
2018-05-22 13:49:08 -07:00
Scott Shawcroft
6a8db03ade
Merge pull request #838 from rhooper/master
...
add supervisor.reload() to soft reboot from code
2018-05-16 17:52:16 -04:00
Scott Shawcroft
99e34e38eb
Merge pull request #829 from jerryneedell/jerryn_i2c
...
add keyword timeout to I2C -- only used for bitbangioi
2018-05-16 14:52:11 -04:00
Roy Hooper
3fd9900ea7
disable pins on trinket_m0 so that we can free a fair bit of flash - Issue #840
2018-05-15 13:13:59 -04: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
d6c26942a5
add timeout keyword to I2C - for bitbangio - ignored for busio
2018-05-13 21:54:44 -04:00
Dan Halbert
240659da0e
PBxx pins were not setting DRVSTR or reporting PULL properly
2018-05-10 23:09:51 -04:00
Scott Shawcroft
50fc90bc5f
Add pause/resume control to AudioOut and I2SOut
...
Fixes #808
2018-05-08 11:53:13 -07:00
Dan Halbert
9d484c4935
Merge pull request #789 from tannewt/pdmin3
...
Re-enable PDMIn without ASF
2018-05-02 19:59:20 -04:00
Scott Shawcroft
04f75b8903
Reduce the buffer size back to what 2.x has. Increase was leftover
...
from debugging.
2018-05-02 15:21:43 -07:00
Scott Shawcroft
22b7cd3d51
Fix 8 bit recordings on CPX.
...
The DMA trigger source was incorrect when using serializer 1 on
the SAMD21.
Playback register was incorrect for 8 bit as well. Now fixed.
2018-05-02 15:15:25 -07:00
Dan Halbert
3a2b4af830
Implement microcontroller.cpu.temperature on '21 and '51.
2018-05-01 21:35:55 -04:00
Noralf Trønnes
681399f8db
atmel-samd: RTC: Improve precision when setting datetime
...
The prescaler is not reset when setting the counter so we can be off by
as much as 1023/1024 seconds. Fix this by resetting the RTC module.
2018-05-01 21:35:24 -04:00
Scott Shawcroft
cfea51ec68
Re-enable PDMIn without ASF and using the helpers added with
...
I2SOut.
The API is almost the same except the frequency attribute has been
renamed to sample_rate so that its less likely to be confused with
frequencies within the audio itself.
Fixes #263 .
2018-05-01 14:35:43 -07:00
Noralf Trønnes
62d7a800d7
atmel-samd: RTC: Improve precision when setting datetime
...
The prescaler is not reset when setting the counter so we can be off by
as much as 1023/1024 seconds. Fix this by resetting the RTC module.
2018-04-29 20:43:07 +02:00
Dan Halbert
9daa1a68d8
HID gamepad support
2018-04-23 23:51:23 -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
3399d541c3
Merge remote-tracking branch 'origin/master' into jerryn_tick
2018-04-19 20:54:47 -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
Scott Shawcroft
81d395d825
Merge pull request #745 from notro/time_rtc
...
RFC: Add rtc module
2018-04-16 15:26:54 -07: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
Noralf Trønnes
8e2080411f
atmel-samd: Add rtc module support
...
Support the rtc module by using hal_calendar.
2018-04-16 13:15:08 +02:00
Scott Shawcroft
812fe0c93f
Turn on nvm in 3.0.
...
Its 256b on M0 and 8k on M4 to match flash erase sizes.
Fixes #758
2018-04-13 16:22:28 -07:00
Scott Shawcroft
22194d5977
Tweaks based on dhalbert's feedback.
2018-04-13 10:51:01 -07: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
Dan Halbert
5f98953ed8
esp8266 and nrf: raise NotImplementedError
2018-04-10 12:08:41 -04:00
Scott Shawcroft
4e053cea0d
Merge pull request #628 from sommersoft/super_status
...
Added Function To Check the Serial Connection From CircuitPython Layer
2018-04-08 22:06:09 -07:00
Dan Halbert
726d5e52a3
Merge branch 'master' into 3.0_hid
2018-04-08 09:52:29 -04:00
Dan Halbert
a159b85340
Reorder composite device interfaces; fix report length bug
2018-04-08 09:33:02 -04:00
Jeff Epler
fe6f5aaa70
atmel-samd: reset: reset() was always entering bootloader mode
...
.. set the dbl_tap word to a different special value unless
RUNMODE_BOOTLOADER was selected
2018-04-05 08:16:53 -05:00
Dan Halbert
435e894fa0
Merge branch 'master' into 3.0_hid
2018-04-02 19:19:43 -04:00
Dan Halbert
df91878d2e
WIP: works with just keyboard but not complex report descriptor
2018-03-30 23:24:00 -04:00
sommersoft
6ee573c7c9
Merge branch 'master' into super_status
2018-03-30 14:27:39 -05:00
Scott Shawcroft
cebcec5e63
Check for floating pins by pulling them low briefly before testing their values.
2018-03-26 16:32:16 -07:00
Scott Shawcroft
25ba8ee489
Add an s because grammar.
2018-03-26 15:21:08 -07:00
Scott Shawcroft
37538fc0e7
Fix I2C init hang when the SCL pin is pulled low.
...
We added a check to make sure the pins are in a high state before
initing the bus. This leads to a friendly error message when someone
forgets to add the pull up resistors to their circuit.
2018-03-26 15:13:52 -07:00
Jeff Epler
c0029e1d97
Don't lose half of the processor's serial number
...
Before this change, `microcontroller.cpu.uid` returned values
where the top 4 bits of each byte were zero, because of
an incorrect bitmask used in this function.
2018-03-25 13:01:04 -05:00
Dan Halbert
31f5b6a238
WIP: simple working HID
2018-03-24 18:29:12 -04:00
Jeff Epler
dddfad6594
UART: Fix maybe-uninitialized diagnostic
...
The following error occurs when building with gcc 5.4.1 (debian stretch):
common-hal/busio/UART.c:104:83: error: 'sercom_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sercom_insts[rx->sercom[j].index]->USART.CTRLA.bit.ENABLE == 0) ||
It may be related to the addition of rx-only UARTs; gcc is unable
to infer the intended relationship between have_tx and sercom_index
being set (I am still not entirely confident of it myself)
2018-03-19 20:40:04 -05:00
Scott Shawcroft
88aa0e2660
Remove SERCOM pointers from pin data structure because index is
...
enough.
This saves 380 bytes on the Arduino Zero build. (More pins ==
more savings.)
2018-03-14 11:14:32 -07:00
Scott Shawcroft
e7fc0b6aa7
Use DMA for long SPI transactions including those to the SPI Flash.
...
QSPI is not currently working so its commented out.
This is progress on #652 .
2018-03-09 12:45:46 -08:00
Bryan Siepert
942b7ffbe0
fixes hardware dotstar support for 3.0 and addresses issue #514
2018-03-08 20:39:47 -08:00
sommersoft
c1c3a79ec4
atmel-samd: changed Status to Runtime; instituted runtime singleton
2018-03-09 02:19:51 +00:00
Dan Halbert
5c24023240
use CONF_GCLK_DAC_SRC and refactor a bit
2018-02-27 17:21:03 -05:00
Dan Halbert
4895a9d1d8
Use safe clock freqs for AnalogOut; use DAC REFRESH on SAMD51.
2018-02-27 15:44:27 -05:00
Dan Halbert
9b4477e1dc
Implement UART for 3.0 + related fixes.
...
1. UART: ported to ASF4. Allow rx-only and tx-only. Add .baudrate r/w property.
2. Make NeoPixel timing deterministic by turning off caches during NeoPixel writes.
3. Incorporate asf4 updates:
a. async USART driver
b. bringing Atmel START configuration closer to what we use
c. Clock initialization order now specified by CIRCUITPY_GCLK_INIT_1ST and _LAST.
4. supervisor/port.c: Move commented-out clock-test pin setting to correct location.
2018-02-21 17:18:49 -05:00
sommersoft
9ee4d13756
added Status submodule to ports/atmel-samd/common-hal/supervisor; issue #544
2018-02-19 20:49:18 +00:00