Mbed OS Reference
Loading...
Searching...
No Matches
PN512Driver.h
1/* mbed Microcontroller Library
2 * Copyright (c) 2018 ARM Limited
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef MBED_PN512_DRIVER_H
19#define MBED_PN512_DRIVER_H
20
21#include <stdint.h>
22
23#include "nfc/NFCControllerDriver.h"
24#include "PN512TransportDriver.h"
25
29#include "transceiver/pn512.h"
30
31namespace mbed {
32namespace nfc {
33
35public:
36 PN512Driver(PN512TransportDriver *transport_driver);
37
38 virtual nfc_transceiver_t *initialize(nfc_scheduler_timer_t *scheduler_timer);
39 virtual void get_supported_nfc_techs(nfc_tech_t *initiator, nfc_tech_t *target) const;
40
41private:
42 // PN512TransportDriver::Delegate implementation
43 virtual void on_hw_interrupt();
44
45 PN512TransportDriver *_transport_driver;
46 pn512_t _pn512;
47};
48
49} // namespace nfc
50} // namespace mbed
51
52#endif
The abstraction for a NFC controller driver.
virtual void get_supported_nfc_techs(nfc_tech_t *initiator, nfc_tech_t *target) const
Retrieve list of technologies supported by the controller.
virtual nfc_transceiver_t * initialize(nfc_scheduler_timer_t *scheduler_timer)
Initialize the driver and retrieve the interface to the controller.
The PN512 supports multiple transport mechanisms (SPI, I2C, UART): this class provides a unified API ...
Definition: pn512.h:53
The PN512TransportDriver delegate.