Commit Graph

1888 Commits

Author SHA1 Message Date
Max Holliday
112739e247 minor tweaks 2021-10-09 14:50:55 -06:00
Max Holliday
d66d7d476c
Update ports/atmel-samd/mpconfigport.mk
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2021-10-09 12:33:05 -06:00
Max Holliday
8486502e65 reworked fake sleep. functional for pin and time 2021-10-09 11:44:10 -06:00
Dan Halbert
4c45364dca
Merge pull request #5442 from jpconstantineau/board-xiao-kb
Add new board variant: Seeed XIAO targeted for Keyboards/HID Devices
2021-10-08 18:19:58 -04:00
Pierre Constantineau
37d3adfe4f updated PID from Seeed provided VID/PID 2021-10-08 07:15:18 -06:00
microDev
a46aa48e23
Convert more modules to use MP_REGISTER_MODULE
Convert espidf, os, rp2pio, samd and time to use MP_REGISTER_MODULE.

Related to #5183.
2021-10-05 16:58:24 +05:30
Josh Gadeken
881724b529
[#4701] Correct DAC clock speed comments for SAMD21 and SAMD51 2021-10-04 22:18:26 -06:00
Max Holliday
6811c5e881 c formatting... 2021-10-04 15:44:46 -06:00
Max Holliday
0dd276ba79 c formatting 2021-10-04 15:04:55 -06:00
Max Holliday
2ff038f08b fixing c formatting 2021-10-04 14:55:44 -06:00
EmergReanimator
e636db713f Lose dependency to USB via CIRCUITPY_USB define for atmel port. 2021-10-04 10:57:39 +02:00
Max Holliday
6a8b4f5f07 fixed c formating 2021-10-03 23:13:58 -06:00
Max Holliday
5ceb72009e fixed c formating for pre-commit check 2021-10-03 22:42:04 -06:00
Max Holliday
b95325e3c7
Merge branch 'samd-sleep' into samd-sleep-v1 2021-10-03 17:16:27 -06:00
Lucian Copeland
f748d66128 Setup outline for SAMD alarm module 2021-10-03 14:57:44 -07:00
Max Holliday
7a703aaa64 adding comments 2021-10-02 15:00:18 -06:00
Max Holliday
79cd10ac85 cleaning up TimeAlarm and PinAlarm 2021-10-01 17:36:04 -06:00
Max Holliday
d536be7228 working samd deep sleep timealarm and pinalarm (sketchy) 2021-09-29 11:44:15 -06:00
Pierre Constantineau
c5672066d0 initial xiao kb config 2021-09-20 15:52:28 -06:00
Max Holliday
4eda8b04c4 removing redudant pycubed v04 board defs 2021-09-16 12:12:15 -06:00
Max Holliday
1ccaeeb619
adding back heritage pycubed board defs 2021-09-15 14:36:27 -06:00
Max Holliday
4f10a91f85 moving boot counter to main() and re-adding old pin names for SD_CS 2021-09-15 14:33:54 -06:00
Max Holliday
5b69aa0a58
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-15 14:23:56 -06:00
Dan Halbert
0ab4df6f2f shrink some SAMD21 builds, and nrf simmel 2021-09-14 17:10:49 -04:00
Dan Halbert
81e28308c2 Revert "turn off inline-unit-growth and max-inline-insns-auto uses"
This reverts commit 94d76e0f48.
2021-09-14 16:56:04 -04:00
Dan Halbert
94d76e0f48 turn off inline-unit-growth and max-inline-insns-auto uses 2021-09-14 12:15:21 -04:00
Max Holliday
dbd557dc89 splitting pycubed board def into pycubed_v04 and pycubed_v05 2021-09-11 20:29:40 -06:00
Max Holliday
d9ae2c00b4
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-11 20:09:59 -06:00
Dan Halbert
aa1d089cdb proxlight: Freeze adafruit_adps9960 instead of adafruit_hid; enable usb_midi 2021-09-10 14:50:09 -04:00
Max Holliday
fa83c1c2f9
adding boot counter to main.c
The boot counter is a uint8_t single-byte counter stored in the first NVM byte position (`micrcontroller.nvm[0]`). The counter increments by 1 each time the board boots, regardless if it's a hard or soft reset. 

Enable the boot counter by adding `#define CIRCUITPY_BOOT_COUNTER 1` to your board's mpconfigboard.h file. Note that an error will be thrown during the build if `CIRCUITPY_INTERNAL_NVM_SIZE` is not also set within mpconfigboard.h.
2021-09-08 19:56:23 -06:00
Max Holliday
674a3027fc
updating pycubed firmware for mainboardv05 :) 2021-09-04 18:39:24 -06:00
Neradoc
8625e53817 change board dicts to include a common macro with __name__ 2021-09-03 21:03:55 +02:00
microDev
d526925d49
make aesio module full build dependent 2021-09-02 19:02:01 +05:30
Scott Shawcroft
0d280fa83c
Two fixes, one for ble workflow, one for linking
BLE workflow had an incorrect list size for characteristics

