Fixed naming of OTG.h functions, to make them consistent with the rest of the library...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 3 May 2009 14:24:34 +0000 (14:24 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 3 May 2009 14:24:34 +0000 (14:24 +0000)
LUFA/ChangeLog.txt
LUFA/Drivers/USB/LowLevel/LowLevel.h
LUFA/Drivers/USB/LowLevel/OTG.h
LUFA/MigrationInformation.txt

index cfdda0a..19b311c 100644 (file)
@@ -58,6 +58,7 @@
   *  - Renamed the USB_PowerOnErrorCodes_t enum to USB_InitErrorCodes_t, renamed the POWERON_ERROR_NoUSBModeSpecified enum value to\r
   *    USB_INITERROR_NoUSBModeSpecified\r
   *  - Renamed USB_PowerOnFail event to USB_InitFailure\r
   *  - Renamed the USB_PowerOnErrorCodes_t enum to USB_InitErrorCodes_t, renamed the POWERON_ERROR_NoUSBModeSpecified enum value to\r
   *    USB_INITERROR_NoUSBModeSpecified\r
   *  - Renamed USB_PowerOnFail event to USB_InitFailure\r
+  *  - Renamed OTG.h header functions to be more consistent with the rest of the library API\r
   *  - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)\r
   *  - USB_HostRequest renamed to USB_ControlRequest, entire control request header is now read into USB_ControlRequest in Device mode\r
   *    rather than having the library pass only partially read header data to the application\r
   *  - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)\r
   *  - USB_HostRequest renamed to USB_ControlRequest, entire control request header is now read into USB_ControlRequest in Device mode\r
   *    rather than having the library pass only partially read header data to the application\r
