diff options
author | Ruchi Kandoi | 2018-02-27 18:34:34 -0600 |
---|---|---|
committer | Ruchi Kandoi | 2018-03-09 17:47:18 -0600 |
commit | d128c87f70bde9605d647fa543c2e77fbae028d0 (patch) | |
tree | 61d7c71e7fd279ae1fca87fb9bd5648bd8bc4684 /nfc/1.1 | |
parent | 7df64ea2fd8c8e501ac1ba5cb05def96f8a8d49e (diff) | |
download | platform-hardware-interfaces-d128c87f70bde9605d647fa543c2e77fbae028d0.tar.gz platform-hardware-interfaces-d128c87f70bde9605d647fa543c2e77fbae028d0.tar.xz platform-hardware-interfaces-d128c87f70bde9605d647fa543c2e77fbae028d0.zip |
NFC 1.1: Add getConfigs() method
Test: Boot and check Nfc configs initialized
Bug: 72080121
Merged-In: I000cea4491b2bd136b9ece232b9d73293804c733
Change-Id: I000cea4491b2bd136b9ece232b9d73293804c733
Diffstat (limited to 'nfc/1.1')
-rw-r--r-- | nfc/1.1/Android.bp | 4 | ||||
-rw-r--r-- | nfc/1.1/INfc.hal | 7 | ||||
-rw-r--r-- | nfc/1.1/types.hal | 75 |
3 files changed, 86 insertions, 0 deletions
diff --git a/nfc/1.1/Android.bp b/nfc/1.1/Android.bp index 73dc70ad..9a1392ee 100644 --- a/nfc/1.1/Android.bp +++ b/nfc/1.1/Android.bp | |||
@@ -16,7 +16,11 @@ hidl_interface { | |||
16 | "android.hidl.base@1.0", | 16 | "android.hidl.base@1.0", |
17 | ], | 17 | ], |
18 | types: [ | 18 | types: [ |
19 | "Constant", | ||
20 | "NfcConfig", | ||
19 | "NfcEvent", | 21 | "NfcEvent", |
22 | "PresenceCheckAlgorithm", | ||
23 | "ProtocolDiscoveryConfig", | ||
20 | ], | 24 | ], |
21 | gen_java: true, | 25 | gen_java: true, |
22 | } | 26 | } |
diff --git a/nfc/1.1/INfc.hal b/nfc/1.1/INfc.hal index ea6a571c..b629d8ca 100644 --- a/nfc/1.1/INfc.hal +++ b/nfc/1.1/INfc.hal | |||
@@ -49,4 +49,11 @@ interface INfc extends @1.0::INfc { | |||
49 | * NfcStatus::SUCCESS otherwise. | 49 | * NfcStatus::SUCCESS otherwise. |
50 | */ | 50 | */ |
51 | open_1_1(INfcClientCallback clientCallback) generates (NfcStatus status); | 51 | open_1_1(INfcClientCallback clientCallback) generates (NfcStatus status); |
52 | |||
53 | /** | ||
54 | * Fetches vendor specific configurations. | ||
55 | * @return config indicates support for certain features and | ||
56 | * populates the vendor specific configs | ||
57 | */ | ||
58 | getConfig() generates (NfcConfig config); | ||
52 | }; | 59 | }; |
diff --git a/nfc/1.1/types.hal b/nfc/1.1/types.hal index 2f5ec7f0..469e878d 100644 --- a/nfc/1.1/types.hal +++ b/nfc/1.1/types.hal | |||
@@ -21,3 +21,78 @@ enum NfcEvent : @1.0::NfcEvent { | |||
21 | /** In case of an error, HCI network needs to be re-initialized */ | 21 | /** In case of an error, HCI network needs to be re-initialized */ |
22 | HCI_NETWORK_RESET = 7 | 22 | HCI_NETWORK_RESET = 7 |
23 | }; | 23 | }; |
24 | |||
25 | enum Constant : uint8_t { | ||
26 | UNSUPPORTED_CONFIG = 0xFF, | ||
27 | }; | ||
28 | |||
29 | /** | ||
30 | * Vendor Specific Proprietary Protocol & Discovery Configuration. | ||
31 | * Set to UNSUPPORTED_CONFIG if not supported. | ||
32 | * discovery* fields map to "RF Technology and Mode" in NCI Spec | ||
33 | * protocol* fields map to "RF protocols" in NCI Spec | ||
34 | */ | ||
35 | struct ProtocolDiscoveryConfig { | ||
36 | uint8_t protocol18092Active; | ||
37 | uint8_t protocolBPrime; | ||
38 | uint8_t protocolDual; | ||
39 | uint8_t protocol15693; | ||
40 | uint8_t protocolKovio; | ||
41 | uint8_t protocolMifare; | ||
42 | uint8_t discoveryPollKovio; | ||
43 | uint8_t discoveryPollBPrime; | ||
44 | uint8_t discoveryListenBPrime; | ||
45 | }; | ||
46 | |||
47 | /* Presence Check Algorithm as per ISO/IEC 14443-4 */ | ||
48 | enum PresenceCheckAlgorithm : uint8_t { | ||
49 | /** Lets the stack select an algorithm */ | ||
50 | DEFAULT = 0, | ||
51 | /** ISO-DEP protocol's empty I-block */ | ||
52 | I_BLOCK = 1, | ||
53 | /** | ||
54 | * Type - 4 tag protocol iso-dep nak presence check command is sent waiting for | ||
55 | * response and notification. | ||
56 | */ | ||
57 | ISO_DEP_NAK = 2 | ||
58 | }; | ||
59 | |||
60 | struct NfcConfig { | ||
61 | /** If true, NFCC is using bail out mode for either Type A or Type B poll. */ | ||
62 | bool nfaPollBailOutMode; | ||
63 | |||
64 | PresenceCheckAlgorithm presenceCheckAlgorithm; | ||
65 | |||
66 | ProtocolDiscoveryConfig nfaProprietaryCfg; | ||
67 | |||
68 | /** Default off-host route. 0x00 if there aren't any. Refer to NCI spec. */ | ||
69 | uint8_t defaultOffHostRoute; | ||
70 | |||
71 | /** | ||
72 | * Default off-host route for Felica. 0x00 if there aren't any. Refer to | ||
73 | * NCI spec. | ||
74 | */ | ||
75 | uint8_t defaultOffHostRouteFelica; | ||
76 | |||
77 | /** Default system code route. 0x00 if there aren't any. Refer NCI spec */ | ||
78 | uint8_t defaultSystemCodeRoute; | ||
79 | |||
80 | /** | ||
81 | * Default route for all remaining protocols and technology which haven't | ||
82 | * been configured. | ||
83 | * Device Host(0x00) is the default. Refer to NCI spec. | ||
84 | * */ | ||
85 | uint8_t defaultRoute; | ||
86 | |||
87 | /** Pipe ID for eSE. 0x00 if there aren't any. */ | ||
88 | uint8_t offHostESEPipeId; | ||
89 | |||
90 | /** Pipe ID for UICC. 0x00 if there aren't any. */ | ||
91 | uint8_t offHostSIMPipeId; | ||
92 | |||
93 | /** Extended APDU length for ISO_DEP. If not supported default length is 261 */ | ||
94 | uint32_t maxIsoDepTransceiveLength; | ||
95 | |||
96 | /** list of white listed host ids, as per ETSI TS 102 622 */ | ||
97 | vec<uint8_t> hostWhitelist; | ||
98 | }; | ||