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 SPIISOLATOR8_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
74#define SPIISOLATOR8_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
92#define SPIISOLATOR8_MAP_MIKROBUS( cfg, mikrobus ) \
93 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
94 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
95 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
96 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
97 cfg.enc = MIKROBUS( mikrobus, MIKROBUS_AN ); \
98 cfg.enp = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
99 cfg.flt = MIKROBUS( mikrobus, MIKROBUS_INT )
316 uint8_t *data_out, uint8_t len_out );
void spiisolator8_enp_disable(spiisolator8_t *ctx)
SPI Isolator 8 disable side 2 function.
uint8_t spiisolator8_get_fault(spiisolator8_t *ctx)
SPI Isolator 8 get fault function.
err_t spiisolator8_transfer(spiisolator8_t *ctx, uint8_t *data_in, uint8_t *data_out, uint8_t len)
SPI Isolator 8 data transfer function.
void spiisolator8_enp_enable(spiisolator8_t *ctx)
SPI Isolator 8 enable side 2 function.
err_t spiisolator8_read(spiisolator8_t *ctx, uint8_t *data_out, uint8_t len_out)
SPI Isolator 8 data reading function.
void spiisolator8_enc_enable(spiisolator8_t *ctx)
SPI Isolator 8 enable side 1 function.
err_t spiisolator8_write_then_read(spiisolator8_t *ctx, uint8_t *data_in, uint8_t len_in, uint8_t *data_out, uint8_t len_out)
SPI Isolator 8 write then read function.
void spiisolator8_default_cfg(spiisolator8_t *ctx)
SPI Isolator 8 default configuration function.
err_t spiisolator8_init(spiisolator8_t *ctx, spiisolator8_cfg_t *cfg)
SPI Isolator 8 initialization function.
void spiisolator8_cfg_setup(spiisolator8_cfg_t *cfg)
SPI Isolator 8 configuration object setup function.
err_t spiisolator8_write(spiisolator8_t *ctx, uint8_t *data_in, uint8_t len)
SPI Isolator 8 data writing function.
void spiisolator8_enc_disable(spiisolator8_t *ctx)
SPI Isolator 8 disable side 1 function.
This file contains SPI specific macros, functions, etc.
spiisolator8_return_value_t
SPI Isolator 8 Click return value data.
Definition spiisolator8.h:153
@ SPIISOLATOR8_OK
Definition spiisolator8.h:154
@ SPIISOLATOR8_ERROR
Definition spiisolator8.h:155
SPI Isolator 8 Click configuration object.
Definition spiisolator8.h:129
pin_name_t enc
Definition spiisolator8.h:137
spi_master_chip_select_polarity_t cs_polarity
Definition spiisolator8.h:144
pin_name_t sck
Definition spiisolator8.h:133
spi_master_mode_t spi_mode
Definition spiisolator8.h:143
pin_name_t mosi
Definition spiisolator8.h:132
uint32_t spi_speed
Definition spiisolator8.h:142
pin_name_t enp
Definition spiisolator8.h:138
pin_name_t flt
Definition spiisolator8.h:139
pin_name_t miso
Definition spiisolator8.h:131
pin_name_t cs
Definition spiisolator8.h:134
SPI Isolator 8 Click context object.
Definition spiisolator8.h:109
spi_master_t spi
Definition spiisolator8.h:118
digital_out_t enp
Definition spiisolator8.h:112
digital_in_t flt
Definition spiisolator8.h:115
digital_out_t enc
Definition spiisolator8.h:111
pin_name_t chip_select
Definition spiisolator8.h:120