Commit Graph

627 Commits

Author SHA1 Message Date
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
Noralf Trønnes e158702a68 atmel-samd/samd51: Use crystal for RTC
This uses the crystal to clock the RTC on boards which have a crystal.

Disable clock generator 2 which was enabled in commit
8e2080411f ("atmel-samd: Add rtc module support").
samd51 differs from samd21 when it comes to the RTC clock. samd51 doesn't
have an explicit clock peripheral so no need for a clock generator.

The same commit didn't even setup XOSC32K correctly, it missed EN1K and XTALEN.

The RTC uses the 1k clock output, so enable it on the OSCULP32K even if it works without it.
2018-06-01 18:03:23 +02:00
Noralf Trønnes ab7ddfddd5 atmel-samd/samd51: Refactor clock setup
Refactor the convoluted asf4 clock setup into something more readable.

enable_clock_generator() has 2 changes:
- Set 'Output enabled' to match the current clock setup
- Handle divisors above 511

Add an enable_clock_generator_sync() version which makes it possible to setup
clocks without waiting for syncing. The bootup would hang without this.

I have checked these registers:

 NVMCTRL->CTRLA = 0x00000004

 Peripheral clocks (only non-zero shown):
 PCHCTRL[1]=0x00000045
 PCHCTRL[10]=0x00000041

 Generator clocks (only non-zero shown):
 GENCTRL[0] = 0x00010907
 GENCTRL[1] = 0x00010906
-GENCTRL[2] = 0x00041104
+GENCTRL[2] = 0x00200904
 GENCTRL[4] = 0x00010907
 GENCTRL[5] = 0x00180906

 DFLL clock:
 OSCCTRL->DFLLCTRLA = 0x00000082
 OSCCTRL->DFLLCTRLB = 0x00000000
 OSCCTRL->DFLLVAL = 0x00008082
 OSCCTRL->DFLLMUL = 0x00000000

 DPLL clocks:
 OSCCTRL->Dpll[0].DPLLCTRLA=0x00000002
 OSCCTRL->Dpll[0].DPLLCTRLB=0x00000000
 OSCCTRL->Dpll[0].DPLLRATIO=0x0000003b
 OSCCTRL->Dpll[1].DPLLCTRLA=0x00000080
 OSCCTRL->Dpll[1].DPLLCTRLB=0x00000020
 OSCCTRL->Dpll[1].DPLLRATIO=0x00000000

 OSC32KCTRL clock:
 OSC32KCTRL->RTCCTRL = 0x00000000
 OSC32KCTRL->XOSC32K = 0x00002082
 OSC32KCTRL->CFDCTRL = 0x00000000
 OSC32KCTRL->EVCTRL = 0x00000000
 OSC32KCTRL->OSCULP32K = 0x00002300

