rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
|
Functions | |
int | rflpc_pwm_init (rflpc_pin_t pin) |
Inits the PWM peripheral for use with selected pin. More... | |
void | rflpc_pwm_start (void) |
Starts pwm duty cycle. More... | |
void | rflpc_pwm_stop (void) |
Stops pwm duty cycle. More... | |
void | rflpc_pwm_reset (void) |
Resets pwm duty cycle (restart at the start of a period. More... | |
void | rflpc_pwm_set_period (uint32_t period) |
Sets the period in micro seconds. More... | |
void | rflpc_pwm_single_edge (rflpc_pin_t pin, uint32_t pulsewidth) |
Sets the pwm parameters in single edge mode. More... | |
void | rflpc_pwm_double_edge (rflpc_pin_t pin, uint32_t high_edge, uint32_t low_edge) |
Sets the pwm parameters to operate on double edge mode. More... | |
void | rflpc_pwm_enable (rflpc_pin_t pin) |
Enable the PWM on the given pin (do not reset the timer, only enable PWM output) More... | |
void | rflpc_pwm_disable (rflpc_pin_t pin) |
Disable the PWM output on the given pin. More... | |
void rflpc_pwm_disable | ( | rflpc_pin_t | pin | ) |
Disable the PWM output on the given pin.
pin |
void rflpc_pwm_double_edge | ( | rflpc_pin_t | pin, |
uint32_t | high_edge, | ||
uint32_t | low_edge | ||
) |
Sets the pwm parameters to operate on double edge mode.
pin | the PWM pin (same restrictions as in rflpc_pwm_init) |
high_edge | time at which the PWM ouput goes in high state (in microseconds) |
low_edge | time at which the PWM ouput goes in low state (in microseconds) |
void rflpc_pwm_enable | ( | rflpc_pin_t | pin | ) |
Enable the PWM on the given pin (do not reset the timer, only enable PWM output)
pin |
int rflpc_pwm_init | ( | rflpc_pin_t | pin | ) |
Inits the PWM peripheral for use with selected pin.
void rflpc_pwm_reset | ( | void | ) |
Resets pwm duty cycle (restart at the start of a period.
void rflpc_pwm_set_period | ( | uint32_t | period | ) |
Sets the period in micro seconds.
If the PWM timer was running, it is stop, reset and restarted to start on the new period.
period |
void rflpc_pwm_single_edge | ( | rflpc_pin_t | pin, |
uint32_t | pulsewidth | ||
) |
Sets the pwm parameters in single edge mode.
This call makes the PWM outputs a pulse of a given width at the start of each period
pin | the PWM pin (same restriction as rflpc_pwm_init apply) |
pulsewidth | The width of the pulse in micro seconds |
void rflpc_pwm_start | ( | void | ) |
Starts pwm duty cycle.
void rflpc_pwm_stop | ( | void | ) |
Stops pwm duty cycle.