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_spi_master.h"
73#define EFUSE3_OVERFLOW_LOW 2
74#define EFUSE3_OVERFLOW_HIGH 1
75#define EFUSE3_NO_OVERFLOW 0
88#define EFUSE3_VC_SEL_6_1_V 0
89#define EFUSE3_VC_SEL_6_9_V 1
102#define EFUSE3_FLAG_NORMAL_OPERATION 0
103#define EFUSE3_FLAG_DEVICE_OFF 1
121#define EFUSE3_MAP_MIKROBUS( cfg, mikrobus ) \
122 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
123 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
124 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
125 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
126 cfg.vsel = MIKROBUS( mikrobus, MIKROBUS_RST ); \
127 cfg.en = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
128 cfg.flag = MIKROBUS( mikrobus, MIKROBUS_INT )
efuse3_return_value_t
e Fuse 3 Click return value data.
Definition efuse3.h:188
@ EFUSE3_ERROR
Definition efuse3.h:190
@ EFUSE3_OK
Definition efuse3.h:189
void efuse3_set_overvoltage_clamp(efuse3_t *ctx, uint8_t vc_sel)
e Fuse 3 set overvoltage clamp function.
void efuse3_reset(efuse3_t *ctx)
e Fuse 3 reset function.
err_t efuse3_generic_read(efuse3_t *ctx, uint8_t *data_out, uint8_t len)
e Fuse 3 data reading function.
err_t efuse3_get_monitor_output(efuse3_t *ctx, float *voltage, uint8_t *overflow)
e Fuse 3 get monitor output function.
uint8_t efuse3_get_flag(efuse3_t *ctx)
e Fuse 3 get flag function.
err_t efuse3_get_current(efuse3_t *ctx, float *current)
e Fuse 3 get current function.
err_t efuse3_init(efuse3_t *ctx, efuse3_cfg_t *cfg)
e Fuse 3 initialization function.
void efuse3_disable_device(efuse3_t *ctx)
e Fuse 3 disable device function.
void efuse3_default_cfg(efuse3_t *ctx)
e Fuse 3 default configuration function.
void efuse3_cfg_setup(efuse3_cfg_t *cfg)
e Fuse 3 configuration object setup function.
void efuse3_enable_device(efuse3_t *ctx)
e Fuse 3 enable device function.
e Fuse 3 Click configuration object.
Definition efuse3.h:161
pin_name_t vsel
Definition efuse3.h:171
spi_master_chip_select_polarity_t cs_polarity
Definition efuse3.h:179
pin_name_t sck
Definition efuse3.h:166
pin_name_t flag
Definition efuse3.h:173
spi_master_mode_t spi_mode
Definition efuse3.h:178
pin_name_t mosi
Definition efuse3.h:165
uint32_t spi_speed
Definition efuse3.h:177
pin_name_t en
Definition efuse3.h:172
pin_name_t miso
Definition efuse3.h:164
pin_name_t cs
Definition efuse3.h:167
e Fuse 3 Click context object.
Definition efuse3.h:138
spi_master_t spi
Definition efuse3.h:150
digital_out_t vsel
Definition efuse3.h:141
digital_in_t flag
Definition efuse3.h:146
digital_out_t en
Definition efuse3.h:142
pin_name_t chip_select
Definition efuse3.h:152