SmartSnippets DA1459x SDK
Files | Data Structures | Enumerations | Functions

SUOTA service implementation API. More...

Files

file  dlg_suota.h
 Dialog SUOTA service implementation API.
 

Data Structures

struct  suota_callbacks_t
 

Enumerations

enum  suota_active_img_t
 
enum  suota_app_status_t
 

Functions

ble_service_tsuota_init (const suota_callbacks_t *cb)
 
suota_active_img_t suota_get_active_img (ble_service_t *svc)
 
uint32_t suota_update_crc (uint32_t crc, const uint8_t *data, size_t len)
 
void suota_l2cap_event (ble_service_t *svc, const ble_evt_hdr_t *event)
 

Detailed Description

SUOTA service implementation API.

Enumeration Type Documentation

◆ suota_active_img_t

SUOTA active image enum

◆ suota_app_status_t

SUOTA application status

Function Documentation

◆ suota_get_active_img()

suota_active_img_t suota_get_active_img ( ble_service_t svc)

Get SUOTA active image

Returns
SUOTA active image

◆ suota_init()

ble_service_t* suota_init ( const suota_callbacks_t cb)

Register SUOTA Service instance

Returns
service instance

◆ suota_l2cap_event()

void suota_l2cap_event ( ble_service_t svc,
const ble_evt_hdr_t event 
)

Handle L2CAP event

This should be called in application main loop to handle L2CAP events. Application does not need to care which events are passed to this function as it only handles events related to SUOTA service and channel.

Note
This is only applicable with SUOTA 1.2 and L2CAP CoC support enabled

◆ suota_update_crc()

uint32_t suota_update_crc ( uint32_t  crc,
const uint8_t *  data,
size_t  len 
)

Update CRC

param [in] crc current value of CRC param [in] data pointer to data to compute CRC over param [in] len number of bytes pointed by data

Returns
new value of CRC