Linking didn't advance . link it should have without extra ().
2021-09-01 12:43:43 -07:00
Scott Shawcroft
cd5acae4f4
Sort .text section to reduce fill 2021-08-31 18:04:01 -07:00
Scott Shawcroft
771b4c7464
Add two space saving knobs
* Reduce the number of supported HID reports of IDs per descriptor.
  This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
  flash. Flash is the default (1).
2021-08-31 13:02:34 -07:00
Scott Shawcroft
838d30b3a4
Fix incorrect macros 2021-08-30 14:40:14 -07:00
Jeff Epler
8f024316ad explicitly disable paralleldisplay on a few boards 2021-08-29 07:33:54 -05:00
Jeff Epler
7520feed1c Move ParallelBus to its own module 2021-08-29 07:33:54 -05:00
Neradoc
4d05bb26bf change board.ID to board.board_id 2021-08-26 23:11:55 +02:00
Neradoc
b14b294516 add board.ID 2021-08-26 23:11:55 +02:00
Scott Shawcroft
6d49a9f0c5
Merge pull request #5205 from jepler/deprecate-vertical-scroll
Deprecate Display's constructor arg set_vertical_scroll
2021-08-23 12:52:12 -07:00
Scott Shawcroft
935888927e
Merge pull request #5196 from dhalbert/samd-audio-fixes
improve SAMD audio DMA
2021-08-23 10:27:59 -07:00
Jeff Epler
379461df7d Deprecate Display's constructor arg set_vertical_scroll 2021-08-23 09:17:59 -05:00
Dan Halbert
57841dc92b
Merge pull request #5171 from tannewt/unicode_filenames
Turn on unicode for FATFS
2021-08-21 16:31:54 -04:00
Dan Halbert
046372d840 put back some dynossat_edu_obc pins 2021-08-21 16:14:09 -04:00
Dan Halbert
b8b23c97d9 improve SAMD audio DMA 2021-08-21 14:34:37 -04:00
microDev
208ec71372
Merge pull request #5190 from jepler/issue4883
samd: diagnose out of range I2C frequency
2021-08-21 08:00:50 +05:30
microDev
f6d1caabc9
Merge pull request #5182 from tannewt/fix_imx
Check background pending before sleep
2021-08-21 08:00:10 +05:30
Jeff Epler
26d33658ea samd: diagnose out of range I2C frequency
The frequency divisor is limited to 255, which gives 48MHz/2/255 ~= 94.1kHz as
the lowest speed.

Without this change, values below this cut-off gave higher frequencies instead,
which didn't appear to have any relation to the frequency value requested.

Closes: #4883
2021-08-20 15:22:35 -05:00
Scott Shawcroft
9f051ec7bf
Fix usb calibrated SAMD21 builds 2021-08-20 12:45:59 -07:00
Scott Shawcroft
5c6e80a2bb
Shrink builds by defining advanced micropython API
Also, ignore more pins on SAMD boards and disable EXFAT on others.
2021-08-19 16:49:33 -07:00
Scott Shawcroft
d2860b58b0
Check background pending before sleep
There is a race between when we run background tasks and when we
sleep. If an interrupt happens between the two, then we may delay
executing the background task. On some ports we checked this for
TinyUSB already. On iMX RT, we didn't which caused USB issues.
This PR makes it more generic for all background tasks including
USB.

