diff options
Diffstat (limited to 'cmd/sbc_harness/main.c')
-rw-r--r-- | cmd/sbc_harness/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 <libhw/w5500.h> #include <libmisc/hash.h> #include <libusb/usb_common.h> +#include <libdhcp/client.h> #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(); } |