-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPIO V2 API changes #944
GPIO V2 API changes #944
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Click here for the full clang-format patch
diff --git a/utility/SPIDEV/gpio.cpp b/utility/SPIDEV/gpio.cpp
index 6da8d99..792e19b 100644
--- a/utility/SPIDEV/gpio.cpp
+++ b/utility/SPIDEV/gpio.cpp
@@ -80 +80 @@ void GPIO::write(int port, int value)
- memset(&rq, 0, sizeof(rq)); // This is needed to set to default values apparently
+ memset(&rq, 0, sizeof(rq)); // This is needed to set to default values apparently
@@ -82 +82 @@ void GPIO::write(int port, int value)
-
+
@@ -92 +92 @@ void GPIO::write(int port, int value)
-
+
@@ -99 +99 @@ void GPIO::write(int port, int value)
-
+
@@ -102 +102 @@ void GPIO::write(int port, int value)
-
+
Have any feedback or feature suggestions? Share it here.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Click here for the full clang-format patch
diff --git a/utility/SPIDEV/gpio.cpp b/utility/SPIDEV/gpio.cpp
index 471144b..6bb6e54 100644
--- a/utility/SPIDEV/gpio.cpp
+++ b/utility/SPIDEV/gpio.cpp
@@ -80 +80 @@ void GPIO::write(int port, int value)
- memset(&rq, 0, sizeof(rq)); // This is needed to set to default values apparently
+ memset(&rq, 0, sizeof(rq)); // This is needed to set to default values apparently
@@ -82 +82 @@ void GPIO::write(int port, int value)
-
+
@@ -92 +92 @@ void GPIO::write(int port, int value)
-
+
@@ -99 +99 @@ void GPIO::write(int port, int value)
-
+
Have any feedback or feature suggestions? Share it here.
This one can wait a little bit for testing etc, but it seems to work fine, only some minor changes to the v1 API code |
Oh I see you already did a better job of this in another branch @2bndy5 ... LOL |
Yes but it doesn't work. The request type and/or struct passed to |
Did you get it working with the |
ok, well I took some pointers from this branch and got mine working. But I really think we should cache the FD for both chip and used gpio lines. My RPi4 runs slightly slower with the new GPIO changes
compared to to my RPi3 using v1.4.8 (without new gpio changes)
Its worse on my RPi3 using the new GPIO changes
|
Update to v2 API re #942 #943