Only gen2 changed which is due to samd51 having more bits in the simple
division register so DIVSEL wasn't necessary, and it didn't have OE set.
2018-06-01 18:02:35 +02:00
Noralf Trønnes 5c6aea9fd8 atmel-samd/samd51: Implement samd.clock
Fill out the dummy implementation.
2018-06-01 18:01:08 +02:00
Radomir Dopieralski d02899f822 Add gamepad_singleto to root pointers for the nrf port 2018-05-30 23:11:23 +02:00
Radomir Dopieralski b219ce6d37 Add gamepad_singleton to root pointers 2018-05-30 23:11:22 +02:00
Dan Halbert eab8e43188 rev E feather M4 express; remove named AREF pins 2018-05-29 20:25:28 -04:00
Dan Halbert 754c36bb37
Merge pull request #867 from dhalbert/fix_pirkey_apa102
3.0 pirkey build including appropriate frozen modules
2018-05-24 22:07:14 -04:00
Dan Halbert ee896cdd41 restore I2C and UART. Don't do port.c resets and inits for modules that are not available. 2018-05-24 20:20:18 -04:00
Scott Shawcroft 42bf3a1306 Remove asf3 nvm code. 2018-05-24 13:14:40 -07:00
Dan Halbert b9f36184f5 refine pirkey build 2018-05-24 13:28:03 -04:00
Dan Halbert 083f91363a pirkey APA102 defs were commented out in mpconfigboard.h 2018-05-23 18:21:07 -04:00
Scott Shawcroft aa86a1457f Use merged in FreeTouch 2018-05-23 11:57:35 -07:00
Dan Halbert 6af5fc2796
Merge pull request #861 from tannewt/touchio3
Turn on touchio for M0 boards.
2018-05-23 14:20:15 -04:00
Scott Shawcroft 641caaa6dd Gain space back in non-Express builds by using -finline-limit 2018-05-23 10:36:59 -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
Dan Halbert 22405d6bdb
Merge pull request #860 from dhalbert/3.0-cpx-crickit
turn off longint on cpx crickit; update frozen libs
2018-05-22 16:28:42 -04:00
Scott Shawcroft 165b28438a
Merge pull request #854 from python-ugame/extra-override
Allow overriding EXTRA_BUILTIN_MODULES in mpconfigboard.h
2018-05-22 10:22:35 -07:00
Dan Halbert 0d7db29630 turn off longint on cpx crickit; update frozen libs 2018-05-22 13:03:13 -04:00
Dan Halbert 49a81d5c4b LONGLONG typo 2018-05-22 09:35:29 -04:00
Dan Halbert 45db48bbaa make longint choice mechanism more readable 2018-05-22 08:04:14 -04:00
Dan Halbert 5680933483 refactor longint settings; make crickit cpx build 2018-05-21 23:58:03 -04:00
Radomir Dopieralski 6a6ab2b0ec Allow overriding EXTRA_BUILTIN_MODULES in mpconfigboard.h
Some boards (like the uGame10) may want to have their own set of extra
modules. This change lets them override EXTRA_BUILTIN_MODULES in their
mpconfigboard.h and makes the ugame10 board do that.
2018-05-21 09:23:58 +02:00
Noralf Trønnes cf33ad9a54 atmel-samd/samd21: Enable long int on Express boards
This is necessary for using 1970 epoch in the time module.
2018-05-18 12:35:26 +02:00
Matt Land 06b293af29 pirkey, trinket, ugame 2018-05-17 13:56:10 -04:00
Matt Land a84845c0ae itsbitsy, metro 2018-05-17 13:48:33 -04:00
Matt Land 173a0a5faa arduino, circuitplayground, feather boards 2018-05-17 13:42:08 -04:00
Matt Land fc2b4526d3 worked 2018-05-17 13:33:26 -04:00
Matt Land e1cccd3dac rename to UART 2018-05-17 13:21:15 -04:00
Matt Land 2210fc60b1 Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-default-serial 2018-05-17 13:08:43 -04:00
Matt Land c846f4bdae remove newline 2018-05-17 12:17:06 -04:00
Matt Land 4fd4adf974 not working 2018-05-17 12:14:51 -04:00
hathach 6d4a2f5524 Merge branch 'master' into usbboot 2018-05-17 15:23:45 +07:00
hathach 52ebfd07a5 update nrfutil to 0.5.2d with singlebank option 2018-05-17 15:20:07 +07:00
Matt Land 30c625ff46 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 17:58:03 -04:00
Matt Land 0511becd55 Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-i2c-gemma 2018-05-16 17:55:43 -04: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
Matt Land b9b742cc69 add spi def to all boards pins file 2018-05-16 17:43:14 -04:00
Matt Land c2fa892a02 fix formatting 2018-05-16 17:38:44 -04:00
Matt Land cc52f8efd9 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 17:32:50 -04:00
Matt Land 0a185c4d2d Merge branch 'master' of https://github.com/adafruit/circuitpython into feature-i2c-gemma 2018-05-16 17:07:58 -04:00
Matt Land e8e75c056a For the two boards without SCL and SDA can you still add the board global entry for I2C? That way they'll raise the NotImplementedError with the better message instead of a NameError. 2018-05-16 17:02:41 -04:00
Jerry Needell 4f93467841 set #define MICROPY_USE_INTERNAL_ERRNO (0) in mpconfigport for ESP8266 to fix compile error 2018-05-16 16:10:32 -04:00
Matt Land de885e81b1 Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground 2018-05-16 16:07:55 -04:00
Matt Land 8a351595ef formatting, trailing newlines 2018-05-16 15:57:25 -04:00
Matt Land 2c067edf54 used pins.c instead of README.rst 2018-05-16 15:54:01 -04:00
Matt Land 3144654854 SPI for all boards 2018-05-16 15:36:36 -04:00
Matt Land 244866c2c3 spi on much 2018-05-16 15:25:24 -04:00
Matt Land 10888be8e8 fixed pins 2018-05-16 15:07:12 -04:00
Matt Land 8d1d821876 pin issue 2018-05-16 14:58:57 -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
Kevin Townsend 78f806c891 Added board specific READMEs 2018-05-15 22:42:27 +02:00
Matt Land fbb57f902d better error message 2018-05-15 15:37:48 -04:00
Matt Land ff6e6b5155 best effort 2018-05-15 15:33:27 -04:00
Matt Land 4e65752d6e feather m0 boards 2018-05-15 15:28:23 -04:00
Roy Hooper 90a09dba59 Merge branch 'master' of github.com:adafruit/circuitpython 2018-05-15 14:54:54 -04:00
Matt Land cdeb7ddff8 fix non- builds 2018-05-15 14:27:05 -04:00
Matt Land cd1f6627e4 formatting 2018-05-15 14:09:00 -04:00
Matt Land bd7f603748 zero + feather logger 2018-05-15 14:06:01 -04:00
Roy Hooper 7d443c87b3 Add gemma_m0 pin exclusions 2018-05-15 14:03:39 -04:00
Matt Land a10f04ad6e support for 2 2018-05-15 13:53:53 -04:00
Matt Land b0bacd9b0b review code 2018-05-15 13:15:24 -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
Dan Halbert 54293397c5
Merge pull request #837 from godlygeek/human_readable_oserror
Human readable OSError messages
2018-05-15 10:12:09 -04:00
hathach 53593d1315 fix #809
define CIRCUITPY_BOOT_OUTPUT_FILE will cause mp_hal_stdout_tx_strn() to
invoke before serial_init() is called. Solution is skipped output to
serial if it is not inited.
2018-05-15 18:40:49 +07:00
hathach 05f36ebeb1 update the bootloader hex for feather52840 2018-05-15 16:06:03 +07:00
hathach dadf831fe9 Merge branch 'usbboot' of github.com:microbuilder/circuitpython into usbboot 2018-05-15 13:33:53 +07:00
hathach 5365e51e39 Merge branch 'master' into usbboot 2018-05-15 13:29:25 +07:00
Roy Hooper 698912633f Rename reload_next_character to reload_requested to make it match it's intended use 2018-05-14 17:00:38 -04:00
Matt Wozniski 0518cc1d94 Include uerrno for boards with external SPI flash
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
2018-05-14 15:12:35 -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
Roy Hooper 1661cbb6e1 Make python detection more robust and allow setting PYTHON2 and PYTHON3 to override python executables during build. 2018-05-14 11:19:19 -04:00
Jerry Needell d6c26942a5 add timeout keyword to I2C - for bitbangio - ignored for busio 2018-05-13 21:54:44 -04:00
Scott Shawcroft ce5eae1c76
Merge pull request #761 from jepler/nrf-modules
nrf: Enable binascii, hashlib modules
2018-05-11 19:40:45 -07:00
Jeff Epler 471fdae993 nrf: Enable binascii, hashlib modules
These modules would be very handy to have in order to implement a
more robust replacement for ampy.  It costs around 2KiB of text and
no data or bss.

