diff options
author | siddhu8990 | 2015-12-17 14:48:36 +0530 |
---|---|---|
committer | siddhu8990 | 2015-12-23 11:26:29 +0530 |
commit | 329613eb48542f24bb9014a0a617b05199726e99 (patch) | |
tree | bf571563bb735fc2ccd9a300a952f8557667fd77 /macros/Hardware/AVR/AVRTimerSetup.sci | |
parent | 96b51a5ded447676d493be9721e4480065a5ae7e (diff) | |
download | scilab2c-329613eb48542f24bb9014a0a617b05199726e99.tar.gz scilab2c-329613eb48542f24bb9014a0a617b05199726e99.tar.bz2 scilab2c-329613eb48542f24bb9014a0a617b05199726e99.zip |
Code generation for Arduino changed. DC motor added to Arduino.
Diffstat (limited to 'macros/Hardware/AVR/AVRTimerSetup.sci')
-rw-r--r-- | macros/Hardware/AVR/AVRTimerSetup.sci | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/Hardware/AVR/AVRTimerSetup.sci b/macros/Hardware/AVR/AVRTimerSetup.sci new file mode 100644 index 00000000..6316cdd7 --- /dev/null +++ b/macros/Hardware/AVR/AVRTimerSetup.sci @@ -0,0 +1,31 @@ +function AVRTimerSetup(timer, prescalar) +// Function to set the prescalar for timer. +// +// Calling Sequence +// AVRTimerSetup(timer, prescalar) +// +// Parameters +// timer: timer to be set up (0,1,2) +// prescalar: prescalar to be used for generating PWM waveform (0-7) +// ***Refer datasheet for more description about timer +// +// Description +// This function sets prescalr for timers. 'timer' decides which of the +// three (0,1,2) timers available to be used. The 'prescalar' is needed for +// deciding timer clock. Select appropriate prescalar depending on MCU clock +// and requirement. +// +// +// Examples +// AVRTimerSetup(0,1) //Timer 0 with no scaling +// +// See also +// AVRGetTimerValue +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. +endfunction |