ble10
2.0.0.0
|
API for configuring and manipulating BLE 10 Click driver. More...
Modules | |
BLE 10 Device Settings | |
Settings for registers of BLE 10 Click driver. | |
BLE 10 MikroBUS Map | |
MikroBUS pin mapping of BLE 10 Click driver. | |
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... | |
API for configuring and manipulating BLE 10 Click driver.
void ble10_cfg_setup | ( | ble10_cfg_t * | cfg | ) |
BLE 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ble10_cfg_t object definition for detailed explanation. |
void ble10_default_cfg | ( | ble10_t * | ctx | ) |
BLE 10 default configuration function.
This function executes a default configuration of BLE 10 click board.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
err_t ble10_discover_nearby_devices | ( | ble10_t * | ctx | ) |
BLE 10 discover nearby devices function.
This function discovers nearby advertising LE devices.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble10_factory_reset | ( | ble10_t * | ctx | ) |
BLE 10 factory reset function.
This function factory resets the device.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble10_generic_read | ( | ble10_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
BLE 10 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t ble10_generic_write | ( | ble10_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
BLE 10 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.uint8_t ble10_get_pio3_pin | ( | ble10_t * | ctx | ) |
BLE 10 get PIO3 pin function.
This function returns the PIO3 pin logic state.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
uint8_t ble10_get_rts_pin | ( | ble10_t * | ctx | ) |
BLE 10 get ready to send pin function.
This function returns the RTS pin logic state.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
err_t ble10_get_temperature | ( | ble10_t * | ctx | ) |
BLE 10 get temperature function.
This function executes get temperature command which returns the current temperature of the module's internal temperature sensor.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.void ble10_hw_reset | ( | ble10_t * | ctx | ) |
BLE 10 hw reset function.
This function resets the module by toggling the RST pin.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
err_t ble10_init | ( | ble10_t * | ctx, |
ble10_cfg_t * | cfg | ||
) |
BLE 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ble10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ble10_list_pairings | ( | ble10_t * | ctx | ) |
BLE 10 list current pairings function.
This function lists all current pairings.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble10_read_an_pin_value | ( | ble10_t * | ctx, |
uint16_t * | data_out | ||
) |
BLE 10 read AIN pin value function.
This function reads results of AD conversion of the AIN pin.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t ble10_read_an_pin_voltage | ( | ble10_t * | ctx, |
float * | data_out | ||
) |
BLE 10 read AIN pin voltage level function.
This function reads results of AD conversion of the AIN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t ble10_remove_pairings | ( | ble10_t * | ctx | ) |
BLE 10 remove pairings function.
This function removes all the device pairings.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble10_send_cmd | ( | ble10_t * | ctx, |
char * | at_cmd_buf | ||
) |
BLE 10 send command function.
This function sends a desired command with the CR byte appended to.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
>=0
- Success, <0
- Error.err_t ble10_send_cmd_check | ( | ble10_t * | ctx, |
char * | at_cmd_buf | ||
) |
BLE 10 send command check function.
This function sends a desired command with the question mark and CR byte appended to.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
>=0
- Success, <0
- Error.err_t ble10_send_cmd_with_parameter | ( | ble10_t * | ctx, |
char * | at_cmd_buf, | ||
char * | param_buf | ||
) |
BLE 10 send command with parameter function.
This function sends a desired command with the parameter buffer and CR byte appended to.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
[in] | param_buf | : Parameters string. |
>=0
- Success, <0
- Error.void ble10_set_cts_pin | ( | ble10_t * | ctx, |
uint8_t | state | ||
) |
BLE 10 set clear to send pin function.
This function sets the CTS pin to a desired state.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t ble10_set_device_name | ( | ble10_t * | ctx, |
char * | dev_name | ||
) |
BLE 10 set local device name function.
This function sets the local device name.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | dev_name | : Device name ( up to 20 characters ). |
>=0
- Success, <0
- Error.void ble10_set_rst_pin | ( | ble10_t * | ctx, |
uint8_t | state | ||
) |
BLE 10 set reset pin function.
This function sets the RST pin to a desired state.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t ble10_sw_reset | ( | ble10_t * | ctx | ) |
BLE 10 software reset function.
This function software resets the device.
[in] | ctx | : Click context object. See ble10_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.