Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Horn
ch32v003fun
Commits
623eda38
Commit
623eda38
authored
10 months ago
by
cnlohr
Browse files
Options
Downloads
Patches
Plain Diff
I am just chasing my tail
parent
64866b91
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples_x035/usbdevice.incomplete/usb_config.h
+1
-1
1 addition, 1 deletion
examples_x035/usbdevice.incomplete/usb_config.h
examples_x035/usbdevice.incomplete/usbdevice.c
+4
-3
4 additions, 3 deletions
examples_x035/usbdevice.incomplete/usbdevice.c
with
5 additions
and
4 deletions
examples_x035/usbdevice.incomplete/usb_config.h
+
1
−
1
View file @
623eda38
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#define FUSB_SUPPORTS_SLEEP 0
#define FUSB_SUPPORTS_SLEEP 0
#define FUSB_HID_INTERFACES 2
#define FUSB_HID_INTERFACES 2
#define FUSB_CURSED_TURBO_DMA 1
#define FUSB_CURSED_TURBO_DMA 1
#define FUSB_HID_
NONSTANDARD
1
#define FUSB_HID_
USER_REPORTS
1
#include
"usb_defines.h"
#include
"usb_defines.h"
...
...
This diff is collapsed.
Click to expand it.
examples_x035/usbdevice.incomplete/usbdevice.c
+
4
−
3
View file @
623eda38
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include
"ch32v003fun.h"
#include
"ch32v003fun.h"
#include
<stdio.h>
#include
<stdio.h>
#include
<string.h>
#include
"fsusb.h"
#include
"fsusb.h"
uint32_t
count
;
uint32_t
count
;
...
@@ -14,7 +15,7 @@ void handle_debug_input( int numbytes, uint8_t * data )
...
@@ -14,7 +15,7 @@ void handle_debug_input( int numbytes, uint8_t * data )
count
+=
numbytes
;
count
+=
numbytes
;
}
}
int
HandleHid
NonStandard
Setup
(
struct
_USBState
*
ctx
,
tusb_control_request_t
*
req
)
int
HandleHid
UserReport
Setup
(
struct
_USBState
*
ctx
,
tusb_control_request_t
*
req
)
{
{
/*
/*
...
@@ -45,7 +46,7 @@ int HandleHidNonStandardSetup( struct _USBState * ctx, tusb_control_request_t *
...
@@ -45,7 +46,7 @@ int HandleHidNonStandardSetup( struct _USBState * ctx, tusb_control_request_t *
return
0
;
return
0
;
}
}
int
HandleHid
NonStandard
DataOut
(
struct
_USBState
*
ctx
,
uint8_t
*
data
,
int
len
)
int
HandleHid
UserReport
DataOut
(
struct
_USBState
*
ctx
,
uint8_t
*
data
,
int
len
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
...
@@ -57,7 +58,7 @@ int HandleHidNonStandardDataOut( struct _USBState * ctx, uint8_t * data, int len
...
@@ -57,7 +58,7 @@ int HandleHidNonStandardDataOut( struct _USBState * ctx, uint8_t * data, int len
return
0
;
return
0
;
}
}
void
HandleHid
NonStandard
DataIn
(
struct
_USBState
*
ctx
,
uint8_t
*
data
,
int
len
)
void
HandleHid
UserReport
DataIn
(
struct
_USBState
*
ctx
,
uint8_t
*
data
,
int
len
)
{
{
memset
(
data
,
0xcc
,
len
);
memset
(
data
,
0xcc
,
len
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment