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
61861c54
Commit
61861c54
authored
14 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Added new HID_Host_SetIdlePeriod() function to the HID Host Class driver.
parent
b7759958
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
LUFA/Drivers/USB/Class/Host/HID.c
+16
-0
16 additions, 0 deletions
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/HID.h
+10
-0
10 additions, 0 deletions
LUFA/Drivers/USB/Class/Host/HID.h
LUFA/ManPages/ChangeLog.txt
+1
-0
1 addition, 0 deletions
LUFA/ManPages/ChangeLog.txt
with
27 additions
and
0 deletions
LUFA/Drivers/USB/Class/Host/HID.c
+
16
−
0
View file @
61861c54
...
@@ -357,6 +357,22 @@ uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInf
...
@@ -357,6 +357,22 @@ uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInf
return
HOST_SENDCONTROL_Successful
;
return
HOST_SENDCONTROL_Successful
;
}
}
uint8_t
HID_Host_SetIdlePeriod
(
const
uint16_t
MS
)
{
USB_ControlRequest
=
(
USB_Request_Header_t
)
{
.
bmRequestType
=
(
REQDIR_DEVICETOHOST
|
REQTYPE_STANDARD
|
REQREC_INTERFACE
),
.
bRequest
=
HID_REQ_SetIdle
,
.
wValue
=
((
MS
<<
6
)
&
0xFF00
),
.
wIndex
=
HIDInterfaceInfo
->
State
.
InterfaceNumber
,
.
wLength
=
0
,
};
Pipe_SelectPipe
(
PIPE_CONTROLPIPE
);
return
USB_Host_SendControlRequest
(
HIDReportData
);
}
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
uint8_t
HID_Host_SetReportProtocol
(
USB_ClassInfo_HID_Host_t
*
const
HIDInterfaceInfo
)
uint8_t
HID_Host_SetReportProtocol
(
USB_ClassInfo_HID_Host_t
*
const
HIDInterfaceInfo
)
{
{
...
...
This diff is collapsed.
Click to expand it.
LUFA/Drivers/USB/Class/Host/HID.h
+
10
−
0
View file @
61861c54
...
@@ -251,6 +251,16 @@
...
@@ -251,6 +251,16 @@
*/
*/
uint8_t
HID_Host_SetBootProtocol
(
USB_ClassInfo_HID_Host_t
*
const
HIDInterfaceInfo
)
ATTR_NON_NULL_PTR_ARG
(
1
);
uint8_t
HID_Host_SetBootProtocol
(
USB_ClassInfo_HID_Host_t
*
const
HIDInterfaceInfo
)
ATTR_NON_NULL_PTR_ARG
(
1
);
/** Sets the idle period for the attached HID device to the specified interval. The HID idle period determines the rate
* at which the device should send a report, when no state changes have ocurred; i.e. on HID keyboards, this sets the
* hardware key repeat interval.
*
* \param[in] MS Idle period as a multiple of four milliseconds, zero to disable hardware repeats
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
*/
uint8_t
HID_Host_SetIdlePeriod
(
const
uint16_t
MS
);
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
/** Switches the attached HID device's reporting protocol over to the standard Report protocol mode. This also retrieves
/** Switches the attached HID device's reporting protocol over to the standard Report protocol mode. This also retrieves
* and parses the device's HID report descriptor, so that the size of each report can be determined in advance.
* and parses the device's HID report descriptor, so that the size of each report can be determined in advance.
...
...
This diff is collapsed.
Click to expand it.
LUFA/ManPages/ChangeLog.txt
+
1
−
0
View file @
61861c54
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
* - Added new SPI_GetCurrentMode() function to the SPI peripheral driver
* - Added new SPI_GetCurrentMode() function to the SPI peripheral driver
* - Added board hardware driver support for the EVK1100 board
* - Added board hardware driver support for the EVK1100 board
* - Added board hardware driver support for the EVK1104 board
* - Added board hardware driver support for the EVK1104 board
* - Added new HID_Host_SetIdlePeriod() function to the HID Host Class driver
* - Library Applications:
* - Library Applications:
* - Added RNDIS device mode to the Webserver project
* - Added RNDIS device mode to the Webserver project
* - Added new incomplete AndroidAccessoryHost Host LowLevel demo
* - Added new incomplete AndroidAccessoryHost Host LowLevel demo
...
...
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