Public Member Functions | |
| void | setFreq (double frequency) |
| Sets the frequency of PWM. | |
| double | getFreq () |
| Returns the frequency of PWM. | |
| PWM (int base, double freq) | |
| Initializes the PWM. | |
| PWM (int base) | |
| Initializes the PWM using the default PWM frequency (20KHz). | |
| native void | finalize () |
| Finalizes the PWM. | |
| int | setDuty (double dutycycle) |
| Sets the duty-cycle of PWM. | |
Static Public Member Functions | |
| native void | setCount (int count) |
| Sets the frequency of PWM in cycles of 10MHz. | |
| native int | setDuty (int dutycycle) |
| Sets the duty-cycle of PWM. | |
| native void | on () |
| Turns the PWM on. | |
| native void | off () |
| Turns the PWM off. | |
Static Public Attributes | |
| final double | REF_FREQ = 10e6 |
| Reference frequency = 10MHz. | |
| final double | SW_FREQ = 20e3 |
| Default Switching Frequency = 20KHz. | |
|
||||||||||||
|
Initializes the PWM.
|
|
|
Initializes the PWM using the default PWM frequency (20KHz).
|
|
|
Returns the frequency of PWM.
|
|
|
Sets the frequency of PWM in cycles of 10MHz.
|
|
|
Sets the duty-cycle of PWM.
|
|
|
Sets the duty-cycle of PWM.
|
|
|
Sets the frequency of PWM.
|
1.3.6