42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_spi_master.h"
68#define MIC24055_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
70 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
71 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
73 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
74 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
75 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
82#define MIC24055_RETVAL uint8_t
84#define MIC24055_OK 0x00
85#define MIC24055_INIT_ERROR 0xFF
#define MIC24055_RETVAL
Definition mic24055.h:82
MIC24055_RETVAL mic24055_init(mic24055_t *ctx, mic24055_cfg_t *cfg)
Initialization function.
void mic24055_set_vout(mic24055_t *ctx, uint16_t voltage)
Set output voltage.
void mic24055_cfg_setup(mic24055_cfg_t *cfg)
Config Object Initialization function.
void mic24055_generic_transfer(mic24055_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
void mic24055_dac_output(mic24055_t *ctx, uint16_t value_dac)
Generic transfer function.
Click configuration structure definition.
Definition mic24055.h:122
spi_master_chip_select_polarity_t cs_polarity
Definition mic24055.h:141
pin_name_t sck
Definition mic24055.h:127
spi_master_mode_t spi_mode
Definition mic24055.h:140
pin_name_t mosi
Definition mic24055.h:126
uint32_t spi_speed
Definition mic24055.h:139
pin_name_t en
Definition mic24055.h:133
pin_name_t int_pin
Definition mic24055.h:135
pin_name_t miso
Definition mic24055.h:125
pin_name_t an
Definition mic24055.h:132
pin_name_t cs
Definition mic24055.h:128
Click ctx object definition.
Definition mic24055.h:99
digital_out_t cs
Definition mic24055.h:104
spi_master_t spi
Definition mic24055.h:112
digital_in_t an
Definition mic24055.h:108
digital_out_t int_pin
Definition mic24055.h:103
digital_out_t en
Definition mic24055.h:102
pin_name_t chip_select
Definition mic24055.h:113