From 6294db4b43ec07171c2c3a868069b5023d8835a0 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 13 Jan 2016 11:15:17 +0530 Subject: Test commit --- .../src/c/hardware/avr/timer/u8AVRGetTimerValues.c | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c (limited to '2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c') diff --git a/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c b/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c new file mode 100644 index 00000000..c542c182 --- /dev/null +++ b/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c @@ -0,0 +1,37 @@ +// Function to get timer count +// +// Calling Sequence +// u8AVRGetTimerValues(timer) +// +// Parameters +// timer: timer whose current count is to be returned (0,1,2) +// ***Refer datasheet for more description about timer +// +// Description +// This function returns the count of timer specified +// +// +// Authors +// Siddhesh Wani +// + + +#include "AVRPeripheralTimer.h" + + +uint8 u8AVRGetTimerValues(uint8 timer) +{ + switch(timer) + { + case 0: + return TCNT0; + + case 1: + break; + case 2: + return TCNT2; + } + + return 0; +} + -- cgit