waterdetect2 2.1.0.0
Water Detect 2 Click Driver

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

Topics

 Water Detect 2 MikroBUS Map
 MikroBUS pin mapping of Water Detect 2 Click driver.
 
 Water Detect 2 status of the fluid detection.
 Status of the fluid detection of Water Detect 2 Click driver.
 

Functions

void waterdetect2_cfg_setup (waterdetect2_cfg_t *cfg)
 Water Detect 2 configuration object setup function.
 
err_t waterdetect2_init (waterdetect2_t *ctx, waterdetect2_cfg_t *cfg)
 Water Detect 2 initialization function.
 
void waterdetect2_default_cfg (waterdetect2_t *ctx)
 Water Detect 2 default configuration function.
 
void waterdetect2_enable (waterdetect2_t *ctx)
 Water Detect 2 enable function.
 
void waterdetect2_disable (waterdetect2_t *ctx)
 Water Detect 2 disable function.
 
uint8_t waterdetect2_get_fluid_status (waterdetect2_t *ctx)
 Water Detect 2 get fluid status function.
 

Detailed Description

API for configuring and manipulating Water Detect 2 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

◆ waterdetect2_cfg_setup()

void waterdetect2_cfg_setup ( waterdetect2_cfg_t * cfg)

Water Detect 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ waterdetect2_default_cfg()

void waterdetect2_default_cfg ( waterdetect2_t * ctx)

Water Detect 2 default configuration function.

This function executes a default configuration of Water Detect 2 click board.

Parameters
[in]ctx: Click context object. See waterdetect2_t object definition for detailed explanation.
Returns
Nothing.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ waterdetect2_disable()

void waterdetect2_disable ( waterdetect2_t * ctx)

Water Detect 2 disable function.

This function clears the ON (PWM) pin on the low level to disable water detection of the Water Detect 2 click boardâ„¢.

Parameters
[in]ctx: Click context object. See waterdetect2_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ waterdetect2_enable()

void waterdetect2_enable ( waterdetect2_t * ctx)

Water Detect 2 enable function.

This function sets the ON (PWM) pin on the high level to enable water detection of the Water Detect 2 click boardâ„¢.

Parameters
[in]ctx: Click context object. See waterdetect2_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ waterdetect2_get_fluid_status()

uint8_t waterdetect2_get_fluid_status ( waterdetect2_t * ctx)

Water Detect 2 get fluid status function.

This function reads the fluid presence status of the Water Detect 2 click boardâ„¢.

Parameters
[in]ctx: Click context object. See waterdetect2_t object definition for detailed explanation.
Returns
  • 0 - Fluid is present,
  • 1 - No fluid present.
Note
None.

◆ waterdetect2_init()

err_t waterdetect2_init ( waterdetect2_t * ctx,
waterdetect2_cfg_t * cfg )

Water Detect 2 initialization function.

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

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