Skip to content

Commit

Permalink
I am just chasing my tail
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlohr committed Apr 22, 2024
1 parent 64866b9 commit 623eda3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples_x035/usbdevice.incomplete/usb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define FUSB_SUPPORTS_SLEEP 0
#define FUSB_HID_INTERFACES 2
#define FUSB_CURSED_TURBO_DMA 1
#define FUSB_HID_NONSTANDARD 1
#define FUSB_HID_USER_REPORTS 1


#include "usb_defines.h"
Expand Down
7 changes: 4 additions & 3 deletions examples_x035/usbdevice.incomplete/usbdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "ch32v003fun.h"
#include <stdio.h>
#include <string.h>
#include "fsusb.h"

uint32_t count;
Expand All @@ -14,7 +15,7 @@ void handle_debug_input( int numbytes, uint8_t * data )
count += numbytes;
}

int HandleHidNonStandardSetup( struct _USBState * ctx, tusb_control_request_t * req )
int HandleHidUserReportSetup( struct _USBState * ctx, tusb_control_request_t * req )
{

/*
Expand Down Expand Up @@ -45,7 +46,7 @@ int HandleHidNonStandardSetup( struct _USBState * ctx, tusb_control_request_t *
return 0;
}

int HandleHidNonStandardDataOut( struct _USBState * ctx, uint8_t * data, int len )
int HandleHidUserReportDataOut( struct _USBState * ctx, uint8_t * data, int len )
{
int i;
for( i = 0; i < len; i++ )
Expand All @@ -57,7 +58,7 @@ int HandleHidNonStandardDataOut( struct _USBState * ctx, uint8_t * data, int len
return 0;
}

void HandleHidNonStandardDataIn( struct _USBState * ctx, uint8_t * data, int len )
void HandleHidUserReportDataIn( struct _USBState * ctx, uint8_t * data, int len )
{
memset( data, 0xcc, len );
}
Expand Down

0 comments on commit 623eda3

Please sign in to comment.