SmartSnippets DA1459x SDK
dlg_suota.h
Go to the documentation of this file.
1 
43 #ifndef DLG_SUOTA_H_
44 #define DLG_SUOTA_H_
45 
46 #include <stdint.h>
47 #include "ble_service.h"
48 
52 typedef enum {
53  SUOTA_ACTIVE_IMG_FIRST,
54  SUOTA_ACTIVE_IMG_SECOND,
55  SUOTA_ACTIVE_IMG_ERROR,
57 
62 typedef enum {
63  SUOTA_START = 1 << 0,
64  SUOTA_ONGOING = 1 << 1,
65  SUOTA_DONE = 1 << 2,
66  SUOTA_ERROR = 1 << 3,
68 
69 typedef void (* suota_status_cb_t) (uint16_t conn_idx, uint8_t status, uint8_t error_code);
70 typedef bool (* suota_ready_cb_t ) (uint16_t conn_idx);
71 
75 typedef struct {
76  suota_ready_cb_t suota_ready;
77  suota_status_cb_t suota_status;
79 
87 
95 
106 uint32_t suota_update_crc(uint32_t crc, const uint8_t *data, size_t len);
107 
118 void suota_l2cap_event(ble_service_t *svc, const ble_evt_hdr_t *event);
119 
120 #endif /* DLG_SUOTA_H_ */
121 
suota_l2cap_event
void suota_l2cap_event(ble_service_t *svc, const ble_evt_hdr_t *event)
suota_get_active_img
suota_active_img_t suota_get_active_img(ble_service_t *svc)
suota_callbacks_t
Definition: dlg_suota.h:75
suota_update_crc
uint32_t suota_update_crc(uint32_t crc, const uint8_t *data, size_t len)
ble_service.h
Services handling routines API.
ble_evt_hdr_t
Definition: ble_common.h:156
suota_init
ble_service_t * suota_init(const suota_callbacks_t *cb)
suota_active_img_t
suota_active_img_t
Definition: dlg_suota.h:52
suota_app_status_t
suota_app_status_t
Definition: dlg_suota.h:62
ble_service
Definition: ble_service.h:132