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"
76#define SPIISOLATOR3_PIN_STATE_LOW 0
77#define SPIISOLATOR3_PIN_STATE_HIGH 1
95#define SPIISOLATOR3_MAP_MIKROBUS( cfg, mikrobus ) \
96 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
97 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
98 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
99 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
100 cfg.saa = MIKROBUS( mikrobus, MIKROBUS_AN ); \
101 cfg.oen = MIKROBUS( mikrobus, MIKROBUS_RST ); \
102 cfg.aux = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
103 cfg.flt = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t spiisolator3_generic_write(spiisolator3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
SPI Isolator 3 data writing function.
err_t spiisolator3_init(spiisolator3_t *ctx, spiisolator3_cfg_t *cfg)
SPI Isolator 3 initialization function.
err_t spiisolator3_default_cfg(spiisolator3_t *ctx)
SPI Isolator 3 default configuration function.
void spiisolator3_set_aux(spiisolator3_t *ctx, uint8_t aux_state)
SPI Isolator 3 set AUX function.
uint8_t spiisolator3_get_fault(spiisolator3_t *ctx)
SPI Isolator 3 get fault state function.
void spiisolator3_set_side_a_active(spiisolator3_t *ctx, uint8_t saa_state)
SPI Isolator 3 set side A active function.
void spiisolator3_cfg_setup(spiisolator3_cfg_t *cfg)
SPI Isolator 3 configuration object setup function.
void spiisolator3_set_sdo_enable(spiisolator3_t *ctx, uint8_t sdo_state)
SPI Isolator 3 set SDO enable function.
err_t spiisolator3_generic_read(spiisolator3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
SPI Isolator 3 data reading function.
spiisolator3_return_value_t
SPI Isolator 3 Click return value data.
Definition spiisolator3.h:165
@ SPIISOLATOR3_ERROR
Definition spiisolator3.h:167
@ SPIISOLATOR3_OK
Definition spiisolator3.h:166
SPI Isolator 3 Click configuration object.
Definition spiisolator3.h:137
spi_master_chip_select_polarity_t cs_polarity
Definition spiisolator3.h:156
pin_name_t aux
Definition spiisolator3.h:149
pin_name_t sck
Definition spiisolator3.h:142
spi_master_mode_t spi_mode
Definition spiisolator3.h:155
pin_name_t mosi
Definition spiisolator3.h:141
uint32_t spi_speed
Definition spiisolator3.h:154
pin_name_t flt
Definition spiisolator3.h:150
pin_name_t miso
Definition spiisolator3.h:140
pin_name_t oen
Definition spiisolator3.h:148
pin_name_t saa
Definition spiisolator3.h:147
pin_name_t cs
Definition spiisolator3.h:143
SPI Isolator 3 Click context object.
Definition spiisolator3.h:113
spi_master_t spi
Definition spiisolator3.h:126
digital_in_t flt
Definition spiisolator3.h:122
digital_out_t aux
Definition spiisolator3.h:118
digital_out_t oen
Definition spiisolator3.h:117
digital_out_t saa
Definition spiisolator3.h:116
pin_name_t chip_select
Definition spiisolator3.h:128