C代码,接口简单明了,在本机测试通过可以正常读写stm32 串口设备默认是 ttyUSB0 int DemoPro(unsigned char *pdata,int len) { int ret=0; stm32isp.fd=stm32isp.open(); printf("fd:%d\n",stm32isp.fd); while(1){ if(TestLink()!=0) {ret= 1;break;} //握手失败 if(GetVersionAndCmd()!=0) {ret= 2;break;} //获取版本失败 print