'binascii' has base64 encoding, which can be used to create a fully
8-bit-clean transport above the slightly cooked serial connection of
these boards.

'hashlib' is a bit less critical, but I have found it handy to
be able to robustly checksum remote files.

I see this as only being useful on ports which don't have USB block
device support, so atmel-samd doesn't need it.  These modules are
already on esp8266 so I think nrf52 seems like the only one that
needs it.
2018-05-11 07:41:09 -05:00
Scott Shawcroft 51106db93d
Merge pull request #827 from dhalbert/3.0_pb_pins_digitalinout
PBxx pins were not setting DRVSTR or reporting PULL properly
2018-05-10 20:42:26 -07:00
Dan Halbert 240659da0e PBxx pins were not setting DRVSTR or reporting PULL properly 2018-05-10 23:09:51 -04:00
Jeff Epler 2acd5d88b6 nrf52: enable framebuf module
Closes: #656
2018-05-10 18:37:08 -05:00
Scott Shawcroft 50fc90bc5f Add pause/resume control to AudioOut and I2SOut
Fixes #808
2018-05-08 11:53:13 -07:00
Scott Shawcroft d3a5d40374
Merge pull request #785 from notro/rtc_calibration
atmel-samd/samd21: Rework clock setup + calibration
2018-05-08 10:55:51 -07:00
Dan Halbert e82f37c60e enable cache in SAMD51 2018-05-07 21:55:37 -04:00
Noralf Trønnes 5d5d14709f Add clock representation with calibration
Add a python representation of the clocks with the possibility to change
the calbration of clock sources.
2018-05-07 23:04:02 +02:00
Lars Kellogg-Stedman 56bf411d21 esp8266/modutime.c: remove symbol conflicts between time and utime modules
this renames symbols in modutime.c so that it no longer conflicts with
the time module.  This commit does not enable the utime module; it
simply makes it easier for a local developer to do so.
2018-05-07 11:55:20 -04:00
jerryneedell b617271191
Update mpconfigport.h
comment out define of CIRCUITPYTHON_BOOT_OUTPUT_FILE  for NRF52  --  it does not work properly
2018-05-07 08:59:24 -04:00
Noralf Trønnes 2893e795fc atmel-samd/samd21: Use XOSC32K on boards with a crystal
Use XOSC32K on boards that have BOARD_HAS_CRYSTAL defined and set to 1.
2018-05-05 18:45:15 +02:00
Noralf Trønnes 4adba51569 atmel-samd/samd21: Rework clock setup
Make clock setup explicit instead of using the convoluted asf4 macro setup.

