| | |
| | | } |
| | | |
| | | |
| | | #define RS485_READ_ERR_ALARM_TIMES 2 //Á¬ÐøRS485_READ_ERR_ALARM_TIMES´Îʧ°Ü±¨¾¯RS485Òì³£ |
| | | #define RS485_READ_ERR_ALARM_TIMES 1 //Á¬ÐøRS485_READ_ERR_ALARM_TIMES´Îʧ°Ü±¨¾¯RS485Òì³£ |
| | | RS485_COM_STATUS_T rs485ComWaitAnswerHandle(void) |
| | | { |
| | | static uint8_t RS485_err_cnt =0 ; //¶Áȡʧ°Ü¼ÆÊý |
| | |
| | | RS485_UART_GPIO_sleep(); |
| | | if(RS485_err_cnt < 250){ |
| | | if( ++RS485_err_cnt >= RS485_READ_ERR_ALARM_TIMES) |
| | | __SYS_STATUS_ALARM_BYTES_SET(RS485_err); |
| | | __SYS_STATUS_ALARM_BYTES_SET(RS485_err,ALARM_ID_READ_485_ABNORMAL); |
| | | } |
| | | |
| | | return RS485_COM_IDLE; |
| | |
| | | rs485_com_ctrl_pata_g.status = RS485_COM_PWR_ON; |
| | | sys_fun_run_ctrl_p->rs485_ctrl_flag.running_flag = SET; |
| | | } |
| | | |
| | | } |
| | | |
| | | switch (rs485_com_ctrl_pata_g.status){ |