Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
cd57e855
Commit
cd57e855
authored
Oct 29, 2010
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Added new Pipe_GetBusyBanks(), Endpoint_GetBusyBanks() and Endpoint_AbortPendingIN() functions.
parent
b8dfa976
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
LUFA/Drivers/USB/LowLevel/Endpoint.h
+29
-0
29 additions, 0 deletions
LUFA/Drivers/USB/LowLevel/Endpoint.h
LUFA/Drivers/USB/LowLevel/Pipe.h
+13
-0
13 additions, 0 deletions
LUFA/Drivers/USB/LowLevel/Pipe.h
LUFA/ManPages/ChangeLog.txt
+1
-0
1 addition, 0 deletions
LUFA/ManPages/ChangeLog.txt
with
43 additions
and
0 deletions
LUFA/Drivers/USB/LowLevel/Endpoint.h
+
29
−
0
View file @
cd57e855
...
@@ -400,6 +400,35 @@
...
@@ -400,6 +400,35 @@
return
((
UECONX
&
(
1
<<
EPEN
))
?
true
:
false
);
return
((
UECONX
&
(
1
<<
EPEN
))
?
true
:
false
);
}
}
/** Aborts all pending IN transactions on the currently selected endpoint, once the bank
* has been queued for transmission to the host via \ref Endpoint_ClearIN(). This function
* will terminate all queued transactions, resetting the endpoint banks ready for a new
* packet.
*
* \ingroup Group_EndpointPacketManagement
*/
static
inline
void
Endpoint_AbortPendingIN
(
void
)
{
while
(
UESTA0X
&
(
0x03
<<
NBUSYBK
))
{
UEINTX
|=
(
1
<<
RXOUTI
);
while
(
UEINTX
&
(
1
<<
RXOUTI
));
}
}
/** Retrieves the number of busy banks in the currently selected endpoint, which have been queued for
* transmission via the \ref Endpoint_ClearIN() command, or are awaiting acknowledgement via the
* \ref Endpoint_ClearOUT() command.
*
* \ingroup Group_EndpointPacketManagement
*
* \return Total number of busy banks in the selected endpoint.
*/
static
inline
uint8_t
Endpoint_GetBusyBanks
(
void
)
{
return
(
UESTA0X
&
(
0x03
<<
NBUSYBK
));
}
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an IN
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an IN
* direction). This function will return false if an error has occurred in the endpoint, if the endpoint
* direction). This function will return false if an error has occurred in the endpoint, if the endpoint
...
...
This diff is collapsed.
Click to expand it.
LUFA/Drivers/USB/LowLevel/Pipe.h
+
13
−
0
View file @
cd57e855
...
@@ -453,6 +453,19 @@
...
@@ -453,6 +453,19 @@
(
UPSTAX
&
(
PIPE_ERRORFLAG_OVERFLOW
|
PIPE_ERRORFLAG_UNDERFLOW
)));
(
UPSTAX
&
(
PIPE_ERRORFLAG_OVERFLOW
|
PIPE_ERRORFLAG_UNDERFLOW
)));
}
}
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
*
* \ingroup Group_PipePacketManagement
*
* \return Total number of busy banks in the selected pipe.
*/
static
inline
uint8_t
Pipe_GetBusyBanks
(
void
)
{
return
(
UPSTAX
&
(
0x03
<<
NBUSYBK
));
}
/** Determines if the currently selected pipe may be read from (if data is waiting in the pipe
/** Determines if the currently selected pipe may be read from (if data is waiting in the pipe
* bank and the pipe is an IN direction, or if the bank is not yet full if the pipe is an OUT
* bank and the pipe is an IN direction, or if the bank is not yet full if the pipe is an OUT
* direction). This function will return false if an error has occurred in the pipe, or if the pipe
* direction). This function will return false if an error has occurred in the pipe, or if the pipe
...
...
This diff is collapsed.
Click to expand it.
LUFA/ManPages/ChangeLog.txt
+
1
−
0
View file @
cd57e855
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
* - Added new NO_CLASS_DRIVER_AUTOFLUSH compile time option to disable automatic flushing of interfaces when the USB management
* - Added new NO_CLASS_DRIVER_AUTOFLUSH compile time option to disable automatic flushing of interfaces when the USB management
* tasks for each driver is called
* tasks for each driver is called
* - Added standard keyboard HID report scancode defines (thanks to László Monda)
* - Added standard keyboard HID report scancode defines (thanks to László Monda)
* - Added new Pipe_GetBusyBanks(), Endpoint_GetBusyBanks() and Endpoint_AbortPendingIN() functions
*
*
* <b>Changed:</b>
* <b>Changed:</b>
* - Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions
* - Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions
...
...
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