You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					17 lines
				
				321 B
			
		
		
			
		
	
	
					17 lines
				
				321 B
			| 
								 
											3 weeks ago
										 
									 | 
							
								#pragma once
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								struct fan_state_t {
							 | 
						||
| 
								 | 
							
								  uint16_t tach_counter;
							 | 
						||
| 
								 | 
							
								  uint16_t rpm;
							 | 
						||
| 
								 | 
							
								  uint8_t power;
							 | 
						||
| 
								 | 
							
								  float error_integral;
							 | 
						||
| 
								 | 
							
								  uint8_t cooldown_counter;
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								extern struct fan_state_t fan_state;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								void fan_set_power(uint8_t percentage);
							 | 
						||
| 
								 | 
							
								void llfan_init(void);
							 | 
						||
| 
								 | 
							
								void fan_init(void);
							 | 
						||
| 
								 | 
							
								// Call this at FAN_TICK_FREQ
							 | 
						||
| 
								 | 
							
								void fan_tick(void);
							 |