| | |
| | | #include "gpio.h" |
| | | #include "system_mem_para.h" |
| | | #include "power_manage.h" |
| | | #include "linked_list.h" |
| | | |
| | | __IO VALVE_CTRL_PARA_T valve_ctrl_para_g; |
| | | |
| | |
| | | |
| | | void ValveMotorCloseRun(void) |
| | | { |
| | | |
| | | //ÅжÏÊÇ·ñÐèÒª½èµç¹Ø·§,ÎÞÍâµç£¬¼îµçµôµç»òÕßÒÆ³ý״̬Ͻèµã |
| | | if(__SYS_STATUS_BYTES_GET(alka_remove) == SET && __SYS_STATUS_BYTES_GET(alka_down) == SET){ |
| | | if(__SYS_STATUS_BYTES_GET(power_state) == RESET){ |
| | | borrow_Pwr_GPIO_Clk_Init(); |
| | | BORROW_PWR_ON; |
| | | delay_ms(1); |
| | | } |
| | | } |
| | | |
| | | Motor_AB_GPIO_Init(); |
| | | Motor_OP_CL_GPIO_Init(); |
| | | Motor_A_LOW; |
| | |
| | | GPIO_EXTI_Init( Motor_CL_PORT, Motor_CL_PIN, EXTI_FALLING, DISABLE); |
| | | Motor_A_LOW; |
| | | Motor_B_LOW; |
| | | |
| | | //½èµç¹Ø±Õ |
| | | borrow_Pwr_GPIO_Clk_Init(); |
| | | BORROW_PWR_OFF; |
| | | } |
| | | |
| | | |
| | |
| | | if(system_status_word_g.status_word.valve_state != VALVE_ERROR){ |
| | | //´¥·¢·§ÃÅÒì³£±¨¾¯ |
| | | if(__SYS_ALARM_REPORT_CTL_BYTES_GET(valve_error) == SET) |
| | | __SYS_ALARM_BYTES_SET(valve_error, SET); |
| | | __SYS_ALARM_BYTES_SET(valve_error, ALARM_ID_VALVE_ABNORMAL); |
| | | |
| | | system_alarm_word_for_valve_g.alarm_word.valve_error = SET; //¹Ø·§±¨¾¯×´Ì¬ÖÃλ |
| | | } |