vibromotor  2.0.0.0
Data Structures | Macros | Functions
vibromotor.h File Reference

This file contains API for VIBRO MOTOR 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  vibromotor_t
 Click ctx object definition. More...
 
struct  vibromotor_cfg_t
 Click configuration structure definition. More...
 

Macros

#define VIBROMOTOR_MAP_MIKROBUS(cfg, mikrobus)   cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
 
#define VIBROMOTOR_RETVAL   uint8_t
 
#define VIBROMOTOR_OK   0x00
 
#define VIBROMOTOR_INIT_ERROR   0xFF
 
#define VIBROMOTOR_DEF_FREQ   20000
 

Functions

void vibromotor_cfg_setup (vibromotor_cfg_t *cfg)
 Config Object Initialization function. More...
 
VIBROMOTOR_RETVAL vibromotor_init (vibromotor_t *ctx, vibromotor_cfg_t *cfg)
 Initialization function. More...
 
void vibromotor_default_cfg (vibromotor_t *ctx)
 Click Default Configuration function. More...
 
void vibromotor_set_duty_cycle (vibromotor_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle. More...
 
void vibromotor_pwm_stop (vibromotor_t *ctx)
 Stop PWM module. More...
 
void vibromotor_pwm_start (vibromotor_t *ctx)
 Start PWM module. More...
 

Detailed Description

This file contains API for VIBRO MOTOR Click driver.