Browse Source

add wrapper, si_usb.h, clean up si_usb a little, and use wrapper

main
John-Mark Gurney 2 years ago
parent
commit
3d9d8a3d9c
3 changed files with 10 additions and 4 deletions
  1. +1
    -1
      rs485hid/rs485gw.c
  2. +1
    -3
      si_usb.c
  3. +8
    -0
      si_usb.h

+ 1
- 1
rs485hid/rs485gw.c View File

@@ -24,7 +24,7 @@
* *
*/ */


#include <usbd_cdc_if.h>
#include <si_usb.h>


#include <misc.h> #include <misc.h>




+ 1
- 3
si_usb.c View File

@@ -6,7 +6,6 @@


#include <usb_device.h> #include <usb_device.h>


#if 1
static void static void
usb_cdc_init(const void *foo) usb_cdc_init(const void *foo)
{ {
@@ -24,5 +23,4 @@ USB_LP_IRQHandler(void)
HAL_PCD_IRQHandler(&hpcd_USB_FS); 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);

+ 8
- 0
si_usb.h View File

@@ -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 <usbd_cdc_if.h>


Loading…
Cancel
Save