SmartSnippets DA1459x SDK
dis_client.h
Go to the documentation of this file.
1 
43 #ifndef DIS_CLIENT_H
44 #define DIS_CLIENT_H
45 
46 #include "sdk_defs.h"
47 
51 typedef enum {
71 
75 typedef __PACKED_STRUCT {
76  uint8_t manufacturer[5];
77  uint8_t oui[3];
78 } dis_client_system_id_t;
79 
83 typedef __PACKED_STRUCT {
84  uint8_t vid_source;
85  uint16_t vid;
86  uint16_t pid;
87  uint16_t version;
88 } dis_client_pnp_id_t;
89 
90 typedef void (* dis_client_read_completed_cb_t) (ble_client_t *dis_client, att_error_t status,
91  dis_client_cap_t capability,
92  uint16_t length, const uint8_t *value);
93 
97 typedef struct {
99  dis_client_read_completed_cb_t read_completed;
101 
114  const ble_evt_gattc_browse_svc_t *evt);
125 
137 bool dis_client_read(ble_client_t *dis_client, dis_client_cap_t capability);
138 
153  const void *data, size_t length);
154 
155 #endif /* DIS_CLIENT_H */
156 
ble_evt_gattc_browse_svc_t
Definition: ble_gattc.h:118
dis_client_callbacks_t
Definition: dis_client.h:97
dis_client_init
ble_client_t * dis_client_init(const dis_client_callbacks_t *cb, const ble_evt_gattc_browse_svc_t *evt)
Register DIS Client instance.
dis_client_init_from_data
ble_client_t * dis_client_init_from_data(uint16_t conn_idx, const dis_client_callbacks_t *cb, const void *data, size_t length)
Initialize and register DIS Client instance from data buffer.
sdk_defs.h
Central include header file with platform definitions.
DIS_CLIENT_CAP_MANUFACTURER_NAME
Definition: dis_client.h:53
att_error_t
att_error_t
Definition: ble_att.h:64
DIS_CLIENT_CAP_HARDWARE_REVISION
Definition: dis_client.h:59
DIS_CLIENT_CAP_REG_CERT
Definition: dis_client.h:67
dis_client_read
bool dis_client_read(ble_client_t *dis_client, dis_client_cap_t capability)
Read DIS capability (supported characteristic)
DIS_CLIENT_CAP_SERIAL_NUMBER
Definition: dis_client.h:57
DIS_CLIENT_CAP_FIRMWARE_REVISION
Definition: dis_client.h:61
DIS_CLIENT_CAP_MODEL_NUMBER
Definition: dis_client.h:55
ble_client
Definition: ble_client.h:154
DIS_CLIENT_CAP_PNP_ID
Definition: dis_client.h:69
DIS_CLIENT_CAP_SOFTWARE_REVISION
Definition: dis_client.h:63
__PACKED_STRUCT
typedef __PACKED_STRUCT
Definition: dis_client.h:75
dis_client_cap_t
dis_client_cap_t
Definition: dis_client.h:51
DIS_CLIENT_CAP_SYSTEM_ID
Definition: dis_client.h:65
dis_client_get_capabilities
dis_client_cap_t dis_client_get_capabilities(ble_client_t *dis_client)
Get DIS capabilities.