![]() |
Midnight Sun Firmware
|
bootloader_dfu Firmware More...
Classes | |
| struct | BootloaderDFUInfo |
| Stores info needed for the DFU process. More... | |
Functions | |
| BootloaderError | bootloader_dfu_init (uintptr_t current_write_address) |
Initializes the BootloaderDFUInfo struct. More... | |
| BootloaderError | bootloader_dfu_flash (PacketManager *pm, uint8_t *flash_buffer) |
| Flash page onto flash memory. More... | |
| BootloaderError | bootloader_jump_app () |
| Jumps to application vector table. More... | |
| BootloaderError | bootloader_fault () |
| If any errors/faults arise, reset the board. More... | |
bootloader_dfu Firmware
| BootloaderError bootloader_dfu_flash | ( | PacketManager * | pm, |
| uint8_t * | flash_buffer | ||
| ) |
Flash page onto flash memory.
Called by bootloader_receive_data function in bootloader_packet_handler.c
| pm | Pointer to the packet manager |
| datagram | CAN datagram |
| flash_buffer | Flash buffer which should have 2KB of data |
BOOTLOADER_ERROR_NONE on success | BootloaderError bootloader_dfu_init | ( | uintptr_t | current_write_address | ) |
Initializes the BootloaderDFUInfo struct.
| current_write_address | The current write address |
BOOTLOADER_ERROR_NONE on success | BootloaderError bootloader_fault | ( | ) |
If any errors/faults arise, reset the board.
| BootloaderError bootloader_jump_app | ( | ) |
Jumps to application vector table.
Jumps to application vector table.
Exits bootloader and jumps to main application