| Summary: | typo in man page GPIO(3) | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | waitman |
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> |
| Status: | Closed FIXED | ||
| Severity: | Affects Some People | CC: | brueffer |
| Priority: | --- | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
A commit references this bug: Author: brueffer Date: Wed Jul 1 09:25:23 UTC 2015 New revision: 284997 URL: https://svnweb.freebsd.org/changeset/base/284997 Log: Make the example code actually work. PR: 199440 Submitted by: waitman@waitman.net Reviewed by: loos MFC after: 1 week Changes: head/lib/libgpio/gpio.3 Committed to HEAD, I will merge this to the STABLE branch soon. Thanks for the submission! Turns out no merge necessary, since libgpio is only in HEAD. Thanks again! |
The example reads: #include <err.h> #include <libgpio.h> gpio_handle_t handle; handle = gpio_open(0); if (handle == GPIO_HANDLE_INVALID) err(1, "gpio_open failed"); GPIO_HANDLE_INVALID should be GPIO_INVALID_HANDLE as defined in libgpio.h also, libgpio uses uint32_t but does not #include <sys/types.h> so for the example to build, must have #include <sys/types.h>