Commit Graph

2452 Commits

Author SHA1 Message Date
Hierophect 12737e2821 remove F401 additions to streamline 2019-12-02 12:28:48 -05: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
Scott Shawcroft 3fc58cee38
Merge remote-tracking branch 'adafruit/master' into support_extended_advertising 2019-11-26 13:12:43 -08: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
Scott Shawcroft e5dd78d393
Merge pull request #2324 from jepler/nrf-i2s-channels-widths
nrf: assign channel width and count correctly
2019-11-25 16:59:08 -08:00
Scott Shawcroft 2653455ded
Merge pull request #2321 from jepler/nrf-i2s-buglets
Nrf i2s buglets
2019-11-25 16:11:43 -08:00
Thomas Sarlandie 11dc572bce feature: our own PID - thanks @ladyada 2019-11-25 21:56:42 +01:00
Jeff Epler 1ee35fd6fd nrf: i2sout: move register settings closer together
.. just for consistency's sake
2019-11-25 11:43:51 -06:00
Jeff Epler 47a6eaa297 nrf: i2sout: Assign SWIDTH
The sample width register was never set, so all samples were played
as though they were 16 bit.

After this change, 8-bit samples no longer produce audio on the MAX 98357A
BOB, because only 16-, 24-, and 32-bit samples are supported by the
hardware.  This will be addressed by a future change to pad samples to
16 bits; see #2323 and the 98357A datasheet page 6.
2019-11-25 11:43:29 -06:00
Jeff Epler 8f4bab2d24 i2sout: Correctly retrieve channel_count
The meaning of the "single channel" parameter is not well-documented,
but in fact it seems that "true" must be passed or else the returned
channel_count is always 1.  This caused stereo samples to be played
incorrectly.
2019-11-25 10:59:59 -06:00
Thomas Sarlandie fc71ed9789 add shirtty board - hackaday supercon 2019 addon 2019-11-25 17:44:41 +01:00
Dan Halbert d154d11911
Merge pull request #2320 from jepler/nrf-unsigned-audio-crash
nrf: i2sout: Fix double-increment when copying samples
2019-11-25 11:42:16 -05:00
Jeff Epler c9946dfd63 nrf: i2sout: Use <, not !=, for loop condition
This is good C style, h/t @danh
2019-11-25 09:35:57 -06:00
Jeff Epler 19d122e546 nrf: i2sout: Fix double-increment when copying samples
This caused two problems when playing unsigned samples:
 * When an even number of samples were present, it "worked" but only
   every other sample was copied into the output, changing the waveform
 * When an odd number of samples were present, the copy continued beyond
   the end of the buffers and caused a hard fault
2019-11-25 09:07:20 -06: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 bfdfe0e681 stm32: fix uses of ticks_ms global 2019-11-22 14:30:08 -06:00
Jeff Epler 77b78d7fb9 Merge remote-tracking branch 'origin/master' into tick-refactor 2019-11-22 14:28:51 -06:00
Jeff Epler 1c6c9a3e1f nrf: i2sout: Ensure hardware I2S is stopped at deinit
.. otherwise, it may be possible under some scenario, for the background
task to continue and overwrite unrelated memory.
2019-11-22 14:15:07 -06:00
Dan Halbert e18d3e0f76 Merge branch 'master' into m4-network-ps2io 2019-11-22 15:02:52 -05:00
Jeff Epler aabb56c840 nrf: i2sout: Only update hold_value when appropriate
If we put no samples into the buffer, then there is no last
sample to fill out hold_value with.  (and, in fact, the expression such
as *(uint32_t*)(buffer-4) is outside an allocated region)

Detect this condition, and leave the prior value in place.

