nrf5/modules/ubluepy: Adding template object typedefs for scanner and scan entry, and extern definition for scanner and scan_entry object type in modubluepy.h

This commit is contained in:
Glenn Ruben Bakke 2017-03-12 14:20:41 +01:00
parent 91652882a9
commit 11c40892ac
1 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,8 @@ extern const mp_obj_type_t ubluepy_uuid_type;
extern const mp_obj_type_t ubluepy_service_type;
extern const mp_obj_type_t ubluepy_characteristic_type;
extern const mp_obj_type_t ubluepy_peripheral_type;
extern const mp_obj_type_t ubluepy_scanner_type;
extern const mp_obj_type_t ubluepy_scan_entry_type;
typedef enum {
UBLUEPY_UUID_16_BIT = 1,
@ -143,6 +145,14 @@ typedef struct _ubluepy_advertise_data_t {
uint8_t num_of_services;
} ubluepy_advertise_data_t;
typedef struct _ubluepy_scanner_obj_t {
mp_obj_base_t base;
} ubluepy_scanner_obj_t;
typedef struct _ubluepy_scan_entry_obj_t {
mp_obj_base_t base;
} ubluepy_scan_entry_obj_t;
typedef enum _ubluepy_prop_t {
UBLUEPY_PROP_BROADCAST = 0x01,
UBLUEPY_PROP_READ = 0x02,