Add support for multiple sensors to pmw3360 (#15996)
This commit is contained in:
		
							parent
							
								
									9f63bce70b
								
							
						
					
					
						commit
						690dc4bdaf
					
				
					 4 changed files with 136 additions and 97 deletions
				
			
		| 
						 | 
				
			
			@ -52,8 +52,14 @@
 | 
			
		|||
#    define ROTATIONAL_TRANSFORM_ANGLE 0x00
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef PMW3360_CS_PIN
 | 
			
		||||
#    error "No chip select pin defined -- missing PMW3360_CS_PIN"
 | 
			
		||||
// Support single and plural spellings
 | 
			
		||||
#ifndef PMW3360_CS_PINS
 | 
			
		||||
#    ifndef PMW3360_CS_PIN
 | 
			
		||||
#        error "No chip select pin defined -- missing PMW3360_CS_PIN or PMW3360_CS_PINS"
 | 
			
		||||
#    else
 | 
			
		||||
#        define PMW3360_CS_PINS \
 | 
			
		||||
            { PMW3360_CS_PIN }
 | 
			
		||||
#    endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
| 
						 | 
				
			
			@ -66,10 +72,8 @@ typedef struct {
 | 
			
		|||
    int8_t  mdy;
 | 
			
		||||
} report_pmw3360_t;
 | 
			
		||||
 | 
			
		||||
bool     pmw3360_init(void);
 | 
			
		||||
void     pmw3360_upload_firmware(void);
 | 
			
		||||
bool     pmw3360_check_signature(void);
 | 
			
		||||
bool     pmw3360_init(int8_t index);
 | 
			
		||||
uint16_t pmw3360_get_cpi(void);
 | 
			
		||||
void     pmw3360_set_cpi(uint16_t cpi);
 | 
			
		||||
/* Reads and clears the current delta values on the sensor */
 | 
			
		||||
report_pmw3360_t pmw3360_read_burst(void);
 | 
			
		||||
report_pmw3360_t pmw3360_read_burst(int8_t index);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue