NetBSD-Docs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gpio(4), error in GPIOREAD
Hello!
gpio(4), when dealing with GPIOREAD, states:
``Returns the input pin value in the gpio_pin_op structure''
but then it specifies the structure gpio_req.
In src/sys/sys/gpio.h, in the comments to gpio_pin_op, it is considered
as ``(old API)'' and, if just declared in a test C source file, the
compiler generates an error:
error: storage size of 'mytest' isn't known
struct gpio_pin_op mytest;
^~~~~~
Instead, it all works fine when using struct gpio_req, also with
ioctl(2).
So, maybe the above sentence should be updated from
``Returns the input pin value in the gpio_pin_op structure''
to
````Returns the input pin value in the gpio_req structure''
Bye!
Rocky
Home |
Main Index |
Thread Index |
Old Index