microwave5 2.1.0.0
microwave5.h File Reference

This file contains API for Microwave 5 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  microwave5_t
 Microwave 5 Click context object. More...
 
struct  microwave5_cfg_t
 Microwave 5 Click configuration object. More...
 

Macros

#define MICROWAVE5_ADC_RESOLUTION   0x0FFF
 Microwave 5 ADC setting.
 
#define MICROWAVE5_VREF_3V3   3.3
 
#define MICROWAVE5_VREF_5V   5.0
 
#define MICROWAVE5_SET_DEV_ADDR   0x4D
 Microwave 5 device address setting.
 
#define MICROWAVE5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  microwave5_drv_t { MICROWAVE5_DRV_SEL_ADC , MICROWAVE5_DRV_SEL_I2C }
 Microwave 5 Click driver selector. More...
 
enum  microwave5_return_value_t { MICROWAVE5_OK = 0 , MICROWAVE5_ERROR = -1 }
 Microwave 5 Click return value data. More...
 

Functions

void microwave5_cfg_setup (microwave5_cfg_t *cfg)
 Microwave 5 configuration object setup function.
 
void microwave5_drv_interface_selection (microwave5_cfg_t *cfg, microwave5_drv_t drv_sel)
 Microwave 5 driver interface setup function.
 
err_t microwave5_init (microwave5_t *ctx, microwave5_cfg_t *cfg)
 Microwave 5 initialization function.
 
err_t microwave5_read_raw_adc (microwave5_t *ctx, uint16_t *raw_adc)
 Microwave 5 read raw ADC value function.
 
err_t microwave5_read_voltage (microwave5_t *ctx, float *voltage)
 Microwave 5 read voltage level function.
 
err_t microwave5_set_vref (microwave5_t *ctx, float vref)
 Microwave 5 set vref function.
 

Detailed Description

This file contains API for Microwave 5 Click Driver.

Enumeration Type Documentation

◆ microwave5_drv_t

Microwave 5 Click driver selector.

Selects target driver interface of Microwave 5 Click driver.

Enumerator
MICROWAVE5_DRV_SEL_ADC 

ADC driver descriptor.

MICROWAVE5_DRV_SEL_I2C 

I2C driver descriptor.

◆ microwave5_return_value_t

Microwave 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
MICROWAVE5_OK 
MICROWAVE5_ERROR