Classes | Macros | Typedefs | Functions
inertialSenseBootLoader.h File Reference
#include "serialPort.h"
Include dependency graph for inertialSenseBootLoader.h:
This graph shows which files directly or indirectly include this file:

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)
 

Macro Definition Documentation

◆ BOOTLOADER_ERROR_LENGTH

#define BOOTLOADER_ERROR_LENGTH   512

Definition at line 44 of file inertialSenseBootLoader.h.

◆ BOOTLOADER_REFRESH_DELAY

#define BOOTLOADER_REFRESH_DELAY   500

Definition at line 35 of file inertialSenseBootLoader.h.

◆ BOOTLOADER_RESPONSE_DELAY

#define BOOTLOADER_RESPONSE_DELAY   10

Definition at line 36 of file inertialSenseBootLoader.h.

◆ BOOTLOADER_RETRIES

#define BOOTLOADER_RETRIES   30

Definition at line 38 of file inertialSenseBootLoader.h.

◆ ENABLE_BOOTLOADER_BAUD_DETECTION

#define ENABLE_BOOTLOADER_BAUD_DETECTION   1

Definition at line 34 of file inertialSenseBootLoader.h.

◆ IS_BAUD_RATE_BOOTLOADER

#define IS_BAUD_RATE_BOOTLOADER   921600

uINS bootloader baud rate

Definition at line 23 of file inertialSenseBootLoader.h.

◆ IS_BAUD_RATE_BOOTLOADER_LEGACY

#define IS_BAUD_RATE_BOOTLOADER_LEGACY   2000000

uINS bootloader baud rate - legacy

Definition at line 32 of file inertialSenseBootLoader.h.

◆ IS_BAUD_RATE_BOOTLOADER_RS232

#define IS_BAUD_RATE_BOOTLOADER_RS232   230400

uINS rs232 bootloader baud rate

Definition at line 26 of file inertialSenseBootLoader.h.

◆ IS_BAUD_RATE_BOOTLOADER_SLOW

#define IS_BAUD_RATE_BOOTLOADER_SLOW   115200

uINS slow bootloader baud rate

Definition at line 29 of file inertialSenseBootLoader.h.

Typedef Documentation

◆ pfnBootloadProgress

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.

◆ pfnBootloadStatus

typedef void(* pfnBootloadStatus) (const void *obj, const char *infoString)

Bootloader information string function prototype.

Definition at line 51 of file inertialSenseBootLoader.h.

Function Documentation

◆ bootloaderClosestBaudRate()

int bootloaderClosestBaudRate ( int  baudRate)

Definition at line 221 of file inertialSenseBootLoader.c.

◆ bootloaderCycleBaudRate()

int bootloaderCycleBaudRate ( int  baudRate)

Definition at line 203 of file inertialSenseBootLoader.c.

◆ bootloadFile()

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

Parameters
portthe serial port to bootload to, will be opened and closed, must have port set
errora buffer to store any error messages in - can be NULL
errorLengththe number of bytes available in error
objcustom user object that will be passed in the callback
uploadProgresscalled periodically during firmware upload - can be NULL
verifyProgresscalled periodically during firmware verification - can be NULL
Returns
0 if failure, non-zero if success

Definition at line 1489 of file inertialSenseBootLoader.c.

◆ bootloadFileEx()

int bootloadFileEx ( bootload_params_t params)

Definition at line 1508 of file inertialSenseBootLoader.c.

◆ bootloadGetBootloaderVersionFromFile()

int bootloadGetBootloaderVersionFromFile ( const char *  bootName,
int *  verMajor,
char *  verMinor 
)

Retrieve the bootloader version from .bin file

Parameters
fileNamefor the new bootloader .bin file
pointerto int to store major version
pointerto char to store minor version
Returns
0 if failure, 1 if success

Definition at line 1590 of file inertialSenseBootLoader.c.

◆ bootloadUpdateBootloader()

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.

Parameters
portthe serial port, must be initialized and have the port set
fileNamethe new bootloader .bin file
errora buffer to store any error messages in - can be NULL
errorLengththe number of bytes available in error
objcustom user object that will be passed in the callback
uploadProgresscalled periodically during firmware upload - can be NULL
verifyProgresscalled periodically during firmware verification - can be NULL 0 if failure, non-zero if success

Definition at line 1627 of file inertialSenseBootLoader.c.

◆ bootloadUpdateBootloaderEx()

int bootloadUpdateBootloaderEx ( bootload_params_t p)

Definition at line 1783 of file inertialSenseBootLoader.c.

◆ disableBootloader()

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

Returns
0 if failure, non-zero if success

Definition at line 1926 of file inertialSenseBootLoader.c.

◆ enableBootloader()

int enableBootloader ( serial_port_t port,
int  baudRate,
char *  error,
int  errorLength,
const char *  bootloadEnableCmd 
)

Enable bootloader mode for a device

Parameters
portthe port to enable the bootloader on
baudRatethe baud rate to communicate with, IS_BAUD_RATE_BOOTLOADER or IS_BAUD_RATE_BOOTLOADER_RS232
errora buffer to store any error messages - can be NULL
errorLengththe number of bytes available in error
Returns
0 if failure, non-zero if success

Definition at line 1840 of file inertialSenseBootLoader.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05