summaryrefslogtreecommitdiff
path: root/2.3-1/macros/Hardware
diff options
context:
space:
mode:
authorsiddhu89902015-12-11 18:28:43 +0530
committersiddhu89902015-12-11 18:28:43 +0530
commiteac39cdc77ad5fdaf7b245cbce5c92f105ac75bf (patch)
tree4427a3267f648722ecd03398c40f5390d51eaa0f /2.3-1/macros/Hardware
parent87e2de9869a72ab2058f4b3ca60d5a6e6d8d6035 (diff)
downloadScilab2C-eac39cdc77ad5fdaf7b245cbce5c92f105ac75bf.tar.gz
Scilab2C-eac39cdc77ad5fdaf7b245cbce5c92f105ac75bf.tar.bz2
Scilab2C-eac39cdc77ad5fdaf7b245cbce5c92f105ac75bf.zip
AVR ADC checked after some modifications
Diffstat (limited to '2.3-1/macros/Hardware')
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRADCSetup.binbin4168 -> 4168 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRADCSetup.sci2
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetup.binbin0 -> 5760 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci39
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin836 -> 860 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/names1
6 files changed, 41 insertions, 1 deletions
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin b/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
index 6cf45dc9..44e3d790 100644
--- a/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
+++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
index d9897fc3..ce9117d0 100644
--- a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
+++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci
@@ -2,7 +2,7 @@ function AVRADCSetup(prescalar,adc_ref)
// Function to initialise ADC of AVR
//
// Calling Sequence
-// AVRSetupADC(uint8 prescalar, uint8 adc_ref)
+// AVRADCSetup(uint8 prescalar, uint8 adc_ref)
//
// Parameters
// prescalar: prescalar to be used for generating ADC clock (0-7)
diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin
new file mode 100644
index 00000000..6ae56fda
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci
new file mode 100644
index 00000000..7e1c234f
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetup.sci
@@ -0,0 +1,39 @@
+function AVRPWMSetup(timer, prescalar, waveform_mode, output_mode)
+// Function to initialise PWM of AVR
+//
+// Calling Sequence
+// AVRSetupADC(timer, prescalar, waveform_mode, output_mode)
+//
+// Parameters
+// timer: timer to be used for PWM generation (0,1,2)
+// prescalar: prescalar to be used for generating PWM waveform (0-7)
+// waveform_mode: decides type of waveform generation
+// 0 -> Normal mode
+// 1 -> Phase correct mode
+// 2 -> CTC mode
+// 3 -> Fase PWM mode
+// output_mode: decides the compare output mode. (0-3)
+// behaviour of the output is different for different inputs
+// depending upon 'waveform_mode' chosen.
+// ***Refer datasheet for more description about above modes
+//
+// Description
+// This function initialises PWM of AVR with given parameters. 'timer'
+// decides which of the three (0,1,2) timers available to be used. The
+// 'prescalar' is needed for deciding PWM clock. Select appropriate prescalar
+// depending on MCU clock. Choose required pwmmode using 'waveform_generation'
+// and 'output_mode'. Please refer datasheet for more description of 'wafefom_mode'
+// and 'output mode'.
+// Examples
+// AVRPWMSetup(0,1,2,2)
+//
+// See also
+// AVRPMWSetDuty
+//
+// 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
index d08afbd3..aa4d6113 100644
--- a/2.3-1/macros/Hardware/AVR/lib
+++ b/2.3-1/macros/Hardware/AVR/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names
index 6e5b61bd..afd171ec 100644
--- a/2.3-1/macros/Hardware/AVR/names
+++ b/2.3-1/macros/Hardware/AVR/names
@@ -2,6 +2,7 @@ AVRADCSetup
AVRDigitalIn
AVRDigitalOut
AVRDigitalSetup
+AVRPWMSetup
AVRReadADC
GetAVRSupportFunctions
GetPeripheral