39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
74#define BLE10_CMD_AT "AT"
75#define BLE10_CMD_ATRST "ATRST"
76#define BLE10_CMD_ATFRST "ATFRST"
77#define BLE10_CMD_ATSN "ATSN"
78#define BLE10_CMD_ATP "ATP"
79#define BLE10_CMD_ATCP "ATCP"
80#define BLE10_CMD_ATDI "ATDI"
81#define BLE10_CMD_ATT "ATT"
88#define DRV_BUFFER_SIZE 500
106#define BLE10_MAP_MIKROBUS( cfg, mikrobus ) \
107 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
108 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
109 cfg.ain = MIKROBUS( mikrobus, MIKROBUS_AN ); \
110 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
111 cfg.pio3 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
112 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT ); \
113 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS );
ble10_return_value_t
BLE 10 Click return value data.
Definition ble10.h:176
@ BLE10_ERROR
Definition ble10.h:178
@ BLE10_OK
Definition ble10.h:177
#define DRV_BUFFER_SIZE
BLE 10 driver buffer size.
Definition ble10.h:88
err_t ble10_get_temperature(ble10_t *ctx)
BLE 10 get temperature function.
err_t ble10_generic_write(ble10_t *ctx, char *data_buf, uint16_t len)
BLE 10 data writing function.
err_t ble10_discover_nearby_devices(ble10_t *ctx)
BLE 10 discover nearby devices function.
void ble10_cfg_setup(ble10_cfg_t *cfg)
BLE 10 configuration object setup function.
err_t ble10_send_cmd_with_parameter(ble10_t *ctx, char *at_cmd_buf, char *param_buf)
BLE 10 send command with parameter function.
err_t ble10_remove_pairings(ble10_t *ctx)
BLE 10 remove pairings function.
err_t ble10_set_device_name(ble10_t *ctx, char *dev_name)
BLE 10 set local device name function.
void ble10_set_rst_pin(ble10_t *ctx, uint8_t state)
BLE 10 set reset pin function.
void ble10_hw_reset(ble10_t *ctx)
BLE 10 hw reset function.
void ble10_set_cts_pin(ble10_t *ctx, uint8_t state)
BLE 10 set clear to send pin function.
err_t ble10_send_cmd_check(ble10_t *ctx, char *at_cmd_buf)
BLE 10 send command check function.
err_t ble10_sw_reset(ble10_t *ctx)
BLE 10 software reset function.
void ble10_default_cfg(ble10_t *ctx)
BLE 10 default configuration function.
uint8_t ble10_get_pio3_pin(ble10_t *ctx)
BLE 10 get PIO3 pin function.
err_t ble10_generic_read(ble10_t *ctx, char *data_buf, uint16_t max_len)
BLE 10 data reading function.
err_t ble10_read_an_pin_voltage(ble10_t *ctx, float *data_out)
BLE 10 read AIN pin voltage level function.
err_t ble10_send_cmd(ble10_t *ctx, char *at_cmd_buf)
BLE 10 send command function.
err_t ble10_factory_reset(ble10_t *ctx)
BLE 10 factory reset function.
err_t ble10_list_pairings(ble10_t *ctx)
BLE 10 list current pairings function.
uint8_t ble10_get_rts_pin(ble10_t *ctx)
BLE 10 get ready to send pin function.
err_t ble10_read_an_pin_value(ble10_t *ctx, uint16_t *data_out)
BLE 10 read AIN pin value function.
err_t ble10_init(ble10_t *ctx, ble10_cfg_t *cfg)
BLE 10 initialization function.
BLE 10 Click configuration object.
Definition ble10.h:147
pin_name_t rts
Definition ble10.h:156
uint32_t baud_rate
Definition ble10.h:160
analog_in_resolution_t resolution
Definition ble10.h:166
float vref
Definition ble10.h:167
pin_name_t cts
Definition ble10.h:155
pin_name_t ain
Definition ble10.h:151
bool uart_blocking
Definition ble10.h:161
pin_name_t pio3
Definition ble10.h:157
uart_data_bits_t data_bit
Definition ble10.h:162
pin_name_t tx_pin
Definition ble10.h:150
pin_name_t rx_pin
Definition ble10.h:149
uart_stop_bits_t stop_bit
Definition ble10.h:164
uart_parity_t parity_bit
Definition ble10.h:163
pin_name_t rst
Definition ble10.h:154
BLE 10 Click context object.
Definition ble10.h:123
digital_in_t pio3
Definition ble10.h:130
uart_t uart
Definition ble10.h:133
digital_in_t rts
Definition ble10.h:129
digital_out_t rst
Definition ble10.h:125
digital_out_t cts
Definition ble10.h:126
analog_in_t adc
Definition ble10.h:134