![]() |
LibDriver LD3320
|
ld3320 basic driver modules More...
Data Structures | |
| struct | ld3320_handle_s |
| ld3320 handle structure definition More... | |
| struct | ld3320_info_s |
| ld3320 information structure definition More... | |
Macros | |
| #define | LD3320_CYSTAL_MHZ 22.1184f /* 22.1184 MHz */ |
| ld3320 crystal frequency definition | |
Typedefs | |
| typedef struct ld3320_handle_s | ld3320_handle_t |
| ld3320 handle structure definition | |
| typedef struct ld3320_info_s | ld3320_info_t |
| ld3320 information structure definition | |
Enumerations | |
| enum | ld3320_mode_t { LD3320_MODE_ASR = 0x01 , LD3320_MODE_MP3 = 0x02 } |
| ld3320 mode enumeration definition More... | |
| enum | ld3320_mic_gain_t { LD3320_MIC_GAIN_COMMON = 0x43 , LD3320_MIC_GAIN_NOISE = 0x2F } |
| ld3320 mic gain enumeration definition More... | |
| enum | ld3320_vad_t { LD3320_VAD_COMMON = 0x12 , LD3320_VAD_FAR = 0x0A } |
| ld3320 vad enumeration definition More... | |
| enum | ld3320_status_t { LD3320_STATUS_NONE = 0x00 , LD3320_STATUS_ASR_RUNNING = 0x01 , LD3320_STATUS_ASR_FOUND_OK = 0x02 , LD3320_STATUS_ASR_FOUND_ZERO = 0x03 , LD3320_STATUS_ASR_ERROR = 0x04 , LD3320_STATUS_MP3_RUNNING = 0x05 , LD3320_STATUS_MP3_LOAD = 0x06 , LD3320_STATUS_MP3_END = 0x07 , LD3320_STATUS_MP3_ERROR = 0x08 } |
| ld3320 asr status enumeration definition More... | |
Functions | |
| uint8_t | ld3320_info (ld3320_info_t *info) |
| get chip's information | |
| uint8_t | ld3320_irq_handler (ld3320_handle_t *handle) |
| irq handler | |
| uint8_t | ld3320_init (ld3320_handle_t *handle) |
| initialize the chip | |
| uint8_t | ld3320_deinit (ld3320_handle_t *handle) |
| deinit the chip | |
| uint8_t | ld3320_start (ld3320_handle_t *handle) |
| start the process | |
| uint8_t | ld3320_stop (ld3320_handle_t *handle) |
| stop the process | |
| uint8_t | ld3320_configure_mp3 (ld3320_handle_t *handle, char *name) |
| configure the mp3 | |
| uint8_t | ld3320_set_mode (ld3320_handle_t *handle, ld3320_mode_t mode) |
| set the chip mode | |
| uint8_t | ld3320_get_mode (ld3320_handle_t *handle, ld3320_mode_t *mode) |
| get the chip mode | |
| uint8_t | ld3320_set_key_words (ld3320_handle_t *handle, char text[50][50], uint8_t len) |
| set the key words | |
| uint8_t | ld3320_get_key_words (ld3320_handle_t *handle, char text[50][50], uint8_t *len) |
| get the key words | |
| uint8_t | ld3320_set_mic_gain (ld3320_handle_t *handle, ld3320_mic_gain_t gain) |
| set the microphone gain | |
| uint8_t | ld3320_get_mic_gain (ld3320_handle_t *handle, ld3320_mic_gain_t *gain) |
| get the microphone gain | |
| uint8_t | ld3320_set_vad (ld3320_handle_t *handle, ld3320_vad_t vad) |
| set the vad | |
| uint8_t | ld3320_get_vad (ld3320_handle_t *handle, ld3320_vad_t *vad) |
| get the vad | |
| uint8_t | ld3320_get_status (ld3320_handle_t *handle, ld3320_status_t *status) |
| get the status | |
| uint8_t | ld3320_set_speaker_volume (ld3320_handle_t *handle, uint8_t volume) |
| set the speaker volume | |
| uint8_t | ld3320_get_speaker_volume (ld3320_handle_t *handle, uint8_t *volume) |
| get the speaker volume | |
| uint8_t | ld3320_set_headset_volume (ld3320_handle_t *handle, uint8_t volume_left, uint8_t volume_right) |
| set the headset volume | |
| uint8_t | ld3320_get_headset_volume (ld3320_handle_t *handle, uint8_t *volume_left, uint8_t *volume_right) |
| get the headset volume | |
ld3320 basic driver modules
| #define LD3320_CYSTAL_MHZ 22.1184f /* 22.1184 MHz */ |
ld3320 crystal frequency definition
Definition at line 63 of file driver_ld3320.h.
| typedef struct ld3320_handle_s ld3320_handle_t |
ld3320 handle structure definition
| typedef struct ld3320_info_s ld3320_info_t |
ld3320 information structure definition
| enum ld3320_mic_gain_t |
ld3320 mic gain enumeration definition
| Enumerator | |
|---|---|
| LD3320_MIC_GAIN_COMMON | common |
| LD3320_MIC_GAIN_NOISE | noise |
Definition at line 78 of file driver_ld3320.h.
| enum ld3320_mode_t |
ld3320 mode enumeration definition
| Enumerator | |
|---|---|
| LD3320_MODE_ASR | asr mode |
| LD3320_MODE_MP3 | mp3 mode |
Definition at line 69 of file driver_ld3320.h.
| enum ld3320_status_t |
ld3320 asr status enumeration definition
Definition at line 96 of file driver_ld3320.h.
| enum ld3320_vad_t |
ld3320 vad enumeration definition
| Enumerator | |
|---|---|
| LD3320_VAD_COMMON | common |
| LD3320_VAD_FAR | far |
Definition at line 87 of file driver_ld3320.h.
| uint8_t ld3320_configure_mp3 | ( | ld3320_handle_t * | handle, |
| char * | name ) |
configure the mp3
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | *name | pointer to a name buffer |
Definition at line 2215 of file driver_ld3320.c.
| uint8_t ld3320_deinit | ( | ld3320_handle_t * | handle | ) |
deinit the chip
| [in] | *handle | pointer to an ld3320 handle structure |
Definition at line 1870 of file driver_ld3320.c.
| uint8_t ld3320_get_headset_volume | ( | ld3320_handle_t * | handle, |
| uint8_t * | volume_left, | ||
| uint8_t * | volume_right ) |
get the headset volume
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *volume_left | pointer to a left volume buffer |
| [out] | *volume_right | pointer to a right volume buffer |
Definition at line 2166 of file driver_ld3320.c.
| uint8_t ld3320_get_key_words | ( | ld3320_handle_t * | handle, |
| char | text[50][50], | ||
| uint8_t * | len ) |
get the key words
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | **text | pointer to a text buffer |
| [out] | *len | pointer to a key words length buffer |
Definition at line 1129 of file driver_ld3320.c.
| uint8_t ld3320_get_mic_gain | ( | ld3320_handle_t * | handle, |
| ld3320_mic_gain_t * | gain ) |
get the microphone gain
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *gain | pointer to a microphone gain buffer |
Definition at line 1187 of file driver_ld3320.c.
| uint8_t ld3320_get_mode | ( | ld3320_handle_t * | handle, |
| ld3320_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 1069 of file driver_ld3320.c.
| uint8_t ld3320_get_speaker_volume | ( | ld3320_handle_t * | handle, |
| uint8_t * | volume ) |
get the speaker volume
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *volume | pointer to a speaker volume buffer |
Definition at line 2062 of file driver_ld3320.c.
| uint8_t ld3320_get_status | ( | ld3320_handle_t * | handle, |
| ld3320_status_t * | status ) |
get the status
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 1265 of file driver_ld3320.c.
| uint8_t ld3320_get_vad | ( | ld3320_handle_t * | handle, |
| ld3320_vad_t * | vad ) |
get the vad
| [in] | *handle | pointer to an ld3320 handle structure |
| [out] | *vad | pointer to a vad param buffer |
Definition at line 1239 of file driver_ld3320.c.
| uint8_t ld3320_info | ( | ld3320_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an ld3320 info structure |
Definition at line 2300 of file driver_ld3320.c.
| uint8_t ld3320_init | ( | ld3320_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an ld3320 handle structure |
Definition at line 1292 of file driver_ld3320.c.
| uint8_t ld3320_irq_handler | ( | ld3320_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to an ld3320 handle structure |
Definition at line 1421 of file driver_ld3320.c.
| uint8_t ld3320_set_headset_volume | ( | ld3320_handle_t * | handle, |
| uint8_t | volume_left, | ||
| uint8_t | volume_right ) |
set the headset volume
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | volume_left | left volume |
| [in] | volume_right | right volume |
Definition at line 2102 of file driver_ld3320.c.
| uint8_t ld3320_set_key_words | ( | ld3320_handle_t * | handle, |
| char | text[50][50], | ||
| uint8_t | len ) |
set the key words
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | **text | pointer to a text buffer |
| [in] | len | key words length |
Definition at line 1096 of file driver_ld3320.c.
| uint8_t ld3320_set_mic_gain | ( | ld3320_handle_t * | handle, |
| ld3320_mic_gain_t | gain ) |
set the microphone gain
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | gain | microphone gain |
Definition at line 1161 of file driver_ld3320.c.
| uint8_t ld3320_set_mode | ( | ld3320_handle_t * | handle, |
| ld3320_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | mode | chip mode |
Definition at line 1043 of file driver_ld3320.c.
| uint8_t ld3320_set_speaker_volume | ( | ld3320_handle_t * | handle, |
| uint8_t | volume ) |
set the speaker volume
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | volume | speaker volume |
Definition at line 2013 of file driver_ld3320.c.
| uint8_t ld3320_set_vad | ( | ld3320_handle_t * | handle, |
| ld3320_vad_t | vad ) |
set the vad
| [in] | *handle | pointer to an ld3320 handle structure |
| [in] | vad | vad param |
Definition at line 1213 of file driver_ld3320.c.
| uint8_t ld3320_start | ( | ld3320_handle_t * | handle | ) |
start the process
| [in] | *handle | pointer to an ld3320 handle structure |
Definition at line 1739 of file driver_ld3320.c.
| uint8_t ld3320_stop | ( | ld3320_handle_t * | handle | ) |
stop the process
| [in] | *handle | pointer to an ld3320 handle structure |
Definition at line 1958 of file driver_ld3320.c.