summaryrefslogtreecommitdiff
path: root/2.3-1/macros/Hardware
diff options
context:
space:
mode:
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/AVRGetTimerValue.binbin0 -> 3564 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci31
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.binbin0 -> 2428 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.sci24
-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/AVRTimerSetup.binbin0 -> 3552 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci31
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin836 -> 932 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/names4
12 files changed, 130 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/AVRGetTimerValue.bin b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin
new file mode 100644
index 00000000..26b4b47e
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.bin
Binary files differ
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
new file mode 100644
index 00000000..f3c9e3e4
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRPWMSetDuty.bin
Binary files differ
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
new file mode 100644
index 00000000..971e43ee
--- /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..1bee050d
--- /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
+// AVRPWMSetup(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/AVRTimerSetup.bin b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin
new file mode 100644
index 00000000..65e8f454
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.bin
Binary files differ
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
index d08afbd3..b1986824 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..126da77a 100644
--- a/2.3-1/macros/Hardware/AVR/names
+++ b/2.3-1/macros/Hardware/AVR/names
@@ -2,7 +2,11 @@ AVRADCSetup
AVRDigitalIn
AVRDigitalOut
AVRDigitalSetup
+AVRGetTimerValue
+AVRPWMSetDuty
+AVRPWMSetup
AVRReadADC
+AVRTimerSetup
GetAVRSupportFunctions
GetPeripheral
InsertPeripheralInList