Naming and coding style convention, new linter tool. (#945)

* Makefile, Scripts: new linter
* About: remove ID from IC
* Firmware: remove double define for DIVC/DIVR
* Scripts: check folder names too. Docker: replace syntax check with make lint.
* Reformat Sources and Migrate to new file naming convention
* Docker: symlink clang-format-12 to clang-format
* Add coding style guide
This commit is contained in:
あく
2022-01-05 19:10:18 +03:00
committed by GitHub
parent c98e54da10
commit 389ff92cc1
899 changed files with 379245 additions and 373421 deletions

47
lib/ST25RFAL002/include/rfal_t1t.h Executable file → Normal file
View File

@@ -49,7 +49,6 @@
*
*/
#ifndef RFAL_T1T_H
#define RFAL_T1T_H
@@ -67,37 +66,32 @@
* GLOBAL DEFINES
******************************************************************************
*/
#define RFAL_T1T_UID_LEN 4 /*!< T1T UID length of cascade level 1 only tag */
#define RFAL_T1T_HR_LENGTH 2 /*!< T1T HR(Header ROM) length */
#define RFAL_T1T_HR0_NDEF_MASK 0xF0 /*!< T1T HR0 NDEF capability mask T1T 1.2 2.2.2 */
#define RFAL_T1T_HR0_NDEF_SUPPORT 0x10 /*!< T1T HR0 NDEF capable value T1T 1.2 2.2.2 */
#define RFAL_T1T_UID_LEN 4 /*!< T1T UID length of cascade level 1 only tag */
#define RFAL_T1T_HR_LENGTH 2 /*!< T1T HR(Header ROM) length */
#define RFAL_T1T_HR0_NDEF_MASK 0xF0 /*!< T1T HR0 NDEF capability mask T1T 1.2 2.2.2 */
#define RFAL_T1T_HR0_NDEF_SUPPORT 0x10 /*!< T1T HR0 NDEF capable value T1T 1.2 2.2.2 */
/*! NFC-A T1T (Topaz) command set */
typedef enum
{
RFAL_T1T_CMD_RID = 0x78, /*!< T1T Read UID */
RFAL_T1T_CMD_RALL = 0x00, /*!< T1T Read All */
RFAL_T1T_CMD_READ = 0x01, /*!< T1T Read */
RFAL_T1T_CMD_WRITE_E = 0x53, /*!< T1T Write with erase (single byte) */
RFAL_T1T_CMD_WRITE_NE = 0x1A /*!< T1T Write with no erase (single byte) */
typedef enum {
RFAL_T1T_CMD_RID = 0x78, /*!< T1T Read UID */
RFAL_T1T_CMD_RALL = 0x00, /*!< T1T Read All */
RFAL_T1T_CMD_READ = 0x01, /*!< T1T Read */
RFAL_T1T_CMD_WRITE_E = 0x53, /*!< T1T Write with erase (single byte) */
RFAL_T1T_CMD_WRITE_NE = 0x1A /*!< T1T Write with no erase (single byte) */
} rfalT1Tcmds;
/*
******************************************************************************
* GLOBAL TYPES
******************************************************************************
*/
/*! NFC-A T1T (Topaz) RID_RES Digital 1.1 10.6.2 & Table 50 */
typedef struct
{
uint8_t hr0; /*!< T1T Header ROM: HR0 */
uint8_t hr1; /*!< T1T Header ROM: HR1 */
uint8_t uid[RFAL_T1T_UID_LEN]; /*!< T1T UID */
typedef struct {
uint8_t hr0; /*!< T1T Header ROM: HR0 */
uint8_t hr1; /*!< T1T Header ROM: HR1 */
uint8_t uid[RFAL_T1T_UID_LEN]; /*!< T1T UID */
} rfalT1TRidRes;
/*
@@ -106,7 +100,6 @@ typedef struct
******************************************************************************
*/
/*!
*****************************************************************************
* \brief Initialize NFC-A T1T Poller mode
@@ -118,8 +111,7 @@ typedef struct
* \return ERR_NONE : No error
*****************************************************************************
*/
ReturnCode rfalT1TPollerInitialize( void );
ReturnCode rfalT1TPollerInitialize(void);
/*!
*****************************************************************************
@@ -135,8 +127,7 @@ ReturnCode rfalT1TPollerInitialize( void );
* \return ERR_NONE : No error
*****************************************************************************
*/
ReturnCode rfalT1TPollerRid( rfalT1TRidRes *ridRes );
ReturnCode rfalT1TPollerRid(rfalT1TRidRes* ridRes);
/*!
*****************************************************************************
@@ -155,8 +146,8 @@ ReturnCode rfalT1TPollerRid( rfalT1TRidRes *ridRes );
* \return ERR_NONE : No error
*****************************************************************************
*/
ReturnCode rfalT1TPollerRall( const uint8_t* uid, uint8_t* rxBuf, uint16_t rxBufLen, uint16_t *rxRcvdLen );
ReturnCode
rfalT1TPollerRall(const uint8_t* uid, uint8_t* rxBuf, uint16_t rxBufLen, uint16_t* rxRcvdLen);
/*!
*****************************************************************************
@@ -174,7 +165,7 @@ ReturnCode rfalT1TPollerRall( const uint8_t* uid, uint8_t* rxBuf, uint16_t rxBuf
* \return ERR_NONE : No error
*****************************************************************************
*/
ReturnCode rfalT1TPollerWrite( const uint8_t* uid, uint8_t address, uint8_t data );
ReturnCode rfalT1TPollerWrite(const uint8_t* uid, uint8_t address, uint8_t data);
#endif /* RFAL_T1T_H */