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 SPIISOLATOR4_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
79#define SPIISOLATOR4_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
97#define SPIISOLATOR4_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.en1 = MIKROBUS( mikrobus, MIKROBUS_PWM )
err_t spiisolator4_generic_write(spiisolator4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
SPI Isolator 4 data writing function.
err_t spiisolator4_set_enable(spiisolator4_t *ctx, spiisolator4_enable_mode_t en_mode)
SPI Isolator 4 enable isolator function.
void spiisolator4_cfg_setup(spiisolator4_cfg_t *cfg)
SPI Isolator 4 configuration object setup function.
err_t spiisolator4_init(spiisolator4_t *ctx, spiisolator4_cfg_t *cfg)
SPI Isolator 4 initialization function.
err_t spiisolator4_generic_read(spiisolator4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
SPI Isolator 4 data reading function.
err_t spiisolator4_default_cfg(spiisolator4_t *ctx)
SPI Isolator 4 default configuration function.
This file contains SPI specific macros, functions, etc.
spiisolator4_enable_mode_t
SPI Isolator 4 Click enable mode value data.
Definition spiisolator4.h:161
@ SPIISOLATOR4_ENABLE
Definition spiisolator4.h:163
@ SPIISOLATOR4_DISABLE
Definition spiisolator4.h:162
spiisolator4_return_value_t
SPI Isolator 4 Click return value data.
Definition spiisolator4.h:150
@ SPIISOLATOR4_ERROR
Definition spiisolator4.h:152
@ SPIISOLATOR4_OK
Definition spiisolator4.h:151
SPI Isolator 4 Click configuration object.
Definition spiisolator4.h:128
spi_master_chip_select_polarity_t cs_polarity
Definition spiisolator4.h:141
pin_name_t sck
Definition spiisolator4.h:132
spi_master_mode_t spi_mode
Definition spiisolator4.h:140
pin_name_t en1
Definition spiisolator4.h:136
pin_name_t mosi
Definition spiisolator4.h:131
uint32_t spi_speed
Definition spiisolator4.h:139
pin_name_t miso
Definition spiisolator4.h:130
pin_name_t cs
Definition spiisolator4.h:133
SPI Isolator 4 Click context object.
Definition spiisolator4.h:112
spi_master_t spi
Definition spiisolator4.h:117
digital_out_t en1
Definition spiisolator4.h:114
pin_name_t chip_select
Definition spiisolator4.h:119