fixed hhkb to comply new API.
This commit is contained in:
		
							parent
							
								
									60052acc0f
								
							
						
					
					
						commit
						d2b9489a5e
					
				
					 8 changed files with 33 additions and 123 deletions
				
			
		
							
								
								
									
										18
									
								
								pjrc/host.c
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								pjrc/host.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include "usb_mouse.h"
 | 
			
		||||
#include "debug.h"
 | 
			
		||||
#include "host.h"
 | 
			
		||||
#include "util.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef USB_NKRO_ENABLE
 | 
			
		||||
| 
						 | 
				
			
			@ -80,14 +81,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