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"
78#define SPIISOLATOR5_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
79#define SPIISOLATOR5_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
97#define SPIISOLATOR5_MAP_MIKROBUS( cfg, mikrobus ) \
98 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
99 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
100 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
101 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
102 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST )
void spiisolator5_enable(spiisolator5_t *ctx)
SPI Isolator 5 enable function.
err_t spiisolator5_read(spiisolator5_t *ctx, uint8_t *data_out, uint8_t len_out)
SPI Isolator 5 data reading function.
err_t spiisolator5_transfer(spiisolator5_t *ctx, uint8_t *data_in, uint8_t *data_out, uint8_t len)
SPI Isolator 5 transfer function.
void spiisolator5_disable(spiisolator5_t *ctx)
SPI Isolator 5 disable function.
void spiisolator5_cfg_setup(spiisolator5_cfg_t *cfg)
SPI Isolator 5 configuration object setup function.
err_t spiisolator5_write(spiisolator5_t *ctx, uint8_t *data_in, uint8_t len)
SPI Isolator 5 data writing function.
err_t spiisolator5_write_then_read(spiisolator5_t *ctx, uint8_t *data_in, uint8_t len_in, uint8_t *data_out, uint8_t len_out)
SPI Isolator 5 write then read function.
err_t spiisolator5_init(spiisolator5_t *ctx, spiisolator5_cfg_t *cfg)
SPI Isolator 5 initialization function.
This file contains SPI specific macros, functions, etc.
spiisolator5_return_value_t
SPI Isolator 5 Click return value data.
Definition spiisolator5.h:150
@ SPIISOLATOR5_ERROR
Definition spiisolator5.h:152
@ SPIISOLATOR5_OK
Definition spiisolator5.h:151
SPI Isolator 5 Click configuration object.
Definition spiisolator5.h:128
spi_master_chip_select_polarity_t cs_polarity
Definition spiisolator5.h:141
pin_name_t sck
Definition spiisolator5.h:132
spi_master_mode_t spi_mode
Definition spiisolator5.h:140
pin_name_t mosi
Definition spiisolator5.h:131
uint32_t spi_speed
Definition spiisolator5.h:139
pin_name_t en
Definition spiisolator5.h:136
pin_name_t miso
Definition spiisolator5.h:130
pin_name_t cs
Definition spiisolator5.h:133
SPI Isolator 5 Click context object.
Definition spiisolator5.h:112
spi_master_t spi
Definition spiisolator5.h:117
digital_out_t en
Definition spiisolator5.h:114
pin_name_t chip_select
Definition spiisolator5.h:119