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

@ -254,7 +254,9 @@
* }
* \endcode
*/
uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine);
uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
void** const CurrConfigLoc,
ConfigComparatorPtr_t const ComparatorRoutine);
/* Inline Functions: */
/** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
@ -263,9 +265,10 @@
* \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor.
* \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor.
*/
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, void** CurrConfigLoc)
ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, void** CurrConfigLoc)
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
void** CurrConfigLoc)
{
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;

View file

@ -167,7 +167,8 @@
* \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
* \ref Group_USBManagement documentation).
*/
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
const uint8_t SubErrorCode);
/** Event for USB device enumeration completion. This event fires when a the USB interface is
* in host mode and an attached USB device has been completely enumerated and is ready to be
@ -335,8 +336,9 @@
void EVENT_USB_Host_DeviceAttached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
void EVENT_USB_Host_DeviceUnattached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
void EVENT_USB_Host_DeviceEnumerationComplete(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
const uint8_t SubErrorCode)
ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
#endif
#if defined(USB_CAN_BE_DEVICE)

View file

@ -36,7 +36,7 @@
#define __INCLUDE_FROM_HOSTSTDREQ_C
#include "HostStandardReq.h"
uint8_t USB_Host_SendControlRequest(void* BufferPtr)
uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
{
uint8_t* HeaderStream = (uint8_t*)&USB_ControlRequest;
uint8_t* DataStream = (uint8_t*)BufferPtr;

View file

@ -91,7 +91,7 @@
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
uint8_t USB_Host_SendControlRequest(void* BufferPtr);
uint8_t USB_Host_SendControlRequest(void* const BufferPtr);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)