junhui93/cjhuibutton

1.0.0

Latest
uploaded 15 hours ago
读取按键的长短按

Readme

<!-- 


void buttonCallbackFunc(enum cjhuiButton *ButtonArray,int gpioNum){
  if(ButtonArray[0] == cjhuiShortPress){
    ESP_LOGW(TAG,"ButtonArray[0] == ShortPress");

  }
  if(ButtonArray[1] == cjhuiShortPress){
    ESP_LOGW(TAG,"ButtonArray[1] == ShortPress");

  }
  if(ButtonArray[2] == cjhuiShortPress){
    ESP_LOGW(TAG,"ButtonArray[2] == ShortPress");

  }
  if(ButtonArray[3] == cjhuiShortPress){
    ESP_LOGW(TAG,"ButtonArray[3] == ShortPress");

  }


}


void app_main(void){



  ESP_LOGW(TAG,"app_main");

  gpio_num_t buttonGpio[4] = {46,45,3,0,};
  cjhuiButtonInit(buttonGpio,4,buttonCallbackFunc);

}


 -->

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "junhui93/cjhuibutton^1.0.0"

download archive

Stats

  • Archive size
    Archive size ~ 3.04 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

junhui93/cjhuibutton version: 1.0.0
|