Commit Graph

2188 Commits

Author SHA1 Message Date
Mark fa435468fa
Merge branch 'main' into gif_displayio_support 2023-02-13 18:30:51 -06:00
Dan Halbert d8231f1588 Implement safemode.py 2023-02-13 18:26:38 -05:00
gamblor21 be67cb72ad Disable for pewpew_m4 for space 2023-02-13 17:04:54 -06:00
Dan Halbert 7522522a0a
Merge pull request #7501 from pypewpew/pewpewm4-cdc
pewpew m4: enable CDC back
2023-01-28 12:00:49 -05:00
Radomir Dopieralski 5b814a4561 pewpew m4: enable CDC back
CDC got disabled on this board by mistake
2023-01-28 17:20:22 +01:00
Dan Halbert cc92ce4820 Use memory fence when disabling cache to avoid -O2 problems 2022-12-29 19:49:40 -05:00
Jeff Epler 678a466d1a
alphabetize 2022-12-09 14:12:43 -06:00
Jeff Epler 3459fe322b
Withdraw the _environ module
This existed solely for testing, so expose it a different way during
the unix coverage build

Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Dan Halbert 082b0d1aed
Merge pull request #7191 from jepler/fastpixelmap
Add a fast PixelMap-like class
2022-12-01 11:43:00 -05:00
Jeff Epler beb053a94d
more thoroughly disable UART when 2022-11-30 12:06:19 -06:00
Jeff Epler 4af95f1cb1
atmel-samd: Ensure sdioio.SDCard pins are released 2022-11-29 13:45:18 -06:00
Jeff Epler 8e83f36c36
SAM E54 Xplained devkit hardfaults at start with -O2
I don't know why, but other samd5x are using -Os too, see the block above.

Closes: #7277
2022-11-29 13:05:39 -06:00
Scott Shawcroft ad2d190507
Merge pull request #7247 from tannewt/picow_web_workflow
Enable* web workflow for Pico W
2022-11-28 14:19:42 -08:00
Dan Halbert 79f4344860 fix playing mono files on stereo output 2022-11-23 22:11:41 -05:00
Dan Halbert 6d022733b3
Merge pull request #7162 from rhooper/boards-list
add boards list to make error message
2022-11-21 23:18:37 -05:00
foamyguy 19f1119994 Merge branch 'main' into fastpixelmap
# Conflicts:
#	shared-module/adafruit_pixelbuf/PixelBuf.c
2022-11-21 20:25:58 -06:00
Scott Shawcroft c3a96a63c0
Enable* web workflow for Pico W
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.

Progress on #7214
2022-11-21 16:24:05 -08:00
MicroDev c3c1717813
refactor common port specific Makefile code 2022-11-18 23:00:28 +05:30
Dan Halbert b74893eb07 samd21: port_disable_tick() should disable event channel 2022-11-15 21:52:12 -05:00
Jeff Epler f5c637dc10
Add adafruit_pixelmap.PixelMap
.. a fast helper for animations. It is similar to and inspired by the
PixelMap helper in Adafruit LED Animation library, but with an extremely
fast 'paste' method for setting a series of pixels. This is a common
operation for many animations, and can give a substantial speed improvement.

It's named `adafruit_pixelmap` so that we can package a compatible version
in pure Python for systems that can't fit it in C in flash, or for
Blinka.

