Skip to content

Commit

Permalink
Forgot one include
Browse files Browse the repository at this point in the history
  • Loading branch information
TMRh20 committed Feb 19, 2024
1 parent 3a27787 commit f4e3caf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utility/SPIDEV/gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <unistd.h> // close()
#include <fcntl.h> // open()
#include <sys/ioctl.h> // ioctl()
#include <string> // memset()

const char* dev_name = "/dev/gpiochip4";

Expand Down Expand Up @@ -99,6 +100,7 @@ void GPIO::write(int port, int value)

data.bits = value;
data.mask = 1;

ret = ioctl(rq.fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &data);
if (ret == -1) {
throw GPIOException("Can't set line value from IOCTL");
Expand Down

0 comments on commit f4e3caf

Please sign in to comment.