apps/examples/gpio: Align with gpio driver update
This commit is contained in:
parent
3432acf7c4
commit
bd86d9c8b8
@ -249,17 +249,23 @@ int gpio_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (havesigno)
|
if (havesigno)
|
||||||
{
|
{
|
||||||
|
struct sigevent notify;
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
|
|
||||||
|
notify.sigev_notify = SIGEV_SIGNAL;
|
||||||
|
notify.sigev_signo = signo;
|
||||||
|
|
||||||
/* Set up to receive signal */
|
/* Set up to receive signal */
|
||||||
|
|
||||||
ret = ioctl(fd, GPIOC_REGISTER, (unsigned long)signo);
|
ret = ioctl(fd, GPIOC_REGISTER, (unsigned long)¬ify);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
|
||||||
fprintf(stderr, "ERROR: Failed to setup for signal from %s: %d\n",
|
fprintf(stderr, "ERROR: Failed to setup for signal from %s: %d\n",
|
||||||
devpath, errcode);
|
devpath, errcode);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user