Cosmetic: fix CI errors
* Fix UTF-8 encoding. This caused the endianness check to fail, which
reads all .c and .h files.
* Add .checkpatch.conf to skip linting for:
firmware/atmel_softpack_libraries
Change-Id: Ibb2e42e9b4307275a33e4000c201847a6bd60137
diff --git a/.checkpatch.conf b/.checkpatch.conf
new file mode 100644
index 0000000..591ff65
--- /dev/null
+++ b/.checkpatch.conf
@@ -0,0 +1 @@
+--exclude ^firmware/atmel_softpack_libraries/.*$
diff --git a/firmware/atmel_softpack_libraries/libchip_sam3s/chip.h b/firmware/atmel_softpack_libraries/libchip_sam3s/chip.h
index e6af94e..8ae70df 100644
--- a/firmware/atmel_softpack_libraries/libchip_sam3s/chip.h
+++ b/firmware/atmel_softpack_libraries/libchip_sam3s/chip.h
@@ -15,7 +15,7 @@
/* Define attribute */
-#if defined ( __CC_ARM ) /* Keil µVision 4 */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
#define WEAK __attribute__ ((weak))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
diff --git a/firmware/atmel_softpack_libraries/usb/include/USBD.h b/firmware/atmel_softpack_libraries/usb/include/USBD.h
index 6fc931f..6eeb68a 100644
--- a/firmware/atmel_softpack_libraries/usb/include/USBD.h
+++ b/firmware/atmel_softpack_libraries/usb/include/USBD.h
@@ -63,7 +63,7 @@
*------------------------------------------------------------------------------*/
/* Define attribute */
-#if defined ( __CC_ARM ) /* Keil µVision 4 */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
#define WEAK __attribute__ ((weak))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
diff --git a/firmware/atmel_softpack_libraries/usb/include/USBDescriptors.h b/firmware/atmel_softpack_libraries/usb/include/USBDescriptors.h
index 84b5ef6..aada0f1 100644
--- a/firmware/atmel_softpack_libraries/usb/include/USBDescriptors.h
+++ b/firmware/atmel_softpack_libraries/usb/include/USBDescriptors.h
@@ -296,7 +296,7 @@
*/
#pragma pack(1)
-#if defined ( __CC_ARM ) /* Keil µVision 4 */
+#if defined ( __CC_ARM ) /* Keil µVision 4 */
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define __attribute__(...)
#elif defined ( __GNUC__ ) /* GCC CS3 2009q3-68 */
diff --git a/firmware/libcommon/include/cciddriver.h b/firmware/libcommon/include/cciddriver.h
index f9be027..df77fa3 100644
--- a/firmware/libcommon/include/cciddriver.h
+++ b/firmware/libcommon/include/cciddriver.h
@@ -175,11 +175,11 @@
{
/// Number of seconds. If 00h then CCID default value is used.
unsigned char bTimeOut;
- /// Several parameters for the PIN format options (defined in § 6.1.11.4)
+ /// Several parameters for the PIN format options (defined in § 6.1.11.4)
unsigned char bmFormatString4;
/// Define the length of the PIN to present in the APDU command
unsigned char bmPINBlockString;
- /// Allows the length PIN insertion in the APDU command (defined in § 6.1.11.6)
+ /// Allows the length PIN insertion in the APDU command (defined in § 6.1.11.6)
unsigned char bmPinLengthFormat;
/// Insertion position offset in byte for the current PIN
unsigned char bInsertionOffsetOld;
@@ -218,13 +218,13 @@
/// Protocol Data Structure for Protocol T=0 (bProtocolNum=0, dwLength=00000005h)
typedef struct
{
- /// B7-4 FI Index into the table 7 in ISO/IEC 7816-3:1997 selecting a
+ /// B7-4 - FI - Index into the table 7 in ISO/IEC 7816-3:1997 selecting a
/// clock rate conversion factor
- /// B3-0 DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a
+ /// B3-0 - DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a
/// baud rate conversion factor
unsigned char bmFindexDindex;
- /// For T=0 ,B0 0b, B7-2 000000b
- /// B1 Convention used (b1=0 for direct, b1=1 for inverse)
+ /// For T=0 ,B0 - 0b, B7-2 - 000000b
+ /// B1 - Convention used (b1=0 for direct, b1=1 for inverse)
unsigned char bmTCCKST0; // 0 to 2
/// Extra Guardtime between two characters. Add 0 to 254 etu to the normal
/// guardtime of 12etu. FFh is the same as 00h.
@@ -243,14 +243,14 @@
/// Protocol Data Structure for Protocol T=1 (bProtocolNum=1, dwLength=00000007h)
typedef struct
{
- /// B7-4 FI Index into the table 7 in ISO/IEC 7816-3:1997 selecting a
+ /// B7-4 - FI - Index into the table 7 in ISO/IEC 7816-3:1997 selecting a
/// clock rate conversion factor
- /// B3-0 DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a
+ /// B3-0 - DI - Index into the table 8 in ISO/IEC 7816-3:1997 selecting a
/// baud rate conversion factor
unsigned char bmFindexDindex;
- /// For T=1, B7-2 000100b
- /// B0 Checksum type (b0=0 for LRC, b0=1 for CRC
- /// B1 Convention used (b1=0 for direct, b1=1 for inverse)
+ /// For T=1, B7-2 - 000100b
+ /// B0 - Checksum type (b0=0 for LRC, b0=1 for CRC
+ /// B1 - Convention used (b1=0 for direct, b1=1 for inverse)
unsigned char bmTCCKST1; // 10h, 11h, 12h, 13h
/// Extra Guardtime (0 to 254 etu between two characters).
/// If value is FFh, then guardtime is reduced by 1.
@@ -292,8 +292,8 @@
/// - 04h 1.8V
/// Other bits are RFU.
unsigned char bVoltageSupport;
- /// RRRR Upper Word- is RFU = 0000h
- /// PPPP Lower Word- Encodes the supported protocol types. A 1 in a given
+ /// RRRR -Upper Word- is RFU = 0000h
+ /// PPPP -Lower Word- Encodes the supported protocol types. A "1" in a given
/// bit position indicates support for the associated ISO protocol.
/// 0001h = Protocol T=0
/// 0002h = Protocol T=1
@@ -318,7 +318,7 @@
/// Indicates the maximum IFSD supported by CCID for protocol T=1.
unsigned long dwMaxIFSD;
/// - RRRR-Upper Word- is RFU = 0000h
- /// - PPPP-Lower Word- encodes the supported protocol types. A 1 in a given
+ /// - PPPP-Lower Word- encodes the supported protocol types. A "1" in a given
/// bit position indicates support for the associated protocol.
/// 0001h indicates support for the 2-wire protocol 1
/// 0002h indicates support for the 3-wire protocol 1
diff --git a/firmware/libcommon/source/cciddriver.c b/firmware/libcommon/source/cciddriver.c
index dfadd6b..b4ff451 100644
--- a/firmware/libcommon/source/cciddriver.c
+++ b/firmware/libcommon/source/cciddriver.c
@@ -193,8 +193,8 @@
ccidDriver.ProtocolDataStructure[0] = Atr[2]; // TA(1)
// bmTCCKST0
- // For T=0 ,B0 0b, B7-2 000000b
- // B1 Convention used (b1=0 for direct, b1=1 for inverse)
+ // For T=0 ,B0 - 0b, B7-2 - 000000b
+ // B1 - Convention used (b1=0 for direct, b1=1 for inverse)
// bGuardTimeT0
// Extra Guardtime between two characters. Add 0 to 254 etu to the normal
@@ -1005,7 +1005,7 @@
//------------------------------------------------------------------------------
/// Interrupt-IN Messages
/// This message is sent when any bit in the bHardwareErrorCode field is set.
-/// If this message is sent when there is no outstanding command, the bSeq
+/// If this message is sent when there is no "outstanding" command, the bSeq
/// field will be undefined.
/// \param bSlot ICC slot number
/// \param bSeq Sequence number of the bulk OUT command when the hardware error