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 BLE7_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
70 cfg.gp0 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
71 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
72 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
73 cfg.gp1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
74 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
81#define BLE7_RETVAL uint8_t
84#define BLE7_INIT_ERROR 0xFF
86#define BLE7_END_BUFF 0
93#define DRV_RX_BUFFER_SIZE 200
94#define DRV_TX_BUFFER_SIZE 100
#define DRV_RX_BUFFER_SIZE
Definition ble7.h:93
#define DRV_TX_BUFFER_SIZE
Definition ble7.h:94
#define BLE7_RETVAL
Definition ble7.h:81
void ble7_generic_write(ble7_t *ctx, char *data_buf, uint16_t len)
Generic write function.
uint8_t ble7_get_rts(ble7_t *ctx)
RTS Pin Getting function.
void ble7_reset(ble7_t *ctx)
Reset function.
void ble7_set_gp1(ble7_t *ctx, uint8_t state)
GP1 Pin Setting function.
void ble7_cfg_setup(ble7_cfg_t *cfg)
Config Object Initialization function.
void ble7_send_command(ble7_t *ctx, char *command)
Transmit function.
int32_t ble7_generic_read(ble7_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void ble7_set_cts(ble7_t *ctx, uint8_t state)
CTS Pin Setting function.
uint8_t ble7_get_gp0(ble7_t *ctx)
GP0 Pin Getting function.
BLE7_RETVAL ble7_init(ble7_t *ctx, ble7_cfg_t *cfg)
Initialization function.
uint8_t ble7_error_t
Error type.
Definition ble7.h:159
Click configuration structure definition.
Definition ble7.h:132
pin_name_t rts
Definition ble7.h:142
uint32_t baud_rate
Definition ble7.h:148
pin_name_t gp0
Definition ble7.h:140
pin_name_t cts
Definition ble7.h:144
bool uart_blocking
Definition ble7.h:149
uart_data_bits_t data_bit
Definition ble7.h:150
pin_name_t tx_pin
Definition ble7.h:136
pin_name_t rx_pin
Definition ble7.h:135
uart_stop_bits_t stop_bit
Definition ble7.h:152
pin_name_t gp1
Definition ble7.h:143
uart_parity_t parity_bit
Definition ble7.h:151
pin_name_t rst
Definition ble7.h:141
Click ctx object definition.
Definition ble7.h:107
uart_t uart
Definition ble7.h:121
digital_in_t gp0
Definition ble7.h:116
digital_in_t rts
Definition ble7.h:117
digital_out_t gp1
Definition ble7.h:111
digital_out_t rst
Definition ble7.h:110
digital_out_t cts
Definition ble7.h:112