enable_clock_generator():
- Add GCLK_GENCTRL_OE to stick with the current setup.
- Handle divisor larger than 31 for generator 2
- Change the source argument so it can take the GCLK_GENCTRL_SRC_XXXX_Val
  macros without casting to uint8_t.

This patch should not introduce any functional changes except keeping
GCLK_GENCTRL_OE enabled when the I2S clock is enabled.
2018-05-05 18:01:13 +02:00
Scott Shawcroft d32349cee8
Merge pull request #804 from dhalbert/boot_out_fixes
3.0: Handle bad power on reset.
2018-05-04 10:06:35 -07:00
Dan Halbert 32363b801b 3.0: add CircuitPlayground and HID to CPX frozen modules 2018-05-04 08:44:33 -04:00
Noralf Trønnes f21c2494cb atmel-samd/samd21: Enable OSC32K
Enable OSC32K which is used by the RTC.
For some reason the RTC worked without enabling it.
2018-05-04 13:34:30 +02:00
Noralf Trønnes 4a2a553647 atmel-samd/clocks: Split out samd21_clocks.c and samd51_clocks.c
Enhance readability by separating the samd21 and samd51 clock code.

This patch should not introduce any functional changes.
2018-05-04 13:32:56 +02:00
Dan Halbert f486ead84a Handle bad power on reset. 2018-05-03 23:43:02 -04:00
Scott Shawcroft a8bd37f14d
Merge pull request #799 from larsks/feature/circuitpython/station-ssid
esp8266/modnetwork: Allow to get ESSID of AP that STA is connected to.
2018-05-03 10:12:50 -07:00
Lars Kellogg-Stedman 1e0353e2db esp8266/modnetwork: Allow to get ESSID of AP that STA is connected to.
This patch enables iface.config('essid') to work for both AP and STA
interfaces.

(cherry picked from commit d8fdb77ac9)
2018-05-03 11:49:37 -04:00
Lars Kellogg-Stedman ad1b16a3ec ports/esp8266: try both binascii and ubinascii in inisetup.py
in recent circuitpython builds, `ubinascii` is available as
`binascii`.  This modifies `modules/inisetup.py` to use the same
import semantics as `modules/websocket_helper.py`: first try importing
`ubinascii`, and if that fails, fall back to importing `binascii`.

Closes adafruit/circuitpython#795
2018-05-03 09:23:54 -04: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
Scott Shawcroft 449385b250
Merge pull request #790 from dhalbert/cpu_temp
Implement microcontroller.cpu.temperature.
2018-05-02 12:23:03 -07:00
Dan Halbert 33b9c39f58 peripherals.c should include peripherals.h 2018-05-02 13:50:34 -04:00
Lars Kellogg-Stedman 3e35cbcd5b allow esptool.py invocation to be set via make vars
This commit replaces the literal calls to `esptool.py` with the
`$(ESPTOOL)` Makefile variable. This allows one to set the esptool
invocation on the Make command line:

    make ESPTOOL="python2 $(which esptool.py)"

