summaryrefslogtreecommitdiff
path: root/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci
blob: 9f9f7977f46d4476e3846d8ebab6c7487cddf4f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function RPI_HardPWMWrite(pin,value)
// Function to change pwm duty on specified pin. Hardware PWM is available 
// only on pin 12. So, only '12' should be provided as pin 
//
// Calling Sequence
//	   RPI_HardPWMWrite(12,512) //Value must be smaller than the range set
//									using RPI_HARDPWMSetRange
//
// Parameters
//		pin: pin no on which pwm value is to be changed. Currently only 12 is allowed
//		value: pwm value for given pin. This must be less than range value set 
// Description
//		This function changes pwm duty on specified pin. As for RPi, only one pin 
//		(pin 12) is available for hardware PWM. 
//		PWM frequency = (PWM Clock frequency/Clock divisor/range) 
//				PWM clock frequency = 19.2 MHz
//				clock divisor is setup using RPI_HardPWMSetClock
//				range is setup using RPI_HardPWMSetRange 
//		Actual PWM duty = value/range
// Examples
//	
// See also
//     RPI_HardPWMSetClock RPI_HardPWMSetRange
//
// Authors
//     Siddhesh Wani
// -----------------------------------------------------------------

// This is curretly dummy function. It provides no functionality but is required 
// for providing support for generating C code for RPi.
endfunction