Refactor dds into dds and fgen
driver module started
This commit is contained in:
@@ -9,9 +9,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
//Application includes
|
||||
#include "eeprom.h"
|
||||
#include "soft_timer.h"
|
||||
#include "System/system.h"
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -72,5 +74,38 @@ SYSTEM_DATA_t* system_getSys(void)
|
||||
// call from the main timer at 100Hz
|
||||
void system_monitor(void)
|
||||
{
|
||||
// system level monitoring in timer ISR
|
||||
}
|
||||
|
||||
void system_init(void)
|
||||
{
|
||||
memset(&sys, 0, sizeof(SYSTEM_DATA_t));
|
||||
|
||||
sys.systemTime = 0;
|
||||
sys.safeMode = false;
|
||||
sys.usbConnected = false;
|
||||
sys.guiMode = GUI_MODE_NORMAL;
|
||||
sys.activeAccessory = NULL;
|
||||
sys.nextAccessory = NULL;
|
||||
sys.maxPowerLimit = POWER_LIMIT_ALKALINE; // default until battery type determined.
|
||||
|
||||
|
||||
char *ver = SW_VERSION;
|
||||
|
||||
for (int i=0; i < strlen(ver); ++i)
|
||||
{
|
||||
if (isalpha(ver[i]))
|
||||
{
|
||||
sys.isBeta = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
stimer_init();
|
||||
|
||||
sys.h100HzTimer = stimer_start( 10, TIMER_MODE_PERIODIC, NULL, NULL);
|
||||
sys.h10HzTimer = stimer_start( 100, TIMER_MODE_PERIODIC, NULL, NULL);
|
||||
sys.h1HzTimer = stimer_start(1000, TIMER_MODE_PERIODIC, NULL, NULL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user