Skip to content

Commit 6f042ff

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into wifierr15
2 parents 0de469c + 39b16fe commit 6f042ff

File tree

46 files changed

+699
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+699
-129
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@
306306
url = https://github.com/elecfreaks/circuitpython_picoed.git
307307
[submodule "ports/raspberrypi/lib/cyw43-driver"]
308308
path = ports/raspberrypi/lib/cyw43-driver
309-
url = https://github.com/adafruit/cyw43-driver
310-
branch = circuitpython9
309+
url = https://github.com/georgerobotics/cyw43-driver
310+
branch = main
311311
[submodule "ports/raspberrypi/lib/lwip"]
312312
path = ports/raspberrypi/lib/lwip
313313
url = https://github.com/adafruit/lwip.git

devices/ble_hci/common-hal/_bleio/Adapter.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,14 @@ STATIC void check_enabled(bleio_adapter_obj_t *adapter) {
267267
// return true;
268268
// }
269269

270-
char default_ble_name[] = { 'C', 'I', 'R', 'C', 'U', 'I', 'T', 'P', 'Y', 0, 0, 0, 0};
270+
// Includes trailing null.
271+
char default_ble_name[] = { 'C', 'I', 'R', 'C', 'U', 'I', 'T', 'P', 'Y', 0, 0, 0, 0, 0};
272+
273+
static void _adapter_set_name(bleio_adapter_obj_t *self, mp_obj_str_t *name_obj) {
274+
mp_buffer_info_t bufinfo;
275+
mp_get_buffer_raise(name_obj, &bufinfo, MP_BUFFER_READ);
276+
bleio_characteristic_set_local_value(self->device_name_characteristic, &bufinfo);
277+
}
271278

272279
// Get various values and limits set by the adapter.
273280
// Set event mask.
@@ -283,16 +290,18 @@ STATIC void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
283290
#endif
284291

285292
if (!self->name) {
286-
name_len = sizeof(default_ble_name);
293+
name_len = sizeof(default_ble_name) - 1;
287294
bt_addr_t addr;
288295
hci_check_error(hci_read_bd_addr(&addr));
289296

290297
default_ble_name[name_len - 4] = nibble_to_hex_lower[addr.val[1] >> 4 & 0xf];
291298
default_ble_name[name_len - 3] = nibble_to_hex_lower[addr.val[1] & 0xf];
292299
default_ble_name[name_len - 2] = nibble_to_hex_lower[addr.val[0] >> 4 & 0xf];
293300
default_ble_name[name_len - 1] = nibble_to_hex_lower[addr.val[0] & 0xf];
301+
// default_ble_name[name_len] will be zero.
294302
self->name = mp_obj_new_str(default_ble_name, (uint8_t)name_len);
295303
}
304+
_adapter_set_name(self, self->name);
296305

297306
// Get version information.
298307
if (hci_read_local_version(&self->hci_version, &self->hci_revision, &self->lmp_version,
@@ -358,7 +367,6 @@ void common_hal_bleio_adapter_construct_hci_uart(bleio_adapter_obj_t *self, busi
358367

359368
common_hal_bleio_adapter_set_enabled(self, true);
360369
bleio_adapter_hci_init(self);
361-
common_hal_bleio_adapter_set_name(self, default_ble_name);
362370
}
363371

364372
void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled) {
@@ -426,9 +434,7 @@ mp_obj_str_t *common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self) {
426434

427435
void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char *name) {
428436
self->name = mp_obj_new_str(name, strlen(name));
429-
mp_buffer_info_t bufinfo;
430-
mp_get_buffer_raise(self->name, &bufinfo, MP_BUFFER_READ);
431-
bleio_characteristic_set_local_value(self->device_name_characteristic, &bufinfo);
437+
_adapter_set_name(self, self->name);
432438
}
433439

434440

lib/tlsf

Submodule tlsf updated 1 file

locale/ID.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,11 @@ msgstr ""
23082308
msgid "You pressed the BOOT button at start up"
23092309
msgstr ""
23102310

2311+
#: ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.h
2312+
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2313+
msgid "You pressed the BOOT button at start up."
2314+
msgstr ""
2315+
23112316
#: ports/espressif/boards/adafruit_huzzah32_breakout/mpconfigboard.h
23122317
msgid "You pressed the GPIO0 button at start up."
23132318
msgstr ""
@@ -2324,10 +2329,6 @@ msgstr ""
23242329
msgid "You pressed the VOLUME button at start up."
23252330
msgstr ""
23262331

2327-
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2328-
msgid "You pressed the boot button at start up."
2329-
msgstr ""
2330-
23312332
#: ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h
23322333
#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h
23332334
#: ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h

locale/circuitpython.pot

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,6 +2286,11 @@ msgstr ""
22862286
msgid "You pressed the BOOT button at start up"
22872287
msgstr ""
22882288

2289+
#: ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.h
2290+
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2291+
msgid "You pressed the BOOT button at start up."
2292+
msgstr ""
2293+
22892294
#: ports/espressif/boards/adafruit_huzzah32_breakout/mpconfigboard.h
22902295
msgid "You pressed the GPIO0 button at start up."
22912296
msgstr ""
@@ -2302,10 +2307,6 @@ msgstr ""
23022307
msgid "You pressed the VOLUME button at start up."
23032308
msgstr ""
23042309

2305-
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2306-
msgid "You pressed the boot button at start up."
2307-
msgstr ""
2308-
23092310
#: ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h
23102311
#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h
23112312
#: ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h

locale/cs.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,11 @@ msgstr "Při spuštění jsi stiskl tlačítko DOWN."
23172317
msgid "You pressed the BOOT button at start up"
23182318
msgstr "Při spuštění jsi stiskl tlačítko BOOT"
23192319

2320+
#: ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.h
2321+
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2322+
msgid "You pressed the BOOT button at start up."
2323+
msgstr ""
2324+
23202325
#: ports/espressif/boards/adafruit_huzzah32_breakout/mpconfigboard.h
23212326
msgid "You pressed the GPIO0 button at start up."
23222327
msgstr "Při spuštění jsi stiskl tlačítko na pinu GPIO0."
@@ -2333,10 +2338,6 @@ msgstr "Při spuštění jsi stiskl tlačítko SW38."
23332338
msgid "You pressed the VOLUME button at start up."
23342339
msgstr "Při spuštění jsi stiskl tlačítko VOLUME."
23352340

2336-
#: ports/espressif/boards/adafruit_itsybitsy_esp32/mpconfigboard.h
2337-
msgid "You pressed the boot button at start up."
2338-
msgstr ""
2339-
23402341
#: ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h
23412342
#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h
23422343
#: ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h

0 commit comments

Comments
 (0)