Skip to content

Commit a789f47

Browse files
committed
first commit
0 parents  commit a789f47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+15748
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/
2+
sdkconfig.old
3+

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
3+
# project subdirectory.
4+
#
5+
6+
PROJECT_NAME := nfc_attendence_system
7+
8+
include $(IDF_PATH)/make/project.mk
9+

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ESP32 Attendence System
2+
=======================
3+

components/nfc/component.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
COMPONENT_SRCDIRS := nfc nfc/buses nfc/chips nfc/drivers
2+
3+
COMPONENT_ADD_INCLUDEDIRS := include nfc
4+
5+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*-
2+
* Free/Libre Near Field Communication (NFC) library
3+
*
4+
* Libnfc historical contributors:
5+
* Copyright (C) 2009 Roel Verdult
6+
* Copyright (C) 2009-2013 Romuald Conty
7+
* Copyright (C) 2010-2012 Romain Tartière
8+
* Copyright (C) 2010-2013 Philippe Teuwen
9+
* Copyright (C) 2012-2013 Ludovic Rousseau
10+
* See AUTHORS file for a more comprehensive list of contributors.
11+
* Additional contributors of this file:
12+
*
13+
* This program is free software: you can redistribute it and/or modify it
14+
* under the terms of the GNU Lesser General Public License as published by the
15+
* Free Software Foundation, either version 3 of the License, or (at your
16+
* option) any later version.
17+
*
18+
* This program is distributed in the hope that it will be useful, but WITHOUT
19+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21+
* more details.
22+
*
23+
* You should have received a copy of the GNU Lesser General Public License
24+
* along with this program. If not, see <http://www.gnu.org/licenses/>
25+
*/
26+
27+
/**
28+
* @file nfc-emulation.h
29+
* @brief Provide a small API to ease emulation in libnfc
30+
*/
31+
32+
#ifndef __NFC_EMULATION_H__
33+
#define __NFC_EMULATION_H__
34+
35+
//#include <sys/types.h>
36+
#include "nfc.h"
37+
38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif /* __cplusplus */
41+
42+
struct nfc_emulator;
43+
struct nfc_emulation_state_machine;
44+
45+
/**
46+
* @struct nfc_emulator
47+
* @brief NFC emulator structure
48+
*/
49+
struct nfc_emulator {
50+
nfc_target *target;
51+
struct nfc_emulation_state_machine *state_machine;
52+
void *user_data;
53+
};
54+
55+
/**
56+
* @struct nfc_emulation_state_machine
57+
* @brief NFC emulation state machine structure
58+
*/
59+
struct nfc_emulation_state_machine {
60+
int (*io)(struct nfc_emulator *emulator, const uint8_t *data_in, const size_t data_in_len, uint8_t *data_out, const size_t data_out_len);
61+
void *data;
62+
};
63+
64+
NFC_EXPORT int nfc_emulate_target(nfc_device *pnd, struct nfc_emulator *emulator, const int timeout);
65+
66+
#ifdef __cplusplus
67+
}
68+
#endif /* __cplusplus */
69+
70+
71+
#endif /* __NFC_EMULATION_H__ */

0 commit comments

Comments
 (0)