Add NO_ACTION_ONESHOT config option
This commit is contained in:
		
							parent
							
								
									9a3edb897a
								
							
						
					
					
						commit
						d44290b91b
					
				
					 4 changed files with 82 additions and 42 deletions
				
			
		
							
								
								
									
										21
									
								
								common/action_oneshot.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								common/action_oneshot.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
#include "action_oneshot.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef NO_ACTION_ONESHOT
 | 
			
		||||
oneshot_state_t oneshot_state;
 | 
			
		||||
 | 
			
		||||
void oneshot_start(uint8_t mods)
 | 
			
		||||
{
 | 
			
		||||
    oneshot_state.mods = mods;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void oneshot_cancel(void)
 | 
			
		||||
{
 | 
			
		||||
    oneshot_state.mods = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void oneshot_toggle(void)
 | 
			
		||||
{
 | 
			
		||||
    oneshot_state.disabled = !oneshot_state.disabled;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue