ble10  2.0.0.0
Data Structures | Macros | Enumerations | Functions
ble10.h File Reference

This file contains API for BLE 10 Click Driver. More...

#include "mikrosdk_version.h"
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  ble10_t
 BLE 10 Click context object. More...
 
struct  ble10_cfg_t
 BLE 10 Click configuration object. More...
 

Macros

#define BLE10_CMD_AT   "AT"
 BLE 10 AT commands list. More...
 
#define BLE10_CMD_ATRST   "ATRST"
 
#define BLE10_CMD_ATFRST   "ATFRST"
 
#define BLE10_CMD_ATSN   "ATSN"
 
#define BLE10_CMD_ATP   "ATP"
 
#define BLE10_CMD_ATCP   "ATCP"
 
#define BLE10_CMD_ATDI   "ATDI"
 
#define BLE10_CMD_ATT   "ATT"
 
#define DRV_BUFFER_SIZE   500
 BLE 10 driver buffer size. More...
 
#define BLE10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  ble10_return_value_t { BLE10_OK = 0, BLE10_ERROR = -1 }
 BLE 10 Click return value data. More...
 

Functions

void ble10_cfg_setup (ble10_cfg_t *cfg)
 BLE 10 configuration object setup function. More...
 
err_t ble10_init (ble10_t *ctx, ble10_cfg_t *cfg)
 BLE 10 initialization function. More...
 
void ble10_default_cfg (ble10_t *ctx)
 BLE 10 default configuration function. More...
 
err_t ble10_generic_write (ble10_t *ctx, char *data_buf, uint16_t len)
 BLE 10 data writing function. More...
 
err_t ble10_generic_read (ble10_t *ctx, char *data_buf, uint16_t max_len)
 BLE 10 data reading function. More...
 
uint8_t ble10_get_rts_pin (ble10_t *ctx)
 BLE 10 get ready to send pin function. More...
 
uint8_t ble10_get_pio3_pin (ble10_t *ctx)
 BLE 10 get PIO3 pin function. More...
 
void ble10_set_cts_pin (ble10_t *ctx, uint8_t state)
 BLE 10 set clear to send pin function. More...
 
void ble10_set_rst_pin (ble10_t *ctx, uint8_t state)
 BLE 10 set reset pin function. More...
 
void ble10_hw_reset (ble10_t *ctx)
 BLE 10 hw reset function. More...
 
err_t ble10_sw_reset (ble10_t *ctx)
 BLE 10 software reset function. More...
 
err_t ble10_factory_reset (ble10_t *ctx)
 BLE 10 factory reset function. More...
 
err_t ble10_send_cmd (ble10_t *ctx, char *at_cmd_buf)
 BLE 10 send command function. More...
 
err_t ble10_send_cmd_with_parameter (ble10_t *ctx, char *at_cmd_buf, char *param_buf)
 BLE 10 send command with parameter function. More...
 
err_t ble10_send_cmd_check (ble10_t *ctx, char *at_cmd_buf)
 BLE 10 send command check function. More...
 
err_t ble10_remove_pairings (ble10_t *ctx)
 BLE 10 remove pairings function. More...
 
err_t ble10_list_pairings (ble10_t *ctx)
 BLE 10 list current pairings function. More...
 
err_t ble10_set_device_name (ble10_t *ctx, char *dev_name)
 BLE 10 set local device name function. More...
 
err_t ble10_discover_nearby_devices (ble10_t *ctx)
 BLE 10 discover nearby devices function. More...
 
err_t ble10_get_temperature (ble10_t *ctx)
 BLE 10 get temperature function. More...
 
err_t ble10_read_an_pin_value (ble10_t *ctx, uint16_t *data_out)
 BLE 10 read AIN pin value function. More...
 
err_t ble10_read_an_pin_voltage (ble10_t *ctx, float *data_out)
 BLE 10 read AIN pin voltage level function. More...
 

Detailed Description

This file contains API for BLE 10 Click Driver.

Enumeration Type Documentation

◆ ble10_return_value_t

BLE 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
BLE10_OK 
BLE10_ERROR