diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-02-24 15:46:58 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-02-24 15:46:58 +0000 |
commit | cfa48f5987ee00f1ef44959cedc6e5248f2bdfb9 (patch) | |
tree | 66a72828750019b8e6f392ccae8f1b984f3e5469 /LUFA/Drivers/USB/Class/Host | |
parent | 2b4658de2c1012a465035a8015c13762334088ac (diff) | |
download | lufa-cfa48f5987ee00f1ef44959cedc6e5248f2bdfb9.tar.gz lufa-cfa48f5987ee00f1ef44959cedc6e5248f2bdfb9.tar.bz2 lufa-cfa48f5987ee00f1ef44959cedc6e5248f2bdfb9.zip |
Changed all *_SendByte() function prototypes to accept a void pointer for the input buffer (thanks to Simon Küppers) instead of a uint8_t pointer.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c | 20 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h | 6 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDCClassHost.c | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDCClassHost.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/PrinterClassHost.c | 10 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/PrinterClassHost.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImageClassHost.c | 10 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImageClassHost.h | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c index 2c4814914..1ae6fae82 100644 --- a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c @@ -64,13 +64,13 @@ uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) return AOA_ENUMERROR_InvalidConfigDescriptor; - + if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, DCOMP_AOA_Host_NextAndroidAccessoryInterface) != DESCRIPTOR_SEARCH_COMP_Found) { return AOA_ENUMERROR_NoCompatibleInterfaceFound; } - + AOAInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t); while (!(DataINEndpoint) || !(DataOUTEndpoint)) @@ -92,14 +92,14 @@ uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo AOAInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize); AOAInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress; AOAInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK; - + AOAInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize); AOAInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress; AOAInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK; - + if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataINPipe, 1))) return false; - + if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 1))) return false; @@ -162,7 +162,7 @@ void AOA_Host_USBTask(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) { uint8_t ErrorCode; - + uint16_t AccessoryProtocol; if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful) return ErrorCode; @@ -186,7 +186,7 @@ uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterface }; Pipe_SelectPipe(PIPE_CONTROLPIPE); - return USB_Host_SendControlRequest(NULL); + return USB_Host_SendControlRequest(NULL); } static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol) @@ -206,9 +206,9 @@ static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol) static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo, const uint8_t StringIndex) -{ +{ const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex]; - + if (String == NULL) String = ""; @@ -226,7 +226,7 @@ static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAIn } uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo, - const uint8_t* const Buffer, + const void* const Buffer, const uint16_t Length) { if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive)) diff --git a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h index 0ce7ece9b..6a4701e13 100644 --- a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h @@ -87,7 +87,7 @@ { USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */ - + char* PropertyStrings[AOA_STRING_TOTAL_STRINGS]; /**< Android Accessory property strings, sent to identify the accessory when the * Android device is switched into Open Accessory mode. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section @@ -150,7 +150,7 @@ uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo, uint16_t ConfigDescriptorSize, void* ConfigDescriptorData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); - + /** Starts Accessory Mode in the attached Android device. This function will validate the device's Android Open Accessory protocol * version, send the configured property strings, and request a switch to Android Open Accessory mode. * @@ -175,7 +175,7 @@ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo, - const uint8_t* const Buffer, + const void* const Buffer, const uint16_t Length); /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the diff --git a/LUFA/Drivers/USB/Class/Host/CDCClassHost.c b/LUFA/Drivers/USB/Class/Host/CDCClassHost.c index 2bf9943f4..146d5010e 100644 --- a/LUFA/Drivers/USB/Class/Host/CDCClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/CDCClassHost.c @@ -102,18 +102,18 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo CDCInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize); CDCInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress; CDCInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK; - + CDCInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize); CDCInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress; CDCInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK; - + CDCInterfaceInfo->Config.NotificationPipe.Size = le16_to_cpu(NotificationEndpoint->EndpointSize); CDCInterfaceInfo->Config.NotificationPipe.EndpointAddress = NotificationEndpoint->EndpointAddress; CDCInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT; if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataINPipe, 1))) return false; - + if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataOUTPipe, 1))) return false; @@ -277,7 +277,7 @@ uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, } uint8_t CDC_Host_SendData(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, - const uint8_t* const Buffer, + const void* const Buffer, const uint16_t Length) { if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive)) diff --git a/LUFA/Drivers/USB/Class/Host/CDCClassHost.h b/LUFA/Drivers/USB/Class/Host/CDCClassHost.h index 0f20326ab..23d637ae6 100644 --- a/LUFA/Drivers/USB/Class/Host/CDCClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/CDCClassHost.h @@ -198,7 +198,7 @@ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t CDC_Host_SendData(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, - const uint8_t* const Buffer, + const void* const Buffer, const uint16_t Length); /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the @@ -304,7 +304,7 @@ void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream); #endif - + /** CDC class driver event for a control line state change on a CDC host interface. This event fires each time the device notifies * the host of a control line state change (containing the virtual serial control line states, such as DCD) and may be hooked in the * user program by declaring a handler function with the same name and parameters listed here. The new control line states diff --git a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c index f273c3dd9..e04a9b5f7 100644 --- a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c @@ -81,16 +81,16 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI PRNTInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize); PRNTInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress; PRNTInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK; - + PRNTInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize); PRNTInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress; PRNTInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK; - + if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataINPipe, 1))) return false; - + if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataOUTPipe, 1))) - return false; + return false; PRNTInterfaceInfo->State.InterfaceNumber = PrinterInterface->InterfaceNumber; PRNTInterfaceInfo->State.AlternateSetting = PrinterInterface->AlternateSetting; @@ -275,7 +275,7 @@ uint8_t PRNT_Host_SendString(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, } uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, - void* Buffer, + const void* Buffer, const uint16_t Length) { uint8_t ErrorCode; diff --git a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h index 23ec7fdcd..9a7cb0845 100644 --- a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h @@ -200,7 +200,7 @@ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, - void* Buffer, + const void* Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the diff --git a/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c b/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c index 092513190..bcdd1d613 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c @@ -90,24 +90,24 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SIInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize); SIInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress; SIInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK; - + SIInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize); SIInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress; SIInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK; - + SIInterfaceInfo->Config.EventsPipe.Size = le16_to_cpu(EventsEndpoint->EndpointSize); SIInterfaceInfo->Config.EventsPipe.EndpointAddress = EventsEndpoint->EndpointAddress; SIInterfaceInfo->Config.EventsPipe.Type = EP_TYPE_INTERRUPT; if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataINPipe, 1))) return false; - + if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataOUTPipe, 1))) return false; if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.EventsPipe, 1))) return false; - + SIInterfaceInfo->State.InterfaceNumber = StillImageInterface->InterfaceNumber; SIInterfaceInfo->State.IsActive = true; @@ -254,7 +254,7 @@ uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInf } uint8_t SI_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, - void* Buffer, + const void* Buffer, const uint16_t Bytes) { uint8_t ErrorCode; diff --git a/LUFA/Drivers/USB/Class/Host/StillImageClassHost.h b/LUFA/Drivers/USB/Class/Host/StillImageClassHost.h index d0c9902b2..6e68e1305 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImageClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/StillImageClassHost.h @@ -260,7 +260,7 @@ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t SI_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, - void* Buffer, + const void* Buffer, const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data |