NetBSD-Docs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Again, gpio(4) error in GPIOREAD



In article <20210503085621.6lm47umim4r47nus@delpotro>,
Rocky Hotas  <rockyhotas%firemail.cc@localhost> wrote:
>Hello!
>I would also like to signal again this error, which has not been fixed
>yet.
>
>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 in gpio(4) 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''
>

Fixed, thanks!

christos



Home | Main Index | Thread Index | Old Index