Define the generic API of a touch device.  
More...
Define the generic API of a touch device. 
- Warning
 - This feature is experimental!
 This API is experimental and in an early state - expect changes! 
- Author
 - Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr 
 
◆ touch_event_cb_t
      
        
          | typedef void(* touch_event_cb_t) (void *arg) | 
        
      
 
Signature of touch event callback triggered from interrupt. 
- Parameters
 - 
  
    | [in] | arg | optional context for the callback  | 
  
   
Definition at line 53 of file touch_dev.h.
 
 
◆ touch_dev_height()
Get the height of the touch device. 
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device | 
  
   
- Returns
 - Height in points 
 
 
 
◆ touch_dev_max_numof()
  
  
      
        
          | static uint8_t touch_dev_max_numof  | 
          ( | 
          const touch_dev_t *  | 
          dev | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Get the maximum number of touches the touch device supports. 
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device | 
  
   
- Returns
 - number of touches 
 
Definition at line 178 of file touch_dev.h.
 
 
◆ touch_dev_reg_add()
Add pointer to a touch device item to the list of touch items. 
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device | 
  
   
- Returns
 - 0 on success 
 
- 
-ENODEV on invalid entry 
 
 
 
◆ touch_dev_reg_find_screen()
Find the touch device that is attached to a given screen. 
- Parameters
 - 
  
    | [in] | screen_id | Identifier (number) of the screen | 
  
   
- Returns
 - pointer to the touch device in the registry 
 
- 
NULL if there's no match 
 
 
 
◆ touch_dev_set_touch_event_callback()
Set and configure the touch event callback. 
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device  | 
    | [in] | cb | The callback function  | 
    | [in] | arg | Context argument  | 
  
   
 
 
◆ touch_dev_touches()
Get the current touches on the touch device. 
If touches is NULL, this function only returns the number of touches.
Touch position coordinates use the top left corner as origin.
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device  | 
    | [out] | touches | The array of touches  | 
    | [in] | len | The touches array len  | 
  
   
- Returns
 - number of touch positions, 0 means no touch 
 
 
 
◆ touch_dev_width()
Get the width of the touch device. 
- Parameters
 - 
  
    | [in] | dev | Pointer to the touch device | 
  
   
- Returns
 - Width in points