Midnight Sun Firmware
Loading...
Searching...
No Matches
bootloader_dfu.h
1#pragma once
2
3/************************************************************************************************
4 * @file bootloader_dfu.h
5 *
6 * @brief Bootloader Dfu
7 *
8 * @date 2025-10-05
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15
16/* Intra-component Headers */
17#include "bootloader_error.h"
18#include "bootloader.h"
19#include "bootloader_can_datagram.h"
20#include "bootloader_packet_handler.h"
21
29typedef struct {
33
39BootloaderError bootloader_dfu_init(uintptr_t current_write_address);
40
49BootloaderError bootloader_dfu_flash(PacketManager *pm, uint8_t *flash_buffer);
50
56
BootloaderError bootloader_fault()
If any errors/faults arise, reset the board.
Definition: bootloader_dfu.c:65
BootloaderError bootloader_dfu_flash(PacketManager *pm, uint8_t *flash_buffer)
Flash page onto flash memory.
Definition: bootloader_dfu.c:28
BootloaderError bootloader_dfu_init(uintptr_t current_write_address)
Initializes the BootloaderDFUInfo struct.
Definition: bootloader_dfu.c:22
BootloaderError bootloader_jump_app()
Jumps to application vector table.
Definition: bootloader_dfu.c:54
BootloaderError
Bootloader error definitions.
Definition: bootloader_error.h:28
Stores info needed for the DFU process.
Definition: bootloader_dfu.h:29
uintptr_t application_start
Definition: bootloader_dfu.h:30
uintptr_t current_write_address
Definition: bootloader_dfu.h:31
Stores info related to receiving data.
Definition: bootloader_packet_handler.h:29