summaryrefslogtreecommitdiff
path: root/shared-module/bleio/AdvertisementData.h
diff options
context:
space:
mode:
authorarturo182 <arturo182@tlen.pl>2018-07-19 20:33:24 +0200
committerarturo182 <arturo182@tlen.pl>2018-10-21 15:50:45 +0200
commit3bd65fbae5d0150139c0ffd4cf02f8c9f547bbf5 (patch)
tree755b3ad140647d5f3dc6f9ec64c8cfa7e150f8ee /shared-module/bleio/AdvertisementData.h
parentbda734223e75382be048d47fa9331afd7e9cfdce (diff)
nrf: Move the Peripheral class to bleio as Device
This was the last class from ubluepy and so that module is now gone. The Device class offers both Peripheral and Central functionality. See the inline docs for more info.
Diffstat (limited to 'shared-module/bleio/AdvertisementData.h')
-rw-r--r--shared-module/bleio/AdvertisementData.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared-module/bleio/AdvertisementData.h b/shared-module/bleio/AdvertisementData.h
index 2a9addf57..738d53b23 100644
--- a/shared-module/bleio/AdvertisementData.h
+++ b/shared-module/bleio/AdvertisementData.h
@@ -27,6 +27,8 @@
#ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_ADVERTISEMENTDATA_H
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_ADVERTISEMENTDATA_H
+#include "py/obj.h"
+
// Taken from https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile
enum {
AdFlags = 0x01,
@@ -73,4 +75,11 @@ enum {
AdManufacturerSpecificData = 0xFF,
};
+typedef struct {
+ mp_obj_t device_name;
+ mp_obj_t services;
+ mp_obj_t data;
+ bool connectable;
+} bleio_advertisement_data_t;
+
#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_ADVERTISEMENTDATA_H