Changed all *_SendByte() function prototypes to accept a void pointer for the input...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 24 Feb 2013 15:46:58 +0000 (15:46 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 24 Feb 2013 15:46:58 +0000 (15:46 +0000)
16 files changed:
LUFA/DoxygenPages/ChangeLog.txt
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c
LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h
LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
LUFA/Drivers/USB/Class/Host/CDCClassHost.c
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
LUFA/Drivers/USB/Class/Host/PrinterClassHost.c
LUFA/Drivers/USB/Class/Host/PrinterClassHost.h
LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
LUFA/Drivers/USB/Class/Host/StillImageClassHost.h
Maintenance/makefile

index b9b464d..59d639d 100644 (file)
@@ -27,6 +27,7 @@
   *   - Increased throughput in the USBtoSerial project now that data transmission is non-blocking (thanks to Joseph Lacerte)
   *   - Updated bootloader makefiles to remove dependency on the \c bc command line calculator tool
   *   - Updated AVRISP-MKII Clone Programmer project so that the SCK clock period is saved in EEPROM (thanks to Gerhard Wesser)
   *   - Increased throughput in the USBtoSerial project now that data transmission is non-blocking (thanks to Joseph Lacerte)
   *   - Updated bootloader makefiles to remove dependency on the \c bc command line calculator tool
   *   - Updated AVRISP-MKII Clone Programmer project so that the SCK clock period is saved in EEPROM (thanks to Gerhard Wesser)
+  *   - Changed all *_SendByte() function prototypes to accept a void pointer for the input buffer (thanks to Simon Küppers)
   *
   *  <b>Fixed:</b>
   *  - Core:
   *
   *  <b>Fixed:</b>
   *  - Core:
index 658697a..e77eb90 100644 (file)
@@ -85,11 +85,11 @@ void Serial_SendString(const char* StringPtr)
        }
 }
 
        }
 }
 
-void Serial_SendData(const uint8_t* Buffer,
+void Serial_SendData(const void* Buffer,
                      uint16_t Length)
 {
        while (Length--)
                      uint16_t Length)
 {
        while (Length--)
-         Serial_SendByte(*(Buffer++));
+         Serial_SendByte(*((uint8_t*)Buffer++));
 }
 
 void Serial_CreateStream(FILE* Stream)
 }
 
 void Serial_CreateStream(FILE* Stream)
index 1140ed4..eb56bc7 100644 (file)
  *  \code
  *      // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
  *      Serial_Init(9600, false);
  *  \code
  *      // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
  *      Serial_Init(9600, false);
- *      
+ *
  *      // Send a string through the USART
  *      Serial_SendString("Test String\r\n");
  *
  *      // Send a raw byte through the USART
  *      Serial_SendByte(0xDC);
  *      // Send a string through the USART
  *      Serial_SendString("Test String\r\n");
  *
  *      // Send a raw byte through the USART
  *      Serial_SendByte(0xDC);
- *      
+ *
  *      // Receive a byte through the USART (or -1 if no data received)
  *      int16_t DataByte = Serial_ReceiveByte();
  *  \endcode
  *      // Receive a byte through the USART (or -1 if no data received)
  *      int16_t DataByte = Serial_ReceiveByte();
  *  \endcode
                         *  \param[in] Buffer  Pointer to a buffer containing the data to send.
                         *  \param[in] Length  Length of the data to send, in bytes.
                         */
                         *  \param[in] Buffer  Pointer to a buffer containing the data to send.
                         *  \param[in] Length  Length of the data to send, in bytes.
                         */
