61 #if PLATFORM_IS_WINDOWS 66 for (
int i = 0; i < 256; i++)
68 snprintf(comPort,
sizeof(comPort),
"COM%d", i);
69 if (QueryDosDeviceA(comPort, targetPath, 256))
71 ports.push_back(comPort);
int serialPortReadTimeout(serial_port_t *serialPort, unsigned char *buffer, int readCount, int timeoutMilliseconds)
int serialPortOpen(serial_port_t *serialPort, const char *port, int baudRate, int blocking)
int Write(const void *data, int dataLength) OVERRIDE
static void GetComPorts(vector< string > &ports)
bool GetAllFilesInDirectory(const std::string &directory, bool recursive, const std::string ®exPattern, std::vector< std::string > &files)
int serialPortClose(serial_port_t *serialPort)
int serialPortWrite(serial_port_t *serialPort, const unsigned char *buffer, int writeCount)
USBInterfaceDescriptor data
int Read(void *data, int dataLength) OVERRIDE
cISSerialPort(const cISSerialPort ©)
bool Open(const std::string &portName, int baudRate=BAUDRATE_921600, int timeout=0, bool blocking=false)