Commit Graph
3099 Commits
Author SHA1 Message Date
36ed7b591b Fix BLE semaphore leak in Bluefruit library
Fix semaphore leak bug that causes device lockup when BLE central disconnects unexpectedly (e.g., going out of range, supervision timeout).

Co-authored-by: liquidraver <504870+liquidraver@users.noreply.github.com>
Co-authored-by: liamcottle <liam@liamcottle.com>
2026-04-28 20:30:09 +10:00
Ha Thach fa129c2a10 Merge pull request #865 from adafruit/fix-auto-led-conn
stop blink timer in autoConnLed(false)
2026-03-18 19:16:28 +07:00
Ha ThachandCopilot Autofix powered by AI 0e6562df6e Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 18:51:18 +07:00
hathach ec0a415838 stop blink timer in autoConnLed(false) 2026-03-18 18:41:36 +07:00
Ha Thach 49f3fa614b Merge pull request #831 from geeksville/pr-lfs
Update to LFS v1.7.2 tag - to fix filesystem corruption due to file renames
2026-03-18 17:58:19 +07:00
Ha Thach a162b65032 Merge pull request #864 from adafruit/add-agents-md
add AGENTS.md for repository guidance and conventions
2026-03-18 14:13:27 +07:00
Ha ThachandCopilot Autofix powered by AI bc9acf2d02 Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 13:51:26 +07:00
Ha Thach df74a07a9f Merge pull request #863 from carlosperate/fix/nrfutil-macos-locale
Fix macOS locale env for adafruit-nrfutil invocations
2026-03-18 13:39:38 +07:00
hathach 5fbfbbd952 add AGENTS.md for repository guidance and conventions 2026-03-18 13:04:10 +07:00
Carlos Pereira Atencio 7ce71f4c8d Fix macOS locale env for adafruit-nrfutil invocations
Arduino IDE v2 invokes tools in an environment where `LANG=""` and `LC_ALL=`
are not set to a specific encoding, as described in:

https://github.com/arduino/arduino-ide/issues/1513#issuecomment-1293383639

The bundled adafruit-nrfutil binary is a PyInstaller-frozen app using Click,
which expects the encoding to be set to UTF-8, and throws the following error
on macOS:

    Traceback (most recent call last):
      File "__main__.py", line 317, in <module>
      File "click/core.py", line 1134, in __call__
      File "click/core.py", line 1040, in main
      File "click/_unicodefun.py", line 100, in _verify_python_env

    RuntimeError: Click will abort further execution because Python was
    configured to use ASCII as encoding for the environment.
    Consult https://click.palletsprojects.com/unicode-support/ for
    mitigation steps.

    This system supports the C.UTF-8 locale which is recommended.
    You might be able to resolve your issue by exporting the following
    environment variables:

        export LC_ALL=C.UTF-8
        export LANG=C.UTF-8

So, prepends `env LANG=C.UTF-8 LC_ALL=C.UTF-8` to each invokation in macOS,
via a `.macosx` override, to force a valid locale.
To avoid duplication, the tool arguments have been moved into a `.args`
variable that is included in the normal call and the `.macosx` override.
2026-03-17 23:55:44 +01:00
Ha Thach 4a2d8dd5be Merge pull request #852 from adafruit/update-tinyusb-3.7
bump up tinyusb to 3.7.0
2025-06-26 17:53:26 +07:00
hathach c5aedbf8ff bump up tinyusb to 3.7.0 2025-06-26 16:00:41 +07:00
Ha Thach ba4ad90d7e bump up version to 1.7.0 2025-05-30 17:02:03 +07:00
Ha Thach 383eae2434 Merge pull request #850 from adafruit/add-Print-flush
Add print flush
2025-05-30 17:00:03 +07:00
hathach 197e796d6c bump up tinyusb to 3.6.0 2025-05-30 15:10:42 +07:00
hathach 33d98c01d8 add Print:flush() 2025-05-30 15:09:12 +07:00
Scott Shawcroft aa0f46ce64 Merge pull request #847 from obra/patch-1
Fix a copy-paste error in the bug report template.
2025-04-29 09:32:24 -07:00
Jesse Vincent 6f5453d64f Fix a copy-paste error in the bug report template.
As I was about to file a bug, I noticed a typo, so figured it was worth sending a quick PR.
2025-04-29 09:27:35 -07:00
Ha Thach ad218a5e43 Merge pull request #842 from adafruit/fix-dynamic-adv-data
fix(advertising): dynamic data not update
2025-03-03 17:07:41 +07:00
hathach 4e22a13f60 fix dynamic data advertising not update
fix typo
2025-03-03 16:26:09 +07:00
Ha Thach 53058a7456 Merge pull request #838 from todd-herbert/ble-flash-corruption
Avoid InternalFileSystem corruption caused by simultaneous BLE operation
2025-02-13 16:02:12 +07:00
Todd Herbert 275da60c80 Apply patch from hathach
https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/838#pullrequestreview-2601718986
2025-02-13 20:55:10 +13:00
Todd Herbert facf938c74 braces 2025-01-21 23:24:54 +13:00
Todd Herbert 630668a071 Refactor for maintainability 2025-01-21 03:28:54 +13:00
Todd Herbert 3ea78558e1 Reattempt failed flash operations 2025-01-18 01:58:32 +13:00
Kevin Hester 3d5f43ff1e Update to LFS v1.7.2 tag (see below for details)
I wanted to update LFS to pull in a particular fix they made upstream:
https://github.com/littlefs-project/littlefs/commit/97d8d5e96a7781596708664f18f2ea6c3a179330

