initial check in based on SVN revision 575
This commit is contained in:
65
source/System/system.c
Normal file
65
source/System/system.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* system.c
|
||||
*
|
||||
* Created on: Oct 23, 2023
|
||||
* Author: Brian.Bailey
|
||||
*/
|
||||
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//Application includes
|
||||
#include "eeprom.h"
|
||||
#include "System/system.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* Definitions
|
||||
******************************************************************************/
|
||||
|
||||
SYSTEM_DATA_t sys;
|
||||
|
||||
/*******************************************************************************
|
||||
* Variables
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Static Function Declarations
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Static Functions
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Public Functions
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Load factory default settings
|
||||
* System info, Data, Frequencies, etc.
|
||||
*/
|
||||
void SYS_LoadFactoryDefaults(void)
|
||||
{
|
||||
//System info
|
||||
sprintf(sys.manufacturer, "UM");
|
||||
sprintf(sys.modelNumber, "N/A");
|
||||
sprintf(sys.modelName, "N/A");
|
||||
sprintf(sys.serialNumber, "N/A");
|
||||
sprintf(sys.mfgDate, "N/A");
|
||||
|
||||
//Data
|
||||
|
||||
//Frequencies
|
||||
|
||||
}
|
||||
|
||||
uint32_t SYS_GetLanguage(void)
|
||||
{
|
||||
return sys.language;
|
||||
}
|
||||
|
||||
39
source/System/system.h
Normal file
39
source/System/system.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* system.h
|
||||
*
|
||||
* Created on: Oct 23, 2023
|
||||
* Author: Brian.Bailey
|
||||
*/
|
||||
|
||||
#ifndef SYSTEM_SYSTEM_H_
|
||||
#define SYSTEM_SYSTEM_H_
|
||||
|
||||
|
||||
#define SW_VERSION "1.10A"
|
||||
|
||||
|
||||
#define SYS_INFO_LENGTH 24 //max string length for setup parameters (model, mfg, etc.)
|
||||
|
||||
|
||||
|
||||
|
||||
//System data
|
||||
typedef struct
|
||||
{
|
||||
uint8_t manufacturer[SYS_INFO_LENGTH]; //manufacturer
|
||||
uint8_t modelName[SYS_INFO_LENGTH]; //model name
|
||||
uint8_t serialNumber[SYS_INFO_LENGTH]; //serial number
|
||||
uint8_t mfgDate[SYS_INFO_LENGTH]; //manufacture date
|
||||
uint8_t modelNumber[SYS_INFO_LENGTH]; //model number
|
||||
|
||||
uint32_t bootloaderVersion; //bootloader version
|
||||
|
||||
uint32_t language; //system language
|
||||
|
||||
}SYSTEM_DATA_t;
|
||||
|
||||
|
||||
void SYS_LoadFactoryDefaults(void);
|
||||
uint32_t SYS_GetLanguage(void);
|
||||
|
||||
#endif /* SYSTEM_SYSTEM_H_ */
|
||||
Reference in New Issue
Block a user