39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
52#include "drv_i2c_master.h"
79#define MICROWAVE5_ADC_RESOLUTION 0x0FFF
80#define MICROWAVE5_VREF_3V3 3.3
81#define MICROWAVE5_VREF_5V 5.0
88#define MICROWAVE5_SET_DEV_ADDR 0x4D
106#define MICROWAVE5_MAP_MIKROBUS( cfg, mikrobus ) \
107 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
108 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
109 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
err_t microwave5_read_voltage(microwave5_t *ctx, float *voltage)
Microwave 5 read voltage level function.
void microwave5_drv_interface_selection(microwave5_cfg_t *cfg, microwave5_drv_t drv_sel)
Microwave 5 driver interface setup function.
err_t microwave5_set_vref(microwave5_t *ctx, float vref)
Microwave 5 set vref function.
err_t microwave5_read_raw_adc(microwave5_t *ctx, uint16_t *raw_adc)
Microwave 5 read raw ADC value function.
void microwave5_cfg_setup(microwave5_cfg_t *cfg)
Microwave 5 configuration object setup function.
err_t microwave5_init(microwave5_t *ctx, microwave5_cfg_t *cfg)
Microwave 5 initialization function.
microwave5_return_value_t
Microwave 5 Click return value data.
Definition microwave5.h:165
@ MICROWAVE5_OK
Definition microwave5.h:166
@ MICROWAVE5_ERROR
Definition microwave5.h:167
microwave5_drv_t
Microwave 5 Click driver selector.
Definition microwave5.h:119
@ MICROWAVE5_DRV_SEL_I2C
Definition microwave5.h:121
@ MICROWAVE5_DRV_SEL_ADC
Definition microwave5.h:120
Microwave 5 Click configuration object.
Definition microwave5.h:145
analog_in_resolution_t resolution
Definition microwave5.h:150
float vref
Definition microwave5.h:151
uint32_t i2c_speed
Definition microwave5.h:153
microwave5_drv_t drv_sel
Definition microwave5.h:156
pin_name_t scl
Definition microwave5.h:147
pin_name_t sda
Definition microwave5.h:148
pin_name_t an
Definition microwave5.h:146
uint8_t i2c_address
Definition microwave5.h:154
Microwave 5 Click context object.
Definition microwave5.h:130
float vref
Definition microwave5.h:135
microwave5_drv_t drv_sel
Definition microwave5.h:136
i2c_master_t i2c
Definition microwave5.h:132
uint8_t slave_address
Definition microwave5.h:134
analog_in_t adc
Definition microwave5.h:131