diff options
Diffstat (limited to 'macros/Hardware/AVR')
-rw-r--r-- | macros/Hardware/AVR/AVRADCSetup.bin | bin | 4168 -> 4168 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/AVRADCSetup.sci | 2 | ||||
-rw-r--r-- | macros/Hardware/AVR/AVRGetTimerValue.bin | bin | 0 -> 3564 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/AVRGetTimerValue.sci | 31 | ||||
-rw-r--r-- | macros/Hardware/AVR/AVRPWMSetDuty.bin | bin | 0 -> 2428 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/AVRPWMSetDuty.sci | 24 | ||||
-rw-r--r-- | macros/Hardware/AVR/AVRPWMSetup.bin | bin | 0 -> 5760 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/AVRPWMSetup.sci | 39 | ||||
-rw-r--r-- | macros/Hardware/AVR/AVRTimerSetup.bin | bin | 0 -> 3552 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/AVRTimerSetup.sci | 31 | ||||
-rw-r--r-- | macros/Hardware/AVR/lib | bin | 836 -> 932 bytes | |||
-rw-r--r-- | macros/Hardware/AVR/names | 4 |
12 files changed, 130 insertions, 1 deletions
diff --git a/macros/Hardware/AVR/AVRADCSetup.bin b/macros/Hardware/AVR/AVRADCSetup.bin Binary files differindex 6cf45dc..44e3d79 100644 --- a/macros/Hardware/AVR/AVRADCSetup.bin +++ b/macros/Hardware/AVR/AVRADCSetup.bin diff --git a/macros/Hardware/AVR/AVRADCSetup.sci b/macros/Hardware/AVR/AVRADCSetup.sci index d9897fc..ce9117d 100644 --- a/macros/Hardware/AVR/AVRADCSetup.sci +++ b/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/macros/Hardware/AVR/AVRGetTimerValue.bin b/macros/Hardware/AVR/AVRGetTimerValue.bin Binary files differnew file mode 100644 index 0000000..26b4b47 --- /dev/null +++ b/macros/Hardware/AVR/AVRGetTimerValue.bin diff --git a/macros/Hardware/AVR/AVRGetTimerValue.sci b/macros/Hardware/AVR/AVRGetTimerValue.sci new file mode 100644 index 0000000..ab0146a --- /dev/null +++ b/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/macros/Hardware/AVR/AVRPWMSetDuty.bin b/macros/Hardware/AVR/AVRPWMSetDuty.bin Binary files differnew file mode 100644 index 0000000..f3c9e3e --- /dev/null +++ b/macros/Hardware/AVR/AVRPWMSetDuty.bin diff --git a/macros/Hardware/AVR/AVRPWMSetDuty.sci b/macros/Hardware/AVR/AVRPWMSetDuty.sci new file mode 100644 index 0000000..0042540 --- /dev/null +++ b/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/macros/Hardware/AVR/AVRPWMSetup.bin b/macros/Hardware/AVR/AVRPWMSetup.bin Binary files differnew file mode 100644 index 0000000..971e43e --- /dev/null +++ b/macros/Hardware/AVR/AVRPWMSetup.bin diff --git a/macros/Hardware/AVR/AVRPWMSetup.sci b/macros/Hardware/AVR/AVRPWMSetup.sci new file mode 100644 index 0000000..1bee050 --- /dev/null +++ b/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/macros/Hardware/AVR/AVRTimerSetup.bin b/macros/Hardware/AVR/AVRTimerSetup.bin Binary files differnew file mode 100644 index 0000000..65e8f45 --- /dev/null +++ b/macros/Hardware/AVR/AVRTimerSetup.bin diff --git a/macros/Hardware/AVR/AVRTimerSetup.sci b/macros/Hardware/AVR/AVRTimerSetup.sci new file mode 100644 index 0000000..6316cdd --- /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 diff --git a/macros/Hardware/AVR/lib b/macros/Hardware/AVR/lib Binary files differindex d08afbd..b198682 100644 --- a/macros/Hardware/AVR/lib +++ b/macros/Hardware/AVR/lib diff --git a/macros/Hardware/AVR/names b/macros/Hardware/AVR/names index 6e5b61b..126da77 100644 --- a/macros/Hardware/AVR/names +++ b/macros/Hardware/AVR/names @@ -2,7 +2,11 @@ AVRADCSetup AVRDigitalIn AVRDigitalOut AVRDigitalSetup +AVRGetTimerValue +AVRPWMSetDuty +AVRPWMSetup AVRReadADC +AVRTimerSetup GetAVRSupportFunctions GetPeripheral InsertPeripheralInList |