alcohol 2.0.0.0
alcohol.h File Reference

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

#include "drv_digital_in.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  alcohol_t
 Alcohol Click context object. More...
 
struct  alcohol_cfg_t
 Alcohol Click configuration object. More...
 

Macros

#define ALCOHOL_MAP_MIKROBUS(cfg, mikrobus)    cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN );
 MikroBUS pin mapping.
 

Enumerations

enum  alcohol_return_value_t { ALCOHOL_OK = 0 , ALCOHOL_ERROR = -1 }
 Alcohol Click return value data. More...
 

Functions

void alcohol_cfg_setup (alcohol_cfg_t *cfg)
 Alcohol configuration object setup function.
 
err_t alcohol_init (alcohol_t *ctx, alcohol_cfg_t *cfg)
 Alcohol initialization function.
 
err_t alcohol_read_an_pin_value (alcohol_t *ctx, uint16_t *data_out)
 Alcohol read AN pin value function.
 
err_t alcohol_read_an_pin_voltage (alcohol_t *ctx, float *data_out)
 Alcohol read AN pin voltage level function.
 

Detailed Description

This file contains API for Alcohol Click Driver.

Enumeration Type Documentation

◆ alcohol_return_value_t

Alcohol Click return value data.

Predefined enum values for driver return values.

Enumerator
ALCOHOL_OK 
ALCOHOL_ERROR