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 TX_DRV_BUFFER_SIZE 100
75#define RX_DRV_BUFFER_SIZE 1000
93#define RTKBASE_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
95 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
96 cfg.shd = MIKROBUS( mikrobus, MIKROBUS_AN ); \
97 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
98 cfg.wup = MIKROBUS( mikrobus, MIKROBUS_CS ); \
99 cfg.bt = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
100 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT );
#define RX_DRV_BUFFER_SIZE
Definition rtkbase.h:75
#define TX_DRV_BUFFER_SIZE
RTK Base driver buffer size.
Definition rtkbase.h:74
err_t rtkbase_generic_write(rtkbase_t *ctx, char *data_in, uint16_t len)
RTK Base data writing function.
uint32_t rtkbase_calculate_crc24(uint8_t *data_buf, uint16_t data_len)
RTK Base calculate crc24 function.
void rtkbase_set_boot_pin(rtkbase_t *ctx, uint8_t state)
RTK Base set BOOT pin function.
void rtkbase_set_wup_pin(rtkbase_t *ctx, uint8_t state)
RTK Base set WUP pin function.
void rtkbase_enable_rx_interrupt(rtkbase_t *ctx)
RTK Base enable rx interrupt function.
void rtkbase_set_rst_pin(rtkbase_t *ctx, uint8_t state)
RTK Base set RST pin function.
uint8_t rtkbase_get_int_pin(rtkbase_t *ctx)
RTK Base get INT pin function.
void rtkbase_cfg_setup(rtkbase_cfg_t *cfg)
RTK Base configuration object setup function.
void rtkbase_clear_ring_buffers(rtkbase_t *ctx)
RTK Base clear ring buffers function.
err_t rtkbase_init(rtkbase_t *ctx, rtkbase_cfg_t *cfg)
RTK Base initialization function.
void rtkbase_set_shd_pin(rtkbase_t *ctx, uint8_t state)
RTK Base set SHD pin function.
err_t rtkbase_rx_bytes_available(rtkbase_t *ctx)
RTK Base rx bytes available function.
err_t rtkbase_generic_read(rtkbase_t *ctx, char *data_out, uint16_t len)
RTK Base data reading function.
rtkbase_return_value_t
RTK Base Click return value data.
Definition rtkbase.h:160
@ RTKBASE_OK
Definition rtkbase.h:161
@ RTKBASE_ERROR
Definition rtkbase.h:162
RTK Base Click configuration object.
Definition rtkbase.h:134
uint32_t baud_rate
Definition rtkbase.h:147
pin_name_t wup
Definition rtkbase.h:142
pin_name_t bt
Definition rtkbase.h:143
bool uart_blocking
Definition rtkbase.h:148
uart_data_bits_t data_bit
Definition rtkbase.h:149
pin_name_t tx_pin
Definition rtkbase.h:137
pin_name_t rx_pin
Definition rtkbase.h:136
pin_name_t shd
Definition rtkbase.h:140
uart_stop_bits_t stop_bit
Definition rtkbase.h:151
pin_name_t int_pin
Definition rtkbase.h:144
uart_parity_t parity_bit
Definition rtkbase.h:150
pin_name_t rst
Definition rtkbase.h:141
RTK Base Click context object.
Definition rtkbase.h:110
uart_t uart
Definition rtkbase.h:121
digital_in_t int_pin
Definition rtkbase.h:118
digital_out_t wup
Definition rtkbase.h:114
digital_out_t rst
Definition rtkbase.h:113
digital_out_t bt
Definition rtkbase.h:115
digital_out_t shd
Definition rtkbase.h:112