waterdetect3 2.1.0.0
Water Detect 3 Click Driver

API for configuring and manipulating Water Detect 3 Click driver. More...

Topics

 Water Detect 3 MikroBUS Map
 MikroBUS pin mapping of Water Detect 3 Click driver.
 
 Waterdetect3_set
 

Functions

void waterdetect3_cfg_setup (waterdetect3_cfg_t *cfg)
 Water Detect 3 configuration object setup function.
 
err_t waterdetect3_init (waterdetect3_t *ctx, waterdetect3_cfg_t *cfg)
 Water Detect 3 initialization function.
 
uint8_t waterdetect3_get_int (waterdetect3_t *ctx)
 Water Detect 3 interrupt pin reading function.
 

Detailed Description

API for configuring and manipulating Water Detect 3 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ waterdetect3_cfg_setup()

void waterdetect3_cfg_setup ( waterdetect3_cfg_t * cfg)

Water Detect 3 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See waterdetect3_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ waterdetect3_get_int()

uint8_t waterdetect3_get_int ( waterdetect3_t * ctx)

Water Detect 3 interrupt pin reading function.

This function reads the state of the interrupt pin of Water Detect 3 click board.

Parameters
[in]ctx: Click context object. See waterdetect3_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ waterdetect3_init()

err_t waterdetect3_init ( waterdetect3_t * ctx,
waterdetect3_cfg_t * cfg )

Water Detect 3 initialization function.

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

Parameters
[out]ctx: Click context object. See waterdetect3_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See waterdetect3_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.