pwmdriver 2.0.0.0
pwmdriver.h File Reference

This file contains API for Pwm Driver Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_pwm.h"

Go to the source code of this file.

Data Structures

struct  pwmdriver_t
 Click ctx object definition. More...
 
struct  pwmdriver_cfg_t
 Click configuration structure definition. More...
 

Macros

#define PWMDRIVER_MAP_MIKROBUS(cfg, mikrobus)    cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
 
#define PWMDRIVER_RETVAL   uint8_t
 
#define PWMDRIVER_OK   0x00
 
#define PWMDRIVER_INIT_ERROR   0xFF
 
#define PWMDRIVER_DEF_FREQ   20000
 

Functions

void pwmdriver_cfg_setup (pwmdriver_cfg_t *cfg)
 Config Object Initialization function.
 
PWMDRIVER_RETVAL pwmdriver_init (pwmdriver_t *ctx, pwmdriver_cfg_t *cfg)
 Initialization function.
 
void pwmdriver_default_cfg (pwmdriver_t *ctx)
 Click Default Configuration function.
 
void pwmdriver_set_duty_cycle (pwmdriver_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void pwmdriver_pwm_stop (pwmdriver_t *ctx)
 Stop PWM module.
 
void pwmdriver_pwm_start (pwmdriver_t *ctx)
 Start PWM module.
 

Detailed Description

This file contains API for Pwm Driver Click driver.