Skip to content

Commit

Permalink
Move int fd to gpio::open() function
Browse files Browse the repository at this point in the history
  • Loading branch information
TMRh20 committed Feb 18, 2024
1 parent 155657a commit 2abfebe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utility/SPIDEV/gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ GPIO::~GPIO()
{
}

int fd;

void GPIO::open(int port, int DDR)
{
int fd;
fd = ::open(dev_name, O_RDONLY);
if (fd >= 0) {
close(fd);
Expand Down

0 comments on commit 2abfebe

Please sign in to comment.