This is a proof of concept and can make a very fast comet animation:
```python
import time
import adafruit_pixelbuf
import adafruti_pixelmap
import board
import neopixel
from supervisor import ticks_ms
from adafruit_led_animation.animation.solid import Solid
from adafruit_led_animation import color

pixel_pin = board.GP0
pixel_num = 96

pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=1, auto_write=False, pixel_order="RGB")

evens = adafruit_pixelmap.PixelMap(pixels, tuple(range(0, pixel_num, 2)))
odd_indices = tuple((i, i+2) for i in range(1, pixel_num, 4))
print(odd_indices)
odds = adafruit_pixelbuf.PixelMap(pixels, odd_indices)
assert len(odds) == len(odd_indices)


comet_length = 16

comet1 = [color.calculate_intensity(color.GREEN, ((1+i) / comet_length) ** 2.4)
        for i in range(comet_length)]
comet2 = [color.calculate_intensity(color.PURPLE, ((1+i) / comet_length) ** 2.4)
        for i in range(comet_length)]

pos1 = 0
pos2 = 96//4

while True:
    evens.paste(comet1, pos1, wrap=True, reverse=False, others=0)
    pos1 = (pos1 + 1) % len(evens)

    odds.paste(comet2, pos2, wrap=True, reverse=True, others=0)
    pos2 = (pos2 - 1) % len(odds)
    pixels.show()

    m = ticks_ms()
    if m % 2000 > 1000:
        time.sleep(.02)
```
2022-11-11 07:54:33 -06:00
Rose Hooper 8933f93439 simplify and use columns for boardlist 2022-11-01 11:00:48 -04:00
Rose Hooper 36c4cc7d30 fix output layout of board list 2022-11-01 00:18:46 -04:00
Rose Hooper dec128f508 add boards list to make error message 2022-10-31 23:57:59 -04:00
Dan Halbert 952812cdea
Merge pull request #7154 from dhalbert/alarm-lifetime
Save wake alarm info in static storage, simplifying recording of alarm
2022-10-30 12:28:50 -04:00
Neradoc 0aa41fa92e change BOARD_USER_SAFE_MODE_ACTION into a separate sentence 2022-10-30 01:55:42 +02:00
Neradoc 934d2a7004 remove duplicate press boot button, it's already the default 2022-10-30 01:52:17 +02:00
Dan Halbert ded134c346 store wake_alarm in a static object 2022-10-29 16:26:36 -04:00
Dan Halbert 9307b62ad5 wip 2022-10-27 22:42:04 -04:00
microDev b33a2b45dc
add coproc alarm 2022-10-20 18:38:20 +05:30
Dan Halbert de7a9c38fc Merge remote-tracking branch 'adafruit/main' into add-os-utime-function 2022-10-13 14:15:13 -04:00
Jeff Epler f7d39ceae4
comment on the revised algorithm 2022-10-12 16:25:09 -05:00
Jeff Epler a943167d69
samd: Reduce a further 48 bytes for non-full builds
Another reduction of -48 bytes can be had if the fine calculation
step is skipped. The worst difference compared to the old reference
code with my calibration values in the 0° to 60° was 2°C,
and the difference at 25°C is 1°C.

The final size decrease for non-full builds like Trinket M0 is 268
bytes.
2022-10-12 15:53:44 -05:00
Jeff Epler b251e78ac5
samd: size-optimize microcontroller temp calc
Perform most arithmetic with scaled integer values.
For my calibration values
```
const uint32_t NVMCTRL_TEMP_LOG[]={0xfc05511e, 0xcc7ac0f7};
```
the maximum difference between the old and new calculation is 0.50°C.
The difference is smallest (0.13°) at 25.87°C in the old scale.

