summaryrefslogtreecommitdiff
path: root/extmod/modbluetooth.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-03-10 11:45:03 +1100
committerDamien George <damien.p.george@gmail.com>2020-03-11 14:00:44 +1100
commitdd0bc26e65734b8a4fafa3769008e92e2ec6645d (patch)
tree9312f74c625e65ddf6c44e5a5e9264ee667190e5 /extmod/modbluetooth.h
parentbd746a46309efc261d6124b546b5bf6775d47460 (diff)
extmod/modbluetooth: Change scan result's "connectable" to "adv_type".
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
Diffstat (limited to 'extmod/modbluetooth.h')
-rw-r--r--extmod/modbluetooth.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modbluetooth.h b/extmod/modbluetooth.h
index bead2387d..2055b979b 100644
--- a/extmod/modbluetooth.h
+++ b/extmod/modbluetooth.h
@@ -248,7 +248,7 @@ bool mp_bluetooth_gatts_on_read_request(uint16_t conn_handle, uint16_t value_han
void mp_bluetooth_gap_on_scan_complete(void);
// Notify modbluetooth of a scan result.
-void mp_bluetooth_gap_on_scan_result(uint8_t addr_type, const uint8_t *addr, bool connectable, const int8_t rssi, const uint8_t *data, size_t data_len);
+void mp_bluetooth_gap_on_scan_result(uint8_t addr_type, const uint8_t *addr, uint8_t adv_type, const int8_t rssi, const uint8_t *data, size_t data_len);
// Notify modbluetooth that a service was found (either by discover-all, or discover-by-uuid).
void mp_bluetooth_gattc_on_primary_service_result(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, mp_obj_bluetooth_uuid_t *service_uuid);