File: types_windows.go

package info (click to toggle)
golang-github-goburrow-serial 0.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 132 kB
  • sloc: makefile: 5
file content (27 lines) | stat: -rw-r--r-- 419 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// +build ignore

package serial

// #include <windows.h>
import "C"

const (
	c_MAXDWORD    = C.MAXDWORD
	c_ONESTOPBIT  = C.ONESTOPBIT
	c_TWOSTOPBITS = C.TWOSTOPBITS
	c_EVENPARITY  = C.EVENPARITY
	c_ODDPARITY   = C.ODDPARITY
	c_NOPARITY    = C.NOPARITY
)

type c_COMMTIMEOUTS C.COMMTIMEOUTS

type c_DCB C.DCB

func toDWORD(val int) C.DWORD {
	return C.DWORD(val)
}

func toBYTE(val int) C.BYTE {
	return C.BYTE(val)
}