Files
Odin/core/sys
Tetralux 37a2356485 [sys/windows] Add DCB structure, SetCommState, GetCommState
These are the procedures for configuring a serial port.

You simply open the port with CreateFile (os.open), followed by a call to GetCommState,
setting the DCB as desired, followed by a SetCommState call.

The DCB structure uses C bitfields, so a configuration struct is provided along with a helper procedure to make it easier
to initialize in Odin code.
This makes it possible to initialize a DCB structure with one call to the helper:
```
dcb: DCB
windows.init_dcb_with_config(&dcb, {
	BaudRate = 115200,
	ByteSize = 8,
	Parity = .None,
	StopBits = .One,
})
```
(The parity and the stopbits are actually optional in this example, as their zero-values are None and One, respectively.)
2022-09-22 15:14:14 +00:00
..
2021-02-26 14:46:38 +00:00
2022-09-05 19:18:18 +02:00
2022-09-05 18:55:33 +02:00
2022-09-06 13:50:23 +01:00
2022-07-25 17:00:32 +01:00
2022-05-12 14:33:03 +01:00