vibromotor3 2.0.0.0
|
This file contains API for Vibro Motor 3 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_pwm.h"
Go to the source code of this file.
Data Structures | |
struct | vibromotor3_t |
Vibro Motor 3 Click context object. More... | |
struct | vibromotor3_cfg_t |
Vibro Motor 3 Click configuration object. More... | |
Enumerations | |
enum | vibromotor3_return_value_t { VIBROMOTOR3_OK = 0 , VIBROMOTOR3_ERROR = -1 } |
Vibro Motor 3 Click return value data. More... | |
Functions | |
void | vibromotor3_cfg_setup (vibromotor3_cfg_t *cfg) |
Vibro Motor 3 configuration object setup function. | |
err_t | vibromotor3_init (vibromotor3_t *ctx, vibromotor3_cfg_t *cfg) |
Vibro Motor 3 initialization function. | |
err_t | vibromotor3_default_cfg (vibromotor3_t *ctx) |
Vibro Motor 3 default configuration function. | |
err_t | vibromotor3_generic_write (vibromotor3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Vibro Motor 3 I2C writing function. | |
err_t | vibromotor3_generic_read (vibromotor3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Vibro Motor 3 I2C reading function. | |
err_t | vibromotor3_set_duty_cycle (vibromotor3_t *ctx, float duty_cycle) |
Vibro Motor 3 sets PWM duty cycle. | |
err_t | vibromotor3_pwm_stop (vibromotor3_t *ctx) |
Vibro Motor 3 stop PWM module. | |
err_t | vibromotor3_pwm_start (vibromotor3_t *ctx) |
Vibro Motor 3 start PWM module. | |
void | vibromotor3_enable (vibromotor3_t *ctx, uint8_t state) |
Enable the device function. | |
void | vibromotor3_write_byte (vibromotor3_t *ctx, uint8_t reg, uint8_t wr_data) |
Generic write the byte of data function. | |
uint8_t | vibromotor3_read_byte (vibromotor3_t *ctx, uint8_t reg) |
Generic read the byte of data function. | |
void | vibromotor3_set_mode (vibromotor3_t *ctx, uint8_t mode_sel) |
Sets the desired mode function. | |
void | vibromotor3_soft_rst (vibromotor3_t *ctx) |
Reset function. | |
void | vibromotor3_stb_mode (vibromotor3_t *ctx, uint8_t state) |
Software standby mode. | |
uint8_t | vibromotor3_get_stat (vibromotor3_t *ctx) |
Get status register value function. | |
void | vibromotor3_set_rtp_input (vibromotor3_t *ctx, uint8_t data_in) |
Sets the desired input for RTP mode function. | |
void | vibromotor3_set_state_hi_z (vibromotor3_t *ctx, uint8_t state) |
Set the devices in HI-Z state function. | |
void | vibromotor3_set_library (vibromotor3_t *ctx, uint8_t lib_sel) |
Set the desired vibrating patterns library. | |
void | vibromotor3_start_motor (vibromotor3_t *ctx, uint8_t state) |
Starts or stops moving the motor function. | |
void | vibromotor3_set_ovdr_offset (vibromotor3_t *ctx, uint8_t data_in) |
Sets overdrive offset function. | |
void | vibromotor3_set_sustain_offset_pos (vibromotor3_t *ctx, uint8_t data_in) |
Sets sustain offset - positive function. | |
void | vibromotor3_set_sustain_offset_neg (vibromotor3_t *ctx, uint8_t data_in) |
Sets sustain offset - negative function. | |
void | vibromotor3_set_brake_time_offset (vibromotor3_t *ctx, uint8_t data_in) |
Sets brake time offset function. | |
void | vibromotor3_set_rated_volt (vibromotor3_t *ctx, uint8_t data_in) |
Sets the reference voltage function. | |
void | vibromotor3_set_ovdrv_clamp_volt (vibromotor3_t *ctx, uint8_t data_in) |
Sets a clamp function. | |
uint8_t | vibromotor3_get_calib_res_comp (vibromotor3_t *ctx) |
Reads the voltage-compensation function. | |
float | vibromotor3_get_supply_volt_val (vibromotor3_t *ctx) |
Reading of the supply voltage function. | |
float | vibromotor3_get_lra_resonance_period (vibromotor3_t *ctx) |
Reads the measurement of the LRA resonance period function. | |
void | vibromotor3_set_lra_mode (vibromotor3_t *ctx, uint8_t state) |
Sets the device in LRA mode function. | |
void | vibromotor3_set_brake_factor (vibromotor3_t *ctx, uint8_t brk_fac) |
Set brake factor function. | |
void | vibromotor3_set_loop_gain (vibromotor3_t *ctx, uint8_t gain) |
Selects a loop gain function. | |
void | vibromotor3_set_input (vibromotor3_t *ctx, uint8_t data_in) |
Sets the input to PWM or analog function. | |
void | vibromotor3_enable_ac_coulping (vibromotor3_t *ctx) |
Applies a 0.9-V common mode voltage function. | |
This file contains API for Vibro Motor 3 Click Driver.