Minor comments added.

This commit is contained in:
Romuald Conty 2010-04-09 23:09:20 +00:00
parent ae99d155b5
commit 71341b871e

View file

@ -36,7 +36,6 @@
#include <nfc/nfc-messages.h> #include <nfc/nfc-messages.h>
// Bus // Bus
#include "uart.h" #include "uart.h"
@ -87,7 +86,7 @@ pn532_uart_pick_device (void)
bool bool
pn532_uart_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound) 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 /** @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 * sending some PN53x commands. But using this way to probe devices, we can
* have serious problem with other device on this bus */ * have serious problem with other device on this bus */
#ifndef SERIAL_AUTOPROBE_ENABLED #ifndef SERIAL_AUTOPROBE_ENABLED
@ -116,7 +115,8 @@ pn532_uart_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_
if ((sp != INVALID_SERIAL_PORT) && (sp != CLAIMED_SERIAL_PORT)) if ((sp != INVALID_SERIAL_PORT) && (sp != CLAIMED_SERIAL_PORT))
{ {
// PN532_UART device found // Serial port claimed: a PN532_UART may be found...
// FIXME try to send a command to PN53x to know if you really have a PN53x connected here
uart_close(sp); uart_close(sp);
snprintf(pnddDevices[*pszDeviceFound].acDevice, DEVICE_NAME_LENGTH - 1, "%s (%s)", "PN532", acConnect); snprintf(pnddDevices[*pszDeviceFound].acDevice, DEVICE_NAME_LENGTH - 1, "%s (%s)", "PN532", acConnect);
pnddDevices[*pszDeviceFound].acDevice[DEVICE_NAME_LENGTH - 1] = '\0'; pnddDevices[*pszDeviceFound].acDevice[DEVICE_NAME_LENGTH - 1] = '\0';