pwm2 2.0.0.0
|
This file contains API for PWM 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_pwm.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | pwm2_t |
Click ctx object definition. More... | |
struct | pwm_channel_t |
struct | pwm2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | PWM2_MAP_MIKROBUS(cfg, mikrobus) |
#define | PWM2_RETVAL uint8_t |
#define | PWM2_OK 0x00 |
#define | PWM2_INIT_ERROR 0xFF |
#define | PWM2_DEF_FREQ 20000 |
#define | PWM2_CLOCK_25_MHZ 25000000 |
#define | PWM2_CLOCK_15_MHZ 15000000 |
#define | PWM2_CLOCK_5_MHZ 5000000 |
#define | PWM2_100_PERCENT_DUTY 4095 |
#define | PWM2_75_PERCENT_DUTY 3072 |
#define | PWM2_50_PERCENT_DUTY 2048 |
#define | PWM2_25_PERCENT_DUTY 1024 |
#define | PWM2_NO_CORRECTION 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. | |
This file contains API for PWM 2 Click driver.