Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
03130342
Commit
03130342
authored
Jul 13, 2010
by
Dean Camera
Browse files
Added const attributes to some of the class driver function parameters that were missing it.
parent
3a3a4e2a
Changes
36
Hide whitespace changes
Inline
Side-by-side
LUFA/Drivers/USB/Class/Device/MIDI.h
View file @
03130342
...
...
@@ -125,7 +125,7 @@
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
uint8_t
MIDI_Device_SendEventPacket
(
USB_ClassInfo_MIDI_Device_t
*
const
MIDIInterfaceInfo
,
MIDI_EventPacket_t
*
const
Event
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
const
MIDI_EventPacket_t
*
const
Event
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
/** Flushes the MIDI send buffer, sending any queued MIDI events to the host. This should be called to override the
...
...
LUFA/Drivers/USB/Class/Device/RNDIS.c
View file @
03130342
...
...
@@ -448,7 +448,7 @@ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RN
}
static
bool
RNDIS_Device_ProcessNDISSet
(
USB_ClassInfo_RNDIS_Device_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
OId
,
void
*
SetData
,
const
uint16_t
SetSize
)
const
void
*
SetData
,
const
uint16_t
SetSize
)
{
(
void
)
SetSize
;
...
...
LUFA/Drivers/USB/Class/Device/RNDIS.h
View file @
03130342
...
...
@@ -155,7 +155,7 @@
void
*
ResponseData
,
uint16_t
*
const
ResponseSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
5
)
ATTR_NON_NULL_PTR_ARG
(
6
);
static
bool
RNDIS_Device_ProcessNDISSet
(
USB_ClassInfo_RNDIS_Device_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
OId
,
void
*
SetData
,
const
uint16_t
SetSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
const
void
*
SetData
,
const
uint16_t
SetSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
3
);
#endif
...
...
LUFA/Drivers/USB/Class/Host/CDC.c
View file @
03130342
...
...
@@ -399,13 +399,13 @@ uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
return
PIPE_READYWAIT_NoError
;
}
void
CDC_Host_CreateStream
(
USB_ClassInfo_CDC_Host_t
*
CDCInterfaceInfo
,
FILE
*
Stream
)
void
CDC_Host_CreateStream
(
USB_ClassInfo_CDC_Host_t
*
const
CDCInterfaceInfo
,
FILE
*
const
Stream
)
{
*
Stream
=
(
FILE
)
FDEV_SETUP_STREAM
(
CDC_Host_putchar
,
CDC_Host_getchar
,
_FDEV_SETUP_RW
);
fdev_set_udata
(
Stream
,
CDCInterfaceInfo
);
}
void
CDC_Host_CreateBlockingStream
(
USB_ClassInfo_CDC_Host_t
*
CDCInterfaceInfo
,
FILE
*
Stream
)
void
CDC_Host_CreateBlockingStream
(
USB_ClassInfo_CDC_Host_t
*
const
CDCInterfaceInfo
,
FILE
*
const
Stream
)
{
*
Stream
=
(
FILE
)
FDEV_SETUP_STREAM
(
CDC_Host_putchar
,
CDC_Host_getchar_Blocking
,
_FDEV_SETUP_RW
);
fdev_set_udata
(
Stream
,
CDCInterfaceInfo
);
...
...
LUFA/Drivers/USB/Class/Host/CDC.h
View file @
03130342
...
...
@@ -277,7 +277,7 @@
* \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
*
CDCInterfaceInfo
,
FILE
*
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 +285,7 @@
* \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
*
CDCInterfaceInfo
,
FILE
*
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
...
...
LUFA/Drivers/USB/Class/Host/HIDParser.h
View file @
03130342
...
...
@@ -332,7 +332,7 @@
*
* \return Boolean true if the item should be stored into the HID_ReportInfo_t structure, false if it should be ignored.
*/
bool
CALLBACK_HIDParser_FilterHIDReportItem
(
HID_ReportItem_t
*
CurrentItem
);
bool
CALLBACK_HIDParser_FilterHIDReportItem
(
HID_ReportItem_t
*
const
CurrentItem
);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
...
...
LUFA/Drivers/USB/Class/Host/Printer.c
View file @
03130342
...
...
@@ -180,7 +180,7 @@ uint8_t PRNT_Host_SoftReset(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
return
USB_Host_SendControlRequest
(
NULL
);
}
uint8_t
PRNT_Host_SendData
(
USB_ClassInfo_PRNT_Host_t
*
const
PRNTInterfaceInfo
,
void
*
PrinterCommands
,
uint16_t
CommandSize
)
uint8_t
PRNT_Host_SendData
(
USB_ClassInfo_PRNT_Host_t
*
const
PRNTInterfaceInfo
,
void
*
PrinterCommands
,
const
uint16_t
CommandSize
)
{
uint8_t
ErrorCode
;
...
...
@@ -205,7 +205,7 @@ uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, v
return
PIPE_RWSTREAM_NoError
;
}
uint8_t
PRNT_Host_GetDeviceID
(
USB_ClassInfo_PRNT_Host_t
*
const
PRNTInterfaceInfo
,
char
*
DeviceIDString
,
uint16_t
BufferSize
)
uint8_t
PRNT_Host_GetDeviceID
(
USB_ClassInfo_PRNT_Host_t
*
const
PRNTInterfaceInfo
,
char
*
DeviceIDString
,
const
uint16_t
BufferSize
)
{
uint8_t
ErrorCode
=
HOST_SENDCONTROL_Successful
;
uint16_t
DeviceIDStringLength
=
0
;
...
...
LUFA/Drivers/USB/Class/Host/Printer.h
View file @
03130342
...
...
@@ -171,7 +171,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
*
PrinterCommands
,
uint16_t
CommandSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
const
uint16_t
CommandSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
/** Retrieves the attached printer device's ID string, formatted according to IEEE 1284. This string is sent as a
* Unicode string from the device and is automatically converted to an ASCII encoded C string by this function, thus
...
...
@@ -187,7 +187,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t
PRNT_Host_GetDeviceID
(
USB_ClassInfo_PRNT_Host_t
*
const
PRNTInterfaceInfo
,
char
*
DeviceIDString
,
uint16_t
BufferSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
const
uint16_t
BufferSize
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
/* Inline Functions: */
/** General management task for a given Printer host class interface, required for the correct operation of
...
...
LUFA/Drivers/USB/Class/Host/RNDIS.c
View file @
03130342
...
...
@@ -195,7 +195,7 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDe
}
static
uint8_t
RNDIS_SendEncapsulatedCommand
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
Length
)
void
*
Buffer
,
const
uint16_t
Length
)
{
USB_ControlRequest
=
(
USB_Request_Header_t
)
{
...
...
@@ -211,7 +211,7 @@ static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const R
}
static
uint8_t
RNDIS_GetEncapsulatedResponse
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
Length
)
void
*
Buffer
,
const
uint16_t
Length
)
{
USB_ControlRequest
=
(
USB_Request_Header_t
)
{
...
...
@@ -287,7 +287,8 @@ uint8_t RNDIS_Host_InitializeDevice(USB_ClassInfo_RNDIS_Host_t* const RNDISInter
return
HOST_SENDCONTROL_Successful
;
}
uint8_t
RNDIS_Host_SetRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
uint32_t
Oid
,
void
*
Buffer
,
uint16_t
Length
)
uint8_t
RNDIS_Host_SetRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
Oid
,
void
*
Buffer
,
const
uint16_t
Length
)
{
uint8_t
ErrorCode
;
...
...
@@ -328,7 +329,8 @@ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInter
return
HOST_SENDCONTROL_Successful
;
}
uint8_t
RNDIS_Host_QueryRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
uint32_t
Oid
,
void
*
Buffer
,
uint16_t
MaxLength
)
uint8_t
RNDIS_Host_QueryRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
Oid
,
void
*
Buffer
,
const
uint16_t
MaxLength
)
{
uint8_t
ErrorCode
;
...
...
@@ -388,7 +390,7 @@ bool RNDIS_Host_IsPacketReceived(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfac
return
PacketWaiting
;
}
uint8_t
RNDIS_Host_ReadPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
*
PacketLength
)
uint8_t
RNDIS_Host_ReadPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
*
const
PacketLength
)
{
uint8_t
ErrorCode
;
...
...
@@ -432,7 +434,7 @@ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceIn
return
PIPE_RWSTREAM_NoError
;
}
uint8_t
RNDIS_Host_SendPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
PacketLength
)
uint8_t
RNDIS_Host_SendPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
const
uint16_t
PacketLength
)
{
uint8_t
ErrorCode
;
...
...
LUFA/Drivers/USB/Class/Host/RNDIS.h
View file @
03130342
...
...
@@ -177,8 +177,8 @@
* \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a
* logical command failure.
*/
uint8_t
RNDIS_Host_SetRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
uint32_t
Oid
,
void
*
Buffer
,
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
3
);
uint8_t
RNDIS_Host_SetRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
Oid
,
void
*
Buffer
,
const
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
3
);
/** Gets a given RNDIS property of an attached RNDIS device.
*
...
...
@@ -190,8 +190,8 @@
* \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a
* logical command failure.
*/
uint8_t
RNDIS_Host_QueryRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
uint32_t
Oid
,
void
*
Buffer
,
uint16_t
MaxLength
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
3
);
uint8_t
RNDIS_Host_QueryRNDISProperty
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
const
uint32_t
Oid
,
void
*
Buffer
,
const
uint16_t
MaxLength
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
3
);
/** Determines if a packet is currently waiting for the host to read in and process.
*
...
...
@@ -216,7 +216,7 @@
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t
RNDIS_Host_ReadPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
*
PacketLength
)
uint8_t
RNDIS_Host_ReadPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
*
const
PacketLength
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
)
ATTR_NON_NULL_PTR_ARG
(
3
);
/** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
...
...
@@ -230,7 +230,7 @@
*
* \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t
RNDIS_Host_SendPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
PacketLength
)
uint8_t
RNDIS_Host_SendPacket
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
const
uint16_t
PacketLength
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
/* Inline Functions: */
...
...
@@ -262,10 +262,10 @@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_RNDIS_CLASS_HOST_C)
static
uint8_t
RNDIS_SendEncapsulatedCommand
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
void
*
Buffer
,
const
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
static
uint8_t
RNDIS_GetEncapsulatedResponse
(
USB_ClassInfo_RNDIS_Host_t
*
const
RNDISInterfaceInfo
,
void
*
Buffer
,
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
void
*
Buffer
,
const
uint16_t
Length
)
ATTR_NON_NULL_PTR_ARG
(
1
)
ATTR_NON_NULL_PTR_ARG
(
2
);
static
uint8_t
DCOMP_RNDIS_Host_NextRNDISControlInterface
(
void
*
const
CurrentDescriptor
)
ATTR_NON_NULL_PTR_ARG
(
1
);
...
...
LUFA/Drivers/USB/Class/Host/StillImage.c
View file @
03130342
...
...
@@ -371,7 +371,7 @@ uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
}
uint8_t
SImage_Host_SendCommand
(
USB_ClassInfo_SI_Host_t
*
const
SIInterfaceInfo
,
const
uint16_t
Operation
,
const
uint8_t
TotalParams
,
uint32_t
*
Params
)
const
uint8_t
TotalParams
,
uint32_t
*
const
Params
)
{
if
((
USB_HostState
!=
HOST_STATE_Configured
)
||
!
(
SIInterfaceInfo
->
State
.
IsActive
))
return
HOST_SENDCONTROL_DeviceDisconnected
;
...
...
LUFA/Drivers/USB/Class/Host/StillImage.h
View file @
03130342
...
...
@@ -213,7 +213,7 @@
* returned a logical command failure.
*/
uint8_t
SImage_Host_SendCommand
(
USB_ClassInfo_SI_Host_t
*
const
SIInterfaceInfo
,
const
uint16_t
Operation
,
const
uint8_t
TotalParams
,
uint32_t
*
Params
)
ATTR_NON_NULL_PTR_ARG
(
1
);
const
uint8_t
TotalParams
,
uint32_t
*
const
Params
)
ATTR_NON_NULL_PTR_ARG
(
1
);
/** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data
* associated with the command has been transferred.
...
...
Projects/Magstripe/Magstripe.c
View file @
03130342
...
...
@@ -172,7 +172,7 @@ void EVENT_USB_Device_StartOfFrame(void)
* \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
*/
bool
CALLBACK_HID_Device_CreateHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
uint8_t
*
const
ReportID
,
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
ReportSize
)
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
const
ReportSize
)
{
USB_KeyboardReport_Data_t
*
KeyboardReport
=
(
USB_KeyboardReport_Data_t
*
)
ReportData
;
...
...
Projects/Magstripe/Magstripe.h
View file @
03130342
...
...
@@ -76,7 +76,7 @@
void
EVENT_USB_Device_StartOfFrame
(
void
);
bool
CALLBACK_HID_Device_CreateHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
uint8_t
*
const
ReportID
,
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
ReportSize
);
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
const
ReportSize
);
void
CALLBACK_HID_Device_ProcessHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
const
uint8_t
ReportID
,
const
uint8_t
ReportType
,
const
void
*
ReportData
,
const
uint16_t
ReportSize
);
...
...
Projects/TempDataLogger/TempDataLogger.c
View file @
03130342
...
...
@@ -280,7 +280,7 @@ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSI
* \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
*/
bool
CALLBACK_HID_Device_CreateHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
uint8_t
*
const
ReportID
,
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
ReportSize
)
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
const
ReportSize
)
{
Device_Report_t
*
ReportParams
=
(
Device_Report_t
*
)
ReportData
;
...
...
Projects/TempDataLogger/TempDataLogger.h
View file @
03130342
...
...
@@ -106,7 +106,7 @@
bool
CALLBACK_MS_Device_SCSICommandReceived
(
USB_ClassInfo_MS_Device_t
*
const
MSInterfaceInfo
);
bool
CALLBACK_HID_Device_CreateHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
uint8_t
*
const
ReportID
,
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
ReportSize
);
const
uint8_t
ReportType
,
void
*
ReportData
,
uint16_t
*
const
ReportSize
);
void
CALLBACK_HID_Device_ProcessHIDReport
(
USB_ClassInfo_HID_Device_t
*
const
HIDInterfaceInfo
,
const
uint8_t
ReportID
,
const
uint8_t
ReportType
,
const
void
*
ReportData
,
const
uint16_t
ReportSize
);
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment