nfc: Add nfc-base.h

Test: Compiles
Bug: 32748647
Change-Id: I53d1d4b73091920ef1dc32f32ca31b87db5e38c2
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
This commit is contained in:
Ruchi Kandoi 2016-11-23 10:21:06 -08:00 committed by Andre Eisenbach
parent a76ae0e511
commit a2e7517215
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.