summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sbc_harness/CMakeLists.txt4
-rw-r--r--cmd/sbc_harness/main.c13
-rw-r--r--cmd/srv9p/static9p.c3
3 files changed, 16 insertions, 4 deletions
diff --git a/cmd/sbc_harness/CMakeLists.txt b/cmd/sbc_harness/CMakeLists.txt
index 2018cf7..9a84640 100644
--- a/cmd/sbc_harness/CMakeLists.txt
+++ b/cmd/sbc_harness/CMakeLists.txt
@@ -19,7 +19,7 @@ target_link_libraries(sbc_harness_objs
libmisc
libusb
- #libdhcp
+ libdhcp
libhw
)
pico_enable_stdio_usb(sbc_harness_objs 0)
@@ -27,6 +27,8 @@ pico_enable_stdio_uart(sbc_harness_objs 1)
pico_enable_stdio_semihosting(sbc_harness_objs 0)
pico_enable_stdio_rtt(sbc_harness_objs 0)
+suppress_tinyusb_warnings()
+
# Analyze the stack ############################################################
add_stack_analysis(sbc_harness_stack.c sbc_harness_objs)
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();
}
diff --git a/cmd/srv9p/static9p.c b/cmd/srv9p/static9p.c
index 3632c26..90f3856 100644
--- a/cmd/srv9p/static9p.c
+++ b/cmd/srv9p/static9p.c
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <assert.h>
-
+#include <libmisc/assert.h>
#include <libmisc/vcall.h>
#include "static9p.h"