microwave6 2.1.0.0
microwave6.h File Reference

This file contains API for Microwave 6 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  microwave6_t
 Microwave 6 Click context object. More...
 
struct  microwave6_cfg_t
 Microwave 6 Click configuration object. More...
 

Macros

#define MICROWAVE6_ADC_RESOLUTION   0x0FFF
 Microwave 6 ADC setting.
 
#define MICROWAVE6_VREF_3V3   3.3
 
#define MICROWAVE6_VREF_5V   5.0
 
#define MICROWAVE6_SET_DEV_ADDR   0x4D
 Microwave 6 device address setting.
 
#define MICROWAVE6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  microwave6_drv_t { MICROWAVE6_DRV_SEL_ADC , MICROWAVE6_DRV_SEL_I2C }
 Microwave 6 Click driver selector. More...
 
enum  microwave6_return_value_t { MICROWAVE6_OK = 0 , MICROWAVE6_ERROR = -1 }
 Microwave 6 Click return value data. More...
 

Functions

void microwave6_cfg_setup (microwave6_cfg_t *cfg)
 Microwave 6 configuration object setup function.
 
void microwave6_drv_interface_selection (microwave6_cfg_t *cfg, microwave6_drv_t drv_sel)
 Microwave 6 driver interface setup function.
 
err_t microwave6_init (microwave6_t *ctx, microwave6_cfg_t *cfg)
 Microwave 6 initialization function.
 
err_t microwave6_read_raw_adc (microwave6_t *ctx, uint16_t *raw_adc)
 Microwave 6 read raw ADC value function.
 
err_t microwave6_read_voltage (microwave6_t *ctx, float *voltage)
 Microwave 6 read voltage level function.
 
err_t microwave6_set_vref (microwave6_t *ctx, float vref)
 Microwave 6 set vref function.
 

Detailed Description

This file contains API for Microwave 6 Click Driver.

Enumeration Type Documentation

◆ microwave6_drv_t

Microwave 6 Click driver selector.

Selects target driver interface of Microwave 6 Click driver.

Enumerator
MICROWAVE6_DRV_SEL_ADC 

ADC driver descriptor.

MICROWAVE6_DRV_SEL_I2C 

I2C driver descriptor.

◆ microwave6_return_value_t

Microwave 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
MICROWAVE6_OK 
MICROWAVE6_ERROR