Go to the source code of this file.
|
| enum | update_fw_state_enum {
GET_RUN_PROGRAM_TYPE = 1
, JUMP_TO_BOOTLOADER
, CHECK_NEW_FW
, PRELOAD_INFO
,
LOAD_NEW_FW
, GET_BOOTLOADER_STATUS
, CALCULATE_CRC
, COMPLITE_CRC
,
GET_BOOTLOADER_INFO
, CHECK_NEW_BOOTLOADER
, LOAD_NEW_BOOTLOADER
, GET_UP_LOAD_ATRIBUTE
,
START_SYSTEM_UPDATE
, FINISH_SYSTEM_UPDATE
} |
| |
| enum | state_process_bootloader {
BOOTLOADER_IDLE =1
, PROCESSING_CLER
, DONE_CLEAR
, BOOTLOADER_PRELOAD_STATE
,
BOOTLOADER_CONTINUE_WRITE_FW
, BOOTLOADER_CHECK_INFO_FW
, PROCESSING_CULCULATE_CRC
, DONE_CALCULATE_CRC
} |
| |
| enum | update_fw_program_type_enum { BOOTLOADER = 1
, MAIN_PROGRAM
} |
| |
◆ BAD_COMPARE
◆ BAD_CRC_FIRMWARE
| #define BAD_CRC_FIRMWARE 0x1E |
◆ BEGIN_CALCULATE_CRC
| #define BEGIN_CALCULATE_CRC 0x01 |
◆ END_CALCULATE_CRC
| #define END_CALCULATE_CRC 0x00 |
◆ GOOD_COMPARE
| #define GOOD_COMPARE 0x01 |
◆ GOOD_CRC_FIRMWARE
| #define GOOD_CRC_FIRMWARE 0x2E |
◆ IN_BOOTLOADER_STATUS
| #define IN_BOOTLOADER_STATUS 0x02 |
◆ IN_MAIN_APP_STATUS
| #define IN_MAIN_APP_STATUS 0x01 |
◆ SIZE_BUFF_FOR_BOOT
| #define SIZE_BUFF_FOR_BOOT 1024 |
◆ SIZE_FW_INFO_STRUCT
| #define SIZE_FW_INFO_STRUCT 10 |
◆ state_process_bootloader
| Enumerator |
|---|
| BOOTLOADER_IDLE | |
| PROCESSING_CLER | |
| DONE_CLEAR | |
| BOOTLOADER_PRELOAD_STATE | |
| BOOTLOADER_CONTINUE_WRITE_FW | |
| BOOTLOADER_CHECK_INFO_FW | |
| PROCESSING_CULCULATE_CRC | |
| DONE_CALCULATE_CRC | |
◆ update_fw_program_type_enum
| Enumerator |
|---|
| BOOTLOADER | |
| MAIN_PROGRAM | |
◆ update_fw_state_enum
| Enumerator |
|---|
| GET_RUN_PROGRAM_TYPE | |
| JUMP_TO_BOOTLOADER | |
| CHECK_NEW_FW | |
| PRELOAD_INFO | |
| LOAD_NEW_FW | |
| GET_BOOTLOADER_STATUS | |
| CALCULATE_CRC | |
| COMPLITE_CRC | |
| GET_BOOTLOADER_INFO | |
| CHECK_NEW_BOOTLOADER | |
| LOAD_NEW_BOOTLOADER | |
| GET_UP_LOAD_ATRIBUTE | |
| START_SYSTEM_UPDATE | |
| FINISH_SYSTEM_UPDATE | |
◆ Compare_Data()
| uint8_t Compare_Data |
( |
void | | ) |
|
A function for verifying the firmware.
- Parameters
-
- Returns
- 1 - if the firmware is correct. 0 - in case of a firmware mismatch.
Available to call in any module.
◆ Init_Need_Struct_For_FW()
A function for initializing "Bootloader_struct", "FW_struct" and "Board_struct" from flash.
- Parameters
-
| base_boot | - a pointer to a structure containing information about the loader program itself. base_fw - a pointer to a structure containing information about the firmware received from the master device. base_board - a pointer to a structure containing information about the board itself, which is necessary for firmware verification. |
- Returns
- Nothing.
Available to call in any module.
◆ JumpToProgramCommand()
| void JumpToProgramCommand |
( |
uint32_t | address_to_jump | ) |
|
The function goes to the received address.
- Parameters
-
| address_to_jump | - The program's transition address. |
- Returns
- Nothing.
◆ Update_FW_Receive()
A function that determines which command has arrived and which state needs to be switched to.
- Parameters
-
| deviceInfo | - a pointer to a structure containing information about the device. protocol_str - a pointer to a structure for communication. receive_str - a structure containing information about the received data. |
- Returns
- Nothing.
The first byte of the received buffer is the status. Takes the value from "update_fw_state_enum". Available for calling in other libraries.