CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
status_share.h
浏览该文件的文档.
1 #ifndef __STATUS_SHARE_H__
2 #define __STATUS_SHARE_H__
3 
4 #include "ci_log.h"
5 
6 typedef unsigned long status_t;
7 
8 #define STATUS_SHARE_MODULE
9 
10 #define INVALID_STATUS (((status_t)0) - 1) //无效状态值
11 
12 #define LOG_STATUS_SHARE CI_LOG_WARN
13 
14 typedef enum
15 {
16  EM_STATUS_ID_START = 0, //普通状态起始ID,本模块内部使用,请不要修改。
17  CI_SS_EXT_OSC_CLK, //晶振频率
18  CI_SS_SRC_CLK, //系统时钟源频率
19  CI_SS_AHB_CLK, //AHB总线时钟频率
20  CI_SS_APB_CLK, //APB总线时钟频率
21  CI_SS_IPCORE_CLK, //IPCORE时钟频率
22  CI_SS_SYSTEMTICK_CLK, //OS tick 时钟频率
23  CI_SS_VAD_STATE, //VAD状态:1、VAD start;2、没有VAD start
24  CI_SS_ASR_SYS_STATE, //ASR系统状态:1、ASR启动;2、ASR未启动(后续可能会增加ASR状态)
25  CI_SS_WAKING_UP_STATE, //当前是否处于唤醒状态:1、处于唤醒状态;2、处于非唤醒状态
26  CI_SS_CMD_STATE, //当前命令词是唤醒词还是命令词:1、唤醒词;2、命令词
27  CI_SS_CMD_SCORE, //当前命令词的分数
28  CI_SS_CMD_SCORE_CHA0, //双通道命令词状态下,通道0分数
29  CI_SS_CMD_SCORE_CHA1, //双通道命令词状态下,通道1分数
30  CI_SS_WAKING_UP_STATE_FOR_SSP, //当前是否处于唤醒状态:1、处于唤醒状态;2、处于非唤醒状态
31  CI_SS_CMD_STATE_FOR_SSP, //当前命令词是唤醒词还是命令词:1、唤醒词;2、命令词
32  CI_SS_PLAY_STATE, //播报状态:1、未播报;2、播报(可能会增加,本地播报或者网络播报,播放什么格式等的状态)
37  CI_SS_MIC_VOICE_STATUE, //MIC输入的语音的状态:0、未启动;1、正常状态;2、mute状态
38  CI_SS_ALC_STATE, //ALC开启关闭状态:0、关闭;1、开启
39  CI_SS_CWSL_OUTPUT_FLAG, //CWSL是否有识别结果输出:0、无识别结果;1、已有识别结果输出
40  CI_SS_INTERCEPT_ASR_OUT, //是否拦截ASR输出:0、不拦截;1、拦截
41  CI_SS_CWSL_IN_REG, //自学习是否在学习状态。
42  CI_SS_PR_ADDR, //某基地址 CWSL 用
43  CI_SS_START_SLEEP_PROCESS, //标记是否已开始退出唤醒处理。
44  CI_SS_ASR_TASK_PAUSED, //语音识别任务是否已暂停
45 
46  /*系统参数设置*/
47  //decoder参数设置
48  CI_SS_DECODER_MIN_ACTIVE, //默认400,若节点小于8000,可尝试修改到300,不可随意更改
49  CI_SS_DECODER_BEAM, //默认9.5
51 
52  CI_SS_CWSL_AEC_MUTE_STATE, //自学习开AEC时,学习过程先mute再播报,非学习状态可以正常使用AEC
53 
54  //下面的值用于统计状态ID数量,本模块内部使用,请不要修改。
56 } status_id_t;
57 
58 typedef enum
59 {
60  CI_SS_VAD_IDLE = 0, //VAD状态检测为非人声
62  CI_SS_VAD_ON, //VAD状态检测为人声
65 
66 typedef enum
67 {
68  CI_SS_ALC_OFF = 0, //ALC处于关闭状态
69  CI_SS_ALC_UP, //ALC处于开启状态
71 typedef enum
72 {
73  CI_SS_ASR_SYS_POWER_OFF = 0, //ASR还未启动
74  CI_SS_ASR_SYS_STARTED_UP, //ASR启动了
76 
77 typedef enum
78 {
79  CI_SS_NO_WAKEUP = 0, //当前系统处于非唤醒状态
80  CI_SS_WAKEUPED, //当前系统处于唤醒阶段
82 
83 typedef enum
84 {
86  CI_SS_CMD_IS_WAKEUP, //当前的命令词是唤醒词
87  CI_SS_CMD_IS_NORMAL, //当前的命令词是非唤醒词
89 
90 typedef enum
91 {
92  CI_SS_PLAY_STATE_IDLE = 0, //当前未播报
93  CI_SS_PLAY_STATE_PLAYING, //当前处于播报状态
95 
96 typedef enum
97 {
105 
106 typedef enum
107 {
112 
113 typedef enum
114 {
118 
122 void ciss_init(void);
123 
130 void ciss_set(status_id_t id, status_t value);
131 
139 
140 
141 
142 #endif
sdklog输出组件 这个文件用于定义sdk日志打印组件,log打印等级 参考Andriod Logcat 提供了多个打印函数, ...
Definition: status_share.h:109
Definition: status_share.h:85
Definition: status_share.h:28
Definition: status_share.h:33
Definition: status_share.h:41
Definition: status_share.h:50
Definition: status_share.h:100
Definition: status_share.h:20
Definition: status_share.h:43
Definition: status_share.h:35
void ciss_init(void)
信息共享模块初始化.
Definition: status_share.c:29
Definition: status_share.h:87
ci_ss_vad_state_t
Definition: status_share.h:58
Definition: status_share.h:63
Definition: status_share.h:102
ci_ss_asr_sys_state_t
Definition: status_share.h:71
Definition: status_share.h:108
Definition: status_share.h:61
ci_ss_play_state
Definition: status_share.h:90
Definition: status_share.h:31
Definition: status_share.h:55
Definition: status_share.h:101
Definition: status_share.h:86
ci_ss_cmd_state_t
Definition: status_share.h:83
Definition: status_share.h:32
Definition: status_share.h:93
Definition: status_share.h:38
Definition: status_share.h:39
Definition: status_share.h:24
Definition: status_share.h:110
status_id_t
Definition: status_share.h:14
Definition: status_share.h:49
Definition: status_share.h:116
Definition: status_share.h:73
Definition: status_share.h:52
Definition: status_share.h:68
Definition: status_share.h:25
Definition: status_share.h:48
ci_ss_wakeup_state_t
Definition: status_share.h:77
Definition: status_share.h:42
Definition: status_share.h:92
Definition: status_share.h:115
Definition: status_share.h:44
Definition: status_share.h:21
void ciss_set(status_id_t id, status_t value)
设置状态信息,如果状态有变化且是可等待状态,发送状态等待事件标志位.
Definition: status_share.c:60
Definition: status_share.h:27
Definition: status_share.h:103
Definition: status_share.h:29
Definition: status_share.h:19
Definition: status_share.h:60
Definition: status_share.h:69
Definition: status_share.h:17
ci_ss_cwsl_aec_mute_state
Definition: status_share.h:113
Definition: status_share.h:80
Definition: status_share.h:22
ci_ss_flash_state
Definition: status_share.h:96
Definition: status_share.h:26
Definition: status_share.h:37
Definition: status_share.h:62
Definition: status_share.h:18
Definition: status_share.h:74
ci_ss_mic_voice_state
Definition: status_share.h:106
Definition: status_share.h:99
Definition: status_share.h:98
Definition: status_share.h:30
Definition: status_share.h:40
unsigned long status_t
Definition: status_share.h:6
Definition: status_share.h:23
Definition: status_share.h:79
Definition: status_share.h:34
Definition: status_share.h:36
ci_ss_alc_state_t
Definition: status_share.h:66
status_t ciss_get(status_id_t id)
读取状态信息.
Definition: status_share.c:42
Definition: status_share.h:16