42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_spi_master.h"
68#define C420MAT_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
70 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
71 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
79#define C420MAT_RETVAL uint8_t
81#define C420MAT_OK 0x00
82#define C420MAT_INIT_ERROR 0xFF
#define C420MAT_RETVAL
Definition c420mat.h:79
void c420mat_generic_transfer(c420mat_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
C420MAT_RETVAL c420mat_init(c420mat_t *ctx, c420mat_cfg_t *cfg)
Initialization function.
void c420mat_cfg_setup(c420mat_cfg_t *cfg)
Config Object Initialization function.
void c420mat_set_i_out(c420mat_t *ctx, uint8_t i_out)
t40ma_set_vout.
void c420mat_dac_output(c420mat_t *ctx, uint16_t value_dac)
c420mat_dac_output.
Click configuration structure definition.
Definition c420mat.h:110
spi_master_chip_select_polarity_t cs_polarity
Definition c420mat.h:122
pin_name_t sck
Definition c420mat.h:115
spi_master_mode_t spi_mode
Definition c420mat.h:121
pin_name_t mosi
Definition c420mat.h:114
uint32_t spi_speed
Definition c420mat.h:120
pin_name_t miso
Definition c420mat.h:113
pin_name_t cs
Definition c420mat.h:116
Click ctx object definition.
Definition c420mat.h:96
digital_out_t cs
Definition c420mat.h:97
spi_master_t spi
Definition c420mat.h:101
pin_name_t chip_select
Definition c420mat.h:102