2009-10-12 14:52:26 +00:00
|
|
|
/**
|
|
|
|
* Public platform independent Near Field Communication (NFC) library
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009, Roel Verdult
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
|
|
|
*
|
2009-11-04 10:14:17 +00:00
|
|
|
* @file acr122.h
|
2009-10-12 14:52:26 +00:00
|
|
|
* @brief
|
|
|
|
*/
|
2009-04-29 12:51:13 +00:00
|
|
|
|
2009-11-24 13:03:48 +00:00
|
|
|
#ifndef __NFC_DRIVER_ACR122_H__
|
|
|
|
#define __NFC_DRIVER_ACR122_H__
|
2009-02-12 12:39:05 +00:00
|
|
|
|
2009-05-27 10:13:19 +00:00
|
|
|
#include <stdint.h>
|
2009-05-27 14:05:07 +00:00
|
|
|
#include <stdbool.h>
|
2009-05-27 10:13:19 +00:00
|
|
|
|
2009-11-10 09:47:59 +00:00
|
|
|
|
2009-12-01 14:23:00 +00:00
|
|
|
#include <nfc/nfc-types.h>
|
2009-02-12 12:39:05 +00:00
|
|
|
|
2009-11-24 13:03:48 +00:00
|
|
|
#define ACR122_DRIVER_NAME "ACR122"
|
|
|
|
|
|
|
|
nfc_device_desc_t* acr122_pick_device(void);
|
2009-11-24 17:49:24 +00:00
|
|
|
bool acr122_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound);
|
2009-11-24 13:03:48 +00:00
|
|
|
|
2009-04-29 12:51:13 +00:00
|
|
|
// Functions used by developer to handle connection to this device
|
2009-11-09 11:23:33 +00:00
|
|
|
nfc_device_t* acr122_connect(const nfc_device_desc_t* pndd);
|
|
|
|
void acr122_disconnect(nfc_device_t* pnd);
|
2009-04-29 12:51:13 +00:00
|
|
|
|
|
|
|
// Callback function used by libnfc to transmit commands to the PN53X chip
|
2009-11-18 10:52:13 +00:00
|
|
|
bool acr122_transceive(const nfc_device_spec_t nds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen);
|
2009-02-12 12:39:05 +00:00
|
|
|
|
2009-04-29 12:51:13 +00:00
|
|
|
// Various additional features this device supports
|
2009-11-18 10:52:13 +00:00
|
|
|
char* acr122_firmware(const nfc_device_spec_t nds);
|
|
|
|
bool acr122_led_red(const nfc_device_spec_t nds, bool bOn);
|
2009-02-12 12:39:05 +00:00
|
|
|
|
2009-11-24 13:03:48 +00:00
|
|
|
#endif // ! __NFC_DRIVER_ACR122_H__
|
2009-02-12 12:39:05 +00:00
|
|
|
|