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_i2c_master.h"
73#define ISOADC3_RESOLUTION 4096
74#define ISOADC3_OFFSET 1287
75#define ISOADC3_ADC_NUM_OF_MEASURE 100.0
76#define ISOADC3_12_BIT_DATA 0x0FFF
84#define ISOADC3_VREF_3V3 3336
85#define ISOADC3_VREF_5V 5070
92#define ISOADC3_SET_DEV_ADDR 0x4D
110#define ISOADC3_MAP_MIKROBUS( cfg, mikrobus ) \
111 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
112 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
uint16_t isoadc3_read_voltage(isoadc3_t *ctx, uint16_t v_ref)
Read voltage function.
err_t isoadc3_generic_write(isoadc3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
ISO ADC 3 I2C writing function.
err_t isoadc3_generic_read(isoadc3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
ISO ADC 3 I2C reading function.
uint16_t isoadc3_read_adc(isoadc3_t *ctx)
Read ADC function.
uint16_t isoadc3_get_adc_voltage(isoadc3_t *ctx, uint16_t v_ref)
Read ADC voltage function.
err_t isoadc3_init(isoadc3_t *ctx, isoadc3_cfg_t *cfg)
ISO ADC 3 initialization function.
void isoadc3_cfg_setup(isoadc3_cfg_t *cfg)
ISO ADC 3 configuration object setup function.
isoadc3_return_value_t
ISO ADC 3 Click return value data.
Definition isoadc3.h:150
@ ISOADC3_OK
Definition isoadc3.h:151
@ ISOADC3_ERROR
Definition isoadc3.h:152
ISO ADC 3 Click configuration object.
Definition isoadc3.h:136
uint32_t i2c_speed
Definition isoadc3.h:140
pin_name_t scl
Definition isoadc3.h:137
pin_name_t sda
Definition isoadc3.h:138
uint8_t i2c_address
Definition isoadc3.h:141
ISO ADC 3 Click context object.
Definition isoadc3.h:122
i2c_master_t i2c
Definition isoadc3.h:124
uint8_t slave_address
Definition isoadc3.h:127