aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-02-13 21:27:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-02-13 21:27:24 +0000
commit0019fbd1294ccc9ecb0ac4ddb5d8c71efcf9597f (patch)
treeab85bdd239b9df645d4ef95e6518ca25661c2515 /LUFA/Drivers/USB/HighLevel
parent272d446d3242f1d449447a91cdc1f7516ffe964f (diff)
downloadlufa-0019fbd1294ccc9ecb0ac4ddb5d8c71efcf9597f.tar.gz
lufa-0019fbd1294ccc9ecb0ac4ddb5d8c71efcf9597f.tar.bz2
lufa-0019fbd1294ccc9ecb0ac4ddb5d8c71efcf9597f.zip
Add more const-ness to the stream endpoint/pipe functions where possible.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel')
-rw-r--r--LUFA/Drivers/USB/HighLevel/EndpointStream.h40
-rw-r--r--LUFA/Drivers/USB/HighLevel/PipeStream.h20
-rw-r--r--LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c2
-rw-r--r--LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c2
-rw-r--r--LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c2
-rw-r--r--LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c2
6 files changed, 34 insertions, 34 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/EndpointStream.h b/LUFA/Drivers/USB/HighLevel/EndpointStream.h
index cd4a2185b..a6e7200e3 100644
--- a/LUFA/Drivers/USB/HighLevel/EndpointStream.h
+++ b/LUFA/Drivers/USB/HighLevel/EndpointStream.h
@@ -280,7 +280,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Stream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -298,7 +298,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Stream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -357,7 +357,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Stream_LE(void* Buffer,
+ uint8_t Endpoint_Read_Stream_LE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -375,7 +375,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Stream_BE(void* Buffer,
+ uint8_t Endpoint_Read_Stream_BE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -398,7 +398,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
@@ -420,7 +420,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_Stream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
@@ -442,7 +442,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer,
+ uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
@@ -464,7 +464,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer,
+ uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
//@}
@@ -480,7 +480,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_EStream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_EStream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -493,7 +493,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_EStream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_EStream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -506,7 +506,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_EStream_LE(void* Buffer,
+ uint8_t Endpoint_Read_EStream_LE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -519,7 +519,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_EStream_BE(void* Buffer,
+ uint8_t Endpoint_Read_EStream_BE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -539,7 +539,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_EStream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_EStream_LE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().
@@ -558,7 +558,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_EStream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_EStream_BE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().
@@ -577,7 +577,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Control_EStream_LE(void* Buffer,
+ uint8_t Endpoint_Read_Control_EStream_LE(void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().
@@ -596,7 +596,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Read_Control_EStream_BE(void* Buffer,
+ uint8_t Endpoint_Read_Control_EStream_BE(void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
//@}
@@ -614,7 +614,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_PStream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_PStream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -629,7 +629,7 @@
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_PStream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_PStream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -651,7 +651,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_PStream_LE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_PStream_LE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().
@@ -672,7 +672,7 @@
*
* \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
*/
- uint8_t Endpoint_Write_Control_PStream_BE(const void* Buffer,
+ uint8_t Endpoint_Write_Control_PStream_BE(const void* const Buffer,
uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
//@}
diff --git a/LUFA/Drivers/USB/HighLevel/PipeStream.h b/LUFA/Drivers/USB/HighLevel/PipeStream.h
index a327a89c1..b2d392af0 100644
--- a/LUFA/Drivers/USB/HighLevel/PipeStream.h
+++ b/LUFA/Drivers/USB/HighLevel/PipeStream.h
@@ -258,7 +258,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_Stream_LE(const void* Buffer,
+ uint8_t Pipe_Write_Stream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -278,7 +278,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_Stream_BE(const void* Buffer,
+ uint8_t Pipe_Write_Stream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -339,7 +339,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Read_Stream_LE(void* Buffer,
+ uint8_t Pipe_Read_Stream_LE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -359,7 +359,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Read_Stream_BE(void* Buffer,
+ uint8_t Pipe_Read_Stream_BE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
//@}
@@ -376,7 +376,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_EStream_LE(const void* Buffer,
+ uint8_t Pipe_Write_EStream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -389,7 +389,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_EStream_BE(const void* Buffer,
+ uint8_t Pipe_Write_EStream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -402,7 +402,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Read_EStream_LE(void* Buffer,
+ uint8_t Pipe_Read_EStream_LE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -415,7 +415,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Read_EStream_BE(void* Buffer,
+ uint8_t Pipe_Read_EStream_BE(void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
//@}
@@ -434,7 +434,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_PStream_LE(const void* Buffer,
+ uint8_t Pipe_Write_PStream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
@@ -449,7 +449,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
- uint8_t Pipe_Write_PStream_BE(const void* Buffer,
+ uint8_t Pipe_Write_PStream_BE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
//@}
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c
index cd11705c2..e746b5124 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c
+++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_R.c
@@ -1,4 +1,4 @@
-uint8_t TEMPLATE_FUNC_NAME (void* Buffer,
+uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
uint16_t Length)
{
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c
index 43724e805..bdbbcfc11 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c
+++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c
@@ -1,4 +1,4 @@
-uint8_t TEMPLATE_FUNC_NAME (const void* Buffer,
+uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
uint16_t Length)
{
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c
index 4077279cd..a46d7513b 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c
+++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c
@@ -1,4 +1,4 @@
-uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer,
+uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed)
{
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c
index 8c5d47d4d..147ce5ad4 100644
--- a/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c
+++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Pipe_RW.c
@@ -1,4 +1,4 @@
-uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer,
+uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed)
{