-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: nfc: NFC-driver structure + nRF-NFC and nt3h2x11 support
NFC driver structure to support multiple NFC driver with the same API Signed-off-by: Hessel van der Molen <[email protected]>
- Loading branch information
Showing
17 changed files
with
3,014 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# Copyright (c) 2023 Sendrato | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
if (CONFIG_NFC_NT3H2X11) | ||
zephyr_sources(nt3h2x11.c) | ||
endif() | ||
|
||
if (CONFIG_NFC_NRFX) | ||
zephyr_sources(nrfxnfc.c) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# Copyright (c) 2023 Sendrato | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
menuconfig NFC | ||
bool "NFC drivers" | ||
|
||
if NFC | ||
|
||
rsource "Kconfig.nt3h2x11" | ||
rsource "Kconfig.nrfxnfc" | ||
|
||
endif # NFC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Copyright (c) 2023 Sendrato | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
config NFC_NRFX | ||
bool "nRFx-NFC driver" | ||
default n | ||
select NRFX_NFCT | ||
help | ||
Enable nRFx NFC driver. | ||
|
||
if NFC_NRFX | ||
|
||
config NFC_NRFX_DRV_NAME | ||
string "Device Tree name of nRFx-NFC driver" | ||
default "nRFxNFC" | ||
help | ||
Device Tree name of nRFx-NFC driver. | ||
|
||
config NFC_NRFX_INIT_PRIORITY | ||
int "NFC_NRFX NFC driver init priority" | ||
default 75 | ||
|
||
config NFC_NRFX_MAX_PAYLOAD_SIZE | ||
int "Max payload in bytes" | ||
default 988 | ||
|
||
# KConfig used by nrfxlib-sdk too | ||
config NFC_T2T_NRFXLIB | ||
bool "NFC Type 2 Tag library" | ||
|
||
# KConfig used by nrfxlib-sdk too | ||
config NFC_T4T_NRFXLIB | ||
bool "NFC Type 4 Tag library" | ||
|
||
endif # NFC_NRFX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# Copyright (c) 2023 Sendrato | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
config NFC_NT3H2X11 | ||
bool "NT3H2X11 NFC driver" | ||
default n | ||
depends on I2C | ||
help | ||
Enable I2C-based driver for NT3H2X11 led driver. | ||
|
||
if NFC_NT3H2X11 | ||
|
||
config NFC_NT3H2X11_2K | ||
bool "Use 2k memory map instead of 1k" | ||
default n | ||
help | ||
Use 2k memory map instead of 1k | ||
|
||
config NFC_NT3H2X11_MAX_WRITE_DELAY | ||
int "delay in ms" | ||
default 10 | ||
help | ||
Max I2C write delay in ms for when writing EEPROM | ||
|
||
config NFC_NT3H2X11_INIT_PRIORITY | ||
int "NT3H2X11 NFC driver init priority" | ||
default 75 | ||
|
||
module = NT3H2X11 | ||
module-str = nt3h2x11 | ||
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" | ||
|
||
endif # NFC_NT3H2X11 |
Oops, something went wrong.