Add missing const qualifiers to class drivers.

Indent core library function parameters so that there is only one parameter per line, to increase readability.
This commit is contained in:
Dean Camera 2010-07-21 14:00:51 +00:00
parent 99d8a39363
commit 97143bf814
79 changed files with 586 additions and 330 deletions

View file

@ -167,7 +167,8 @@
*
* \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum.
*/
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize,
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
uint16_t ConfigDescriptorSize,
void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
/** Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding
@ -198,7 +199,8 @@
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
*/
uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
/** Sends a given string to the attached USB device, if connected. If a device is not connected when the function is called, the
* string is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
@ -214,8 +216,9 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, char* Data, const uint16_t Length)
ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
char* const Data,
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
* byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
@ -230,7 +233,8 @@
*
* \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
*/
uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
/** Determines the number of bytes received by the CDC interface from the device, waiting to be read.
*
@ -277,7 +281,8 @@
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.
* \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed.
*/
void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream);
void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
FILE* const Stream);
/** Identical to CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
* the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
@ -285,7 +290,8 @@
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.
* \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed.
*/
void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream);
void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
FILE* const Stream);
/** 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
@ -313,7 +319,8 @@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_CDC_CLASS_HOST_C)
static int CDC_Host_putchar(char c, FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
static int CDC_Host_putchar(char c,
FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
static int CDC_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
static int CDC_Host_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);