Adding dynamic USB power support
- Each scan module now has a current change callback which passes the available current as a parameter - No longer attempts to use the max 500 mA immediately, starts with 100 mA then goes to 500 mA after enumeration - If enumeration fails due to bMaxPower of 500 mA, then attempt again at 100 mA (might also be possible to go even lower to 20 mA in certain cases) - Now working with the Apple Ipad (no over-power messages) - Fixed Wake-up behaviour on Apple Ipad (and likely other iOS devices) - More effecient set_feature/clear_feature handling (device handler) - Initial power handling via Interconnect (still needs work to get it more dynamic)
This commit is contained in:
		
							parent
							
								
									e761960aca
								
							
						
					
					
						commit
						46765e85c5
					
				
					 25 changed files with 463 additions and 41 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
/* Copyright (C) 2014-2015 by Jacob Alexander
 | 
			
		||||
/* Copyright (C) 2014-2016 by Jacob Alexander
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
 * of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
| 
						 | 
				
			
			@ -31,10 +31,12 @@
 | 
			
		|||
// ----- Functions -----
 | 
			
		||||
 | 
			
		||||
// Functions to be called by main.c
 | 
			
		||||
void Scan_setup( void );
 | 
			
		||||
uint8_t Scan_loop( void );
 | 
			
		||||
void Scan_setup();
 | 
			
		||||
uint8_t Scan_loop();
 | 
			
		||||
 | 
			
		||||
// Call-backs
 | 
			
		||||
void Scan_finishedWithMacro( uint8_t sentKeys );  // Called by Macro Module
 | 
			
		||||
void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module
 | 
			
		||||
 | 
			
		||||
void Scan_currentChange( unsigned int current ); // Called by Output Module
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue