Es un backup para las pruebas de firmware y hardware de un ventilador
Dependencies: mbed QEI FastPWM
ventilator.h
- Committer:
- miguelangel_2511
- Date:
- 2020-04-17
- Revision:
- 3:45299e7882b9
- Parent:
- 2:6f618b905d4f
- Child:
- 6:d38287621cca
File content as of revision 3:45299e7882b9:
#ifndef VENTILATOR_H_ #define VENTILATOR_H_ /* File inclusion */ #include "mbed.h" #include "stdint.h" #include "encoder_interface.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 }Main_Screen_State_t; /* Global variable declaration */ extern uint16_t volume_setpoint; extern uint16_t volume_measured; extern uint8_t resp_frequency; extern float inspiration_time; extern float expiration_time; extern uint8_t pressure_measured; extern uint8_t gas_input; extern Main_Screen_State_t main_screen_state; extern uint8_t first_time_in_state; /* Function declaration */ void TFT_Encoder_Interaction(void); /* Inline functions */ static inline void Encoder_Read(){ if(main_screen_state == Main_Screen_Cursor_Enable){ Parameter_Selection_Index_Update(); }else if(main_screen_state == Main_Screen_Volume_Setpoint_Adjust){ Volume_Setpoint_Index_Update(); }else if(main_screen_state == Main_Screen_Resp_Frequency_Adjust){ Resp_Frequency_Index_Update(); }else if(main_screen_state == Main_Screen_I_E_Ratio_Adjust){ I_E_Ratio_Index_Update(); }else{ //Does nothing } } #endif