USB PIC Bootloader. User Manual


7.3.5. BOOT_GET_FW_VER command

BOOT_GET_FW_VER command is used to determine Bootloader version.

Before you send this command you have to fill in boot_cmd_get_fw_ver structure:

typedef struct
{
   unsigned char cmd;  /* command code, see BOOT_xxx constants */
   unsigned char echo;  /* echo is used to link between command and response */
} boot_cmd_get_fw_ver;

Fields assignment:

cmd

Command code; the given field must be initialized by BOOT_GET_FW_VER constant value.

echo

Package ID. Its value is selected arbitrarily before the command is sent. In the simplest case it is a counter value, increased by one while sending every new command. Bootloader does not analyze this field value. It simply copies it into response. Therefore, when response received, PC program can connect this response to previously sent command.

After this command is processed, Bootloader sends response with code BOOT_GET_FW_VER.