39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define CANISOLATOR3_PIN_STATE_HIGH 0x01
74#define CANISOLATOR3_PIN_STATE_LOW 0x00
81#define CANISOLATOR3_TX_DRV_BUFFER_SIZE 100
82#define CANISOLATOR3_RX_DRV_BUFFER_SIZE 300
100#define CANISOLATOR3_MAP_MIKROBUS( cfg, mikrobus ) \
101 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
102 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
103 cfg.pol = MIKROBUS( mikrobus, MIKROBUS_PWM )
canisolator3_return_value_t
CAN Isolator 3 Click return value data.
Definition canisolator3.h:153
@ CANISOLATOR3_ERROR
Definition canisolator3.h:155
@ CANISOLATOR3_OK
Definition canisolator3.h:154
#define CANISOLATOR3_RX_DRV_BUFFER_SIZE
Definition canisolator3.h:82
#define CANISOLATOR3_TX_DRV_BUFFER_SIZE
CAN Isolator 3 driver buffer size.
Definition canisolator3.h:81
void canisolator3_set_pol_pin(canisolator3_t *ctx, uint8_t pin_state)
CAN Isolator 3 set polarity function.
void canisolator3_cfg_setup(canisolator3_cfg_t *cfg)
CAN Isolator 3 configuration object setup function.
err_t canisolator3_generic_read(canisolator3_t *ctx, uint8_t *data_out, uint16_t len)
CAN Isolator 3 data reading function.
void canisolator3_default_cfg(canisolator3_t *ctx)
CAN Isolator 3 default configuration function.
err_t canisolator3_generic_write(canisolator3_t *ctx, uint8_t *data_in, uint16_t len)
CAN Isolator 3 data writing function.
err_t canisolator3_init(canisolator3_t *ctx, canisolator3_cfg_t *cfg)
CAN Isolator 3 initialization function.
CAN Isolator 3 Click configuration object.
Definition canisolator3.h:131
uint32_t baud_rate
Definition canisolator3.h:140
pin_name_t pol
Definition canisolator3.h:137
bool uart_blocking
Definition canisolator3.h:141
uart_data_bits_t data_bit
Definition canisolator3.h:142
pin_name_t tx_pin
Definition canisolator3.h:134
pin_name_t rx_pin
Definition canisolator3.h:133
uart_stop_bits_t stop_bit
Definition canisolator3.h:144
uart_parity_t parity_bit
Definition canisolator3.h:143
CAN Isolator 3 Click context object.
Definition canisolator3.h:113
uart_t uart
Definition canisolator3.h:118
digital_out_t pol
Definition canisolator3.h:115