(or via the environment, an include file, etc)

Closes #793
2018-05-02 09:47:01 -04:00
Dan Halbert e565282da9 fix minor comment typos 2018-05-01 22:04:11 -04: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
Scott Shawcroft dd0f8689a1
Merge pull request #786 from notro/rtc_set_datetime_precision
atmel-samd: RTC: Improve precision when setting datetime
2018-04-29 20:30:37 -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
sommersoft 396e4ffc34 implemented 'claim_pin' methodology; updated 'open_drain' handling 2018-04-28 17:27:23 +00:00
sommersoft 4e1f7d43eb added exception for PULL_UP; corrected open_drain handling 2018-04-27 02:51:07 +00:00
sommersoft 441ce2a78f reset GPIO16 to input on deinit 2018-04-26 01:35:58 +00:00
sommersoft bd5a5daaae updated GPIO16 construct and handling 2018-04-25 03:59:36 +00:00
sommersoft e70ece4c41 now checks for proper pin in is_pin_free; initialize GPIO16 as input in reset_pins 2018-04-25 03:57:09 +00:00
Dan Halbert 48f595ee13 convert wrapper class to just a module 2018-04-24 13:28:26 -04:00
Dan Halbert 9daa1a68d8 HID gamepad support 2018-04-23 23:51:23 -04:00
Kevin Townsend d0e00d7fbe
Added built to example 2018-04-23 20:01:53 +02:00
Kevin Townsend 0de8697315
Added note on USB CDC bootloader 2018-04-23 19:58:29 +02:00
hathach ce9f05f91b add missing files 2018-04-24 00:51:44 +07:00
hathach 50e7a4caa8 add bootloader hex 2018-04-24 00:19:04 +07:00
Scott Shawcroft 58ba74194e
Merge pull request #765 from jerryneedell/jerryn_tick
modify tick_delay to handle SysTick->VAL rollover
2018-04-20 15:40:00 -04:00
Jerry Needell bef05ffbf1 cleanup in tick.c 2018-04-20 15:23:03 -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 16bb40b110 modify tic.c to chec if interrupts are enabled, rename us_between_ticks to us until_next_tick 2018-04-19 22:25:48 -04:00
Jerry Needell 3399d541c3 Merge remote-tracking branch 'origin/master' into jerryn_tick 2018-04-19 20:54:47 -04:00
Scott Shawcroft 898a7d92e3 atmel-samd: Fix M4 RTC and ItsyBitsy M4 definition 2018-04-19 14:42:03 -04:00
sommersoft a0eb51cc97 updated asf4_config: reverted oscillators to use internal vs external for RTC 2018-04-18 03:35:58 +00: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 7f7cbe8efa
Merge pull request #760 from ladyada/master
don't use python nrfutil on windows, go with exe we have in repo
2018-04-16 15:27:44 -07: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
Dan Halbert 10eabf6bc2
Merge pull request #756 from tannewt/audio3
Add audio output support!
2018-04-13 14:59:10 -04:00
ladyada 926849d7a8 don't use python nrfutil on windows, it doesnt work :/ tested feather52 makefile on windows/mingw 2018-04-13 14:00:20 -04:00
Scott Shawcroft 22194d5977 Tweaks based on dhalbert's feedback. 2018-04-13 10:51:01 -07:00
ladyada ce6b94f5e2 deal with spaces in directories 2018-04-12 21:43:23 -04:00
Scott Shawcroft 8dcfeb6240 Fix Makefile 2018-04-12 18:17:46 -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
Scott Shawcroft 2a26dac2bc Add initial ItsyBitsy M4 support 2018-04-12 11:16:52 -07:00
Dan Halbert eaa9923a8f force_create rename got lost due to editing error 2018-04-10 12:24:27 -04:00
Dan Halbert 04b2c8be5a remove unnecessary includes in esp8266 common-hal storage code 2018-04-10 12:13:21 -04:00
Dan Halbert 5f98953ed8 esp8266 and nrf: raise NotImplementedError 2018-04-10 12:08:41 -04:00
Jeff Epler 1e9a27177c esp8266: Disable "strict aliasing" in compiler like in atmel-samd
This caused a fatal compiler diagnostic after #750.  This compiler
flag is already specified in the atmel-samd builds, so it makes
sense to do it here for the same reasons.
2018-04-09 22:23:39 -04:00
Jeff Epler eb7d0e317a Create genhdr/ directory in time 2018-04-09 22:23:39 -04:00
Dan Halbert aa8c262d14 add storage.erase_filesystem() to erase and reformat CIRCUITPY 2018-04-09 12:52:42 -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 1e87a785b9 Move CDC Comm back to Interface 0 for compat with Win7 drivers. 2018-04-08 15:59:19 -04: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
Scott Shawcroft 9672f3891e
Merge pull request #742 from jepler/esp8266-sdk-fixes
Adapt to incompatible changes in the ESP8266 SDK
2018-04-07 10:01:33 -07:00
Jeff Epler d69ef6bfd3 esp8266/etshal: delete incorrect function prototypes
these are function prototypes not used in circuitpython.  The
declarations began to conflict with ones in the upstream SDK
at some point, so delete them.
2018-04-06 20:37:48 -05:00
Paul Sokolovsky 4982a3ad32 esp8266/esp8266_common.ld: Put .text of more libs into .irom0.text .
Recent vendor SDKs ship libs with code in .text section, which previously
was going into .irom0.text. Adjust the linker script to route these
sections back to iROM (follows upstream change).
2018-04-06 20:37:41 -05: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
Jeff Epler 5eb9f9d060 atmel-samd: Fix rebooting to bootloader
Commit efbf08266b moved _estack in order to ensure 8-byte alignment
of the stack, but the address of _bootloader_dbl_tap must remain
right at the end of SRAM.

