diff options
author | imushir | 2016-01-18 14:10:56 +0530 |
---|---|---|
committer | imushir | 2016-01-18 14:10:56 +0530 |
commit | 9fdbe6b47b95468bce7c0ae162aff138ec0b9b94 (patch) | |
tree | 16a96221aba82ce30ff8d2daeca19112e55800c3 /src/c/hardware/avr/timer/u8AVRGetTimerValues.c | |
parent | c3cc6d1d15d8cf60a27f253205424adb9e498e6e (diff) | |
parent | 304ad0ee30ad83db53a76a76d7bb4f3392779eb4 (diff) | |
download | scilab2c-9fdbe6b47b95468bce7c0ae162aff138ec0b9b94.tar.gz scilab2c-9fdbe6b47b95468bce7c0ae162aff138ec0b9b94.tar.bz2 scilab2c-9fdbe6b47b95468bce7c0ae162aff138ec0b9b94.zip |
merged pulled
Diffstat (limited to 'src/c/hardware/avr/timer/u8AVRGetTimerValues.c')
-rw-r--r-- | src/c/hardware/avr/timer/u8AVRGetTimerValues.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/c/hardware/avr/timer/u8AVRGetTimerValues.c b/src/c/hardware/avr/timer/u8AVRGetTimerValues.c new file mode 100644 index 00000000..c542c182 --- /dev/null +++ b/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; +} + |