Fixes #5086 and maybe others.
2021-08-19 12:18:13 -07:00
Jeff Epler
cabe96e188 canio: Run background tasks while waiting for message reception
Closes: #5004
2021-08-18 11:39:40 -05:00
Scott Shawcroft
e0ce5ff045
Fix some builds by disabling exfat 2021-08-18 08:22:29 -07:00
Dan Halbert
5b0009cbc4
Merge pull request #5151 from dhalbert/usb_hid-changes
Support multiple reports per device in usb_hid
2021-08-17 17:14:28 -04:00
Ryan A. Pavlik
a77e269121
cp_sapling_m0_revb: board.UART not board.uart
This is the only board that didn't match the all-uppercase convention for these UART (and more generally, these bus) entries.
2021-08-16 17:07:17 -05:00
Dan Halbert
f37e1d7bf5 squeeze a couple of boards 2021-08-14 17:36:05 -04:00
Scott Shawcroft
3ffab36cdc
Merge remote-tracking branch 'adafruit/main' into fix_samd_timer_leak 2021-08-13 15:20:25 -07:00
Scott Shawcroft
de796e2304
Move OneWire to onewireio from busio
This will allow finer grained inclusion in 8.0.0

Fixes #5135
2021-08-12 10:47:14 -07:00
Scott Shawcroft
fb6b438580
Make getpass and traceback full build only
This leaves much more space on SAMD21 builds that aren't "full builds".
These are new APIs that we don't need to add to old boards.

Also, tweak two Arduino boards to save space on them.
2021-08-11 14:47:35 -07:00
Scott Shawcroft
0c1d6cef75
Merge remote-tracking branch 'adafruit/main' into fix_cp_irremote 2021-08-11 13:43:59 -07:00
Scott Shawcroft
0632a1e681
Merge pull request #5060 from cdwilson/cdwilson/circuitpython/sparkfun-stm32f405-micromod
stm/boards: Add support for SparkFun STM32 MicroMod Processor board.
2021-08-11 12:19:16 -07:00
Scott Shawcroft
7f016ae11e
Fix build with filter to do OR 2021-08-11 12:10:51 -07:00
Scott Shawcroft
083960ce90
Fix SAMD51 builds and Prox Trinkey
Adds CIRCUITPY_BUSIO_UART to disable UART by raising ValueError
that no pins work.
2021-08-11 11:53:26 -07:00
Scott Shawcroft
ebf0901558
Merge pull request #5079 from dhalbert/debug-audio
Fix various RP2040 and SAMD audio issues
2021-08-11 11:19:53 -07:00
Scott Shawcroft
b56455ffbb
Allow sleep while paused 2021-08-11 10:48:39 -07:00
Scott Shawcroft
67c6932ca2
Reset timers separate from pwmio
This prevents timer leakage on builds without pwmio.

Fixes #5057
2021-08-11 09:58:31 -07:00
Scott Shawcroft
f0859ac954
Switch SAMD21 ticks to PER event
The EVSYS is used to generate an interrupt from the event. This
simplifies timing used in pulseio that conflicted with the
auto-reload countdown.

Fixes #3890
2021-08-10 15:23:45 -07:00
Chris Wilson
e741330ca8 Consistent pin naming for SparkFun MicroMod processor boards. 2021-08-09 23:10:52 -07:00
microDev
93c9d59960
Merge branch 'main' into getpass 2021-08-10 01:00:10 +05:30
Dan Halbert
2451c788f4 valid channels in audio_dma_stop; cleaner supervisor_ticks mgmt in keypad 2021-08-09 09:47:13 -04:00
Dan Halbert
59b89fdc5c Fix various audio DMA issues:
RP2040 and SAMD51:
- Detect when DMA has finished, and stop DMA audio explicitly.
- Do not accidentally reuse `first_buffer` supplied by WaveFile or RawSample. Always realloc `first_buffer` and `second_buffer`

