diff options
author | Mushirahmed | 2016-01-15 16:47:41 +0530 |
---|---|---|
committer | Mushirahmed | 2016-01-15 16:47:41 +0530 |
commit | 41bd783b705f1de28308896ecdb4e7ba0cc842f8 (patch) | |
tree | f04d43098d9bc44c58c886b98f8fc43c26aac4d2 /2.3-1/src/c/hardware/avr/timer/u8AVRGetTimerValues.c | |
parent | 3b6025f3708421279a7df1df2e7990ebff833324 (diff) | |
parent | ef666a6b9ac74d5effe8b34179cc3ad0c247e7c3 (diff) | |
download | Scilab2C-41bd783b705f1de28308896ecdb4e7ba0cc842f8.tar.gz Scilab2C-41bd783b705f1de28308896ecdb4e7ba0cc842f8.tar.bz2 Scilab2C-41bd783b705f1de28308896ecdb4e7ba0cc842f8.zip |
merge before windows testing lapack and Makefile.mak file
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.c | 37 |
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; +} + |