diff options
| author | Chris Gunn <[email protected]> | 2018-12-11 17:47:03 -0800 |
|---|---|---|
| committer | Chris Gunn <[email protected]> | 2019-01-08 16:37:40 -0800 |
| commit | c400fd8f0b50f3b5b2c51ba2b16eb8e90e7f0700 (patch) | |
| tree | 56f1f744f5c59ca7153484aedf1d776f50a562be /nfc/NfcCxSample/README.md | |
| parent | 693d7cc6da06e374a0931123f0b5d8c29c945b97 (diff) | |
Add NFC CX sample driver.
Diffstat (limited to 'nfc/NfcCxSample/README.md')
| -rw-r--r-- | nfc/NfcCxSample/README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nfc/NfcCxSample/README.md b/nfc/NfcCxSample/README.md new file mode 100644 index 00000000..fe2abbc8 --- /dev/null +++ b/nfc/NfcCxSample/README.md @@ -0,0 +1,49 @@ +--- +topic: sample +name: NFC CX client driver sample +description: Sample code for creating a NFC driver using the NFC Class Extension. +generateZip: true +author: windows-driver-content +languages: +- cpp +products: +- windows +technologies: +- WDF +- UMDF2 +--- + +# NFC CX client driver sample + +A template for creating an NFC functional driver using the NFC Class Extension (CX) driver. + +This is a complete version of the code created in the [NFC CX quick start guide](https://docs.microsoft.com/windows-hardware/drivers/nfc/nfc-class-extension-quickstart). + +## Prerequisites + +To use the NFC CX, your NFC Controller must implement NFC Forum's [NFC Controller Interface (NCI)](https://nfc-forum.org/our-work/specifications-and-application-documents/specifications/nfc-controller-interface-nci-specification/) protocol. + +In addition, the NFC CX requires the driver to use the [UMDF 2](https://docs.microsoft.com/windows-hardware/drivers/wdf/overview-of-the-umdf) framework. + +## Universal windows driver compliant + +This sample builds a Universal Windows Driver. It uses only APIs and DDIs that are included in OneCoreUAP. + +## File manifest + +### WDK + +- [NfcCx.h](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/nfccx/) - The NFC CX's client driver API. (This file is included in the WDK.) + +### Project + +- [Driver.cpp](windows-drivertemplate-nfc/Driver.cpp) + - `DriverEntry` - Driver initialization. + +- [Device.cpp](windows-drivertemplate-nfc/Device.cpp) + - `DeviceContext::AddDevice` - Device initialization, including initializing the NFC CX driver. + - `DeviceContext::WriteNciPacket` - The implementation of the [`EvtNfcCxWriteNciPacket`](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/nfccx/nc-nfccx-evt_nfc_cx_write_nci_packet) callback function. + - `DeviceContext::ReadNciPacket` - Demonstrates calling [`NfcCxNciReadNotification`](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/nfccx/nf-nfccx-nfccxncireadnotification). + +- [Device.h](windows-drivertemplate-nfc/Device.h) + - `DeviceContext` - The class that stores the device instance's state. |
