MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_link_send_timeout

Function rt_link_send_timeout

components/utilities/rt-link/src/rtlink.c:906–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906static 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
930static void rt_link_long_recv_timeout(void)
931{

Callers 1

rt_link_threadFunction · 0.85

Calls 4

rt_timer_stopFunction · 0.85
rt_slist_nextFunction · 0.85

Tested by

no test coverage detected