![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Es un backup para las pruebas de firmware y hardware de un ventilador
Dependencies: mbed QEI FastPWM
Diff: ventilator.h
- Revision:
- 0:9d0b9785d3d6
- Child:
- 1:aa5df1878126
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ventilator.h Sat Apr 11 22:53:05 2020 +0000 @@ -0,0 +1,45 @@ + +#ifndef VENTILATOR_H_ +#define VENTILATOR_H_ + +/* File inclusion */ +#include "mbed.h" +#include "stdint.h" + +/* Type definition */ +typedef enum { + Main_Screen_Cursor_Disable = 0, + Main_Screen_Cursor_Enable = 1, + Main_Screen_Volume_Setpoint_Adjust = 2, + Main_Screen_Resp_Frequency_Adjust = 3, + Main_Screen_I_E_Ratio_Adjust = 4 +}state_t; + +/* Global variable declaration */ +extern state_t system_state; +extern uint8_t first_time_in_state; + + +/* Function declaration */ +void TFT_Encoder_Interaction(void); + + + +/* Inline functions */ +static inline void Encoder_Read(){ + + if(system_state == Main_Screen_Cursor_Enable){ + Parameter_Selection_Index_Update(); + }else if(system_state == Main_Screen_Volume_Setpoint_Adjust){ + Volume_Setpoint_Index_Update(); + }else if(system_state == Main_Screen_Resp_Frequency_Adjust){ + Resp_Frequency_Index_Update(); + }else if(system_state == Main_Screen_I_E_Ratio_Adjust){ + I_E_Ratio_Index_Update(); + }else{ + //Does nothing + } +} + + +#endif \ No newline at end of file