btaudio 2.0.0.0
|
Functions | |
void | btaudio_cfg_setup (btaudio_cfg_t *cfg) |
Config Object Initialization function. | |
BTAUDIO_RETVAL | btaudio_init (btaudio_t *ctx, btaudio_cfg_t *cfg) |
Initialization function. | |
void | btaudio_generic_write (btaudio_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | btaudio_generic_read (btaudio_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | btaudio_set_power_on (btaudio_t *ctx) |
Power On function. | |
void | btaudio_set_power_off (btaudio_t *ctx) |
Power Off function. | |
void | btaudio_reset (btaudio_t *ctx) |
Reset function. | |
void | btaudio_write_byte (btaudio_t *ctx, uint8_t input) |
Write Single byte function. | |
void | btaudio_write_command (btaudio_t *ctx, char *data_buf) |
Write command function. | |
void | btaudio_set_mode (btaudio_t *ctx, uint8_t mode) |
Set mode function. | |
void | btaudio_set_cmd_mode (btaudio_t *ctx, uint8_t mode) |
Set command mode function. | |
void | btaudio_set_factory_defaults (btaudio_t *ctx) |
Set factory defaults settings function. | |
void | btaudio_get_all_settings (btaudio_t *ctx) |
Get all settings function. | |
void | btaudio_set_audio_output (btaudio_t *ctx, a2dp_routing_values_t setting, bit_res_t bit_res, sample_rate_t sample_rate) |
Set audio output function. | |
uint8_t | btaudio_set_device_name (btaudio_t *ctx, uint8_t *name) |
Set device name function. | |
uint8_t | btaudio_set_automatic_shutdown (btaudio_t *ctx, uint16_t seconds) |
Set automatic shutdown function. | |
void | btaudio_set_extended_features (btaudio_t *ctx, extended_features_bitmask_values ext_features) |
Set extended features function. | |
void | btaudio_set_authentication (btaudio_t *ctx, uint8_t authentication) |
Set authentication function. | |
uint8_t | btaudio_set_service_class_device (btaudio_t *ctx, uint8_t *sc_device) |
Set service class of device function. | |
void | btaudio_set_discovery_mask (btaudio_t *ctx, uint8_t discovery_mask) |
Set discovery mask enabled for discovery function. | |
uint8_t | btaudio_set_security_pin (btaudio_t *ctx, uint8_t *security_pin) |
Set the security pin code function. | |
void | btaudio_set_speaker_gain_lvl (btaudio_t *ctx, uint8_t speaker_gain_lvl) |
Set speaker gain levels function. | |
void | btaudio_set_toneain_lvl (btaudio_t *ctx, uint8_t tone_gain_lvl) |
Set tone gain levels function. | |
void | btaudio_get_basic_settings (btaudio_t *ctx) |
Get basic settings function. | |
void | btaudio_get_reg_settings (btaudio_t *ctx, char cmd) |
Get register settings function. | |
void | btaudio_get_battery_status (btaudio_t *ctx) |
Get battery status function. | |
void | btaudio_get_help (btaudio_t *ctx) |
Get help status function. | |
void | btaudio_get_firmware_version (btaudio_t *ctx) |
Get firmware version function. | |
void | btaudio_toggle_local_echo (btaudio_t *ctx) |
Toggle local echo function. | |
uint8_t | btaudio_toggle_discoverable (btaudio_t *ctx, uint8_t discoverable) |
Toggle discoverable function. | |
uint8_t | btaudio_answer_keyboard (btaudio_t *ctx, uint8_t answer) |
Answer the keyboard function. | |
void | btaudio_dfu_mode (btaudio_t *ctx) |
DFU mode function. | |
uint8_t | btaudio_call_phone_number (btaudio_t *ctx, char *p_number) |
Call phone number function. | |
void | btaudio_show_track_metadata (btaudio_t *ctx) |
Show track metadata function. | |
void | btaudio_dial_last_phone_number (btaudio_t *ctx) |
Dial last phone number function. | |
void | btaudio_increase_volume (btaudio_t *ctx) |
Increase volume function. | |
void | btaudio_decrease_volume (btaudio_t *ctx) |
Decrease volume function. | |
void | btaudio_next_track (btaudio_t *ctx) |
Play next track function. | |
void | btaudio_previous_track (btaudio_t *ctx) |
Play previous track function. | |
void | btaudio_pause_play_track (btaudio_t *ctx) |
Pause track function. | |
void | btaudio_enable_voice_commands (btaudio_t *ctx) |
Enable voice commands function. | |
void | btaudio_get_gpio_dirr (btaudio_t *ctx) |
Get GPIO DIRR function. | |
void | btaudio_get_gpio_level (btaudio_t *ctx) |
Get GPIO level function. | |
void | btaudio_disconnect_current_connection (btaudio_t *ctx, profile_bitmask_values profile) |
Disconnect current connection function. | |
uint8_t | btaudio_mute_hold_call (btaudio_t *ctx, uint8_t mute) |
Mute hold call function. | |
void | btaudio_reboot (btaudio_t *ctx) |
Reboot function. | |
void | btaudio_display_caller_id (btaudio_t *ctx) |
Display caller Id function. | |
void | btaudio_reset_prev_paired_devices (btaudio_t *ctx) |
Reset prev paired devices function. | |
void | btaudio_query_connection_status (btaudio_t *ctx) |
Query connection status function. | |
void | btaudio_reconnect_most_recent (btaudio_t *ctx) |
Reconnect most recent function. | |
void | btaudio_accept_call (btaudio_t *ctx) |
Accept call function. | |
void | btaudio_reject_call (btaudio_t *ctx) |
Reject call function. | |
void | btaudio_userBusy (btaudio_t *ctx) |
User busy function. | |
void | btaudio_accept_held_call (btaudio_t *ctx) |
Accept held call function. | |
void | btaudio_set_hold_accept_incoming (btaudio_t *ctx) |
Set hold accept incoming function. | |
void | btaudio_add_held_call (btaudio_t *ctx) |
Add held call function. | |
void | btaudio_cnnct_two_calls (btaudio_t *ctx) |
Connect two calls function. | |
void | btaudio_transfer_active_calls (btaudio_t *ctx) |
Transfer active calls function. | |
uint8_t | btaudio_interrupt (btaudio_t *ctx) |
Get interrupt state function. | |
void btaudio_accept_call | ( | btaudio_t * | ctx | ) |
Accept call function.
ctx | Click object. |
@description The function accept call of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_accept_held_call | ( | btaudio_t * | ctx | ) |
Accept held call function.
ctx | Click object. |
@description The function accept held call of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_add_held_call | ( | btaudio_t * | ctx | ) |
Add held call function.
ctx | Click object. |
@description The function add held call of the RN52 Bluetooth audio module on BT Audio Click board.
uint8_t btaudio_answer_keyboard | ( | btaudio_t * | ctx, |
uint8_t | answer ) |
Answer the keyboard function.
ctx | Click object. |
answer |
|
status |
|
@description The function accepts/rejects pairing in keyboard IO authentication mode of the RN52 Bluetooth audio module on BT Audio Click board.
uint8_t btaudio_call_phone_number | ( | btaudio_t * | ctx, |
char * | p_number ) |
Call phone number function.
ctx | Click object. |
p_number | pointer to the memory location where phone number be stored. |
status |
|
@description The function call phone number from the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_cfg_setup | ( | btaudio_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void btaudio_cnnct_two_calls | ( | btaudio_t * | ctx | ) |
Connect two calls function.
ctx | Click object. |
@description The function connect two calls of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_decrease_volume | ( | btaudio_t * | ctx | ) |
Decrease volume function.
ctx | Click object. |
@description The function decrease volume of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_dfu_mode | ( | btaudio_t * | ctx | ) |
DFU mode function.
ctx | Click object. |
@description The function will put the RN52 Bluetooth audio module on BT Audio Click board into Device Firmware Upgrade (DFU) mode.
void btaudio_dial_last_phone_number | ( | btaudio_t * | ctx | ) |
Dial last phone number function.
ctx | Click object. |
@description The function will redial last dialed number from the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_disconnect_current_connection | ( | btaudio_t * | ctx, |
profile_bitmask_values | profile ) |
Disconnect current connection function.
ctx | Click object. |
profile |
|
@description The function disconnect current connection profile of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_display_caller_id | ( | btaudio_t * | ctx | ) |
Display caller Id function.
ctx | Click object. |
@description The function display caller Id of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_enable_voice_commands | ( | btaudio_t * | ctx | ) |
Enable voice commands function.
ctx | Click object. |
@description The function enable voice commands of the RN52 Bluetooth audio module on BT Audio Click board.
int32_t btaudio_generic_read | ( | btaudio_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void btaudio_generic_write | ( | btaudio_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
btaudio | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
void btaudio_get_all_settings | ( | btaudio_t * | ctx | ) |
Get all settings function.
ctx | Click object. |
@description The function gets all settings data of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_basic_settings | ( | btaudio_t * | ctx | ) |
Get basic settings function.
ctx | Click object. |
response | pointer to the memory location where response be stored. |
@description The function get basic settings data of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_battery_status | ( | btaudio_t * | ctx | ) |
Get battery status function.
ctx | Click object. |
@description The function get battery status data from the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_firmware_version | ( | btaudio_t * | ctx | ) |
Get firmware version function.
ctx | Click object. |
@description The function getfirmware version data of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_gpio_dirr | ( | btaudio_t * | ctx | ) |
Get GPIO DIRR function.
ctx | Click object. |
@description The function configures GPIO direction of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_gpio_level | ( | btaudio_t * | ctx | ) |
Get GPIO level function.
ctx | Click object. |
@description The function get GPIO level and input pull-up configuration of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_help | ( | btaudio_t * | ctx | ) |
Get help status function.
ctx | Click object. |
@description The function get help status data from the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_get_reg_settings | ( | btaudio_t * | ctx, |
char | cmd ) |
Get register settings function.
ctx | Click object. |
cmd | Second character of the command; |
@decription The function get register settings on idle time in seconds by send command to the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_increase_volume | ( | btaudio_t * | ctx | ) |
Increase volume function.
ctx | Click object. |
@description The function increase volume of the RN52 Bluetooth audio module on BT Audio Click board.
BTAUDIO_RETVAL btaudio_init | ( | btaudio_t * | ctx, |
btaudio_cfg_t * | cfg ) |
Initialization function.
btaudio | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t btaudio_interrupt | ( | btaudio_t * | ctx | ) |
Get interrupt state function.
ctx | Click object. |
@description The function gets interrupt state by return status of INT pin of BT Audio Click board.
uint8_t btaudio_mute_hold_call | ( | btaudio_t * | ctx, |
uint8_t | mute ) |
Mute hold call function.
ctx | Click object. |
mute |
|
status |
|
@description The function mute hold call of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_next_track | ( | btaudio_t * | ctx | ) |
Play next track function.
ctx | Click object. |
@description The function play next track of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_pause_play_track | ( | btaudio_t * | ctx | ) |
Pause track function.
ctx | Click object. |
@description The function pause track of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_previous_track | ( | btaudio_t * | ctx | ) |
Play previous track function.
ctx | Click object. |
@description The function play previous track of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_query_connection_status | ( | btaudio_t * | ctx | ) |
Query connection status function.
ctx | Click object. |
@description The function query connection status of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_reboot | ( | btaudio_t * | ctx | ) |
Reboot function.
ctx | Click object. |
@description The function reboot the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_reconnect_most_recent | ( | btaudio_t * | ctx | ) |
Reconnect most recent function.
ctx | Click object. |
@description The function reconnect most recent of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_reject_call | ( | btaudio_t * | ctx | ) |
Reject call function.
ctx | Click object. |
@description The function reject call of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_reset | ( | btaudio_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description The function resets the device by toggling the reset pin.
void btaudio_reset_prev_paired_devices | ( | btaudio_t * | ctx | ) |
Reset prev paired devices function.
ctx | Click object. |
@description The function reset prev paired devices of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_audio_output | ( | btaudio_t * | ctx, |
a2dp_routing_values_t | setting, | ||
bit_res_t | bit_res, | ||
sample_rate_t | sample_rate ) |
Set audio output function.
ctx | Click object. |
setting |
|
bit_res |
|
sample_rate |
|
@description The function sets audio output of RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_authentication | ( | btaudio_t * | ctx, |
uint8_t | authentication ) |
Set authentication function.
ctx | Click object. |
ext_features |
|
@description The function sets the authentication of the RN52 Bluetooth audio module on BT Audio Click board.
uint8_t btaudio_set_automatic_shutdown | ( | btaudio_t * | ctx, |
uint16_t | seconds ) |
Set automatic shutdown function.
ctx | Click object. |
seconds | time in seconds. |
status |
|
@description The function sets automatic shutdown on idle time in seconds by send command to the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_cmd_mode | ( | btaudio_t * | ctx, |
uint8_t | mode ) |
Set command mode function.
ctx | Click object. |
mode |
|
@description The function sets operating mode via command.
uint8_t btaudio_set_device_name | ( | btaudio_t * | ctx, |
uint8_t * | name ) |
Set device name function.
ctx | Click object. |
name | pointer to the memory location where the name is stored. |
status |
|
@description The function sets the device name. Is a prefix of up to 20 alphanumeric characters. The device name is set to string-XXXX, where XXXX is the last four digits of the module's MAC address of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_discovery_mask | ( | btaudio_t * | ctx, |
uint8_t | discovery_mask ) |
Set discovery mask enabled for discovery function.
ctx | Click object. |
discovery_mask | number of discovery mask |
@description The function sets the discovery mask enabled for discovery to the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_extended_features | ( | btaudio_t * | ctx, |
extended_features_bitmask_values | ext_features ) |
Set extended features function.
ctx | Click object. |
ext_features |
|
@description The function sets the extended features of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_factory_defaults | ( | btaudio_t * | ctx | ) |
Set factory defaults settings function.
ctx | Click object. |
@description The function sets factory default settings.
void btaudio_set_hold_accept_incoming | ( | btaudio_t * | ctx | ) |
Set hold accept incoming function.
ctx | Click object. |
@description The function sets on hold accept incoming calls of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_mode | ( | btaudio_t * | ctx, |
uint8_t | mode ) |
Set mode function.
ctx | Click object. |
mode |
|
@description The function set operating mode of RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_power_off | ( | btaudio_t * | ctx | ) |
Power Off function.
ctx | Click object. |
@description The function Power Off, disable RN52 Bluetooth audio module on BT Audio Click board by clearing to '0' state of PWR pin .
void btaudio_set_power_on | ( | btaudio_t * | ctx | ) |
Power On function.
ctx | Click object. |
@description The function Power On, enable RN52 Bluetooth audio module on BT Audio Click board by setting to '1' state of PWR pin.
uint8_t btaudio_set_security_pin | ( | btaudio_t * | ctx, |
uint8_t * | security_pin ) |
Set the security pin code function.
ctx | Click object. |
security_pin | pointer to the memory location where security pin be stored. |
status |
|
@description The function sets the security pin code to the RN52 Bluetooth audio module on BT Audio Click board.
uint8_t btaudio_set_service_class_device | ( | btaudio_t * | ctx, |
uint8_t * | sc_device ) |
Set service class of device function.
ctx | Click object. |
sc_device | string [ hex ] number, default '240704'. |
status |
|
@description The function sets the service class of device to the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_speaker_gain_lvl | ( | btaudio_t * | ctx, |
uint8_t | speaker_gain_lvl ) |
Set speaker gain levels function.
ctx | Click object. |
speaker_gain_lvl | Speaker Gain Levels value from 0 to 15. |
@description The function sets the speaker gain levels of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_set_toneain_lvl | ( | btaudio_t * | ctx, |
uint8_t | tone_gain_lvl ) |
Set tone gain levels function.
ctx | Click object. |
speaker_gain_lvl | Speaker Gain Levels value from 0 to 31. |
@description The function sets the tone gain levels of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_show_track_metadata | ( | btaudio_t * | ctx | ) |
Show track metadata function.
ctx | Click object. |
track_data | pointer to the memory location where track data be stored. |
@description The function show track metadata which includes Track Title, Artist, Album, Genre, Number, Total Count, Duration (ms) of the RN52 Bluetooth audio module on BT Audio Click board.
uint8_t btaudio_toggle_discoverable | ( | btaudio_t * | ctx, |
uint8_t | discoverable ) |
Toggle discoverable function.
ctx | Click object. |
discoverable |
|
status |
|
@description The function toggles whether the RN52 Bluetooth audio module of the BT Audio Click board is discoverable or not.
void btaudio_toggle_local_echo | ( | btaudio_t * | ctx | ) |
Toggle local echo function.
ctx | Click object. |
@description The function toggles the local echo on and off to the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_transfer_active_calls | ( | btaudio_t * | ctx | ) |
Transfer active calls function.
ctx | Click object. |
@description The function transfer active calls of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_userBusy | ( | btaudio_t * | ctx | ) |
User busy function.
ctx | Click object. |
@description The function user busy of the RN52 Bluetooth audio module on BT Audio Click board.
void btaudio_write_byte | ( | btaudio_t * | ctx, |
uint8_t | input ) |
Write Single byte function.
ctx | Click object. |
input | Byte to be written. |
@description The function writes a single byte via uart.
void btaudio_write_command | ( | btaudio_t * | ctx, |
char * | data_buf ) |
Write command function.
ctx | Click object. |
data_buf | Byte to be written. |
@description The function writes command.