Add USB CDC and loop-back test
This commit is contained in:
commit
7234eb8360
34 changed files with 15808 additions and 0 deletions
20
stm32f103c8t6/src/usb_vendor.c
Normal file
20
stm32f103c8t6/src/usb_vendor.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "usb_vendor.h"
|
||||
|
||||
void USBVendor_HandleDeviceSetup(USB_SetupPacket_t *sp,
|
||||
const void **reply_data, int *reply_length, uint8_t *reply_response)
|
||||
{
|
||||
USBVendor_Command_t command = sp->bRequest;
|
||||
|
||||
*reply_data = NULL;
|
||||
*reply_length = 0;
|
||||
|
||||
switch(command)
|
||||
{
|
||||
case USB_VENDOR_COMMAND_NOP:
|
||||
*reply_response = USB_EP_TX_VALID;
|
||||
break;
|
||||
|
||||
default:
|
||||
*reply_response = USB_EP_TX_STALL;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue