Skip to content

Commit

Permalink
Update wiringPi.c
Browse files Browse the repository at this point in the history
Interrupt function "eternal loop" bug fixed.
'lseek' is done before the 'read' in waitForInterrupt function
  • Loading branch information
sanjuruk authored Jul 3, 2019
1 parent a8f0526 commit 87c26e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wiringPi/wiringPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2581,6 +2581,7 @@ int waitForInterrupt (int pin, int mS)
// Do a dummy read to clear the interrupt
// A one character read appars to be enough.

lseek (fd, 0, SEEK_SET) ;
(void)read (fd, &c, 1) ;

return x ;
Expand Down

0 comments on commit 87c26e9

Please sign in to comment.