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