| Documentation |
|---|
| Related products |
|---|
| USB-I2C/SPI/GPIO Adapter - U2C-12 |
| USB-IO Interface Adapter - GPIO-12 |
To ease software development, all bootloader responses are described as structures.
As interface between PC and Bootloader supports only packages of fixed size, all structures are boot_rsp union members:
typedef union
{
/*
* data field is used to make all responses the same length
*/
unsigned char data[BOOT_RSP_SIZE];
boot_rsp_header header;
boot_rsp_read_flash read_flash;
boot_rsp_write_flash write_flash;
boot_rsp_erase_flash erase_flash;
boot_rsp_fw_ver get_fw_ver;
boot_rsp_read_id read_id;
boot_rsp_write_id write_id;
boot_rsp_read_eeprom read_eeprom;
boot_rsp_write_eeprom write_eeprom;
} boot_rsp;
Fields assignment:
Data field is used to make the
size of all packages equal to BOOT_RSP_SIZE
bytes.
Header field is used to access
common for all packages parameters -
cmd and echo.
These parameters are also available from the structures that
define specific responses.