diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
commit | 6bda628718f67c04ed43e8328f55bdce5319c504 (patch) | |
tree | efd08eefa90cef94440f880a70902f5803fb12a7 /Projects/Magstripe | |
parent | 83e293a6ec98c7faad1b76dd312b31b86cbeecc1 (diff) | |
download | lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.gz lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.bz2 lufa-6bda628718f67c04ed43e8328f55bdce5319c504.zip |
Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
Diffstat (limited to 'Projects/Magstripe')
-rw-r--r-- | Projects/Magstripe/Descriptors.c | 4 | ||||
-rw-r--r-- | Projects/Magstripe/Descriptors.h | 5 | ||||
-rw-r--r-- | Projects/Magstripe/Lib/CircularBitBuffer.c | 3 | ||||
-rw-r--r-- | Projects/Magstripe/Lib/CircularBitBuffer.h | 3 | ||||
-rw-r--r-- | Projects/Magstripe/Magstripe.c | 14 | ||||
-rw-r--r-- | Projects/Magstripe/Magstripe.h | 14 |
6 files changed, 30 insertions, 13 deletions
diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c index c544ba635..219ead1e7 100644 --- a/Projects/Magstripe/Descriptors.c +++ b/Projects/Magstripe/Descriptors.c @@ -196,7 +196,9 @@ USB_Descriptor_String_t PROGMEM ProductString = * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the * USB host. */ -uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); diff --git a/Projects/Magstripe/Descriptors.h b/Projects/Magstripe/Descriptors.h index 02a14b400..85d073780 100644 --- a/Projects/Magstripe/Descriptors.h +++ b/Projects/Magstripe/Descriptors.h @@ -64,7 +64,8 @@ #define KEYBOARD_EPSIZE 8 /* Function Prototypes: */ - uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) - ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); #endif diff --git a/Projects/Magstripe/Lib/CircularBitBuffer.c b/Projects/Magstripe/Lib/CircularBitBuffer.c index 8be527b4d..c1b21039c 100644 --- a/Projects/Magstripe/Lib/CircularBitBuffer.c +++ b/Projects/Magstripe/Lib/CircularBitBuffer.c @@ -50,7 +50,8 @@ void BitBuffer_Init(BitBuffer_t* const Buffer) } /** Function to store the given bit into the given bit buffer. */ -void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer, const 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) diff --git a/Projects/Magstripe/Lib/CircularBitBuffer.h b/Projects/Magstripe/Lib/CircularBitBuffer.h index dff4d2e5d..973c7c26c 100644 --- a/Projects/Magstripe/Lib/CircularBitBuffer.h +++ b/Projects/Magstripe/Lib/CircularBitBuffer.h @@ -82,7 +82,8 @@ * \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* const Buffer, const 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. * diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index e404eaf0e..4c0d7a191 100644 --- a/Projects/Magstripe/Magstripe.c +++ b/Projects/Magstripe/Magstripe.c @@ -171,8 +171,11 @@ 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* const ReportSize) +bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + const uint8_t ReportType, + void* ReportData, + uint16_t* const ReportSize) { USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData; @@ -210,8 +213,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * \param[in] ReportData Pointer to the report buffer where the received report is stored * \param[in] ReportSize Size in bytes of the report received from the host */ -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) +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) { // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports } diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h index 4922b7be6..946ef2ebf 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -75,9 +75,15 @@ void EVENT_USB_Device_UnhandledControlRequest(void); 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* 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); + bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + 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); #endif |