reed 2.0.0.0
Public function

Functions

void reed_cfg_setup (reed_cfg_t *cfg)
 Config Object Initialization function.
 
err_t reed_init (reed_t *ctx, reed_cfg_t *cfg)
 Initialization function.
 
uint8_t reed_get_status (reed_t *ctx)
 Get sensor magnetic detected status function.
 

Detailed Description

Function Documentation

◆ reed_cfg_setup()

void reed_cfg_setup ( reed_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.

◆ reed_get_status()

uint8_t reed_get_status ( reed_t * ctx)

Get sensor magnetic detected status function.

Parameters
ctxClick object.
Returns
 0 : no magnetic field 
 1 : magnetic field detected 

@description This will return 1 if a magnetic field detected and 0 if not detected.

◆ reed_init()

err_t reed_init ( reed_t * ctx,
reed_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0 - Ok, (-1) - Error.

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