config.txt.c 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970
  1. /*-----------------------------------------------------------------------------
  2. * 配置数据类定义
  3. * 类型必须以 CFG_XXX 命名
  4. * 类成员必须赋值
  5. *---------------------------------------------------------------------------*/
  6. class CFG_User_Version // <"用户版本", CFG_CATEGORY_SYSTEM>
  7. {
  8. cfg_uint8 Version[CFG_MAX_USER_VERSION_LEN] = "ACTIONS_LARK"; // <"版本信息", string>
  9. };
  10. class CFG_Platform_Case // <"平台方案", CFG_CATEGORY_SYSTEM, readonly>
  11. {
  12. cfg_uint32 IC_Type = CFG_IC_TYPE; // <"IC 类型", hex>
  13. cfg_uint8 Board_Type = BOARD_TYPE; // <"板型">
  14. cfg_uint8 Case_Name[CFG_MAX_CASE_NAME_LEN] = "S6_01010101"; // <"方案名称", string>
  15. cfg_uint8 Major_Version = 1; // <"主版本号">
  16. cfg_uint8 Minor_Version = 0; // <"次版本号">
  17. };
  18. class CFG_Console_UART // <"控制台串口", CFG_CATEGORY_SYSTEM>
  19. {
  20. cfg_uint16 TX_Pin = UART_TX_GPIO_10; // <"输出管脚", CFG_TYPE_UART_TX_PIN>
  21. cfg_uint16 RX_Pin = UART_RX_GPIO_11; // <"输入管脚", CFG_TYPE_UART_RX_PIN>
  22. cfg_uint32 Baudrate = 2000000; // <"波特率 (bps)">
  23. cfg_uint8 Print_Time_Stamp = YES; // <"打印时间戳", CFG_TYPE_BOOL>
  24. };
  25. class CFG_System_Settings // <"系统设置", CFG_CATEGORY_SYSTEM>
  26. {
  27. cfg_uint16 Support_Features =
  28. (
  29. // SYS_ENABLE_SOFT_WATCHDOG |
  30. // SYS_ENABLE_DC5V_IN_RESET |
  31. SYS_ENABLE_DC5VPD_WHEN_DETECT_OUT |
  32. // SYS_FRONT_CHARGE_DC5V_OUT_REBOOT |
  33. 0
  34. ); // <"系统支持特性", CFG_TYPE_SYS_SUPPORT_FEATURES, multi_select>
  35. cfg_uint8 Auto_Power_Off_Mode = AUTO_POWOFF_MODE_UNCONNECTED; // <"自动关机模式", CFG_TYPE_AUTO_POWOFF_MODE>
  36. cfg_uint16 Auto_Power_Off_Time_Sec = 120; // <"自动关机时间 (秒)", 0 ~ 900, /* 设置为 0 时禁止自动关机 */>
  37. cfg_uint16 Auto_Standby_Time_Sec = 30; // <"自动待机时间 (秒)", 0 ~ 900, /* 设置为 0 时禁止自动待机 */>
  38. cfg_uint8 Enable_Voice_Prompt_In_Calling = NO; // <"通话中允许语音播报提示", CFG_TYPE_BOOL>
  39. cfg_uint8 Default_Voice_Language = VOICE_LANGUAGE_1; // <"默认语音语言", CFG_TYPE_VOICE_LANGUAGE>
  40. cfg_uint8 Linein_Disable_Bluetooth = NO; // <"Linein 模式下禁用蓝牙功能", CFG_TYPE_BOOL, hide>
  41. };
  42. class CFG_OTA_Settings // <"OTA 设置", CFG_CATEGORY_UPGRADE>
  43. {
  44. cfg_uint8 Enable_Dongle_OTA_Erase_VRAM = NO; // <"Dongle OTA擦除用户区", CFG_TYPE_BOOL>
  45. cfg_uint8 Enable_APP_OTA_Erase_VRAM = NO; // <"发射机或APP OTA擦除用户区", CFG_TYPE_BOOL>
  46. cfg_uint8 Enable_Single_OTA_Without_TWS = NO; // <"未组队时允许单耳OTA", CFG_TYPE_BOOL>
  47. cfg_uint8 Enable_Ver_Diff = YES; // <"左右耳固件版本不同时,允许TWS OTA", CFG_TYPE_BOOL>
  48. cfg_uint8 Enable_Ver_Low = YES; // <"关闭版本控制,版本号自动加1", CFG_TYPE_BOOL>
  49. cfg_uint8 Enable_Poweroff = NO; // <"OTA完成后关机", CFG_TYPE_BOOL>
  50. cfg_uint8 Version_Number[12] = "1.0.0"; // <"固件版本号", string, /* 例如 1.6.8, 2.6.3.4 */>
  51. };
  52. class CFG_Factory_Settings // <"固件烧录设置", CFG_CATEGORY_UPGRADE>
  53. {
  54. cfg_uint8 Keep_User_VRAM_Data_When_UART_Upgrade = NO; // <"配置工具串口烧录固件时保留用户区数据", CFG_TYPE_BOOL>
  55. cfg_uint8 Keep_Factory_VRAM_Data_When_ATT_Upgrade = NO; // <"ATT 工具烧录固件时保留工厂区数据", CFG_TYPE_BOOL>
  56. };
  57. class CFG_ONOFF_Key // <"ONOFF 按键", CFG_CATEGORY_KEY>
  58. {
  59. cfg_uint8 Use_Inner_ONOFF_Key = YES; // <"使用内部软 ONOFF 按键", CFG_TYPE_BOOL>
  60. cfg_uint8 Continue_Key_Function_After_Wake_Up = YES; // <"按键唤醒后允许继续响应按键功能", CFG_TYPE_BOOL, /* (内部软 ONOFF 按键) */>
  61. cfg_uint8 Key_Value = VKEY_PLAY; // <"ONOFF 键值", CFG_TYPE_KEY_VALUE>
  62. cfg_uint16 Time_Press_Power_On = ONOFF_PRESS_POWER_ON_500_MS; // <"按下开机", CFG_TYPE_ONOFF_PRESS_POWER_ON, /* (内部软 ONOFF 按键) */>
  63. cfg_uint8 Time_Long_Press_Reset = ONOFF_LONG_PRESS_RESET_8S; // <"长按复位", CFG_TYPE_ONOFF_LONG_PRESS_RESET, /* (内部软 ONOFF 按键) */>
  64. cfg_uint8 Boot_Hold_Key_Func = BOOT_HOLD_KEY_FUNC_ENTER_PAIR_MODE; // <"开机长按键功能", CFG_TYPE_BOOT_HOLD_KEY_FUNC>
  65. cfg_uint16 Boot_Hold_Key_Time_Ms = 2500; // <"开机长按键时间 (毫秒)", 500 ~ 8000>
  66. cfg_uint16 Debounce_Time_Ms = 40; // <"去抖时间 (毫秒)", 0 ~ 100>
  67. cfg_uint8 Reboot_After_Boot_Hold_Key_Clear_Paired_List = NO; // <"开机长按键清除配对列表后自动重启", CFG_TYPE_BOOL>
  68. };
  69. class CFG_LRADC_Keys // <"LRADC 按键", CFG_CATEGORY_KEY>
  70. {
  71. CFG_Type_LRADC_Key Key[CFG_MAX_LRADC_KEYS] =
  72. {
  73. { .Key_Value = VKEY_VADD, .ADC_Min = 0, .ADC_Max = 0xb0 + 0x16c, },
  74. { .Key_Value = VKEY_VSUB, .ADC_Min = 0x520 - 0x16c, .ADC_Max = 0x520 + 0x16c, },
  75. { .Key_Value = VKEY_MENU, .ADC_Min = 0x970 - 0x16c, .ADC_Max = 0x970 + 0x16c, },
  76. { .Key_Value = VKEY_MODE, .ADC_Min = 0xdb0 - 0x16c, .ADC_Max = 0xdb0 + 0x16c, },
  77. }; // <"按键", CFG_Type_LRADC_Key>
  78. cfg_uint32 LRADC_Ctrl =
  79. (
  80. LRADC_CTRL_1_GPIO_76
  81. ); // <"LRADC 控制器", CFG_TYPE_LRADC_CTRL>
  82. cfg_uint8 LRADC_Pull_Up = LRADC_PULL_UP_EXTERNAL; // <"LRADC 上拉电阻", CFG_TYPE_LRADC_PULL_UP, /* LRADC_CTRL_1 默认使用内部上拉, 其它只能外部上拉 */>
  83. cfg_uint8 Use_LRADC_Key_Wake_Up = NO; // <"使用 LRADC 按键唤醒", CFG_TYPE_BOOL, /* LRADC_CTRL_1_GPIO_0 才能支持唤醒 */>
  84. cfg_uint8 LRADC_Value_Test = NO; // <"LRADC 采样值测试", CFG_TYPE_BOOL, /* 通过串口打印 LRADC 采样值 */>
  85. cfg_uint16 Debounce_Time_Ms = 40; // <"去抖时间 (毫秒)", 0 ~ 100>
  86. };
  87. class CFG_GPIO_Keys // <"GPIO 按键", CFG_CATEGORY_KEY>
  88. {
  89. CFG_Type_GPIO_Key Key[CFG_MAX_GPIO_KEYS] =
  90. {
  91. { .Key_Value = VKEY_NONE,
  92. .GPIO_Pin = GPIO_NONE,
  93. .Pull_Up_Down = CFG_GPIO_PULL_UP,
  94. .Active_Level = GPIO_LEVEL_LOW,
  95. .Debounce_Time_Ms = 40,
  96. },
  97. { .Key_Value = VKEY_NONE,
  98. .GPIO_Pin = GPIO_NONE,
  99. .Pull_Up_Down = CFG_GPIO_PULL_UP,
  100. .Active_Level = GPIO_LEVEL_LOW,
  101. .Debounce_Time_Ms = 40,
  102. },
  103. { .Key_Value = VKEY_NONE,
  104. .GPIO_Pin = GPIO_NONE,
  105. .Pull_Up_Down = CFG_GPIO_PULL_UP,
  106. .Active_Level = GPIO_LEVEL_LOW,
  107. .Debounce_Time_Ms = 40,
  108. },
  109. { .Key_Value = VKEY_NONE,
  110. .GPIO_Pin = GPIO_NONE,
  111. .Pull_Up_Down = CFG_GPIO_PULL_UP,
  112. .Active_Level = GPIO_LEVEL_LOW,
  113. .Debounce_Time_Ms = 40,
  114. },
  115. }; // <"按键", CFG_Type_GPIO_Key>
  116. };
  117. class CFG_Tap_Key // <"敲击按键", CFG_CATEGORY_KEY>
  118. {
  119. CFG_Type_Tap_Key_Control Tap_Key_Control =
  120. {
  121. .Tap_Ctrl_Select = TAP_CTRL_NONE,
  122. .SDA_Pin = GPIO_NONE,
  123. .SCL_Pin = GPIO_NONE,
  124. .I2C_Pull_Up = CFG_GPIO_PULL_UP_10K,
  125. .I2C_Device_Address = 0x4e,
  126. .I2C_Bitrate = 100000,
  127. .INT1_Pin = GPIO_NONE,
  128. .INT1_Pull_Up_Down = CFG_GPIO_PULL_UP,
  129. .INT1_Active_Level = GPIO_LEVEL_LOW,
  130. .First_Tap_Sensitivity = 13,
  131. .Continue_Tap_Sensitivity = 6,
  132. .Enable_Single_Tap = NO,
  133. .Tap_Key_Tone = TONE_KEY_SOUND,
  134. .Support_INT_Wake_Up = NO,
  135. }; // <"敲击按键支持", CFG_Type_Tap_Key_Control>
  136. };
  137. class CFG_Key_Threshold // <"按键响应门限参数", CFG_CATEGORY_KEY>
  138. {
  139. cfg_uint16 Single_Click_Valid_Ms = 500; // <"单击有效时间 (毫秒)", 200 ~ 1000, /* 单击按下到抬起在该时间内有效 */>
  140. cfg_uint16 Multi_Click_Interval_Ms = 300; // <"多击间隔时间 (毫秒)", 100 ~ 500>
  141. cfg_uint16 Repeat_Start_Delay_Ms = 500; // <"重复按键延迟时间 (毫秒)", 0 ~ 1000, /* 按键按下该时间后开始重复按键 */>
  142. cfg_uint16 Repeat_Interval_Ms = 250; // <"重复按键间隔时间 (毫秒)", 100 ~ 1000>
  143. cfg_uint16 Long_Press_Time_Ms = 800; // <"长按键时间 (毫秒)", 500 ~ 5000>
  144. cfg_uint16 Long_Long_Press_Time_Ms = 3000; // <"超长按键时间 (毫秒)", 1000 ~ 10000>
  145. cfg_uint16 Very_Long_Press_Time_Ms = 5000; // <"极长按键时间 (毫秒)", 1500 ~ 20000>
  146. };
  147. class CFG_Key_Func_Maps // <"按键功能映射", CFG_CATEGORY_KEY>
  148. {
  149. CFG_Type_Key_Func_Map Map[CFG_MAX_KEY_FUNC_MAPS] =
  150. {
  151. { .Key_Func = KEY_FUNC_POWER_OFF,
  152. .Key_Value = VKEY_PLAY,
  153. .Key_Event = KEY_EVENT_LONG_PRESS,
  154. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  155. },
  156. { .Key_Func = KEY_FUNC_ENTER_PAIR_MODE,
  157. .Key_Value = VKEY_VADD,
  158. .Key_Event = KEY_EVENT_LONG_PRESS,
  159. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  160. },
  161. { .Key_Func = KEY_FUNC_CLEAR_PAIRED_LIST_IN_PAIR_MODE,
  162. .Key_Value = VKEY_PLAY,
  163. .Key_Event = KEY_EVENT_TRIPLE_CLICK,
  164. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  165. },
  166. { .Key_Func = KEY_FUNC_CLEAR_PAIRED_LIST,
  167. .Key_Value = VKEY_MODE,
  168. .Key_Event = KEY_EVENT_LONG_PRESS,
  169. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  170. },
  171. { .Key_Func = KEY_FUNC_TWS_PAIR_SEARCH,
  172. .Key_Value = VKEY_MODE,
  173. .Key_Event = KEY_EVENT_DOUBLE_CLICK,
  174. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  175. },
  176. { .Key_Func = KEY_FUNC_START_RECONNECT,
  177. .Key_Value = VKEY_NONE,
  178. .Key_Event = KEY_EVENT_NONE,
  179. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  180. },
  181. { .Key_Func = KEY_FUNC_PLAY_PAUSE,
  182. .Key_Value = VKEY_PLAY,
  183. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  184. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  185. },
  186. { .Key_Func = KEY_FUNC_PREV_MUSIC,
  187. .Key_Value = VKEY_VSUB,
  188. .Key_Event = KEY_EVENT_DOUBLE_CLICK,
  189. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  190. },
  191. { .Key_Func = KEY_FUNC_NEXT_MUSIC,
  192. .Key_Value = VKEY_VADD,
  193. .Key_Event = KEY_EVENT_DOUBLE_CLICK,
  194. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  195. },
  196. { .Key_Func = KEY_FUNC_ADD_MUSIC_VOLUME,
  197. .Key_Value = VKEY_VADD,
  198. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  199. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  200. },
  201. { .Key_Func = KEY_FUNC_SUB_MUSIC_VOLUME,
  202. .Key_Value = VKEY_VSUB,
  203. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  204. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  205. },
  206. { .Key_Func = KEY_FUNC_ADD_CALL_VOLUME,
  207. .Key_Value = VKEY_VADD,
  208. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  209. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  210. },
  211. { .Key_Func = KEY_FUNC_SUB_CALL_VOLUME,
  212. .Key_Value = VKEY_VSUB,
  213. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  214. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  215. },
  216. { .Key_Func = KEY_FUNC_ACCEPT_CALL,
  217. .Key_Value = VKEY_PLAY,
  218. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  219. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  220. },
  221. { .Key_Func = KEY_FUNC_REJECT_CALL,
  222. .Key_Value = VKEY_PLAY,
  223. .Key_Event = KEY_EVENT_LONG_PRESS,
  224. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  225. },
  226. { .Key_Func = KEY_FUNC_HANGUP_CALL,
  227. .Key_Value = VKEY_PLAY,
  228. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  229. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  230. },
  231. { .Key_Func = KEY_FUNC_KEEP_CALL_RELEASE_3WAY,
  232. .Key_Value = VKEY_PLAY,
  233. .Key_Event = KEY_EVENT_LONG_PRESS,
  234. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  235. },
  236. { .Key_Func = KEY_FUNC_HOLD_CALL_ACTIVE_3WAY,
  237. .Key_Value = VKEY_PLAY,
  238. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  239. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  240. },
  241. { .Key_Func = KEY_FUNC_HANGUP_CALL_ACTIVE_3WAY,
  242. .Key_Value = VKEY_PLAY,
  243. .Key_Event = KEY_EVENT_DOUBLE_CLICK,
  244. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  245. },
  246. { .Key_Func = KEY_FUNC_SWITCH_CALL_OUT,
  247. .Key_Value = VKEY_VADD,
  248. .Key_Event = KEY_EVENT_LONG_PRESS,
  249. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  250. },
  251. { .Key_Func = KEY_FUNC_SWITCH_MIC_MUTE,
  252. .Key_Value = VKEY_VSUB,
  253. .Key_Event = KEY_EVENT_LONG_PRESS,
  254. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  255. },
  256. { .Key_Func = KEY_FUNC_DIAL_LAST_NO,
  257. .Key_Value = VKEY_PLAY,
  258. .Key_Event = KEY_EVENT_DOUBLE_CLICK,
  259. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  260. },
  261. { .Key_Func = KEY_FUNC_START_VOICE_ASSIST,
  262. .Key_Value = VKEY_VSUB,
  263. .Key_Event = KEY_EVENT_TRIPLE_CLICK,
  264. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  265. },
  266. { .Key_Func = KEY_FUNC_STOP_VOICE_ASSIST,
  267. .Key_Value = VKEY_PLAY,
  268. .Key_Event = KEY_EVENT_SINGLE_CLICK,
  269. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  270. },
  271. { .Key_Func = KEY_FUNC_HID_PHOTO_SHOT,
  272. .Key_Value = VKEY_VADD,
  273. .Key_Event = KEY_EVENT_TRIPLE_CLICK,
  274. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  275. },
  276. { .Key_Func = KEY_FUNC_HID_CUSTOM_KEY,
  277. .Key_Value = VKEY_NONE,
  278. .Key_Event = KEY_EVENT_NONE,
  279. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  280. },
  281. { .Key_Func = KEY_FUNC_NONE,
  282. .Key_Value = VKEY_NONE,
  283. .Key_Event = KEY_EVENT_NONE,
  284. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  285. },
  286. { .Key_Func = KEY_FUNC_NONE,
  287. .Key_Value = VKEY_NONE,
  288. .Key_Event = KEY_EVENT_NONE,
  289. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  290. },
  291. { .Key_Func = KEY_FUNC_NONE,
  292. .Key_Value = VKEY_NONE,
  293. .Key_Event = KEY_EVENT_NONE,
  294. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  295. },
  296. { .Key_Func = KEY_FUNC_NONE,
  297. .Key_Value = VKEY_NONE,
  298. .Key_Event = KEY_EVENT_NONE,
  299. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  300. },
  301. { .Key_Func = KEY_FUNC_NONE,
  302. .Key_Value = VKEY_NONE,
  303. .Key_Event = KEY_EVENT_NONE,
  304. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  305. },
  306. { .Key_Func = KEY_FUNC_NONE,
  307. .Key_Value = VKEY_NONE,
  308. .Key_Event = KEY_EVENT_NONE,
  309. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  310. },
  311. { .Key_Func = KEY_FUNC_NONE,
  312. .Key_Value = VKEY_NONE,
  313. .Key_Event = KEY_EVENT_NONE,
  314. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  315. },
  316. { .Key_Func = KEY_FUNC_NONE,
  317. .Key_Value = VKEY_NONE,
  318. .Key_Event = KEY_EVENT_NONE,
  319. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  320. },
  321. { .Key_Func = KEY_FUNC_NONE,
  322. .Key_Value = VKEY_NONE,
  323. .Key_Event = KEY_EVENT_NONE,
  324. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  325. },
  326. { .Key_Func = KEY_FUNC_NONE,
  327. .Key_Value = VKEY_NONE,
  328. .Key_Event = KEY_EVENT_NONE,
  329. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  330. },
  331. { .Key_Func = KEY_FUNC_NONE,
  332. .Key_Value = VKEY_NONE,
  333. .Key_Event = KEY_EVENT_NONE,
  334. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  335. },
  336. { .Key_Func = KEY_FUNC_NONE,
  337. .Key_Value = VKEY_NONE,
  338. .Key_Event = KEY_EVENT_NONE,
  339. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  340. },
  341. { .Key_Func = KEY_FUNC_NONE,
  342. .Key_Value = VKEY_NONE,
  343. .Key_Event = KEY_EVENT_NONE,
  344. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  345. },
  346. }; // <"映射", CFG_Type_Key_Func_Map>
  347. };
  348. class CFG_Combo_Key_Func_Maps // <"组合按键映射", CFG_CATEGORY_KEY>
  349. {
  350. CFG_Type_Combo_Key_Map Map[CFG_MAX_COMBO_KEY_MAPS] =
  351. {
  352. { .Key_Func = KEY_FUNC_NONE,
  353. .Key_Value_1 = VKEY_NONE,
  354. .Key_Value_2 = VKEY_NONE,
  355. .Key_Event = KEY_EVENT_NONE,
  356. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  357. },
  358. { .Key_Func = KEY_FUNC_NONE,
  359. .Key_Value_1 = VKEY_NONE,
  360. .Key_Value_2 = VKEY_NONE,
  361. .Key_Event = KEY_EVENT_NONE,
  362. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  363. },
  364. { .Key_Func = KEY_FUNC_NONE,
  365. .Key_Value_1 = VKEY_NONE,
  366. .Key_Value_2 = VKEY_NONE,
  367. .Key_Event = KEY_EVENT_NONE,
  368. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  369. },
  370. { .Key_Func = KEY_FUNC_NONE,
  371. .Key_Value_1 = VKEY_NONE,
  372. .Key_Value_2 = VKEY_NONE,
  373. .Key_Event = KEY_EVENT_NONE,
  374. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  375. },
  376. { .Key_Func = KEY_FUNC_NONE,
  377. .Key_Value_1 = VKEY_NONE,
  378. .Key_Value_2 = VKEY_NONE,
  379. .Key_Event = KEY_EVENT_NONE,
  380. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  381. },
  382. { .Key_Func = KEY_FUNC_NONE,
  383. .Key_Value_1 = VKEY_NONE,
  384. .Key_Value_2 = VKEY_NONE,
  385. .Key_Event = KEY_EVENT_NONE,
  386. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  387. },
  388. { .Key_Func = KEY_FUNC_NONE,
  389. .Key_Value_1 = VKEY_NONE,
  390. .Key_Value_2 = VKEY_NONE,
  391. .Key_Event = KEY_EVENT_NONE,
  392. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  393. },
  394. { .Key_Func = KEY_FUNC_NONE,
  395. .Key_Value_1 = VKEY_NONE,
  396. .Key_Value_2 = VKEY_NONE,
  397. .Key_Event = KEY_EVENT_NONE,
  398. .LR_Device = KEY_DEVICE_TWS_UNPAIRED | KEY_DEVICE_TWS_PAIRED,
  399. },
  400. }; // <"映射", CFG_Type_Combo_Key_Map>
  401. };
  402. class CFG_Customed_Key_Sequence // <"自定义按键序列设置", CFG_CATEGORY_KEY>
  403. {
  404. CFG_Type_Customed_Key_Sequence Customed_Key_Sequence[2] =
  405. {
  406. { .Key_Sequence = CUSTOMED_KEY_SEQUENCE_NONE,
  407. .Key_Event_1 = KEY_EVENT_NONE,
  408. .Key_Event_2 = KEY_EVENT_NONE,
  409. },
  410. { .Key_Sequence = CUSTOMED_KEY_SEQUENCE_NONE,
  411. .Key_Event_1 = KEY_EVENT_NONE,
  412. .Key_Event_2 = KEY_EVENT_NONE,
  413. },
  414. };// <"自定义按键序列", CFG_Type_Customed_Key_Sequence>
  415. };
  416. class CFG_LED_Drives // <"LED 驱动", CFG_CATEGORY_DISPLAY>
  417. {
  418. CFG_Type_LED_Drive LED[CFG_MAX_LEDS] =
  419. {
  420. { .LED_No = LED_RED, .GPIO_Pin = LED_GPIO_18, .Active_Level = GPIO_LEVEL_HIGH, },
  421. { .LED_No = LED_BLUE, .GPIO_Pin = LED_GPIO_19, .Active_Level = GPIO_LEVEL_HIGH, },
  422. { .LED_No = LED_NULL, .GPIO_Pin = LED_GPIO_NONE, .Active_Level = GPIO_LEVEL_HIGH, },
  423. { .LED_No = LED_NULL, .GPIO_Pin = LED_GPIO_NONE, .Active_Level = GPIO_LEVEL_HIGH, },
  424. }; // <"LED", CFG_Type_LED_Drive>
  425. };
  426. class CFG_LED_Display_Models // <"LED 显示模式", CFG_CATEGORY_DISPLAY>
  427. {
  428. CFG_Type_LED_Display_Model Model[CFG_MAX_LED_DISPLAY_MODELS] =
  429. {
  430. { .Display_Model = LED_DISPLAY_POWER_ON,
  431. .Display_LEDs = LED_BLUE,
  432. .Disable_LEDs = NONE,
  433. .Use_PWM_Control = NO,
  434. .Delay_Time_Ms = 0,
  435. .ON_Time_Ms = 200,
  436. .OFF_Time_Ms = 200,
  437. .Flash_Count = 3,
  438. .Loop_Count = 1,
  439. .Loop_Wait_Time_Ms = 0,
  440. .Breath_Time_Ms = 0,
  441. },
  442. { .Display_Model = LED_DISPLAY_POWER_OFF,
  443. .Display_LEDs = LED_RED,
  444. .Disable_LEDs = NONE,
  445. .Use_PWM_Control = NO,
  446. .Delay_Time_Ms = 0,
  447. .ON_Time_Ms = 200,
  448. .OFF_Time_Ms = 200,
  449. .Flash_Count = 3,
  450. .Loop_Count = 1,
  451. .Loop_Wait_Time_Ms = 0,
  452. .Breath_Time_Ms = 0,
  453. },
  454. { .Display_Model = LED_DISPLAY_STANDBY,
  455. .Display_LEDs = LED_RED,
  456. .Disable_LEDs = LED_BLUE,
  457. .Use_PWM_Control = YES,
  458. .Delay_Time_Ms = 0,
  459. .ON_Time_Ms = 100,
  460. .OFF_Time_Ms = 5000,
  461. .Flash_Count = 0,
  462. .Loop_Count = 0,
  463. .Loop_Wait_Time_Ms = 0,
  464. .Breath_Time_Ms = 0,
  465. },
  466. { .Display_Model = LED_DISPLAY_CHARGE_START,
  467. .Display_LEDs = LED_RED,
  468. .Disable_LEDs = NONE,
  469. .Use_PWM_Control = NO,
  470. .Delay_Time_Ms = 0,
  471. .ON_Time_Ms = 1000,
  472. .OFF_Time_Ms = 0,
  473. .Flash_Count = 0,
  474. .Loop_Count = 0,
  475. .Loop_Wait_Time_Ms = 0,
  476. .Breath_Time_Ms = 0,
  477. },
  478. { .Display_Model = LED_DISPLAY_CHARGE_FULL,
  479. .Display_LEDs = LED_BLUE,
  480. .Disable_LEDs = NONE,
  481. .Use_PWM_Control = NO,
  482. .Delay_Time_Ms = 0,
  483. .ON_Time_Ms = 1000,
  484. .OFF_Time_Ms = 0,
  485. .Flash_Count = 0,
  486. .Loop_Count = 0,
  487. .Loop_Wait_Time_Ms = 0,
  488. .Breath_Time_Ms = 0,
  489. },
  490. { .Display_Model = LED_DISPLAY_BT_PAIR_MODE,
  491. .Display_LEDs = LED_RED | LED_BLUE,
  492. .Disable_LEDs = NONE,
  493. .Use_PWM_Control = NO,
  494. .Delay_Time_Ms = 250,
  495. .ON_Time_Ms = 250,
  496. .OFF_Time_Ms = 250,
  497. .Flash_Count = 0,
  498. .Loop_Count = 0,
  499. .Loop_Wait_Time_Ms = 0,
  500. .Breath_Time_Ms = 0,
  501. },
  502. { .Display_Model = LED_DISPLAY_BT_WAIT_CONNECT,
  503. .Display_LEDs = LED_RED | LED_BLUE,
  504. .Disable_LEDs = NONE,
  505. .Use_PWM_Control = NO,
  506. .Delay_Time_Ms = 500,
  507. .ON_Time_Ms = 500,
  508. .OFF_Time_Ms = 500,
  509. .Flash_Count = 0,
  510. .Loop_Count = 0,
  511. .Loop_Wait_Time_Ms = 0,
  512. .Breath_Time_Ms = 0,
  513. },
  514. { .Display_Model = LED_DISPLAY_BT_CONNECTED,
  515. .Display_LEDs = LED_BLUE,
  516. .Disable_LEDs = NONE,
  517. .Use_PWM_Control = NO,
  518. .Delay_Time_Ms = 0,
  519. .ON_Time_Ms = 150,
  520. .OFF_Time_Ms = 0,
  521. .Flash_Count = 1,
  522. .Loop_Count = 0,
  523. .Loop_Wait_Time_Ms = 5000,
  524. .Breath_Time_Ms = 0,
  525. },
  526. { .Display_Model = LED_DISPLAY_BT_UNLINKED,
  527. .Display_LEDs = LED_RED | LED_BLUE,
  528. .Disable_LEDs = NONE,
  529. .Use_PWM_Control = NO,
  530. .Delay_Time_Ms = 1000,
  531. .ON_Time_Ms = 1000,
  532. .OFF_Time_Ms = 1000,
  533. .Flash_Count = 0,
  534. .Loop_Count = 0,
  535. .Loop_Wait_Time_Ms = 0,
  536. .Breath_Time_Ms = 0,
  537. },
  538. { .Display_Model = LED_DISPLAY_BT_CALL_INCOMING,
  539. .Display_LEDs = LED_BLUE,
  540. .Disable_LEDs = NONE,
  541. .Use_PWM_Control = NO,
  542. .Delay_Time_Ms = 0,
  543. .ON_Time_Ms = 150,
  544. .OFF_Time_Ms = 150,
  545. .Flash_Count = 3,
  546. .Loop_Count = 0,
  547. .Loop_Wait_Time_Ms = 500,
  548. .Breath_Time_Ms = 0,
  549. },
  550. }; // <"模式", CFG_Type_LED_Display_Model>
  551. };
  552. class CFG_BT_Music_Volume_Table // <"蓝牙音乐音量分级表", CFG_CATEGORY_VOLUME_GAIN>
  553. {
  554. cfg_uint16 Level[CFG_MAX_BT_MUSIC_VOLUME + 1] =
  555. {
  556. VOLUME_GAIN_0, // LEVEL_0
  557. VOLUME_GAIN_4, // LEVEL_1
  558. VOLUME_GAIN_6, // LEVEL_2
  559. VOLUME_GAIN_9, // LEVEL_3
  560. VOLUME_GAIN_12, // LEVEL_4
  561. VOLUME_GAIN_15, // LEVEL_5
  562. VOLUME_GAIN_18, // LEVEL_6
  563. VOLUME_GAIN_21, // LEVEL_7
  564. VOLUME_GAIN_24, // LEVEL_8
  565. VOLUME_GAIN_27, // LEVEL_9
  566. VOLUME_GAIN_30, // LEVEL_10
  567. VOLUME_GAIN_33, // LEVEL_11
  568. VOLUME_GAIN_36, // LEVEL_12
  569. VOLUME_GAIN_39, // LEVEL_13
  570. VOLUME_GAIN_42, // LEVEL_14
  571. VOLUME_GAIN_45, // LEVEL_15
  572. VOLUME_GAIN_48, // LEVEL_16
  573. }; // <"分级", CFG_TYPE_VOLUME_GAIN, click_popup>
  574. };
  575. class CFG_BT_Call_Volume_Table // <"蓝牙通话音量分级表", CFG_CATEGORY_VOLUME_GAIN>
  576. {
  577. cfg_uint16 Level[CFG_MAX_BT_CALL_VOLUME + 1] =
  578. {
  579. VOLUME_GAIN_4, // LEVEL_0
  580. VOLUME_GAIN_6, // LEVEL_1
  581. VOLUME_GAIN_9, // LEVEL_2
  582. VOLUME_GAIN_12, // LEVEL_3
  583. VOLUME_GAIN_15, // LEVEL_4
  584. VOLUME_GAIN_18, // LEVEL_5
  585. VOLUME_GAIN_21, // LEVEL_6
  586. VOLUME_GAIN_24, // LEVEL_7
  587. VOLUME_GAIN_27, // LEVEL_8
  588. VOLUME_GAIN_30, // LEVEL_9
  589. VOLUME_GAIN_33, // LEVEL_10
  590. VOLUME_GAIN_36, // LEVEL_11
  591. VOLUME_GAIN_39, // LEVEL_12
  592. VOLUME_GAIN_42, // LEVEL_13
  593. VOLUME_GAIN_45, // LEVEL_14
  594. VOLUME_GAIN_48, // LEVEL_15
  595. }; // <"分级", CFG_TYPE_VOLUME_GAIN, click_popup>
  596. };
  597. class CFG_Linein_Volume_Table // <"Linein 音量分级表", CFG_CATEGORY_VOLUME_GAIN, hide>
  598. {
  599. cfg_uint16 Level[CFG_MAX_LINEIN_VOLUME + 1] =
  600. {
  601. VOLUME_GAIN_4, // LEVEL_0
  602. VOLUME_GAIN_6, // LEVEL_1
  603. VOLUME_GAIN_9, // LEVEL_2
  604. VOLUME_GAIN_12, // LEVEL_3
  605. VOLUME_GAIN_15, // LEVEL_4
  606. VOLUME_GAIN_18, // LEVEL_5
  607. VOLUME_GAIN_21, // LEVEL_6
  608. VOLUME_GAIN_24, // LEVEL_7
  609. VOLUME_GAIN_27, // LEVEL_8
  610. VOLUME_GAIN_30, // LEVEL_9
  611. VOLUME_GAIN_33, // LEVEL_10
  612. VOLUME_GAIN_36, // LEVEL_11
  613. VOLUME_GAIN_39, // LEVEL_12
  614. VOLUME_GAIN_42, // LEVEL_13
  615. VOLUME_GAIN_45, // LEVEL_14
  616. VOLUME_GAIN_48, // LEVEL_15
  617. VOLUME_GAIN_52, // LEVEL_15
  618. }; // <"分级", CFG_TYPE_VOLUME_GAIN, click_popup>
  619. };
  620. class CFG_Voice_Volume_Table // <"语音音量分级表", CFG_CATEGORY_VOLUME_GAIN>
  621. {
  622. cfg_uint16 Level[CFG_MAX_VOICE_VOLUME + 1] =
  623. {
  624. VOLUME_GAIN_4, // LEVEL_0
  625. VOLUME_GAIN_6, // LEVEL_1
  626. VOLUME_GAIN_9, // LEVEL_2
  627. VOLUME_GAIN_12, // LEVEL_3
  628. VOLUME_GAIN_15, // LEVEL_4
  629. VOLUME_GAIN_18, // LEVEL_5
  630. VOLUME_GAIN_21, // LEVEL_6
  631. VOLUME_GAIN_24, // LEVEL_7
  632. VOLUME_GAIN_27, // LEVEL_8
  633. VOLUME_GAIN_30, // LEVEL_9
  634. VOLUME_GAIN_33, // LEVEL_10
  635. VOLUME_GAIN_36, // LEVEL_11
  636. VOLUME_GAIN_39, // LEVEL_12
  637. VOLUME_GAIN_42, // LEVEL_13
  638. VOLUME_GAIN_45, // LEVEL_14
  639. VOLUME_GAIN_48, // LEVEL_15
  640. VOLUME_GAIN_52, // LEVEL_16
  641. }; // <"分级", CFG_TYPE_VOLUME_GAIN, click_popup>
  642. };
  643. class CFG_Volume_Settings // <"音量设置", CFG_CATEGORY_VOLUME_GAIN>
  644. {
  645. cfg_uint8 Voice_Default_Volume = 8; // <"语音默认音量", 0 ~ 16, slide_bar, hide>
  646. cfg_uint8 Voice_Min_Volume = 6; // <"语音最小音量", 0 ~ 16, slide_bar>
  647. cfg_uint8 Voice_Max_Volume = 12; // <"语音最大音量", 0 ~ 16, slide_bar>
  648. cfg_uint8 BT_Music_Default_Volume = 8; // <"蓝牙音乐默认音量", 0 ~ 16, slide_bar>
  649. cfg_uint8 BT_Call_Default_Volume = 8; // <"蓝牙通话默认音量", 0 ~ 15, slide_bar>
  650. cfg_uint8 BT_Music_Default_Vol_Ex = 12; // <"蓝牙音乐默认音量 (用于不支持音量同步的设备)", 0 ~ 16, slide_bar>
  651. cfg_uint8 Linein_Default_Volume = 8; // <"Linein 默认音量", 0 ~ 16, slide_bar, hide>
  652. cfg_uint8 Linein_Gain = MIC_GAIN_6_0_DB; // <"Linein 模拟增益", CFG_TYPE_MIC_GAIN, dev_mode, hide>
  653. };
  654. class CFG_Audio_Settings // <"音频设置", CFG_CATEGORY_AUDIO>
  655. {
  656. cfg_uint8 Audio_Out_Mode =
  657. (
  658. AUDIO_OUT_MODE_DAC_DIFF
  659. ); // <"音频输出模式", CFG_TYPE_AUDIO_OUT_MODE>
  660. CFG_Type_I2S_Select_GPIO I2STX_Select_GPIO =
  661. {
  662. .I2S_MCLK = I2STX_MCLK_GPIO_NONE,
  663. .I2S_LRCLK = I2STX_MCLK_GPIO_NONE,
  664. .I2S_BCLK = I2STX_MCLK_GPIO_NONE,
  665. .I2S_DOUT = I2STX_MCLK_GPIO_NONE,
  666. }; // <"I2S TX 管脚配置", CFG_Type_I2S_Select_GPIO, click_popup>
  667. CFG_Type_I2S_Select_GPIO I2SRX_Select_GPIO =
  668. {
  669. .I2S_MCLK = GPIO_NONE,
  670. .I2S_LRCLK = GPIO_NONE,
  671. .I2S_BCLK = GPIO_NONE,
  672. .I2S_DOUT = GPIO_NONE,
  673. }; // <"I2S RX 管脚配置", CFG_Type_I2S_Select_GPIO, click_popup, hide>
  674. cfg_uint8 Channel_Select_Mode = CHANNEL_SELECT_L_BY_TWS_PAIR; // <"声道选择模式", CFG_TYPE_CHANNEL_SELECT_MODE>
  675. CFG_Type_Channel_Select_GPIO Channel_Select_GPIO =
  676. {
  677. .GPIO_Pin = GPIO_NONE,
  678. .Pull_Up_Down = CFG_GPIO_PULL_DOWN,
  679. .Active_Level = GPIO_LEVEL_LOW,
  680. }; // <"GPIO 选择声道", CFG_Type_Channel_Select_GPIO, click_popup>
  681. CFG_Type_Channel_Select_LRADC Channel_Select_LRADC =
  682. {
  683. .LRADC_Ctrl = LRADC_CTRL_NONE,
  684. .LRADC_Pull_Up = LRADC_PULL_UP_EXTERNAL,
  685. .ADC_Min = 0x00,
  686. .ADC_Max = 0x00,
  687. }; // <"LRADC 选择声道", CFG_Type_Channel_Select_LRADC, click_popup>
  688. cfg_uint8 TWS_Alone_Audio_Channel = TWS_ALONE_AUDIO_MIX_LR; // <"TWS 未组对时声道选择", CFG_TYPE_TWS_ALONE_AUDIO_CHANNEL>
  689. cfg_uint8 L_Speaker_Out = SPEAKER_OUT_ENABLE; // <"左声道喇叭输出", CFG_TYPE_SPEAKER_OUT_SELECT>
  690. cfg_uint8 R_Speaker_Out = SPEAKER_OUT_ENABLE; // <"右声道喇叭输出", CFG_TYPE_SPEAKER_OUT_SELECT>
  691. cfg_uint32 ADC_Bias_Setting = 0x1a36528a; // <"ADC BIAS 设置", hex, dev_mode>
  692. cfg_uint32 DAC_Bias_Setting =
  693. (
  694. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  695. 0x9b014964
  696. #else
  697. 0x9b004964
  698. #endif
  699. ); // <"DAC BIAS 设置", hex, dev_mode>
  700. cfg_uint8 Keep_DA_Enabled_When_Play_Pause = YES; // <"保持DAC打开状态", CFG_TYPE_BOOL, dev_mode>
  701. cfg_uint8 Disable_PA_When_Reconnect = YES; // <"回连或组对时关闭 PA", CFG_TYPE_BOOL>
  702. CFG_Type_Extern_PA_Control Extern_PA_Control[2] =
  703. {
  704. { .PA_Function = EXTERN_PA_ENABLE,
  705. .GPIO_Pin = GPIO_40,
  706. .Pull_Up_Down = CFG_GPIO_PULL_NONE,
  707. .Active_Level = GPIO_LEVEL_HIGH,
  708. },
  709. { .PA_Function = EXTERN_PA_NONE,
  710. .GPIO_Pin = GPIO_NONE,
  711. .Pull_Up_Down = CFG_GPIO_PULL_NONE,
  712. .Active_Level = GPIO_LEVEL_LOW,
  713. },
  714. }; // <"外部 PA 控制", CFG_Type_Extern_PA_Control, click_popup>
  715. cfg_uint8 AntiPOP_Process_Disable = NO; // <"禁止ANTIPOP处理", CFG_TYPE_BOOL>
  716. cfg_uint8 Pa_Gain =
  717. (
  718. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  719. 7
  720. #else
  721. 0
  722. #endif
  723. ); // <"PA增益选择", /* 选择范围[0, 7], 不同模式下增益不同*/>
  724. cfg_uint8 DMIC01_Channel_Aligning = 0; // <"DMIC01 采样沿选择", /* 值为 0 表示 channel_1 是上升沿, channel_2 是下降沿, 值为 1 则相反 */>
  725. cfg_uint8 DMIC23_Channel_Aligning = 0; // <"DMIC23 采样沿选择", /* 值为 0 表示 channel_1 是上升沿, channel_2 是下降沿, 值为 1 则相反 */>
  726. CFG_Type_DMIC_Select_GPIO DMIC_Select_GPIO =
  727. {
  728. .DMIC01_CLK = DMIC01_CLK_GPIO_NONE,
  729. .DMIC01_DAT = DMIC01_DAT_GPIO_NONE,
  730. .DMIC23_CLK = DMIC23_CLK_GPIO_NONE,
  731. .DMIC23_DAT = DMIC23_DAT_GPIO_NONE,
  732. }; // <"DMIC 管脚配置", CFG_Type_DMIC_Select_GPIO, click_popup>
  733. cfg_uint8 Enable_ANC = ANC_FF; // <"ANC功能使能, 使能后需要配置ANC DMIC GPIO", CFG_TYPE_ANC, dev_mode, /* ANC-FF fix ADC0, ANC-FB fix ADC1*/>
  734. CFG_Type_DMIC_Select_GPIO ANCDMIC_Select_GPIO =
  735. {
  736. .DMIC01_CLK = DMIC01_CLK_GPIO_NONE,
  737. .DMIC01_DAT = DMIC01_DAT_GPIO_NONE,
  738. .DMIC23_CLK = DMIC23_CLK_GPIO_NONE,
  739. .DMIC23_DAT = DMIC23_DAT_GPIO_NONE,
  740. }; // <"ANCDMIC 管脚配置", CFG_Type_DMIC_Select_GPIO, click_popup, dev_mode>
  741. cfg_uint8 Record_Adc_Select = ADC_2; // <"mic录音通路选择", CFG_TYPE_ADC, multi_select>
  742. cfg_uint8 Enable_VMIC = VMIC_0 | VMIC_1 | VMIC_2; // <"是否启用 VMIC", CFG_TYPE_VMIC, multi_select, /* 启用 VMIC 则由 PIN 脚供电, 否则由 AVCC 供电 */>
  743. cfg_uint8 Hw_Aec_Select = ADC_NONE; // <"硬件aec,选择'无'则使用软件aec", CFG_TYPE_ADC, hide>
  744. cfg_uint8 Tm_Adc_Select = ADC_0; // <"通透录音通路选择", CFG_TYPE_ADC>
  745. CFG_Type_Mic_Config Mic_Config[CFG_MAX_ADC_NUM] =
  746. {
  747. {
  748. .Adc_Index = ADC_0,
  749. .Mic_Type = ADC_TYPE_AMIC,
  750. .Audio_In_Mode = AUDIO_IN_MODE_ADC_SINGLE,
  751. },
  752. {
  753. .Adc_Index = ADC_1,
  754. .Mic_Type = ADC_TYPE_AMIC,
  755. .Audio_In_Mode = AUDIO_IN_MODE_ADC_SINGLE,
  756. },
  757. {
  758. .Adc_Index = ADC_2,
  759. .Mic_Type = ADC_TYPE_AMIC,
  760. .Audio_In_Mode = AUDIO_IN_MODE_ADC_SINGLE,
  761. },
  762. {
  763. .Adc_Index = ADC_3,
  764. .Mic_Type = ADC_TYPE_AMIC,
  765. .Audio_In_Mode = AUDIO_IN_MODE_ADC_SINGLE,
  766. },
  767. }; // <"麦克风配置", CFG_Type_Mic_Config>
  768. CFG_Type_ADC_Select_INPUT ADC_Select_INPUT =
  769. {
  770. .ADC_Input_Ch0 =
  771. (
  772. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  773. 2
  774. #else
  775. 1
  776. #endif
  777. ),
  778. .ADC_Input_Ch1 =
  779. (
  780. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  781. 8
  782. #else
  783. 2
  784. #endif
  785. ),
  786. .ADC_Input_Ch2 =
  787. (
  788. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  789. 1
  790. #else
  791. 1
  792. #endif
  793. ),
  794. .ADC_Input_Ch3 =
  795. (
  796. #if (CFG_IC_TYPE & IC_TYPE_LARK)
  797. 4
  798. #else
  799. 0
  800. #endif
  801. ),
  802. }; // <"ADC INPUT管脚配置", CFG_Type_ADC_Select_INPUT, click_popup>
  803. cfg_uint8 Dual_MIC_Exchange_Enable = NO; // <"双MIC声道交换使能", CFG_TYPE_BOOL, /* 默认R为拾音MIC,L为降噪MIC */>
  804. cfg_uint8 Large_Current_Protect_Enable = NO; // <"Speaker大电流保护使能", CFG_TYPE_BOOL>
  805. CFG_Type_ANALOG_GAIN_Settings ANALOG_GAIN_Settings = { 0, }; // <"模拟增益设置", CFG_Type_ANALOG_GAIN_Settings, click_popup>
  806. };
  807. class CFG_Tone_List // <"提示音列表", CFG_CATEGORY_TONE, readonly>
  808. {
  809. CFG_Type_Tone_ID_Name Tone[CFG_MAX_TONES] =
  810. {
  811. { TONE_ID1, "T_ID1", },
  812. { TONE_ID2, "T_ID2", },
  813. { TONE_ID3, "T_ID3", },
  814. { TONE_ID4, "T_ID4", },
  815. { TONE_ID5, "T_ID5", },
  816. { TONE_ID6, "T_ID6", },
  817. { TONE_ID7, "T_ID7", },
  818. { TONE_KEY_SOUND, "T_KEY", },
  819. { TONE_CALL_RING, "T_RING", },
  820. { TONE_WARNING, "T_WARN", },
  821. }; // <"提示音", CFG_Type_Tone_ID_Name>
  822. cfg_uint8 Tone_Format_Name[CFG_MAX_TONE_FMT_LEN] = ".act"; // <"文件格式", string>
  823. };
  824. class CFG_Key_Tone // <"按键音", CFG_CATEGORY_TONE>
  825. {
  826. cfg_uint8 Key_Tone_Select = TONE_KEY_SOUND; // <"选择按键音", CFG_TYPE_TONE_ID>
  827. cfg_uint8 Long_Key_Tone_Select = TONE_NONE; // <"长按提示音", CFG_TYPE_TONE_ID>
  828. cfg_uint8 Long_Long_Key_Tone_Select = TONE_NONE; // <"超长按提示音", CFG_TYPE_TONE_ID>
  829. cfg_uint8 Very_Long_Key_Tone_Select = TONE_NONE; // <"极长按提示音", CFG_TYPE_TONE_ID>
  830. };
  831. class CFG_Voice_List // <"语音列表", CFG_CATEGORY_VOICE, readonly>
  832. {
  833. CFG_Type_Voice_ID_Name Voice[CFG_MAX_VOICES] =
  834. {
  835. { VOICE_ID1, "V_ID1", },
  836. { VOICE_ID2, "V_ID2", },
  837. { VOICE_ID3, "V_ID3", },
  838. { VOICE_ID4, "V_ID4", },
  839. { VOICE_ID5, "V_ID5", },
  840. { VOICE_POWER_ON, "V_POWON", },
  841. { VOICE_POWER_OFF, "V_POWOFF", },
  842. { VOICE_BAT_LOW, "V_BATLOW", },
  843. { VOICE_BAT_TOO_LOW, "V_BATTLO", },
  844. { VOICE_BT_PAIR_MODE, "V_BTPRMD", },
  845. { VOICE_BT_WAIT_CONNECT, "V_BTWPR", },
  846. { VOICE_BT_CONNECTED, "V_BTCNT", },
  847. { VOICE_2ND_CONNECTED, "V_BTCNT2", },
  848. { VOICE_BT_DISCONNECTED, "V_BTDSC", },
  849. { VOICE_TWS_WAIT_PAIR, "V_TWSWPR", },
  850. { VOICE_TWS_CONNECTED, "V_TWSCNT", },
  851. { VOICE_TWS_DISCONNECTED,"V_TWSDSC", },
  852. { VOICE_PLAY, "V_PLAY", },
  853. { VOICE_PAUSE, "V_PAUSE", },
  854. { VOICE_PREV_MUSIC, "V_PRVMUS", },
  855. { VOICE_NEXT_MUSIC, "V_NXTMUS", },
  856. { VOICE_MIN_VOLUME, "V_MINVOL", },
  857. { VOICE_MAX_VOLUME, "V_MAXVOL", },
  858. // { VOICE_LINEIN, "V_LINEIN", },
  859. }; // <"语音", CFG_Type_Voice_ID_Name>
  860. cfg_uint8 Voice_Format_Name[CFG_MAX_VOICE_FMT_LEN] = ".act"; // <"文件格式", string>
  861. };
  862. class CFG_Numeric_Voice_List // <"数字语音列表", CFG_CATEGORY_VOICE, readonly>
  863. {
  864. CFG_Type_Numeric_Voice_ID_Name Voice[CFG_MAX_NUMERIC_VOICES] =
  865. {
  866. { VOICE_NO_0, "V_NO_0", },
  867. { VOICE_NO_1, "V_NO_1", },
  868. { VOICE_NO_2, "V_NO_2", },
  869. { VOICE_NO_3, "V_NO_3", },
  870. { VOICE_NO_4, "V_NO_4", },
  871. { VOICE_NO_5, "V_NO_5", },
  872. { VOICE_NO_6, "V_NO_6", },
  873. { VOICE_NO_7, "V_NO_7", },
  874. { VOICE_NO_8, "V_NO_8", },
  875. { VOICE_NO_9, "V_NO_9", },
  876. }; // <"语音", CFG_Type_Numeric_Voice_ID_Name>
  877. };
  878. class CFG_Event_Notify // <"事件通知", CFG_CATEGORY_EVENT_NOTIFY>
  879. {
  880. CFG_Type_Event_Notify Notify[CFG_MAX_EVENT_NOTIFY] =
  881. {
  882. { .Event_Type = UI_EVENT_POWER_ON,
  883. .LED_Display = LED_DISPLAY_POWER_ON,
  884. .LED_Override = LED_OVERRIDE_FRONT,
  885. .Tone_Play = NONE,
  886. .Voice_Play = VOICE_POWER_ON,
  887. .Options = NONE,
  888. },
  889. { .Event_Type = UI_EVENT_POWER_OFF,
  890. .LED_Display = LED_DISPLAY_POWER_OFF,
  891. .LED_Override = LED_OVERRIDE_FRONT,
  892. .Tone_Play = NONE,
  893. .Voice_Play = VOICE_POWER_OFF,
  894. .Options = NONE,
  895. },
  896. { .Event_Type = UI_EVENT_STANDBY,
  897. .LED_Display = LED_DISPLAY_STANDBY,
  898. .LED_Override = LED_OVERRIDE_FRONT,
  899. .Tone_Play = NONE,
  900. .Voice_Play = NONE,
  901. .Options = NONE,
  902. },
  903. { .Event_Type = UI_EVENT_BATTERY_TOO_LOW,
  904. .LED_Display = NONE,
  905. .LED_Override = NONE,
  906. .Tone_Play = TONE_WARNING,
  907. .Voice_Play = VOICE_BAT_TOO_LOW,
  908. .Options = NONE,
  909. },
  910. { .Event_Type = UI_EVENT_BATTERY_LOW,
  911. .LED_Display = NONE,
  912. .LED_Override = NONE,
  913. .Tone_Play = TONE_WARNING,
  914. .Voice_Play = VOICE_BAT_LOW,
  915. .Options = NONE,
  916. },
  917. { .Event_Type = UI_EVENT_CHARGE_START,
  918. .LED_Display = LED_DISPLAY_CHARGE_START,
  919. .LED_Override = LED_OVERRIDE_BACK,
  920. .Tone_Play = NONE,
  921. .Voice_Play = NONE,
  922. .Options = NONE,
  923. },
  924. { .Event_Type = UI_EVENT_CHARGE_FULL,
  925. .LED_Display = LED_DISPLAY_CHARGE_FULL,
  926. .LED_Override = LED_OVERRIDE_BACK,
  927. .Tone_Play = NONE,
  928. .Voice_Play = NONE,
  929. .Options = NONE,
  930. },
  931. { .Event_Type = UI_EVENT_ENTER_PAIR_MODE,
  932. .LED_Display = LED_DISPLAY_BT_PAIR_MODE,
  933. .LED_Override = LED_OVERRIDE_FRONT,
  934. .Tone_Play = NONE,
  935. .Voice_Play = VOICE_BT_PAIR_MODE,
  936. .Options = NONE,
  937. },
  938. { .Event_Type = UI_EVENT_CLEAR_PAIRED_LIST,
  939. .LED_Display = NONE,
  940. .LED_Override = NONE,
  941. .Tone_Play = TONE_WARNING,
  942. .Voice_Play = NONE,
  943. .Options = NONE,
  944. },
  945. { .Event_Type = UI_EVENT_BT_WAIT_CONNECT,
  946. .LED_Display = LED_DISPLAY_BT_WAIT_CONNECT,
  947. .LED_Override = LED_OVERRIDE_FRONT,
  948. .Tone_Play = NONE,
  949. .Voice_Play = VOICE_BT_WAIT_CONNECT,
  950. .Options = NONE,
  951. },
  952. { .Event_Type = UI_EVENT_BT_CONNECTED,
  953. .LED_Display = LED_DISPLAY_BT_CONNECTED,
  954. .LED_Override = LED_OVERRIDE_FRONT,
  955. .Tone_Play = NONE,
  956. .Voice_Play = VOICE_BT_CONNECTED,
  957. .Options = NONE,
  958. },
  959. { .Event_Type = UI_EVENT_2ND_CONNECTED,
  960. .LED_Display = LED_DISPLAY_BT_CONNECTED,
  961. .LED_Override = LED_OVERRIDE_FRONT,
  962. .Tone_Play = NONE,
  963. .Voice_Play = VOICE_2ND_CONNECTED,
  964. .Options = NONE,
  965. },
  966. { .Event_Type = UI_EVENT_BT_DISCONNECTED,
  967. .LED_Display = NONE,
  968. .LED_Override = NONE,
  969. .Tone_Play = NONE,
  970. .Voice_Play = VOICE_BT_DISCONNECTED,
  971. .Options = NONE,
  972. },
  973. { .Event_Type = UI_EVENT_BT_UNLINKED,
  974. .LED_Display = LED_DISPLAY_BT_UNLINKED,
  975. .LED_Override = LED_OVERRIDE_FRONT,
  976. .Tone_Play = NONE,
  977. .Voice_Play = NONE,
  978. .Options = NONE,
  979. },
  980. { .Event_Type = UI_EVENT_TWS_WAIT_PAIR,
  981. .LED_Display = LED_DISPLAY_BT_PAIR_MODE,
  982. .LED_Override = LED_OVERRIDE_FRONT,
  983. .Tone_Play = NONE,
  984. .Voice_Play = VOICE_TWS_WAIT_PAIR,
  985. .Options = NONE,
  986. },
  987. { .Event_Type = UI_EVENT_TWS_CONNECTED,
  988. .LED_Display = LED_DISPLAY_BT_CONNECTED,
  989. .LED_Override = LED_OVERRIDE_FRONT,
  990. .Tone_Play = NONE,
  991. .Voice_Play = VOICE_TWS_CONNECTED,
  992. .Options = NONE,
  993. },
  994. { .Event_Type = UI_EVENT_TWS_DISCONNECTED,
  995. .LED_Display = NONE,
  996. .LED_Override = NONE,
  997. .Tone_Play = NONE,
  998. .Voice_Play = VOICE_TWS_DISCONNECTED,
  999. .Options = NONE,
  1000. },
  1001. { .Event_Type = UI_EVENT_BT_MUSIC_PLAY,
  1002. .LED_Display = NONE,
  1003. .LED_Override = NONE,
  1004. .Tone_Play = NONE,
  1005. .Voice_Play = NONE,
  1006. .Options = NONE,
  1007. },
  1008. { .Event_Type = UI_EVENT_BT_MUSIC_PAUSE,
  1009. .LED_Display = NONE,
  1010. .LED_Override = NONE,
  1011. .Tone_Play = NONE,
  1012. .Voice_Play = NONE,
  1013. .Options = NONE,
  1014. },
  1015. { .Event_Type = UI_EVENT_PREV_MUSIC,
  1016. .LED_Display = NONE,
  1017. .LED_Override = NONE,
  1018. .Tone_Play = NONE,
  1019. .Voice_Play = NONE,
  1020. .Options = NONE,
  1021. },
  1022. { .Event_Type = UI_EVENT_NEXT_MUSIC,
  1023. .LED_Display = NONE,
  1024. .LED_Override = NONE,
  1025. .Tone_Play = NONE,
  1026. .Voice_Play = NONE,
  1027. .Options = NONE,
  1028. },
  1029. { .Event_Type = UI_EVENT_MIN_VOLUME,
  1030. .LED_Display = NONE,
  1031. .LED_Override = NONE,
  1032. .Tone_Play = TONE_WARNING,
  1033. .Voice_Play = VOICE_MIN_VOLUME,
  1034. .Options = NONE,
  1035. },
  1036. { .Event_Type = UI_EVENT_MAX_VOLUME,
  1037. .LED_Display = NONE,
  1038. .LED_Override = NONE,
  1039. .Tone_Play = TONE_WARNING,
  1040. .Voice_Play = VOICE_MAX_VOLUME,
  1041. .Options = NONE,
  1042. },
  1043. { .Event_Type = UI_EVENT_BT_CALL_INCOMING,
  1044. .LED_Display = LED_DISPLAY_BT_CALL_INCOMING,
  1045. .LED_Override = LED_OVERRIDE_FRONT,
  1046. .Tone_Play = TONE_CALL_RING,
  1047. .Voice_Play = NONE,
  1048. .Options = NONE,
  1049. },
  1050. { .Event_Type = UI_EVENT_BT_CALL_OUTGOING,
  1051. .LED_Display = LED_DISPLAY_BT_CALL_INCOMING,
  1052. .LED_Override = LED_OVERRIDE_FRONT,
  1053. .Tone_Play = NONE,
  1054. .Voice_Play = NONE,
  1055. .Options = NONE,
  1056. },
  1057. { .Event_Type = UI_EVENT_BT_CALL_ONGOING,
  1058. .LED_Display = LED_DISPLAY_BT_CALL_ONGOING,
  1059. .LED_Override = LED_OVERRIDE_FRONT,
  1060. .Tone_Play = NONE,
  1061. .Voice_Play = NONE,
  1062. .Options = NONE,
  1063. },
  1064. { .Event_Type = UI_EVENT_BT_CALL_3WAYIN,
  1065. .LED_Display = LED_DISPLAY_BT_CALL_INCOMING,
  1066. .LED_Override = LED_OVERRIDE_FRONT,
  1067. .Tone_Play = TONE_CALL_RING,
  1068. .Voice_Play = NONE,
  1069. .Options = NONE,
  1070. },
  1071. { .Event_Type = UI_EVENT_VOICE_ASSIST_START,
  1072. .LED_Display = LED_DISPLAY_BT_CALL_ONGOING,
  1073. .LED_Override = LED_OVERRIDE_FRONT,
  1074. .Tone_Play = NONE,
  1075. .Voice_Play = NONE,
  1076. .Options = NONE,
  1077. },
  1078. { .Event_Type = UI_EVENT_MIC_MUTE_ON,
  1079. .LED_Display = NONE,
  1080. .LED_Override = NONE,
  1081. .Tone_Play = TONE_WARNING,
  1082. .Voice_Play = NONE,
  1083. .Options = NONE,
  1084. },
  1085. { .Event_Type = UI_EVENT_MIC_MUTE_OFF,
  1086. .LED_Display = NONE,
  1087. .LED_Override = NONE,
  1088. .Tone_Play = TONE_WARNING,
  1089. .Voice_Play = NONE,
  1090. .Options = NONE,
  1091. },
  1092. { .Event_Type = UI_EVENT_SWITCH_CALL_OUT,
  1093. .LED_Display = NONE,
  1094. .LED_Override = NONE,
  1095. .Tone_Play = TONE_WARNING,
  1096. .Voice_Play = NONE,
  1097. .Options = NONE,
  1098. },
  1099. { .Event_Type = UI_EVENT_HID_PHOTO_SHOT,
  1100. .LED_Display = NONE,
  1101. .LED_Override = NONE,
  1102. .Tone_Play = TONE_WARNING,
  1103. .Voice_Play = NONE,
  1104. .Options = NONE,
  1105. },
  1106. #if 0
  1107. { .Event_Type = UI_EVENT_ENTER_LINEIN,
  1108. .LED_Display = NONE,
  1109. .LED_Override = NONE,
  1110. .Tone_Play = NONE,
  1111. .Voice_Play = VOICE_LINEIN,
  1112. .Options = NONE,
  1113. },
  1114. { .Event_Type = UI_EVENT_LINEIN_PLAY,
  1115. .LED_Display = NONE,
  1116. .LED_Override = NONE,
  1117. .Tone_Play = NONE,
  1118. .Voice_Play = VOICE_PLAY,
  1119. .Options = NONE,
  1120. },
  1121. { .Event_Type = UI_EVENT_LINEIN_PAUSE,
  1122. .LED_Display = NONE,
  1123. .LED_Override = NONE,
  1124. .Tone_Play = NONE,
  1125. .Voice_Play = VOICE_PAUSE,
  1126. .Options = NONE,
  1127. },
  1128. #endif
  1129. }; // <"通知", CFG_Type_Event_Notify>
  1130. };
  1131. class CFG_Battery_Charge // <"电池充电", CFG_CATEGORY_BATTERY_CHARGE>
  1132. {
  1133. cfg_uint8 Select_Charge_Mode = BAT_BACK_CHARGE_MODE; // <"选择充电模式", CFG_TYPE_BAT_CHARGE_MODE, /* 后台充电模式将保持蓝牙正常工作状态 */>
  1134. cfg_uint8 Charge_Current =
  1135. (
  1136. #if (BOARD_TYPE == BOARD_LARK)
  1137. CHARGE_CURRENT_60_MA
  1138. #else
  1139. CHARGE_CURRENT_300_MA
  1140. #endif
  1141. ); // <"正常充电电流", CFG_TYPE_CHARGE_CURRENT>
  1142. cfg_uint8 Charge_Voltage = CHARGE_VOLTAGE_4_20_V; // <"正常充电电压", CFG_TYPE_CHARGE_VOLTAGE>
  1143. cfg_uint8 Charge_Stop_Mode = CHARGE_STOP_BY_VOLTAGE_AND_CURRENT; // <"电池充满阈值选择", CFG_TYPE_CHARGE_STOP_MODE>
  1144. cfg_uint16 Charge_Stop_Voltage = 4160; // <"电池充满阈值电压", 4.05 ~ 4.33, float_x1000, /* (小于等于充电电压 - 0.02V) */>
  1145. cfg_uint8 Charge_Stop_Current = CHARGE_STOP_CURRENT_20_PERCENT; // <"电池充满阈值电流", CFG_TYPE_CHARGE_STOP_CURRENT>
  1146. cfg_uint16 Precharge_Stop_Voltage = PRECHARGE_STOP_3_3_V; // <"低电预充阈值电压", CFG_TYPE_PRECHARGE_STOP_VOLTAGE, hide>
  1147. cfg_uint16 Battery_Check_Period_Sec = 60; // <"电量检测周期 (秒)", 10 ~ 300>
  1148. cfg_uint16 Charge_Check_Period_Sec = 300; // <"正常充电检测周期 (秒)", 60 ~ 600>
  1149. cfg_uint16 Charge_Full_Continue_Sec = 420; // <"充满延续时间 (秒)", 10 ~ 1800, /* 充电至阈值后继续充电该时间以完全充满 */>
  1150. cfg_uint16 Front_Charge_Full_Power_Off_Wait_Sec = 10; // <"前台模式充电满后关机等待时间 (秒)", 5 ~ 300>
  1151. cfg_uint16 DC5V_Detect_Debounce_Time_Ms = 300; // <"DC5V 检测去抖时间 (毫秒)", 0 ~ 1000>
  1152. };
  1153. class CFG_Charger_Box // <"充电盒设置", CFG_CATEGORY_BATTERY_CHARGE>
  1154. {
  1155. cfg_uint8 Enable_Charger_Box = NO; // <"启用充电盒充电模式", CFG_TYPE_BOOL>
  1156. cfg_uint8 DC5V_Pull_Down_Current = DC5VPD_CURRENT_DISABLE; // <"DC5V 下拉唤醒充电盒", CFG_TYPE_DC5VPD_CURRENT>
  1157. cfg_uint16 DC5V_Pull_Down_Hold_Ms = 0; // <"DC5V 下拉保持时间 (毫秒)", 0 ~ 2000>
  1158. cfg_uint16 Charger_Standby_Delay_Ms = 500; // <"充电盒待机延迟 (毫秒)", 0 ~ 2000>
  1159. cfg_uint16 Charger_Standby_Voltage = 3.00f * 1000; // <"充电盒待机电压", 0.5 ~ 4.0, float_x1000, /* 充电盒待机电压为自身电池电压时可配置为 3.8V */>
  1160. cfg_uint16 Charger_Wake_Delay_Ms = 500; // <"充电盒唤醒延迟 (毫秒)", 0 ~ 2000>
  1161. cfg_uint8 Enable_Battery_Recharge = NO; // <"启用电池复充功能", CFG_TYPE_BOOL>
  1162. cfg_uint8 Battery_Recharge_Threshold = BAT_RECHARGE_3_8_V; // <"电池复充阈值电压", CFG_TYPE_BAT_RECHARGE_THRESHOLD>
  1163. cfg_uint8 Charger_Box_Standby_Current = 0; // <"充电盒待机电流(mA)", 0 ~ 10>
  1164. CFG_Type_DC5V_UART_Comm_Settings DC5V_UART_Comm_Settings = { 0, }; // <"DC5V_COM 通讯设置", CFG_Type_DC5V_UART_Comm_Settings, click_popup>
  1165. CFG_Type_DC5V_IO_Comm_Settings DC5V_IO_Comm_Settings = { 0, }; // <"DC5V_IO 通讯设置", CFG_Type_DC5V_IO_Comm_Settings, click_popup>
  1166. };
  1167. class CFG_Battery_Level // <"电量分级", CFG_CATEGORY_BATTERY_CHARGE>
  1168. {
  1169. cfg_uint16 Level[CFG_MAX_BATTERY_LEVEL] =
  1170. {
  1171. 3.10f * 1000, // LEVEL_0
  1172. 3.40f * 1000, // LEVEL_1
  1173. 3.60f * 1000, // LEVEL_2
  1174. 3.65f * 1000, // LEVEL_3
  1175. 3.70f * 1000, // LEVEL_4
  1176. 3.75f * 1000, // LEVEL_5
  1177. 3.80f * 1000, // LEVEL_6
  1178. 3.90f * 1000, // LEVEL_7
  1179. 4.00f * 1000, // LEVEL_8
  1180. 4.10f * 1000, // LEVEL_9
  1181. }; // <"分级", 2.80 ~ 4.30, float_x1000>
  1182. };
  1183. class CFG_Battery_Low // <"低电电量", CFG_CATEGORY_BATTERY_CHARGE>
  1184. {
  1185. cfg_uint16 Battery_Too_Low_Voltage = BATTERY_LOW_3_1_V; // <"电量不足", 3.00 ~ 3.80, float_x1000, /* 电量不足时会自动关机 */>
  1186. cfg_uint16 Battery_Low_Voltage = BATTERY_LOW_3_4_V; // <"电量低", 3.00 ~ 3.80, float_x1000>
  1187. cfg_uint16 Battery_Low_Voltage_Ex = 0; // <"更低电量", 0.00 ~ 3.80, float_x1000>
  1188. cfg_uint16 Battery_Low_Prompt_Interval_Sec = 120; // <"电量低提示间隔时间 (秒)", 0 ~ 600, /* 设置为 0 时只提示一次 */>
  1189. };
  1190. class CFG_NTC_Settings // <"温度调节充电电流", CFG_CATEGORY_BATTERY_CHARGE>
  1191. {
  1192. CFG_Type_NTC_Settings NTC_Settings = { 0, }; // <"NTC 温度调节充电电流", CFG_Type_NTC_Settings>
  1193. CFG_Type_NTC_Range NTC_Ranges[5] = { { 0, }, }; // <"NTC 温度范围", CFG_Type_NTC_Range,click_popup>
  1194. };
  1195. class CFG_BT_Device // <"蓝牙设备", CFG_CATEGORY_BLUETOOTH>
  1196. {
  1197. cfg_uint8 BT_Device_Name[CFG_MAX_BT_DEV_NAME_LEN] =
  1198. (
  1199. "ZS302A-Hello"
  1200. ); // <"蓝牙设备名称", string>
  1201. cfg_uint8 Left_Device_Suffix [CFG_MAX_BT_SUFFIX_LEN] = " (L)"; // <"L 左设备名称后缀", string>
  1202. cfg_uint8 Right_Device_Suffix[CFG_MAX_BT_SUFFIX_LEN] = " (R)"; // <"R 右设备名称后缀", string>
  1203. cfg_uint8 BT_Address[6] = { 0x01, 0x00, 0x00, 0xFC, 0x4E, 0xF4 }; // <"蓝牙地址", bt_addr>
  1204. cfg_uint8 Use_Random_BT_Address = YES; // <"使用随机蓝牙地址", CFG_TYPE_BOOL, /* 通过 MIC 采样噪声生成低 3 字节蓝牙地址 */>
  1205. cfg_uint32 BT_Device_Class = 0x240404; // <"蓝牙设备类型", hex, dev_mode>
  1206. cfg_uint8 PIN_Code[CFG_MAX_BT_PIN_CODE_LEN] = "0000"; // <"PIN Code", string, dev_mode, /* 在禁止 SSP 功能时使用 */>
  1207. cfg_uint8 Default_HOSC_Capacity =
  1208. (
  1209. #if (BOARD_TYPE == BOARD_LARK)
  1210. 12.0f * 10
  1211. #else
  1212. 13.5f * 10
  1213. #endif
  1214. ); // <"缺省频偏电容值 (pF)", 0.0 ~ 24.0, float_x10>
  1215. cfg_uint8 Force_Default_HOSC_Capacity = YES; // <"总是使用配置的频偏电容值", CFG_TYPE_BOOL>
  1216. cfg_uint8 BT_Max_RF_TX_Power =
  1217. (
  1218. #if (BOARD_TYPE == BOARD_LARK)
  1219. 15
  1220. #else
  1221. 18
  1222. #endif
  1223. ); // <"蓝牙最大发射功率", 0 ~ 22>
  1224. cfg_uint8 BLE_RF_TX_Power = 8; // <"BLE 发射功率", 0 ~ 22>
  1225. cfg_uint8 A2DP_Bitpool = 49; // <"A2DP Bitpool", 2 ~ 53>
  1226. cfg_uint16 Vendor_ID = 0x03E0; // <"厂商 ID", hex>
  1227. cfg_uint16 Product_ID = 0x302A; // <"产品 ID", hex>
  1228. cfg_uint16 Version_ID = 0x0100; // <"版本 ID", hex>
  1229. };
  1230. class CFG_BT_Manager // <"蓝牙管理", CFG_CATEGORY_BLUETOOTH>
  1231. {
  1232. cfg_uint32 Support_Features =
  1233. (
  1234. BT_SUPPORT_A2DP |
  1235. BT_SUPPORT_A2DP_AAC |
  1236. // BT_SUPPORT_A2DP_DTCP |
  1237. // BT_SUPPORT_A2DP_SCMS_T |
  1238. BT_SUPPORT_AVRCP |
  1239. BT_SUPPORT_AVRCP_VOLUME_SYNC |
  1240. BT_SUPPORT_HFP |
  1241. BT_SUPPORT_HFP_VOLUME_SYNC |
  1242. BT_SUPPORT_HFP_BATTERY_REPORT |
  1243. BT_SUPPORT_HFP_3WAY_CALL |
  1244. BT_SUPPORT_HFP_PHONEBOOK_NUMBER |
  1245. BT_SUPPORT_HFP_VOICE_ASSIST |
  1246. BT_SUPPORT_HFP_CODEC_NEGOTIATION |
  1247. BT_SUPPORT_ENABLE_NREC |
  1248. BT_SUPPORT_HID |
  1249. BT_SUPPORT_TWS |
  1250. BT_SUPPORT_ENABLE_SNIFF |
  1251. BT_SUPPORT_LINKKEY_MISS_REJECT |
  1252. BT_SUPPORT_DUAL_PHONE_DEV_LINK
  1253. ); // <"蓝牙支持特性", CFG_TYPE_BT_SUPPORT_FEATURES, multi_select, /* 支持 AAC 音频格式时无法启用智能语音识别功能 */>
  1254. cfg_uint8 Support_Device_Number = 3; // <"可同时连接设备个数", 1 ~ 3>
  1255. cfg_uint8 Paired_Device_Save_Number = 8; // <"已配对设备保存个数", 2 ~ 8>
  1256. cfg_uint8 Controller_Test_Mode = BT_CTRL_DISABLE_TEST; // <"控制器测试模式", CFG_TYPE_BT_CTRL_TEST_MODE>
  1257. cfg_uint8 Enter_BQB_Test_Mode_By_Key = NO; // <"通过按键进入 BQB 测试模式", CFG_TYPE_BOOL>
  1258. CFG_Type_Auto_Quit_BT_Ctrl_Test Auto_Quit_BT_Ctrl_Test = { 0, }; // <"自动退出控制器测试模式", CFG_Type_Auto_Quit_BT_Ctrl_Test, click_popup>
  1259. cfg_uint16 Idle_Enter_Sniff_Time_Ms = 5000; // <"空闲进入 Sniff 模式时间 (毫秒)", 2000 ~ 20000, dev_mode>
  1260. cfg_uint16 Sniff_Interval_Ms = 500; // <"Sniff 周期 (毫秒)", 100 ~ 500, dev_mode>
  1261. };
  1262. class CFG_BT_Pair // <"蓝牙配对连接", CFG_CATEGORY_BLUETOOTH>
  1263. {
  1264. cfg_uint8 Default_State_Discoverable = YES; // <"默认状态可被搜索发现", CFG_TYPE_BOOL>
  1265. cfg_uint16 Default_State_Wait_Connect_Sec = 120; // <"默认状态等待配对连接 (秒)", 0 ~ 600, /* 设置为 0 时不限时间 */>
  1266. cfg_uint16 Pair_Mode_Duration_Sec = 120; // <"配对模式持续时间 (秒)", 0 ~ 600, /* 设置为 0 时不限时间 */>
  1267. cfg_uint8 Disconnect_All_Phones_When_Enter_Pair_Mode = NO; // <"进入配对模式时断开所有已连接手机设备", CFG_TYPE_BOOL>
  1268. cfg_uint8 Clear_Paired_List_When_Enter_Pair_Mode = NO; // <"进入配对模式时清除配对列表", CFG_TYPE_BOOL>
  1269. cfg_uint8 Clear_TWS_When_Key_Clear_Paired_List = YES; // <"按键清除配对列表同时清除 TWS 组对设备信息", CFG_TYPE_BOOL>
  1270. cfg_uint8 Enter_Pair_Mode_When_Key_Clear_Paired_List = NO; // <"按键清除配对列表同时进入配对模式", CFG_TYPE_BOOL>
  1271. cfg_uint8 Enter_Pair_Mode_When_Paired_List_Empty = YES; // <"配对列表为空时开机进入配对模式", CFG_TYPE_BOOL>
  1272. cfg_uint8 BT_Not_Discoverable_When_Connected = NO; // <"蓝牙已连接后关闭可见性", CFG_TYPE_BOOL>
  1273. };
  1274. class CFG_TWS_Pair // <"TWS 组对连接", CFG_CATEGORY_BLUETOOTH>
  1275. {
  1276. cfg_uint8 TWS_Pair_Key_Mode = TWS_PAIR_KEY_MODE_ONE; // <"按键组对模式", CFG_TYPE_TWS_PAIR_KEY_MODE>
  1277. cfg_uint8 Match_Mode = TWS_MATCH_NAME; // <"匹配模式", CFG_TYPE_TWS_MATCH_MODE>
  1278. cfg_uint8 Match_Name_Length = 30; // <"名称匹配长度", 1 ~ 30>
  1279. cfg_uint16 TWS_Wait_Pair_Search_Time_Sec = 60; // <"等待组对搜索时间 (秒)", 5 ~ 600>
  1280. cfg_uint8 TWS_Power_On_Auto_Pair_Search = NO; // <"未组对过时开机自动进行组对搜索", CFG_TYPE_BOOL>
  1281. };
  1282. class CFG_TWS_Advanced_Pair // <"TWS 高级组对设置", CFG_CATEGORY_BLUETOOTH>
  1283. {
  1284. cfg_uint8 Enable_TWS_Advanced_Pair_Mode = YES; // <"启用 TWS 高级组对模式", CFG_TYPE_BOOL>
  1285. cfg_uint8 Check_RSSI_When_TWS_Pair_Search = NO; // <"组对搜索时判断信号强度", CFG_TYPE_BOOL>
  1286. cfg_int8 RSSI_Threshold = 0; // <"信号强度阈值", -120 ~ 0>
  1287. cfg_uint8 Use_Search_Mode_When_TWS_Reconnect = YES; // <"TWS 回连时使用搜索模式", CFG_TYPE_BOOL>
  1288. } ;
  1289. class CFG_TWS_Sync // <"TWS 同步设置", CFG_CATEGORY_BLUETOOTH>
  1290. {
  1291. cfg_uint8 Sync_Mode =
  1292. (
  1293. TWS_SYNC_KEY_TONE
  1294. // TWS_SYNC_POWER_OFF
  1295. ); // <"同步模式", CFG_TYPE_TWS_SYNC_MODE, multi_select>
  1296. };
  1297. class CFG_BT_Auto_Reconnect // <"蓝牙自动回连", CFG_CATEGORY_BLUETOOTH>
  1298. {
  1299. cfg_uint8 Enable_Auto_Reconnect =
  1300. (
  1301. AUTO_RECONNECT_PHONE_BY_STARTUP |
  1302. AUTO_RECONNECT_PHONE_BY_TIMEOUT
  1303. ); // <"启用自动回连", CFG_TYPE_BT_AUTO_RECONNECT, multi_select>
  1304. cfg_uint16 Reconnect_Phone_Timeout = 5.0f * 10; // <"单次连接手机设备超时 (秒)", 0.5 ~ 10.0, float_x10>
  1305. cfg_uint16 Reconnect_Phone_Interval = 5.0f * 10; // <"重试回连手机设备间隔时间 (秒)", 0.1 ~ 60.0, float_x10>
  1306. cfg_uint8 Reconnect_Phone_Times_By_Startup = 10; // <"开机回连手机设备尝试次数", 0 ~ 100, /* 设置为 0 时不限次数 */>
  1307. cfg_uint16 Reconnect_TWS_Timeout = 5.0f * 10; // <"单次连接 TWS 设备超时 (秒)", 0.5 ~ 10.0, float_x10>
  1308. cfg_uint16 Reconnect_TWS_Interval = 5.0f * 10; // <"重试回连 TWS 设备间隔时间 (秒)", 0.1 ~ 60.0, float_x10>
  1309. cfg_uint8 Reconnect_TWS_Times_By_Startup = 5; // <"开机回连 TWS 设备尝试次数", 0 ~ 100, /* 设置为 0 时不限次数 */>
  1310. cfg_uint8 Reconnect_Times_By_Timeout = 30; // <"超时断开回连尝试次数", 0 ~ 100, /* 设置为 0 时不限次数 */>
  1311. cfg_uint8 Enter_Pair_Mode_When_Startup_Reconnect_Fail = NO; // <"开机回连失败时进入配对模式", CFG_TYPE_BOOL>
  1312. };
  1313. class CFG_BT_HID_Settings // <"HID 设置", CFG_CATEGORY_BLUETOOTH, dev_mode>
  1314. {
  1315. cfg_uint16 HID_Auto_Disconnect_Delay_Sec = 30; // <"HID 操作后自动断开延迟时间 (秒)", 0 ~ 600, /* 设置为 0 时不自动断开 */>
  1316. cfg_uint16 HID_Connect_Operation_Delay_Ms = 1000; // <"HID 连接时操作延迟时间 (毫秒)", 100 ~ 2000>
  1317. cfg_uint8 HID_Custom_Key_Type = BT_HID_KEY_TYPE_KEYBOARD; // <"HID 自定义按键类型", CFG_TYPE_BT_HID_KEY_TYPE>
  1318. cfg_uint8 HID_Custom_Key_Value = 0x00; // <"HID 自定义按键值", hex>
  1319. };
  1320. class CFG_Low_Latency_Settings // <"低延迟模式设置", CFG_CATEGORY_AUDIO>
  1321. {
  1322. cfg_uint8 Default_Low_Latency_Mode = NO; // <"默认低延迟模式", CFG_TYPE_BOOL>
  1323. cfg_uint8 Save_Low_Latency_Mode = NO; // <"保存低延迟模式", CFG_TYPE_BOOL, /* 不保存时重新开机恢复默认模式 */>
  1324. cfg_uint16 AAC_Threshold = 0; // <"AAC 格式播放延迟时间 ms", 0 ~ 150, /* 0 表示默认值 60, 非0时不能小于50 */>
  1325. cfg_uint16 SBC_Threshold = 0; // <"SBC 格式播放延迟时间 ms", 0 ~ 150, /* 0 表示默认值 60, 非0时不能小于40 */>
  1326. cfg_uint16 MSBC_Threshold = 0; // <"MSBC 格式播放延迟时间 ms", 0 ~ 150, /* 0 表示默认值 60, 非0时不能小于30 */>
  1327. cfg_uint16 CVSD_Threshold = 0; // <"CVSD 格式播放延迟时间 ms", 0 ~ 150, /* 0 表示默认值 60, 非0时不能小于30 */>
  1328. };
  1329. class CFG_Transparency_Mode_Settings // <"通透模式设置", CFG_CATEGORY_AUDIO>
  1330. {
  1331. cfg_uint8 Tranparency_En = NO; // <"是否使能通透模式", CFG_TYPE_BOOL>
  1332. cfg_uint8 Mic_Channel = MIC_CHANNEL_LEFT; // <"MIC通道", CFG_TYPE_MIC_CHANNEL_SELECT>
  1333. cfg_int16 Mic_Gain = 0; // <"MIC增益(dB)", -60.0 ~ 0.0, float_x10>
  1334. cfg_uint8 Voice_Sample_Mode = 0; // <"提示音采样率模式", CFG_VOICE_SAMPLE_MODE>
  1335. cfg_uint8 Mic_Sample_Mode = 0; // <"MIC采样率模式", CFG_MIC_SAMPLE_MODE>
  1336. cfg_uint8 Mic_Al_Mode = 0; // <"MIC算法模式">
  1337. };
  1338. class CFG_BTMusic_Multi_Dae_Settings // <"自定义音效使能", CFG_CATEGORY_AUDIO>
  1339. {
  1340. cfg_uint8 Enable = NO; // <"是否打开自定义音效", CFG_TYPE_BOOL, /* 打开后可以在音效调节中自定义蓝牙音乐音效 */>
  1341. cfg_uint8 Cur_Dae_Num = 0; // <"自定义音效数量", readonly, dev_mode>
  1342. cfg_uint8 Dae_Index = 0; // <"当前音效序号", readonly, dev_mode>
  1343. };
  1344. class CFG_BT_Music_Volume_Sync // <"音量同步", CFG_CATEGORY_BT_MUSIC>
  1345. {
  1346. cfg_uint8 Volume_Sync_Only_When_Playing = NO; // <"只在播放状态下同步音量", CFG_TYPE_BOOL>
  1347. cfg_uint8 Origin_Volume_Sync_To_Remote = NO; // <"初始音量同步至远端设备", CFG_TYPE_BOOL, /* (连接时同步) */>
  1348. cfg_uint16 Origin_Volume_Sync_Delay_Ms = 2500; // <"初始音量同步延迟时间 (毫秒)", 2000 ~ 5000>
  1349. cfg_uint16 Playing_Volume_Sync_Delay_Ms = 1000; // <"播放音量同步延迟时间 (毫秒)", 1000 ~ 3000>
  1350. };
  1351. class CFG_BT_Music_Stop_Hold // <"按键停顿时间", CFG_CATEGORY_BT_MUSIC>
  1352. {
  1353. cfg_uint16 Key_Pause_Stop_Hold_Ms = 0; // <"按键暂停时停顿时间 (毫秒)", 0 ~ 5000, /* 暂停后维持停止状态一段时间 (可过滤音乐淡出数据) */>
  1354. cfg_uint16 Key_Prev_Next_Hold_Ms = 0; // <"按键上下曲停顿时间 (毫秒)", 0 ~ 5000>
  1355. };
  1356. class CFG_BT_Two_Device_Play // <"双手机播放控制", CFG_CATEGORY_BT_MUSIC>
  1357. {
  1358. cfg_uint8 Stop_Another_When_One_Playing = NO; // <"开始播放时停止另一手机", CFG_TYPE_BOOL>
  1359. cfg_uint8 Resume_Another_When_One_Stopped = NO; // <"停止播放时恢复另一手机", CFG_TYPE_BOOL>
  1360. cfg_uint16 A2DP_Status_Stopped_Delay_Ms = 1000; // <"停止播放状态延迟时间 (毫秒)", 500 ~ 5000>
  1361. };
  1362. class CFG_BT_Call_Volume_Sync // <"音量同步", CFG_CATEGORY_BT_CALL>
  1363. {
  1364. cfg_uint8 Origin_Volume_Sync_To_Remote = NO; // <"初始音量同步至远端设备", CFG_TYPE_BOOL, /* (开始通话时同步) */>
  1365. cfg_uint16 Origin_Volume_Sync_Delay_Ms = 1500; // <"初始音量同步延迟时间 (毫秒)", 1000 ~ 3000>
  1366. };
  1367. class CFG_Incoming_Call_Prompt // <"来电提示", CFG_CATEGORY_BT_CALL>
  1368. {
  1369. cfg_uint16 Prompt_Interval_Ms = 1500; // <"来电提示间隔时间 (毫秒)", 200 ~ 5000>
  1370. cfg_uint8 Play_Phone_Number = YES; // <"播报来电号码", CFG_TYPE_BOOL>
  1371. cfg_uint8 BT_Call_Ring_Mode = BT_CALL_RING_MODE_DEFAULT; // <"来电铃声模式", CFG_TYPE_BT_CALL_RING_MODE>
  1372. };
  1373. class CFG_Cap_Temp_Comp // <"温度补偿", CFG_CATEGORY_BLUETOOTH, dev_mode>
  1374. {
  1375. cfg_uint8 Enable_Cap_Temp_Comp = NO; // <"启用温度补偿", CFG_TYPE_BOOL>
  1376. CFG_Type_Cap_Temp_Comp Table[CFG_MAX_CAP_TEMP_COMP] =
  1377. {
  1378. { CAP_TEMP_N_20, 0.0f * 10 },
  1379. { CAP_TEMP_0, 0.0f * 10 },
  1380. { CAP_TEMP_P_20, 0.0f * 10 },
  1381. { CAP_TEMP_P_25, 0.0f * 10 },
  1382. { CAP_TEMP_P_40, 0.0f * 10 },
  1383. { CAP_TEMP_P_60, 0.0f * 10 },
  1384. { CAP_TEMP_P_75, 0.0f * 10 },
  1385. { CAP_TEMP_NA, 0.0f * 10 },
  1386. { CAP_TEMP_NA, 0.0f * 10 },
  1387. { CAP_TEMP_NA, 0.0f * 10 },
  1388. { CAP_TEMP_NA, 0.0f * 10 },
  1389. { CAP_TEMP_NA, 0.0f * 10 },
  1390. { CAP_TEMP_NA, 0.0f * 10 },
  1391. { CAP_TEMP_NA, 0.0f * 10 },
  1392. { CAP_TEMP_NA, 0.0f * 10 },
  1393. { CAP_TEMP_NA, 0.0f * 10 },
  1394. { CAP_TEMP_NA, 0.0f * 10 },
  1395. { CAP_TEMP_NA, 0.0f * 10 },
  1396. { CAP_TEMP_NA, 0.0f * 10 },
  1397. { CAP_TEMP_NA, 0.0f * 10 },
  1398. }; // <"温度补偿", CFG_Type_Cap_Temp_Comp>
  1399. };
  1400. class CFG_Linein_Detect // <"Linein 检测", CFG_CATEGORY_LINEIN, hide>
  1401. {
  1402. cfg_uint8 Detect_Mode = LINEIN_DETECT_NONE; // <"检测方式", CFG_TYPE_LINEIN_DETECT_MODE>
  1403. CFG_Type_Linein_Detect_GPIO Detect_GPIO =
  1404. {
  1405. .GPIO_Pin = GPIO_NONE,
  1406. .Pull_Up_Down = CFG_GPIO_PULL_UP,
  1407. .Active_Level = GPIO_LEVEL_LOW,
  1408. }; // <"GPIO 检测 Linein", CFG_Type_Linein_Detect_GPIO, click_popup>
  1409. CFG_Type_Linein_Detect_LRADC Detect_LRADC =
  1410. {
  1411. .LRADC_Ctrl = LRADC_CTRL_NONE,
  1412. .LRADC_Pull_Up = LRADC_PULL_UP_EXTERNAL,
  1413. .ADC_Min = 0x00,
  1414. .ADC_Max = 0x00,
  1415. }; // <"LRADC 检测 Linein", CFG_Type_Linein_Detect_LRADC, click_popup>
  1416. cfg_uint16 Debounce_Time_Ms = 300; // <"去抖时间 (毫秒)", 0 ~ 1000>
  1417. };
  1418. class CFG_BT_Music_DAE // <"蓝牙音乐音效", CFG_CATEGORY_ASET, adjust_online>
  1419. {
  1420. cfg_uint8 Enable_DAE=1; // <"音效使能", CFG_TYPE_BOOL>
  1421. cfg_uint8 Test_Volume=8; // <"测试音量", 0 ~ 16, slide_bar>
  1422. };
  1423. class CFG_BT_Call_Out_DAE // <"蓝牙通话输出音效", CFG_CATEGORY_ASET, adjust_online, asqt>
  1424. {
  1425. cfg_uint8 Enable_DAE=1; // <"音效使能", CFG_TYPE_BOOL>
  1426. cfg_uint8 Test_Volume=8; // <"测试音量", 0 ~ 16, slide_bar>
  1427. };
  1428. class CFG_BT_Call_MIC_DAE // <"蓝牙通话 MIC 音效", CFG_CATEGORY_ASET, adjust_online, asqt>
  1429. {
  1430. cfg_uint8 Enable_DAE=1; // <"音效使能", CFG_TYPE_BOOL>
  1431. cfg_uint8 Test_Volume=8; // <"测试音量", 0 ~ 16, slide_bar>
  1432. };
  1433. class CFG_Linein_Out_DAE // <"Linein 输出音效", CFG_CATEGORY_ASET, adjust_online, hide>
  1434. {
  1435. cfg_uint8 Enable_DAE=1; // <"音效使能", CFG_TYPE_BOOL>
  1436. cfg_uint8 Test_Volume=8; // <"测试音量", 0 ~ 16, slide_bar>
  1437. };
  1438. class CFG_BT_Call_Quality // <"通话效果", CFG_CATEGORY_ASQT, adjust_online, asqt>
  1439. {
  1440. CFG_Type_MIC_Gain MIC_Gain =
  1441. {
  1442. .ADC0_Gain = MIC_GAIN_31_5_DB,
  1443. .ADC1_Gain = MIC_GAIN_31_5_DB,
  1444. .ADC2_Gain = MIC_GAIN_31_5_DB,
  1445. .ADC3_Gain = MIC_GAIN_31_5_DB,
  1446. }; // <"MIC 增益", CFG_Type_MIC_Gain, click_popup>
  1447. cfg_uint8 Test_Volume = 8; // <"测试音量", 0 ~ 15, slide_bar>
  1448. };
  1449. class CFG_Voice_Player_Param // <"播放器参数", CFG_CATEGORY_VOICE, dev_mode>
  1450. {
  1451. cfg_uint32 VP_Develop_Value1 = 0; // <"开发者模式参数 1">
  1452. cfg_uint8 VP_WaitData_Time = 20; // <"数据不增加时持续等待时间">
  1453. cfg_uint8 VP_WaitData_Empty_Time = 0; // <"数据为空时持续等待时间 (0 表示一直等待)">
  1454. cfg_uint8 VP_Max_Decode_Count = 5; // <"最大解码次数">
  1455. cfg_uint16 VP_Max_PCMBUF_Sampels = 768; // <"PCMBUF 持续解码最大门限值">
  1456. cfg_uint16 VP_Het_PCMBUF_Sampels = 256; // <"PCMBUF 半空中断门限值">
  1457. cfg_uint16 VP_Hft_PCMBUF_Sampels = 268; // <"PCMBUF 半满中断门限值">
  1458. cfg_uint8 VP_Work_Frequency = 66; // <"工作频率(包括系统正常工作的频率)">
  1459. cfg_uint8 VP_Module_Frequency = 30; // <"模块频率(此模块所需频率增量)">
  1460. };
  1461. class CFG_Voice_User_Settings // <"播放器设置", CFG_CATEGORY_VOICE, dev_mode>
  1462. {
  1463. cfg_uint16 VP_StartPlay_Threshold = 1; // <"普通模式开始播放门限值 Bytes">
  1464. };
  1465. class CFG_Tone_Player_Param // <"播放器参数", CFG_CATEGORY_TONE, dev_mode>
  1466. {
  1467. cfg_uint32 WT_Develop_Value1 = 0; // <"开发者模式参数 1">
  1468. cfg_uint8 WT_WaitData_Time = 20; // <"数据不增加时持续等待时间">
  1469. cfg_uint8 WT_WaitData_Empty_Time = 0; // <"数据为空时持续等待时间 (0 表示一直等待)">
  1470. cfg_uint8 WT_Max_Decode_Count = 3; // <"最大解码次数">
  1471. cfg_uint16 WT_Max_PCMBUF_Sampels = 500; // <"PCMBUF 持续解码最大门限值">
  1472. cfg_uint16 WT_Het_PCMBUF_Sampels = 256; // <"PCMBUF 半空中断门限值">
  1473. cfg_uint16 WT_Hft_PCMBUF_Sampels = 268; // <"PCMBUF 半满中断门限值">
  1474. cfg_uint8 WT_Work_Frequency = 54; // <"工作频率(包括系统正常工作的频率)">
  1475. cfg_uint8 WT_Module_Frequency = 20; // <"模块频率(此模块所需频率增量)">
  1476. };
  1477. class CFG_Tone_User_Settings // <"播放器设置", CFG_CATEGORY_TONE, dev_mode>
  1478. {
  1479. cfg_uint16 WT_StartPlay_Threshold = 1; // <"普通模式开始播放门限值 Bytes">
  1480. };
  1481. class CFG_Linein_Player_Param // <"播放器参数", CFG_CATEGORY_LINEIN, dev_mode, hide>
  1482. {
  1483. cfg_uint32 LI_Develop_Value1 = 0; // <"开发者模式参数 1">
  1484. cfg_uint8 LI_WaitData_Time = 20; // <"数据不增加时持续等待时间">
  1485. cfg_uint8 LI_WaitData_Empty_Time = 0; // <"数据为空时持续等待时间 (0 表示一直等待)">
  1486. cfg_uint8 LI_Max_Decode_Count = 3; // <"最大解码次数">
  1487. cfg_uint16 LI_Max_PCMBUF_Sampels = 768; // <"PCMBUF 持续解码最大门限值">
  1488. cfg_uint16 LI_Het_PCMBUF_Sampels = 512; // <"PCMBUF 半空中断门限值">
  1489. cfg_uint16 LI_Hft_PCMBUF_Sampels = 528; // <"PCMBUF 半满中断门限值">
  1490. cfg_uint16 LI_StartPlay_Normal = 100; // <"普通模式开始播放门限值 Bytes">
  1491. cfg_uint8 LI_Work_Frequency = 50; // <"工作频率(包括系统正常工作的频率)">
  1492. cfg_uint8 LI_Module_Frequency = 20; // <"模块频率(此模块所需频率增量)">
  1493. };
  1494. class CFG_Linein_User_Settings // <"播放器设置", CFG_CATEGORY_LINEIN, hide>
  1495. {
  1496. cfg_uint8 LI_INOUT_Mode = AUX_ADDA; // <"模式选择", CFG_TYPE_AUXIN_OUT_MODE, /* AA 通路无法调节音量 */>
  1497. cfg_uint16 LI_Fadein_Continue_Time = 500; // <"淡入持续时间 ms">
  1498. cfg_uint16 LI_Fadeout_Continue_Time = 500; // <"淡出持续时间 ms">
  1499. cfg_uint16 LI_Playing_CacheData = 4096; // <"普通模式缓冲区播放数据量 Bytes">
  1500. };
  1501. class CFG_BTMusic_Player_Param // <"播放器参数", CFG_CATEGORY_BT_MUSIC, dev_mode>
  1502. {
  1503. cfg_uint32 BM_Develop_Value1 =
  1504. (
  1505. #if (BOARD_TYPE == BOARD_LARK)
  1506. 6
  1507. #else
  1508. 2
  1509. #endif
  1510. ); // <"开发者模式参数 1">
  1511. cfg_uint8 BM_WaitData_Time = 200; // <"数据不增加时持续等待时间">
  1512. cfg_uint8 BM_WaitData_Empty_Time = 0; // <"数据为空时持续等待时间 (0 表示一直等待)">
  1513. cfg_uint8 BM_Freq_TWS_Increment = 0; // <"TWS 场景频率增量 Mhz">
  1514. cfg_uint8 BM_SBC_Max_Decode_Count = 2; // <"SBC 最大解码次数">
  1515. cfg_uint8 BM_AAC_Max_Decode_Count = 2; // <"AAC 最大解码次数">
  1516. cfg_uint16 BM_SBC_Max_Sleep_Time = 1000; // <"SBC 最大睡眠时间 us">
  1517. cfg_uint16 BM_AAC_Max_Sleep_Time = 1000; // <"AAC 最大睡眠时间 us">
  1518. cfg_uint16 BM_TWS_WPlay_Mintime = 120; // <"TWS 同时播放等待最小时间间隔 ms">
  1519. cfg_uint16 BM_TWS_WPlay_Maxtime = 1000; // <"TWS 同时播放等待最大时间间隔 ms">
  1520. cfg_uint16 BM_TWS_WStop_Mintime = 60; // <"TWS 同时停止等待最小时间间隔 (中断时间) ms">
  1521. cfg_uint16 BM_TWS_WStop_Maxtime = 80; // <"TWS 同时停止等待最大时间间隔 (超时时间) ms">
  1522. cfg_uint16 BM_TWS_Sync_interval = 40; // <"TWS 播放过程中同步时间间隔 pkt">
  1523. cfg_uint16 BM_SBC_Max_PCMBUF_Sampels = 1535; // <"PCMBUF 持续解码最大门限值 (SBC)">
  1524. cfg_uint16 BM_AAC_Max_PCMBUF_Sampels = 1535; // <"PCMBUF 持续解码最大门限值 (AAC)">
  1525. cfg_uint16 BM_Het_PCMBUF_Sampels = 512; // <"PCMBUF 半空中断门限值">
  1526. cfg_uint16 BM_Hft_PCMBUF_Sampels = 528; // <"PCMBUF 半满中断门限值">
  1527. cfg_uint16 BM_StartPlay_Normal = 200; // <"普通模式开始播放延迟时间 ms">
  1528. cfg_uint16 BM_StartPlay_TWS = 1; // <"TWS 模式开始播放延迟时间 ms">
  1529. cfg_uint8 BM_Work_Frequency_AAC = 90; // <"AAC工作频率(包括系统正常工作的频率)">
  1530. cfg_uint8 BM_Module_Frequency_AAC = 50; // <"AAC模块频率(此模块所需频率增量)">
  1531. cfg_uint8 BM_Work_Frequency_SBC = 84; // <"SBC工作频率(包括系统正常工作的频率)">
  1532. cfg_uint8 BM_Module_Frequency_SBC = 44; // <"SBC模块频率(此模块所需频率增量)">
  1533. };
  1534. class CFG_BTMusic_User_Settings // <"播放器设置", CFG_CATEGORY_BT_MUSIC>
  1535. {
  1536. cfg_uint8 BM_DataWidth = 4; // <"音频输出位宽选择", /* 值为 2 表示 16bit 输出, 4 表示24bit 输出 */>
  1537. cfg_uint8 BM_ISpeech_PEQ_Enable = 0; // <"语音识别场景下播歌 PEQ (CPU 不足时不能开启)", dev_mode>
  1538. cfg_uint16 BM_Fadein_Continue_Time = 350; // <"淡入持续时间 ms">
  1539. cfg_uint16 BM_Fadeout_Continue_Time = 100; // <"淡出持续时间 ms">
  1540. cfg_uint16 BM_SBC_Playing_CacheData = 200; // <"SBC 格式播放延迟 ms", 40 ~ 300>
  1541. cfg_uint16 BM_AAC_Playing_CacheData = 200; // <"AAC 格式播放延迟 ms", 50 ~ 300>
  1542. };
  1543. class CFG_BTSpeech_Player_Param // <"播放器参数", CFG_CATEGORY_BT_CALL, dev_mode>
  1544. {
  1545. cfg_uint32 BS_Develop_Value1 =
  1546. (
  1547. #if (BOARD_TYPE == BOARD_LARK)
  1548. 32527
  1549. #else
  1550. 15
  1551. #endif
  1552. ); // <"开发者模式参数 1">
  1553. cfg_uint8 BS_WaitData_Time = 20; // <"数据不增加时持续等待时间">
  1554. cfg_uint8 BS_WaitData_Empty_Time = 0; // <"数据为空时持续等待时间 (0 表示一直等待)">
  1555. cfg_uint8 BS_Max_Decode_Count = 2; // <"最大解码次数">
  1556. cfg_uint16 BS_CVSD_Max_Sleep_Time = 1000; // <"CVSD 最大睡眠时间 us">
  1557. cfg_uint16 BS_MSBC_Max_Sleep_Time = 1000; // <"MSBC 最大睡眠时间 us">
  1558. cfg_uint16 BS_TWS_WPlay_Mintime = 100; // <"TWS 同时播放等待最小时间间隔 (中断时间) ms">
  1559. cfg_uint16 BS_TWS_WPlay_Maxtime = 600; // <"TWS 同时播放等待最大时间间隔 (超时时间) ms">
  1560. cfg_uint16 BS_TWS_WStop_Mintime = 60; // <"TWS 同时停止等待最小时间间隔 (中断时间) ms">
  1561. cfg_uint16 BS_TWS_WStop_Maxtime = 80; // <"TWS 同时停止等待最大时间间隔 (超时时间) ms">
  1562. cfg_uint16 BS_TWS_Sync_interval = 200; // <"TWS 播放过程中同步时间间隔 pkt">
  1563. cfg_uint16 BS_Max_PCMBUF_Sampels_CVSD = 256; // <"CVSD 输出端持续解码最大门限值">
  1564. cfg_uint16 BS_Max_PCMBUF_Sampels_MSBC = 512; // <"MSBC 输出端持续解码最大门限值">
  1565. cfg_uint16 BS_Het_PCMBUF_Sampels = 256; // <"PCMBUF 半空中断门限值">
  1566. cfg_uint16 BS_Hft_PCMBUF_Sampels = 268; // <"PCMBUF 半满中断门限值">
  1567. cfg_uint16 BS_StartPlay_Normal = 80; // <"普通模式开始播放延迟 ms">
  1568. cfg_uint16 BS_StartPlay_TWS = 30; // <"TWS 模式开始播放延迟 ms">
  1569. cfg_uint8 BS_Work_Frequency_MSBC = 102; // <"MSBC工作频率(包括系统正常工作的频率)">
  1570. cfg_uint8 BS_Module_Frequency_MSBC = 60; // <"MSBC模块频率(此模块所需频率增量)">
  1571. cfg_uint8 BS_Work_Frequency_CVSD = 90; // <"MSBC工作频率(包括系统正常工作的频率)">
  1572. cfg_uint8 BS_Module_Frequency_CVSD = 48; // <"MSBC模块频率(此模块所需频率增量)">
  1573. cfg_uint8 BS_Module_Frequency_TMIC = 36; // <"双MIC模块频率(此模块所需频率增量)">
  1574. cfg_uint8 BS_Module_Frequency_PLC = 36; // <"PLC模块频率(此模块所需频率增量)">
  1575. cfg_uint8 BS_MIC_Playing_PKTCNT = 3; // <"播放过程中控制器队列缓存MIC包数 ">
  1576. };
  1577. class CFG_BTSpeech_User_Settings // <"播放器设置", CFG_CATEGORY_BT_CALL>
  1578. {
  1579. cfg_uint8 BS_DataWidth = 4; // <"音频输出位宽选择", /* 值为 2 表示 16bit 输出, 4 表示24bit 输出 */>
  1580. cfg_uint16 BS_Max_Out_Gain = VOLUME_GAIN_40; // <"最大输出幅度", CFG_TYPE_VOLUME_GAIN, asqt>
  1581. cfg_uint16 BS_Fadein_Continue_Time = 200; // <"淡入持续时间 ms">
  1582. cfg_uint16 BS_Fadeout_Continue_Time = 10; // <"淡出持续时间 ms", dev_mode>
  1583. cfg_uint16 BS_CVSD_Playing_CacheData = 80; // <"CVSD 格式播放延迟 ms", 30 ~ 150>
  1584. cfg_uint16 BS_MSBC_Playing_CacheData = 80; // <"MSBC 格式播放延迟 ms", 30 ~ 150>
  1585. };
  1586. class CFG_IGSpeech_Player_Param // <"播放器参数", CFG_CATEGORY_IG_CALL, dev_mode, hide>
  1587. {
  1588. cfg_uint32 IS_Develop_Value1 = 0; // <"开发者模式参数 1">
  1589. cfg_uint8 IS_AEC_Asr_NrLevel = 0; // <"打断唤醒时的 level, 默认为 0 (aec mode 为 1 时才有效)">
  1590. cfg_uint8 IS_AEC_LowSkip_Enable = 1; // <"打断唤醒和正常通话都有效, 默认为 1">
  1591. cfg_uint8 IS_AEC_ShiftProcess = 130; // <"AEC 处理后的数据移位操作">
  1592. cfg_uint8 IS_Work_Frequency = 60; // <"普通场景的工作频率增量, 理论上只有 VAD">
  1593. cfg_uint8 IS_Module_Frequency_VAD = 20; // <"AEC模块频率(此模块所需频率增量)">
  1594. cfg_uint8 IS_Module_Frequency_AEC = 60; // <"AEC模块频率(此模块所需频率增量)">
  1595. cfg_uint8 IS_Module_Frequency_ASR = 30; // <"ASR模块频率(此模块所需频率增量)">
  1596. };
  1597. class CFG_IGSpeech_User_Settings // <"播放器设置", CFG_CATEGORY_IG_CALL, hide>
  1598. {
  1599. CFG_Type_MIC_Gain MIC_Gain =
  1600. {
  1601. .ADC0_Gain = MIC_GAIN_24_0_DB,
  1602. .ADC1_Gain = MIC_GAIN_24_0_DB,
  1603. .ADC2_Gain = MIC_GAIN_24_0_DB,
  1604. .ADC3_Gain = MIC_GAIN_24_0_DB,
  1605. }; // <"MIC 增益", CFG_Type_MIC_Gain, click_popup>
  1606. };
  1607. class CFG_BLE_Manager // <"BLE 管理", CFG_CATEGORY_BLE, fixed_size=128>
  1608. {
  1609. cfg_uint8 BLE_Enable = NO; // <"启用 BLE 功能", CFG_TYPE_BOOL>
  1610. cfg_uint8 Use_Advertising_Mode_2_After_Paired = NO; // <"配对连接过后使用 BLE 广播模式 2", CFG_TYPE_BOOL, /* 配对列表非空且不在配对模式 */>
  1611. cfg_uint8 BLE_Address_Type = CFG_BLE_STATIC_DEVICE_ADDRESS; // <"BLE 地址类型", CFG_TYPE_BLE_ADDR_TYPE>
  1612. cfg_uint8 Advertising_After_Connected = YES; // <"经典蓝牙连接后才进行BLE广播", CFG_TYPE_BOOL>
  1613. };
  1614. class CFG_BLE_Advertising_Mode_1 // <"BLE 广播模式 1", CFG_CATEGORY_BLE>
  1615. {
  1616. cfg_uint16 Advertising_Interval_Ms = 500; // <"广播间隔 (毫秒)", 20 ~ 5000>
  1617. cfg_uint8 Advertising_Type = CFG_ADV_IND; // <"广播类型", CFG_TYPE_BLE_ADV_TYPE>
  1618. cfg_uint8 BLE_Device_Name[29] =
  1619. (
  1620. "ZS302A-Hello"
  1621. ); // <"BLE 设备名称", string>
  1622. cfg_uint8 Manufacturer_Specific_Data[59] = ""; // <"厂商自定义数据", string>
  1623. cfg_uint8 Service_UUIDs_16_Bit[59] = ""; // <"服务 UUIDs (16-Bit)", string>
  1624. cfg_uint8 Service_UUIDs_128_Bit[CFG_MAX_UUID_STR_LEN] = ""; // <"服务 UUIDs (128-Bit)", string>
  1625. };
  1626. class CFG_BLE_Advertising_Mode_2 // <"BLE 广播模式 2", CFG_CATEGORY_BLE>
  1627. {
  1628. cfg_uint16 Advertising_Interval_Ms = 500; // <"广播间隔 (毫秒)", 20 ~ 5000>
  1629. cfg_uint8 Advertising_Type = CFG_ADV_IND; // <"广播类型", CFG_TYPE_BLE_ADV_TYPE>
  1630. cfg_uint8 BLE_Device_Name[29] = ""; // <"BLE 设备名称", string>
  1631. cfg_uint8 Manufacturer_Specific_Data[59] = ""; // <"厂商自定义数据", string>
  1632. cfg_uint8 Service_UUIDs_16_Bit[59] = ""; // <"服务 UUIDs (16-Bit)", string>
  1633. cfg_uint8 Service_UUIDs_128_Bit[CFG_MAX_UUID_STR_LEN] = ""; // <"服务 UUIDs (128-Bit)", string>
  1634. };
  1635. class CFG_BLE_Connection_Param // <"BLE 连接参数", CFG_CATEGORY_BLE>
  1636. {
  1637. cfg_uint16 Interval_Min_Ms = 10; // <"最小间隔 (毫秒)", 8 ~ 1000>
  1638. cfg_uint16 Interval_Max_Ms = 30; // <"最大间隔 (毫秒)", 8 ~ 1000>
  1639. cfg_uint16 Latency = 2; // <"延迟", 0 ~ 100>
  1640. cfg_uint16 Timeout_Ms = 3000; // <"超时 (毫秒)", 500 ~ 10000>
  1641. };
  1642. class CFG_BLE_Pass_Through // <"BLE 数据透传", CFG_CATEGORY_BLE>
  1643. {
  1644. cfg_uint8 Enable_BLE_Pass_Through = NO; // <"启用 BLE 数据透传", CFG_TYPE_BOOL>
  1645. cfg_uint8 Service_UUID[CFG_MAX_UUID_STR_LEN] = "0366"; // <"服务 UUID", string>
  1646. cfg_uint8 TX_RX_UUID[CFG_MAX_UUID_STR_LEN] = "0466"; // <"TX/RX UUID", string>
  1647. cfg_uint16 RX_Buffer_Size = 2048; // <"RX 缓冲区大小", 128 ~ 4096>
  1648. };
  1649. class CFG_BT_Link_Quality // <"链路质量监控", CFG_CATEGORY_BLUETOOTH, dev_mode>
  1650. {
  1651. cfg_uint8 Quality_Pre_Value = 200;
  1652. cfg_uint8 Quality_Diff = 55;
  1653. cfg_uint8 Quality_ESCO_Diff = 20;
  1654. cfg_uint8 Quality_Monitor = 1;
  1655. };
  1656. class CFG_BT_Scan_Params // <"SCAN 参数设置", CFG_CATEGORY_BLUETOOTH, dev_mode>
  1657. {
  1658. CFG_Type_BT_Scan_Params Params[7] =
  1659. {
  1660. { CFG_DEFAULT_INQUIRY_PAGE_SCAN_MODE, 0x12, 0x1000, 0, 0x12, 0x800, 0 },
  1661. { CFG_FAST_PAGE_SCAN_MODE, 0, 0, 0, 0x30, 0x180, 1 },
  1662. { CFG_FAST_PAGE_SCAN_MODE_EX, 0, 0, 0, 0x60, 0x200, 1 },
  1663. { CFG_NORMAL_PAGE_SCAN_MODE, 0, 0, 0, 0x18, 0x380, 1 },
  1664. { CFG_NORMAL_PAGE_SCAN_MODE_S3, 0, 0, 0, 0x12, 0x800, 1 },
  1665. { CFG_NORMAL_PAGE_SCAN_MODE_EX, 0, 0, 0, 0x60, 0x500, 1 },
  1666. { CFG_FAST_INQUIRY_PAGE_SCAN_MODE, 0x60, 0x200, 1, 0x80, 0x480, 1 },
  1667. }; // <"SCAN 参数设置", CFG_Type_BT_Scan_Params>
  1668. };
  1669. class CFG_App_Music // <"本地播放设置", CFG_CATEGORY_APP_MUSIC, fixed_size=128, hide>
  1670. {
  1671. cfg_uint8 Reserved = 0; // <"数据", hex>
  1672. };
  1673. class CFG_Card_Settings // <"存储卡设置", CFG_CATEGORY_CARD, fixed_size=128, hide>
  1674. {
  1675. cfg_uint8 Reserved = 0; // <"数据", hex>
  1676. };
  1677. class CFG_USB_Settings // <"USB 设置", CFG_CATEGORY_USB, fixed_size=128, hide>
  1678. {
  1679. cfg_uint8 Reserved = 0; // <"数据", hex>
  1680. };
  1681. class CFG_Usr_Reserved_Data // <"用户保留配置", CFG_CATEGORY_SYSTEM, fixed_size=255>
  1682. {
  1683. cfg_uint8 String[128] = { 0, }; // <"字符串", string>
  1684. cfg_uint8 Run_Console_Command[127] = { 0, }; // <"执行控制台命令", string>
  1685. };
  1686. class CFG_Sys_Reserved_Data // <"系统更多配置", CFG_CATEGORY_SYSTEM, fixed_size=255, hide>
  1687. {
  1688. cfg_uint8 Reserved = 0; // <"数据", hex>
  1689. };