Commit Graph

624 Commits

Author SHA1 Message Date
Jeff Epler bb8e0ae76e
turn off some modules to save flash space 2023-08-20 11:18:46 -05:00
Jeff Epler d94ff9d1cf
turn off audiopwmio to save flash space 2023-08-20 11:14:41 -05:00
Dan Halbert d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert 2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert 0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Dan Halbert 0d4bc8c163 initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
Zelin Cai 5fedf02806 Added Makerdiary nRF52840 Connect Kit.
Signed-off-by: Zelin Cai <zelin@makerdiary.com>
2023-07-07 15:11:12 +08:00
Dan Halbert 6cf7e45f10
Merge pull request #8037 from jpconstantineau/fix-PCA10100
fix to make buttons and leds compatible with pca10056
2023-06-08 12:56:09 -04:00
Pierre Constantineau 6fd700eb11 added HW_LED_STATUS as requested 2023-06-01 10:56:43 -06:00
hyx0329 d73f390a4d
M60 keyboard: allow run on battery
This also expose the battery control pin as BATTERY_ENABLE,
so users can fully power off the keyboard.
2023-05-28 12:11:34 +08:00
Pierre Constantineau 60ce38ed8b fix trailing space of pins.c 2023-05-26 13:30:32 -06:00
Pierre Constantineau 325037b75e fix to make buttons and leds compatible with pca10056 2023-05-26 13:17:05 -06:00
Scott Shawcroft d5b747b305
Fix board inits 2023-04-21 13:23:01 -07:00
hathach fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Scott Shawcroft b79661d631
Alphabetize, fix typo and remove incorrect comment 2023-02-23 14:34:54 -08:00
Scott Shawcroft de5f58a61d
Merge branch 'main' into banglejs2 2023-02-21 12:04:28 -08:00
Scott Shawcroft 931c7c1c51
Add Bangle.js 2, JDI memory displays and ACeP epd
This 2-in-1 PR started with the goal of support the Bangle.js 2
smartwatch with *no USB*.
* Adds "secure" DFU build support with a committed private key.
* Adds 3-bit color support with one dummy bit for the JDI memory display
* Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK.
  This is needed because the Bangle.js 2 uses the watchdog to reset.
* Renamed port_background_task() to port_background_tick() to indicate it
  runs on tick, not RUN_BACKGROUND_TASK.
* Marks serial connected when the display terminal is inited. This means
  that safe mode messages show up on the display.

ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that
support as well.
* Adds 3-bit ACeP color support for 7-color e-paper displays. (Not
  watch related but similar due to color depth.)
* Allows a refresh sequence instead of a single int command. The 7" ACeP
  display requires a data byte for refresh.
* Adds optional delay after resetting the display. The ACeP displays
  need this. (Probably to load LUTs from flash.)
* Adds a cleaning phase for ACeP displays before the real refresh.

For both:
* Add dither support to Palette.
* Palette no longer converts colors when set. Instead, it caches
  converted colors at each index.
* ColorConverter now caches the last converted color. It should make
  conversions faster for repeated colors (not dithering.)
2023-02-15 15:03:40 -08:00
Dan Halbert d8231f1588 Implement safemode.py 2023-02-13 18:26:38 -05:00
Pontus Oldberg 9f266c361b Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier. 2022-12-21 16:33:06 +01:00
Pontus Oldberg 66eca9c35e Updated formatting. 2022-12-11 17:25:26 +01:00
Pontus Oldberg f7e735b492 Added LDO control pin, new flash variants and support functions for the LDO control pin. 2022-12-11 17:11:24 +01:00
Pontus Oldberg 9ef5b7d118 Merge branch 'main' of https://github.com/PontusO/circuitpython 2022-12-11 13:02:03 +01:00
Pontus Oldberg da413094f8 Added LDO control pin and initial setup 2022-12-11 13:01:00 +01:00
Dan Halbert 4e7d65251f Add pin for charge rate for Seeed XIAO nRF52840 Sense 2022-12-08 14:09:44 -05:00
foamyguy c6ca2bdd59 disable pixelmap on bluemicro833 2022-11-24 09:09:48 -06:00
foamyguy 19f1119994 Merge branch 'main' into fastpixelmap
# Conflicts:
#	shared-module/adafruit_pixelbuf/PixelBuf.c
2022-11-21 20:25:58 -06: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
Kyle McCreery 1f332e7007 Adding pillbug initial commit 2022-11-09 23:15:38 -05:00
Neradoc 0aa41fa92e change BOARD_USER_SAFE_MODE_ACTION into a separate sentence 2022-10-30 01:55:42 +02:00
Dan Halbert 4cb69a51d5 Use MP_WEAK for default board.c routines 2022-09-08 07:36:50 -04:00
Dan Halbert 41bcd7b260 Remove support for auto-brightness 2022-08-09 22:40:21 -04:00
Arudinne a55aebc718 Added support for 8MB flash for Challenger 840 2022-07-26 20:34:01 -05: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 8bb369cac5 refactor debug UART to console UART; get working on ESP32 2022-06-30 23:16:46 -04:00
Scott Shawcroft 894cea217d
Merge pull request #6486 from DavePutz/issue_6478
Fix for Issue #6478
2022-06-15 09:43:09 -07:00
root 015e95807a Fix for Issue #6478 2022-06-14 12:14:05 -05:00
Scott Shawcroft 1a3d2a5b5e
Shrink nrf52833 builds
Make them CIRCUITPY_FULL_BUILD = 0 and rework the boards to have
the same modules enabled (ish.)

Also make ZLIB require FULL_BUILD and disable advanced `micropython`
module APIs by default on all builds.
2022-06-13 15:36:15 -07: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
Damien George efe23aca71 all: Remove third argument to MP_REGISTER_MODULE.
It's no longer needed because this macro is now processed after
preprocessing the source code via cpp (in the qstr extraction stage), which
means unused MP_REGISTER_MODULE's are filtered out by the preprocessor.

Signed-off-by: Damien George <damien@micropython.org>
2022-06-02 16:31:37 +10:00
Dan Halbert 947f564672 tune LTO on nrf 2022-05-26 22:16:41 -04:00
Dan Halbert d74193c298 Use -flto and -flto-partition only as needed 2022-05-26 11:36:41 -04:00
Jim Mussared f67ac90fa9 nrf: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-18 20:57:09 +10:00
Jim Mussared 0e7bfc88c6 all: Use mp_obj_malloc everywhere it's applicable.
This replaces occurences of

    foo_t *foo = m_new_obj(foo_t);
    foo->base.type = &foo_type;

with

    foo_t *foo = mp_obj_malloc(foo_t, &foo_type);

Excludes any places where base is a sub-field or when new0/memset is used.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-03 22:28:14 +10:00
Neradoc 17bba7b17d remove Adafruit_CircuitPython_BusDevice from frozen modules, it's built in now 2022-04-19 06:49:11 +02:00
Dan Halbert 2693a4cfe1
Merge pull request #6069 from gamblor21/uzlib-module
zlib Module
2022-04-06 12:06:44 -04:00
Pontus Oldberg 286e26edf0 Added support for 4MB flash. 2022-04-06 11:08:22 +02:00
Mark 8ed7b114cd
Merge branch 'main' into uzlib-module 2022-04-03 11:48:37 -05:00
Pontus Oldberg f2d10237d2
Merge branch 'adafruit:main' into main 2022-03-30 16:43:39 +02:00