fermentord/vendor/github.com/warthog618/gpiod/uapi/ioctl.go
Søren Rasmussen 07a23c1845
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Upgrade to go 1.20 and add vendor catalog
2023-04-22 10:37:23 +02:00

31 lines
671 B
Go

// SPDX-FileCopyrightText: 2020 Kent Gibson <warthog618@gmail.com>
//
// SPDX-License-Identifier: MIT
//go:build linux
// +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))
}