nrf5/drivers/bluetooth: Adding role member to peripheral object to indicate whether Peripheral object is Peripheral or Central role.
This commit is contained in:
parent
78c0821216
commit
f8c0ff6413
|
@ -101,6 +101,11 @@ typedef enum {
|
||||||
#endif
|
#endif
|
||||||
} ubluepy_addr_type_t;
|
} ubluepy_addr_type_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
UBLUEPY_ROLE_PERIPHERAL,
|
||||||
|
UBLUEPY_ROLE_CENTRAL
|
||||||
|
} ubluepy_role_type_t;
|
||||||
|
|
||||||
typedef struct _ubluepy_uuid_obj_t {
|
typedef struct _ubluepy_uuid_obj_t {
|
||||||
mp_obj_base_t base;
|
mp_obj_base_t base;
|
||||||
ubluepy_uuid_type_t type;
|
ubluepy_uuid_type_t type;
|
||||||
|
@ -109,12 +114,13 @@ typedef struct _ubluepy_uuid_obj_t {
|
||||||
} ubluepy_uuid_obj_t;
|
} ubluepy_uuid_obj_t;
|
||||||
|
|
||||||
typedef struct _ubluepy_peripheral_obj_t {
|
typedef struct _ubluepy_peripheral_obj_t {
|
||||||
mp_obj_base_t base;
|
mp_obj_base_t base;
|
||||||
uint16_t conn_handle;
|
ubluepy_role_type_t role;
|
||||||
mp_obj_t delegate;
|
uint16_t conn_handle;
|
||||||
mp_obj_t notif_handler;
|
mp_obj_t delegate;
|
||||||
mp_obj_t conn_handler;
|
mp_obj_t notif_handler;
|
||||||
mp_obj_t service_list;
|
mp_obj_t conn_handler;
|
||||||
|
mp_obj_t service_list;
|
||||||
} ubluepy_peripheral_obj_t;
|
} ubluepy_peripheral_obj_t;
|
||||||
|
|
||||||
typedef struct _ubluepy_service_obj_t {
|
typedef struct _ubluepy_service_obj_t {
|
||||||
|
|
Loading…
Reference in New Issue