39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define BLE6_MODULE_POWER_OFF 0x00
74#define BLE6_MODULE_POWER_ON 0x01
81#define BLE6_DRV_BUFFER_SIZE 256
99#define BLE6_MAP_MIKROBUS( cfg, mikrobus ) \
100 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
101 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
102 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
103 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
104 cfg.bl = MIKROBUS( mikrobus, MIKROBUS_PWM )
183 uint8_t le_peer_addr[ 6 ];
204 uint8_t attr_data[ 255 ];
301int8_t
ble6_strncmp ( uint8_t *string1, uint8_t *string2, uint8_t len );
ble6_return_value_t
BLE 6 Click return value data.
Definition ble6.h:213
@ BLE6_ERROR
Definition ble6.h:215
@ BLE6_OK
Definition ble6.h:214
#define BLE6_DRV_BUFFER_SIZE
BLE 6 driver buffer size.
Definition ble6.h:81
void ble6_parser_rsp(ble6_t *ctx, ble6_rsp_t *response)
Response parser function.
void(* ble6_hdl_t)(uint8_t *)
BLE 6 Click driver handler.
Definition ble6.h:235
void ble6_power_on(ble6_t *ctx, uint8_t en_pwr)
Set Power On function.
void ble6_cfg_setup(ble6_cfg_t *cfg)
BLE 6 configuration object setup function.
void ble6_set_handlers(ble6_handler_t event_handler, ble6_handler_t eve_hdlr)
Set handlers function.
int8_t ble6_strncmp(uint8_t *string1, uint8_t *string2, uint8_t len)
Lexicographically compares function.
void ble6_send_command(ble6_t *ctx, uint8_t *tx_data, uint8_t n_bytes)
Send command function.
err_t ble6_generic_write(ble6_t *ctx, char *data_buf, uint16_t len)
BLE 6 data writing function.
void ble6_set_response_handler(void(*handler)(uint8_t *), ble6_hdl_t driver_hdl)
Set response handlers function.
err_t ble6_generic_read(ble6_t *ctx, char *data_buf, uint16_t max_len)
BLE 6 data reading function.
err_t ble6_init(ble6_t *ctx, ble6_cfg_t *cfg)
BLE 6 initialization function.
void(* ble6_handler_t)(uint8_t *message_buf, uint32_t message_len)
BLE 6 Click driver handler.
Definition ble6.h:229
uint8_t ble6_byte_ready(ble6_t *ctx)
Check for new byte received.
BLE 6 Click configuration object.
Definition ble6.h:136
uint32_t baud_rate
Definition ble6.h:147
bool uart_blocking
Definition ble6.h:148
pin_name_t bl
Definition ble6.h:144
uart_data_bits_t data_bit
Definition ble6.h:149
pin_name_t tx_pin
Definition ble6.h:139
pin_name_t rx_pin
Definition ble6.h:138
uart_stop_bits_t stop_bit
Definition ble6.h:151
uart_parity_t parity_bit
Definition ble6.h:150
pin_name_t rst
Definition ble6.h:143
pin_name_t an
Definition ble6.h:142
Driver Default Response type.
Definition ble6.h:160
uint16_t cmd_opcode
Definition ble6.h:164
uint8_t num_hci_cmd
Definition ble6.h:163
uint8_t length
Definition ble6.h:162
uint8_t status
Definition ble6.h:165
uint8_t event_code
Definition ble6.h:161
Driver Response type.
Definition ble6.h:196
uint16_t attr_hdl
Definition ble6.h:201
uint8_t length
Definition ble6.h:198
uint16_t offset
Definition ble6.h:202
uint16_t e_code
Definition ble6.h:199
uint16_t attr_data_len
Definition ble6.h:203
uint16_t conn_hdl
Definition ble6.h:200
uint8_t event_code
Definition ble6.h:197
BLE 6 Click context object.
Definition ble6.h:114
digital_out_t bl
Definition ble6.h:117
uart_t uart
Definition ble6.h:123
digital_in_t an
Definition ble6.h:120
digital_out_t rst
Definition ble6.h:116