Skip to content

Commit 5643355

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into simplify_status_led
2 parents 499a438 + 74355e8 commit 5643355

File tree

102 files changed

+1669
-767
lines changed

Some content is hidden

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

102 files changed

+1669
-767
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ jobs:
176176
- "TG-Watch"
177177
- "adafruit_feather_rp2040"
178178
- "adafruit_itsybitsy_rp2040"
179+
- "adafruit_macropad_rp2040"
179180
- "adafruit_neokey_trinkey_m0"
180181
- "adafruit_proxlight_trinkey_m0"
181182
- "adafruit_qt2040_trinkey"

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ STATIC void check_data_fit(size_t data_len, bool connectable) {
645645
// return true;
646646
// }
647647

648-
uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len) {
648+
uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len, mp_int_t tx_power) {
649649
check_enabled(self);
650650

651651
if (self->now_advertising) {
@@ -769,7 +769,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
769769
return 0;
770770
}
771771

772-
void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) {
772+
void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo, mp_int_t tx_power) {
773773
check_enabled(self);
774774

775775
// interval value has already been validated.
@@ -793,12 +793,17 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool
793793
}
794794
}
795795

796+
if (tx_power != 0) {
797+
mp_raise_NotImplementedError(translate("Only tx_power=0 supported"));
798+
}
799+
796800
const uint32_t result = _common_hal_bleio_adapter_start_advertising(
797801
self, connectable, anonymous, timeout, interval,
798802
advertising_data_bufinfo->buf,
799803
advertising_data_bufinfo->len,
800804
scan_response_data_bufinfo->buf,
801-
scan_response_data_bufinfo->len);
805+
scan_response_data_bufinfo->len,
806+
tx_power);
802807

803808
if (result) {
804809
mp_raise_bleio_BluetoothError(translate("Already advertising"));

docs/design_guide.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,32 @@ To add different types outside CircuitPython you need to include them in the int
332332
The intersphinx_mapping above includes references to Python, BusDevice and CircuitPython
333333
Documentation
334334

335+
When the parameter have two different types, you should reference them as follows::
336+
337+
338+
class Character_LCD:
339+
"""Base class for character LCD
340+
341+
:param ~digitalio.DigitalInOut rs: The reset data line
342+
:param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode
343+
344+
"""
345+
346+
def __init__(self, rs, blue):
347+
self._rc = rs
348+
self.blue = blue
349+
350+
351+
Renders as:
352+
353+
.. py:class:: Character_LCD(rs, blue)
354+
:noindex:
355+
356+
Base class for character LCD
357+
358+
:param ~digitalio.DigitalInOut rs: The reset data line
359+
:param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode
360+
335361

336362
param_name
337363
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

frozen/Adafruit_CircuitPython_BLE

0 commit comments

Comments
 (0)