1 /**************************************************************************/
5 /**************************************************************************/
7 #ifndef __PN532_BUS_H__
8 #define __PN532_BUS_H__
10 #include "projectconfig.h"
13 #define PN532_BUS_UART
14 // #define PN532_BUS_I2C
16 #define PN532_RSTPD_PORT (2)
17 #define PN532_RSTPD_PIN (2)
18 #define PN532_SPI_CSPORT (0)
19 #define PN532_SPI_CSPIN (2)
21 #define PN532_NORMAL_FRAME__DATA_MAX_LEN (254)
22 #define PN532_NORMAL_FRAME__OVERHEAD (8)
23 #define PN532_EXTENDED_FRAME__DATA_MAX_LEN (264)
24 #define PN532_EXTENDED_FRAME__OVERHEAD (11)
25 #define PN532_BUFFER_LEN (PN532_EXTENDED_FRAME__DATA_MAX_LEN + PN532_EXTENDED_FRAME__OVERHEAD)
27 #define PN532_UART_BAUDRATE (115200)
29 #define PN532_I2C_ADDRESS (0x48)
30 #define PN532_I2C_READBIT (0x01)
32 // Generic interface for the different serial buses available on the PN532
33 void pn532_bus_HWInit(void);
34 pn532_error_t
pn532_bus_SendCommand(const byte_t
* pbtData
, const size_t szData
);
35 pn532_error_t
pn532_bus_ReadResponse(byte_t
* pbtResponse
, size_t * pszRxLen
);
36 bool pn532_bus_TransceiveBytes(const byte_t
* pbtTx
, const size_t szTx
, byte_t
* pbtRx
, size_t * pszRx
);
37 pn532_error_t
pn532_bus_Wakeup(void);
This page took 0.055857 seconds and 5 git commands to generate.