bletiny 2.0.0.0
|
This file contains API for BLE TINY Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"
#include "drv_analog_in.h"
Go to the source code of this file.
Data Structures | |
struct | bletiny_t |
BLE TINY Click context object. More... | |
struct | bletiny_cfg_t |
BLE TINY Click configuration object. More... | |
Macros | |
#define | BLETINY_CMD_ATR "ATr" |
BLE TINY control commands. | |
#define | BLETINY_CMD_ATZ "ATZ" |
#define | BLETINY_CMD_GAPDISCONNECT "AT+GAPDISCONNECT" |
#define | BLETINY_CMD_ATI "ATI" |
#define | BLETINY_CMD_ATRI "ATrI" |
#define | BLETINY_CMD_BDADDR "AT+BDADDR" |
#define | BLETINY_CMD_RSSI "AT+RSSI" |
#define | BLETINY_CMD_CHECK_MEM "AT+MEM=0" |
#define | BLETINY_CMD_CLEAR_MEM "AT+MEM=0," |
#define | BLETINY_RSP_OK "OK" |
BLE Tiny device response for AT commands. | |
#define | BLETINY_RSP_ERROR "ERROR" |
#define | BLETINY_CONNECTED "+CONNECTED" |
#define | BLETINY_DISCONNECTED "+DISCONNECTED" |
#define | BLETINY_SPI_CFG_SPEED_2MHZ 0 |
BLE Tiny device SPI configuration. | |
#define | BLETINY_SPI_CFG_SPEED_4MHZ 1 |
#define | BLETINY_SPI_CFG_SPEED_8MHZ 2 |
#define | BLETINY_SPI_CFG_MODE0 0 |
#define | BLETINY_SPI_CFG_MODE1 1 |
#define | BLETINY_SPI_CFG_MODE2 2 |
#define | BLETINY_SPI_CFG_MODE3 3 |
#define | BLETINY_I2C_CFG_SPEED_100KHZ 100 |
BLE Tiny device I2C configuration. | |
#define | BLETINY_I2C_CFG_SPEED_400KHZ 400 |
#define | BLETINY_I2C_CFG_REG_LEN_1BYTE 8 |
#define | BLETINY_I2C_CFG_REG_LEN_1BYTES 16 |
#define | DRV_BUFFER_SIZE 500 |
BLE TINY driver buffer size. | |
#define | BLETINY_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | bletiny_return_value_t { BLETINY_OK = 0 , BLETINY_ERROR = -1 , BLETINY_ERROR_TIMEOUT = -2 , BLETINY_ERROR_RETURN = -3 , BLETINY_ERROR_UNKNOWN = -4 } |
BLE TINY Click return value data. More... | |
Functions | |
void | bletiny_cfg_setup (bletiny_cfg_t *cfg) |
BLE TINY configuration object setup function. | |
err_t | bletiny_init (bletiny_t *ctx, bletiny_cfg_t *cfg) |
BLE TINY initialization function. | |
err_t | bletiny_default_cfg (bletiny_t *ctx) |
BLE TINY default configuration function. | |
err_t | bletiny_generic_write (bletiny_t *ctx, char *data_buf, uint16_t len) |
BLE TINY data writing function. | |
err_t | bletiny_generic_read (bletiny_t *ctx, char *data_buf, uint16_t max_len) |
BLE TINY data reading function. | |
void | bletiny_send_cmd (bletiny_t *ctx, char *cmd) |
Send command function. | |
void | bletiny_spi_config (bletiny_t *ctx, uint8_t speed, uint8_t mode) |
Configure Click board for SPI master communication. | |
err_t | bletiny_spi_write (bletiny_t *ctx, char *data_buf, uint8_t len) |
Send command to write data to slave device via SPI communication. | |
err_t | bletiny_spi_read (bletiny_t *ctx, char *data_buf, uint8_t len) |
Send command to read data from slave device via SPI communication. | |
err_t | bletiny_spi_write_then_read (bletiny_t *ctx, uint8_t *data_write, uint8_t write_len, char *data_read, uint8_t read_len) |
Send command to write data to and then read data from slave device via SPI communication. | |
void | bletiny_i2c_config (bletiny_t *ctx, uint8_t speed, uint8_t reg_len) |
Configure Click board for I2C master communication. | |
err_t | bletiny_i2c_write (bletiny_t *ctx, uint8_t slave_address, uint16_t reg, uint8_t reg_data) |
Send command to write data to reg address of slave device via I2C communication. | |
err_t | bletiny_i2c_read (bletiny_t *ctx, uint8_t slave_address, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Send command to read data from slave device via I2C communication. | |
This file contains API for BLE TINY Click Driver.