#ifndef FANS_H_ #define FANS_H_ #include "includes.h" #define PWM_PERIOD 1000 #define NUM_SENSORS 5 typedef struct { // Pointers to the timer registers that sets the duty cycle for this motor. volatile uint16_t *ccr0, *ccr1; } FanConfig; typedef enum { FAN_VERTICAL, FAN_LEFT, FAN_RIGHT, // on the side of the programmer connection FAN_COUNT } FANS; // Fan configs for all the fans on the BlimpBot. extern FanConfig fans[FAN_COUNT]; // Store current speed of Fan extern int8_t current_speed[3]; /** * Initialize the motor system to standby action. */ void fan_init(); /** * Turn off the fans. */ void fan_stop_all(); /** * Sets a given fan's speed. */ void set_fan(FANS fan_index, int8_t speed); #endif /*FANS_H_*/