77 lines
1.7 KiB
C
77 lines
1.7 KiB
C
/*
|
|
* 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;
|
|
}
|
|
|
|
SYSTEM_DATA_t* system_getSys(void)
|
|
{
|
|
return &sys;
|
|
}
|
|
|
|
// monitor for overvoltage, power, current, etc.
|
|
// call from the main timer at 100Hz
|
|
void system_monitor(void)
|
|
{
|
|
|
|
}
|