Pārlūkot izejas kodu

add: pins,限制air8101的26和27脚只能作为uart0使用,不能复用

??? 4 mēneši atpakaļ
vecāks
revīzija
3774ee6242
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      components/pins/src/luat_pins.c

+ 6 - 0
components/pins/src/luat_pins.c

@@ -322,6 +322,12 @@ int luat_pins_setup(uint16_t pin, const char* func_name, size_t name_len, int al
 		return 1;
 	}
 	#endif
+	#ifdef __BK72XX__
+	if (pin == 26 || pin == 27){	// air8101的26/27不支持配置,只能作为uart0调试串口
+		LLOGE("pin%d不支持修改", pin);
+		goto LUAT_PIN_SETUP_DONE;
+	}
+	#endif
 	if (func_name != NULL)
 	{
 		if (name_len < 2)