summaryrefslogtreecommitdiff
path: root/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci
diff options
context:
space:
mode:
authorimushir2015-12-28 16:08:36 +0530
committerimushir2015-12-28 16:08:36 +0530
commita5ffe09fca6b245c7af5a1072a124492cfc3f1b9 (patch)
treeb7a3d16b8b4b5eeb67a5313032082a371cf76b5b /2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci
parentb78d9ee3ae4c216c3b6bef13ba5637833381f529 (diff)
parent9bee3723b675d7ab65b757d38cf9c5938a63531a (diff)
downloadScilab2C-a5ffe09fca6b245c7af5a1072a124492cfc3f1b9.tar.gz
Scilab2C-a5ffe09fca6b245c7af5a1072a124492cfc3f1b9.tar.bz2
Scilab2C-a5ffe09fca6b245c7af5a1072a124492cfc3f1b9.zip
Merge branch 'master' of https://github.com/siddhu8990/Scilab2C
Fetching master
Diffstat (limited to '2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci')
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci31
1 files changed, 31 insertions, 0 deletions
diff --git a/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci
new file mode 100644
index 00000000..6316cdd7
--- /dev/null
+++ b/2.3-1/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