lightshowpi/vendor/github.com/warthog618/gpiod/uapi/ioctl.go

31 lines
644 B
Go
Raw Normal View History

2020-12-03 23:08:46 -05:00
// SPDX-License-Identifier: MIT
//
// Copyright © 2020 Kent Gibson <warthog618@gmail.com>.
// +build linux
package uapi
// ioctl constants defined in ioctl_XXX
func ior(t, nr, size uintptr) ioctl {
return ioctl((iocRead << iocDirShift) |
(size << iocSizeShift) |
(t << iocTypeShift) |
(nr << iocNRShift))
}
func iorw(t, nr, size uintptr) ioctl {
return ioctl(((iocRead | iocWrite) << iocDirShift) |
(size << iocSizeShift) |
(t << iocTypeShift) |
(nr << iocNRShift))
}
func iow(t, nr, size uintptr) ioctl {
return ioctl((iocWrite << iocDirShift) |
(size << iocSizeShift) |
(t << iocTypeShift) |
(nr << iocNRShift))
}