/*
 *      __ ________               _____                               ______          __    
 *     / //_/_  __/___ _____ _   / ___/____  __  _______________     / ____/___  ____/ /__  
 *    / ,<   / / / __ `/ __ `/   \__ \/ __ \/ / / / ___/ ___/ _ \   / /   / __ \/ __  / _ \ 
 *   / /| | / / / /_/ / /_/ /   ___/ / /_/ / /_/ / /  / /__/  __/  / /___/ /_/ / /_/ /  __/ 
 *  /_/ |_|/_/  \__,_/\__, /   /____/\____/\__,_/_/   \___/\___/   \____/\____/\__,_/\___/  
 *                   /____/                                                                 
 *
 * This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.
 * 🛡️ <https://ktag.clubk.club> 🃞
 *
 */

/** \file
 *  \brief [Autogenerated] This file defines the External EEPROM entries.
 *
 *  \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
 *                       DO NOT MODIFY THIS FILE MANUALLY!
 */

/* Include Files */
#include "KTag.h"

/* EEPROM Entries */

/** \defgroup NVM_EXTERNAL_EEPROM NVM External EEPROM
 *
 * The External EEPROM is divided into logical "entries", represented by instances of the #NVM_EEPROMEntry_T type.
 * At startup, these entries are loaded into their respective RAM copies by NVM_InitExternalEEPROM().  The application
 * then updates the RAM copies directly, and requests that the NVM_ExternalEEPROMTask() save these back to the EEPROM
 * when necessary.
 * @{ */

static NVM_External_Test_T RAM_External_Test;

static const NVM_External_Test_T DEFAULT_External_Test = 
{
    //! Test Code 3
    .External_Test_3 = UINT16_MAX,
    //! Test Code 4
    .External_Test_4 = UINT32_MAX,
};

NVM_EEPROMEntry_T NVM_External_Test = 
{
    //! Size == sizeof(NVM_External_Test_T)
    .Size = 6,
    .EE_Address = 0,
    .EE_CRC_Address = 6,
    .Value = (uint8_t *)&RAM_External_Test,
    .Default = (uint8_t *)&DEFAULT_External_Test,
    .State = NVM_STATE_UNINITIALIZED
};
static NVM_Info_T RAM_Info;

static const NVM_Info_T DEFAULT_Info = 
{
    //! Date this unit was first programmed.
    .Date_Code_as_YYYYMMDD = 20200101,
};

NVM_EEPROMEntry_T NVM_Info = 
{
    //! Size == sizeof(NVM_Info_T)
    .Size = 4,
    .EE_Address = 8,
    .EE_CRC_Address = 12,
    .Value = (uint8_t *)&RAM_Info,
    .Default = (uint8_t *)&DEFAULT_Info,
    .State = NVM_STATE_UNINITIALIZED
};
static NVM_Hardware_Settings_T RAM_Hardware_Settings;

static const NVM_Hardware_Settings_T DEFAULT_Hardware_Settings = 
{
    //! Color order for the barrel Neopixels.
    .Barrel_Color_Order = 2,
    //! Color order for the receiver NeoPixels.
    .Receiver_Color_Order = 0,
    //! Color order for the display NeoPixels.
    .Display_Color_Order = 2,
    //! Color order for the effects NeoPixels.
    .Effects_Color_Order = 2,
    //! true if this unit is configured for a right-handed person; false if for a left-handed person.
    .Is_Right_Handed = true,
    //! Audio volume.
    .Volume = 20,
};

NVM_EEPROMEntry_T NVM_Hardware_Settings = 
{
    //! Size == sizeof(NVM_Hardware_Settings_T)
    .Size = 6,
    .EE_Address = 14,
    .EE_CRC_Address = 20,
    .Value = (uint8_t *)&RAM_Hardware_Settings,
    .Default = (uint8_t *)&DEFAULT_Hardware_Settings,
    .State = NVM_STATE_UNINITIALIZED
};
static NVM_Game_Settings_T RAM_Game_Settings;

static const NVM_Game_Settings_T DEFAULT_Game_Settings = 
{
    //! Selected weapon.
    .Weapon_ID = LASER_X_ID,
    //! Player identification.
    .Player_ID = 0,
    //! Selected team.
    .Team_ID = 1,
    //! Maximum health.
    .Max_Health = 100,
    //! Number of special weapons regained upon reentry to the game.
    .N_Special_Weapons_On_Reentry = 1,
    //! Time in milliseconds between instigating a game and when the countdown begins.
    .T_Start_Game_in_ms = 30000,
    //! Duration of the game in milliseconds.
    .T_Game_Length_in_ms = 600000,
    //! Color representing the player, rather than the team.
    .Secondary_Color = 0,
};

NVM_EEPROMEntry_T NVM_Game_Settings = 
{
    //! Size == sizeof(NVM_Game_Settings_T)
    .Size = 17,
    .EE_Address = 22,
    .EE_CRC_Address = 39,
    .Value = (uint8_t *)&RAM_Game_Settings,
    .Default = (uint8_t *)&DEFAULT_Game_Settings,
    .State = NVM_STATE_UNINITIALIZED
};
static NVM_Hourmeter_T RAM_Hourmeter;

static const NVM_Hourmeter_T DEFAULT_Hourmeter = 
{
    //! Total number of startups for this unit.
    .Hourmeter_Startups = 0,
};

NVM_EEPROMEntry_T NVM_Hourmeter = 
{
    //! Size == sizeof(NVM_Hourmeter_T)
    .Size = 2,
    .EE_Address = 41,
    .EE_CRC_Address = 43,
    .Value = (uint8_t *)&RAM_Hourmeter,
    .Default = (uint8_t *)&DEFAULT_Hourmeter,
    .State = NVM_STATE_UNINITIALIZED
};

/** @} */

NVM_EEPROMEntry_T * const NVM_ExternalEEPROMEntries[] =
{
    &NVM_External_Test,
    &NVM_Info,
    &NVM_Hardware_Settings,
    &NVM_Game_Settings,
    &NVM_Hourmeter,
};

//! Size of the #NVM_ExternalEEPROMEntries array (i.e. the number of External EEPROM entries).
const uint8_t NVM_N_EXTERNAL_EEPROM_ENTRIES = (uint8_t) (sizeof(NVM_ExternalEEPROMEntries) / sizeof(NVM_EEPROMEntry_T *));

