Booten in Titelbild.
[hackover2013-badge-firmware.git] / drivers / rf / pn532 / pn532_bus.h
1 /**************************************************************************/
2 /*!
3 @file pn532_bus.h
4 */
5 /**************************************************************************/
6
7 #ifndef __PN532_BUS_H__
8 #define __PN532_BUS_H__
9
10 #include "projectconfig.h"
11 #include "pn532.h"
12
13 // #define PN532_BUS_UART
14 #define PN532_BUS_I2C
15
16 #define PN532_RSTPD_PORT (3)
17 #define PN532_RSTPD_PIN (1)
18 #define PN532_I2C_IRQPORT (3)
19 #define PN532_I2C_IRQPIN (2)
20
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)
26
27 #define PN532_UART_BAUDRATE (115200)
28
29 #define PN532_I2C_ADDRESS (0x48)
30 #define PN532_I2C_READBIT (0x01)
31 #define PN532_I2C_READYTIMEOUT (20) // Max number of attempts to read Ready bit (see UM 5-Nov-2007 Section 6.2.4)
32
33 // Generic interface for the different serial buses available on the PN532
34 void pn532_bus_HWInit(void);
35 pn532_error_t pn532_bus_SendCommand(const byte_t * pbtData, const size_t szData);
36 pn532_error_t pn532_bus_ReadResponse(byte_t * pbtResponse, size_t * pszRxLen);
37 pn532_error_t pn532_bus_Wakeup(void);
38
39 #endif
This page took 0.050381 seconds and 5 git commands to generate.