//
// Created by bruno on 3/30/25.
//

//#ifndef BRNQUANFW_MESSAGES_H
//#define BRNQUANFW_MESSAGES_H
#include "fskmodem.h"
#include "../driver/keyboard.h"
#include "../driver/eeprom.h"

#define MESSAGES_START (0x1C08)
#define MESSAGES_COUNT (12)

typedef struct {
    uint32_t src;
    uint8_t seq;
    uint8_t ttl;
    uint8_t flags;
    uint8_t data[DataPacketDataSize];
} StoredPacket;

extern uint8_t gActiveMessage;
extern uint8_t gActiveMessageBank;

extern StoredPacket loadedPacket;

extern uint8_t gKeyTimeout;

void MESSAGES_GET();
void MESSAGES_DELETE();
void MESSAGES_SAVE();
void MESSAGES_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
void MESSAGES_TimeSlice500ms(void);

//#endif //BRNQUANFW_MESSAGES_H
