aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Magstripe/Lib
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-20 06:23:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-20 06:23:24 +0000
commitb408a5fe62f5ac8be551f4998a6763465a21f053 (patch)
tree13f0bd95f033472c636e91c580fae79cbdebd438 /Projects/Magstripe/Lib
parente73f05b8b2de5485c97a305b4a7e940bb5636f49 (diff)
downloadlufa-b408a5fe62f5ac8be551f4998a6763465a21f053.tar.gz
lufa-b408a5fe62f5ac8be551f4998a6763465a21f053.tar.bz2
lufa-b408a5fe62f5ac8be551f4998a6763465a21f053.zip
Add const qualifier to the parameters of Projects' functions where possible.
Diffstat (limited to 'Projects/Magstripe/Lib')
-rw-r--r--Projects/Magstripe/Lib/CircularBitBuffer.c6
-rw-r--r--Projects/Magstripe/Lib/CircularBitBuffer.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/Projects/Magstripe/Lib/CircularBitBuffer.c b/Projects/Magstripe/Lib/CircularBitBuffer.c
index 5d23762ec..4e0cc4da3 100644
--- a/Projects/Magstripe/Lib/CircularBitBuffer.c
+++ b/Projects/Magstripe/Lib/CircularBitBuffer.c
@@ -37,7 +37,7 @@
#include "CircularBitBuffer.h"
/** Function to initialize or reset a bit buffer, ready for data to be stored into it. */
-void BitBuffer_Init(BitBuffer_t* Buffer)
+void BitBuffer_Init(BitBuffer_t* const Buffer)
{
/* Reset the number of stored bits in the buffer */
Buffer->Elements = 0;
@@ -50,7 +50,7 @@ void BitBuffer_Init(BitBuffer_t* Buffer)
}
/** Function to store the given bit into the given bit buffer. */
-void BitBuffer_StoreNextBit(BitBuffer_t* Buffer, bool Bit)
+void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer, const bool Bit)
{
/* If the bit to store is true, set the next bit in the buffer */
if (Bit)
@@ -79,7 +79,7 @@ void BitBuffer_StoreNextBit(BitBuffer_t* Buffer, bool Bit)
}
/** Function to retrieve the next bit stored in the given bit buffer. */
-bool BitBuffer_GetNextBit(BitBuffer_t* Buffer)
+bool BitBuffer_GetNextBit(BitBuffer_t* const Buffer)
{
/* Retrieve the value of the next bit stored in the buffer */
bool Bit = ((*Buffer->Out.CurrentByte & Buffer->Out.ByteMask) != 0);
diff --git a/Projects/Magstripe/Lib/CircularBitBuffer.h b/Projects/Magstripe/Lib/CircularBitBuffer.h
index 6220e1b90..c5d1c1a20 100644
--- a/Projects/Magstripe/Lib/CircularBitBuffer.h
+++ b/Projects/Magstripe/Lib/CircularBitBuffer.h
@@ -75,14 +75,14 @@
*
* \param[in,out] Buffer Bit buffer to initialize
*/
- void BitBuffer_Init(BitBuffer_t* Buffer) ATTR_NON_NULL_PTR_ARG(1);
+ void BitBuffer_Init(BitBuffer_t* const Buffer) ATTR_NON_NULL_PTR_ARG(1);
/** Stores a bit into the next location inside a given bit buffer.
*
* \param[in,out] Buffer Bit buffer to store a bit into
* \param[in] Bit Bit to store into the buffer
*/
- void BitBuffer_StoreNextBit(BitBuffer_t* Buffer, bool Bit) ATTR_NON_NULL_PTR_ARG(1);
+ void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer, const bool Bit) ATTR_NON_NULL_PTR_ARG(1);
/** Retrieves a bit from the next location inside a given bit buffer.
*
@@ -90,6 +90,6 @@
*
* \return Next bit from the buffer
*/
- bool BitBuffer_GetNextBit(BitBuffer_t* Buffer) ATTR_NON_NULL_PTR_ARG(1);
+ bool BitBuffer_GetNextBit(BitBuffer_t* const Buffer) ATTR_NON_NULL_PTR_ARG(1);
#endif