|
Little-Wire
|
Pulse width modulation functions. More...
Functions | |
| void | pwm_init (littleWire *lwHandle) |
| void | pwm_stop (littleWire *lwHandle) |
| void | pwm_updateCompare (littleWire *lwHandle, unsigned char channelA, unsigned char channelB) |
| void | pwm_updatePrescaler (littleWire *lwHandle, unsigned int value) |
Pulse width modulation functions.
| void pwm_init | ( | littleWire * | lwHandle) |
Initialize the PWM module on the Little-Wire
| lwHandle | littleWire device pointer |
Definition at line 217 of file littleWire.c.
| void pwm_stop | ( | littleWire * | lwHandle) |
Stop the PWM module on the Little-Wire
| lwHandle | littleWire device pointer |
Definition at line 222 of file littleWire.c.
| void pwm_updateCompare | ( | littleWire * | lwHandle, |
| unsigned char | channelA, | ||
| unsigned char | channelB | ||
| ) |
Update the compare values of the PWM output pins. Resolution is 8 bit.
| lwHandle | littleWire device pointer |
| channelA | Compare value of PWMA pin |
| channelB | Compare value of PWMB pin |
Definition at line 227 of file littleWire.c.
| void pwm_updatePrescaler | ( | littleWire * | lwHandle, |
| unsigned int | value | ||
| ) |
Update the prescaler of the PWM module. Adjust this value according to your need for speed in PWM output. Default is 1024. Lower prescale means higher frequency PWM output.
| lwHandle | littleWire device pointer |
| value | Presecaler value (1024, 256, 64, 8 or 1) |
Definition at line 232 of file littleWire.c.