2020TPC-SW/2020TPCApp1.cydsn/NVM/NVM_ExternalEEPROMEntries.c
2025-02-01 19:52:04 -06:00

153 lines
4.5 KiB
C

/*
* __ ________ _____ ______ __
* / //_/_ __/___ _____ _ / ___/____ __ _______________ / ____/___ ____/ /__
* / ,< / / / __ `/ __ `/ \__ \/ __ \/ / / / ___/ ___/ _ \ / / / __ \/ __ / _ \
* / /| | / / / /_/ / /_/ / ___/ / /_/ / /_/ / / / /__/ __/ / /___/ /_/ / /_/ / __/
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
* /____/
*
* 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞
*
*/
/** \file
* \brief [Autogenerated] This file defines the External EEPROM entries.
*
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 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 (is this used?)
.Player_ID = 0,
//! Selected team.
.Team_ID = 1,
};
NVM_EEPROMEntry_T NVM_Game_Settings =
{
//! Size == sizeof(NVM_Game_Settings_T)
.Size = 3,
.EE_Address = 22,
.EE_CRC_Address = 25,
.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 = 27,
.EE_CRC_Address = 29,
.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 *));