From a2e7517215458b984b64330a6876df8f804ccdd7 Mon Sep 17 00:00:00 2001 From: Ruchi Kandoi Date: Wed, 23 Nov 2016 10:21:06 -0800 Subject: [PATCH] nfc: Add nfc-base.h Test: Compiles Bug: 32748647 Change-Id: I53d1d4b73091920ef1dc32f32ca31b87db5e38c2 Signed-off-by: Ruchi Kandoi --- include/hardware/nfc-base.h | 32 ++++++++++++++++++++++++++++++++ include/hardware/nfc.h | 26 +------------------------- 2 files changed, 33 insertions(+), 25 deletions(-) create mode 100644 include/hardware/nfc-base.h diff --git a/include/hardware/nfc-base.h b/include/hardware/nfc-base.h new file mode 100644 index 00000000..d53e7594 --- /dev/null +++ b/include/hardware/nfc-base.h @@ -0,0 +1,32 @@ +// This file is autogenerated by hidl-gen. Do not edit manually. + +#ifndef HIDL_GENERATED_android_hardware_nfc_V1_0__EXPORTED_CONSTANTS_H_ +#define HIDL_GENERATED_android_hardware_nfc_V1_0__EXPORTED_CONSTANTS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + HAL_NFC_OPEN_CPLT_EVT = 0, + HAL_NFC_CLOSE_CPLT_EVT = 1, + HAL_NFC_POST_INIT_CPLT_EVT = 2, + HAL_NFC_PRE_DISCOVER_CPLT_EVT = 3, + HAL_NFC_REQUEST_CONTROL_EVT = 4, + HAL_NFC_RELEASE_CONTROL_EVT = 5, + HAL_NFC_ERROR_EVT = 6, +}; + +enum { + HAL_NFC_STATUS_OK = 0, + HAL_NFC_STATUS_FAILED = 1, + HAL_NFC_STATUS_ERR_TRANSPORT = 2, + HAL_NFC_STATUS_ERR_CMD_TIMEOUT = 3, + HAL_NFC_STATUS_REFUSED = 4, +}; + +#ifdef __cplusplus +} +#endif + +#endif // HIDL_GENERATED_android_hardware_nfc_V1_0__EXPORTED_CONSTANTS_H_ diff --git a/include/hardware/nfc.h b/include/hardware/nfc.h index 58d33d90..fdd79a55 100644 --- a/include/hardware/nfc.h +++ b/include/hardware/nfc.h @@ -23,6 +23,7 @@ #include #include +#include "nfc-base.h" __BEGIN_DECLS @@ -69,34 +70,9 @@ typedef struct nfc_nci_module_t { struct hw_module_t common; } nfc_nci_module_t; -/* - * HAL events that can be passed back to the stack - */ typedef uint8_t nfc_event_t; - -enum { - HAL_NFC_OPEN_CPLT_EVT = 0x00, - HAL_NFC_CLOSE_CPLT_EVT = 0x01, - HAL_NFC_POST_INIT_CPLT_EVT = 0x02, - HAL_NFC_PRE_DISCOVER_CPLT_EVT = 0x03, - HAL_NFC_REQUEST_CONTROL_EVT = 0x04, - HAL_NFC_RELEASE_CONTROL_EVT = 0x05, - HAL_NFC_ERROR_EVT = 0x06 -}; - -/* - * Allowed status return values for each of the HAL methods - */ typedef uint8_t nfc_status_t; -enum { - HAL_NFC_STATUS_OK = 0x00, - HAL_NFC_STATUS_FAILED = 0x01, - HAL_NFC_STATUS_ERR_TRANSPORT = 0x02, - HAL_NFC_STATUS_ERR_CMD_TIMEOUT = 0x03, - HAL_NFC_STATUS_REFUSED = 0x04 -}; - /* * The callback passed in from the NFC stack that the HAL * can use to pass events back to the stack.