Since I was doing the update anyways (to this old/stable lib) I updated to
the 'highest' LFS version which is still backwards compatible to the
v1.6.1 version which had been used originally to create the adafruit fork.

The other fixes in 1.7.2/1.7.0 (they are identical wrt. lfs.c) IMO are
unlikely to be critical for adafruit but see the full list here:

https://github.com/littlefs-project/littlefs/releases/tag/v1.7.0
2024-08-14 11:05:41 -07:00
Ha Thach 4dcfa3b796 Merge pull request #826 from mattallen37/master
Add support for VDDHDIV5
2024-07-18 17:31:02 +07:00
Ha Thach bba4b53a2d Merge pull request #829 from attermann/file_term
Null termination of file name when max length
2024-07-18 17:22:07 +07:00
Ha Thach 699a6c5784 Merge pull request #828 from attermann/weak_allocator
Making new/delete operators overridable
2024-07-18 17:20:26 +07:00
Ha Thach 11b6799f25 Merge pull request #827 from attermann/lfs_leak
Fix memory leak on failure to open
2024-07-18 17:17:25 +07:00
Chad Attermann 1b12011507 Null termination of file name when max length
File names are returned unterminated in the edge case where their length
is max size This is due to the fact that strncpy does terminate the
destination string when the source string is greater than or equal to
the specifid maximum length.
2024-07-15 09:01:40 -06:00
Chad Attermann 236e434296 Additionally clearing pointers just in case
Clearing `_file` and `_dir` pointers after freeing on failure to open
just in case close() is later called.

