OLE Developer Guide  Latest Git
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bootloader_options.h File Reference

Detailed Description

The API to share information between the bootloader and the main application.

We set aside a small region of RAM at the end of the address space and use this to pass information between the application and the bootloader.

During the initial boot process, if the cause of the reset was a software reset, we check the boot token to see if the application wants us to enter bootloader mode.

The application can enter the bootloader mode by calling BootloaderOptions_SetNextBoot(BOOT_BOOTLOADER) and then forcing a s/w reset.

Include dependency graph for bootloader_options.h:

Go to the source code of this file.

enum  BootOption { BOOT_BOOTLOADER, BOOT_PRIMARY_APPLICATION }
 The different boot options. More...
 
BootOption BootloaderOptions_GetBootOption ()
 Check what code we should run. More...
 
void BootloaderOptions_SetBootOption (BootOption option)
 Control what we boot after the next s/w reset. More...
 

Enumeration Type Documentation

enum BootOption

The different boot options.

Enumerator
BOOT_BOOTLOADER 

Start the bootloader.

BOOT_PRIMARY_APPLICATION 

Start the primary application.

Function Documentation

BootOption BootloaderOptions_GetBootOption ( )

Check what code we should run.

Returns
The BootOption of the code to run.

This will only return BOOT_BOOTLOADER after a s/w reset.

void BootloaderOptions_SetBootOption ( BootOption  option)

Control what we boot after the next s/w reset.

Parameters
optionThe code to boot.