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"
74#define SERIALIZER_STATUS_OVERTEMPERATURE 0x01
75#define SERIALIZER_STATUS_UNDERVOLTAGE 0x02
85#define SERIALIZER_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
86#define SERIALIZER_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
104#define SERIALIZER_MAP_MIKROBUS( cfg, mikrobus ) \
105 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
106 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
107 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
108 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
109 cfg.flt = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t serializer_read_input(serializer_t *ctx, uint8_t *data_out)
Serializer read input function.
err_t serializer_init(serializer_t *ctx, serializer_cfg_t *cfg)
Serializer initialization function.
void serializer_cfg_setup(serializer_cfg_t *cfg)
Serializer configuration object setup function.
uint8_t serializer_get_flt_pin(serializer_t *ctx)
Serializer get FLT pin function.
serializer_return_value_t
Serializer Click return value data.
Definition serializer.h:157
@ SERIALIZER_ERROR
Definition serializer.h:159
@ SERIALIZER_OK
Definition serializer.h:158
This file contains SPI specific macros, functions, etc.
Serializer Click configuration object.
Definition serializer.h:135
spi_master_chip_select_polarity_t cs_polarity
Definition serializer.h:148
pin_name_t sck
Definition serializer.h:139
spi_master_mode_t spi_mode
Definition serializer.h:147
pin_name_t mosi
Definition serializer.h:138
uint32_t spi_speed
Definition serializer.h:146
pin_name_t flt
Definition serializer.h:143
pin_name_t miso
Definition serializer.h:137
pin_name_t cs
Definition serializer.h:140
Serializer Click context object.
Definition serializer.h:119
spi_master_t spi
Definition serializer.h:124
digital_in_t flt
Definition serializer.h:121
pin_name_t chip_select
Definition serializer.h:126