aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Magstripe
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/Magstripe')
-rw-r--r--Projects/Magstripe/Descriptors.c4
-rw-r--r--Projects/Magstripe/Descriptors.h5
-rw-r--r--Projects/Magstripe/Lib/CircularBitBuffer.c3
-rw-r--r--Projects/Magstripe/Lib/CircularBitBuffer.h3
-rw-r--r--Projects/Magstripe/Magstripe.c14
-rw-r--r--Projects/Magstripe/Magstripe.h14
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