HINTS Application Functions
APP_HINTS API Brief
Application |
Brief |
|---|---|
de-initialize hints relevant settings |
|
initialize hints relevant settings |
|
start to play hints procedure |
|
handle audio data of hints |
|
wrapper function for @app_play_hints_in_audio_task |
|
handle peer play hints cmd for @app_play_hints_in_audio_task |
APP_HINTS API Reference
Header File
Functions
-
void app_hints_deinit(bool execute_pending)
de-initialize hints relevant settings
reset hints relevant settings. If it has pending event, call @app_play_hints_in_audio_task to handle pending event
- 返回:
N/A
-
void app_hints_init(uint8_t hint_id)
initialize hints relevant settings
initialize hints relevant settings and audio environment data
- 参数:
hint_id – [in] index of hints behavior @hint_idx_t
- 返回:
N/A
-
uint8_t app_play_hints_in_audio_task(uint8_t hint_id, void *p_trigger_clk)
start to play hints procedure
If no other hints is being played, start hints procedure. Otherwise, push it into pending queue
- 参数:
hint_id – [in] index of hints behavior @hint_idx_t
p_trigger_clk – [in] the clock of hints trigger.
- 返回值:
0 – always 0
- 返回:
result
-
void app_hints_process(audio_trigger_type_t trigger_type)
handle audio data of hints
process audio data, and fill data into DAC.
- 参数:
trigger_type – [in] audio trigger type @audio_trigger_type_t
- 返回:
N/A
-
void app_play_hints_wrap(uint8_t hint_id, bool tws_direct_play)
wrapper function for @app_play_hints_in_audio_task
in TWS mode, only one side need precess play hints procedure
- 参数:
hint_id – [in] index of hints behavior @hint_idx_t
tws_direct_play – [in] In tws mode, the prompt sound is played directed without distingushing between the left and right earbuds.
- 返回:
N/A
-
uint8_t app_peer_play_hints(uint8_t hint_id, async_path_t async_path, bt_clk_t trigger_time)
handle peer play hints cmd for @app_play_hints_in_audio_task
in TWS mode, local handle peer play hints cmd
- 参数:
hint_id – [in] index of hints behavior @hint_idx_t
- 返回:
N/A
Structures
-
struct hints_hdr_t
hints data header struct definition
-
struct hints_info_t
hints data information struct definition
Public Members
-
hints_type_e hint_type
types of hints codec @hints_type_e
-
uint8_t hints_data[HINTS_DATA_PAGE_LEN]
data array loading from flash
-
hints_hdr_t hints_hdr
hints data header @hints_hdr_t
-
uint32_t hints_start_addr
hints data start address from flash
-
uint32_t hints_end_addr
hints data end address from flash
-
hints_type_e hint_type
Macros
-
HINTS_DATA_PAGE_LEN
-
IS_SINGLE_SIDE_HINT(hint_id)
-
IS_FORCE_SIDE_HINT(hint_id)
Enumerations
-
enum hint_idx_t
index of hints behavior definition
Values:
-
enumerator POWER_ON
-
enumerator HINT_CONNECTED
-
enumerator HINT_DISCONNECTED
-
enumerator POWER_OFF
-
enumerator ENTER_PAIRING
-
enumerator LOW_BATTERY
-
enumerator HFP_RING
-
enumerator HFP_ACK
-
enumerator HF_REJECT
-
enumerator HF_CANCEL
-
enumerator HF_VOICE_DIAL
-
enumerator MUTE_MIC
-
enumerator UNMUTE_MIC
-
enumerator VOL_MAX
-
enumerator VOL_MIN
-
enumerator HF_TRANSFER_TOGGLE
-
enumerator HF_REDIAL
-
enumerator RESERVED_1
-
enumerator HINT_TWS_CONNECTED
-
enumerator HINT_SIRI
-
enumerator HINT_PREV_TRACK
-
enumerator HINT_NEXT_TRACK
-
enumerator HINT_VOLUME_UP
-
enumerator HINT_VOLUME_DOWN
-
enumerator HINT_HUNG_UP
-
enumerator HINT_ANC_ON
-
enumerator HINT_ANC_TRANSPANT_ON
-
enumerator HINT_ANC_OFF
-
enumerator RESERVED_2
-
enumerator RESERVED_3
-
enumerator RESERVED_4
-
enumerator RESERVED_5
-
enumerator RESERVED_6
-
enumerator POWER_ON