#include "serialPort.h"

Go to the source code of this file.
Classes | |
| struct | bootload_params_t |
Macros | |
| #define | BOOTLOADER_ERROR_LENGTH 512 |
| #define | BOOTLOADER_REFRESH_DELAY 500 |
| #define | BOOTLOADER_RESPONSE_DELAY 10 |
| #define | BOOTLOADER_RETRIES 30 |
| #define | ENABLE_BOOTLOADER_BAUD_DETECTION 1 |
| #define | IS_BAUD_RATE_BOOTLOADER 921600 |
| #define | IS_BAUD_RATE_BOOTLOADER_LEGACY 2000000 |
| #define | IS_BAUD_RATE_BOOTLOADER_RS232 230400 |
| #define | IS_BAUD_RATE_BOOTLOADER_SLOW 115200 |
Typedefs | |
| typedef int(* | pfnBootloadProgress) (const void *obj, float percent) |
| typedef void(* | pfnBootloadStatus) (const void *obj, const char *infoString) |
Functions | |
| int | bootloaderClosestBaudRate (int baudRate) |
| int | bootloaderCycleBaudRate (int baudRate) |
| int | bootloadFile (serial_port_t *port, const char *fileName, const char *bootName, const void *obj, pfnBootloadProgress uploadProgress, pfnBootloadProgress verifyProgress) |
| int | bootloadFileEx (bootload_params_t *params) |
| int | bootloadGetBootloaderVersionFromFile (const char *bootName, int *verMajor, char *verMinor) |
| int | bootloadUpdateBootloader (serial_port_t *port, const char *fileName, const void *obj, pfnBootloadProgress uploadProgress, pfnBootloadProgress verifyProgress) |
| int | bootloadUpdateBootloaderEx (bootload_params_t *p) |
| int | disableBootloader (serial_port_t *port, char *error, int errorLength) |
| int | enableBootloader (serial_port_t *port, int baudRate, char *error, int errorLength, const char *bootloadEnableCmd) |
| #define BOOTLOADER_ERROR_LENGTH 512 |
Definition at line 44 of file inertialSenseBootLoader.h.
| #define BOOTLOADER_REFRESH_DELAY 500 |
Definition at line 35 of file inertialSenseBootLoader.h.
| #define BOOTLOADER_RESPONSE_DELAY 10 |
Definition at line 36 of file inertialSenseBootLoader.h.
| #define BOOTLOADER_RETRIES 30 |
Definition at line 38 of file inertialSenseBootLoader.h.
| #define ENABLE_BOOTLOADER_BAUD_DETECTION 1 |
Definition at line 34 of file inertialSenseBootLoader.h.
| #define IS_BAUD_RATE_BOOTLOADER 921600 |
uINS bootloader baud rate
Definition at line 23 of file inertialSenseBootLoader.h.
| #define IS_BAUD_RATE_BOOTLOADER_LEGACY 2000000 |
uINS bootloader baud rate - legacy
Definition at line 32 of file inertialSenseBootLoader.h.
| #define IS_BAUD_RATE_BOOTLOADER_RS232 230400 |
uINS rs232 bootloader baud rate
Definition at line 26 of file inertialSenseBootLoader.h.
| #define IS_BAUD_RATE_BOOTLOADER_SLOW 115200 |
uINS slow bootloader baud rate
Definition at line 29 of file inertialSenseBootLoader.h.
| typedef int(* pfnBootloadProgress) (const void *obj, float percent) |
Bootloader callback function prototype, return 1 to stay running, return 0 to cancel
Definition at line 48 of file inertialSenseBootLoader.h.
| typedef void(* pfnBootloadStatus) (const void *obj, const char *infoString) |
Bootloader information string function prototype.
Definition at line 51 of file inertialSenseBootLoader.h.
| int bootloaderClosestBaudRate | ( | int | baudRate | ) |
Definition at line 221 of file inertialSenseBootLoader.c.
| int bootloaderCycleBaudRate | ( | int | baudRate | ) |
Definition at line 203 of file inertialSenseBootLoader.c.
| int bootloadFile | ( | serial_port_t * | port, |
| const char * | fileName, | ||
| const char * | bootName, | ||
| const void * | obj, | ||
| pfnBootloadProgress | uploadProgress, | ||
| pfnBootloadProgress | verifyProgress | ||
| ) |
Boot load a .hex or .bin file to a device
| port | the serial port to bootload to, will be opened and closed, must have port set |
| error | a buffer to store any error messages in - can be NULL |
| errorLength | the number of bytes available in error |
| obj | custom user object that will be passed in the callback |
| uploadProgress | called periodically during firmware upload - can be NULL |
| verifyProgress | called periodically during firmware verification - can be NULL |
Definition at line 1489 of file inertialSenseBootLoader.c.
| int bootloadFileEx | ( | bootload_params_t * | params | ) |
Definition at line 1508 of file inertialSenseBootLoader.c.
| int bootloadGetBootloaderVersionFromFile | ( | const char * | bootName, |
| int * | verMajor, | ||
| char * | verMinor | ||
| ) |
Retrieve the bootloader version from .bin file
| fileName | for the new bootloader .bin file |
| pointer | to int to store major version |
| pointer | to char to store minor version |
Definition at line 1594 of file inertialSenseBootLoader.c.
| int bootloadUpdateBootloader | ( | serial_port_t * | port, |
| const char * | fileName, | ||
| const void * | obj, | ||
| pfnBootloadProgress | uploadProgress, | ||
| pfnBootloadProgress | verifyProgress | ||
| ) |
Boot load a new bootloader .bin file to device. Device must be in application or bootloader assist mode, not bootloader mode.
| port | the serial port, must be initialized and have the port set |
| fileName | the new bootloader .bin file |
| error | a buffer to store any error messages in - can be NULL |
| errorLength | the number of bytes available in error |
| obj | custom user object that will be passed in the callback |
| uploadProgress | called periodically during firmware upload - can be NULL |
| verifyProgress | called periodically during firmware verification - can be NULL 0 if failure, non-zero if success |
Definition at line 1631 of file inertialSenseBootLoader.c.
| int bootloadUpdateBootloaderEx | ( | bootload_params_t * | p | ) |
Definition at line 1787 of file inertialSenseBootLoader.c.
| int disableBootloader | ( | serial_port_t * | port, |
| char * | error, | ||
| int | errorLength | ||
| ) |
Disables the bootloader and goes back to program mode
the port to go back to program mode on a buffer to store any error messages - can be NULL the number of bytes available in error
Definition at line 1930 of file inertialSenseBootLoader.c.
| int enableBootloader | ( | serial_port_t * | port, |
| int | baudRate, | ||
| char * | error, | ||
| int | errorLength, | ||
| const char * | bootloadEnableCmd | ||
| ) |
Enable bootloader mode for a device
| port | the port to enable the bootloader on |
| baudRate | the baud rate to communicate with, IS_BAUD_RATE_BOOTLOADER or IS_BAUD_RATE_BOOTLOADER_RS232 |
| error | a buffer to store any error messages - can be NULL |
| errorLength | the number of bytes available in error |
Definition at line 1844 of file inertialSenseBootLoader.c.