#ifndef CONFIG_CONSTS_H
#define CONFIG_CONSTS_H

#define RX_TIMEOUT_VALUE_MS             0U
#define TX_TIMEOUT_VALUE_MS             3000U
#define RX_CONTINUOUS_ON                1U
#define RADIO_SYNCWORD_LEN              3U
#define RADIO_WHITENING_SEED            0x01FFU
#define RADIO_CRC_POLY                  0x8005U
#define RADIO_CRC_SEED                  0xFFFFU

#define UART_DATA_BUFFER_SIZE           220U
#define RADIO_MAX_PAYLOAD_SIZE          220U
#define TX_QUEUE_DEPTH                  4U
#define CONFIG_LINE_SIZE                96U
#define CONFIG_ESCAPE_GUARD_MS          800U

// Reserved addresses for configuration

#define FLASH_BASE_ADDR     0x08000000U
#define FLASH_TOTAL_SIZE    0x00040000U   // 256 KB
#define FLASH_PAGE_SIZE     0x00000800U   // 2 KB
#define CONFIG_FLASH_ADDR   (FLASH_BASE_ADDR + FLASH_TOTAL_SIZE - FLASH_PAGE_SIZE)

#define CONFIG_MAGIC         0x43464731UL  // "CFG1"


#define LED_PULSE_MS 50U

// Default config values

#define DEFAULT_RF_FREQUENCY            433100000UL
#define DEFAULT_TX_OUTPUT_POWER         14
#define DEFAULT_FSK_FDEV                25000UL
#define DEFAULT_FSK_BITRATE             50000UL
#define DEFAULT_FSK_BANDWIDTH           50000UL
#define DEFAULT_FSK_PREAMBLE_LENGTH     4U
#define DEFAULT_UART_PACKET_TIMEOUT_MS  20U
#define DEFAULT_UART_BAUDRATE           115200U
#define DEFAULT_SYNCWORD                {0x91, 0xC4, 0x91}





#endif