42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
67#define FIBEROPT_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX );
77#define FIBEROPT_ERROR -1
84#define FIBEROPT_DRV_TX_BUFFER_SIZE 100
85#define FIBEROPT_DRV_RX_BUFFER_SIZE 300
#define FIBEROPT_DRV_RX_BUFFER_SIZE
Definition fiberopt.h:85
#define FIBEROPT_DRV_TX_BUFFER_SIZE
Definition fiberopt.h:84
err_t fiberopt_init(fiberopt_t *ctx, fiberopt_cfg_t *cfg)
Initialization function.
void fiberopt_cfg_setup(fiberopt_cfg_t *cfg)
Config Object Initialization function.
err_t fiberopt_generic_write(fiberopt_t *ctx, uint8_t *data_buf, uint16_t len)
Generic write function.
err_t fiberopt_generic_read(fiberopt_t *ctx, uint8_t *data_buf, uint16_t len)
Generic read function.
Click configuration structure definition.
Definition fiberopt.h:113
uint32_t baud_rate
Definition fiberopt.h:119
bool uart_blocking
Definition fiberopt.h:120
uart_data_bits_t data_bit
Definition fiberopt.h:121
pin_name_t tx_pin
Definition fiberopt.h:116
pin_name_t rx_pin
Definition fiberopt.h:115
uart_stop_bits_t stop_bit
Definition fiberopt.h:123
uart_parity_t parity_bit
Definition fiberopt.h:122
Click ctx object definition.
Definition fiberopt.h:100
uart_t uart
Definition fiberopt.h:102