Merge "nfc: Add nfc-base.h"

This commit is contained in:
Ruchi Kandoi 2016-11-30 20:45:03 +00:00 committed by Gerrit Code Review
commit 45182ed0e8
2 changed files with 33 additions and 25 deletions

View file

@ -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_

View file

@ -23,6 +23,7 @@
#include <sys/types.h>
#include <hardware/hardware.h>
#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.