Exemple #1
0
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
	}
}
Exemple #2
0
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
	}
}