123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
167:bedc0a9d559a
Parent:
161:efd949e8d536
Child:
173:7f938afb0447
--- a/DeviceTimers.c	Sun May 22 18:59:20 2016 +0000
+++ b/DeviceTimers.c	Sun Jun 05 11:03:33 2016 +0000
@@ -2,11 +2,11 @@
 
 extern Device device;
 
-void InitMeasurementTimerWithDefaults(void){
+void InitMeasurementTimerDefaultSettings(void){
  device.controller.timer[0].settings.match = 8064; //CCLK / 8064 = 12800.0Hz; Vibro: Timer1/32 = 400.0Hz;
 }
 
-void InitMeasurementTimer(void) {
+void InitMeasurementTimerState(void) {
   LPC_SC->PCONP |= (1<<2); //Power on timer 1
   device.controller.timer[0].state.MR0 = device.controller.timer[0].settings.match;
   LPC_TIM1->MR0 = device.controller.timer[0].state.MR0;
@@ -15,17 +15,17 @@
   NVIC_EnableIRQ(TIMER1_IRQn);
 }
 
-void DeviceEnableMeasurementTimer(void) {
+void DeviceStartMeasurementTimer(void) {
   device.controller.timer[0].state.TCR = 1; //Bit 0: Counter Enable
   LPC_TIM1->TCR = device.controller.timer[0].state.TCR;
   return;
 }
 
-void InitRegularTimerWithDefaults(void){
+void InitRegularTimerDefaultSettings(void){
  device.controller.timer[1].settings.match = 257; //CCLK / 4 / 258 = 100kHz
 }
 
-void InitRegularTimer(void) {
+void InitRegularTimerState(void) {
   LPC_SC->PCONP |= (1<<22);//Power on timer 2
   device.controller.timer[1].state.MR0 = device.controller.timer[1].settings.match;
   LPC_TIM2->MR0 = device.controller.timer[1].state.MR0;
@@ -34,11 +34,10 @@
   NVIC_EnableIRQ(TIMER2_IRQn);
 }
 
-void DeviceEnableRegularTimer(void) {
+void DeviceStartRegularTimer(void) {
   device.controller.timer[1].state.TCR = 1; //Bit 0: Counter Enable
   LPC_TIM2->TCR = device.controller.timer[1].state.TCR;
 }
-
 /*
 //Measurement floating cycle timer interrupt
 __irq void TIMER1_IRQHandler(void) {