ble12
2.0.0.0
|
API for configuring and manipulating BLE 12 Click driver. More...
Modules | |
BLE 12 Device Settings | |
Settings for registers of BLE 12 Click driver. | |
BLE 12 MikroBUS Map | |
MikroBUS pin mapping of BLE 12 Click driver. | |
Functions | |
void | ble12_cfg_setup (ble12_cfg_t *cfg) |
BLE 12 configuration object setup function. More... | |
err_t | ble12_init (ble12_t *ctx, ble12_cfg_t *cfg) |
BLE 12 initialization function. More... | |
err_t | ble12_default_cfg (ble12_t *ctx) |
BLE 12 default configuration function. More... | |
err_t | ble12_generic_write (ble12_t *ctx, char *data_buf, uint16_t len) |
BLE 12 data writing function. More... | |
err_t | ble12_generic_read (ble12_t *ctx, char *data_buf, uint16_t max_len) |
BLE 12 data reading function. More... | |
err_t | ble12_wake_up_device (ble12_t *ctx) |
BLE 12 wake up the device function. More... | |
err_t | ble12_send_cmd (ble12_t *ctx, char *cmd) |
BLE 12 sends the command function. More... | |
err_t | ble12_send_data (ble12_t *ctx, char *tx_data) |
BLE 12 send data function. More... | |
err_t | ble12_init_led (ble12_t *ctx) |
BLE 12 LED initialization function. More... | |
err_t | ble12_set_led_state (ble12_t *ctx, uint8_t led, uint8_t state) |
BLE 12 set LED state function. More... | |
err_t | ble12_reset (ble12_t *ctx) |
BLE 12 reset function. More... | |
err_t | ble12_get_version (ble12_t *ctx) |
BLE 12 get version function. More... | |
err_t | ble12_set_device_name (ble12_t *ctx, uint8_t *device_name) |
BLE 12 set device name function. More... | |
err_t | ble12_save_config (ble12_t *ctx) |
BLE 12 save config function. More... | |
err_t | ble12_set_adv_interval (ble12_t *ctx, uint8_t *adv_interval) |
BLE 12 set adv interval function. More... | |
err_t | ble12_disconnect (ble12_t *ctx) |
BLE 12 disconnect function. More... | |
err_t | ble12_set_default (ble12_t *ctx) |
BLE 12 set default function. More... | |
err_t | ble12_set_op_mode (ble12_t *ctx, uint8_t op_mode) |
BLE 12 set operating mode function. More... | |
err_t | ble12_event_startup (ble12_t *ctx) |
BLE 12 event start-up function. More... | |
API for configuring and manipulating BLE 12 Click driver.
void ble12_cfg_setup | ( | ble12_cfg_t * | cfg | ) |
BLE 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ble12_cfg_t object definition for detailed explanation. |
err_t ble12_default_cfg | ( | ble12_t * | ctx | ) |
BLE 12 default configuration function.
This function executes a default configuration of BLE 12 click board.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ble12_disconnect | ( | ble12_t * | ctx | ) |
BLE 12 disconnect function.
This function disconnects all paired devices by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_event_startup | ( | ble12_t * | ctx | ) |
BLE 12 event start-up function.
This function event start-up for the control LED by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_generic_read | ( | ble12_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
BLE 12 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ble12_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 ble12_generic_write | ( | ble12_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
BLE 12 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t ble12_get_version | ( | ble12_t * | ctx | ) |
BLE 12 get version function.
This function get module version by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_init | ( | ble12_t * | ctx, |
ble12_cfg_t * | cfg | ||
) |
BLE 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ble12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ble12_init_led | ( | ble12_t * | ctx | ) |
BLE 12 LED initialization function.
This function initialization for LED control by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_reset | ( | ble12_t * | ctx | ) |
BLE 12 reset function.
This function software reset the device by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_save_config | ( | ble12_t * | ctx | ) |
BLE 12 save config function.
This function performs the configuration save procedure by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_send_cmd | ( | ble12_t * | ctx, |
char * | cmd | ||
) |
BLE 12 sends the command function.
This function sends the desired command by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
>=0
- Success, <0
- Error.err_t ble12_send_data | ( | ble12_t * | ctx, |
char * | tx_data | ||
) |
BLE 12 send data function.
This function send the desired data to the paired device by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | tx_data | : Data for sending. |
>=0
- Success, <0
- Error.err_t ble12_set_adv_interval | ( | ble12_t * | ctx, |
uint8_t * | adv_interval | ||
) |
BLE 12 set adv interval function.
This function sets the advertising interval by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | adv_interval | : Advertising interval time ( ms ). |
>=0
- Success, <0
- Error.err_t ble12_set_default | ( | ble12_t * | ctx | ) |
BLE 12 set default function.
This function sets the default module configuration by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
>=0
- Success, <0
- Error.err_t ble12_set_device_name | ( | ble12_t * | ctx, |
uint8_t * | device_name | ||
) |
BLE 12 set device name function.
This function sets the device name by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | device_name | : Device name. |
>=0
- Success, <0
- Error.err_t ble12_set_led_state | ( | ble12_t * | ctx, |
uint8_t | led, | ||
uint8_t | state | ||
) |
BLE 12 set LED state function.
This function controls the LEDs by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
[in] | led | : select LED
|
[in] | state | : LED state
|
>=0
- Success, <0
- Error.err_t ble12_set_op_mode | ( | ble12_t * | ctx, |
uint8_t | op_mode | ||
) |
BLE 12 set operating mode function.
This function sets the operating mode by using UART serial interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ble12_wake_up_device | ( | ble12_t * | ctx | ) |
BLE 12 wake up the device function.
This function performs the wake-up UART interface of the BM832A Bluetooth 5 Module on the BLE 12 click board™.
[in] | ctx | : Click context object. See ble12_t object definition for detailed explanation. |
0
- Success.