高级会员 
  
	- 积分
 - 873
 
        - 金钱
 - 873 
 
       - 注册时间
 - 2017-7-5
 
      - 在线时间
 - 130 小时
 
 
 
 | 
 
1金钱 
 本帖最后由 Jochen 于 2021-1-11 11:24 编辑  
 
官方文档给出的接口是 
 
 
- void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); 
 
  复制代码 
触发事件是 
- enum {
 
 -     LV_EVENT_PRESSED,             /**< The object has been pressed*/
 
 -     LV_EVENT_PRESSING,            /**< The object is being pressed (called continuously while pressing)*/
 
 -     LV_EVENT_PRESS_LOST,          /**< User is still pressing but slid cursor/finger off of the object */
 
 -     LV_EVENT_SHORT_CLICKED,       /**< User pressed object for a short period of time, then released it. Not called if dragged. */
 
 -     LV_EVENT_LONG_PRESSED,        /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`.  Not called if dragged.*/
 
 -     LV_EVENT_LONG_PRESSED_REPEAT, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every
 
 -                                        `LV_INDEV_LONG_PRESS_REP_TIME` ms.  Not called if dragged.*/
 
 -     LV_EVENT_CLICKED,             /**< Called on release if not dragged (regardless to long press)*/
 
 -     LV_EVENT_RELEASED,            /**< Called in every cases when the object has been released*/                                    
 
 -     LV_EVENT_DRAG_BEGIN,                  
 
 -     LV_EVENT_DRAG_END,
 
 -     LV_EVENT_DRAG_THROW_BEGIN,
 
 -     LV_EVENT_KEY,
 
 -     LV_EVENT_FOCUSED,
 
 -     LV_EVENT_DEFOCUSED,
 
 -     LV_EVENT_VALUE_CHANGED,                 /**< The object's value has changed (i.e. slider moved) */
 
 -     LV_EVENT_INSERT,
 
 -     LV_EVENT_REFRESH,
 
 -     LV_EVENT_APPLY,  /**< "Ok", "Apply" or similar specific button has clicked*/
 
 -     LV_EVENT_CANCEL, /**< "Close", "Cancel" or similar specific button has clicked*/
 
 -     LV_EVENT_DELETE, /**< Object is being deleted */
 
 - };
 
 - typedef uint8_t lv_event_t; /**< Type of event being sent to the object. */
 
  复制代码 
测试用的LV_EVENT_CLICKED事件, 
 
发现无论触摸哪个位置,包括空白的背景图,都会触发事件,然后蜂鸣器响一声;  
现在想做到只有点击到有效对象(即按钮,文本域,键盘等)时蜂鸣器才响一声,求助有知道怎么弄吗? 
 
 
 
 
 |   
 
 
 
 
 
 |