nrf5/modules: Adding new object struct for delegate class and adding a delegate struct member to Peripheral class to bookeep callback object when event occurs.

This commit is contained in:
Glenn Ruben Bakke 2017-02-15 00:17:04 +01:00
parent 881e90f7b5
commit 8b21ee762e
1 changed files with 11 additions and 1 deletions

View File

@ -86,12 +86,22 @@ typedef struct _ubluepy_characteristic_obj_t {
uint16_t sccd_handle;
} ubluepy_characteristic_obj_t;
typedef struct _ubluepy_delegate_obj_t {
mp_obj_base_t base;
} ubluepy_delegate_obj_t;
typedef struct _ubluepy_peripheral_obj_t {
mp_obj_base_t base;
mp_obj_t delegate;
} ubluepy_peripheral_obj_t;
typedef struct _ubluepy_advertise_data_t {
uint8_t * p_device_name;
uint8_t device_name_len;
mp_obj_t * p_services;
uint8_t num_of_services;
} ubluepy_advertise_data_t;
#endif // UBLUEPY_H__