tamper2 2.0.0.0
Public function

Functions

void tamper2_cfg_setup (tamper2_cfg_t *cfg)
 Config Object Initialization function.
 
TAMPER2_RETVAL tamper2_init (tamper2_t *ctx, tamper2_cfg_t *cfg)
 Initialization function.
 
uint8_t tamper2_get_off_state (tamper2_t *ctx)
 Switch OFF detect.
 
uint8_t tamper2_get_on_state (tamper2_t *ctx)
 Switch ON detect.
 

Detailed Description

Function Documentation

◆ tamper2_cfg_setup()

void tamper2_cfg_setup ( tamper2_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.

◆ tamper2_get_off_state()

uint8_t tamper2_get_off_state ( tamper2_t * ctx)

Switch OFF detect.

Parameters
ctxClick object. @description This function detects if the switch is in OFF state.

◆ tamper2_get_on_state()

uint8_t tamper2_get_on_state ( tamper2_t * ctx)

Switch ON detect.

Parameters
ctxClick object. @description This function detects if the switch is in ON state.

◆ tamper2_init()

TAMPER2_RETVAL tamper2_init ( tamper2_t * ctx,
tamper2_cfg_t * cfg )

Initialization function.

Parameters
tamper2Click object.
cfgClick configuration structure.

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