![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
#include "stdio.h"
#include "ci130x_spiflash.h"
#include "command_file_reader.h"
#include "string.h"
#include "ci_flash_data_info.h"
#include "flash_manage_outside_port.h"
#include "ci_log.h"
#include "FreeRTOS.h"
#include "task.h"
#include "romlib_runtime.h"
结构体 | |
struct | cmd_file_header_st |
Command information file header. 更多... | |
struct | models_table_item_st |
struct | cmd_models_table_item_st |
struct | model_header_st |
Model header 更多... | |
宏定义 | |
#define | MAX_CMD_FILE_FLAG_LEN 16 |
#define | cmd_file_reader_malloc(x) pvPortMalloc(x) |
#define | cmd_file_reader_free(x) vPortFree(x) |
类型定义 | |
typedef struct cmd_file_header_st | cmd_file_header_t |
Command information file header. 更多... | |
typedef struct models_table_item_st | models_table_item_t |
typedef struct cmd_models_table_item_st | cmd_models_table_item_t |
typedef struct model_header_st | model_header_t |
Model header 更多... | |
函数 | |
uint32_t | cmd_file_reader_init (uint32_t start_addr_in_flash) |
Initialize command file reader. 更多... | |
uint32_t | cmd_file_get_model_number () |
Get models number. 更多... | |
uint32_t | cmd_file_change_cur_model_group (uint8_t model_group_id) |
uint32_t | cmd_file_change_model (uint32_t model_id) |
Change current model group. 更多... | |
uint32_t | cmd_file_get_max_model_group_id () |
Get id of model group, that prun of asr is the max. 更多... | |
uint32_t | cmd_file_get_cur_model_dnn_id () |
uint32_t | cmd_file_get_cur_model_id (uint32_t *p_dnn_id, uint32_t *p_asr_id) |
Get models ID. 更多... | |
uint32_t | cmd_file_get_command_number () |
Get number of commands in current model. 更多... | |
uint32_t | cmd_file_read_command_table (void *table_buffer) |
Reads commands table to the specifiled buffer. 更多... | |
uint32_t | cmd_file_get_special_word_number () |
Get number of special words. 更多... | |
uint32_t | cmd_file_read_special_word_table (void *table_buffer) |
Reads special words table to the specifiled buffer. 更多... | |
uint32_t | cmd_file_read_string_index_table (void *table_buffer) |
Read string index table to the specifiled buffer. 更多... | |
uint32_t | cmd_file_get_string_table_size () |
Get size of string table. 更多... | |
uint32_t | cmd_file_read_string_table (void *table_buffer) |
Read string table to the specifiled buffer. 更多... | |
uint32_t | cmd_file_get_voice_number () |
Get number of voice. 更多... | |
uint32_t | cmd_file_read_voice_table (void *table_buffer) |
Read voice table to the specifiled buffer. 更多... | |
uint32_t | cmd_file_get_max_command_number () |
uint32_t | cmd_file_get_max_special_word_number () |
uint32_t | cmd_file_get_max_cmd_string_table_size () |
变量 | |
uint16_t | max_command_number = 0 |
uint16_t | max_special_word_number = 0 |
uint32_t | max_cmd_string_table_size = 0 |
static uint32_t | cmd_file_start_addr_in_flash = (uint32_t)-1 |
static cmd_file_header_t | cmd_file_header = {0} |
static model_header_t | model_header ={0} |
struct cmd_file_header_st |
struct model_header_st |
Model header
#define cmd_file_reader_free | ( | x | ) | vPortFree(x) |
#define cmd_file_reader_malloc | ( | x | ) | pvPortMalloc(x) |
#define MAX_CMD_FILE_FLAG_LEN 16 |
typedef struct cmd_file_header_st cmd_file_header_t |
Command information file header.
typedef struct cmd_models_table_item_st cmd_models_table_item_t |
typedef struct model_header_st model_header_t |
Model header
typedef struct models_table_item_st models_table_item_t |
uint32_t cmd_file_change_cur_model_group | ( | uint8_t | model_group_id | ) |
uint32_t cmd_file_change_model | ( | uint32_t | model_index | ) |
Change current model group.
model_group_id | ID of medel group in cmd file. |
uint32_t cmd_file_get_command_number | ( | ) |
Get number of commands in current model.
uint32_t cmd_file_get_cur_model_dnn_id | ( | ) |
uint32_t cmd_file_get_cur_model_id | ( | uint32_t * | p_dnn_id, |
uint32_t * | p_asr_id | ||
) |
Get models ID.
p_dnn_id | A pointer to a uint32_t variable used to receive dnn file id. |
p_asr_id | A pointer to a uint32_t variable used to receive asr file id. |
p_voice_group_id | A pointer to a uint32_t variable used to receive voice group id. |
uint32_t cmd_file_get_max_cmd_string_table_size | ( | ) |
uint32_t cmd_file_get_max_command_number | ( | ) |
uint32_t cmd_file_get_max_model_group_id | ( | ) |
Get id of model group, that prun of asr is the max.
uint32_t cmd_file_get_max_special_word_number | ( | ) |
uint32_t cmd_file_get_model_number | ( | ) |
Get models number.
uint32_t cmd_file_get_special_word_number | ( | ) |
Get number of special words.
uint32_t cmd_file_get_string_table_size | ( | ) |
Get size of string table.
uint32_t cmd_file_get_voice_number | ( | ) |
Get number of voice.
uint32_t cmd_file_read_command_table | ( | void * | table_buffer | ) |
Reads commands table to the specifiled buffer.
table_buffer | The buffer use to save commands table, provided by caller. Buffer size is larger or equal to commands number times sizeof(command_info_t). |
uint32_t cmd_file_read_special_word_table | ( | void * | table_buffer | ) |
Reads special words table to the specifiled buffer.
table_buffer | The buffer use to save special words table, provided by caller. Buffer size is larger or equal to special words number times sizeof(special_wait_count_t). |
uint32_t cmd_file_read_string_index_table | ( | void * | table_buffer | ) |
Read string index table to the specifiled buffer.
table_buffer | The buffer use to save string index table, provided by caller. Buffer size is larger or eaqual to commands number times sizeof(command_string_index_t). |
uint32_t cmd_file_read_string_table | ( | void * | table_buffer | ) |
Read string table to the specifiled buffer.
table_buffer | The buffer use to save string table, provided by caller. Buffer size is larger or eaqual to string table size. |
uint32_t cmd_file_read_voice_table | ( | void * | table_buffer | ) |
Read voice table to the specifiled buffer.
table_buffer | The buffer used to save voice table, provided by caller. Buffer size is larger or equal to voice number times sizeof(voice_info_t). |
uint32_t cmd_file_reader_init | ( | uint32_t | start_addr_in_flash | ) |
Initialize command file reader.
start_addr_in_flash | Start address of command file in flash. |
|
static |
|
static |
uint32_t max_cmd_string_table_size = 0 |
uint16_t max_command_number = 0 |
uint16_t max_special_word_number = 0 |
|
static |