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:
Executable → Regular
+152
-92
@@ -20,7 +20,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* PROJECT: ST25R3916 firmware
|
||||
* Revision:
|
||||
@@ -51,7 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ST25R3916_H
|
||||
#define ST25R3916_H
|
||||
|
||||
@@ -71,20 +69,21 @@
|
||||
*/
|
||||
|
||||
/*! Struct to represent all regs on ST25R3916 */
|
||||
typedef struct{
|
||||
uint8_t RsA[(ST25R3916_REG_IC_IDENTITY+1U)]; /*!< Registers contained on ST25R3916 space A (Rs-A) */
|
||||
uint8_t RsB[ST25R3916_SPACE_B_REG_LEN]; /*!< Registers contained on ST25R3916 space B (Rs-B) */
|
||||
}t_st25r3916Regs;
|
||||
typedef struct {
|
||||
uint8_t RsA[(
|
||||
ST25R3916_REG_IC_IDENTITY + 1U)]; /*!< Registers contained on ST25R3916 space A (Rs-A) */
|
||||
uint8_t
|
||||
RsB[ST25R3916_SPACE_B_REG_LEN]; /*!< Registers contained on ST25R3916 space B (Rs-B) */
|
||||
} t_st25r3916Regs;
|
||||
|
||||
/*! Parameters how the stream mode should work */
|
||||
struct st25r3916StreamConfig {
|
||||
uint8_t useBPSK; /*!< 0: subcarrier, 1:BPSK */
|
||||
uint8_t din; /*!< Divider for the in subcarrier frequency: fc/2^din */
|
||||
uint8_t dout; /*!< Divider for the in subcarrier frequency fc/2^dout */
|
||||
uint8_t report_period_length; /*!< Length of the reporting period 2^report_period_length*/
|
||||
uint8_t useBPSK; /*!< 0: subcarrier, 1:BPSK */
|
||||
uint8_t din; /*!< Divider for the in subcarrier frequency: fc/2^din */
|
||||
uint8_t dout; /*!< Divider for the in subcarrier frequency fc/2^dout */
|
||||
uint8_t report_period_length; /*!< Length of the reporting period 2^report_period_length*/
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
* GLOBAL DEFINES
|
||||
@@ -92,53 +91,86 @@ struct st25r3916StreamConfig {
|
||||
*/
|
||||
|
||||
/* ST25R3916 direct commands */
|
||||
#define ST25R3916_CMD_SET_DEFAULT 0xC1U /*!< Puts the chip in default state (same as after power-up) */
|
||||
#define ST25R3916_CMD_STOP 0xC2U /*!< Stops all activities and clears FIFO */
|
||||
#define ST25R3916_CMD_TRANSMIT_WITH_CRC 0xC4U /*!< Transmit with CRC */
|
||||
#define ST25R3916_CMD_TRANSMIT_WITHOUT_CRC 0xC5U /*!< Transmit without CRC */
|
||||
#define ST25R3916_CMD_TRANSMIT_REQA 0xC6U /*!< Transmit REQA */
|
||||
#define ST25R3916_CMD_TRANSMIT_WUPA 0xC7U /*!< Transmit WUPA */
|
||||
#define ST25R3916_CMD_INITIAL_RF_COLLISION 0xC8U /*!< NFC transmit with Initial RF Collision Avoidance */
|
||||
#define ST25R3916_CMD_RESPONSE_RF_COLLISION_N 0xC9U /*!< NFC transmit with Response RF Collision Avoidance */
|
||||
#define ST25R3916_CMD_GOTO_SENSE 0xCDU /*!< Passive target logic to Sense/Idle state */
|
||||
#define ST25R3916_CMD_GOTO_SLEEP 0xCEU /*!< Passive target logic to Sleep/Halt state */
|
||||
#define ST25R3916_CMD_MASK_RECEIVE_DATA 0xD0U /*!< Mask receive data */
|
||||
#define ST25R3916_CMD_UNMASK_RECEIVE_DATA 0xD1U /*!< Unmask receive data */
|
||||
#define ST25R3916_CMD_AM_MOD_STATE_CHANGE 0xD2U /*!< AM Modulation state change */
|
||||
#define ST25R3916_CMD_MEASURE_AMPLITUDE 0xD3U /*!< Measure singal amplitude on RFI inputs */
|
||||
#define ST25R3916_CMD_RESET_RXGAIN 0xD5U /*!< Reset RX Gain */
|
||||
#define ST25R3916_CMD_ADJUST_REGULATORS 0xD6U /*!< Adjust regulators */
|
||||
#define ST25R3916_CMD_CALIBRATE_DRIVER_TIMING 0xD8U /*!< Starts the sequence to adjust the driver timing */
|
||||
#define ST25R3916_CMD_MEASURE_PHASE 0xD9U /*!< Measure phase between RFO and RFI signal */
|
||||
#define ST25R3916_CMD_CLEAR_RSSI 0xDAU /*!< Clear RSSI bits and restart the measurement */
|
||||
#define ST25R3916_CMD_CLEAR_FIFO 0xDBU /*!< Clears FIFO, Collision and IRQ status */
|
||||
#define ST25R3916_CMD_TRANSPARENT_MODE 0xDCU /*!< Transparent mode */
|
||||
#define ST25R3916_CMD_CALIBRATE_C_SENSOR 0xDDU /*!< Calibrate the capacitive sensor */
|
||||
#define ST25R3916_CMD_MEASURE_CAPACITANCE 0xDEU /*!< Measure capacitance */
|
||||
#define ST25R3916_CMD_MEASURE_VDD 0xDFU /*!< Measure power supply voltage */
|
||||
#define ST25R3916_CMD_START_GP_TIMER 0xE0U /*!< Start the general purpose timer */
|
||||
#define ST25R3916_CMD_START_WUP_TIMER 0xE1U /*!< Start the wake-up timer */
|
||||
#define ST25R3916_CMD_START_MASK_RECEIVE_TIMER 0xE2U /*!< Start the mask-receive timer */
|
||||
#define ST25R3916_CMD_START_NO_RESPONSE_TIMER 0xE3U /*!< Start the no-response timer */
|
||||
#define ST25R3916_CMD_START_PPON2_TIMER 0xE4U /*!< Start PPon2 timer */
|
||||
#define ST25R3916_CMD_STOP_NRT 0xE8U /*!< Stop No Response Timer */
|
||||
#define ST25R3916_CMD_SPACE_B_ACCESS 0xFBU /*!< Enable R/W access to the test registers */
|
||||
#define ST25R3916_CMD_TEST_ACCESS 0xFCU /*!< Enable R/W access to the test registers */
|
||||
#define ST25R3916_CMD_SET_DEFAULT \
|
||||
0xC1U /*!< Puts the chip in default state (same as after power-up) */
|
||||
#define ST25R3916_CMD_STOP 0xC2U /*!< Stops all activities and clears FIFO */
|
||||
#define ST25R3916_CMD_TRANSMIT_WITH_CRC \
|
||||
0xC4U /*!< Transmit with CRC */
|
||||
#define ST25R3916_CMD_TRANSMIT_WITHOUT_CRC \
|
||||
0xC5U /*!< Transmit without CRC */
|
||||
#define ST25R3916_CMD_TRANSMIT_REQA \
|
||||
0xC6U /*!< Transmit REQA */
|
||||
#define ST25R3916_CMD_TRANSMIT_WUPA \
|
||||
0xC7U /*!< Transmit WUPA */
|
||||
#define ST25R3916_CMD_INITIAL_RF_COLLISION \
|
||||
0xC8U /*!< NFC transmit with Initial RF Collision Avoidance */
|
||||
#define ST25R3916_CMD_RESPONSE_RF_COLLISION_N \
|
||||
0xC9U /*!< NFC transmit with Response RF Collision Avoidance */
|
||||
#define ST25R3916_CMD_GOTO_SENSE \
|
||||
0xCDU /*!< Passive target logic to Sense/Idle state */
|
||||
#define ST25R3916_CMD_GOTO_SLEEP \
|
||||
0xCEU /*!< Passive target logic to Sleep/Halt state */
|
||||
#define ST25R3916_CMD_MASK_RECEIVE_DATA \
|
||||
0xD0U /*!< Mask receive data */
|
||||
#define ST25R3916_CMD_UNMASK_RECEIVE_DATA \
|
||||
0xD1U /*!< Unmask receive data */
|
||||
#define ST25R3916_CMD_AM_MOD_STATE_CHANGE \
|
||||
0xD2U /*!< AM Modulation state change */
|
||||
#define ST25R3916_CMD_MEASURE_AMPLITUDE \
|
||||
0xD3U /*!< Measure singal amplitude on RFI inputs */
|
||||
#define ST25R3916_CMD_RESET_RXGAIN \
|
||||
0xD5U /*!< Reset RX Gain */
|
||||
#define ST25R3916_CMD_ADJUST_REGULATORS \
|
||||
0xD6U /*!< Adjust regulators */
|
||||
#define ST25R3916_CMD_CALIBRATE_DRIVER_TIMING \
|
||||
0xD8U /*!< Starts the sequence to adjust the driver timing */
|
||||
#define ST25R3916_CMD_MEASURE_PHASE \
|
||||
0xD9U /*!< Measure phase between RFO and RFI signal */
|
||||
#define ST25R3916_CMD_CLEAR_RSSI \
|
||||
0xDAU /*!< Clear RSSI bits and restart the measurement */
|
||||
#define ST25R3916_CMD_CLEAR_FIFO \
|
||||
0xDBU /*!< Clears FIFO, Collision and IRQ status */
|
||||
#define ST25R3916_CMD_TRANSPARENT_MODE \
|
||||
0xDCU /*!< Transparent mode */
|
||||
#define ST25R3916_CMD_CALIBRATE_C_SENSOR \
|
||||
0xDDU /*!< Calibrate the capacitive sensor */
|
||||
#define ST25R3916_CMD_MEASURE_CAPACITANCE \
|
||||
0xDEU /*!< Measure capacitance */
|
||||
#define ST25R3916_CMD_MEASURE_VDD \
|
||||
0xDFU /*!< Measure power supply voltage */
|
||||
#define ST25R3916_CMD_START_GP_TIMER \
|
||||
0xE0U /*!< Start the general purpose timer */
|
||||
#define ST25R3916_CMD_START_WUP_TIMER \
|
||||
0xE1U /*!< Start the wake-up timer */
|
||||
#define ST25R3916_CMD_START_MASK_RECEIVE_TIMER \
|
||||
0xE2U /*!< Start the mask-receive timer */
|
||||
#define ST25R3916_CMD_START_NO_RESPONSE_TIMER \
|
||||
0xE3U /*!< Start the no-response timer */
|
||||
#define ST25R3916_CMD_START_PPON2_TIMER \
|
||||
0xE4U /*!< Start PPon2 timer */
|
||||
#define ST25R3916_CMD_STOP_NRT \
|
||||
0xE8U /*!< Stop No Response Timer */
|
||||
#define ST25R3916_CMD_SPACE_B_ACCESS \
|
||||
0xFBU /*!< Enable R/W access to the test registers */
|
||||
#define ST25R3916_CMD_TEST_ACCESS \
|
||||
0xFCU /*!< Enable R/W access to the test registers */
|
||||
|
||||
#define ST25R3916_THRESHOLD_DO_NOT_SET \
|
||||
0xFFU /*!< Indicates not to change this Threshold */
|
||||
|
||||
#define ST25R3916_THRESHOLD_DO_NOT_SET 0xFFU /*!< Indicates not to change this Threshold */
|
||||
|
||||
#define ST25R3916_BR_DO_NOT_SET 0xFFU /*!< Indicates not to change this Bit Rate */
|
||||
#define ST25R3916_BR_106 0x00U /*!< ST25R3916 Bit Rate 106 kbit/s (fc/128) */
|
||||
#define ST25R3916_BR_212 0x01U /*!< ST25R3916 Bit Rate 212 kbit/s (fc/64) */
|
||||
#define ST25R3916_BR_424 0x02U /*!< ST25R3916 Bit Rate 424 kbit/s (fc/32) */
|
||||
#define ST25R3916_BR_848 0x03U /*!< ST25R3916 Bit Rate 848 kbit/s (fc/16) */
|
||||
#define ST25R3916_BR_1695 0x04U /*!< ST25R3916 Bit Rate 1696 kbit/s (fc/8) */
|
||||
#define ST25R3916_BR_3390 0x05U /*!< ST25R3916 Bit Rate 3390 kbit/s (fc/4) */
|
||||
#define ST25R3916_BR_6780 0x07U /*!< ST25R3916 Bit Rate 6780 kbit/s (fc/2) */
|
||||
|
||||
#define ST25R3916_FIFO_DEPTH 512U /*!< Depth of FIFO */
|
||||
#define ST25R3916_TOUT_OSC_STABLE 10U /*!< Max timeout for Oscillator to get stable DS: 700us */
|
||||
#define ST25R3916_BR_DO_NOT_SET \
|
||||
0xFFU /*!< Indicates not to change this Bit Rate */
|
||||
#define ST25R3916_BR_106 0x00U /*!< ST25R3916 Bit Rate 106 kbit/s (fc/128) */
|
||||
#define ST25R3916_BR_212 0x01U /*!< ST25R3916 Bit Rate 212 kbit/s (fc/64) */
|
||||
#define ST25R3916_BR_424 0x02U /*!< ST25R3916 Bit Rate 424 kbit/s (fc/32) */
|
||||
#define ST25R3916_BR_848 0x03U /*!< ST25R3916 Bit Rate 848 kbit/s (fc/16) */
|
||||
#define ST25R3916_BR_1695 0x04U /*!< ST25R3916 Bit Rate 1696 kbit/s (fc/8) */
|
||||
#define ST25R3916_BR_3390 0x05U /*!< ST25R3916 Bit Rate 3390 kbit/s (fc/4) */
|
||||
#define ST25R3916_BR_6780 0x07U /*!< ST25R3916 Bit Rate 6780 kbit/s (fc/2) */
|
||||
|
||||
#define ST25R3916_FIFO_DEPTH 512U /*!< Depth of FIFO */
|
||||
#define ST25R3916_TOUT_OSC_STABLE \
|
||||
10U /*!< Max timeout for Oscillator to get stable DS: 700us */
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
@@ -147,31 +179,55 @@ struct st25r3916StreamConfig {
|
||||
*/
|
||||
|
||||
/*! Enables the Transmitter (Field On) and Receiver */
|
||||
#define st25r3916TxRxOn() st25r3916SetRegisterBits( ST25R3916_REG_OP_CONTROL, (ST25R3916_REG_OP_CONTROL_rx_en | ST25R3916_REG_OP_CONTROL_tx_en ) )
|
||||
#define st25r3916TxRxOn() \
|
||||
st25r3916SetRegisterBits( \
|
||||
ST25R3916_REG_OP_CONTROL, \
|
||||
(ST25R3916_REG_OP_CONTROL_rx_en | ST25R3916_REG_OP_CONTROL_tx_en))
|
||||
|
||||
/*! Disables the Transmitter (Field Off) and Receiver */
|
||||
#define st25r3916TxRxOff() st25r3916ClrRegisterBits( ST25R3916_REG_OP_CONTROL, (ST25R3916_REG_OP_CONTROL_rx_en | ST25R3916_REG_OP_CONTROL_tx_en ) )
|
||||
#define st25r3916TxRxOff() \
|
||||
st25r3916ClrRegisterBits( \
|
||||
ST25R3916_REG_OP_CONTROL, \
|
||||
(ST25R3916_REG_OP_CONTROL_rx_en | ST25R3916_REG_OP_CONTROL_tx_en))
|
||||
|
||||
/*! Disables the Transmitter (Field Off) */
|
||||
#define st25r3916TxOff() st25r3916ClrRegisterBits( ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_tx_en )
|
||||
#define st25r3916TxOff() \
|
||||
st25r3916ClrRegisterBits(ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_tx_en)
|
||||
|
||||
/*! Checks if General Purpose Timer is still running by reading gpt_on flag */
|
||||
#define st25r3916IsGPTRunning( ) st25r3916CheckReg( ST25R3916_REG_NFCIP1_BIT_RATE, ST25R3916_REG_NFCIP1_BIT_RATE_gpt_on, ST25R3916_REG_NFCIP1_BIT_RATE_gpt_on )
|
||||
#define st25r3916IsGPTRunning() \
|
||||
st25r3916CheckReg( \
|
||||
ST25R3916_REG_NFCIP1_BIT_RATE, \
|
||||
ST25R3916_REG_NFCIP1_BIT_RATE_gpt_on, \
|
||||
ST25R3916_REG_NFCIP1_BIT_RATE_gpt_on)
|
||||
|
||||
/*! Checks if External Filed is detected by reading ST25R3916 External Field Detector output */
|
||||
#define st25r3916IsExtFieldOn() st25r3916CheckReg( ST25R3916_REG_AUX_DISPLAY, ST25R3916_REG_AUX_DISPLAY_efd_o, ST25R3916_REG_AUX_DISPLAY_efd_o )
|
||||
#define st25r3916IsExtFieldOn() \
|
||||
st25r3916CheckReg( \
|
||||
ST25R3916_REG_AUX_DISPLAY, \
|
||||
ST25R3916_REG_AUX_DISPLAY_efd_o, \
|
||||
ST25R3916_REG_AUX_DISPLAY_efd_o)
|
||||
|
||||
/*! Checks if Transmitter is enabled (Field On) */
|
||||
#define st25r3916IsTxEnabled() st25r3916CheckReg( ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_tx_en, ST25R3916_REG_OP_CONTROL_tx_en )
|
||||
#define st25r3916IsTxEnabled() \
|
||||
st25r3916CheckReg( \
|
||||
ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_tx_en, ST25R3916_REG_OP_CONTROL_tx_en)
|
||||
|
||||
/*! Checks if NRT is in EMV mode */
|
||||
#define st25r3916IsNRTinEMV() st25r3916CheckReg( ST25R3916_REG_TIMER_EMV_CONTROL, ST25R3916_REG_TIMER_EMV_CONTROL_nrt_emv, ST25R3916_REG_TIMER_EMV_CONTROL_nrt_emv_on )
|
||||
#define st25r3916IsNRTinEMV() \
|
||||
st25r3916CheckReg( \
|
||||
ST25R3916_REG_TIMER_EMV_CONTROL, \
|
||||
ST25R3916_REG_TIMER_EMV_CONTROL_nrt_emv, \
|
||||
ST25R3916_REG_TIMER_EMV_CONTROL_nrt_emv_on)
|
||||
|
||||
/*! Checks if last FIFO byte is complete */
|
||||
#define st25r3916IsLastFIFOComplete() st25r3916CheckReg( ST25R3916_REG_FIFO_STATUS2, ST25R3916_REG_FIFO_STATUS2_fifo_lb_mask, 0 )
|
||||
#define st25r3916IsLastFIFOComplete() \
|
||||
st25r3916CheckReg(ST25R3916_REG_FIFO_STATUS2, ST25R3916_REG_FIFO_STATUS2_fifo_lb_mask, 0)
|
||||
|
||||
/*! Checks if the Oscillator is enabled */
|
||||
#define st25r3916IsOscOn() st25r3916CheckReg( ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_en, ST25R3916_REG_OP_CONTROL_en )
|
||||
#define st25r3916IsOscOn() \
|
||||
st25r3916CheckReg( \
|
||||
ST25R3916_REG_OP_CONTROL, ST25R3916_REG_OP_CONTROL_en, ST25R3916_REG_OP_CONTROL_en)
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
@@ -193,7 +249,7 @@ struct st25r3916StreamConfig {
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916Initialize( void );
|
||||
ReturnCode st25r3916Initialize(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -203,7 +259,7 @@ ReturnCode st25r3916Initialize( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
void st25r3916Deinitialize( void );
|
||||
void st25r3916Deinitialize(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -217,7 +273,7 @@ void st25r3916Deinitialize( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916OscOn( void );
|
||||
ReturnCode st25r3916OscOn(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -235,7 +291,7 @@ ReturnCode st25r3916OscOn( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916SetBitrate( uint8_t txrate, uint8_t rxrate );
|
||||
ReturnCode st25r3916SetBitrate(uint8_t txrate, uint8_t rxrate);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -254,7 +310,7 @@ ReturnCode st25r3916SetBitrate( uint8_t txrate, uint8_t rxrate );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916AdjustRegulators( uint16_t* result_mV );
|
||||
ReturnCode st25r3916AdjustRegulators(uint16_t* result_mV);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -270,7 +326,7 @@ ReturnCode st25r3916AdjustRegulators( uint16_t* result_mV );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916MeasureAmplitude( uint8_t* result );
|
||||
ReturnCode st25r3916MeasureAmplitude(uint8_t* result);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -288,7 +344,7 @@ ReturnCode st25r3916MeasureAmplitude( uint8_t* result );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
uint8_t st25r3916MeasurePowerSupply( uint8_t mpsv );
|
||||
uint8_t st25r3916MeasurePowerSupply(uint8_t mpsv);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -307,7 +363,7 @@ uint8_t st25r3916MeasurePowerSupply( uint8_t mpsv );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
uint16_t st25r3916MeasureVoltage( uint8_t mpsv );
|
||||
uint16_t st25r3916MeasureVoltage(uint8_t mpsv);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -323,8 +379,7 @@ uint16_t st25r3916MeasureVoltage( uint8_t mpsv );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916MeasurePhase( uint8_t* result );
|
||||
|
||||
ReturnCode st25r3916MeasurePhase(uint8_t* result);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -340,7 +395,7 @@ ReturnCode st25r3916MeasurePhase( uint8_t* result );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916MeasureCapacitance( uint8_t* result );
|
||||
ReturnCode st25r3916MeasureCapacitance(uint8_t* result);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -364,7 +419,7 @@ ReturnCode st25r3916MeasureCapacitance( uint8_t* result );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916CalibrateCapacitiveSensor( uint8_t* result );
|
||||
ReturnCode st25r3916CalibrateCapacitiveSensor(uint8_t* result);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -377,7 +432,7 @@ ReturnCode st25r3916CalibrateCapacitiveSensor( uint8_t* result );
|
||||
*
|
||||
* \return the value of the NRT in 64/fc
|
||||
*/
|
||||
uint32_t st25r3916GetNoResponseTime( void );
|
||||
uint32_t st25r3916GetNoResponseTime(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -392,7 +447,7 @@ uint32_t st25r3916GetNoResponseTime( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916SetNoResponseTime( uint32_t nrt_64fcs );
|
||||
ReturnCode st25r3916SetNoResponseTime(uint32_t nrt_64fcs);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -409,7 +464,7 @@ ReturnCode st25r3916SetNoResponseTime( uint32_t nrt_64fcs );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916SetStartNoResponseTimer( uint32_t nrt_64fcs );
|
||||
ReturnCode st25r3916SetStartNoResponseTimer(uint32_t nrt_64fcs);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -421,7 +476,7 @@ ReturnCode st25r3916SetStartNoResponseTimer( uint32_t nrt_64fcs );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
void st25r3916SetGPTime( uint16_t gpt_8fcs );
|
||||
void st25r3916SetGPTime(uint16_t gpt_8fcs);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -438,7 +493,7 @@ void st25r3916SetGPTime( uint16_t gpt_8fcs );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916SetStartGPTimer( uint16_t gpt_8fcs, uint8_t trigger_source );
|
||||
ReturnCode st25r3916SetStartGPTimer(uint16_t gpt_8fcs, uint8_t trigger_source);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -451,7 +506,7 @@ ReturnCode st25r3916SetStartGPTimer( uint16_t gpt_8fcs, uint8_t trigger_source )
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
void st25r3916SetNumTxBits( uint16_t nBits );
|
||||
void st25r3916SetNumTxBits(uint16_t nBits);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -463,7 +518,7 @@ void st25r3916SetNumTxBits( uint16_t nBits );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
uint16_t st25r3916GetNumFIFOBytes( void );
|
||||
uint16_t st25r3916GetNumFIFOBytes(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -476,7 +531,7 @@ uint16_t st25r3916GetNumFIFOBytes( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
uint8_t st25r3916GetNumFIFOLastBits( void );
|
||||
uint8_t st25r3916GetNumFIFOLastBits(void);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -499,7 +554,11 @@ uint8_t st25r3916GetNumFIFOLastBits( void );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916PerformCollisionAvoidance( uint8_t FieldONCmd, uint8_t pdThreshold, uint8_t caThreshold, uint8_t nTRFW );
|
||||
ReturnCode st25r3916PerformCollisionAvoidance(
|
||||
uint8_t FieldONCmd,
|
||||
uint8_t pdThreshold,
|
||||
uint8_t caThreshold,
|
||||
uint8_t nTRFW);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -515,7 +574,7 @@ ReturnCode st25r3916PerformCollisionAvoidance( uint8_t FieldONCmd, uint8_t pdThr
|
||||
* \return true when IC type is as expected
|
||||
* \return false otherwise
|
||||
*/
|
||||
bool st25r3916CheckChipID( uint8_t *rev );
|
||||
bool st25r3916CheckChipID(uint8_t* rev);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -528,7 +587,7 @@ bool st25r3916CheckChipID( uint8_t *rev );
|
||||
* \return ERR_NONE : No error
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916GetRegsDump( t_st25r3916Regs* regDump );
|
||||
ReturnCode st25r3916GetRegsDump(t_st25r3916Regs* regDump);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -543,7 +602,7 @@ ReturnCode st25r3916GetRegsDump( t_st25r3916Regs* regDump );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
bool st25r3916IsCmdValid( uint8_t cmd );
|
||||
bool st25r3916IsCmdValid(uint8_t cmd);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -558,7 +617,7 @@ bool st25r3916IsCmdValid( uint8_t cmd );
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916StreamConfigure( const struct st25r3916StreamConfig *config );
|
||||
ReturnCode st25r3916StreamConfigure(const struct st25r3916StreamConfig* config);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -577,7 +636,8 @@ ReturnCode st25r3916StreamConfigure( const struct st25r3916StreamConfig *config
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916ExecuteCommandAndGetResult( uint8_t cmd, uint8_t resReg, uint8_t tout, uint8_t* result );
|
||||
ReturnCode
|
||||
st25r3916ExecuteCommandAndGetResult(uint8_t cmd, uint8_t resReg, uint8_t tout, uint8_t* result);
|
||||
|
||||
/*!
|
||||
*****************************************************************************
|
||||
@@ -595,7 +655,7 @@ ReturnCode st25r3916ExecuteCommandAndGetResult( uint8_t cmd, uint8_t resReg, uin
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
ReturnCode st25r3916GetRSSI( uint16_t *amRssi, uint16_t *pmRssi );
|
||||
ReturnCode st25r3916GetRSSI(uint16_t* amRssi, uint16_t* pmRssi);
|
||||
#endif /* ST25R3916_H */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user