Remove power button bind

This commit is contained in:
Steven Tracey 2024-11-27 21:31:52 -05:00
parent 8375e3c617
commit c6ce7d766c
2 changed files with 6 additions and 5 deletions

View File

@ -42,9 +42,10 @@ Executable will be in the "c" directory
If moving to an alternate directory, ensure the c/libs/libgo_p2fa.so is copied.<br><br>
To enable the i2c device, add the following to the bottom of /boot/firmware/config.txt<br>
```text
dtoverlay=i2c-rtc,ds3231
dtoverlay=i2c-rtc,ds3231,gpio-shutdown,gpio_pin=20,active_low=1,gpio_pull=up
```
Reference [this walk through](https://pimylifeup.com/raspberry-pi-rtc/) for more info
Reference [this walk through](https://pimylifeup.com/raspberry-pi-rtc/) for more info<br>
Reference [this walk through](https://howchoo.com/pi/how-to-add-a-power-button-to-your-raspberry-pi/) to configure the power button. Make sure to use GPIO pin 20 instead of 3
Set GPIO pins
```bash

View File

@ -25,7 +25,7 @@
#define BUTTON_SELECT 27
#define BUTTON_ALT 22
#define BUTTON_BACK 6
#define BUTTON_POWER 20
//#define BUTTON_POWER 20
typedef struct {
int gpio_pin;
@ -40,10 +40,10 @@ ButtonMap button_map[] = {
{BUTTON_SELECT, 's'},
{BUTTON_ALT, 'a'},
{BUTTON_BACK, 'b'},
{BUTTON_POWER, 'p'},
// {BUTTON_POWER, 'p'},
};
#define NUM_BUTTONS 8
#define NUM_BUTTONS 7
struct gpiod_chip *chip;
struct gpiod_line *line_pointers[NUM_BUTTONS];