This commit is contained in:
2026-03-28 04:50:38 +08:00
parent 28827fe008
commit f40c37c136
4 changed files with 351 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#ifndef CSERIALPORT_SERIALPORTINFO_H
#define CSERIALPORT_SERIALPORTINFO_H
#include <vector>
#include <cstring>
namespace itas109 {
struct SerialPortInfo {
char portName[256];
char description[256];
SerialPortInfo() {
std::memset(portName, 0, sizeof(portName));
std::memset(description, 0, sizeof(description));
}
};
class CSerialPortInfo {
public:
// 枚举系统上所有可用串口
static std::vector<SerialPortInfo> availablePortInfos();
};
} // namespace itas109
#endif // CSERIALPORT_SERIALPORTINFO_H