index 6cc3b22..ac5cb9e 100644 (file)
 \r
                /* Enums: */\r
                        /** Enum for error codes relating to the powering on of the USB interface. These error codes are\r
 \r
                /* Enums: */\r
                        /** Enum for error codes relating to the powering on of the USB interface. These error codes are\r
-                        *  used in the ErrorCode parameter value of the \ref USB_PowerOnFail event.\r
+                        *  used in the ErrorCode parameter value of the \ref USB_InitFailure event.\r
                         */\r
                        enum USB_InitErrorCodes_t\r
                        {\r
                         */\r
                        enum USB_InitErrorCodes_t\r
                        {\r
index 8defff7..6d8185c 100644 (file)
                                /** Initiate a Host Negotiation Protocol request. This indicates to the other connected device\r
                                 *  that the device wishes to change device/host roles.\r
                                 */\r
                                /** Initiate a Host Negotiation Protocol request. This indicates to the other connected device\r
                                 *  that the device wishes to change device/host roles.\r
                                 */\r
-                               static inline void USB_OTG_DEV_Request_HNP(void);\r
+                               static inline void USB_OTG_Device_RequestHNP(void);\r
                                \r
                                /** Cancel a Host Negotiation Protocol request. This stops a pending HNP request to the other\r
                                 *  connected device.\r
                                 */\r
                                \r
                                /** Cancel a Host Negotiation Protocol request. This stops a pending HNP request to the other\r
                                 *  connected device.\r
                                 */\r
-                               static inline void USB_OTG_DEV_Cancel_HNP_Request(void);\r
+                               static inline void USB_OTG_Device_CancelHNPRequest(void);\r
                                \r
                                /** Determines if the device is currently sending a HNP to an attached host.\r
                                 *\r
                                 *  \return Boolean true if currently sending a HNP to the other connected device, false otherwise\r
                                 */\r
                                \r
                                /** Determines if the device is currently sending a HNP to an attached host.\r
                                 *\r
                                 *  \return Boolean true if currently sending a HNP to the other connected device, false otherwise\r
                                 */\r
-                               static inline bool USB_OTG_DEV_IsSendingHNP(void);\r
+                               static inline bool USB_OTG_Device_IsSendingHNP(void);\r
                                \r
                                /** Accepts a HNP from a connected device, indicating that both devices should exchange\r
                                 *  device/host roles.\r
                                 */\r
                                \r
                                /** Accepts a HNP from a connected device, indicating that both devices should exchange\r
                                 *  device/host roles.\r
                                 */\r
-                               static inline void USB_OTG_HOST_Accept_HNP(void);\r
+                               static inline void USB_OTG_Host_AcceptHNP(void);\r
                                \r
                                /** Rejects a HNP from a connected device, indicating that both devices should remain in their\r
                                 *  current device/host roles.\r
                                 */\r
                                \r
                                /** Rejects a HNP from a connected device, indicating that both devices should remain in their\r
                                 *  current device/host roles.\r
                                 */\r
-                               static inline void USB_OTG_HOST_Reject_HNP(void);\r
+                               static inline void USB_OTG_Host_RejectHNP(void);\r
                                \r
                                /** Indicates if the connected device is not currently sending a HNP request.\r
                                 *\r
                                 *  \return Boolean true if a HNP is currently being issued by the connected device, false otherwise.\r
                                 */\r
                                \r
                                /** Indicates if the connected device is not currently sending a HNP request.\r
                                 *\r
                                 *  \return Boolean true if a HNP is currently being issued by the connected device, false otherwise.\r
                                 */\r
-                               static inline bool USB_OTG_HOST_IsHNPReceived(void);\r
+                               static inline bool USB_OTG_Host_IsHNPReceived(void);\r
                                \r
                                /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB\r
                                 *  interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in\r
                                \r
                                /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB\r
                                 *  interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in\r
                                 *\r
                                 *  \param SRPTypeMask  Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or \ref USB_OTG_STP_DATA.\r
                                 */\r
                                 *\r
                                 *  \param SRPTypeMask  Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or \ref USB_OTG_STP_DATA.\r
                                 */\r
-                               static inline void USB_OTG_DEV_Initiate_SRP(uint8_t SRPTypeMask);\r
+                               static inline void USB_OTG_Dev_InitiateSRP(uint8_t SRPTypeMask);\r
                        #else\r
 \r
                        #else\r
 \r
-                               #define USB_OTG_DEV_Request_HNP()          MACROS{ OTGCON |=  (1 << HNPREQ); }MACROE\r
+                               #define USB_OTG_Device_RequestHNP()         MACROS{ OTGCON |=  (1 << HNPREQ); }MACROE\r
 \r
 \r
-                               #define USB_OTG_DEV_Cancel_HNP_Request()   MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE\r
+                               #define USB_OTG_Device_CancelHNPRequest()   MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE\r
 \r
 \r
-                               #define USB_OTG_DEV_IsSendingHNP()               ((OTGCON &   (1 << HNPREQ)) ? true : false)\r
+                               #define USB_OTG_Device_IsSendingHNP()             ((OTGCON &   (1 << HNPREQ)) ? true : false)\r
                                \r
                                \r
-                               #define USB_OTG_HOST_Accept_HNP()          MACROS{ OTGCON |=  (1 << HNPREQ); }MACROE\r
+                               #define USB_OTG_Host_AcceptHNP()            MACROS{ OTGCON |=  (1 << HNPREQ); }MACROE\r
 \r
 \r
-                               #define USB_OTG_HOST_Reject_HNP()          MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE\r
+                               #define USB_OTG_Host_RejectHNP()            MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE\r
                                \r
                                \r
-                               #define USB_OTG_HOST_IsHNPReceived()             ((OTGCON &   (1 << HNPREQ)) ? true : false)\r
+                               #define USB_OTG_Host_IsHNPReceived()              ((OTGCON &   (1 << HNPREQ)) ? true : false)\r
                                \r
                                \r
-                               #define USB_OTG_DEV_Initiate_SRP(type)     MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | (type | (1 << SRPREQ))); }MACROE\r
+                               #define USB_OTG_Device_InitiateSRP(type)    MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | (type | (1 << SRPREQ))); }MACROE\r
                        #endif\r
        \r
 #endif\r
                        #endif\r
        \r
 #endif\r
index c2c30d3..0e384f9 100644 (file)
@@ -20,6 +20,8 @@
  *\r
  *  <b>Dual Role Mode</b>\r
  *    - The USB_PowerOnFail even has been renamed to USB_InitFailure.\r
  *\r
  *  <b>Dual Role Mode</b>\r
  *    - The USB_PowerOnFail even has been renamed to USB_InitFailure.\r
+ *    - The functions in OTG.h have been renamed to remain more consistent with the library API. See the functions in OTG.h for more\r
+ *      details.\r
  *\r
  *  <b>Library Demos</b>\r
  *    - Most demos, bootloaders and applications have had significant changes from previous versions. Applications built off of any\r
  *\r
  *  <b>Library Demos</b>\r
  *    - Most demos, bootloaders and applications have had significant changes from previous versions. Applications built off of any\r