diff options
| author | kutayboz <kutayboz@gmail.com> | 2023-06-06 20:03:51 +0300 |
|---|---|---|
| committer | kutayboz <kutayboz@gmail.com> | 2023-06-06 20:03:51 +0300 |
| commit | e3460fb4598cc1460d6c6c7e48ccebaec6b4b119 (patch) | |
| tree | 88e1a557349f3a42f6b4fb2ef0f1df8a04cc3d94 /src/gpio.c | |
| parent | addad212bbf05f6599fea747ebae945cb16e5d96 (diff) | |
| download | celnetmon-e3460fb4598cc1460d6c6c7e48ccebaec6b4b119.tar.gz | |
Compiler parameters correction and resulting fixes.
Diffstat (limited to 'src/gpio.c')
| -rw-r--r-- | src/gpio.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,6 @@ #include <gpiod.h> #include <stdio.h> +#include <unistd.h> int modemPowerToggle(int pinNum) { struct gpiod_chip *chip; @@ -11,8 +12,7 @@ int modemPowerToggle(int pinNum) { return 1; } - line = gpiod_chip_get_line( - chip, pinNum); // Replace with the desired GPIO pin number + line = gpiod_chip_get_line(chip, pinNum); if (!line) { perror("Error getting GPIO line"); gpiod_chip_close(chip); @@ -54,8 +54,7 @@ int checkPinVal(int pinNum) { return -1; } - line = gpiod_chip_get_line( - chip, pinNum); // Replace with the desired GPIO pin number + line = gpiod_chip_get_line(chip, pinNum); if (!line) { perror("Error getting GPIO line"); gpiod_chip_close(chip); |
