Files
Odin/core/sys/windows
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
..
2022-06-16 22:54:59 +03:00
2022-06-07 20:16:32 +03:00
2022-09-14 11:42:19 +03:00
2022-05-12 13:54:40 +01:00
2022-09-14 11:42:19 +03:00
2022-08-28 16:30:55 +10:00
2022-08-15 09:17:10 -04:00
2022-08-12 21:56:55 +02:00
2022-08-12 21:56:55 +02:00
2022-08-12 21:56:54 +02:00
2022-09-10 16:54:34 +04:00
2022-05-12 14:27:46 +01:00