murphyzhao / FlexibleButton

灵活的按键处理库(Flexible Button)| 按键驱动 | 支持单击、双击、连击、长按、自动消抖 | 灵活适配中断和低功耗 | 按需实现组合按键
Apache License 2.0
673 stars 289 forks source link

[fix]flex_button_scan增加返回值,使得低功耗实现变得方便 #16

Closed wzd5230 closed 4 years ago

wzd5230 commented 4 years ago
  1. fix error return type in flex_button_register

[update]

  1. add return type of flex_button_process.
  2. add return type of flex_button_scan. In low power system,the button task can get the return value when call flex_button_scan.Task stop polling when return 0,otherwise go on polling.In this case,the interrupt of button should be enabled,mcu will be waked up when get interrupt,and polling will restart.

Signed-off-by: wzd5230 772461552@qq.com

murphyzhao commented 4 years ago

That‘s great!