vibrasense 2.0.0.0

Functions

void vibrasense_cfg_setup (vibrasense_cfg_t *cfg)
 Config Object Initialization function.
 
VIBRASENSE_RETVAL vibrasense_init (vibrasense_t *ctx, vibrasense_cfg_t *cfg)
 Initialization function.
 
void vibrasense_set_mode (vibrasense_t *ctx, uint8_t en_mode)
 Set vibra sense mode function.
 
void vibrasense_reset (vibrasense_t *ctx)
 Reset vibra sense function.
 
uint8_t vibrasense_check_interrupt (vibrasense_t *ctx)
 Check interrupt function.
 

Detailed Description

Function Documentation

◆ vibrasense_cfg_setup()

void vibrasense_cfg_setup ( vibrasense_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ vibrasense_check_interrupt()

uint8_t vibrasense_check_interrupt ( vibrasense_t * ctx)

Check interrupt function.

Parameters
vibrasenseClick object.
Returns
 0 Interrupt has not occured;
 1 Interrupt has occured;

Function is used to check for an interrupt that indicates that the device has detected vibrations.

◆ vibrasense_init()

VIBRASENSE_RETVAL vibrasense_init ( vibrasense_t * ctx,
vibrasense_cfg_t * cfg )

Initialization function.

Parameters
vibrasenseClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ vibrasense_reset()

void vibrasense_reset ( vibrasense_t * ctx)

Reset vibra sense function.

Parameters
vibrasenseClick object.

Function resets the device.

Note
This function has small 200ms delay.

◆ vibrasense_set_mode()

void vibrasense_set_mode ( vibrasense_t * ctx,
uint8_t en_mode )

Set vibra sense mode function.

Parameters
vibrasenseClick object.
[in]en_mode
 0 : Disable vibra sense;
 1 : Enable vibra sense;

Function sets the vibra sense mode.