@@ -141,36 +141,38 @@ void do_bpp_bgnd() {
141
141
void app_main (void ) {
142
142
badge_base_init ();
143
143
144
- uint8_t magic = esp_rtcmem_read (0 );
145
- uint8_t inv_magic = esp_rtcmem_read (1 );
146
-
147
- // //Grab level of int pin of touchpad. If high, this was a
148
- // //scheduled wakeup because of a deep sleep timeout. If low,
149
- // //the user used the touchpad.
150
- // //yes, this is v1 specific. Please add v0.x support yourself.
151
- // gpio_config_t io_conf = {
152
- // .mode = GPIO_MODE_INPUT,
153
- // .pin_bit_mask = 1LL << PIN_NUM_MPR121_INT,
154
- // .pull_down_en = 0,
155
- // .pull_up_en = 1,
156
- // };
157
- // gpio_config(&io_conf);
158
- // if (gpio_get_level(PIN_NUM_MPR121_INT)==1) {
159
- // printf("Touch int is high. Starting bpp.\n");
160
- // do_bpp_bgnd();
161
- // }
162
-
163
- if (magic == (uint8_t )~inv_magic ) {
164
- printf ("Magic checked out!\n" );
165
- switch (magic ) {
166
- case 1 :
167
- printf ("Starting OTA\n" );
168
- sha2017_ota_update ();
169
- }
170
- } else {
171
- xTaskCreateStaticPinnedToCore (mp_task , "mp_task" , MP_TASK_STACK_LEN , NULL , MP_TASK_PRIORITY ,
172
- & mp_task_stack [0 ], & mp_task_tcb , 0 );
173
- }
144
+ uint8_t magic = esp_rtcmem_read (0 );
145
+ uint8_t inv_magic = esp_rtcmem_read (1 );
146
+
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
+ }
164
+
165
+ if (magic == (uint8_t )~inv_magic ) {
166
+ printf ("Magic checked out!\n" );
167
+ switch (magic ) {
168
+ case 1 :
169
+ printf ("Starting OTA\n" );
170
+ sha2017_ota_update ();
171
+ }
172
+ } else {
173
+ xTaskCreateStaticPinnedToCore (mp_task , "mp_task" , MP_TASK_STACK_LEN , NULL , MP_TASK_PRIORITY ,
174
+ & mp_task_stack [0 ], & mp_task_tcb , 0 );
175
+ }
174
176
}
175
177
176
178
void nlr_jump_fail (void * val ) {
0 commit comments