Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
0137001e
Commit
0137001e
authored
May 03, 2009
by
Dean Camera
Browse files
Fixed naming of OTG.h functions, to make them consistent with the rest of the library API.
parent
01c4bef1
Changes
4
Hide whitespace changes
Inline
Side-by-side
LUFA/ChangeLog.txt
View file @
0137001e
...
...
@@ -58,6 +58,7 @@
* - Renamed the USB_PowerOnErrorCodes_t enum to USB_InitErrorCodes_t, renamed the POWERON_ERROR_NoUSBModeSpecified enum value to
* USB_INITERROR_NoUSBModeSpecified
* - Renamed USB_PowerOnFail event to USB_InitFailure
* - Renamed OTG.h header functions to be more consistent with the rest of the library API
* - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)
* - USB_HostRequest renamed to USB_ControlRequest, entire control request header is now read into USB_ControlRequest in Device mode
* rather than having the library pass only partially read header data to the application
...
...
LUFA/Drivers/USB/LowLevel/LowLevel.h
View file @
0137001e
...
...
@@ -283,7 +283,7 @@
/* Enums: */
/** Enum for error codes relating to the powering on of the USB interface. These error codes are
* used in the ErrorCode parameter value of the \ref USB_
PowerOn
Fail event.
* used in the ErrorCode parameter value of the \ref USB_
Init
Fail
ure
event.
*/
enum
USB_InitErrorCodes_t
{
...
...
LUFA/Drivers/USB/LowLevel/OTG.h
View file @
0137001e
...
...
@@ -66,34 +66,34 @@
/** Initiate a Host Negotiation Protocol request. This indicates to the other connected device
* that the device wishes to change device/host roles.
*/
static
inline
void
USB_OTG_D
EV
_Request
_
HNP
(
void
);
static
inline
void
USB_OTG_D
evice
_RequestHNP
(
void
);
/** Cancel a Host Negotiation Protocol request. This stops a pending HNP request to the other
* connected device.
*/
static
inline
void
USB_OTG_D
EV
_Cancel
_
HNP
_
Request
(
void
);
static
inline
void
USB_OTG_D
evice
_CancelHNPRequest
(
void
);
/** Determines if the device is currently sending a HNP to an attached host.
*
* \return Boolean true if currently sending a HNP to the other connected device, false otherwise
*/
static
inline
bool
USB_OTG_D
EV
_IsSendingHNP
(
void
);
static
inline
bool
USB_OTG_D
evice
_IsSendingHNP
(
void
);
/** Accepts a HNP from a connected device, indicating that both devices should exchange
* device/host roles.
*/
static
inline
void
USB_OTG_H
OST
_Accept
_
HNP
(
void
);
static
inline
void
USB_OTG_H
ost
_AcceptHNP
(
void
);
/** Rejects a HNP from a connected device, indicating that both devices should remain in their
* current device/host roles.
*/
static
inline
void
USB_OTG_H
OST
_Reject
_
HNP
(
void
);
static
inline
void
USB_OTG_H
ost
_RejectHNP
(
void
);
/** Indicates if the connected device is not currently sending a HNP request.
*
* \return Boolean true if a HNP is currently being issued by the connected device, false otherwise.
*/
static
inline
bool
USB_OTG_H
OST
_IsHNPReceived
(
void
);
static
inline
bool
USB_OTG_H
ost
_IsHNPReceived
(
void
);
/** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB
* interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in
...
...
@@ -104,22 +104,22 @@
*
* \param SRPTypeMask Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or \ref USB_OTG_STP_DATA.
*/
static
inline
void
USB_OTG_D
EV
_Initiate
_
SRP
(
uint8_t
SRPTypeMask
);
static
inline
void
USB_OTG_D
ev
_InitiateSRP
(
uint8_t
SRPTypeMask
);
#else
#define USB_OTG_D
EV
_Request
_
HNP()
MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
#define USB_OTG_D
evice
_RequestHNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
#define USB_OTG_D
EV
_Cancel
_
HNP
_
Request() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
#define USB_OTG_D
evice
_CancelHNPRequest() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
#define USB_OTG_D
EV
_IsSendingHNP()
((OTGCON & (1 << HNPREQ)) ? true : false)
#define USB_OTG_D
evice
_IsSendingHNP() ((OTGCON & (1 << HNPREQ)) ? true : false)
#define USB_OTG_H
OST
_Accept
_
HNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
#define USB_OTG_H
ost
_AcceptHNP()
MACROS{ OTGCON |= (1 << HNPREQ); }MACROE
#define USB_OTG_H
OST
_Reject
_
HNP() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
#define USB_OTG_H
ost
_RejectHNP()
MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE
#define USB_OTG_H
OST
_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false)
#define USB_OTG_H
ost
_IsHNPReceived()
((OTGCON & (1 << HNPREQ)) ? true : false)
#define USB_OTG_D
EV
_Initiate
_
SRP(type)
MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | (type | (1 << SRPREQ))); }MACROE
#define USB_OTG_D
evice
_InitiateSRP(type) MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | (type | (1 << SRPREQ))); }MACROE
#endif
#endif
...
...
LUFA/MigrationInformation.txt
View file @
0137001e
...
...
@@ -20,6 +20,8 @@
*
* <b>Dual Role Mode</b>
* - The USB_PowerOnFail even has been renamed to USB_InitFailure.
* - The functions in OTG.h have been renamed to remain more consistent with the library API. See the functions in OTG.h for more
* details.
*
* <b>Library Demos</b>
* - Most demos, bootloaders and applications have had significant changes from previous versions. Applications built off of any
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment