summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c
diff options
context:
space:
mode:
authorimushir2016-01-18 14:10:56 +0530
committerimushir2016-01-18 14:10:56 +0530
commit2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9 (patch)
tree80d03589495b3a109013e267c42c7d6235c2c9e8 /2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c
parentbcb2bf1c014a1078f4306cd0111f4e596fe934ce (diff)
parent1e87b6e62cfe8e0889cd677b8406ab89809f53da (diff)
downloadScilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.tar.gz
Scilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.tar.bz2
Scilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.zip
merged pulled
Diffstat (limited to '2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c')
-rw-r--r--2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c37
1 files changed, 37 insertions, 0 deletions
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;
+}
+