Re: Again, gpio(4) error in GPIOREAD
[email protected] (Christos Zoulas) Tue, 4 May 2021 17:49:56 -0000 (UTC)
| Newsgroups | gmane.os.netbsd.documentation |
|---|---|
| Message-ID | <[email protected]> |
In article <20210503085621.6lm47umim4r47nus@delpotro>, Rocky Hotas <[email protected]> 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