示例#1
0
文件: windows.go 项目: jeffallen/g
func setDtrFlags(dcb *win.DCB, on bool) {
	dcb.Flags &^= win.DCBmDtrControl << win.DCBpDtrControl
	if on {
		dcb.Flags |= win.DTR_CONTROL_ENABLE << win.DCBpDtrControl
	} else {
		dcb.Flags |= win.DTR_CONTROL_DISABLE << win.DCBpDtrControl
	}
}
示例#2
0
文件: windows.go 项目: jeffallen/g
func setRtsFlags(dcb *win.DCB, on bool) {
	dcb.Flags &^= win.DCBmRtsControl << win.DCBpRtsControl
	if on {
		dcb.Flags |= win.RTS_CONTROL_ENABLE << win.DCBpRtsControl
	} else {
		dcb.Flags |= win.RTS_CONTROL_DISABLE << win.DCBpRtsControl
	}
}