To elaborate, the `_file` and `_dir` pointers are normally freed and
cleared by _close(), but when a failure occurs upon opening, these
pointers were being left orphaned since calling close() after failure to
open doesn't make much sense, and indeed caused serious issues within
lfs.
2024-07-12 13:18:40 -06:00
Chad Attermann cb212d0c3f Making new/delete operators overridable
Added `__attribute__((weak))` weak linking annotation to new and delete operator
overrides to allow for user-defined overrides.
2024-07-12 12:59:46 -06:00
Chad Attermann 1ce5cf13d2 Fix memory leak on failure to open
Fixes leak of memory caused by failure to free file and directory
structures when open fails.
2024-07-12 12:42:53 -06:00
Matthew Richardson d48767476d Add support for VDDHDIV5
Allow reading the VDDHDIV5 ADC source on devices that support it, such as nRF52840. For designs where the VDDH pin is connected to a battery, this is a great way to measure battery voltage without any additional external components.
2024-06-14 10:48:34 -04:00
Ha Thach 8c8bcf292e Merge pull request #739 from adafruit/add-feather-833
Add support for nrf52833
2024-06-05 18:40:57 +07:00
hathach e5f67a5fb8 minor change 2024-06-05 18:11:53 +07:00
hathach 5e11e7f436 update bootloader to 0.9.1 2024-06-05 18:08:01 +07:00
hathach 56cb115ece add pca10100 for 833 as 3rd party 2024-06-05 18:04:53 +07:00
hathach 03bb265434 Merge branch 'refs/heads/master' into add-feather-833
bootloader/circuitplayground_nrf52840/circuitplayground_nrf52840_bootloader-0.6.2_s140_6.1.1.hex
bootloader/circuitplayground_nrf52840/circuitplayground_nrf52840_bootloader-0.6.2_s140_6.1.1.zip
bootloader/circuitplayground_nrf52840/circuitplayground_nrf52840_bootloader-0.7.0_s140_6.1.1.hex
bootloader/circuitplayground_nrf52840/circuitplayground_nrf52840_bootloader-0.7.0_s140_6.1.1.zip
bootloader/circuitplayground_nrf52840/circuitplayground_nrf52840_bootloader-0.9.0_s140_6.1.1.zip
bootloader/clue_nrf52840/clue_nrf52840_bootloader-0.6.2_s140_6.1.1.hex
bootloader/clue_nrf52840/clue_nrf52840_bootloader-0.6.2_s140_6.1.1.zip
bootloader/clue_nrf52840/clue_nrf52840_bootloader-0.7.0_s140_6.1.1.hex
bootloader/clue_nrf52840/clue_nrf52840_bootloader-0.7.0_s140_6.1.1.zip
bootloader/clue_nrf52840/clue_nrf52840_bootloader-0.9.0_s140_6.1.1.hex
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.6.2_s132_6.1.1.hex
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.6.2_s132_6.1.1.zip
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.7.0_s132_6.1.1.hex
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.7.0_s132_6.1.1.zip
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.9.0_s132_6.1.1.hex
bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.9.0_s132_6.1.1.zip
bootloader/feather_nrf52840_express/feather_nrf52840_express_bootloader-0.7.0_s140_6.1.1.hex
bootloader/feather_nrf52840_express/feather_nrf52840_express_bootloader-0.7.0_s140_6.1.1.zip
bootloader/feather_nrf52840_express/feather_nrf52840_express_bootloader-0.9.0_s140_6.1.1.hex
bootloader/feather_nrf52840_sense/feather_nrf52840_sense_bootloader-0.7.0_s140_6.1.1.hex
bootloader/feather_nrf52840_sense/feather_nrf52840_sense_bootloader-0.7.0_s140_6.1.1.zip
bootloader/feather_nrf52840_sense/feather_nrf52840_sense_bootloader-0.9.0_s140_6.1.1.hex
bootloader/feather_nrf52840_sense/feather_nrf52840_sense_bootloader-0.9.0_s140_6.1.1.zip
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.6.2_s140_6.1.1.hex
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.6.2_s140_6.1.1.zip
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.7.0_s140_6.1.1.hex
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.7.0_s140_6.1.1.zip
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.9.0_s140_6.1.1.hex
bootloader/itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.9.0_s140_6.1.1.zip
bootloader/ledglasses_nrf52840/ledglasses_nrf52840_bootloader-0.6.2_s140_6.1.1.zip
bootloader/ledglasses_nrf52840/ledglasses_nrf52840_bootloader-0.9.0_s140_6.1.1.hex
bootloader/ledglasses_nrf52840/ledglasses_nrf52840_bootloader-0.9.0_s140_6.1.1.zip
bootloader/metro_nrf52840_express/metro_nrf52840_express_bootloader-0.7.0_s140_6.1.1.hex
bootloader/metro_nrf52840_express/metro_nrf52840_express_bootloader-0.7.0_s140_6.1.1.zip
bootloader/metro_nrf52840_express/metro_nrf52840_express_bootloader-0.9.0_s140_6.1.1.zip
bootloader/particle_xenon/particle_xenon_bootloader-0.6.2_s140_6.1.1.hex
bootloader/particle_xenon/particle_xenon_bootloader-0.6.2_s140_6.1.1.zip
bootloader/particle_xenon/particle_xenon_bootloader-0.7.0_s140_6.1.1.hex
bootloader/particle_xenon/particle_xenon_bootloader-0.9.0_s140_6.1.1.hex
bootloader/raytac_mdbt50q_rx/raytac_mdbt50q_rx_bootloader-0.6.2_s140_6.1.1.hex
bootloader/raytac_mdbt50q_rx/raytac_mdbt50q_rx_bootloader-0.6.2_s140_6.1.1.zip
bootloader/raytac_mdbt50q_rx/raytac_mdbt50q_rx_bootloader-0.7.0_s140_6.1.1.zip
bootloader/raytac_mdbt50q_rx/raytac_mdbt50q_rx_bootloader-0.9.0_s140_6.1.1.hex
bootloader/raytac_mdbt50q_rx/raytac_mdbt50q_rx_bootloader-0.9.0_s140_6.1.1.zip
2024-06-05 16:31:16 +07:00
Ha Thach 0ed4d9ffc6 Merge pull request #822 from adafruit/feather840_revE 2024-05-09 22:25:24 +07:00
hathach ea46b6bc07 bump up version to 1.6.1 2024-05-09 21:40:52 +07:00
hathach 612fc1259d update bootloader to 0.9.0 2024-05-09 21:40:08 +07:00
hathach 9f1cb2aff4 add PIN_NEOPIXEL_POWER as D34 for Feather nRF52840 Express RevE. Also set it as output, and write to HIGH as default 2024-05-09 21:37:41 +07:00
Ha Thach addf2e0ebc Merge pull request #819 from adafruit/update-tinyusb-lib-3.1.3
update tinyusb lib to 3.1.3
2024-03-27 11:11:16 +07:00
hathach 77bed4894c update tinyusb lib to 3.1.3 2024-03-27 10:52:48 +07:00
Ha Thach 71bc0dc138 Merge pull request #811 from adafruit/update-lib
update tinyusb and nrfcrypto lib
2024-02-06 16:17:11 +07:00
hathach c2d898b0a6 update tinyusb and nrfcrypto lib 2024-02-06 15:18:17 +07:00
Ha Thach af40f13ed6 Merge pull request #808 from adafruit/update-bootloader-083
update bootloader to 0.8.3
2024-01-29 17:43:10 +07:00
hathach c0cba5794f update bootloader to 0.8.3 to include fix for feather sense tft slash screen 2024-01-29 17:11:03 +07:00