From 3d9d8a3d9c20f66c85b1d7ff5c31ca67f866e63a Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 5 Feb 2022 15:11:54 -0800 Subject: [PATCH] add wrapper, si_usb.h, clean up si_usb a little, and use wrapper --- rs485hid/rs485gw.c | 2 +- si_usb.c | 4 +--- si_usb.h | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 si_usb.h diff --git a/rs485hid/rs485gw.c b/rs485hid/rs485gw.c index 102c8c4..985b235 100644 --- a/rs485hid/rs485gw.c +++ b/rs485hid/rs485gw.c @@ -24,7 +24,7 @@ * */ -#include +#include #include diff --git a/si_usb.c b/si_usb.c index bf2a231..9d24ea2 100644 --- a/si_usb.c +++ b/si_usb.c @@ -6,7 +6,6 @@ #include -#if 1 static void usb_cdc_init(const void *foo) { @@ -24,5 +23,4 @@ USB_LP_IRQHandler(void) HAL_PCD_IRQHandler(&hpcd_USB_FS); } -SYSINIT(abkdkd, SI_SUB_CONSOLE, SI_ORDER_FIRST, usb_cdc_init, NULL); -#endif +SYSINIT(usb_cdc_init, SI_SUB_CONSOLE, SI_ORDER_FIRST, usb_cdc_init, NULL); diff --git a/si_usb.h b/si_usb.h new file mode 100644 index 0000000..29971d8 --- /dev/null +++ b/si_usb.h @@ -0,0 +1,8 @@ + +/* + * defines FILE *vcp_usb, usb_printf and vcp_status + * + * vcp_status returns if host has set DTR (presence) or not. + */ +#include +