Over-the-air Application Functions

[English]

APP_OTA API Brief

Application

Brief

app_ota_init()

OTA service initialization

app_ota_notify_slave_result_handle()

master handle slave OTA result

app_ota_is_running()

check OTA service status

APP_OTA API Reference

Header File

Functions

void app_ota_init(void)

OTA service initialization.

initile OTA relatived setting and hook up bluetooth service

返回:

N/A

void app_ota_notify_slave_result_handle(const uint8_t *p_data, uint16_t length)

master handle slave OTA result

master handle OTA result send from slave, used to confirm the upgrade process and result

参数:
返回:

N/A

bool app_ota_is_running(void)

check OTA service status

check OTA service connect or disconnet 

返回值:
  • TRUE – connect

  • FALSE – disconnet

返回:

result

Structures

struct ota_notify_result_t

slave OTA notify result struct definition

Public Members

uint16_t cmd_code

slave OTA notfiy result cmd index

uint8_t ready_seq

slave OTA write flash index

uint8_t type

slave OTA notify type, 0:OTA_TYPE_CHECKSUM 1:OTA_TYPE_FINAL_RESULT

uint8_t result

slave OTA notify result

Macros

OTA_TYPE_CHECKSUM

slave OTA notify for notify master checksum

OTA_TYPE_FINAL_RESULT

slave OTA notify for notify master final result