-                       void Serial_SendData(const uint8_t* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       void Serial_SendData(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Creates a standard character stream from the USART so that it can be used with all the regular functions
                         *  in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
 
                        /** Creates a standard character stream from the USART so that it can be used with all the regular functions
                         *  in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
                        void Serial_CreateStream(FILE* Stream);
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
                        void Serial_CreateStream(FILE* Stream);
-                       
+
                        /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer.
                         *
                        /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer.
                         *
index 266252d..c7dcd61 100644 (file)
@@ -88,11 +88,11 @@ void Serial_SendString(USART_t* const USART,
 }
 
 void Serial_SendData(USART_t* const USART,
 }
 
 void Serial_SendData(USART_t* const USART,
-                     const uint8_t* Buffer,
+                     const void* Buffer,
                      uint16_t Length)
 {
        while (Length--)
                      uint16_t Length)
 {
        while (Length--)
-         Serial_SendByte(USART, *(Buffer++));
+         Serial_SendByte(USART, *((uint8_t*)Buffer++));
 }
 
 void Serial_CreateStream(FILE* Stream)
 }
 
 void Serial_CreateStream(FILE* Stream)
index 427fd7c..04941b1 100644 (file)
  *  \code
  *      // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
  *      Serial_Init(&USARTD0, 9600, false);
  *  \code
  *      // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
  *      Serial_Init(&USARTD0, 9600, false);
- *      
+ *
  *      // Send a string through the USART
  *      Serial_TxString(&USARTD0, "Test String\r\n");
  *      // Send a string through the USART
  *      Serial_TxString(&USARTD0, "Test String\r\n");
- *      
+ *
  *      // Receive a byte through the USART
  *      uint8_t DataByte = Serial_RxByte(&USARTD0);
  *  \endcode
  *      // Receive a byte through the USART
  *      uint8_t DataByte = Serial_RxByte(&USARTD0);
  *  \endcode
                         *  \param[in]     Length  Length of the data to send, in bytes.
                         */
                        void Serial_SendData(USART_t* const USART,
                         *  \param[in]     Length  Length of the data to send, in bytes.
                         */
                        void Serial_SendData(USART_t* const USART,
-                                            const uint8_t* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                                            const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Creates a standard character stream from the USART so that it can be used with all the regular functions
                         *  in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
 
                        /** Creates a standard character stream from the USART so that it can be used with all the regular functions
                         *  in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
                        void Serial_CreateStream(FILE* Stream);
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
                        void Serial_CreateStream(FILE* Stream);
-                       
+
                        /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer.
                         *
                        /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer.
                         *
 
                                USART->BAUDCTRLB = (BaudValue >> 8);
                                USART->BAUDCTRLA = (BaudValue & 0xFF);
 
                                USART->BAUDCTRLB = (BaudValue >> 8);
                                USART->BAUDCTRLA = (BaudValue & 0xFF);
-                               
+
                                USART->CTRLC = (USART_CMODE_ASYNCHRONOUS_gc | USART_PMODE_DISABLED_gc | USART_CHSIZE_8BIT_gc);
                                USART->CTRLB = (USART_RXEN_bm | USART_TXEN_bm | (DoubleSpeed ? USART_CLK2X_bm : 0));
                        }
                                USART->CTRLC = (USART_CMODE_ASYNCHRONOUS_gc | USART_PMODE_DISABLED_gc | USART_CHSIZE_8BIT_gc);
                                USART->CTRLB = (USART_RXEN_bm | USART_TXEN_bm | (DoubleSpeed ? USART_CLK2X_bm : 0));
                        }
                                USART->CTRLB = 0;
                                USART->CTRLC = 0;
                        }
                                USART->CTRLB = 0;
                                USART->CTRLC = 0;
                        }
-                       
+
                        /** Indicates whether a character has been received through the USART.
                         *
                         *  \param[in,out] USART  Pointer to the base of the USART peripheral within the device.
                        /** Indicates whether a character has been received through the USART.
                         *
                         *  \param[in,out] USART  Pointer to the base of the USART peripheral within the device.
index f9b9a12..baa0e52 100644 (file)
@@ -74,7 +74,7 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInter
                                        if (USB_DeviceState == DEVICE_STATE_Unattached)
                                          return;
                                }
                                        if (USB_DeviceState == DEVICE_STATE_Unattached)
                                          return;
                                }
-                               
+
                                CDCInterfaceInfo->State.LineEncoding.BaudRateBPS = Endpoint_Read_32_LE();
                                CDCInterfaceInfo->State.LineEncoding.CharFormat  = Endpoint_Read_8();
                                CDCInterfaceInfo->State.LineEncoding.ParityType  = Endpoint_Read_8();
                                CDCInterfaceInfo->State.LineEncoding.BaudRateBPS = Endpoint_Read_32_LE();
                                CDCInterfaceInfo->State.LineEncoding.CharFormat  = Endpoint_Read_8();
                                CDCInterfaceInfo->State.LineEncoding.ParityType  = Endpoint_Read_8();
@@ -139,7 +139,7 @@ void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
 
        #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
        Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
 
        #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
        Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
-       
+
        if (Endpoint_IsINReady())
          CDC_Device_Flush(CDCInterfaceInfo);
        #endif
        if (Endpoint_IsINReady())
          CDC_Device_Flush(CDCInterfaceInfo);
        #endif
@@ -156,7 +156,7 @@ uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo
 }
 
 uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
 }
 
 uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
-                            const char* const Buffer,
+                            const void* const Buffer,
                             const uint16_t Length)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
                             const uint16_t Length)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
index b98041d..1f259f3 100644 (file)
                                struct
                                {
                                        uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */
                                struct
                                {
                                        uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */
-                                       
+
                                        USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
                                        USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
                                        USB_Endpoint_Table_t NotificationEndpoint; /**< Notification IN Endpoint configuration table. */
                                        USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
                                        USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
                                        USB_Endpoint_Table_t NotificationEndpoint; /**< Notification IN Endpoint configuration table. */
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
-                                                   const char* const Buffer,
+                                                   const void* const Buffer,
                                                    const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Sends a given null terminated string to the attached USB host, if connected. If a host is not connected when
                                                    const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Sends a given null terminated string to the attached USB host, if connected. If a host is not connected when
                        void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
                                                             FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                        #endif
                        void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
                                                             FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                        #endif
-                       
+
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
index 2c48149..1ae6fae 100644 (file)
@@ -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 (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;
        }
        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))
        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.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;
        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.DataINPipe, 1)))
          return false;
