1/*
2 * Copyright (C) 2010 NXP Semiconductors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * \file phDalNfc_link.h
19 * \brief DAL generic link interface for linux
20 *
21 * Project: Trusted NFC Linux Lignt
22 *
23 * $Date: 10 aug 2009
24 * $Author: Jonathan roux
25 * $Revision: 1.0 $
26 *
27 */
28
29/**< Basic type definitions */
30#include <phNfcTypes.h>
31/**< Generic Interface Layer Function Definitions */
32#include <phNfcInterface.h>
33#include <phDal4Nfc.h>
34
35typedef void      (*phDal4Nfc_link_initialize_CB_t)           (void);
36typedef void      (*phDal4Nfc_link_set_open_from_handle_CB_t) (phHal_sHwReference_t * pDalHwContext);
37typedef int       (*phDal4Nfc_link_is_opened_CB_t)            (void);
38typedef void      (*phDal4Nfc_link_flush_CB_t)                (void);
39typedef void      (*phDal4Nfc_link_close_CB_t)                (void);
40typedef NFCSTATUS (*phDal4Nfc_link_open_and_configure_CB_t)   (pphDal4Nfc_sConfig_t pConfig, void ** pLinkHandle);
41typedef int       (*phDal4Nfc_link_read_CB_t)                 (uint8_t * pBuffer, int nNbBytesToRead);
42typedef int       (*phDal4Nfc_link_write_CB_t)                (uint8_t * pBuffer, int nNbBytesToWrite);
43typedef int       (*phDal4Nfc_link_download_CB_t)             (long level);
44typedef int       (*phDal4Nfc_link_reset_CB_t)                (long level);
45
46
47typedef struct
48{
49   phDal4Nfc_link_initialize_CB_t              init;
50   phDal4Nfc_link_set_open_from_handle_CB_t    open_from_handle;
51   phDal4Nfc_link_is_opened_CB_t               is_opened;
52   phDal4Nfc_link_flush_CB_t                   flush;
53   phDal4Nfc_link_close_CB_t                   close;
54   phDal4Nfc_link_open_and_configure_CB_t      open_and_configure;
55   phDal4Nfc_link_read_CB_t                    read;
56   phDal4Nfc_link_write_CB_t                   write;
57   phDal4Nfc_link_download_CB_t                download;
58   phDal4Nfc_link_reset_CB_t                   reset;
59} phDal4Nfc_link_cbk_interface_t;
60
61
62