vibromotor2 2.0.0.0
vibromotor2.h File Reference

This file contains API for Vibro Motor 2 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  vibromotor2_t
 Vibro Motor 2 Click driver selector. More...
 
struct  vibromotor2_cfg_t
 Vibro Motor 2 Click configuration object. More...
 

Macros

#define VIBROMOTOR2_DEF_FREQ   5000
 Vibro Motor 2 default PWM frequency.
 
#define VIBROMOTOR2_MAP_MIKROBUS(cfg, mikrobus)    cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
 MikroBUS pin mapping.
 

Enumerations

enum  vibromotor2_return_value_t { VIBROMOTOR2_OK = 0 , VIBROMOTOR2_ERROR = -1 }
 Vibro Motor 2 Click return value data. More...
 

Functions

void vibromotor2_cfg_setup (vibromotor2_cfg_t *cfg)
 Vibro Motor 2 configuration object setup function.
 
err_t vibromotor2_init (vibromotor2_t *ctx, vibromotor2_cfg_t *cfg)
 Vibro Motor 2 initialization function.
 
err_t vibromotor2_set_duty_cycle (vibromotor2_t *ctx, float duty_cycle)
 Vibro Motor 2 sets PWM duty cycle.
 
err_t vibromotor2_pwm_stop (vibromotor2_t *ctx)
 Vibro Motor 2 stop PWM module.
 
err_t vibromotor2_pwm_start (vibromotor2_t *ctx)
 Vibro Motor 2 start PWM module.
 

Detailed Description

This file contains API for Vibro Motor 2 Click Driver.

Enumeration Type Documentation

◆ vibromotor2_return_value_t

Vibro Motor 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
VIBROMOTOR2_OK 
VIBROMOTOR2_ERROR