| 904 | } |
| 905 | |
| 906 | static void rt_link_send_timeout(void) |
| 907 | { |
| 908 | LOG_D("send count(%d)", (rt_uint32_t)rt_link_scb->sendtimer.parameter); |
| 909 | if ((rt_uint32_t)rt_link_scb->sendtimer.parameter >= 5) |
| 910 | { |
| 911 | rt_timer_stop(&rt_link_scb->sendtimer); |
| 912 | LOG_W("Send timeout, please check the link status!"); |
| 913 | rt_link_scb->sendtimer.parameter = 0x00; |
| 914 | rt_link_service_send_finish(RT_LINK_ETIMEOUT); |
| 915 | } |
| 916 | else |
| 917 | { |
| 918 | if (rt_slist_next(&rt_link_scb->tx_data_slist)) |
| 919 | { |
| 920 | struct rt_link_frame *frame = rt_container_of(rt_slist_next(&rt_link_scb->tx_data_slist), struct rt_link_frame, slist); |
| 921 | frame->issent = RT_LINK_FRAME_NOSEND; |
| 922 | rt_link_command_frame_send(RT_LINK_SERVICE_RTLINK, |
| 923 | frame->head.sequence, |
| 924 | RT_LINK_HANDSHAKE_FRAME, |
| 925 | rt_link_scb->rx_record.rx_seq); |
| 926 | } |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | static void rt_link_long_recv_timeout(void) |
| 931 | { |
no test coverage detected