From 7987bdf22009a6578f91440a0cb5c83a5afd340c Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 4 Nov 2024 12:49:09 -0700 Subject: wip dhcp --- cmd/sbc_harness/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'cmd/sbc_harness/main.c') diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index b9c5330..97751a7 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "usb_keyboard.h" @@ -34,6 +35,15 @@ COROUTINE hello_world_cr(void *_chan) { cr_end(); } +COROUTINE dhcp_cr(void *_chip) { + struct w5500 *chip = _chip; + cr_begin(); + + dhcp_client_main(chip, "harness"); + + cr_end(); +} + int main() { /* initialization *****************************************************/ stdio_uart_init(); @@ -80,8 +90,9 @@ int main() { usb_keyboard_rpc_t keyboard_chan = {0}; coroutine_add(usb_keyboard_cr, &keyboard_chan); //coroutine_add(hello_world_cr, &keyboard_chan); - //coroutine_add(dhcp_client_cr, NULL); + coroutine_add(dhcp_cr, &dev_w5500); /* event loop *********************************************************/ + printf("main\n"); coroutine_main(); } -- cgit v1.2.3-2-g168b