@@ -145,21 +145,17 @@ void app_main(void) {
145
145
uint8_t inv_magic = esp_rtcmem_read (1 );
146
146
147
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
- }
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 );
163
159
#endif
164
160
165
161
if (magic == (uint8_t )~inv_magic ) {
@@ -168,6 +164,15 @@ void app_main(void) {
168
164
case 1 :
169
165
printf ("Starting OTA\n" );
170
166
sha2017_ota_update ();
167
+ break ;
168
+ #ifdef CONFIG_SHA_BPP_ENABLE
169
+ case 2 :
170
+ if (gpio_get_level (PIN_NUM_MPR121_INT )== 1 ) {
171
+ printf ("Touch int is high. Starting bpp.\n" );
172
+ do_bpp_bgnd ();
173
+ }
174
+ break ;
175
+ #endif
171
176
}
172
177
} else {
173
178
xTaskCreateStaticPinnedToCore (mp_task , "mp_task" , MP_TASK_STACK_LEN , NULL , MP_TASK_PRIORITY ,
0 commit comments