Helpful functions
This commit is contained in:
		
							parent
							
								
									91cf4b00c5
								
							
						
					
					
						commit
						eb19fb5b57
					
				
					 4 changed files with 69 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -51,3 +51,22 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th
 | 
			
		|||
 | 
			
		||||
The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second.
 | 
			
		||||
In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM.
 | 
			
		||||
 | 
			
		||||
## Backlight Functions
 | 
			
		||||
 | 
			
		||||
|Function  |Description                                               |
 | 
			
		||||
|----------|----------------------------------------------------------|
 | 
			
		||||
|`backlight_toggle()`   |Turn the backlight on or off                 |
 | 
			
		||||
|`backlight_step()`     |Cycle through backlight levels               |
 | 
			
		||||
|`backlight_increase()` |Increase the backlight level                 |
 | 
			
		||||
|`backlight_decrease()` |Decrease the backlight level                 |
 | 
			
		||||
|`backlight_level(x)`   |Sets the backlight level to specified level  |
 | 
			
		||||
|`get_backlight_level()`|Toggle backlight breathing                   |
 | 
			
		||||
 | 
			
		||||
### Backlight Breathing Functions
 | 
			
		||||
 | 
			
		||||
|Function  |Description                                               |
 | 
			
		||||
|----------|----------------------------------------------------------|
 | 
			
		||||
|`breathing_toggle()`  |Turn the backlight breathing on or off        |
 | 
			
		||||
|`breathing_enable()`  |Turns on backlight breathing                  |
 | 
			
		||||
|`breathing_disable()` |Turns off backlight breathing                 |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue