Skip to content

Commit fed1915

Browse files
committed
Configurable BPP
1 parent ff39028 commit fed1915

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

esp32/main.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,23 @@ void app_main(void) {
144144
uint8_t magic = esp_rtcmem_read(0);
145145
uint8_t inv_magic = esp_rtcmem_read(1);
146146

147-
if (false) {
148-
//Grab level of int pin of touchpad. If high, this was a
149-
//scheduled wakeup because of a deep sleep timeout. If low,
150-
//the user used the touchpad.
151-
//yes, this is v1 specific. Please add v0.x support yourself.
152-
gpio_config_t io_conf = {
153-
.mode = GPIO_MODE_INPUT,
154-
.pin_bit_mask = 1LL << PIN_NUM_MPR121_INT,
155-
.pull_down_en = 0,
156-
.pull_up_en = 1,
157-
};
158-
gpio_config(&io_conf);
159-
if (gpio_get_level(PIN_NUM_MPR121_INT)==1) {
160-
printf("Touch int is high. Starting bpp.\n");
161-
do_bpp_bgnd();
162-
}
163-
}
147+
#ifdef CONFIG_SHA_BPP_ENABLE
148+
//Grab level of int pin of touchpad. If high, this was a
149+
//scheduled wakeup because of a deep sleep timeout. If low,
150+
//the user used the touchpad.
151+
//yes, this is v1 specific. Please add v0.x support yourself.
152+
gpio_config_t io_conf = {
153+
.mode = GPIO_MODE_INPUT,
154+
.pin_bit_mask = 1LL << PIN_NUM_MPR121_INT,
155+
.pull_down_en = 0,
156+
.pull_up_en = 1,
157+
};
158+
gpio_config(&io_conf);
159+
if (gpio_get_level(PIN_NUM_MPR121_INT)==1) {
160+
printf("Touch int is high. Starting bpp.\n");
161+
do_bpp_bgnd();
162+
}
163+
#endif
164164

165165
if (magic == (uint8_t)~inv_magic) {
166166
printf("Magic checked out!\n");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy