Ota#
- group drv_ota
Firmware update library either over the air (OTA) or via Bootloader.
- Author
Alexandre Abadie alexandre.abadie@inria.fr
- Copyright
Inria, 2023
Typedefs
-
typedef void (*db_ota_reply_t)(const uint8_t*, size_t)#
Transport agnostic function used to reply to the flasher script.
Firmware update mode
Enums
-
enum db_ota_mode_t#
Values:
-
enumerator DB_OTA_MODE_DEFAULT#
Default mode: OTA.
-
enumerator DB_OTA_MODE_BOOTLOADER#
Bootloader mode.
-
enumerator DB_OTA_MODE_DEFAULT#
Functions
-
void db_ota_init(const db_ota_conf_t *config)#
Initialize the OTA firmware update.
- Parameters:
config – [in] Pointer to the OTA configuration
-
void db_ota_start(void)#
Start the OTA process.
-
void db_ota_finish(void)#
Finalize the OTA process: switch the active partition and reboot.
-
void db_ota_write_chunk(const db_ota_pkt_t *pkt)#
Write a chunk of the firmware on the inactive partition.
- Parameters:
pkt – [in] Pointer the OTA packet
-
void db_ota_handle_message(const uint8_t *message)#
Handle received OTA message.
- Parameters:
message – [in] The message to handle
-
struct db_ota_conf_t#
Public Members
-
db_ota_reply_t reply#
Pointer to the function used to reply to the flasher script.
-
db_ota_mode_t mode#
Firmware update mode.
-
db_ota_reply_t reply#
-
struct db_ota_pkt_t#
Public Members
-
uint32_t index#
Index of the chunk.
-
uint32_t chunk_count#
Total number of chunks.
-
uint8_t fw_chunk[DB_OTA_CHUNK_SIZE]#
Bytes array of the firmware chunk.
-
uint32_t index#
-
struct db_ota_message_info_t#