Functions

pn532_uart.c File Reference

PN532 driver using UART bus (UART, RS232, etc.). More...

#include "../drivers.h"
#include <stdio.h>
#include <string.h>
#include "pn532_uart.h"
#include <nfc/nfc.h>
#include <nfc/nfc-messages.h>
#include "uart.h"

Go to the source code of this file.

Functions

void pn532_uart_wakeup (const nfc_device_spec_t nds)
bool pn532_uart_check_communication (const nfc_device_spec_t nds, bool *success)
bool pn532_uart_list_devices (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound)

Detailed Description

PN532 driver using UART bus (UART, RS232, etc.).

Definition in file pn532_uart.c.


Function Documentation

bool pn532_uart_check_communication ( const nfc_device_spec_t  nds,
bool *  success 
)

To be sure that PN532 is alive, we have put a "Diagnose" command to execute a "Communication Line Test"

Definition at line 299 of file pn532_uart.c.

bool pn532_uart_list_devices ( nfc_device_desc_t  pnddDevices[],
size_t  szDevices,
size_t *  pszDeviceFound 
)

Note:
: Due to UART bus we can't know if its really a pn532 without sending some PN53x commands. But using this way to probe devices, we can have serious problem with other device on this bus

Definition at line 72 of file pn532_uart.c.

void pn532_uart_wakeup ( const nfc_device_spec_t  nds  ) 

PN532C106 wakeup.

High Speed Unit (HSU) wake up consist to send 0x55 and wait a "long" delay for PN532 being wakeup.

After the preamble we request the PN532C106 chip to switch to "normal" mode (SAM is not used)

Definition at line 277 of file pn532_uart.c.