Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32 S3 BOX 按键触发回调函数后,怎么实现触发任务的执行 (AEGHB-592) #343

Closed
3 tasks done
huangdiajd opened this issue Mar 19, 2024 · 1 comment
Closed
3 tasks done

Comments

@huangdiajd
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

这是我的按键回调
static void button_single_click_cb(void *arg){
uint32_t gpio_num = (uint32_t) arg;
if(key==false)
{
xEventGroupSetBits(lora_work_handle,lora_work_BIT_0);
// xSemaphoreGive(semp_handle);

    ESP_LOGI(TAG, "BTN%ld:REC START!!!!!!!\n", gpio_num);
    key = true;
//     int datatoque = 1;
//    // xTaskCreatePinnedToCore(LORA_TX_WORK_Task,"LORA_TX_WORK_Task",1024*10,NULL,4,&TX_WORK_handle,1);
//    xQueueSend(quq_handle,&datatoque,portMAX_DELAY);
}

}
我想实现按下按键,执行任务。但是目前我使用设置事件组标志位来处理,发现它是会触发事件组断言。请问,有没有好的方法可以实现回调触发任务的执行吗?

@github-actions github-actions bot changed the title esp32 S3 BOX 按键触发回调函数后,怎么实现触发任务的执行 esp32 S3 BOX 按键触发回调函数后,怎么实现触发任务的执行 (AEGHB-592) Mar 19, 2024
@lijunru-hub
Copy link
Contributor

lijunru-hub commented Mar 20, 2024

看起来这段代码的事件组设置没用问题,请确定事件组在使用前已经被初始化了,如果可以,请贴上你的报错 log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants