mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Fix the serial port code on Windows.
This commit is contained in:
		| @@ -50,7 +50,7 @@ | ||||
|  | ||||
| 		~SerialPortImpl() override | ||||
| 		{ | ||||
| 			CloseHandle(h); | ||||
| 			CloseHandle(_handle); | ||||
| 		} | ||||
|  | ||||
| 	public: | ||||
| @@ -71,6 +71,8 @@ | ||||
| 		ssize_t write(const uint8_t* buffer, size_t len) override | ||||
| 		{ | ||||
| 			DWORD wlen; | ||||
| 			/* Windows gets unhappy if we try to transfer too much... */ | ||||
| 			len = std::min(4096U, len); | ||||
| 			bool r = WriteFile( | ||||
| 					/* hFile= */ _handle, | ||||
| 					/* lpBuffer= */ buffer, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user