|
@@ -24,7 +24,7 @@ static pthread_t s_button_threadID;
|
|
|
|
|
|
void isr_function(void)
|
|
|
{
|
|
|
- DUER_LOGI("isr_function %d\n",digitalRead(BUTTON_GPIO));
|
|
|
+ DUER_LOGI("isr_function %d\n", digitalRead(BUTTON_GPIO));
|
|
|
return ;
|
|
|
}
|
|
|
|
|
@@ -32,20 +32,18 @@ extern int duer_recorder_test_start(int channel);
|
|
|
|
|
|
static void button_polling_thread()
|
|
|
{
|
|
|
- uint32_t btn_press_time = duer_timestamp();
|
|
|
- uint32_t btn_release_time = duer_timestamp();
|
|
|
- int channel_id=1;
|
|
|
-
|
|
|
while(1)
|
|
|
{
|
|
|
+ DUER_LOGI("aaaa button_polling_thread %d\n", digitalRead(BUTTON_GPIO));
|
|
|
waitForInterrupt(BUTTON_GPIO, -1);
|
|
|
- DUER_LOGI("button_polling_thread %d\n", digitalRead(BUTTON_GPIO));
|
|
|
delay(100);
|
|
|
if(digitalRead(BUTTON_GPIO)==0)
|
|
|
- { duer_dcs_dialog_cancel(); duer_media_tone_play("./resources/16.wav");
|
|
|
- event_record_start();
|
|
|
-
|
|
|
- }
|
|
|
+ {
|
|
|
+ duer_dcs_dialog_cancel();
|
|
|
+ duer_media_tone_play("./resources/16.wav");
|
|
|
+ event_record_start();
|
|
|
+ DUER_LOGI("button_polling_thread %d\n", digitalRead(BUTTON_GPIO));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|