diff options
author | Mushirahmed | 2016-01-15 16:47:41 +0530 |
---|---|---|
committer | Mushirahmed | 2016-01-15 16:47:41 +0530 |
commit | 05ccd0b6ec64ec92722e482e00d3082306b21a0a (patch) | |
tree | f56951f10d7fe8e534aff81d4287bb090bf157c5 /src/c/hardware/avr/timer/u8AVRGetTimerValues.c | |
parent | cad39eb3d3f3509eb44e87e2aeac210e9328fdc0 (diff) | |
parent | 1ff7f5293444b22b46ff7bd51d52a845dc20525c (diff) | |
download | scilab2c-05ccd0b6ec64ec92722e482e00d3082306b21a0a.tar.gz scilab2c-05ccd0b6ec64ec92722e482e00d3082306b21a0a.tar.bz2 scilab2c-05ccd0b6ec64ec92722e482e00d3082306b21a0a.zip |
merge before windows testing lapack and Makefile.mak file
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; +} + |