Bootloader GPIO definitions.

Enumerations

enum blState_e {
BL_ST_UP ,
BL_ST_DOWN ,
BL_ST_POLLING_LOOP ,
BL_ST_DOWNLOAD_LOOP ,
BL_ST_DOWNLOAD_FAILURE ,
BL_ST_DOWNLOAD_SUCCESS
}
Defines various bootloader states. Use in LED code to signal bootload activity.

Functions

void bootloadGpioInit (void)
Initialize GPIO.
void bootloadStateIndicator (enum blState_e state)
Helper function used for displaying bootloader state (for example: with LEDs).
bool bootloadForceActivation (void)
Force activation of bootloader.

State Indicator Macros

The bootloader indicates which state it is in by calling these // macros. Map them to the ::halBootloadStateIndicator function // (in bootloder-gpio.c) if you want to display that bootloader state. // Used to blink the LED's or otherwise signal bootloader activity.

#define BL_STATE_UP ()   do { bootloadStateIndicator ( BL_ST_UP ); } while (0)
Finished init sequence, ready for bootload.
#define BL_STATE_DOWN ()   do { bootloadStateIndicator ( BL_ST_DOWN ); } while (0)
Called right before bootloader resets to application. Use to cleanup and reset GPIO's to leave node in known state for app start, if necessary.
#define BL_STATE_POLLING_LOOP ()   do { bootloadStateIndicator ( BL_ST_POLLING_LOOP ); } while (0)
Standalone bootloader polling serial/radio interface.
#define BL_STATE_DOWNLOAD_LOOP ()   do { bootloadStateIndicator ( BL_ST_DOWNLOAD_LOOP ); } while (0)
Processing download image.
#define BL_STATE_DOWNLOAD_SUCCESS ()   do { bootloadStateIndicator ( BL_ST_DOWNLOAD_SUCCESS ); } while (0)
Download process was a success.
#define BL_STATE_DOWNLOAD_FAILURE ()   do { bootloadStateIndicator ( BL_ST_DOWNLOAD_FAILURE ); } while (0)
Download process failed.

Detailed Description

Bootloader GPIO definitions.

See bootloader-gpio.h for source code.

Macro Definition Documentation

BL_STATE_DOWN

#define BL_STATE_DOWN ( ) do { bootloadStateIndicator ( BL_ST_DOWN ); } while (0)

Called right before bootloader resets to application. Use to cleanup and reset GPIO's to leave node in known state for app start, if necessary.

BL_STATE_DOWNLOAD_FAILURE

#define BL_STATE_DOWNLOAD_FAILURE ( ) do { bootloadStateIndicator ( BL_ST_DOWNLOAD_FAILURE ); } while (0)

Download process failed.

BL_STATE_DOWNLOAD_LOOP

#define BL_STATE_DOWNLOAD_LOOP ( ) do { bootloadStateIndicator ( BL_ST_DOWNLOAD_LOOP ); } while (0)

Processing download image.

BL_STATE_DOWNLOAD_SUCCESS

#define BL_STATE_DOWNLOAD_SUCCESS ( ) do { bootloadStateIndicator ( BL_ST_DOWNLOAD_SUCCESS ); } while (0)

Download process was a success.

BL_STATE_POLLING_LOOP

#define BL_STATE_POLLING_LOOP ( ) do { bootloadStateIndicator ( BL_ST_POLLING_LOOP ); } while (0)

Standalone bootloader polling serial/radio interface.

BL_STATE_UP

#define BL_STATE_UP ( ) do { bootloadStateIndicator ( BL_ST_UP ); } while (0)

Finished init sequence, ready for bootload.

Enumeration Type Documentation

blState_e

Defines various bootloader states. Use in LED code to signal bootload activity.

Enumerator
BL_ST_UP

bootloader up

BL_ST_DOWN

bootloader going down

BL_ST_POLLING_LOOP

polling interfaces

BL_ST_DOWNLOAD_LOOP

downloading

BL_ST_DOWNLOAD_FAILURE

download failure

BL_ST_DOWNLOAD_SUCCESS

download success

Function Documentation

bootloadForceActivation()

bool bootloadForceActivation ( void )

Force activation of bootloader.

bootloadGpioInit()

void bootloadGpioInit ( void )

Initialize GPIO.

bootloadStateIndicator()

void bootloadStateIndicator ( enum blState_e state )

Helper function used for displaying bootloader state (for example: with LEDs).