123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
156:e68ee0bcdcda
Parent:
137:14a0c452cf32
Child:
167:bedc0a9d559a
--- a/DeviceTimers.h	Fri May 06 14:08:54 2016 +0000
+++ b/DeviceTimers.h	Mon May 09 20:03:26 2016 +0000
@@ -1,5 +1,31 @@
 #ifndef __DEVICE_TIMERS_H__
 #define __DEVICE_TIMERS_H__
 
-void Event_10KHz(void);
+typedef struct _DeviceTimerSettings {
+  uint32_t match;
+} DeviceTimerSettings;
+
+typedef struct _DeviceTimerState {
+  //Match Register 0. MR0 can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR0 matches the TC.
+  uint32_t MR0;
+  //Match Control Register. The MCR is used to control if an interrupt is generated and if the TC is reset when a Match occurs.
+  uint32_t MCR;
+  //Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR.
+  uint32_t TCR;
+} DeviceTimerState;
+
+typedef struct _DeviceTimer {
+  DeviceTimerSettings settings;
+  DeviceTimerState state;
+} DeviceTimer;
+
+void InitMeasurementTimerWithDefaults(void);
+//void DeviceInitMeasurementTimer(unsigned int TimerInterval);
+void InitMeasurementTimer(void);
+void DeviceEnableMeasurementTimer(void);
+
+void InitRegularTimerWithDefaults(void);
+void InitRegularTimer(void);
+void DeviceEnableRegularTimer(void);
+
 #endif  /* __DEVICE_TIMERS_H__ */
\ No newline at end of file