-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
/* | ||
* https://github.com/mrshu/GPIOlib | ||
* Copyright (c) 2011, Copyright (c) 2011 mr.Shu | ||
* | ||
* Copyright (c) 2024, Copyright (c) 2024 TMRh20 & 2bndy5 | ||
* All rights reserved. | ||
* | ||
* Modified on 24 June 2012, 11:06 AM | ||
* File: gpio.cpp | ||
* Author: purinda ([email protected]) | ||
* | ||
* Patched for filedescriptor catching and error control by L Diaz 2018 | ||
* | ||
*/ | ||
#include <linux/gpio.h> | ||
#include "gpio.h" | ||
|
@@ -72,7 +68,7 @@ int GPIO::Gread(int port) | |
return ret; | ||
} | ||
close(rq.fd); | ||
return ret; | ||
return data.values[0]; | ||
} | ||
return -1; | ||
} | ||
|