pwm2 2.0.0.0
|
Functions | |
void | pwm2_cfg_setup (pwm2_cfg_t *cfg) |
Config Object Initialization function. | |
PWM2_RETVAL | pwm2_init (pwm2_t *ctx, pwm2_cfg_t *cfg) |
Initialization function. | |
void | pwm2_set_duty_cycle (pwm2_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
void | pwm2_pwm_stop (pwm2_t *ctx) |
Stop PWM module. | |
void | pwm2_pwm_start (pwm2_t *ctx) |
Start PWM module. | |
void | pwm2_generic_transfer (pwm2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | pwm2_toggle_phase_shift (pwm2_t *ctx) |
Toggle phase shift. | |
uint8_t | pwm2_set_channel (pwm2_t *ctx, uint8_t n_channel, uint16_t width, uint8_t correction) |
Set channel function. | |
void | pwm2_default_cfg (pwm2_t *ctx) |
Click Default Configuration function. | |
void pwm2_cfg_setup | ( | pwm2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void pwm2_default_cfg | ( | pwm2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for PWM 2 Click.
void pwm2_generic_transfer | ( | pwm2_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
PWM2_RETVAL pwm2_init | ( | pwm2_t * | ctx, |
pwm2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void pwm2_pwm_start | ( | pwm2_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void pwm2_pwm_stop | ( | pwm2_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
uint8_t pwm2_set_channel | ( | pwm2_t * | ctx, |
uint8_t | n_channel, | ||
uint16_t | width, | ||
uint8_t | correction ) |
Set channel function.
ctx | Click object. |
n_channel | Channel select. |
width | Channel width. |
correction | Correction. |
@description This function choose one or more channel of 48.
void pwm2_set_duty_cycle | ( | pwm2_t * | ctx, |
float | duty_cycle ) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
@description This function sets the PWM duty cycle.
void pwm2_toggle_phase_shift | ( | pwm2_t * | ctx | ) |
Toggle phase shift.
ctx | Click object. |
@description This function set toggle phase shift.