Explorar o código

add: adc添加2常量,标识CPU温度和VBAT电压

Wendal Chen %!s(int64=3) %!d(string=hai) anos
pai
achega
3d8bdba7ca
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      luat/modules/luat_lib_adc.c

+ 5 - 0
luat/modules/luat_lib_adc.c

@@ -128,6 +128,11 @@ static const rotable_Reg_t reg_adc[] =
 	{ "ADC_RANGE_3_6",   ROREG_INT(1)},
 	//@const ADC_RANGE_1_8 number air105的ADC分压电阻关闭,范围0~1.88V
 	{ "ADC_RANGE_1_8",   ROREG_INT(0)},
+
+    //@const CH_CPU number CPU内部温度的通道id
+    { "CH_CPU",          ROREG_INT(10)},
+    //@const CH_VBAT number VBAT供电电压的通道id
+    { "CH_VBAT",         ROREG_INT(11)},
 	{ NULL,              ROREG_INT(0) }
 };