Data Structures | |
struct | app_info_t |
struct | app_table_tag |
struct | BootInfo_t |
struct | ExistingImageInfo_t |
struct | featureBits_t |
union | featureMask_t |
struct | otauCurrentImage_t |
struct | otauImageNotifyRequest_t |
struct | otauImageRequest_t |
struct | otauImageResponse_t |
struct | otauQueryImageRequest_t |
struct | otauSwitchImageRequest_t |
struct | otauSwitchImageResponse_t |
Macros | |
#define | APP_INFO_START_ADDRESS (0x0003FF00ul) |
#define | APP_START_ADDRESS (0x00002000ul) |
#define | IMAGE_REQ_RETRY_COUNT (10) |
#define | IMAGE_RESP_WAIT_INTERVAL_MILLI_SEC (10000) |
#define | MIN_IMAGE_REQ_INTERVAL_MILLI_SEC (100) |
#define | SWITCH_INTERVAL_MILLI_SEC (1000) |
#define | SWITCH_REQ_INTERVAL_MILLI_SEC (3000) |
#define | TYPE_EXTERNAL 0x01 |
#define | TYPE_INTERNAL 0x00 |
#define | UPGRADE_OFFSET_ADDRESS (0x00020000ul) |
Typedefs | |
typedef struct app_table_tag | app_table_t |
Enumerations | |
enum | otauUpgradeMsgCode_t { OTA_SERVER_DISCOVERY = 0, OTA_SERVER_NOTIFY, OTA_QUERY_IMAGE, OTA_IMAGE_NOTIFY, OTA_IMAGE_REQUEST, OTA_IMAGE_RESPONSE, OTA_SWITCH_REQUEST, OTA_SWITCH_RESPONSE } |
Functions | |
void | otauHandleUpgradeMsg (otau_domain_msg_t *otau_domain_msg) |
void | otauUpgradeInit (void) |
void | otauUpgradeRcvdFrame (addr_mode_t addr_mode, uint8_t *src_addr, uint16_t length, uint8_t *payload) |
void | otauUpgradeSentFrame (uint8_t messageId, addr_mode_t addr_mode, uint8_t *addr, uint8_t status) |
void | otauUpgradeTimerHandler (SYS_Timer_t *timer) |
#define APP_INFO_START_ADDRESS (0x0003FF00ul) |
Referenced by otauUpgradeTimerHandler().
#define APP_START_ADDRESS (0x00002000ul) |
Referenced by otauUpgradeTimerHandler().
#define IMAGE_REQ_RETRY_COUNT (10) |
Referenced by send_image_req().
#define IMAGE_RESP_WAIT_INTERVAL_MILLI_SEC (10000) |
Referenced by send_image_req().
#define MIN_IMAGE_REQ_INTERVAL_MILLI_SEC (100) |
Referenced by otauUpgradeInit(), and otauUpgradeRcvdFrame().
#define SWITCH_INTERVAL_MILLI_SEC (1000) |
Referenced by otauUpgradeRcvdFrame().
#define SWITCH_REQ_INTERVAL_MILLI_SEC (3000) |
Referenced by otauUpgradeSentFrame().
#define TYPE_EXTERNAL 0x01 |
Referenced by otauUpgradeTimerHandler().
#define TYPE_INTERNAL 0x00 |
Referenced by otauUpgradeTimerHandler().
#define UPGRADE_OFFSET_ADDRESS (0x00020000ul) |
Referenced by otauUpgradeRcvdFrame(), and otauUpgradeTimerHandler().
typedef struct app_table_tag app_table_t |
enum otauUpgradeMsgCode_t |
void otauHandleUpgradeMsg | ( | otau_domain_msg_t * | otau_domain_msg | ) |
Referenced by otauHandleMsg().
void otauUpgradeInit | ( | void | ) |
References curr_upgrade_mode, currOtauUpgradeState, currUpgradeState, imageReqRetry, MIN_IMAGE_REQ_INTERVAL_MILLI_SEC, otauUpgradeConfirmWait, STATE_IDLE, UPGRADE_OTAU_IDLE, and upgradeImageReqInterval.
Referenced by otauInit(), and send_image_req().
void otauUpgradeRcvdFrame | ( | addr_mode_t | addr_mode, |
uint8_t * | src_addr, | ||
uint16_t | length, | ||
uint8_t * | payload | ||
) |
References APP_MAX_PAYLOAD_SIZE, at25dfx_chip_read_buffer(), at25dfx_chip_write_buffer(), block, otauImageResponse_t::block, block_size, otauImageResponse_t::blockAddr, otauImageResponse_t::blockSize, curr_upgrade_mode, currUpgradeState, DOMAIN_OTAU_UPGRADE, EXTENDED_ADDR_MODE, image_crc, image_end, image_index, image_size, otauImageNotifyRequest_t::imageCrc, imageReqRetry, otauImageNotifyRequest_t::imageSize, otauImageNotifyRequest_t::imageStart, MIN_IMAGE_REQ_INTERVAL_MILLI_SEC, NATIVE_ADDR_MODE, OTA_IMAGE_NOTIFY, OTA_IMAGE_RESPONSE, OTA_SWITCH_RESPONSE, otauSetServerDetails(), otauTimerStart(), otauTimerStop(), PHY_MAX_PAYLOAD_SIZE, otauImageNotifyRequest_t::reqInterval, send_switch_req(), STATE_IDLE, STATE_IMAGE_REQUESTED, STATE_START_DOWNLOAD, STATE_SWITCH_SUCCESS, STATE_WAITING_FOR_SWITCH, SWITCH_INTERVAL_MILLI_SEC, otauSwitchImageResponse_t::switchTime, TIMER_MODE_SINGLE, UPGRADE_OFFSET_ADDRESS, upgradeImageReqInterval, and upgradeImageStart.
Referenced by otauRcvdFrame().
void otauUpgradeSentFrame | ( | uint8_t | messageId, |
addr_mode_t | addr_mode, | ||
uint8_t * | addr, | ||
uint8_t | status | ||
) |
void otauUpgradeTimerHandler | ( | SYS_Timer_t * | timer | ) |
References ExistingImageInfo_t::active, app_info_t::app_cnt, APP_INFO_START_ADDRESS, app_table_tag::app_name, app_table_tag::app_start_addr, APP_START_ADDRESS, app_info_t::appTable, app_table_tag::bootInfo, calcCrc(), app_info_t::crc, currUpgradeState, app_info_t::default_app, delay_ms, app_table_tag::dest_addr, BootInfo_t::dest_memtype, DOMAIN_OTAU_UPGRADE, app_table_tag::existingImageInfo, image_index, image_size, app_table_tag::img_size, BootInfo_t::img_type, featureMask_t::mask, ExistingImageInfo_t::memtype, otauResetDevice(), otauTimerStart(), otauTimerStop(), otauUpgradeConfirmWait, app_info_t::required_features, send_image_req(), send_switch_req(), app_table_tag::skip_pds_end, app_table_tag::skip_pds_start, app_table_tag::src_addr, BootInfo_t::src_memtype, STATE_IMAGE_REQUESTED, STATE_IMAGE_RESPONDED, STATE_START_DOWNLOAD, STATE_SWITCH_SUCCESS, STATE_WAITING_FOR_SWITCH, TIMER_MODE_SINGLE, TYPE_EXTERNAL, TYPE_INTERNAL, BootInfo_t::update_action, UPGRADE_OFFSET_ADDRESS, and upgradeImageReqInterval.
Referenced by otauTimerStart().