I verified by reading the source that the 4-byte-aligned address is
used for all samd21 / samd51 boards in
adafruit/circuitpython@efbf08266b.  However, I only tested on
trinket_m0.

Closes: #739
2018-04-03 21:40:10 -05:00
Dan Halbert beb6ad2e40 Add USB HID support, including Consumer Control 2018-04-02 21:37:44 -04:00
Dan Halbert 435e894fa0 Merge branch 'master' into 3.0_hid 2018-04-02 19:19:43 -04:00
Dan Halbert d005b12326 WIP: seems to be done 2018-04-02 19:08:18 -04:00
Jeff Epler c592b0e0f8 ports/windows: Remove appveyor.yml
.. this allows developers who want to work with both micropython and
circuitpython to enable appveyor on their fork, but not get errors
when pushing circuitpython changes.

In the appveyor configuration for your fork, simply enable the
checkbox "Skip branches without appveyor.yml".
2018-04-02 07:59:12 -05:00
Scott Shawcroft d65ea992bf
Merge pull request #729 from jepler/tests-parallel-circuitpython
Optionally parallelize the testsuite
2018-03-31 09:55:21 -07:00
Jeff Epler f8e0baa0b7 appveyor: parallelize tests 2018-03-31 10:43:57 -05:00
Jeff Epler b59964f707 ports/unix/Makefile: parallelize tests 2018-03-31 10:42:33 -05:00
Dan Halbert c00b25ec45 WIP: HID works with MSC interfaces removed 2018-03-30 23:31:28 -04:00
Dan Halbert df91878d2e WIP: works with just keyboard but not complex report descriptor 2018-03-30 23:24:00 -04:00
sommersoft 8af98d0dc9 ambiguized directory paths 2018-03-30 22:44:16 +00:00
sommersoft a5b60647be improved arrangement 2018-03-30 22:26:21 +00:00
sommersoft 7c0be04696 verbiage cleanup 2018-03-30 22:21:35 +00:00
sommersoft c70acab8b3 updated README; added git submodule info 2018-03-30 22:16:36 +00:00
sommersoft 6ee573c7c9
Merge branch 'master' into super_status 2018-03-30 14:27:39 -05:00
Scott Shawcroft 676ed4e199
Merge pull request #724 from tannewt/fix_freetouch_submodule
Remove freetouch files that were accidentally checked in and
2018-03-28 14:24:32 -07:00
Scott Shawcroft 7b2215a27c
Merge pull request #723 from jepler/high-quality-float-hash
Enable high-quality float hash
2018-03-28 14:16:32 -07:00
Scott Shawcroft 19b0b414e6 Remove freetouch files that were accidentally checked in and
readd the submodule.
2018-03-28 14:04:53 -07:00
Jeff Epler abec199c19 Enable high-quality float hash
This appears to have a relatively small impact on flash usage but
fixes some pathological slow behavior putting floats in dicts or sets.

