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

Function test_callback

components/net/utest/tc_netdev.c:727–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727static void test_callback(struct netdev *netdev, enum netdev_cb_type type)
728{
729 callback_called = RT_TRUE;
730 last_callback_type = type;
731 rt_kprintf("Callback called: type=%d, netdev=%s\n", type, netdev->name);
732
733 /* Track specific callback types */
734 switch (type)
735 {
736 case NETDEV_CB_ADDR_IP:
737 ip_callback_called = RT_TRUE;
738 break;
739 case NETDEV_CB_ADDR_GATEWAY:
740 gw_callback_called = RT_TRUE;
741 break;
742 case NETDEV_CB_STATUS_DHCP_ENABLE:
743 dhcp_callback_called = RT_TRUE;
744 break;
745 default:
746 break;
747 }
748
749 /* Send event to synchronize */
750 if (callback_event)
751 {
752 rt_event_send(callback_event, 1 << type);
753 }
754}
755
756static void empty_callback(struct netdev *netdev, enum netdev_cb_type type)
757{

Callers

nothing calls this directly

Calls 2

rt_kprintfFunction · 0.85
rt_event_sendFunction · 0.85

Tested by

no test coverage detected