-       
+
        if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 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;
 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;
        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);
        };
 
        Pipe_SelectPipe(PIPE_CONTROLPIPE);
-       return USB_Host_SendControlRequest(NULL);       
+       return USB_Host_SendControlRequest(NULL);
 }
 
 static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol)
 }
 
 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)
 
 static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
                                            const uint8_t StringIndex)
-{      
+{
        const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex];
        const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex];
-       
+
        if (String == NULL)
          String = "";
 
        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,
 }
 
 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))
                           const uint16_t Length)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
index 0ce7ece..6a4701e 100644 (file)
@@ -87,7 +87,7 @@
                                {
                                        USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
                                        USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
                                {
                                        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
                                        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
                        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);
                        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.
                         *
                        /** 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.
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
                         *  \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
                                                  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
index 2bf9943..146d501 100644 (file)
@@ -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.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.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;
        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;
 
        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,
 }
 
 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))
                           const uint16_t Length)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
index 0f20326..23d637a 100644 (file)
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t CDC_Host_SendData(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
                         *  \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
                                                  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
                        void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
                                                           FILE* const Stream);
                        #endif
                        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
                        /** 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
index f273c3d..e04a9b5 100644 (file)
@@ -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.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;
        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.DataINPipe, 1)))
          return false;
-       
+
        if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataOUTPipe, 1)))
        if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false; 
+         return false;
 
        PRNTInterfaceInfo->State.InterfaceNumber  = PrinterInterface->InterfaceNumber;
        PRNTInterfaceInfo->State.AlternateSetting = PrinterInterface->AlternateSetting;
 
        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,
 }
 
 uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
-                           void* Buffer,
+                           const void* Buffer,
                            const uint16_t Length)
 {
        uint8_t ErrorCode;
                            const uint16_t Length)
 {
        uint8_t ErrorCode;
index 23ec7fd..9a7cb08 100644 (file)
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
                         *  \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
                                                   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
index 0925131..bcdd1d6 100644 (file)
@@ -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.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.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;
        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;
        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;
 
        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,
 }
 
 uint8_t SI_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
-                         void* Buffer,
+                         const void* Buffer,
                          const uint16_t Bytes)
 {
        uint8_t ErrorCode;
                          const uint16_t Bytes)
 {
        uint8_t ErrorCode;
index d0c9902..6e68e13 100644 (file)
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                        uint8_t SI_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                         *  \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
                                                 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
index 9fe1b6a..d147839 100644 (file)
@@ -24,7 +24,7 @@ upgrade-doxygen:
 
 # Make all possible bootloaders for all targets and configurations as set by the BootloaderTest build test
 # and store them in a separate directory called "Bootloaders"
 
 # Make all possible bootloaders for all targets and configurations as set by the BootloaderTest build test
 # and store them in a separate directory called "Bootloaders"
-make_bootloaders:
+bootloaders:
        @echo "build_bootloaders:" > BuildMakefile
        @printf "\t-mkdir Bootloaders 2>/dev/null\n\n" >> BuildMakefile
 
        @echo "build_bootloaders:" > BuildMakefile
        @printf "\t-mkdir Bootloaders 2>/dev/null\n\n" >> BuildMakefile
 
@@ -79,4 +79,4 @@ validate-branch:
 validate-release: check-documentation-placeholders validate-branch
 
 
 validate-release: check-documentation-placeholders validate-branch
 
 
-.PHONY: all upgrade-doxygen make_bootloaders check-documentation-placeholders validate-branch
\ No newline at end of file
+.PHONY: all upgrade-doxygen bootloaders check-documentation-placeholders validate-branch