Closed xxCabin closed 1 year ago
/描述bug Mac枚举串口失败 `char getSerialPath(char dest, io_object_t &serialPort) { CFTypeRef calloutCFString;
calloutCFString = IORegistryEntryCreateCFProperty(serialPort, CFSTR(kIOCalloutDeviceKey), kCFAllocatorDefault, 0); if (calloutCFString) { // sizeof(dest) = 8bytes, can not copy all bytes // CFStringGetCString(static_cast<CFStringRef>(calloutCFString), dest, sizeof(dest), kCFStringEncodingUTF8); CFStringGetCString(static_cast<CFStringRef>(calloutCFString), dest, MAXPATHLEN, kCFStringEncodingUTF8); CFRelease(calloutCFString); } return dest;
}`
重现步骤 mac下,调用getPortInfoList 预期行为 无 截图
运行环境信息:
其他内容 无
感谢反馈,可以加群交流
/描述bug Mac枚举串口失败 `char getSerialPath(char dest, io_object_t &serialPort) { CFTypeRef calloutCFString;
}`
重现步骤 mac下,调用getPortInfoList 预期行为 无 截图
运行环境信息:
其他内容 无