Midnight Sun Firmware
Loading...
Searching...
No Matches
packet_manger.h
1#pragma once
2
3/************************************************************************************************
4 * @file packet_manager.h
5 *
6 * @brief Packet manager class for firmware over the air (FOTA) updates
7 *
8 * @date 2025-03-16
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13#include <stdbool.h>
14#include <stdint.h>
15
16/* Inter-component Headers */
17
18/* Intra-component Headers */
19#include "fota_error.h"
20#include "fota_packet.h"
21
28#define PACKET_NUM 8
29
30typedef struct {
31 Packet rx_packets[PACKET_NUM];
32 uint32_t crc32_expected;
33 uint32_t crc32_calculated;
34 Packet tx_packet;
36
37FotaError crc_check(PacketManager *packet_manager);
38
39FotaError transmit_packet(PacketManager *packet_manager);
40
FotaError
FOTA Error code definitions.
Definition: fota_error.h:26
Definition: packet_manger.h:30
Definition: fota_packet.h:29