This reduces mcu_processor_get_temperature from 568 bytes to 348 bytes
(-220 bytes)
2022-10-12 15:44:14 -05:00
Dan Halbert 4cd370ecf8 Merge remote-tracking branch 'adafruit/main' into add-os-utime-function 2022-10-10 17:51:59 -04:00
Dan Halbert 86a0f9a861 save about 112 bytes 2022-10-09 19:22:39 -04:00
Dan Halbert 987030e706
Merge branch 'main' into add-os-utime-function 2022-10-07 22:45:51 -04:00
Dan Halbert b097c0736a shrink some small builds 2022-10-07 22:44:06 -04:00
Dan Halbert 78b278e091 disable rainbowio on arduino_zero 2022-10-07 10:39:30 -04:00
Dan Halbert 90f6096955 fix ai-thinker creation ids; fix some typos elsewhere 2022-10-03 15:29:03 -04:00
Dan Halbert ad79f595a5
Merge pull request #6974 from MicroDev1/patch
Couple Minor Fixes
2022-10-01 13:12:01 -04:00
Dan Halbert 7bb90dbf45 remove redundant port/*/.gitignore; cleanup others 2022-10-01 11:52:36 -04:00
Jeff Epler 907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05:00
Dan Halbert db065a299f
Merge pull request #6933 from jepler/🥧🐮
Implement a useful subset of `wifi` and `socketpool` modules on 🥧🐮
2022-09-28 18:09:24 -04:00
Jeff Epler 346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Jeff Epler 77fcb8a5a3
disable rainbowio on this arduino_nano_33_iot
The gpio changes took away enough code space that it doesn't fit.
2022-09-28 10:05:32 -05:00
Dan Halbert 39492b3403
Merge pull request #6951 from jepler/black-bindings
Black bindings
2022-09-27 17:57:07 -04:00
Jeff Epler b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
Kattni Rembor ea5e4b20b0 Add more spacing for aliased pins. 2022-09-27 15:50:30 -04:00
Kattni Rembor 9c4c7241d0 Update pin order to match silk. 2022-09-27 15:24:07 -04:00
Dan Halbert c567b43441 add CIRCUITPY_USB_IDENTIFICATION to turn off on smallest builds 2022-09-20 14:32:38 -04:00
Dan Halbert 60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
Dan Halbert 4cb69a51d5 Use MP_WEAK for default board.c routines 2022-09-08 07:36:50 -04:00
Radomir Dopieralski 0a0c03c3d2 Fix ugame.py for the ugame10 board
It was still trying to use the gamepad module, and there was a typo
2022-08-26 17:07:44 +02:00
Dan Halbert 0c87d0b40d matrixportal: remove ulab instead of bleio HCI 2022-08-18 10:23:37 -04:00
Dan Halbert 2664d3766d matrixportal: remove BLEIO HCI to make room to freeze portalbase 2022-08-18 07:43:31 -04:00
Dan Halbert 02cc6c2aee Merge remote-tracking branch 'adafruit/main' into remove-autobrightness 2022-08-10 08:35:53 -04:00
Scott Shawcroft 138c92f035
Merge pull request #6727 from dhalbert/restore-deleted-modules
restore rainbowio and onewireio to a number of boards
2022-08-09 21:44:26 -07:00
Dan Halbert 41bcd7b260 Remove support for auto-brightness 2022-08-09 22:40:21 -04:00
Dan Halbert 34b22eac2a restore rainbowio and onewireio to a number of boards 2022-08-09 16:10:17 -04:00
Dan Halbert 84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00
Scott Shawcroft e7d72b1ebe
Use libgcc from Arch on SAMD21 (it's smaller.)
Fixes #4705
2022-08-04 16:33:41 -07:00
Scott Shawcroft 9661d3256c
Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
Dan Halbert 9baa2724a7 code formatting suggestion 2022-08-01 00:27:25 -04:00
Dan Halbert 1348cb435b Fix SAMD I2C frequency check 2022-07-29 19:07:33 -04:00
Scott Shawcroft 6463755577
Merge pull request #6648 from pypewpew/stage-png
Add PNG image support to the Stage library
2022-07-27 11:02:48 -07:00
Radomir Dopieralski d510e60511 Disable bitmaptools and busdevice on pewpew_m4 to fit ja translation 2022-07-27 00:08:02 +02:00
Neradoc 6e5c818311 fix extensions for atmel and 2 boards, matching main 2022-07-26 18:15:59 +02:00
Neradoc eabe8b971a list extensions instead of macros names ("bin,uf2" not BIN_UF2)
the modules_support_matrix usees a dictionnary per board instead of a list
optionally include the frozen modules URLs in it
2022-07-26 18:15:59 +02:00
Neradoc d021d9ae4a Move build extensions to board directories
- define CIRCUITPY_BUILD_EXTENSIONS to predefined values
- set CIRCUITPY_BUILD_EXTENSIONS in port and board config
- reuse the support matrix "get_settings_from_makefile" to get it
- move the existing port and board specific values
- remove the C3 specific board values because it's not the default
- update build_release_files.py to use get_settings_from_makefile
2022-07-26 18:15:50 +02:00
Dan Halbert bb47484cb1 Merge remote-tracking branch 'adafruit/main' into from_bytes-check-parameters 2022-07-19 17:18:26 -04:00
Dan Halbert 51f2253cef no Russian font for SAMD21; adjust unix build warnings 2022-07-19 14:07:18 -04:00
Scott Shawcroft ac460dd1e1
Merge branch 'main' into esp32 2022-07-13 15:30:53 -07:00
Dan Halbert 9d77a36fbf update samd-peripherals submodule 2022-07-08 22:47:36 -04:00
Dan Halbert c316b950c7 merge from adafruit/main 2022-07-08 15:42:19 -04:00
Jeff Epler ab3e786611
disable additional module on matrixportal_m4 2022-07-07 20:00:12 -05:00
Jeff Epler 601eb91b89
Disable gifio on matrixportal to reclaim flash space 2022-07-07 17:00:00 -05:00
Dan Halbert 4c20b3cb63
Merge pull request #6564 from adafruit/7.3.x
7.3.x
2022-07-06 15:25:24 -04:00
Dan Halbert 131d70cebd restore traceback to matrixportal build 2022-06-28 16:10:55 -04:00
Dan Halbert 02069eb0b5 wip 2022-06-23 15:59:06 -04:00
Dan Halbert feb1d903f7 merge 7.3.1 to main 2022-06-23 09:07:49 -04:00
Neradoc 7f968f18c0 move frozen adafruit_circuitplayground to express subdirectory 2022-06-20 16:55:10 -04:00
Dan Halbert f0bf14094b Update samd-peripherals to fix SPI DMA problem 2022-06-17 10:59:59 -04:00
Dan Halbert 6e090c96a5 squeeze some specialized builds 2022-06-10 16:24:52 -04:00
Dan Halbert 80ae14202a
Merge pull request #6416 from FoamyGuy/display_brightness_pwm
display brightness pwm 500hz frequency
2022-06-05 23:52:42 -04:00
foamyguy 260994d16e Merge branch 'main' into display_brightness_pwm 2022-06-04 11:32:15 -05:00
foamyguy cbff9dd8e3 add new argument for all boards with built-in display 2022-06-04 11:08:20 -05:00
Scott Shawcroft be6936c8ec
Shrink MatrixPortal M4 build 2022-06-03 18:57:01 -07:00
Scott Shawcroft be67067809
Merge remote-tracking branch 'adafruit/main' into translate_header 2022-06-03 15:18:18 -07:00
Dan Halbert 3ff7ed75c6
Merge pull request #6346 from Neradoc/cpx-frozen-lite
Move frozen adafruit_circuitplayground to CPX subdirectory
2022-06-01 21:15:46 -04:00
Scott Shawcroft 09c61efcff
Split partition from LTO enable 2022-06-01 11:12:14 -07:00
Scott Shawcroft 6d3698848c
Fix PDMIn.c formatting 2022-06-01 11:04:33 -07:00
Scott Shawcroft 7fc0aa5791
Fix windows and two samd builds 2022-05-31 14:48:41 -07:00
foamyguy ffc451b338 argument for backlight_pwm_frequency and use it in pyportal titano build 2022-05-28 12:01:05 -05:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Scott Shawcroft dc5565a5ce
Merge pull request #6436 from dhalbert/judicious-lto
LTO: Use -flto and -flto-partition only as needed
2022-05-27 10:31:06 -07:00
Dan Halbert ca085150ee disable traceback on samd21; re-enable onewireio on Metro m0 2022-05-26 15:33:04 -04:00
Dan Halbert 95fc7e4713 harmless change to force all ports to build 2022-05-26 11:52:58 -04:00
Dan Halbert d74193c298 Use -flto and -flto-partition only as needed 2022-05-26 11:36:41 -04:00
George White 8539d6518e flip CTS and RTS pinmux to match RX and TX 2022-05-26 00:06:00 +00:00
George White 99b23b96d9 fix comment typo and mention datasheet 2022-05-26 00:03:46 +00:00