RP2040:
- When audio playing is stopped, write a final zero to the output register. This prevents residual PWM tones.
- Handle buffer size for 8-bit samples properly for 16-bit output.
- Fail on some edge cases (which may not be possible at the moment).
2021-08-09 09:47:13 -04:00
Dan Halbert
fd71d924d2 partial buffer mgmt fix 2021-08-09 09:47:13 -04:00
microDev
51f8603783
add getpass module 2021-08-09 17:50:28 +05:30
Nathan Young
579194a543 Colocated board.LED and D13 together (GCM4) 2021-08-09 05:35:38 +02:00
Nathan Young
a15ac65fa0 Add board.LED for Grand Central M4 Express
Fixes #5111
2021-08-08 21:43:12 +02:00
microDev
063e3946d6
Merge pull request #5094 from jepler/quirc
Add qrio: Decode QR codes with quirc lib
2021-08-07 09:30:20 +05:30
Scott Shawcroft
be2342f32f
Merge pull request #5072 from microDev1/traceback
Add traceback module
2021-08-06 12:10:17 -07:00
Brian Dean
821f3d5532 board bdmicro_vina_d51: Add support for MX25L12833F flash chip. Add QSPI activity indicator LED. Add D15-D19 as aliases for the I2S peripheral pins. 2021-08-05 09:14:51 -04:00
Jeff Epler
ac4b10bcd9 It's "shared-module", not "shared-modules" 2021-08-03 10:37:47 -05:00
Scott Shawcroft
d5cdceb9b9
Use all 4 status pixels on neotrinkey too 2021-07-28 14:25:21 -07:00
Dan Halbert
e9369d50e1
Merge pull request #5067 from tannewt/pulseout_switch
Switch to pin, frequency and duty_cycle PulseOut
2021-07-28 14:58:06 -04:00
microDev
f371c0a609
add traceback module 2021-07-28 18:06:23 +05:30
Kattni
fc59a7ac02
Merge pull request #5068 from dhalbert/remove-gamepad
remove gamepad; deprecate gamepadshift
2021-07-27 11:35:06 -04:00
Dan Halbert
901a6c27c0 remove gamepad; deprecate gamepadshift 2021-07-26 22:15:09 -04:00
Scott Shawcroft
daf90aae83
Merge remote-tracking branch 'adafruit/main' into pulseout_switch 2021-07-26 18:48:59 -07:00
Scott Shawcroft
412eb87080
Switch to pin, frequency and duty_cycle PulseOut
Passing in a PWMOut still works but is deprecated. It will be
removed in CircuitPython 8.0.0

This also switches STM32 timer indices and channel indices to
0-based in our pin data rather than `- 1` everywhere. The latter is
more bug prone.

Most of the way for #3264

Tested on Metro M0, Metro M4, Feather S2, Feather nRF52840, Feather
STM32F4 and Arduino RP2040.
2021-07-26 18:35:49 -07:00
Dan Halbert
11ca505fdb add board.LED wherever possible 2021-07-26 19:57:12 -04:00
lady ada
f3a286a7ea can we add busdevice and have room? 2021-07-25 14:45:35 -04:00
Scott Shawcroft
70cbb4eddb
Support multiple status neopixels
Use the 10 neopixels on the playgrounds for status.

Fixes #5039
2021-07-23 15:17:09 -07:00
Scott Shawcroft
f84cb94819
Remove OSError(0) and old network modules
The newer modules are `socketpool` and `ssl`.

Fixes #3924, related to #2021, closes #1880, closes #2273, closes #2274
2021-07-21 17:33:40 -07:00
Scott Shawcroft
fece0fb432
Fix crash when UART construct fails
After the script stops with the exception thrown the final gc_sweep
will call any finalizers and they usually call deinit. deinit on
invalid objects can wreak havoc by changing random memory or
(hopefully) crashing. This fixes ensures the object is deinited
until initialization succeeds and the object is valid.

Do the same fix for I2C and SPI too.

Fixes #4700 and fixes #5005
2021-07-20 17:15:19 -07:00
Scott Shawcroft
e042d54702
Fix three boards and xtensa cache key 2021-07-16 11:15:05 -07:00
Scott Shawcroft
ca2cb9af2b
Remove MICROPY_PORT_* macros used for never reset
Now we use never_reset which is generally more correct and easier
to get right.

Fixes #5001 and fixes #4997
2021-07-15 16:20:04 -07:00
BoB LeSuer
35030fbb30 added pin object to analogout 2021-07-12 20:33:42 -04:00
Scott Shawcroft
0e88b77b3e
Merge pull request #4977 from pewpew-game/samd21-filesystem-size
Allow changing size of the filesystem on samd21 per board
2021-07-09 11:00:13 -07:00
Kattni Rembor
825a706135 Turn off MIDI on one build, fix name. 2021-07-08 17:31:10 -04:00
Radomir Dopieralski
92fa1055ef Allow changing size of the filesystem on samd21 per board
As the CircuitPython grows, it may at some point no longer be possible
to squeeze it on some of the flash-less SAMD21 boards, so it would be
good to have the option of shrinking the filesystem size on per-board
basis. This change allows to define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
inside the board's mpconfigborard.h file.
2021-07-08 22:19:54 +02:00
Dan Halbert
d886e8041d Turn off pwmio on meow meow for space reasons 2021-07-01 22:14:37 -04:00