FIX: host_get_first_key in vusb/host.c
This commit is contained in:
		
							parent
							
								
									00350c180d
								
							
						
					
					
						commit
						258fd3c368
					
				
					 1 changed files with 10 additions and 7 deletions
				
			
		
							
								
								
									
										17
									
								
								vusb/host.c
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								vusb/host.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -86,14 +86,17 @@ uint8_t host_has_anykey(void)
 | 
			
		|||
    return cnt;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t *host_get_keys(void)
 | 
			
		||||
uint8_t host_get_first_key(void)
 | 
			
		||||
{
 | 
			
		||||
    return keyboard_report->keys;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t host_get_mods(void)
 | 
			
		||||
{
 | 
			
		||||
    return keyboard_report->mods;
 | 
			
		||||
#ifdef USB_NKRO_ENABLE
 | 
			
		||||
    if (keyboard_nkro) {
 | 
			
		||||
        uint8_t i = 0;
 | 
			
		||||
        for (; i < REPORT_KEYS && !keyboard_report->keys[i]; i++)
 | 
			
		||||
            ;
 | 
			
		||||
        return i<<3 | biton(keyboard_report->keys[i]);
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
    return keyboard_report->keys[0];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue