39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
74#define MCP2003B_TX_DRV_BUFFER_SIZE 100
75#define MCP2003B_RX_DRV_BUFFER_SIZE 300
93#define MCP2003B_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
95 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
96 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS );
#define MCP2003B_TX_DRV_BUFFER_SIZE
MCP2003B driver buffer size.
Definition mcp2003b.h:74
#define MCP2003B_RX_DRV_BUFFER_SIZE
Definition mcp2003b.h:75
err_t mcp2003b_generic_read(mcp2003b_t *ctx, uint8_t *data_out, uint16_t len)
MCP2003B data reading function.
err_t mcp2003b_generic_write(mcp2003b_t *ctx, uint8_t *data_in, uint16_t len)
MCP2003B data writing function.
void mcp2003b_set_cs_pin(mcp2003b_t *ctx, uint8_t state)
MCP2003B set cs pin function.
void mcp2003b_cfg_setup(mcp2003b_cfg_t *cfg)
MCP2003B configuration object setup function.
err_t mcp2003b_init(mcp2003b_t *ctx, mcp2003b_cfg_t *cfg)
MCP2003B initialization function.
mcp2003b_return_value_t
MCP2003B Click return value data.
Definition mcp2003b.h:146
@ MCP2003B_OK
Definition mcp2003b.h:147
@ MCP2003B_ERROR
Definition mcp2003b.h:148
MCP2003B Click configuration object.
Definition mcp2003b.h:124
uint32_t baud_rate
Definition mcp2003b.h:133
bool uart_blocking
Definition mcp2003b.h:134
uart_data_bits_t data_bit
Definition mcp2003b.h:135
pin_name_t tx_pin
Definition mcp2003b.h:127
pin_name_t rx_pin
Definition mcp2003b.h:126
uart_stop_bits_t stop_bit
Definition mcp2003b.h:137
uart_parity_t parity_bit
Definition mcp2003b.h:136
pin_name_t cs
Definition mcp2003b.h:130
MCP2003B Click context object.
Definition mcp2003b.h:106
digital_out_t cs
Definition mcp2003b.h:108
uart_t uart
Definition mcp2003b.h:111