nrf5/drivers/bluetooth: Adding role member to peripheral object to indicate whether Peripheral object is Peripheral or Central role.

This commit is contained in:
Glenn Ruben Bakke 2017-05-14 18:28:49 +02:00 committed by glennrub
parent 78c0821216
commit f8c0ff6413
1 changed files with 12 additions and 6 deletions

View File

@ -101,6 +101,11 @@ typedef enum {
#endif
} ubluepy_addr_type_t;
typedef enum {
UBLUEPY_ROLE_PERIPHERAL,
UBLUEPY_ROLE_CENTRAL
} ubluepy_role_type_t;
typedef struct _ubluepy_uuid_obj_t {
mp_obj_base_t base;
ubluepy_uuid_type_t type;
@ -110,6 +115,7 @@ typedef struct _ubluepy_uuid_obj_t {
typedef struct _ubluepy_peripheral_obj_t {
mp_obj_base_t base;
ubluepy_role_type_t role;
uint16_t conn_handle;
mp_obj_t delegate;
mp_obj_t notif_handler;