42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
66#define CANFD3_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
68 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
69 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
76#define CANFD3_RETVAL uint8_t
79#define CANFD3_INIT_ERROR 0xFF
86#define CANFD3_MODE_NORMAL 0
87#define CANFD3_MODE_STAND_BY 1
94#define DRV_RX_BUFFER_SIZE 500
#define DRV_RX_BUFFER_SIZE
Definition canfd3.h:94
#define CANFD3_RETVAL
Definition canfd3.h:76
CANFD3_RETVAL canfd3_init(canfd3_t *ctx, canfd3_cfg_t *cfg)
Initialization function.
void canfd3_cfg_setup(canfd3_cfg_t *cfg)
Config Object Initialization function.
int32_t canfd3_generic_read(canfd3_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void canfd3_set_cs_pin(canfd3_t *ctx, uint8_t mode)
Sets the CS pin state.
void canfd3_generic_write(canfd3_t *ctx, char *data_buf, uint16_t len)
Generic write function.
uint8_t canfd3_error_t
Error type.
Definition canfd3.h:148
Click configuration structure definition.
Definition canfd3.h:125
uint32_t baud_rate
Definition canfd3.h:137
bool uart_blocking
Definition canfd3.h:138
uart_data_bits_t data_bit
Definition canfd3.h:139
pin_name_t tx_pin
Definition canfd3.h:129
pin_name_t rx_pin
Definition canfd3.h:128
uart_stop_bits_t stop_bit
Definition canfd3.h:141
uart_parity_t parity_bit
Definition canfd3.h:140
pin_name_t cs
Definition canfd3.h:133
Click ctx object definition.
Definition canfd3.h:107
digital_out_t cs
Definition canfd3.h:110
uart_t uart
Definition canfd3.h:114