Revert to old init order for host driver (#15029)
* Partially revert 14888
This commit is contained in:
		
							parent
							
								
									0ecd4926b2
								
							
						
					
					
						commit
						634e42b2b4
					
				
					 4 changed files with 21 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -19,11 +19,21 @@
 | 
			
		|||
void platform_setup(void);
 | 
			
		||||
 | 
			
		||||
void protocol_setup(void);
 | 
			
		||||
void protocol_init(void);
 | 
			
		||||
void protocol_pre_init(void);
 | 
			
		||||
void protocol_post_init(void);
 | 
			
		||||
void protocol_pre_task(void);
 | 
			
		||||
void protocol_post_task(void);
 | 
			
		||||
 | 
			
		||||
// Bodge as refactoring vusb sucks....
 | 
			
		||||
// Bodge as refactoring this area sucks....
 | 
			
		||||
void protocol_init(void) __attribute__((weak));
 | 
			
		||||
void protocol_init(void) {
 | 
			
		||||
    protocol_pre_init();
 | 
			
		||||
 | 
			
		||||
    keyboard_init();
 | 
			
		||||
 | 
			
		||||
    protocol_post_init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void protocol_task(void) __attribute__((weak));
 | 
			
		||||
void protocol_task(void) {
 | 
			
		||||
    protocol_pre_task();
 | 
			
		||||
| 
						 | 
				
			
			@ -44,7 +54,6 @@ int main(void) {
 | 
			
		|||
    keyboard_setup();
 | 
			
		||||
 | 
			
		||||
    protocol_init();
 | 
			
		||||
    keyboard_init();
 | 
			
		||||
 | 
			
		||||
    /* Main loop */
 | 
			
		||||
    while (true) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue