bootloader_packet_handler Firmware
More...
bootloader_packet_handler Firmware
◆ bootloader_ping()
Function call for the BOOTLOADER_PING
state.
Sends over misc data (Not yet completed)
- Parameters
-
pm | Believe it or not, it is a pointer to the PacketManager struct |
datagram | Pointer to the incoming datagram |
flash_buffer | The current buffer to be flashed |
- Returns
- BOOTLOADER_ERROR_NONE if successful
◆ bootloader_receive_data()
Function call for the BOOTLOADER_DATA_RECEIVE
state.
Receives incoming chunks, if buffer is the size of one page, flash onto board
- Parameters
-
pm | Pointer to the PacketManager struct |
datagram | A pointer to the incoming datagram |
flash_buffer | The current buffer to be flashed |
- Returns
- BOOTLOADER_ERROR_NONE if successful
◆ bootloader_start()
Function call for the BOOTLOADER_START
state.
Primes everything to start receiving data
- Parameters
-
pm | Pointer to the PacketManager struct |
datagram | A pointer to the incoming datagram |
- Returns
- BOOTLOADER_DATA_NOT_ALIGNED, BOOTLOADER_ERROR_NONE
◆ bootloader_wait_sequencing()
Function call for BOOTLOADER_WAIT_SEQUENCING
state.
Validates datagram packets, in terms of sequencing, to ensure packets were not missed
- Parameters
-
pm | Pointer to the PacketManager struct |
datagram | Pointer to incoming datagram |
- Returns
- BOOTLOADER_ERROR_NONE if successful else BOOTLOADER_SEQUENCE_ERROR
◆ packet_handler_init()
Initialize the PacketManager
struct.
- Parameters
-
- Returns
- BOOTLOADER_ERROR_NONE on success