This improves clicks heard when pausing and resuming a waveform.
2019-11-22 13:54:37 -06: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
Hierophect 352bd95f5a remove blackpill 2019-11-22 11:19:39 -05:00
Dan Halbert 228a619af5 enable network, wiznet5k, and ps2io by default on M4 2019-11-22 10:59:27 -05:00
Hierophect 0d8eb3cfb4 add correct VID/PID pairs 2019-11-22 10:54:35 -05:00
Hierophect 6a7c8d6341 minor fix 2019-11-21 20:56:05 -05:00
Scott Shawcroft 743bc829ab
Clean up debug changes 2019-11-21 16:39:57 -08:00
Scott Shawcroft e63796c7bc
Special exception message for when pairing prompt is ignored. 2019-11-21 16:32:42 -08:00
Scott Shawcroft 39f4046f70
Fix pairing when peripheral. Central untested. 2019-11-21 16:32:42 -08:00
Hierophect b5ff9684bb remove misplaced status LED definitions 2019-11-21 17:09:28 -05:00
Hierophect 4e4ecafd97 Add definitions for PYB Nano and blackpill 2019-11-21 16:53:06 -05:00
Dan Halbert 2adecda5eb
Merge pull request #2311 from tannewt/redo_bleio_errors
Use BluetoothError in _bleio
2019-11-21 16:44:26 -05:00
Dan Halbert e06dc72359
Merge pull request #2307 from hierophect/stm32-spi-cleanup
STM32: SPI clock rate fix and cleanup
2019-11-21 16:12:06 -05:00
Hierophect a96317d566 requested style changes 2019-11-21 14:30:07 -05:00
Hierophect 13d786b2ef added pin defs 2019-11-21 14:27:59 -05:00
Scott Shawcroft 5e857fdb67
Use BluetoothError in _bleio
This better differentiates errors than using OSError everywhere.
2019-11-20 14:02:15 -08:00
Hierophect 006182f4e8 Remove meowbit for now 2019-11-20 15:56:00 -05:00
Hierophect cf4a3237e7 Merge remote-tracking branch 'upstream/master' into stm32-meowbit-etc 2019-11-20 15:31:55 -05:00
Hierophect 9764006f81 add F401 pin definition 2019-11-20 15:30:31 -05:00
Hierophect 3d1b6d9fc8 fix typo 2019-11-20 12:07:12 -05:00
Hierophect bd9893ab98 clean up SPI module readability 2019-11-20 12:00:45 -05:00
Hierophect 0b558e8714 fix error in SPI busclock selection 2019-11-20 11:34:49 -05:00
wallarug fce7b89087 removed Robo HAT MM1 M0 board. 2019-11-20 21:34:24 +11:00
Scott Shawcroft 11c2c3443f
Add support for extended (>31 byte) BLE advertisements. 2019-11-19 13:55:58 -08:00
Dan Halbert 1a22d8a0f2
Merge pull request #2291 from hierophect/stm32-neopixel
STM32: Neopixel support
2019-11-18 23:45:09 -05:00
Hierophect 4a25c2344e implement os urandom 2019-11-18 18:27:25 -05:00
Hierophect 256abf5505 Add board folders 2019-11-18 16:13:27 -05:00
Hierophect a4797327cd add microcontroller toggles for status LED 2019-11-18 13:51:59 -05: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 51078cc38f timing tweaks with testing 2019-11-15 17:17:05 -05:00
Hierophect 98fd372d5b Add missing define 2019-11-15 13:19:37 -05:00
Hierophect ee1559b921 Merge branch 'pin-commonhal-additions' into stm32-neopixel 2019-11-15 13:09:59 -05:00
Hierophect 81223c76bd revert error 2019-11-15 13:04:25 -05:00
Hierophect 5f290d091e Merge branch 'pin-commonhal-additions' into stm32-neopixel 2019-11-15 13:00:11 -05:00
Hierophect 2c6781f74d move neopixel_in_use flag to shared-bindings 2019-11-15 12:59:52 -05:00
Hierophect e1579a1cc5 Merge branch 'pin-commonhal-additions' into stm32-neopixel 2019-11-15 12:47:23 -05:00
Hierophect de5691acf5 Add never_reset and reset to pin common hal, adjust files 2019-11-15 12:47:00 -05:00
Hierophect 6cce2d6d14 Implement Neopixel write, add defaults to f405 2019-11-15 12:28:16 -05:00
Hierophect 6e96b1945e Raise clock speed, adjust divisors 2019-11-13 13:18:43 -05:00
Dan Halbert 166518fc9b
Merge pull request #2272 from hierophect/stm32-microcontroller-fillout
STM32: add us delay
2019-11-12 18:03:55 -05:00
Hierophect e40bd07fcf fix conflicting definitions on discovery boards 2019-11-12 13:03:13 -05:00
Hierophect bbc366b85b Style overhaul, extra error checks 2019-11-12 11:26:14 -05:00
Hierophect ed3e377390 Merge remote-tracking branch 'upstream/master' into stm32-uart 2019-11-12 09:49:17 -05:00
Hierophect 14b70806a5 de-init check 2019-11-11 15:47:47 -05:00
Hierophect e076f14ea3 text fixes 2019-11-11 15:32:47 -05:00
Hierophect c38086fc4a fix typo 2019-11-11 15:04:22 -05:00
Hierophect 3f8b4727f5 Revise us delay to include interrupt/non-interrupt versions 2019-11-11 14:58:45 -05:00
Dan Halbert 91156670e9
Merge pull request #2271 from theacodes/enable-micropython-native
Allow boards to enable the `micropython.native` decorator
2019-11-08 13:42:17 -05:00
Hierophect d42c4b082d revert sublime being a dumb 2019-11-06 14:55:16 -05:00
Hierophect 39dbcb529a revert git being a dumb 2019-11-06 14:54:07 -05:00
Hierophect adfef8b520 Merge remote-tracking branch 'upstream/master' into stm32-dac-deinit 2019-11-06 14:46:56 -05:00
Dan Halbert b8373aca0c
Merge pull request #2266 from hierophect/stm32-defaults
STM32: Add board defaults
2019-11-06 14:29:29 -05: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
Hierophect e66fcb5e1f add missing newline 2019-11-05 16:32:34 -05:00
Hierophect 8a098c154d Fix unsaved file 2019-11-05 16:25:30 -05:00
Hierophect 1a7060af25 Add us delay 2019-11-05 16:23:59 -05:00
Hierophect 0b85c4bb20 Merge remote-tracking branch 'upstream/master' into stm32-uart 2019-11-05 10:56:57 -05:00
Hierophect dfe73a063d Fix error that would carry past python exception 2019-11-05 10:50:57 -05:00
Thea Flowers 73989dbcaf Add board configuration for Winterbloom Sol 2019-11-04 23:11:42 -08:00
Dan Halbert 8cd2f87e99
Merge pull request #2236 from tannewt/bleio_tweaks
Refine _bleio
2019-11-04 22:27:54 -05:00
Dan Halbert c87d6cc6a5
Merge pull request #2248 from hierophect/stm32-PWM
STM32: PWMOut
2019-11-04 22:08:01 -05:00
Dan Halbert f185b30d71
Update PWMOut.h 2019-11-04 20:41:54 -05:00
Hierophect 38e38b9f8d remove redundant comment 2019-11-04 17:20:10 -05:00
Hierophect 632b3267dc Add auto-shutoff of DAC when channels de-inited 2019-11-04 17:08:00 -05:00