turbidity 2.0.0.0
turbidity.h File Reference

This file contains API for Turbidity Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  turbidity_t
 Turbidity Click context object. More...
 
struct  turbidity_cfg_t
 Turbidity Click configuration object. More...
 

Macros

#define TURBIDITY_SET_DEV_ADDR   0x4D
 Turbidity device address setting.
 
#define TURBIDITY_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  turbidity_return_value_t { TURBIDITY_OK = 0 , TURBIDITY_ERROR = -1 }
 Turbidity Click return value data. More...
 

Functions

void turbidity_cfg_setup (turbidity_cfg_t *cfg)
 Turbidity configuration object setup function.
 
err_t turbidity_init (turbidity_t *ctx, turbidity_cfg_t *cfg)
 Turbidity initialization function.
 
err_t turbidity_default_cfg (turbidity_t *ctx)
 Turbidity default configuration function.
 
err_t turbidity_generic_read (turbidity_t *ctx, uint8_t *rx_buf, uint8_t rx_len)
 Turbidity I2C reading function.
 
err_t turbidity_read_adc (turbidity_t *ctx, uint16_t *adc_val)
 Turbidity read ADC function.
 
err_t turbidity_get_adc_voltage (turbidity_t *ctx, float *voltage)
 Turbidity get voltage function.
 
err_t turbidity_get_ntu (turbidity_t *ctx, float *ntu)
 Turbidity get NTU function.
 

Detailed Description

This file contains API for Turbidity Click Driver.

Enumeration Type Documentation

◆ turbidity_return_value_t

Turbidity Click return value data.

Predefined enum values for driver return values.

Enumerator
TURBIDITY_OK 
TURBIDITY_ERROR