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 BTEZ_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
68 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
69 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
70 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
71 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT )
78#define BTEZ_RETVAL uint8_t
81#define BTEZ_INIT_ERROR 0xFF
88#define DRV_RX_BUFFER_SIZE 500
89#define DRV_TX_BUFFER_SIZE 200
#define DRV_RX_BUFFER_SIZE
Definition btez.h:88
#define DRV_TX_BUFFER_SIZE
Definition btez.h:89
#define BTEZ_RETVAL
Definition btez.h:78
void btez_send_command(btez_t *ctx, char *command)
Send command function.
void btez_module_reset(btez_t *ctx)
Reset module.
void btez_cfg_setup(btez_cfg_t *cfg)
Config Object Initialization function.
int32_t btez_generic_read(btez_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
BTEZ_RETVAL btez_init(btez_t *ctx, btez_cfg_t *cfg)
Initialization function.
void btez_generic_write(btez_t *ctx, char *data_buf, uint16_t len)
Generic write function.
uint8_t btez_error_t
Error type.
Definition btez.h:150
Click configuration structure definition.
Definition btez.h:125
pin_name_t rts
Definition btez.h:135
uint32_t baud_rate
Definition btez.h:139
pin_name_t cts
Definition btez.h:134
bool uart_blocking
Definition btez.h:140
uart_data_bits_t data_bit
Definition btez.h:141
pin_name_t tx_pin
Definition btez.h:129
pin_name_t rx_pin
Definition btez.h:128
uart_stop_bits_t stop_bit
Definition btez.h:143
uart_parity_t parity_bit
Definition btez.h:142
pin_name_t rst
Definition btez.h:133
Click ctx object definition.
Definition btez.h:102
uart_t uart
Definition btez.h:114
digital_in_t rts
Definition btez.h:110
digital_out_t rst
Definition btez.h:105
digital_out_t cts
Definition btez.h:106