config.txt.h 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853
  1. /*!
  2. * \file
  3. * \brief 配置文件
  4. * \details
  5. * \author
  6. * \date
  7. * \copyright Actions
  8. */
  9. #include <input_manager_type.h>
  10. #define BOARD_LARK (4)
  11. #define CFG_SUPPORT_AAP_SETTINGS 1
  12. #define CFG_OPTIMIZE_BT_MUSIC_STUCK 0
  13. #define BOARD_TYPE BOARD_LARK
  14. /*-----------------------------------------------------------------------------
  15. * 配置文件中必须使用以下定义的 cfg_xxx 数据类型
  16. *---------------------------------------------------------------------------*/
  17. typedef signed char cfg_int8;
  18. typedef signed short cfg_int16;
  19. typedef signed int cfg_int32;
  20. typedef unsigned char cfg_uint8;
  21. typedef unsigned short cfg_uint16;
  22. typedef unsigned int cfg_uint32;
  23. /*---------------------------------------------------------------------------*/
  24. /* 常用数值定义
  25. */
  26. #ifndef TRUE
  27. #define TRUE 1
  28. #endif
  29. #ifndef FALSE
  30. #define FALSE 0
  31. #endif
  32. #define ENABLE TRUE
  33. #define DISABLE FALSE
  34. #define OK TRUE
  35. #define FAIL FALSE
  36. #define NONE 0
  37. /* IC 型号定义
  38. */
  39. #define IC_TYPE_LARK (1 << 14)
  40. /* 当前选用的 IC 型号
  41. */
  42. #if (BOARD_TYPE == BOARD_LARK)
  43. #define CFG_IC_TYPE IC_TYPE_LARK
  44. /* 最大配置数定义
  45. */
  46. #define CFG_MAX_USER_VERSION_LEN 32
  47. #define CFG_MAX_CASE_NAME_LEN 20
  48. #define CFG_MAX_RESERVED_SIZE 255
  49. #define CFG_MAX_GPIO_PINS 79
  50. #define CFG_MAX_LRADC_KEYS 9
  51. #define CFG_MAX_LRADC_COMBO_KEYS 3
  52. #define CFG_MAX_GPIO_KEYS 4
  53. #define CFG_MAX_KEY_FUNC_MAPS 40
  54. #define CFG_MAX_COMBO_KEY_MAPS 8
  55. #define CFG_MAX_LEDS 4
  56. #define CFG_MAX_LED_DISPLAY_MODELS 15
  57. #define CFG_MAX_VOICES 24
  58. #define CFG_MAX_NUMERIC_VOICES 10
  59. #define CFG_MAX_TONES 10
  60. #define CFG_MAX_VOICE_NAME_LEN 9
  61. #define CFG_MAX_VOICE_FMT_LEN 5
  62. #define CFG_MAX_TONE_NAME_LEN 9
  63. #define CFG_MAX_TONE_FMT_LEN 5
  64. #define CFG_MAX_EVENT_NOTIFY 40
  65. #define CFG_MAX_BATTERY_LEVEL 10
  66. #define CFG_MAX_BT_DEV_NAME_LEN 30
  67. #define CFG_MAX_BT_SUFFIX_LEN 10
  68. #define CFG_MAX_BT_PIN_CODE_LEN 6
  69. #define CFG_MAX_BT_SUPPORT_DEVICES 3
  70. #define CFG_MAX_BT_MUSIC_VOLUME 16
  71. #define CFG_MAX_BT_CALL_VOLUME 15
  72. #define CFG_MAX_LINEIN_VOLUME 16
  73. #define CFG_MAX_VOICE_VOLUME 16
  74. #define CFG_MAX_CAP_TEMP_COMP 20
  75. #define CFG_MAX_PEQ_BANDS 14
  76. #define CFG_MAX_UUID_STR_LEN 38
  77. #define CFG_MAX_ADC_NUM 4
  78. #define CFG_GPIO_MFP_PIN_DEF(_gpio_no, _mfp_sel) \
  79. (_gpio_no << 0) | \
  80. (_mfp_sel << 8)
  81. /*-----------------------------------------------------------------------------
  82. * 配置枚举类型定义
  83. * 类型必须以 CFG_XXX 命名
  84. *---------------------------------------------------------------------------*/
  85. /* 配置分类定义
  86. */
  87. enum CFG_CATEGORY
  88. {
  89. CFG_CATEGORY_SYSTEM, // <"系统">
  90. CFG_CATEGORY_UPGRADE, // <"固件升级设置">
  91. CFG_CATEGORY_DISPLAY, // <"显示">
  92. CFG_CATEGORY_KEY, // <"按键">
  93. CFG_CATEGORY_AUDIO, // <"音频">
  94. CFG_CATEGORY_VOLUME_GAIN, // <"音量及增益">
  95. CFG_CATEGORY_BATTERY_CHARGE, // <"电池及充电">
  96. CFG_CATEGORY_EVENT_NOTIFY, // <"事件通知">
  97. CFG_CATEGORY_VOICE, // <"语音">
  98. CFG_CATEGORY_TONE, // <"提示音">
  99. CFG_CATEGORY_LINEIN, // <"Linein", hide>
  100. CFG_CATEGORY_APP_MUSIC, // <"本地音乐", hide>
  101. CFG_CATEGORY_CARD, // <"存储卡", hide>
  102. CFG_CATEGORY_USB, // <"USB", hide>
  103. CFG_CATEGORY_BT_MUSIC, // <"蓝牙音乐">
  104. CFG_CATEGORY_BT_CALL, // <"蓝牙通话">
  105. CFG_CATEGORY_IG_CALL, // <"智能语音", hide>
  106. CFG_CATEGORY_BLUETOOTH, // <"蓝牙管理">
  107. CFG_CATEGORY_BLE, // <"BLE 管理">
  108. CFG_CATEGORY_ASET, // <"音效调节">
  109. CFG_CATEGORY_ASQT, // <"通话调节">
  110. CFG_CATEGORY_DUALMIC, // <"双麦降噪">
  111. CFG_CATEGORY_BONE, // <"骨传导">
  112. };
  113. enum CFG_TYPE_BOOL
  114. {
  115. YES = 1, // <"是">
  116. NO = 0, // <"否">
  117. };
  118. enum CFG_TYPE_SYS_SUPPORT_FEATURES
  119. {
  120. SYS_ENABLE_SOFT_WATCHDOG = (1 << 0), // <"启用软 Watchdog 调试模式">
  121. SYS_ENABLE_DC5V_IN_RESET = (1 << 1), // <"允许 DC5V 接入时复位", hide>
  122. SYS_ENABLE_DC5VPD_WHEN_DETECT_OUT = (1 << 2), // <"允许 DC5V 检测拔出时下拉">
  123. SYS_FRONT_CHARGE_DC5V_OUT_REBOOT = (1 << 3), // <"前台充电 DC5V 拔出时重启">
  124. SYS_FORCE_CHARGE_WHEN_DC5V_IN = (1 << 4), // <"DC5V 接入时总是开启充电 (即使电池满电)">
  125. };
  126. enum CFG_TYPE_AUTO_POWOFF_MODE
  127. {
  128. AUTO_POWOFF_MODE_UNCONNECTED, // <"无连接">
  129. AUTO_POWOFF_MODE_NOT_PLAYING, // <"无播放">
  130. };
  131. enum CFG_TYPE_GPIO_PIN
  132. {
  133. GPIO_NONE = 0xFF,
  134. GPIO_0 = 0,
  135. GPIO_1,
  136. GPIO_2,
  137. GPIO_3,
  138. GPIO_4,
  139. GPIO_5,
  140. GPIO_6,
  141. GPIO_7,
  142. GPIO_8,
  143. GPIO_9,
  144. GPIO_10,
  145. GPIO_11,
  146. GPIO_12,
  147. GPIO_13,
  148. GPIO_14,
  149. GPIO_15,
  150. GPIO_16,
  151. GPIO_17,
  152. GPIO_18,
  153. GPIO_19,
  154. GPIO_20,
  155. GPIO_21,
  156. GPIO_22,
  157. GPIO_23,
  158. GPIO_24,
  159. GPIO_25,
  160. GPIO_26,
  161. GPIO_27,
  162. GPIO_28,
  163. GPIO_29,
  164. GPIO_30,
  165. GPIO_31,
  166. GPIO_32,
  167. GPIO_33,
  168. GPIO_34,
  169. GPIO_35,
  170. GPIO_36,
  171. GPIO_37,
  172. GPIO_38,
  173. GPIO_39,
  174. GPIO_40,
  175. GPIO_41,
  176. GPIO_42,
  177. GPIO_43,
  178. GPIO_44,
  179. GPIO_45,
  180. GPIO_46,
  181. GPIO_47,
  182. GPIO_48,
  183. GPIO_49,
  184. GPIO_50,
  185. GPIO_51,
  186. GPIO_52,
  187. GPIO_53,
  188. GPIO_54,
  189. GPIO_55,
  190. GPIO_56,
  191. GPIO_57,
  192. GPIO_58,
  193. GPIO_59,
  194. GPIO_60,
  195. GPIO_61,
  196. GPIO_62,
  197. GPIO_63,
  198. GPIO_64,
  199. GPIO_65,
  200. };
  201. enum CFG_TYPE_GPIO_LEVEL
  202. {
  203. GPIO_LEVEL_HIGH = 1, // <"高电平">
  204. GPIO_LEVEL_LOW = 0, // <"低电平">
  205. };
  206. enum CFG_TYPE_GPIO_PULL
  207. {
  208. CFG_GPIO_PULL_NONE = 0, // <"无">
  209. CFG_GPIO_PULL_UP = 1, // <"上拉 50K">
  210. CFG_GPIO_PULL_UP_10K = 2, // <"上拉 10K">
  211. CFG_GPIO_PULL_DOWN = 3, // <"下拉 100K">
  212. };
  213. enum CFG_TYPE_UART_TX_PIN
  214. {
  215. UART_TX_GPIO_NONE = GPIO_NONE,
  216. UART_TX_GPIO_10 = CFG_GPIO_MFP_PIN_DEF(10, 5),
  217. UART_TX_GPIO_28 = CFG_GPIO_MFP_PIN_DEF(28, 5),
  218. UART_TX_GPIO_37 = CFG_GPIO_MFP_PIN_DEF(37, 5),
  219. UART_TX_GPIO_63 = CFG_GPIO_MFP_PIN_DEF(63, 5),
  220. };
  221. enum CFG_TYPE_UART_RX_PIN
  222. {
  223. UART_RX_GPIO_NONE = GPIO_NONE,
  224. UART_RX_GPIO_11 = CFG_GPIO_MFP_PIN_DEF(11, 5),
  225. UART_RX_GPIO_29 = CFG_GPIO_MFP_PIN_DEF(29, 5),
  226. UART_RX_GPIO_38 = CFG_GPIO_MFP_PIN_DEF(38, 5),
  227. UART_RX_GPIO_62 = CFG_GPIO_MFP_PIN_DEF(62, 5),
  228. };
  229. enum CFG_TYPE_ONOFF_LONG_PRESS_RESET
  230. {
  231. ONOFF_LONG_PRESS_RESET_DISABLE = 0xFF, // <"禁止长按复位">
  232. ONOFF_LONG_PRESS_RESET_8S = 0, // <"8 秒">
  233. ONOFF_LONG_PRESS_RESET_12S = 1, // <"12 秒">
  234. };
  235. enum CFG_TYPE_ONOFF_PRESS_POWER_ON
  236. {
  237. ONOFF_PRESS_POWER_ON_SHORT = 0, // <"短按开机">
  238. ONOFF_PRESS_POWER_ON_250_MS = 250, // <"250 毫秒">
  239. ONOFF_PRESS_POWER_ON_500_MS = 500, // <"500 毫秒">
  240. ONOFF_PRESS_POWER_ON_1000_MS = 1000, // <"1 秒">
  241. ONOFF_PRESS_POWER_ON_1500_MS = 1500, // <"1.5 秒">
  242. ONOFF_PRESS_POWER_ON_2000_MS = 2000, // <"2 秒">
  243. ONOFF_PRESS_POWER_ON_3000_MS = 3000, // <"3 秒">
  244. ONOFF_PRESS_POWER_ON_4000_MS = 4000, // <"4 秒">
  245. };
  246. enum CFG_TYPE_BOOT_HOLD_KEY_FUNC
  247. {
  248. BOOT_HOLD_KEY_FUNC_NONE, // <"无">
  249. BOOT_HOLD_KEY_FUNC_ENTER_PAIR_MODE, // <"进入配对模式">
  250. BOOT_HOLD_KEY_FUNC_TWS_PAIR_SEARCH, // <"TWS 组对搜索">
  251. BOOT_HOLD_KEY_FUNC_AUTO_SELECT, // <"自动选择 TWS 组对搜索或配对模式">
  252. BOOT_HOLD_KEY_FUNC_CLEAR_PAIRED_LIST, // <"清除配对列表">
  253. };
  254. #define CFG_LRADC_CTRL_DEF(_ctrl_no, _gpio_no, _mfp_sel) \
  255. (_ctrl_no << 0) | \
  256. (_gpio_no << 8) | \
  257. (_mfp_sel << 16)
  258. enum CFG_TYPE_LRADC_CTRL
  259. {
  260. LRADC_CTRL_NONE = 0xFF,
  261. LRADC_CTRL_1_GPIO_76 = CFG_LRADC_CTRL_DEF(0, 76, 3), // <"LRADC_CTRL_1 (GPIO_76)">
  262. };
  263. enum CFG_TYPE_NTC_LRADC_CTRL
  264. {
  265. NTC_LRADC_CTRL_NONE = 0x00, // <"LRADC_CTRL_NONE">
  266. NTC_LRADC_CTRL_1_GPIO_76 = LRADC_CTRL_1_GPIO_76, // <"LRADC_CTRL_1 (GPIO_76)">
  267. };
  268. enum CFG_TYPE_LRADC_PULL_UP
  269. {
  270. LRADC_PULL_UP_INTERNAL = 0, // <"内部上拉">
  271. LRADC_PULL_UP_EXTERNAL = 1, // <"外部上拉 (不可用)">
  272. };
  273. enum CFG_TYPE_KEY_VALUE
  274. {
  275. VKEY_NONE = KEY_RESERVED,
  276. VKEY_1 = KEY_F1,
  277. VKEY_2 = KEY_F2,
  278. VKEY_3 = KEY_F3,
  279. VKEY_4 = KEY_F4,
  280. VKEY_5 = KEY_F5,
  281. VKEY_6 = KEY_F6,
  282. LRADC_COMBO_VKEY_1 = KEY_COMBO_1,
  283. LRADC_COMBO_VKEY_2 = KEY_COMBO_2,
  284. LRADC_COMBO_VKEY_3 = KEY_COMBO_3,
  285. VKEY_PLAY = KEY_PAUSE_AND_RESUME,
  286. VKEY_VSUB = KEY_VOLUMEDOWN,
  287. VKEY_VADD = KEY_VOLUMEUP,
  288. VKEY_PREV = KEY_PREVIOUSSONG,
  289. VKEY_NEXT = KEY_NEXTSONG,
  290. VKEY_MODE = KEY_TBD,
  291. VKEY_MENU = KEY_MENU,
  292. TAP_KEY = KEY_TAP,
  293. };
  294. enum CFG_TYPE_KEY_EVENT
  295. {
  296. KEY_EVENT_NONE = 0, // <"无">
  297. KEY_EVENT_DOWN = KEY_TYPE_SHORT_DOWN, // <"按下">
  298. KEY_EVENT_SINGLE_CLICK = KEY_TYPE_SHORT_UP, // <"单击">
  299. KEY_EVENT_DOUBLE_CLICK = KEY_TYPE_DOUBLE_CLICK, // <"双击">
  300. KEY_EVENT_TRIPLE_CLICK = KEY_TYPE_TRIPLE_CLICK, // <"三击">
  301. KEY_EVENT_QUAD_CLICK = KEY_TYPE_QUAD_CLICK, // <"四击">
  302. KEY_EVENT_QUINT_CLICK = KEY_TYPE_QUINT_CLICK, // <"五击">
  303. KEY_EVENT_LONG_PRESS = KEY_TYPE_LONG_DOWN, // <"长按">
  304. KEY_EVENT_LONG_UP = KEY_TYPE_LONG_UP, // <"长按抬起">
  305. KEY_EVENT_LONG_LONG_PRESS = KEY_TYPE_LONG, // <"超长按">
  306. KEY_EVENT_LONG_LONG_UP = KEY_TYPE_LONG_UP, // <"超长按抬起">
  307. KEY_EVENT_VERY_LONG_PRESS = KEY_TYPE_LONG6S, // <"极长按">
  308. KEY_EVENT_VERY_LONG_UP = KEY_TYPE_LONG6S_UP, // <"极长按抬起">
  309. KEY_EVENT_CUSTOMED_SEQUENCE_1 = KEY_TYPE_CUSTOMED_SEQUENCE_1, // <"自定义按键序列 1">
  310. KEY_EVENT_CUSTOMED_SEQUENCE_2 = KEY_TYPE_CUSTOMED_SEQUENCE_2, // <"自定义按键序列 2">
  311. };
  312. enum CFG_TYPE_CUSTOMED_KEY_SEQUENCE
  313. {
  314. CUSTOMED_KEY_SEQUENCE_NONE = 0, // <"无">
  315. CUSTOMED_KEY_SEQUENCE_1 = KEY_TYPE_CUSTOMED_SEQUENCE_1, // <"自定义按键序列 1">
  316. CUSTOMED_KEY_SEQUENCE_2 = KEY_TYPE_CUSTOMED_SEQUENCE_2, // <"自定义按键序列 2">
  317. };
  318. enum CFG_TYPE_KEY_DEVICE_TYPE
  319. {
  320. KEY_DEVICE_TYPE_NONE = 0, // <"无">
  321. KEY_DEVICE_TWS_UNPAIRED = (1 << 0), // <"未组对">
  322. KEY_DEVICE_TWS_PAIRED = (1 << 1), // <"已组对">
  323. KEY_DEVICE_CHANNEL_L = (1 << 2), // <"L 左设备">
  324. KEY_DEVICE_CHANNEL_R = (1 << 3), // <"R 右设备">
  325. };
  326. enum CFG_TYPE_KEY_FUNC
  327. {
  328. KEY_FUNC_NONE = 0, // <"无">
  329. KEY_FUNC_POWER_OFF, // <"关机">
  330. KEY_FUNC_ENTER_PAIR_MODE, // <"进入配对模式">
  331. KEY_FUNC_CLEAR_PAIRED_LIST, // <"清除配对列表 (不限模式)">
  332. KEY_FUNC_CLEAR_PAIRED_LIST_IN_PAIR_MODE, // <"清除配对列表 (配对模式下)">
  333. KEY_FUNC_CLEAR_PAIRED_LIST_IN_FRONT_CHARGE, // <"清除配对列表 (前台充电时)">
  334. KEY_FUNC_CLEAR_PAIRED_LIST_IN_UNLINKED, // <"清除配对列表 (未连接时)">
  335. KEY_FUNC_TWS_PAIR_SEARCH, // <"TWS 组对搜索">
  336. KEY_FUNC_START_RECONNECT, // <"启动回连">
  337. KEY_FUNC_PLAY_PAUSE, // <"播放/暂停">
  338. KEY_FUNC_PREV_MUSIC, // <"上一曲 (不限状态)">
  339. KEY_FUNC_NEXT_MUSIC, // <"下一曲 (不限状态)">
  340. KEY_FUNC_PREV_MUSIC_IN_PLAYING, // <"上一曲 (播放状态)">
  341. KEY_FUNC_NEXT_MUSIC_IN_PLAYING, // <"下一曲 (播放状态)">
  342. KEY_FUNC_PREV_MUSIC_IN_PAUSED, // <"上一曲 (暂停状态)">
  343. KEY_FUNC_NEXT_MUSIC_IN_PAUSED, // <"下一曲 (暂停状态)">
  344. KEY_FUNC_ADD_MUSIC_VOLUME, // <"音乐音量+">
  345. KEY_FUNC_SUB_MUSIC_VOLUME, // <"音乐音量-">
  346. KEY_FUNC_ADD_MUSIC_VOLUME_IN_LINKED, // <"音乐音量+ (已连接时)">
  347. KEY_FUNC_SUB_MUSIC_VOLUME_IN_LINKED, // <"音乐音量- (已连接时)">
  348. KEY_FUNC_ADD_CALL_VOLUME, // <"通话音量+">
  349. KEY_FUNC_SUB_CALL_VOLUME, // <"通话音量-">
  350. KEY_FUNC_ACCEPT_CALL, // <"接听来电">
  351. KEY_FUNC_REJECT_CALL, // <"拒接来电">
  352. KEY_FUNC_HANGUP_CALL, // <"挂断通话">
  353. KEY_FUNC_KEEP_CALL_RELEASE_3WAY, // <"继续当前通话,挂断三方通话">
  354. KEY_FUNC_HOLD_CALL_ACTIVE_3WAY, // <"保留当前通话,切换三方通话">
  355. KEY_FUNC_HANGUP_CALL_ACTIVE_3WAY, // <"挂断当前通话,切换三方通话">
  356. KEY_FUNC_SWITCH_CALL_OUT, // <"切换通话输出">
  357. KEY_FUNC_SWITCH_MIC_MUTE, // <"打开/关闭 MIC 静音">
  358. KEY_FUNC_DIAL_LAST_NO, // <"回拨电话">
  359. KEY_FUNC_START_VOICE_ASSIST, // <"启动 Siri 等语音助手">
  360. KEY_FUNC_STOP_VOICE_ASSIST, // <"停止 Siri 等语音助手">
  361. KEY_FUNC_HID_PHOTO_SHOT, // <"HID 拍照">
  362. KEY_FUNC_HID_CUSTOM_KEY, // <"HID 自定义按键">
  363. KEY_FUNC_ENTER_BQB_TEST_MODE, // <"进入 BQB 测试模式 (不限模式)">
  364. KEY_FUNC_ENTER_BQB_TEST_IN_PAIR_MODE, // <"进入 BQB 测试模式 (配对模式下)">
  365. KEY_FUNC_SWITCH_VOICE_LANG, // <"切换语音语言 (不限模式)">
  366. KEY_FUNC_SWITCH_VOICE_LANG_IN_PAIR_MODE, // <"切换语音语言 (配对模式下)">
  367. KEY_FUNC_SWITCH_VOICE_LANG_IN_UNLINKED, // <"切换语音语言 (未连接时)">
  368. KEY_FUNC_CUSTOMED_1, // <"自定义功能 1">
  369. KEY_FUNC_CUSTOMED_2, // <"自定义功能 2">
  370. KEY_FUNC_CUSTOMED_3, // <"自定义功能 3">
  371. KEY_FUNC_CUSTOMED_4, // <"自定义功能 4">
  372. KEY_FUNC_CUSTOMED_5, // <"自定义功能 5">
  373. KEY_FUNC_CUSTOMED_6, // <"自定义功能 6">
  374. KEY_FUNC_CUSTOMED_7, // <"自定义功能 7">
  375. KEY_FUNC_CUSTOMED_8, // <"自定义功能 8">
  376. KEY_FUNC_CUSTOMED_9, // <"自定义功能 9">
  377. KEY_FUNC_SWITCH_LOW_LATENCY_MODE, // <"切换低延迟模式">
  378. KEY_FUNC_START_PRIVMA_TALK, // <"开始APP智能语音上传">
  379. KEY_FUNC_NMA_KEY_FIRST, // <"云音乐按键定义单击功能">
  380. KEY_FUNC_NMA_KEY_SECOND, // <"云音乐按键定义双击功能">
  381. KEY_FUNC_TMA_ONE_KEY_TO_REQUEST, // <"腾讯音乐娱乐一键直达">
  382. KEY_FUNC_DAE_SWITCH, // <"音效切换">
  383. KEY_FUNC_TRANSPARENCY_MODE, // <"通透模式">
  384. };
  385. enum CFG_TYPE_LED_GPIO_PIN
  386. {
  387. LED_GPIO_NONE = GPIO_NONE, // <"GPIO_NONE">
  388. LED_GPIO_0 = GPIO_0, // <"GPIO_0">
  389. LED_GPIO_1 = GPIO_1, // <"GPIO_1">
  390. LED_GPIO_2 = GPIO_2, // <"GPIO_2">
  391. LED_GPIO_3 = GPIO_3, // <"GPIO_3 (PWM_0)", pwm>
  392. LED_GPIO_4 = GPIO_4, // <"GPIO_4 (PWM_0)", pwm>
  393. LED_GPIO_5 = GPIO_5, // <"GPIO_5 (PWM_1)", pwm>
  394. LED_GPIO_6 = GPIO_6, // <"GPIO_6 (PWM_2)", pwm>
  395. LED_GPIO_7 = GPIO_7, // <"GPIO_7 (PWM_3)", pwm>
  396. LED_GPIO_8 = GPIO_8, // <"GPIO_8 (PWM_4)", pwm>
  397. LED_GPIO_9 = GPIO_9, // <"GPIO_9 (PWM_5)", pwm>
  398. LED_GPIO_10 = GPIO_10, // <"GPIO_10 (PWM_6)", pwm>
  399. LED_GPIO_11 = GPIO_11, // <"GPIO_11 (PWM_7)", pwm>
  400. LED_GPIO_12 = GPIO_12, // <"GPIO_12 (PWM_8)", pwm>
  401. LED_GPIO_13 = GPIO_13, // <"GPIO_13">
  402. LED_GPIO_14 = GPIO_14, // <"GPIO_14 (PWM_0)", pwm>
  403. LED_GPIO_15 = GPIO_15, // <"GPIO_15 (PWM_1)", pwm>
  404. LED_GPIO_16 = GPIO_16, // <"GPIO_16 (PWM_2)", pwm>
  405. LED_GPIO_17 = GPIO_17, // <"GPIO_17 (PWM_3)", pwm>
  406. LED_GPIO_18 = GPIO_18, // <"GPIO_18 (PWM_4)", pwm>
  407. LED_GPIO_19 = GPIO_19, // <"GPIO_19 (PWM_5)", pwm>
  408. LED_GPIO_20 = GPIO_20, // <"GPIO_20 (PWM_6)", pwm>
  409. LED_GPIO_21 = GPIO_21, // <"GPIO_21 (PWM_7)", pwm>
  410. LED_GPIO_22 = GPIO_22, // <"GPIO_22 (PWM_8)", pwm>
  411. LED_GPIO_23 = GPIO_23, // <"GPIO_23">
  412. LED_GPIO_24 = GPIO_24, // <"GPIO_24">
  413. LED_GPIO_25 = GPIO_25, // <"GPIO_25">
  414. LED_GPIO_26 = GPIO_26, // <"GPIO_26">
  415. LED_GPIO_27 = GPIO_27, // <"GPIO_27">
  416. LED_GPIO_28 = GPIO_28, // <"GPIO_28">
  417. LED_GPIO_29 = GPIO_29, // <"GPIO_29">
  418. LED_GPIO_30 = GPIO_30, // <"GPIO_30">
  419. LED_GPIO_31 = GPIO_31, // <"GPIO_31">
  420. LED_GPIO_32 = GPIO_32, // <"GPIO_32">
  421. LED_GPIO_33 = GPIO_33, // <"GPIO_33">
  422. LED_GPIO_34 = GPIO_34, // <"GPIO_34">
  423. LED_GPIO_35 = GPIO_35, // <"GPIO_35">
  424. LED_GPIO_36 = GPIO_36, // <"GPIO_36 (PWM_0)", pwm>
  425. LED_GPIO_37 = GPIO_37, // <"GPIO_37 (PWM_1)", pwm>
  426. LED_GPIO_38 = GPIO_38, // <"GPIO_38 (PWM_2)", pwm>
  427. LED_GPIO_39 = GPIO_39, // <"GPIO_39 (PWM_3)", pwm>
  428. LED_GPIO_40 = GPIO_40, // <"GPIO_40 (PWM_4)", pwm>
  429. LED_GPIO_41 = GPIO_41, // <"GPIO_41 (PWM_5)", pwm>
  430. LED_GPIO_42 = GPIO_42, // <"GPIO_42 (PWM_6)", pwm>
  431. LED_GPIO_43 = GPIO_43, // <"GPIO_43 (PWM_7)", pwm>
  432. LED_GPIO_44 = GPIO_44, // <"GPIO_44 (PWM_8)", pwm>
  433. LED_GPIO_45 = GPIO_45, // <"GPIO_45 (PWM_7)", pwm>
  434. LED_GPIO_46 = GPIO_46, // <"GPIO_46 (PWM_8)", pwm>
  435. LED_GPIO_47 = GPIO_47, // <"GPIO_47">
  436. LED_GPIO_48 = GPIO_48, // <"GPIO_48">
  437. LED_GPIO_49 = GPIO_49, // <"GPIO_49 (PWM_0)", pwm>
  438. LED_GPIO_50 = GPIO_50, // <"GPIO_50 (PWM_1)", pwm>
  439. LED_GPIO_51 = GPIO_51, // <"GPIO_51 (PWM_2)", pwm>
  440. LED_GPIO_52 = GPIO_52, // <"GPIO_52 (PWM_3)", pwm>
  441. LED_GPIO_53 = GPIO_53, // <"GPIO_53 (PWM_4)", pwm>
  442. LED_GPIO_54 = GPIO_54, // <"GPIO_54 (PWM_5)", pwm>
  443. LED_GPIO_55 = GPIO_55, // <"GPIO_55 (PWM_6)", pwm>
  444. LED_GPIO_56 = GPIO_56, // <"GPIO_56 (PWM_7)", pwm>
  445. LED_GPIO_57 = GPIO_57, // <"GPIO_57 (PWM_8)", pwm>
  446. LED_GPIO_58 = GPIO_58, // <"GPIO_58">
  447. LED_GPIO_59 = GPIO_59, // <"GPIO_59">
  448. LED_GPIO_60 = GPIO_60, // <"GPIO_60">
  449. LED_GPIO_61 = GPIO_61, // <"GPIO_61">
  450. LED_GPIO_62 = GPIO_62, // <"GPIO_62">
  451. LED_GPIO_63 = GPIO_63, // <"GPIO_63">
  452. LED_GPIO_64 = GPIO_64, // <"GPIO_64">
  453. LED_GPIO_65 = GPIO_65, // <"GPIO_65">
  454. };
  455. enum CFG_TYPE_LED_NO
  456. {
  457. LED_NULL = 0,
  458. LED_1 = (1 << 0),
  459. LED_2 = (1 << 1),
  460. LED_3 = (1 << 2),
  461. LED_4 = (1 << 3),
  462. LED_RED = (1 << 4),
  463. LED_GREEN = (1 << 5),
  464. LED_BLUE = (1 << 6),
  465. };
  466. enum CFG_TYPE_LED_DISPLAY_MODEL
  467. {
  468. LED_DISPLAY_MODEL_NONE = 0,
  469. LED_DISPLAY_MODEL_1,
  470. LED_DISPLAY_MODEL_2,
  471. LED_DISPLAY_MODEL_3,
  472. LED_DISPLAY_MODEL_4,
  473. LED_DISPLAY_MODEL_5,
  474. LED_DISPLAY_MODEL_6,
  475. LED_DISPLAY_MODEL_7,
  476. LED_DISPLAY_MODEL_8,
  477. LED_DISPLAY_MODEL_9,
  478. LED_DISPLAY_POWER_ON,
  479. LED_DISPLAY_POWER_OFF,
  480. LED_DISPLAY_STANDBY,
  481. LED_DISPLAY_CHARGE_START,
  482. LED_DISPLAY_CHARGE_FULL,
  483. LED_DISPLAY_BT_PAIR_MODE,
  484. LED_DISPLAY_BT_WAIT_CONNECT,
  485. LED_DISPLAY_BT_CONNECTED,
  486. LED_DISPLAY_BT_UNLINKED,
  487. LED_DISPLAY_BT_CALL_INCOMING,
  488. LED_DISPLAY_BT_CALL_ONGOING,
  489. };
  490. enum CFG_TYPE_LED_OVERRIDE_MODE
  491. {
  492. LED_OVERRIDE_NONE = 0, // <"无">
  493. LED_OVERRIDE_FRONT = 3, // <"前">
  494. LED_OVERRIDE_MIDDLE = 2, // <"中">
  495. LED_OVERRIDE_BACK = 1, // <"后">
  496. };
  497. enum CFG_TYPE_I2STX_MCLK_PIN
  498. {
  499. I2STX_MCLK_GPIO_NONE = GPIO_NONE,
  500. I2STX_MCLK_GPIO_6 = CFG_GPIO_MFP_PIN_DEF(6, 12),
  501. I2STX_MCLK_GPIO_16 = CFG_GPIO_MFP_PIN_DEF(16, 12),
  502. I2STX_MCLK_GPIO_36 = CFG_GPIO_MFP_PIN_DEF(36, 12),
  503. I2STX_MCLK_GPIO_49 = CFG_GPIO_MFP_PIN_DEF(49, 12),
  504. };
  505. enum CFG_TYPE_I2STX_BCLK_PIN
  506. {
  507. I2STX_BCLK_GPIO_NONE = GPIO_NONE,
  508. I2STX_BCLK_GPIO_7 = CFG_GPIO_MFP_PIN_DEF(7, 12),
  509. I2STX_BCLK_GPIO_17 = CFG_GPIO_MFP_PIN_DEF(17, 12),
  510. I2STX_BCLK_GPIO_37 = CFG_GPIO_MFP_PIN_DEF(37, 12),
  511. I2STX_BCLK_GPIO_50 = CFG_GPIO_MFP_PIN_DEF(50, 12),
  512. };
  513. enum CFG_TYPE_I2STX_LRCLK_PIN
  514. {
  515. I2STX_LRCLK_GPIO_NONE = GPIO_NONE,
  516. I2STX_LRCLK_GPIO_8 = CFG_GPIO_MFP_PIN_DEF(8, 12),
  517. I2STX_LRCLK_GPIO_18 = CFG_GPIO_MFP_PIN_DEF(18, 12),
  518. I2STX_LRCLK_GPIO_38 = CFG_GPIO_MFP_PIN_DEF(38, 12),
  519. I2STX_LRCLK_GPIO_51 = CFG_GPIO_MFP_PIN_DEF(51, 12),
  520. };
  521. enum CFG_TYPE_I2STX_DAT_PIN
  522. {
  523. I2STX_DAT_GPIO_NONE = GPIO_NONE,
  524. I2STX_DAT_GPIO_9 = CFG_GPIO_MFP_PIN_DEF(9, 12),
  525. I2STX_DAT_GPIO_14 = CFG_GPIO_MFP_PIN_DEF(14, 12),
  526. I2STX_DAT_GPIO_39 = CFG_GPIO_MFP_PIN_DEF(39, 12),
  527. I2STX_DAT_GPIO_52 = CFG_GPIO_MFP_PIN_DEF(52, 12),
  528. };
  529. enum CFG_TYPE_DMIC01_CLK_PIN
  530. {
  531. DMIC01_CLK_GPIO_NONE = GPIO_NONE,
  532. DMIC01_CLK_GPIO_6 = CFG_GPIO_MFP_PIN_DEF(6, 17),
  533. DMIC01_CLK_GPIO_30 = CFG_GPIO_MFP_PIN_DEF(30, 17),
  534. };
  535. enum CFG_TYPE_DMIC01_DAT_PIN
  536. {
  537. DMIC01_DAT_GPIO_NONE = GPIO_NONE,
  538. DMIC01_DAT_GPIO_7 = CFG_GPIO_MFP_PIN_DEF(7, 17),
  539. DMIC01_DAT_GPIO_31 = CFG_GPIO_MFP_PIN_DEF(31, 17),
  540. };
  541. enum CFG_TYPE_DMIC23_CLK_PIN
  542. {
  543. DMIC23_CLK_GPIO_NONE = GPIO_NONE,
  544. DMIC23_CLK_GPIO_4 = CFG_GPIO_MFP_PIN_DEF(4, 16),
  545. DMIC23_CLK_GPIO_8 = CFG_GPIO_MFP_PIN_DEF(8, 16),
  546. DMIC23_CLK_GPIO_22 = CFG_GPIO_MFP_PIN_DEF(22, 16),
  547. DMIC23_CLK_GPIO_40 = CFG_GPIO_MFP_PIN_DEF(40, 16),
  548. DMIC23_CLK_GPIO_44 = CFG_GPIO_MFP_PIN_DEF(44, 16),
  549. DMIC23_CLK_GPIO_53 = CFG_GPIO_MFP_PIN_DEF(44, 16),
  550. };
  551. enum CFG_TYPE_DMIC23_DAT_PIN
  552. {
  553. DMIC23_DAT_GPIO_NONE = GPIO_NONE,
  554. DMIC23_DAT_GPIO_5 = CFG_GPIO_MFP_PIN_DEF(5, 16),
  555. DMIC23_DAT_GPIO_9 = CFG_GPIO_MFP_PIN_DEF(9, 16),
  556. DMIC23_DAT_GPIO_23 = CFG_GPIO_MFP_PIN_DEF(23, 16),
  557. DMIC23_DAT_GPIO_41 = CFG_GPIO_MFP_PIN_DEF(41, 16),
  558. DMIC23_DAT_GPIO_42 = CFG_GPIO_MFP_PIN_DEF(42, 16),
  559. DMIC23_DAT_GPIO_54 = CFG_GPIO_MFP_PIN_DEF(54, 16),
  560. DMIC23_DAT_GPIO_55 = CFG_GPIO_MFP_PIN_DEF(55, 16),
  561. DMIC23_DAT_GPIO_57 = CFG_GPIO_MFP_PIN_DEF(57, 16),
  562. };
  563. enum CFG_TYPE_VOLUME_GAIN
  564. {
  565. VOLUME_GAIN_0 = 0x0, // <"MUTE">
  566. VOLUME_GAIN_1 = 0x46, // <" -45.375 dB">
  567. VOLUME_GAIN_2 = 0x4d, // <" -42.750 dB">
  568. VOLUME_GAIN_3 = 0x57, // <" -39.000 dB">
  569. VOLUME_GAIN_4 = 0x5d, // <" -36.750 dB">
  570. VOLUME_GAIN_5 = 0x63, // <" -34.500 dB">
  571. VOLUME_GAIN_6 = 0x69, // <" -32.250 dB">
  572. VOLUME_GAIN_7 = 0x6c, // <" -31.125 dB">
  573. VOLUME_GAIN_8 = 0x71, // <" -29.250 dB">
  574. VOLUME_GAIN_9 = 0x75, // <" -27.750 dB">
  575. VOLUME_GAIN_10 = 0x78, // <" -26.625 dB">
  576. VOLUME_GAIN_11 = 0x7b, // <" -25.500 dB">
  577. VOLUME_GAIN_12 = 0x7e, // <" -24.375 dB">
  578. VOLUME_GAIN_13 = 0x81, // <" -23.250 dB">
  579. VOLUME_GAIN_14 = 0x84, // <" -22.125 dB">
  580. VOLUME_GAIN_15 = 0x86, // <" -21.375 dB">
  581. VOLUME_GAIN_16 = 0x89, // <" -20.250 dB">
  582. VOLUME_GAIN_17 = 0x8b, // <" -19.500 dB">
  583. VOLUME_GAIN_18 = 0x8c, // <" -19.125 dB">
  584. VOLUME_GAIN_19 = 0x8d, // <" -18.750 dB">
  585. VOLUME_GAIN_20 = 0x8f, // <" -18.000 dB">
  586. VOLUME_GAIN_21 = 0x91, // <" -17.250 dB">
  587. VOLUME_GAIN_22 = 0x93, // <" -16.500 dB">
  588. VOLUME_GAIN_23 = 0x95, // <" -15.750 dB">
  589. VOLUME_GAIN_24 = 0x97, // <" -15.000 dB">
  590. VOLUME_GAIN_25 = 0x98, // <" -14.625 dB">
  591. VOLUME_GAIN_26 = 0x9a, // <" -13.875 dB">
  592. VOLUME_GAIN_27 = 0x9c, // <" -13.125 dB">
  593. VOLUME_GAIN_28 = 0x9d, // <" -12.750 dB">
  594. VOLUME_GAIN_29 = 0x9f, // <" -12.000 dB">
  595. VOLUME_GAIN_30 = 0xa0, // <" -11.625 dB">
  596. VOLUME_GAIN_31 = 0xa2, // <" -10.875 dB">
  597. VOLUME_GAIN_32 = 0xa4, // <" -10.125 dB">
  598. VOLUME_GAIN_33 = 0xa5, // <" -9.750 dB">
  599. VOLUME_GAIN_34 = 0xa6, // <" -9.375 dB">
  600. VOLUME_GAIN_35 = 0xa8, // <" -8.625 dB">
  601. VOLUME_GAIN_36 = 0xa9, // <" -8.250 dB">
  602. VOLUME_GAIN_37 = 0xaa, // <" -7.875 dB">
  603. VOLUME_GAIN_38 = 0xab, // <" -7.500 dB">
  604. VOLUME_GAIN_39 = 0xac, // <" -7.125 dB">
  605. VOLUME_GAIN_40 = 0xad, // <" -6.750 dB">
  606. VOLUME_GAIN_41 = 0xae, // <" -6.375 dB">
  607. VOLUME_GAIN_42 = 0xaf, // <" -6.000 dB">
  608. VOLUME_GAIN_43 = 0xb0, // <" -5.625 dB">
  609. VOLUME_GAIN_44 = 0xb1, // <" -5.250 dB">
  610. VOLUME_GAIN_45 = 0xb2, // <" -4.875 dB">
  611. VOLUME_GAIN_46 = 0xb3, // <" -4.500 dB">
  612. VOLUME_GAIN_47 = 0xb4, // <" -4.125 dB">
  613. VOLUME_GAIN_48 = 0xb5, // <" -3.750 dB">
  614. VOLUME_GAIN_49 = 0xb6, // <" -3.375 dB">
  615. VOLUME_GAIN_50 = 0xb7, // <" -3.000 dB">
  616. VOLUME_GAIN_51 = 0xb8, // <" -2.625 dB">
  617. VOLUME_GAIN_52 = 0xb9, // <" -2.250 dB">
  618. VOLUME_GAIN_53 = 0xba, // <" -1.875 dB">
  619. VOLUME_GAIN_54 = 0xbb, // <" -1.500 dB">
  620. VOLUME_GAIN_55 = 0xbc, // <" -1.125 dB">
  621. VOLUME_GAIN_56 = 0xbd, // <" -0.750 dB">
  622. VOLUME_GAIN_57 = 0xbe, // <" -0.375 dB">
  623. VOLUME_GAIN_58 = 0xbf, // <" 0.00 dB">
  624. VOLUME_GAIN_59 = 0xc0, // <" 0.375 dB">
  625. VOLUME_GAIN_60 = 0xc1, // <" 0.750 dB">
  626. VOLUME_GAIN_61 = 0xc2, // <" 1.125 dB">
  627. VOLUME_GAIN_62 = 0xc3, // <" 1.500 dB">
  628. VOLUME_GAIN_63 = 0xc4, // <" 1.875 dB">
  629. VOLUME_GAIN_64 = 0xc5, // <" 2.250 dB">
  630. VOLUME_GAIN_65 = 0xc6, // <" 2.625 dB">
  631. VOLUME_GAIN_66 = 0xc7, // <" 3.000 dB">
  632. VOLUME_GAIN_67 = 0xc8, // <" 3.375 dB">
  633. VOLUME_GAIN_68 = 0xc9, // <" 3.750 dB">
  634. VOLUME_GAIN_69 = 0xca, // <" 4.125 dB">
  635. VOLUME_GAIN_70 = 0xcb, // <" 4.500 dB">
  636. VOLUME_GAIN_71 = 0xcc, // <" 4.875 dB">
  637. VOLUME_GAIN_72 = 0xcd, // <" 5.250 dB">
  638. VOLUME_GAIN_73 = 0xce, // <" 5.625 dB">
  639. VOLUME_GAIN_74 = 0xcf, // <" 6.000 dB">
  640. VOLUME_GAIN_75 = 0xd0, // <" 6.375 dB">
  641. VOLUME_GAIN_76 = 0xd1, // <" 6.750 dB">
  642. VOLUME_GAIN_77 = 0xd2, // <" 7.125 dB">
  643. VOLUME_GAIN_78 = 0xd3, // <" 7.500 dB">
  644. VOLUME_GAIN_79 = 0xd4, // <" 7.875 dB">
  645. };
  646. enum CFG_TYPE_MIC_GAIN
  647. {
  648. MIC_GAIN_0_0_DB = 0x0, // <"0 dB">
  649. MIC_GAIN_3_0_DB = 30, // <"3.0 dB">
  650. MIC_GAIN_6_0_DB = 60, // <"6.0 dB">
  651. MIC_GAIN_7_5_DB = 75, // <"7.5 dB">
  652. MIC_GAIN_9_0_DB = 90, // <"9.0 dB">
  653. MIC_GAIN_10_5_DB = 105, // <"10.5 dB">
  654. MIC_GAIN_12_0_DB = 120, // <"12.0 dB">
  655. MIC_GAIN_13_5_DB = 135, // <"13.5 dB">
  656. MIC_GAIN_15_0_DB = 150, // <"15.0 dB">
  657. MIC_GAIN_16_5_DB = 165, // <"16.5 dB">
  658. MIC_GAIN_18_0_DB = 180, // <"18.0 dB">
  659. MIC_GAIN_19_5_DB = 190, // <"19.5 dB">
  660. MIC_GAIN_21_0_DB = 210, // <"21.0 dB">
  661. MIC_GAIN_22_5_DB = 225, // <"22.5 dB">
  662. MIC_GAIN_23_0_DB = 230, // <"23.0 dB">
  663. MIC_GAIN_24_0_DB = 240, // <"24.0 dB">
  664. MIC_GAIN_25_0_DB = 250, // <"25.0 dB">
  665. MIC_GAIN_25_5_DB = 255, // <"25.5 dB">
  666. MIC_GAIN_26_0_DB = 260, // <"26.0 dB">
  667. MIC_GAIN_26_5_DB = 265, // <"26.5 dB">
  668. MIC_GAIN_27_0_DB = 270, // <"27.0 dB">
  669. MIC_GAIN_27_5_DB = 275, // <"27.5 dB">
  670. MIC_GAIN_28_0_DB = 280, // <"28.0 dB">
  671. MIC_GAIN_28_5_DB = 285, // <"28.5 dB">
  672. MIC_GAIN_29_0_DB = 290, // <"29.0 dB">
  673. MIC_GAIN_29_5_DB = 295, // <"29.5 dB">
  674. MIC_GAIN_30_0_DB = 300, // <"30.0 dB">
  675. MIC_GAIN_30_5_DB = 305, // <"30.5 dB">
  676. MIC_GAIN_31_0_DB = 310, // <"31.0 dB">
  677. MIC_GAIN_31_5_DB = 315, // <"31.5 dB">
  678. MIC_GAIN_32_0_DB = 320, // <"32.0 dB">
  679. MIC_GAIN_32_5_DB = 325, // <"32.5 dB">
  680. MIC_GAIN_33_0_DB = 330, // <"33.0 dB">
  681. MIC_GAIN_33_5_DB = 335, // <"33.5 dB">
  682. MIC_GAIN_34_0_DB = 340, // <"34.0 dB">
  683. MIC_GAIN_34_5_DB = 345, // <"34.5 dB">
  684. MIC_GAIN_35_0_DB = 350, // <"35.0 dB">
  685. MIC_GAIN_35_5_DB = 355, // <"35.5 dB">
  686. MIC_GAIN_36_0_DB = 360, // <"36.0 dB">
  687. MIC_GAIN_37_0_DB = 370, // <"37.0 dB">
  688. MIC_GAIN_38_0_DB = 380, // <"38.0 dB">
  689. MIC_GAIN_39_0_DB = 390, // <"39.0 dB">
  690. MIC_GAIN_40_0_DB = 400, // <"40.0 dB">
  691. MIC_GAIN_41_0_DB = 410, // <"41.0 dB">
  692. MIC_GAIN_42_0_DB = 420, // <"42.0 dB">
  693. MIC_GAIN_43_0_DB = 430, // <"43.0 dB">
  694. MIC_GAIN_44_0_DB = 440, // <"44.0 dB">
  695. MIC_GAIN_45_0_DB = 450, // <"45.0 dB">
  696. MIC_GAIN_46_0_DB = 460, // <"46.0 dB">
  697. MIC_GAIN_47_0_DB = 470, // <"47.0 dB">
  698. MIC_GAIN_48_0_DB = 480, // <"48.0 dB">
  699. MIC_GAIN_49_0_DB = 490, // <"49.0 dB">
  700. MIC_GAIN_50_0_DB = 500, // <"50.0 dB">
  701. MIC_GAIN_51_0_DB = 510, // <"51.0 dB">
  702. MIC_GAIN_52_0_DB = 520, // <"52.0 dB">
  703. MIC_GAIN_53_0_DB = 530, // <"53.0 dB">
  704. MIC_GAIN_54_0_DB = 540, // <"54.0 dB">
  705. MIC_GAIN_55_0_DB = 550, // <"55.0 dB">
  706. MIC_GAIN_56_0_DB = 560, // <"56.0 dB">
  707. MIC_GAIN_57_0_DB = 570, // <"57.0 dB">
  708. MIC_GAIN_58_0_DB = 580, // <"58.0 dB">
  709. MIC_GAIN_59_0_DB = 590, // <"59.0 dB">
  710. MIC_GAIN_60_0_DB = 600, // <"60.0 dB">
  711. MIC_GAIN_61_0_DB = 610, // <"61.0 dB">
  712. MIC_GAIN_62_0_DB = 620, // <"62.0 dB">
  713. MIC_GAIN_63_0_DB = 630, // <"63.0 dB">
  714. MIC_GAIN_64_0_DB = 640, // <"64.0 dB">
  715. MIC_GAIN_65_0_DB = 650, // <"65.0 dB">
  716. MIC_GAIN_66_0_DB = 660, // <"66.0 dB">
  717. MIC_GAIN_67_0_DB = 670, // <"67.0 dB">
  718. MIC_GAIN_68_0_DB = 680, // <"68.0 dB">
  719. MIC_GAIN_69_0_DB = 690, // <"69.0 dB">
  720. MIC_GAIN_70_0_DB = 700, // <"70.0 dB">
  721. MIC_GAIN_71_0_DB = 710, // <"71.0 dB">
  722. MIC_GAIN_72_0_DB = 720, // <"72.0 dB">
  723. MIC_GAIN_73_0_DB = 730, // <"73.0 dB">
  724. MIC_GAIN_74_0_DB = 740, // <"74.0 dB">
  725. MIC_GAIN_75_0_DB = 750, // <"75.0 dB">
  726. MIC_GAIN_76_0_DB = 760, // <"76.0 dB">
  727. MIC_GAIN_77_0_DB = 770, // <"77.0 dB">
  728. MIC_GAIN_78_0_DB = 780, // <"78.0 dB">
  729. MIC_GAIN_79_0_DB = 790, // <"79.0 dB">
  730. MIC_GAIN_81_0_DB = 810, // <"81.0 dB">
  731. MIC_GAIN_82_5_DB = 825, // <"82.5 dB">
  732. MIC_GAIN_84_0_DB = 840, // <"84.0 dB">
  733. };
  734. enum CFG_TYPE_LINEIN_DETECT_MODE
  735. {
  736. LINEIN_DETECT_NONE, // <"不检测">
  737. LINEIN_DETECT_BY_GPIO, // <"GPIO 检测">
  738. LINEIN_DETECT_BY_LRADC, // <"LRADC 检测">
  739. };
  740. enum CFG_TYPE_AUDIO_OUT_MODE
  741. {
  742. AUDIO_OUT_MODE_DAC_DIFF = 0, // <"DAC 差分">
  743. AUDIO_OUT_MODE_DAC_NODIRECT = 1, // <"DAC 非直驱">
  744. AUDIO_OUT_MODE_I2S = 2, // <"I2S">
  745. };
  746. enum CFG_TYPE_AUXIN_OUT_MODE
  747. {
  748. AUX_AA = 0, // <"AA 通路">
  749. AUX_ADDA = 1, // <"ADDA 通路">
  750. };
  751. enum CFG_TYPE_SPEAKER_OUT_SELECT
  752. {
  753. SPEAKER_OUT_ADAPTIVE = 2, // <"自适应">
  754. SPEAKER_OUT_ENABLE = 1, // <"打开">
  755. SPEAKER_OUT_DISABLE = 0, // <"关闭">
  756. };
  757. enum CFG_TYPE_DMIC_GAIN_SELECT
  758. {
  759. DMIC_GAIN_1X = 0, // <"1X(0db)">
  760. DMIC_GAIN_2X = 1, // <"2X(6db)">
  761. DMIC_GAIN_4X = 2, // <"4X(12db)">
  762. DMIC_GAIN_8X = 3, // <"8X(18db)">
  763. DMIC_GAIN_16X = 4, // <"16X(24db)">
  764. DMIC_GAIN_32X = 5, // <"32X(30db)">
  765. DMIC_GAIN_63X = 6, // <"63X(36db)">
  766. };
  767. enum CFG_TYPE_ANC
  768. {
  769. ANC_DISABLE = 0, //ANC_DISABLE
  770. ANC_FF = 1, //ANC_FF
  771. ANC_FB = 2, //ANC_FB
  772. ANC_FY = 3, //ANC_FY
  773. };
  774. enum CFG_TYPE_ADC
  775. {
  776. ADC_NONE = 0, // <"无">
  777. ADC_0 = (1 << 0), // <"ADC0">
  778. ADC_1 = (1 << 1), // <"ADC1">
  779. ADC_2 = (1 << 2), // <"ADC2">
  780. ADC_3 = (1 << 3), // <"ADC3">
  781. };
  782. enum CFG_TYPE_VMIC
  783. {
  784. VMIC_NONE = 0, // <"无">
  785. VMIC_0 = (1 << 0), // <"VMIC0">
  786. VMIC_1 = (1 << 1), // <"VMIC1">
  787. VMIC_2 = (1 << 2), // <"VMIC2">
  788. };
  789. enum CFG_TYPE_ADC_TYPE
  790. {
  791. ADC_TYPE_AMIC = 0, // <"AMIC">
  792. ADC_TYPE_DMIC = 1, // <"DMIC">
  793. };
  794. enum CFG_TYPE_AUDIO_IN_MODE
  795. {
  796. AUDIO_IN_MODE_ADC_DIFF = 0, // <"差分">
  797. AUDIO_IN_MODE_ADC_SINGLE = 1, // <"单端">
  798. };
  799. typedef struct // <"麦克风配置">
  800. {
  801. cfg_uint8 Adc_Index; // <"ADC", CFG_TYPE_ADC>
  802. cfg_uint8 Mic_Type; // <"mic类型", CFG_TYPE_ADC_TYPE>
  803. cfg_uint8 Audio_In_Mode; // <"mic输入类型", CFG_TYPE_AUDIO_IN_MODE>
  804. } CFG_Type_Mic_Config;
  805. enum CFG_TYPE_PA_SWING_SETTING
  806. {
  807. PA_SWING_1_6_VPP = 1, // <"1.6 Vpp">
  808. PA_SWING_2_0_VPP = 0, // <"2.0 Vpp">
  809. };
  810. enum CFG_TYPE_CHANNEL_SELECT_MODE
  811. {
  812. CHANNEL_SELECT_NORMAL_LR, // <"(非 TWS) 正常左右声道">
  813. CHANNEL_SELECT_MIX_LR, // <"(非 TWS) 混合左右声道">
  814. CHANNEL_SELECT_SWAP_LR, // <"(非 TWS) 交换左右声道">
  815. CHANNEL_SELECT_BOTH_L, // <"(非 TWS) 双边左声道">
  816. CHANNEL_SELECT_BOTH_R, // <"(非 TWS) 双边右声道">
  817. CHANNEL_SELECT_L_BY_TWS_PAIR, // <"TWS 组对选择左声道">
  818. CHANNEL_SELECT_R_BY_TWS_PAIR, // <"TWS 组对选择右声道">
  819. CHANNEL_SELECT_L_BY_GPIO, // <"GPIO 选择左声道">
  820. CHANNEL_SELECT_R_BY_GPIO, // <"GPIO 选择右声道">
  821. CHANNEL_SELECT_L_BY_LRADC, // <"LRADC 选择左声道">
  822. CHANNEL_SELECT_R_BY_LRADC, // <"LRADC 选择右声道">
  823. };
  824. enum CFG_TYPE_TWS_ALONE_AUDIO_CHANNEL
  825. {
  826. TWS_ALONE_AUDIO_MIX_LR, // <"混合左右声道">
  827. TWS_ALONE_AUDIO_ADAPTIVE, // <"单边自适应">
  828. TWS_ALONE_AUDIO_SINGLE_L, // <"单边左声道">
  829. TWS_ALONE_AUDIO_SINGLE_R, // <"单边右声道">
  830. };
  831. enum CFG_TYPE_VOICE_ID
  832. {
  833. VOICE_NONE = 0, // <"无">
  834. VOICE_ID1, // <"语音 1">
  835. VOICE_ID2, // <"语音 2">
  836. VOICE_ID3, // <"语音 3">
  837. VOICE_ID4, // <"语音 4">
  838. VOICE_ID5, // <"语音 5">
  839. VOICE_POWER_ON, // <"开机">
  840. VOICE_POWER_OFF, // <"关机">
  841. VOICE_BAT_LOW, // <"电量低">
  842. VOICE_BAT_TOO_LOW, // <"电量不足">
  843. VOICE_BT_PAIR_MODE, // <"配对模式">
  844. VOICE_BT_WAIT_CONNECT, // <"等待连接">
  845. VOICE_BT_CONNECTED, // <"蓝牙连接成功">
  846. VOICE_2ND_CONNECTED, // <"第二设备连接成功">
  847. VOICE_BT_DISCONNECTED, // <"蓝牙断开">
  848. VOICE_TWS_WAIT_PAIR, // <"等待组对">
  849. VOICE_TWS_CONNECTED, // <"组对成功">
  850. VOICE_TWS_DISCONNECTED, // <"组对断开">
  851. VOICE_PLAY, // <"播放">
  852. VOICE_PAUSE, // <"暂停">
  853. VOICE_PREV_MUSIC, // <"上一曲">
  854. VOICE_NEXT_MUSIC, // <"下一曲">
  855. VOICE_MIN_VOLUME, // <"最小音量">
  856. VOICE_MAX_VOLUME, // <"最大音量">
  857. VOICE_LINEIN, // <"音频输入", hide>
  858. };
  859. enum CFG_TYPE_NUMERIC_VOICE_ID
  860. {
  861. VOICE_NO_0 = '0', // <"数字 0">
  862. VOICE_NO_1 = '1', // <"数字 1">
  863. VOICE_NO_2 = '2', // <"数字 2">
  864. VOICE_NO_3 = '3', // <"数字 3">
  865. VOICE_NO_4 = '4', // <"数字 4">
  866. VOICE_NO_5 = '5', // <"数字 5">
  867. VOICE_NO_6 = '6', // <"数字 6">
  868. VOICE_NO_7 = '7', // <"数字 7">
  869. VOICE_NO_8 = '8', // <"数字 8">
  870. VOICE_NO_9 = '9', // <"数字 9">
  871. };
  872. enum CFG_TYPE_VOICE_LANGUAGE
  873. {
  874. VOICE_LANGUAGE_1 = 0, // <"语音语言 1">
  875. VOICE_LANGUAGE_2 = 1, // <"语音语言 2">
  876. };
  877. enum CFG_TYPE_TONE_ID
  878. {
  879. TONE_NONE = 0, // <"无">
  880. TONE_ID1, // <"提示音 1">
  881. TONE_ID2, // <"提示音 2">
  882. TONE_ID3, // <"提示音 3">
  883. TONE_ID4, // <"提示音 4">
  884. TONE_ID5, // <"提示音 5">
  885. TONE_ID6, // <"提示音 6">
  886. TONE_ID7, // <"提示音 7">
  887. TONE_KEY_SOUND, // <"按键音">
  888. TONE_CALL_RING, // <"来电铃声">
  889. TONE_WARNING, // <"警告">
  890. TONE_TM_ENTER, // <"通透模式开">
  891. TONE_TM_EXIT, // <"通透模式关">
  892. };
  893. enum CFG_TYPE_SYS_EVENT
  894. {
  895. UI_EVENT_NONE, // <"无">
  896. UI_EVENT_POWER_ON, // <"开机">
  897. UI_EVENT_POWER_OFF, // <"关机">
  898. UI_EVENT_STANDBY, // <"待机">
  899. UI_EVENT_WAKE_UP, // <"唤醒">
  900. UI_EVENT_BATTERY_LOW, // <"电量低">
  901. UI_EVENT_BATTERY_LOW_EX, // <"更低电量">
  902. UI_EVENT_BATTERY_TOO_LOW, // <"电量不足">
  903. UI_EVENT_REPEAT_BAT_LOW, // <"重复低电提示">
  904. UI_EVENT_CHARGE_START, // <"开始充电">
  905. UI_EVENT_CHARGE_FULL, // <"充电满">
  906. UI_EVENT_FRONT_CHARGE_POWON, // <"前台充电开机">
  907. UI_EVENT_CHARGE_STOP, // <"结束充电">
  908. UI_EVENT_ENTER_PAIR_MODE, // <"进入配对模式">
  909. UI_EVENT_CLEAR_PAIRED_LIST, // <"清除配对列表">
  910. UI_EVENT_FACTORY_DEFAULT, // <"恢复出厂设置">
  911. UI_EVENT_BT_WAIT_CONNECT, // <"等待连接">
  912. UI_EVENT_BT_CONNECTED, // <"蓝牙连接成功">
  913. UI_EVENT_2ND_CONNECTED, // <"第二设备连接成功">
  914. UI_EVENT_BT_DISCONNECTED, // <"蓝牙断开">
  915. UI_EVENT_BT_UNLINKED, // <"蓝牙未连接">
  916. UI_EVENT_TWS_WAIT_PAIR, // <"TWS 等待组对">
  917. UI_EVENT_TWS_CONNECTED, // <"TWS 组对成功">
  918. UI_EVENT_TWS_DISCONNECTED,// <"TWS 组对断开">
  919. UI_EVENT_TWS_PAIR_FAILED, // <"TWS 组对失败">
  920. UI_EVENT_MIN_VOLUME, // <"最小音量">
  921. UI_EVENT_MAX_VOLUME, // <"最大音量">
  922. UI_EVENT_BT_MUSIC_PLAY, // <"蓝牙音乐播放">
  923. UI_EVENT_BT_MUSIC_PAUSE, // <"蓝牙音乐暂停">
  924. UI_EVENT_PREV_MUSIC, // <"上一曲">
  925. UI_EVENT_NEXT_MUSIC, // <"下一曲">
  926. UI_EVENT_BT_START_CALL, // <"通话开始">
  927. UI_EVENT_BT_CALL_OUTGOING, // <"去电">
  928. UI_EVENT_BT_CALL_INCOMING, // <"来电">
  929. UI_EVENT_BT_CALL_3WAYIN, // <"三方来电">
  930. UI_EVENT_BT_CALL_REJECT, // <"拒接来电">
  931. UI_EVENT_BT_CALL_ONGOING, // <"通话开始">
  932. UI_EVENT_BT_CALL_END, // <"通话结束">
  933. UI_EVENT_SWITCH_CALL_OUT, // <"切换通话输出">
  934. UI_EVENT_MIC_MUTE_ON, // <"MIC 静音打开">
  935. UI_EVENT_MIC_MUTE_OFF, // <"MIC 静音关闭">
  936. UI_EVENT_VOICE_ASSIST_START, // <"Siri 等语音助手启动">
  937. UI_EVENT_VOICE_ASSIST_STOP, // <"Siri 等语音助手停止">
  938. UI_EVENT_HID_PHOTO_SHOT, // <"HID 拍照">
  939. UI_EVENT_ENTER_LINEIN, // <"进入 Linein", hide>
  940. UI_EVENT_LINEIN_PLAY, // <"Linein 播放", hide>
  941. UI_EVENT_LINEIN_PAUSE, // <"Linein 暂停", hide>
  942. UI_EVENT_SEL_VOICE_LANG_1, // <"切换语音语言 1">
  943. UI_EVENT_SEL_VOICE_LANG_2, // <"切换语音语言 2">
  944. UI_EVENT_ENTER_BQB_TEST_MODE, // <"进入 BQB 测试模式">
  945. UI_EVENT_CUSTOMED_1, // <"自定义事件 1">
  946. UI_EVENT_CUSTOMED_2, // <"自定义事件 2">
  947. UI_EVENT_CUSTOMED_3, // <"自定义事件 3">
  948. UI_EVENT_CUSTOMED_4, // <"自定义事件 4">
  949. UI_EVENT_CUSTOMED_5, // <"自定义事件 5">
  950. UI_EVENT_CUSTOMED_6, // <"自定义事件 6">
  951. UI_EVENT_CUSTOMED_7, // <"自定义事件 7">
  952. UI_EVENT_CUSTOMED_8, // <"自定义事件 8">
  953. UI_EVENT_CUSTOMED_9, // <"自定义事件 9">
  954. UI_EVENT_LOW_LATENCY_MODE, // <"低延迟模式">
  955. UI_EVENT_NORMAL_LATENCY_MODE, // <"正常延迟模式">
  956. UI_EVENT_PRIVMA_TALK_START, // <"开始APP语音上传">
  957. UI_EVENT_DC5V_CMD_COMPLETE, // <"DC5V 通讯命令完成">
  958. UI_EVENT_NMA_COLLECTION, // <"云音乐一键收藏">
  959. UI_EVENT_BT_MUSIC_DAE_SWITCH, // <"蓝牙音乐音效切换">
  960. UI_EVENT_DAE_DEFAULT, // <"默认音效">
  961. UI_EVENT_DAE_CUSTOM1, // <"自定义音效1">
  962. UI_EVENT_DAE_CUSTOM2, // <"自定义音效2">
  963. UI_EVENT_DAE_CUSTOM3, // <"自定义音效3">
  964. UI_EVENT_DAE_CUSTOM4, // <"自定义音效4">
  965. UI_EVENT_DAE_CUSTOM5, // <"自定义音效5">
  966. UI_EVENT_DAE_CUSTOM6, // <"自定义音效6">
  967. UI_EVENT_DAE_CUSTOM7, // <"自定义音效7">
  968. UI_EVENT_DAE_CUSTOM8, // <"自定义音效8">
  969. UI_EVENT_DAE_CUSTOM9, // <"自定义音效9">
  970. UI_EVENT_TRANSPARENCY_MODE_ENTER, // <"打开通透模式">
  971. UI_EVENT_TRANSPARENCY_MODE_EXIT, // <"关闭通透模式">
  972. UI_EVENT_RING_HANDSET, // <"寻找设备">
  973. };
  974. enum CFG_TYPE_EVENT_NOTIFY_OPTIONS
  975. {
  976. EVENT_NOTIFY_OPTIONS_NONE = 0, // <"无">
  977. EVENT_NOTIFY_TWS_UNPAIRED = (1 << 0), // <"未组对">
  978. EVENT_NOTIFY_TWS_PAIRED = (1 << 1), // <"已组对">
  979. EVENT_NOTIFY_CHANNEL_L = (1 << 2), // <"L 左设备">
  980. EVENT_NOTIFY_CHANNEL_R = (1 << 3), // <"R 右设备">
  981. EVENT_NOTIFY_VOICE_FIRST = (1 << 4), // <"先播报语音">
  982. EVENT_NOTIFY_NO_WAIT_LED = (1 << 5), // <"不等待 LED">
  983. };
  984. enum CFG_TYPE_BAT_CHARGE_MODE
  985. {
  986. BAT_BACK_CHARGE_MODE, // <"后台充电模式">
  987. BAT_FRONT_CHARGE_MODE, // <"前台充电模式">
  988. };
  989. #if !(CFG_IC_TYPE & IC_TYPE_LARK)
  990. enum CFG_TYPE_CHARGE_CURRENT
  991. {
  992. CHARGE_CURRENT_10_MA = 0x00, // <"10 mA">
  993. CHARGE_CURRENT_20_MA = 0x01, // <"20 mA">
  994. CHARGE_CURRENT_30_MA = 0x02, // <"30 mA">
  995. CHARGE_CURRENT_40_MA = 0x03, // <"40 mA">
  996. CHARGE_CURRENT_50_MA = 0x04, // <"50 mA">
  997. CHARGE_CURRENT_60_MA = 0x05, // <"60 mA">
  998. CHARGE_CURRENT_70_MA = 0x06, // <"70 mA">
  999. CHARGE_CURRENT_80_MA = 0x07, // <"80 mA">
  1000. CHARGE_CURRENT_90_MA = 0x08, // <"90 mA">
  1001. CHARGE_CURRENT_100_MA = 0x09, // <"100 mA">
  1002. CHARGE_CURRENT_150_MA = 0x0A, // <"150 mA">
  1003. CHARGE_CURRENT_200_MA = 0x0B, // <"200 mA">
  1004. CHARGE_CURRENT_250_MA = 0x0C, // <"250 mA">
  1005. CHARGE_CURRENT_300_MA = 0x0D, // <"300 mA">
  1006. CHARGE_CURRENT_350_MA = 0x0E, // <"350 mA">
  1007. CHARGE_CURRENT_400_MA = 0x0F, // <"400 mA">
  1008. };
  1009. #else
  1010. enum CFG_TYPE_CHARGE_CURRENT
  1011. {
  1012. CHARGE_CURRENT_10_MA = 0x00, // <"10 mA">
  1013. CHARGE_CURRENT_20_MA = 0x01, // <"20 mA">
  1014. CHARGE_CURRENT_30_MA = 0x02, // <"30 mA">
  1015. CHARGE_CURRENT_40_MA = 0x03, // <"40 mA">
  1016. CHARGE_CURRENT_50_MA = 0x04, // <"50 mA">
  1017. CHARGE_CURRENT_60_MA = 0x05, // <"60 mA">
  1018. CHARGE_CURRENT_70_MA = 0x06, // <"70 mA">
  1019. CHARGE_CURRENT_80_MA = 0x07, // <"80 mA">
  1020. CHARGE_CURRENT_90_MA = 0x08, // <"90 mA">
  1021. CHARGE_CURRENT_100_MA = 0x09, // <"100 mA">
  1022. CHARGE_CURRENT_120_MA = 0x0A, // <"120 mA">
  1023. CHARGE_CURRENT_140_MA = 0x0B, // <"140 mA">
  1024. CHARGE_CURRENT_160_MA = 0x0C, // <"160 mA">
  1025. CHARGE_CURRENT_180_MA = 0x0D, // <"180 mA">
  1026. CHARGE_CURRENT_200_MA = 0x0E, // <"200 mA">
  1027. CHARGE_CURRENT_240_MA = 0x0F, // <"240 mA">
  1028. };
  1029. #endif
  1030. #if !(CFG_IC_TYPE & IC_TYPE_LARK)
  1031. enum CFG_TYPE_CHARGE_VOLTAGE
  1032. {
  1033. CHARGE_VOLTAGE_4_20_V = 0x10, // <"4.20 V">
  1034. CHARGE_VOLTAGE_4_25_V = 0x18, // <"4.25 V">
  1035. CHARGE_VOLTAGE_4_30_V = 0x20, // <"4.30 V (新型电池)">
  1036. CHARGE_VOLTAGE_4_35_V = 0x28, // <"4.35 V (新型电池)">
  1037. };
  1038. #else
  1039. enum CFG_TYPE_CHARGE_VOLTAGE
  1040. {
  1041. CHARGE_VOLTAGE_4_20_V = 0x5, // <"4.20 V">
  1042. CHARGE_VOLTAGE_4_25_V = 0x9, // <"4.25 V">
  1043. CHARGE_VOLTAGE_4_30_V = 0xd, // <"4.30 V (新型电池)">
  1044. CHARGE_VOLTAGE_4_35_V = 0x11, // <"4.35 V (新型电池)">
  1045. };
  1046. #endif
  1047. enum CFG_TYPE_PRECHARGE_STOP_VOLTAGE
  1048. {
  1049. PRECHARGE_STOP_3_3_V = 3360, // <"3.3 V">
  1050. };
  1051. enum CFG_TYPE_CHARGE_STOP_CURRENT
  1052. {
  1053. CHARGE_STOP_CURRENT_20_PERCENT = 0, // <"20%">
  1054. CHARGE_STOP_CURRENT_5_PERCENT = 1, // <"5%">
  1055. CHARGE_STOP_CURRENT_30_MA, // <"30 mA">
  1056. CHARGE_STOP_CURRENT_20_MA, // <"20 mA">
  1057. CHARGE_STOP_CURRENT_16_MA, // <"16 mA">
  1058. CHARGE_STOP_CURRENT_12_MA, // <"12 mA">
  1059. CHARGE_STOP_CURRENT_8_MA, // <"8 mA">
  1060. CHARGE_STOP_CURRENT_6_4_MA, // <"6.4 mA">
  1061. CHARGE_STOP_CURRENT_5_MA, // <"5 mA">
  1062. };
  1063. enum CFG_TYPE_CHARGE_STOP_MODE
  1064. {
  1065. CHARGE_STOP_BY_VOLTAGE = 0, // <"阈值电压">
  1066. CHARGE_STOP_BY_CURRENT = 1, // <"阈值电流">
  1067. CHARGE_STOP_BY_VOLTAGE_AND_CURRENT = 2, // <"阈值电压和电流">
  1068. };
  1069. enum CFG_TYPE_BATTERY_LOW_VOLTAGE
  1070. {
  1071. BATTERY_LOW_3_0_V = 3000, // <"3.0 V">
  1072. BATTERY_LOW_3_1_V = 3100, // <"3.1 V">
  1073. BATTERY_LOW_3_2_V = 3200, // <"3.2 V">
  1074. BATTERY_LOW_3_3_V = 3300, // <"3.3 V">
  1075. BATTERY_LOW_3_4_V = 3400, // <"3.4 V">
  1076. BATTERY_LOW_3_5_V = 3500, // <"3.5 V">
  1077. BATTERY_LOW_3_6_V = 3600, // <"3.6 V">
  1078. };
  1079. enum CFG_TYPE_DC5VPD_CURRENT
  1080. {
  1081. DC5VPD_CURRENT_DISABLE = 0xff, // <"禁止下拉">
  1082. DC5VPD_CURRENT_2_5_MA = 0x0, // <"2.5 mA">
  1083. DC5VPD_CURRENT_7_5_MA = 0x1, // <"7.5 mA">
  1084. DC5VPD_CURRENT_15_MA = 0x2, // <"15 mA">
  1085. DC5VPD_CURRENT_25_MA = 0x3, // <"25 mA">
  1086. };
  1087. enum CFG_TYPE_DC5VLV_LEVEL
  1088. {
  1089. DC5VLV_LEVEL_0_2_V = 0,
  1090. DC5VLV_LEVEL_0_5_V = 1,
  1091. DC5VLV_LEVEL_1_0_V = 2,
  1092. DC5VLV_LEVEL_1_5_V = 3,
  1093. DC5VLV_LEVEL_2_0_V = 4,
  1094. DC5VLV_LEVEL_2_5_V = 5,
  1095. DC5VLV_LEVEL_3_0_V = 6,
  1096. DC5VLV_LEVEL_4_5_V = 7,
  1097. };
  1098. enum CFG_TYPE_BAT_RECHARGE_THRESHOLD
  1099. {
  1100. BAT_RECHARGE_3_4_V = 0x0, // <"3.4 V">
  1101. BAT_RECHARGE_3_5_V = 0x1, // <"3.5 V">
  1102. BAT_RECHARGE_3_6_V = 0x2, // <"3.6 V">
  1103. BAT_RECHARGE_3_7_V = 0x3, // <"3.7 V">
  1104. BAT_RECHARGE_3_8_V = 0x4, // <"3.8 V">
  1105. BAT_RECHARGE_3_9_V = 0x5, // <"3.9 V">
  1106. BAT_RECHARGE_4_0_V = 0x6, // <"4.0 V">
  1107. BAT_RECHARGE_4_1_V = 0x7, // <"4.1 V">
  1108. };
  1109. enum CFG_TYPE_BT_SUPPORT_FEATURES
  1110. {
  1111. BT_SUPPORT_A2DP = (1 << 0), // <"支持 A2DP 服务">
  1112. BT_SUPPORT_A2DP_AAC = (1 << 1), // <"支持 AAC 音频格式">
  1113. BT_SUPPORT_A2DP_DTCP = (1 << 2), // <"支持 DTCP 内容保护">
  1114. BT_SUPPORT_A2DP_SCMS_T = (1 << 3), // <"支持 SCMS-T 内容保护">
  1115. BT_SUPPORT_AVRCP = (1 << 4), // <"支持 AVRCP 服务">
  1116. BT_SUPPORT_AVRCP_VOLUME_SYNC = (1 << 5), // <"支持 AVRCP 音量同步">
  1117. BT_SUPPORT_HFP = (1 << 6), // <"支持 HFP 服务">
  1118. BT_SUPPORT_HFP_VOLUME_SYNC = (1 << 7), // <"支持 HFP 音量同步">
  1119. BT_SUPPORT_HFP_BATTERY_REPORT = (1 << 8), // <"支持 HFP 电量上报">
  1120. BT_SUPPORT_HFP_3WAY_CALL = (1 << 9), // <"支持 HFP 三方通话">
  1121. BT_SUPPORT_HFP_PHONEBOOK_NUMBER = (1 << 10), // <"支持 HFP 来电号码">
  1122. BT_SUPPORT_HFP_VOICE_ASSIST = (1 << 11), // <"支持 Siri 等语音助手">
  1123. BT_SUPPORT_HFP_CODEC_NEGOTIATION = (1 << 12), // <"支持 HFP 音频格式协商">
  1124. BT_SUPPORT_ENABLE_NREC = (1 << 13), // <"启用 NREC 手机端回音取消和噪声削弱">
  1125. BT_SUPPORT_HID = (1 << 14), // <"支持 HID 服务">
  1126. BT_SUPPORT_TWS = (1 << 15), // <"支持 TWS功能">
  1127. BT_SUPPORT_ENABLE_SNIFF = (1 << 16), // <"允许 Sniff 模式">
  1128. BT_SUPPORT_DUAL_PHONE_DEV_LINK = (1 << 17), // <"支持双手机设备连接">
  1129. BT_SUPPORT_LINKKEY_MISS_REJECT = (1 << 18), // <"取消配对后回连不弹出提示框">
  1130. BT_SUPPORT_CLEAR_LINKKEY = (1 << 19), // <"清除配对列表同时清除 LINKKEY">
  1131. };
  1132. enum CFG_TYPE_BT_CALL_RING_MODE
  1133. {
  1134. BT_CALL_RING_MODE_DEFAULT = 0, // <"默认">
  1135. BT_CALL_RING_MODE_REMOTE = 1, // <"已有来电铃声时不播放提示音">
  1136. BT_CALL_RING_MODE_LOCAL = 2, // <"只播放本地提示音">
  1137. };
  1138. enum CFG_TYPE_BT_AUTO_RECONNECT
  1139. {
  1140. AUTO_RECONNECT_PHONE_BY_STARTUP = (1 << 0), // <"开机自动回连手机设备">
  1141. AUTO_RECONNECT_PHONE_BY_TIMEOUT = (1 << 1), // <"超时断开自动回连手机设备">
  1142. };
  1143. enum CFG_TYPE_BT_CTRL_TEST_MODE
  1144. {
  1145. BT_CTRL_DISABLE_TEST = 0, // <"DISABLE">
  1146. BT_CTRL_DUT_TEST = 1, // <"DUT_TEST">
  1147. BT_CTRL_LE_TEST = 2, // <"LE_TEST">
  1148. BT_CTRL_DUT_AND_LE_TEST = 3, // <"DUT_TEST & LE_TEST">
  1149. };
  1150. enum CFG_TYPE_BT_HID_KEY_TYPE
  1151. {
  1152. BT_HID_KEY_TYPE_KEYBOARD = 0x01, // <"Keyboard">
  1153. BT_HID_KEY_TYPE_CUSTOMER_CONTROL = 0x03, // <"Customer Control">
  1154. };
  1155. enum CFG_TYPE_TWS_PAIR_KEY_MODE
  1156. {
  1157. TWS_PAIR_KEY_MODE_ONE = 1, // <"单方按键组对模式">
  1158. TWS_PAIR_KEY_MODE_TWO = 2, // <"双方按键组对模式">
  1159. };
  1160. enum CFG_TYPE_TWS_MATCH_MODE
  1161. {
  1162. TWS_MATCH_NAME = 0, // <"名称匹配">
  1163. TWS_MATCH_ID = 1, // <"ID 匹配">
  1164. };
  1165. enum CFG_TYPE_TWS_SYNC_MODE
  1166. {
  1167. TWS_SYNC_KEY_TONE = (1 << 0), // <"同步按键音">
  1168. TWS_SYNC_POWER_OFF = (1 << 1), // <"同步关机">
  1169. };
  1170. enum CFG_TYPE_CAP_TEMP
  1171. {
  1172. CAP_TEMP_NA = 0x7F, // <"NA">
  1173. CAP_TEMP_N_40 = 0x100 - 40, // <"-40">
  1174. CAP_TEMP_N_35 = 0x100 - 35, // <"-35">
  1175. CAP_TEMP_N_30 = 0x100 - 30, // <"-30">
  1176. CAP_TEMP_N_25 = 0x100 - 25, // <"-25">
  1177. CAP_TEMP_N_20 = 0x100 - 20, // <"-20">
  1178. CAP_TEMP_N_15 = 0x100 - 15, // <"-15">
  1179. CAP_TEMP_N_10 = 0x100 - 10, // <"-10">
  1180. CAP_TEMP_N_5 = 0x100 - 5, // <"-5">
  1181. CAP_TEMP_0 = 0, // <"0">
  1182. CAP_TEMP_P_5 = 5, // <"+5">
  1183. CAP_TEMP_P_10 = 10, // <"+10">
  1184. CAP_TEMP_P_15 = 15, // <"+15">
  1185. CAP_TEMP_P_20 = 20, // <"+20">
  1186. CAP_TEMP_P_25 = 25, // <"+25">
  1187. CAP_TEMP_P_30 = 30, // <"+30">
  1188. CAP_TEMP_P_35 = 35, // <"+35">
  1189. CAP_TEMP_P_40 = 40, // <"+40">
  1190. CAP_TEMP_P_45 = 45, // <"+45">
  1191. CAP_TEMP_P_50 = 50, // <"+50">
  1192. CAP_TEMP_P_55 = 55, // <"+55">
  1193. CAP_TEMP_P_60 = 60, // <"+60">
  1194. CAP_TEMP_P_65 = 65, // <"+65">
  1195. CAP_TEMP_P_70 = 70, // <"+70">
  1196. CAP_TEMP_P_75 = 75, // <"+75">
  1197. CAP_TEMP_P_80 = 80, // <"+80">
  1198. };
  1199. enum CFG_TYPE_EXTERN_PA_FUNC
  1200. {
  1201. EXTERN_PA_NONE = 0, // <"PA_NONE">
  1202. EXTERN_PA_ENABLE = 1, // <"PA_ENABLE">
  1203. EXTERN_PA_MUTE = 2, // <"PA_MUTE">
  1204. };
  1205. enum CFG_TYPE_TAP_CTRL_SELECT
  1206. {
  1207. TAP_CTRL_NONE = 0, // <"NONE">
  1208. TAP_CTRL_DA230 = 1, // <"DA230">
  1209. };
  1210. enum CFG_TYPE_BT_SCAN_MODE
  1211. {
  1212. CFG_DEFAULT_INQUIRY_PAGE_SCAN_MODE,
  1213. CFG_FAST_PAGE_SCAN_MODE,
  1214. CFG_FAST_PAGE_SCAN_MODE_EX,
  1215. CFG_NORMAL_PAGE_SCAN_MODE,
  1216. CFG_NORMAL_PAGE_SCAN_MODE_S3,
  1217. CFG_NORMAL_PAGE_SCAN_MODE_EX,
  1218. CFG_FAST_INQUIRY_PAGE_SCAN_MODE
  1219. };
  1220. enum CFG_TYPE_BLE_ADV_TYPE
  1221. {
  1222. CFG_ADV_DISABLE = 0xff,
  1223. CFG_ADV_IND = 0x00,
  1224. CFG_ADV_DIRECT_IND_HIGH_DUTY = 0x01,
  1225. CFG_ADV_SCAN_IND = 0x02,
  1226. CFG_ADV_NONCONN_IND = 0x03,
  1227. CFG_ADV_DIRECT_IND_LOW_DUTY = 0x04,
  1228. };
  1229. enum CFG_TYPE_BLE_ADDR_TYPE
  1230. {
  1231. CFG_BLE_PUBLIC_DEVICE_ADDRESS = 0, // <"Public Device Address">
  1232. CFG_BLE_STATIC_DEVICE_ADDRESS = 1, // <"Static Device Address">
  1233. CFG_BLE_NON_RESOLVABLE_PRIVATE_ADDRESS = 2, // <"Non-resolvable Private Address">
  1234. };
  1235. enum CFG_TYPE_AAP_KEY_MAP
  1236. {
  1237. AAP_KEY_MAP_NONE = 0x0, // <"关闭">
  1238. AAP_KEY_MAP_VOICE_ASSIST = 0x1, // <"语音助手">
  1239. AAP_KEY_MAP_PLAY_PAUSE = 0x2, // <"播放/暂停">
  1240. AAP_KEY_MAP_NEXT_MUSIC = 0x3, // <"下一曲">
  1241. AAP_KEY_MAP_PREV_MUSIC = 0x4, // <"上一曲">
  1242. AAP_KEY_MAP_NOISE_CTRL = 0x5, // <"噪声控制">
  1243. };
  1244. enum CFG_TYPE_DC5V_UART_SWITCH_VOLT
  1245. {
  1246. DC5V_UART_SWITCH_VOLT_NA = 0x0, // <"NA">
  1247. DC5V_UART_SWITCH_VOLT_2_0_V = 0x4, // <"2.0 V">
  1248. DC5V_UART_SWITCH_VOLT_2_5_V = 0x5, // <"2.5 V">
  1249. DC5V_UART_SWITCH_VOLT_3_0_V = 0x6, // <"3.0 V">
  1250. DC5V_UART_SWITCH_VOLT_4_5_V = 0x7, // <"4.5 V">
  1251. };
  1252. enum CFG_TYPE_UART_PARITY_BIT
  1253. {
  1254. UART_PARITY_BIT_NONE = 0x0, // <"无">
  1255. UART_PARITY_BIT_ODD = 0x4, // <"奇">
  1256. UART_PARITY_BIT_EVEN = 0x6, // <"偶">
  1257. UART_PARITY_BIT_0 = 0x7, // <"0">
  1258. UART_PARITY_BIT_1 = 0x5, // <"1">
  1259. };
  1260. enum CFG_TYPE_ANALOG_GAIN_MAP
  1261. {
  1262. ANALOG_GAIN_RUDUCE_NA = 0x0, // <"NA">
  1263. ANALOG_GAIN_RUDUCE_0DB = 0x4, // <"0 db">
  1264. ANALOG_GAIN_RUDUCE_3DB = 0x3, // <"-3 db">
  1265. ANALOG_GAIN_RUDUCE_6DB = 0x2, // <"-6 db">
  1266. ANALOG_GAIN_RUDUCE_12DB = 0x1, // <"-12 db">
  1267. };
  1268. enum CFG_VOICE_SAMPLE_MODE
  1269. {
  1270. VOICE_SAMPLE_MODE_FOLLOW_TTS = 0, // <"提示音采样率跟随TTS">
  1271. VOICE_SAMPLE_MODE_BEST_QUALITY, // <"提示音采样率最好品质">
  1272. };
  1273. enum CFG_MIC_SAMPLE_MODE
  1274. {
  1275. MIC_SAMPLE_MODE_FIX = 0, // <"采样率固定16KHz">
  1276. MIC_SAMPLE_MODE_FOLLOW, // <"采样率跟随播放">
  1277. };
  1278. enum CFG_TYPE_MIC_CHANNEL_SELECT
  1279. {
  1280. MIC_CHANNEL_LEFT = 0, // <"左声道MIC">
  1281. MIC_CHANNEL_RIHGT, // <"右声道MIC">
  1282. };
  1283. /*-----------------------------------------------------------------------------
  1284. * 配置结构类型定义
  1285. * 类型必须以 CFG_XXX 命名
  1286. *---------------------------------------------------------------------------*/
  1287. typedef struct // <"LRADC 按键">
  1288. {
  1289. cfg_uint8 Key_Value; // <"键值", CFG_TYPE_KEY_VALUE>
  1290. cfg_uint16 ADC_Min; // <"ADC 阈值下限", 0x00 ~ 0xFFFF, hex>
  1291. cfg_uint16 ADC_Max; // <"ADC 阈值上限", 0x00 ~ 0xFFFF, hex>
  1292. } CFG_Type_LRADC_Key;
  1293. typedef struct // <"GPIO 按键">
  1294. {
  1295. cfg_uint8 Key_Value; // <"键值", CFG_TYPE_KEY_VALUE>
  1296. cfg_uint8 GPIO_Pin; // <"GPIO 管脚", CFG_TYPE_GPIO_PIN>
  1297. cfg_uint8 Pull_Up_Down; // <"上下拉", CFG_TYPE_GPIO_PULL>
  1298. cfg_uint8 Active_Level; // <"有效电平", CFG_TYPE_GPIO_LEVEL>
  1299. cfg_uint16 Debounce_Time_Ms; // <"去抖时间 (毫秒)", 0 ~ 500>
  1300. } CFG_Type_GPIO_Key;
  1301. typedef struct // <"按键功能映射">
  1302. {
  1303. cfg_uint8 Key_Func; // <"按键功能", CFG_TYPE_KEY_FUNC>
  1304. cfg_uint8 Key_Value; // <"键值", CFG_TYPE_KEY_VALUE>
  1305. cfg_uint32 Key_Event; // <"按键消息", CFG_TYPE_KEY_EVENT>
  1306. cfg_uint8 LR_Device; // <"左右设备", CFG_TYPE_KEY_DEVICE_TYPE, multi_select>
  1307. } CFG_Type_Key_Func_Map;
  1308. typedef struct // <"组合按键">
  1309. {
  1310. cfg_uint8 Key_Func; // <"按键功能", CFG_TYPE_KEY_FUNC>
  1311. cfg_uint8 Key_Value_1; // <"键值 1", CFG_TYPE_KEY_VALUE>
  1312. cfg_uint8 Key_Value_2; // <"键值 2", CFG_TYPE_KEY_VALUE>
  1313. cfg_uint32 Key_Event; // <"按键消息", CFG_TYPE_KEY_EVENT>
  1314. cfg_uint8 LR_Device; // <"左右设备", CFG_TYPE_KEY_DEVICE_TYPE, multi_select>
  1315. } CFG_Type_Combo_Key_Map;
  1316. typedef struct // <"LED 驱动">
  1317. {
  1318. cfg_uint8 LED_No; // <"LED 编号", CFG_TYPE_LED_NO>
  1319. cfg_uint8 GPIO_Pin; // <"GPIO 管脚", CFG_TYPE_LED_GPIO_PIN>
  1320. cfg_uint8 Active_Level; // <"有效电平", CFG_TYPE_GPIO_LEVEL>
  1321. } CFG_Type_LED_Drive;
  1322. typedef struct // <"LED 显示模式">
  1323. {
  1324. cfg_uint8 Display_Model; // <"显示模式", CFG_TYPE_LED_DISPLAY_MODEL>
  1325. cfg_uint8 Display_LEDs; // <"显示 LED", CFG_TYPE_LED_NO, multi_select>
  1326. cfg_uint8 Disable_LEDs; // <"关闭 LED", CFG_TYPE_LED_NO, multi_select>
  1327. cfg_uint8 Use_PWM_Control; // <"使用 PWM 控制模式", CFG_TYPE_BOOL, /* 使用 PWM GPIO 才有效 */>
  1328. cfg_uint16 Delay_Time_Ms; // <"延迟亮灯时间 (毫秒)", 0 ~ 10000>
  1329. cfg_uint16 ON_Time_Ms; // <"亮灯时间 (毫秒)", 0 ~ 60000>
  1330. cfg_uint16 OFF_Time_Ms; // <"灭灯时间 (毫秒)", 0 ~ 60000>
  1331. cfg_uint8 Flash_Count; // <"亮灭闪烁次数", 0 ~ 200, /* 设置为 0 时无限闪烁 */>
  1332. cfg_uint8 Loop_Count; // <"闪烁循环次数", 0 ~ 200, /* 设置为 0 时无限循环 */>
  1333. cfg_uint16 Loop_Wait_Time_Ms; // <"循环等待时间 (毫秒)", 0 ~ 60000>
  1334. cfg_uint16 Breath_Time_Ms; // <"呼吸模式时间 (毫秒)", 0 ~ 2000, /* 使用 PWM 控制模式才有效 */>
  1335. } CFG_Type_LED_Display_Model;
  1336. typedef struct // <"DMIC 管脚配置">
  1337. {
  1338. cfg_uint16 DMIC01_CLK; // <"DMIC01 CLK 管脚", CFG_TYPE_DMIC01_CLK_PIN>
  1339. cfg_uint16 DMIC01_DAT; // <"DMIC01 DAT 管脚", CFG_TYPE_DMIC01_DAT_PIN>
  1340. cfg_uint16 DMIC23_CLK; // <"DMIC23 CLK 管脚", CFG_TYPE_DMIC23_CLK_PIN>
  1341. cfg_uint16 DMIC23_DAT; // <"DMIC23 DAT 管脚", CFG_TYPE_DMIC23_DAT_PIN>
  1342. } CFG_Type_DMIC_Select_GPIO;
  1343. typedef struct // <"I2S 管脚配置">
  1344. {
  1345. cfg_uint16 I2S_MCLK; // <"I2S MCLK 管脚", CFG_TYPE_GPIO_PIN>
  1346. cfg_uint16 I2S_LRCLK; // <"I2S LRCLK 管脚", CFG_TYPE_GPIO_PIN>
  1347. cfg_uint16 I2S_BCLK; // <"I2S BCLK 管脚", CFG_TYPE_GPIO_PIN>
  1348. cfg_uint16 I2S_DOUT; // <"I2S DOUT 管脚", CFG_TYPE_GPIO_PIN>
  1349. } CFG_Type_I2S_Select_GPIO;
  1350. typedef struct // ADC 通道INPUT管脚配置
  1351. {
  1352. cfg_uint8 ADC_Input_Ch0; // ADC 通道0 INPUT设置
  1353. cfg_uint8 ADC_Input_Ch1; // ADC 通道1 INPUT设置
  1354. cfg_uint8 ADC_Input_Ch2; // ADC 通道2 INPUT设置
  1355. cfg_uint8 ADC_Input_Ch3; // ADC 通道3 INPUT设置
  1356. } CFG_Type_ADC_Select_INPUT;
  1357. typedef struct // <"GPIO 选择声道">
  1358. {
  1359. cfg_uint8 GPIO_Pin; // <"GPIO 管脚", CFG_TYPE_GPIO_PIN>
  1360. cfg_uint8 Pull_Up_Down; // <"上下拉", CFG_TYPE_GPIO_PULL>
  1361. cfg_uint8 Active_Level; // <"有效电平", CFG_TYPE_GPIO_LEVEL>
  1362. } CFG_Type_Channel_Select_GPIO;
  1363. typedef struct // <"LRADC 选择声道">
  1364. {
  1365. cfg_uint32 LRADC_Ctrl; // <"LRADC 控制器", CFG_TYPE_LRADC_CTRL>
  1366. cfg_uint8 LRADC_Pull_Up; // <"LRADC 上拉电阻", CFG_TYPE_LRADC_PULL_UP>
  1367. cfg_uint8 ADC_Min; // <"ADC 阈值下限", 0x00 ~ 0x7F, hex>
  1368. cfg_uint8 ADC_Max; // <"ADC 阈值上限", 0x00 ~ 0x7F, hex>
  1369. } CFG_Type_Channel_Select_LRADC;
  1370. typedef struct // <"GPIO 检测 Linein">
  1371. {
  1372. cfg_uint8 GPIO_Pin; // <"GPIO 管脚", CFG_TYPE_GPIO_PIN>
  1373. cfg_uint8 Pull_Up_Down; // <"上下拉", CFG_TYPE_GPIO_PULL>
  1374. cfg_uint8 Active_Level; // <"有效电平", CFG_TYPE_GPIO_LEVEL>
  1375. } CFG_Type_Linein_Detect_GPIO;
  1376. typedef struct // <"LRADC 检测 Linein">
  1377. {
  1378. cfg_uint32 LRADC_Ctrl; // <"LRADC 控制器", CFG_TYPE_LRADC_CTRL>
  1379. cfg_uint8 LRADC_Pull_Up; // <"LRADC 上拉电阻", CFG_TYPE_LRADC_PULL_UP>
  1380. cfg_uint8 ADC_Min; // <"ADC 阈值下限", 0x00 ~ 0x7F, hex>
  1381. cfg_uint8 ADC_Max; // <"ADC 阈值上限", 0x00 ~ 0x7F, hex>
  1382. } CFG_Type_Linein_Detect_LRADC;
  1383. typedef struct // <"提示音编号名称">
  1384. {
  1385. cfg_uint8 Tone_ID; // <"编号", CFG_TYPE_TONE_ID>
  1386. cfg_uint8 Tone_Name[CFG_MAX_TONE_NAME_LEN]; // <"文件名", string, replaceable=.act>
  1387. } CFG_Type_Tone_ID_Name;
  1388. typedef struct // <"语音编号名称">
  1389. {
  1390. cfg_uint8 Voice_ID; // <"编号", CFG_TYPE_VOICE_ID>
  1391. cfg_uint8 Voice_Name[CFG_MAX_VOICE_NAME_LEN]; // <"文件名", string, replaceable=.act>
  1392. } CFG_Type_Voice_ID_Name;
  1393. typedef struct // <"数字语音编号名称">
  1394. {
  1395. cfg_uint8 Voice_ID; // <"编号", CFG_TYPE_NUMERIC_VOICE_ID>
  1396. cfg_uint8 Voice_Name[CFG_MAX_VOICE_NAME_LEN]; // <"文件名", string, replaceable=.act>
  1397. } CFG_Type_Numeric_Voice_ID_Name;
  1398. typedef struct // <"事件通知">
  1399. {
  1400. cfg_uint8 Event_Type; // <"事件类型", CFG_TYPE_SYS_EVENT>
  1401. cfg_uint8 LED_Display; // <"LED 显示模式", CFG_TYPE_LED_DISPLAY_MODEL>
  1402. cfg_uint8 LED_Override; // <"LED 显示覆盖", CFG_TYPE_LED_OVERRIDE_MODE, /* 多状态下靠前的显示优先 */>
  1403. cfg_uint8 Tone_Play; // <"提示音", CFG_TYPE_TONE_ID>
  1404. cfg_uint8 Voice_Play; // <"播报语音", CFG_TYPE_VOICE_ID>
  1405. cfg_uint8 Options; // <"选项", CFG_TYPE_EVENT_NOTIFY_OPTIONS, multi_select>
  1406. } CFG_Type_Event_Notify;
  1407. typedef struct // <"温度补偿">
  1408. {
  1409. cfg_uint8 Cap_Temp; // <"温度 ℃", CFG_TYPE_CAP_TEMP>
  1410. cfg_int8 Cap_Comp; // <"补偿 pF", -10.0 ~ 10.0, float_x10>
  1411. } CFG_Type_Cap_Temp_Comp;
  1412. typedef struct // <"MIC 增益">
  1413. {
  1414. cfg_uint16 ADC0_Gain; // <"ADC0 增益", CFG_TYPE_MIC_GAIN>
  1415. cfg_uint16 ADC1_Gain; // <"ADC1 增益", CFG_TYPE_MIC_GAIN>
  1416. cfg_uint16 ADC2_Gain; // <"ADC2 增益", CFG_TYPE_MIC_GAIN>
  1417. cfg_uint16 ADC3_Gain; // <"ADC3 增益", CFG_TYPE_MIC_GAIN>
  1418. } CFG_Type_MIC_Gain;
  1419. typedef struct // <"外部 PA 控制">
  1420. {
  1421. cfg_uint8 PA_Function; // <"外部 PA 功能", CFG_TYPE_EXTERN_PA_FUNC>
  1422. cfg_uint8 GPIO_Pin; // <"GPIO 管脚", CFG_TYPE_GPIO_PIN>
  1423. cfg_uint8 Pull_Up_Down; // <"上下拉", CFG_TYPE_GPIO_PULL>
  1424. cfg_uint8 Active_Level; // <"有效电平", CFG_TYPE_GPIO_LEVEL>
  1425. } CFG_Type_Extern_PA_Control;
  1426. typedef struct // <"敲击按键支持">
  1427. {
  1428. cfg_uint8 Tap_Ctrl_Select; // <"敲击支持选择", CFG_TYPE_TAP_CTRL_SELECT>
  1429. cfg_uint8 SDA_Pin; // <"SDA 管脚", CFG_TYPE_GPIO_PIN>
  1430. cfg_uint8 SCL_Pin; // <"SCL 管脚", CFG_TYPE_GPIO_PIN>
  1431. cfg_uint8 I2C_Pull_Up; // <"I2C 上拉", CFG_TYPE_GPIO_PULL, /* 可选择上拉 10K */>
  1432. cfg_uint8 I2C_Device_Address; // <"I2C 设备地址", hex>
  1433. cfg_uint32 I2C_Bitrate; // <"I2C 比特率", 20000 ~ 250000>
  1434. cfg_uint8 INT1_Pin; // <"INT1 管脚", CFG_TYPE_GPIO_PIN>
  1435. cfg_uint8 INT1_Pull_Up_Down; // <"INT1 上下拉", CFG_TYPE_GPIO_PULL>
  1436. cfg_uint8 INT1_Active_Level; // <"INT1 有效电平", CFG_TYPE_GPIO_LEVEL>
  1437. cfg_uint8 First_Tap_Sensitivity; // <"开始敲击灵敏度", 0 ~ 31, /* 配置为 13 左右, 值越小越灵敏 */>
  1438. cfg_uint8 Continue_Tap_Sensitivity; // <"连续敲击灵敏度", 0 ~ 31, /* 配置为 6 左右 */>
  1439. cfg_uint8 Enable_Single_Tap; // <"允许单击操作", CFG_TYPE_BOOL>
  1440. cfg_uint8 Tap_Key_Tone; // <"敲击按键音", CFG_TYPE_TONE_ID>
  1441. cfg_uint8 Support_INT_Wake_Up; // <"支持敲击唤醒", CFG_TYPE_BOOL, /* INT1 管脚为 GPIO_0 才能支持唤醒 */>
  1442. } CFG_Type_Tap_Key_Control;
  1443. typedef struct // <"SCAN 参数设置">
  1444. {
  1445. cfg_uint8 Scan_Mode; // <"模式", CFG_TYPE_BT_SCAN_MODE, readonly>
  1446. cfg_uint16 Inquiry_Scan_Window; // <"InquiryScan 窗口">
  1447. cfg_uint16 Inquiry_Scan_Interval; // <"InquiryScan 间隔">
  1448. cfg_uint8 Inquiry_Scan_Type; // <"InquiryScan 类型", 0 ~ 1>
  1449. cfg_uint16 Page_Scan_Window; // <"PageScan 窗口">
  1450. cfg_uint16 Page_Scan_Interval; // <"PageScan 间隔">
  1451. cfg_uint8 Page_Scan_Type; // <"PageScan 类型", 0 ~ 1>
  1452. } CFG_Type_BT_Scan_Params;
  1453. typedef struct // <"自定义按键序列">
  1454. {
  1455. cfg_uint16 Key_Sequence; // <"按键序列", CFG_TYPE_CUSTOMED_KEY_SEQUENCE>
  1456. cfg_uint32 Key_Event_1; // <"消息 1", CFG_TYPE_KEY_EVENT>
  1457. cfg_uint32 Key_Event_2; // <"消息 2", CFG_TYPE_KEY_EVENT>
  1458. } CFG_Type_Customed_Key_Sequence;
  1459. typedef struct // <"更多充电设置">
  1460. {
  1461. cfg_uint8 Charger_Box_Standby_Current; // <"充电盒待机电流 (mA)", 0 ~ 10>
  1462. } CFG_Type_Battery_Charge_Settings_Ex;
  1463. typedef struct // <"DC5V_COM 通讯设置">
  1464. {
  1465. cfg_uint8 Enable_DC5V_UART_Comm_Mode; // <"启用 DC5V_COM 通讯模式", CFG_TYPE_BOOL>
  1466. cfg_uint8 DC5V_UART_Switch_Voltage; // <"DC5V_COM 切换电压", CFG_TYPE_DC5V_UART_SWITCH_VOLT>
  1467. cfg_uint8 Redirect_Console_Print; // <"重定向控制台打印", CFG_TYPE_BOOL>
  1468. cfg_uint8 DC5V_UART_Parity_Select; // <"DC5V_COM 奇偶校验位", CFG_TYPE_UART_PARITY_BIT>
  1469. cfg_uint32 DC5V_UART_Comm_Baudrate; // <"DC5V_COM 通讯波特率 (bps)">
  1470. } CFG_Type_DC5V_UART_Comm_Settings;
  1471. typedef struct // <"DC5V_IO 通讯设置">
  1472. {
  1473. cfg_uint16 DC5V_IO_Threshold_MV; // <"DC5V_IO 阈值电压 (毫伏)", /* 0 表示禁用该功能 */>
  1474. } CFG_Type_DC5V_IO_Comm_Settings;
  1475. typedef struct // <"模拟增益设置">
  1476. {
  1477. cfg_uint8 ANALOG_Gain_Poweron; // <"开机默认模拟增益", CFG_TYPE_ANALOG_GAIN_MAP, /* NA时为-3DB */>
  1478. cfg_uint8 ANALOG_Gain_Voice; // <"语音场景模拟增益", CFG_TYPE_ANALOG_GAIN_MAP, /* NA时跟随开机模拟增益 */>
  1479. cfg_uint8 ANALOG_Gain_BTSpeech; // <"蓝牙通话场景模拟增益", CFG_TYPE_ANALOG_GAIN_MAP, /* NA时跟随开机模拟增益 */>
  1480. cfg_uint8 ANALOG_GAIN_BTMusic; // <"蓝牙播歌场景模拟增益", CFG_TYPE_ANALOG_GAIN_MAP, /* NA时跟随开机模拟增益 */>
  1481. } CFG_Type_ANALOG_GAIN_Settings;
  1482. typedef struct // <"自动退出控制器测试模式">
  1483. {
  1484. cfg_uint16 Quit_Timer_Sec; // <"定时退出 (秒)", /* 0 表示不自动退出 */>
  1485. cfg_uint8 Power_Off_After_Quit; // <"退出后关机", CFG_TYPE_BOOL>
  1486. } CFG_Type_Auto_Quit_BT_Ctrl_Test;
  1487. typedef struct // <"NTC 温度调节充电电流">
  1488. {
  1489. cfg_uint8 Enable_NTC; // <"启用 NTC 温度调节充电电流", CFG_TYPE_BOOL>
  1490. cfg_uint32 LRADC_Ctrl; // <"LRADC 控制器", CFG_TYPE_NTC_LRADC_CTRL>
  1491. cfg_uint8 LRADC_Pull_Up; // <"LRADC 上拉电阻", CFG_TYPE_LRADC_PULL_UP, /* LRADC_CTRL_1 默认使用内部上拉, 其它只能外部上拉 */>
  1492. cfg_uint8 LRADC_Value_Test; // <"LRADC 采样值测试", CFG_TYPE_BOOL, /* 通过串口打印 LRADC 采样值 */>
  1493. } CFG_Type_NTC_Settings;
  1494. typedef struct // <"NTC 温度范围">
  1495. {
  1496. cfg_uint16 ADC_Min; // <"ADC 阈值下限", 0 ~ 1023>
  1497. cfg_uint16 ADC_Max; // <"ADC 阈值上限", 0 ~ 1023>
  1498. cfg_uint8 Adjust_Current_Percent; // <"调节充电电流 (百分比)", 0 ~ 100>
  1499. } CFG_Type_NTC_Range;