diff options
author | siddhu8990 | 2015-12-17 14:48:36 +0530 |
---|---|---|
committer | siddhu8990 | 2015-12-23 11:26:29 +0530 |
commit | 66ae4f251032aca6b7063353beee6c387a58418e (patch) | |
tree | a474f509f6413acb4593a43c371a4406d9400957 /2.3-1/macros/Hardware | |
parent | eac39cdc77ad5fdaf7b245cbce5c92f105ac75bf (diff) | |
download | Scilab2C-66ae4f251032aca6b7063353beee6c387a58418e.tar.gz Scilab2C-66ae4f251032aca6b7063353beee6c387a58418e.tar.bz2 Scilab2C-66ae4f251032aca6b7063353beee6c387a58418e.zip |
Code generation for Arduino changed. DC motor added to Arduino.
Diffstat (limited to '2.3-1/macros/Hardware')
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin | bin | 0 -> 3564 bytes | |||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci | 31 | ||||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.bin | bin | 0 -> 2428 bytes | |||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.sci | 24 | ||||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin | bin | 5760 -> 5760 bytes | |||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci | 2 | ||||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin | bin | 0 -> 3552 bytes | |||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci | 31 | ||||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/lib | bin | 860 -> 932 bytes | |||
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/names | 3 |
10 files changed, 90 insertions, 1 deletions
diff --git a/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin Binary files differnew file mode 100644 index 00000000..26b4b47e --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin diff --git a/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci new file mode 100644 index 00000000..ab0146aa --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci @@ -0,0 +1,31 @@ +function counts = AVRGetTimerValue(timer) +// Function to set the prescalar for timer. +// +// Calling Sequence +// AVRgetTimerValue(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 diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.bin b/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.bin Binary files differnew file mode 100644 index 00000000..f3c9e3e4 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.bin diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.sci b/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.sci new file mode 100644 index 00000000..0042540a --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.sci @@ -0,0 +1,24 @@ +function AVRPWMSetDuty(timer, duty) +// Function to set duty for PWM of AVR +// +// Calling Sequence +// AVRPWMSetDuty(uint8 timer, uint8 duty) +// +// Parameters +// timer: timer to be used for PWM generation (0,1,2) +// duty: duty for PWM waveform (0-100) +// +// Description +// This function sets duty for PWM waveform according to given parameters. +// +// Examples +// AVRPWMSetDuty(0,10) //Sets 10% duty for timer 0 output. +// +// 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 diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin Binary files differindex 6ae56fda..971e43ee 100644 --- a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin +++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci index 7e1c234f..1bee050d 100644 --- a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci +++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci @@ -2,7 +2,7 @@ function AVRPWMSetup(timer, prescalar, waveform_mode, output_mode) // Function to initialise PWM of AVR // // Calling Sequence -// AVRSetupADC(timer, prescalar, waveform_mode, output_mode) +// AVRPWMSetup(timer, prescalar, waveform_mode, output_mode) // // Parameters // timer: timer to be used for PWM generation (0,1,2) diff --git a/2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin Binary files differnew file mode 100644 index 00000000..65e8f454 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin 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 diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib Binary files differindex aa4d6113..b1986824 100644 --- a/2.3-1/macros/Hardware/AVR/lib +++ b/2.3-1/macros/Hardware/AVR/lib diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names index afd171ec..126da77a 100644 --- a/2.3-1/macros/Hardware/AVR/names +++ b/2.3-1/macros/Hardware/AVR/names @@ -2,8 +2,11 @@ AVRADCSetup AVRDigitalIn AVRDigitalOut AVRDigitalSetup +AVRGetTimerValue +AVRPWMSetDuty AVRPWMSetup AVRReadADC +AVRTimerSetup GetAVRSupportFunctions GetPeripheral InsertPeripheralInList |