tamper 2.0.0.0
Public function

Functions

void tamper_cfg_setup (tamper_cfg_t *cfg)
 Config Object Initialization function.
 
TAMPER_RETVAL tamper_init (tamper_t *ctx, tamper_cfg_t *cfg)
 Initialization function.
 
uint8_t tamper_state (tamper_t *ctx)
 Switch state detection function.
 

Detailed Description

Function Documentation

◆ tamper_cfg_setup()

void tamper_cfg_setup ( tamper_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.

◆ tamper_init()

TAMPER_RETVAL tamper_init ( tamper_t * ctx,
tamper_cfg_t * cfg )

Initialization function.

Parameters
tamperClick object.
cfgClick configuration structure.

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

◆ tamper_state()

uint8_t tamper_state ( tamper_t * ctx)

Switch state detection function.

Parameters
ctxClick object.
Returns
switch state
  • 1 : switch ON
  • 0 : switch OFF

@description Function showes the state of the switch.

Note
switch state: 0 - open, 1 - closed