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 LIN_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
68 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
69 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
70 cfg.wk = MIKROBUS( mikrobus, MIKROBUS_PWM );
77#define LIN_RETVAL uint8_t
80#define LIN_INIT_ERROR 0xFF
87#define DRV_RX_BUFFER_SIZE 500
#define DRV_RX_BUFFER_SIZE
Definition lin.h:87
#define LIN_RETVAL
Definition lin.h:77
void lin_set_wake_up(lin_t *ctx, uint8_t state)
Set wake up pin state.
void lin_cfg_setup(lin_cfg_t *cfg)
Config Object Initialization function.
void lin_generic_write(lin_t *ctx, char *data_buf, uint16_t len)
Generic write function.
void lin_set_enable(lin_t *ctx, uint8_t state)
Set enable pin state.
LIN_RETVAL lin_init(lin_t *ctx, lin_cfg_t *cfg)
Initialization function.
int32_t lin_generic_read(lin_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
uint8_t lin_error_t
Error type.
Definition lin.h:143
Click configuration structure definition.
Definition lin.h:119
uint32_t baud_rate
Definition lin.h:132
pin_name_t wk
Definition lin.h:128
bool uart_blocking
Definition lin.h:133
uart_data_bits_t data_bit
Definition lin.h:134
pin_name_t tx_pin
Definition lin.h:123
pin_name_t rx_pin
Definition lin.h:122
uart_stop_bits_t stop_bit
Definition lin.h:136
pin_name_t en
Definition lin.h:127
uart_parity_t parity_bit
Definition lin.h:135
Click ctx object definition.
Definition lin.h:100
uart_t uart
Definition lin.h:108
digital_out_t wk
Definition lin.h:104
digital_out_t en
Definition lin.h:103