Closes: #704
2018-03-27 21:56:30 -05:00
Jeff Epler fe7f405fc7 Add VfsFat.label property
These allow accessing the filesystem label.  For instance,
in boot.py, you can set the label on the built-in storage with:
   storage.remount('/', False)
   storage.getmount('/').label = "NEWLABEL"
   storage.remount('/', True)

Users with multiple CIRCUITPY boards may find it desirable to
choose a different label for each board they own.
2018-03-27 21:28:18 -05:00
Dan Halbert 4c2f729a7a
Merge pull request #713 from jepler/lto-type-diagnostic-bis
Allow building on gcc 5.4, while preserving ability to build with 7.2
2018-03-27 09:28:41 -04:00
Kattni 77938db8c8
Merge pull request #719 from tannewt/fix_i2c_hang
Fix I2C init hang when the SCL pin is pulled low.
2018-03-26 20:08:14 -04:00
Dan Halbert 4190aa2eed
Merge pull request #715 from jepler/array-operation-restrictions-bis
Remove 'O', 'P' support in arrays
2018-03-26 20:01:34 -04: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
Jeff Epler 355bf8b553 Conditionally compile out nonstandard array/struct typecodes
.. defaulting to off for circuitpython-supported boards, on for others.

.. fixing up the tests that fail when it is turned off, so that they skip
instead of failing
2018-03-26 18:13:49 -05: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
Scott Shawcroft ea39f4378e
Merge pull request #698 from sommersoft/repl_fix
Fix 128 Character Max Paste Into REPL
2018-03-26 13:02:43 -07:00
sommersoft 9bd55cf4c7
minor cleanup 2018-03-26 08:14:37 -05:00
sommersoft 23009fdd63 future-proof for buffer size changes 2018-03-26 06:25:04 +00:00
Dan Halbert 8b6aeb9e19
Merge pull request #702 from jepler/issue689bis
correct typo in filename
2018-03-25 23:58:00 -04:00
Jeff Epler d57397f9c8 Remove an unneeded -Wno-error=lto-type-mismtach 2018-03-25 22:04:15 -05: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 d80e54458d correct typo in filename 2018-03-24 10:44:24 -05:00
sommersoft 6205ed9a0c updated cdc_enabled; now more dynamic status return 2018-03-24 03:42:58 +00:00
sommersoft ef16109c5d updated with requested changes 2018-03-24 00:55:48 +00:00
sommersoft f237657e5e extended buffer check to usb_cdc_background 2018-03-23 18:41:27 +00:00
Scott Shawcroft 63d826a52a
Update USB PID 2018-03-23 09:34:02 -07:00
sommersoft ccbe557e30 removed leftover debugging bits 2018-03-23 15:45:30 +00:00
sommersoft d434635822 add buffer check before triggering new usb read 2018-03-23 15:07:02 +00:00
Scott Shawcroft fd7dcff4e9 Add Feather M4 Express support.
* Also fixed detection of SPI flash chip to correct look in the 2+
spots.
* Added support for using QSPI in dual read mode.
2018-03-23 00:00:13 -07:00
Scott Shawcroft 06b4c83f59 Add reminder to remove Saleae when going fast. 2018-03-22 17:44:44 -07:00
Scott Shawcroft 3bf4d69f67 Update Metro M4 to rev F and make flash reset on start. 2018-03-22 16:42:47 -07:00
Jeff Epler a7e3c74fed Autocreate files that prevent MacOS indexing of the CIRCUITPYTHON dive
.. the price of this appears to be about 112 bytes of flash and 12
bytes of RAM, according to the stats printed during the build.

It also uses up 4 directory entries (out of 128), but does not reduce
the number of blocks usable for storing file contents.

These are the same items noted in the Adafruit README for Trinket M0
as preventing MacOS indexing.

Closes: #689
2018-03-22 08:07:32 -05:00
Scott Shawcroft 9ab39eb2d2
Merge pull request #688 from jepler/atsamd-build-reqs
Better document build requirements and steps
2018-03-20 10:03:01 -07:00
Scott Shawcroft 0f90f35606
Merge pull request #685 from jepler/uart-diagnostic
UART: Fix maybe-uninitialized diagnostic
2018-03-20 09:59:31 -07:00