Commit Graph

998 Commits

Author SHA1 Message Date
Dan Halbert 68ae47907c merge from upstream 2019-12-10 21:04:46 -05:00
Dan Halbert 013c840862 working on all ports 2019-12-10 20:27:30 -05:00
Jeff Epler a08d9e6d8e audiocore: Add MP3File using Adafruit_MP3 library 2019-12-10 14:03:06 -06:00
Jeff Epler 1905d0746d samd: neopixel: Fix neopixels after #2297
This adapts the "inline assembler" code from the UF2 bootloader, which
in turn is said to be adapted from the arduino neopixel library.

This requires the cache remain ON when using M0, and be turned OFF on M4
(determined by trial and error)

Testing performed on a Metro M4:
 * measured timings using o'scope and found all values within
   datasheet tolerance.
 * Drove a string of 96 neopixels without visible glitches
 * on-board neopixel worked

Testing performed on a Circuit Playground Express (M0):
 * Color wheel code works on built-in neopixels
 * Color wheel code works on 96 neopixel strip

As a bonus, this may have freed up a bit of flash on M0 targets. (2988 ->
3068 bytes free on Trinket M0)

Closes: #2297
2019-12-07 19:19:45 -06:00
Dan Halbert d628d2a261 atmel-samd working 2019-12-06 15:18:20 -05:00
Dan Halbert 40434d6919 wip 2019-12-05 22:45:53 -05:00
Scott Shawcroft fce81e6868
Merge pull request #2297 from jepler/tick-refactor
Call background tasks only once per ms
2019-12-02 16:45:51 -08:00
Jeff Epler 002f5c0f1c samd: trinket_m0: make board fit again 2019-12-02 08:25:48 -06:00
Jeff Epler 899202aca7
Merge branch 'master' into gcc9 2019-12-02 07:27:03 -06:00
Jeff Epler 95d9c49e43 Merge remote-tracking branch 'origin/master' into tick-refactor 2019-11-29 11:27:09 -06:00
Jeff Epler d843156a5e samd: Consolidate small build optimization flags
.. inline-unit-growth was the same across all boards, and the highest
max-inline-insns-auto parameter was shared across 2 of 5 boards, so it's
worth a little work to follow the DRY principle
2019-11-29 10:51:16 -06:00
Dan Halbert dd6dfeb30a Squeeze pyruler zh_Latn_pinyin 2019-11-27 14:47:35 -05:00
Dan Halbert b32a9192df make UART.write be blocking on SAMD; add timeout property 2019-11-27 13:05:29 -05:00
Dan Halbert e560b419f8
Merge pull request #2325 from sarfata/sarfata/add-shirtty-master
Add shIRtty board
2019-11-26 15:23:56 -05:00
Dan Halbert 97d90c6039
Merge pull request #2329 from theacodes/set-winterbloom-sol-usb-name
Set USB_INTERFACE_NAME for winterbloom_sol
2019-11-26 15:17:14 -05:00
Thea Flowers e77046d49b
Set USB_INTERFACE_NAME for winterbloom_sol 2019-11-26 10:59:12 -08:00
Thomas Sarlandie 2647ea0754 fix: disable touchio to save some space 2019-11-26 19:26:18 +01:00
Scott Shawcroft 58ad38a88e
Remove DotStar from pIRkey M0 for now to free up space
Once we use PixelBuf, the library will be much smaller.
2019-11-26 09:31:44 -08:00
Jeff Epler 82f55dc046 atmel-samd: reduce inlining on constrained boards again
pewpew10, pirkey_m0, and uchip all fit now.  However, pirkey_m0
now has just 76 bytes flash available.
2019-11-26 08:50:55 -06:00
Jeff Epler 3ed6de7baf atmel-samd: reduce inlining on pyruler again
By tweaking the optimizer flags further, this build also fits
2019-11-26 08:50:55 -06:00
Jeff Epler 2e4a6b94e7 atmel-samd: get most constrained m0 builds to work again
By tweaking the optimizer flags, we can get back a few hundred bytes
and allow these builds to work with the gcc9 compiler.
2019-11-26 08:50:45 -06:00
Thomas Sarlandie 11dc572bce feature: our own PID - thanks @ladyada 2019-11-25 21:56:42 +01:00
Thomas Sarlandie fc71ed9789 add shirtty board - hackaday supercon 2019 addon 2019-11-25 17:44:41 +01:00
Dan Halbert 1ccb7b4c5e cosmetic commit, mostly to re-run 2019-11-22 16:30:10 -05:00
Dan Halbert 13375d16f1 change mpconfigport.mk files so they can be overriden by mpconfigboard.mk 2019-11-22 15:44:51 -05:00
Jeff Epler 77b78d7fb9 Merge remote-tracking branch 'origin/master' into tick-refactor 2019-11-22 14:28:51 -06:00
Dan Halbert e18d3e0f76 Merge branch 'master' into m4-network-ps2io 2019-11-22 15:02:52 -05:00
Dan Halbert 1a62a9cb17 remove network from kicksat_sprite 2019-11-22 14:02:44 -05:00
Dan Halbert 2e9aa38700 turn off network in pewpew_m4 2019-11-22 13:49:33 -05:00
Dan Halbert 1d411d2874 Merge remote-tracking branch 'adafruit/master' into testing-fixes 2019-11-22 11:55:34 -05:00
Dan Halbert 228a619af5 enable network, wiznet5k, and ps2io by default on M4 2019-11-22 10:59:27 -05:00
wallarug fce7b89087 removed Robo HAT MM1 M0 board. 2019-11-20 21:34:24 +11:00
ndgarage b3d7467719 add-ndbit6 2019-11-19 14:52:09 -07:00
Jeff Epler 40a47d41df samd: background: Allow monitoring time taken in background task
If you define MONITOR_BACKGROUND_TASK, then a physical output pin
(Metro M4 Express's "SCL" pin by default) will be set HIGH while in
the background task and LOW at other times
2019-11-18 11:01:24 -06:00
Jeff Epler 7f744a2369 Supervisor: move most of systick to the supervisor
This code is shared by most parts, except where not all the #ifdefs
inside the tick function were present in all ports.  This mostly would
have broken gamepad tick support on non-samd ports.

The "ms32" and "ms64" variants of the tick functions are introduced
because there is no 64-bit atomic read.  Disabling interrupts avoids
a low probability bug where milliseconds could be off by ~49.5 days
once every ~49.5 days (2^32 ms).

Avoiding disabling interrupts when only the low 32 bits are needed is a minor
optimization.

Testing performed: on metro m4 express, USB still works and
time.monotonic_ns() still counts up
2019-11-18 11:01:23 -06:00
Cedar Grove Maker Studios e7df288a34
add USB interface description
... to "StringCarM0Ex"
2019-11-16 16:40:40 -08:00
Hierophect 81223c76bd revert error 2019-11-15 13:04:25 -05:00
Hierophect 2c6781f74d move neopixel_in_use flag to shared-bindings 2019-11-15 12:59:52 -05:00
Hierophect de5691acf5 Add never_reset and reset to pin common hal, adjust files 2019-11-15 12:47:00 -05:00
KalbeAbbas 8134ceec83
Update pins.c 2019-11-14 23:16:55 +05:00
KalbeAbbas 799770926b
Update pins.c 2019-11-14 18:51:01 +05:00
KalbeAbbas 949f87fd25
Update pins.c 2019-11-14 18:50:26 +05:00
KalbeAbbas 3db7f2798f updated 2019-11-14 16:34:08 +05:00
☒ Bjarke Gotfredsen d745c1023e
Support for XinaBox CC03 and CS11
CC03 is a ATSAMD21G18 Cortex-M0+ breakout in xChips format. CS11 is the same, but with a SD Card Interface. 
https://xinabox.cc/products/cc03
https://xinabox.cc/products/cs11
2019-11-12 12:48:31 +02:00
Thea Flowers c7195c4bc5
Allow boards to enable the `micropython.native` decorator
Adds the `CIRCUITPY_ENABLE_MPY_NATIVE` for `mpconfigboard.mk` that enables
the `micropython.native` decorator.
2019-11-05 14:27:53 -08:00
Thea Flowers 73989dbcaf Add board configuration for Winterbloom Sol 2019-11-04 23:11:42 -08:00
Scott Shawcroft cd3fcc87ab
Merge pull request #2252 from dhalbert/cpb-two-i2c
nrf: allocate two I2C on CPB
2019-11-03 13:15:36 -08:00
Dan Halbert 85a648224f Check for no pullups on I2C on nrf; give arduino nano 33 ble two I2C devices 2019-11-02 22:47:03 -04:00
brentru 2f04c5891f flip it around 2019-10-31 14:11:50 -04:00
brentru ab3da3071c flip MADCTL BGR bit to reflect RGB colors 2019-10-31 10:11:47 -04:00
ladyada d2b613134d we should use native rotation, and tweak madctl (not done yet) 2019-10-29 22:53:44 -04:00
ladyada 1e869d1334 switch to 8-bit mode - tested on hardware! 2019-10-29 21:14:45 -04:00
Dan Halbert 1505da784f wip 2019-10-28 18:15:02 -04:00
Dan Halbert 56ac41fabf
Merge pull request #2240 from theacodes/fix-2086
Track unadjusted PWM duty cycle to avoid accumulating conversion errors
2019-10-28 14:50:01 -04:00
Thea Flowers 4b742f88d9
Fix spelling 2019-10-25 10:50:27 -07:00
Thea Flowers 4fdf518251
Track unadjusted PWM duty cycle to avoid accumulating conversion errors
Fixes #2086

When the frequency of a `PWMOut` is change it re-sets the PWM's duty cycle as
well, since the registers have to be re-calculated based on the new frequency.
Unfortunately, `common_hal_pulseio_pwmout_get_duty_cycle`
will return a value very close to, but not exactly, the value passed to `common_hal_pulseio_pwmout_set_duty_cycle`. If the frequency is modified
without the calling code also re-setting the duty cycle then the duty cycle
will decay over time. This fixes that problem by tracking the unadjusted duty
cycle and re-setting the duty cycle to that value when the frequency is changed.
2019-10-23 14:34:14 -07:00
ProductDev 4cd5571203 Adds builds for sparkfun_qwiic_micro with and without flash 2019-10-23 15:05:46 -06:00
Dan Halbert 7b79ac3739 Parameterize linker script 2019-10-20 23:50:12 -04:00
Kamil Tomaszewski 96756b3945 Add functions to get top and limit stack 2019-10-18 11:04:45 +02:00
wallarug 8f2e5990db
Changed to follow standard that Pad 0 is always TX 2019-10-17 18:02:05 +11:00
Scott Shawcroft 63790f01f8
Merge pull request #2218 from CedarGroveStudios/master
Definitions for StringCar M0 Express and AT25SF161-SSHD-T 2MiB SPI flash chip
2019-10-15 09:46:39 -07:00
Cedar Grove Maker Studios bd608e0807
remove placeholder 2019-10-14 11:56:53 -07:00
Cedar Grove Maker Studios b04a218bbc
initial load of stringcar m0 express defs 2019-10-14 11:56:18 -07:00
Cedar Grove Maker Studios 44ebc4c95d
establish stringcar m0 express definitions 2019-10-14 11:55:22 -07:00
Dan Halbert c1ab2486f9 return chip vcc value 2019-10-12 15:42:15 -04:00
Chris Osterwood 137a4f8a5d Added new flash SKU for production hardware 2019-10-07 14:50:39 -04:00
Kamil Tomaszewski 7aefcc449a Add an alternative way to number the USB endpoints
Two options available:
- relative numbering (USB_RELATIVE_EP_NUM = 1) - default
- absolute numbering (USB_RELATIVE_EP_NUM = 0) - new!
2019-10-07 12:31:42 +02:00
Scott Shawcroft cdc116291b
Merge pull request #2177 from wallarug/walla/robohatmm1-production
Robo HAT MM1 - Fixes after testing
2019-09-26 10:44:55 -07:00
arturo182 21f8c3e40a serpente: Update PID and enable as many modules as we can fit 2019-09-26 17:22:18 +02:00
wallarug 3c99a23adb fix spi 2019-09-26 21:47:36 +10:00
wallarug 533a5bc7a3 fixed SPI on M4 2019-09-26 21:43:52 +10:00
wallarug 5cd10b3ba0 updated robohatmm1_m0 2019-09-26 20:02:09 +10:00
wallarug 39265fccf3 included a version number 2019-09-26 19:22:51 +10:00
wallarug db9495b04b updated board name 2019-09-26 19:21:53 +10:00
wallarug 08b0f80879 updated board name 2019-09-26 19:21:24 +10:00
wallarug b7e8a031d0 remove frozen busio library 2019-09-26 19:19:54 +10:00
wallarug ff13b6f682 updated pins.c 2019-09-26 19:18:50 +10:00
wallarug 70860e1352 robohatmm1 removed uart and put in correct order 2019-09-22 19:47:44 +10:00
Melissa LeBlanc-Williams 9a74bf929b Added TFT pins to HalloWing M4 for code compatibility 2019-09-19 14:50:10 -07:00
Melissa LeBlanc-Williams b7598f7058 Merge branch 'master' of https://github.com/adafruit/circuitpython 2019-09-19 14:20:28 -07:00
Scott Shawcroft 0fed65e7d2
Merge remote-tracking branch 'adafruit/master' into dac51 2019-09-19 12:21:54 -07:00
Melissa LeBlanc-Williams 341428b4da Added SPEAKER pin to HalloWing M4 for code compatibility 2019-09-19 11:23:37 -07:00
Melissa LeBlanc-Williams 8dfb2237d9 Added TOUCH pins to HalloWing M4 for code compatibility 2019-09-19 10:40:13 -07:00
Scott Shawcroft fc90c942f5
Add custom CPX build for display support 2019-09-17 10:40:07 -07:00
jepler dffedd7c86 samd: peripherals: update submodule reference 2019-09-16 21:48:31 -05:00
Scott Shawcroft aa9b57fc81
Merge pull request #2154 from arturo182/master
Add support for Serpente boards
2019-09-16 09:20:17 -07:00
arturo182 e1679acaec
Set as small build regardless of language 2019-09-16 11:51:46 +02:00
jepler 61698eb5d8 AnalogOut / AudioOut: Copy settings from Arduino
Make changes in asf4_conf even though I think in these cases the
"peripherals" submodule is running the show.

Arduino clocks the DAC at 12MHz but uses the CCTRL setting for
clocking < 1.2MHz (100kSPS).

A fresh clock (6) is allocated for the new 12MHz clock.  This matches
the Arduino value, though not the GCLK index.

Modify other settings to more closely resemble Arduino.

In AudioOut, actually clock the waveform data from the timer we set up
for this purpose.

This gives good waveforms when setting AnalogOut full-scale in a loop,
but the rise/fall of waveforms that come from AudioOut are still erratic.
Weirdly, if AudioOut limits its range even slightly (e.g., to 1000..64000)
then the erratic

Note that this will require https://github.com/adafruit/samd-peripherals/pull/26
to be accepted for the submodule update here to work.
2019-09-15 11:30:49 -05:00
Kattni Rembor c94310411b Update board def, enable touchio 2019-09-14 21:19:35 -04:00
arturo182 28bb901d1e Add support for Serpente boards 2019-09-14 16:06:28 +02:00
Dan Halbert b8200d7295 fix atmel-samd filesystem_tick'ing; clear_temp_status() should check for status indicator in use 2019-09-09 23:17:52 -04:00
Scott Shawcroft 8066810abb
Merge pull request #2091 from jepler/samd-dma-tracking
Samd dma tracking
2019-09-05 11:27:59 -07:00
Scott Shawcroft c5caacafdd
Merge pull request #2100 from pewpew-game/pewpew_m4
Add support for PewPew M4 board
2019-09-05 11:26:47 -07:00
Radomir Dopieralski d50ed3b6e7 Add support for PewPew M4 board 2019-09-05 10:50:33 +02:00
Dan Halbert f3af2a6fb7 Merge remote-tracking branch 'adafruit/master' into choose-usb-devices-xac 2019-09-04 21:56:13 -04:00
Dan Halbert 195de97c67 use only one endpoint pair for MSC except on SAMD21 2019-09-04 21:45:16 -04:00
Dan Halbert fca440fb66
Merge pull request #2113 from tannewt/displayio_hidden
Add .hidden to TileGrid and Group
2019-09-04 15:48:00 -04:00
Scott Shawcroft 7951646b9a
Disable bitbangio on uGame10 2019-09-04 11:49:47 -07:00
sommersoft c4d6f4f536 disable 'audiomixer' for all M0 boards 2019-09-01 17:39:20 -05:00
sommersoft 8120f5cdad Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-08-29 22:14:53 -05:00