btaudio 2.0.0.0
|
This file contains API for BT Audio Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"
Go to the source code of this file.
Data Structures | |
struct | btaudio_t |
Click ctx object definition. More... | |
struct | btaudio_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | BTAUDIO_MAP_MIKROBUS(cfg, mikrobus) |
#define | BTAUDIO_RETVAL uint8_t |
#define | BTAUDIO_OK 0x00 |
#define | BTAUDIO_INIT_ERROR 0xFF |
#define | DRV_RX_BUFFER_SIZE 600 |
#define | DRV_TX_BUFFER_SIZE 100 |
#define | BTAUDIO_ERR 0x00 |
#define | BTAUDIO_STATUS_FALSE 0x00 |
#define | BTAUDIO_STATUS_TRUE 0x01 |
Typedefs | |
typedef uint8_t | btaudio_error_t |
Error type. | |
Enumerations | |
enum | a2dp_routing_values_t { ANALOG_OUTPUT = 0 , I2S_OUPUT = 1 , S_PDIF_OUPUT = 2 , INTERCOM_DAC = 3 } |
enum | bit_res_t { RES_24 = 0 , RES_32 = 1 } |
enum | sample_rate_t { RATE_8K = 0 , RATE_32K = 1 , RATE_44K1 = 2 , RATE_48K = 3 } |
enum | profile_bitmask_values { IAP_MODE = 0 , SPP_MODE = 1 , A2DP_MODE = 2 , HFP_MODE = 3 } |
enum | extended_features_bitmask_values { AVRCP_EK = 0 , RECONNECT_PWR_ON = 1 , DISCOVERABLE = 2 , AAC_APTX = 3 , REBOOT_DIS = 4 , MUTE_VOLUME = 5 , ENABLE_PIO4 = 6 , DISABLE_SYS_TONES = 7 , PWR_OFF_P_TIMEOUT = 8 , RESET_PWR_OFF = 9 , RECONNECT_PANIC = 10 , ENABLE_INDICATOR = 11 , ENABLE_TRACK_CHANGE = 12 , ENABLE_PLAYBACK_TONE = 13 , AUTO_ACCEPT = 14 } |
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. | |
This file contains API for BT Audio Click driver.