Flatten include directory structure
Test: compiles
Change-Id: If26cf3ff39e06478d7621c23ff3472bd280e5fe2
diff --git a/src/Android.bp b/src/Android.bp
index aaa1835..a69a6ab 100644
--- a/src/Android.bp
+++ b/src/Android.bp
@@ -31,12 +31,8 @@
"include",
"gki/ulinux",
"gki/common",
- "hal/include",
- "hal/int",
"nfa/include",
- "nfa/int",
"nfc/include",
- "nfc/int",
],
srcs: [
"nfa/ce/*.cc",
diff --git a/src/hal/include/gki_hal_target.h b/src/include/gki_hal_target.h
similarity index 100%
rename from src/hal/include/gki_hal_target.h
rename to src/include/gki_hal_target.h
diff --git a/src/hal/include/nci_defs.h b/src/include/nci_defs.h
similarity index 98%
rename from src/hal/include/nci_defs.h
rename to src/include/nci_defs.h
index 966bc3c..22192da 100644
--- a/src/hal/include/nci_defs.h
+++ b/src/include/nci_defs.h
@@ -129,8 +129,8 @@
(pbf) = (*(p)&NCI_PBF_MASK) >> NCI_PBF_SHIFT;
/* parse byte1 of NCI Cmd/Ntf */
-#define NCI_MSG_PRS_HDR1(p, oid) \
- (oid) = (*(p)&NCI_OID_MASK); \
+#define NCI_MSG_PRS_HDR1(p, oid) \
+ (oid) = (*(p)&NCI_OID_MASK); \
(p)++;
/* NCI Data Format:
@@ -152,11 +152,11 @@
*(p)++ = 0; \
*(p)++ = (len);
-#define NCI_DATA_PRS_HDR(p, pbf, cid, len) \
- (pbf) = (*(p)&NCI_PBF_MASK) >> NCI_PBF_SHIFT; \
- (cid) = (*(p)&NCI_CID_MASK); \
- (p)++; \
- (p)++; \
+#define NCI_DATA_PRS_HDR(p, pbf, cid, len) \
+ (pbf) = (*(p)&NCI_PBF_MASK) >> NCI_PBF_SHIFT; \
+ (cid) = (*(p)&NCI_CID_MASK); \
+ (p)++; \
+ (p)++; \
(len) = *(p)++;
/* Logical target ID 0x01-0xFE */
diff --git a/src/hal/int/nfc_brcm_defs.h b/src/include/nfc_brcm_defs.h
similarity index 100%
rename from src/hal/int/nfc_brcm_defs.h
rename to src/include/nfc_brcm_defs.h
diff --git a/src/hal/include/nfc_hal_api.h b/src/include/nfc_hal_api.h
similarity index 100%
rename from src/hal/include/nfc_hal_api.h
rename to src/include/nfc_hal_api.h
diff --git a/src/hal/int/nfc_hal_int.h b/src/include/nfc_hal_int.h
similarity index 100%
rename from src/hal/int/nfc_hal_int.h
rename to src/include/nfc_hal_int.h
diff --git a/src/hal/int/nfc_hal_int_api.h b/src/include/nfc_hal_int_api.h
similarity index 100%
rename from src/hal/int/nfc_hal_int_api.h
rename to src/include/nfc_hal_int_api.h
diff --git a/src/hal/int/nfc_hal_nv_ci.h b/src/include/nfc_hal_nv_ci.h
similarity index 100%
rename from src/hal/int/nfc_hal_nv_ci.h
rename to src/include/nfc_hal_nv_ci.h
diff --git a/src/hal/int/nfc_hal_nv_co.h b/src/include/nfc_hal_nv_co.h
similarity index 100%
rename from src/hal/int/nfc_hal_nv_co.h
rename to src/include/nfc_hal_nv_co.h
diff --git a/src/hal/int/nfc_hal_post_reset.h b/src/include/nfc_hal_post_reset.h
similarity index 100%
rename from src/hal/int/nfc_hal_post_reset.h
rename to src/include/nfc_hal_post_reset.h
diff --git a/src/hal/include/nfc_hal_target.h b/src/include/nfc_hal_target.h
similarity index 100%
rename from src/hal/include/nfc_hal_target.h
rename to src/include/nfc_hal_target.h
diff --git a/src/hal/include/nfc_types.h b/src/include/nfc_types.h
similarity index 94%
rename from src/hal/include/nfc_types.h
rename to src/include/nfc_types.h
index d373335..77149cf 100644
--- a/src/hal/include/nfc_types.h
+++ b/src/include/nfc_types.h
@@ -129,16 +129,16 @@
register int ijk; \
for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[ijk]; \
}
-#define REVERSE_ARRAY_TO_STREAM(p, a, len) \
- { \
- register int ijk; \
- for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[(len) - 1 - ijk]; \
+#define REVERSE_ARRAY_TO_STREAM(p, a, len) \
+ { \
+ register int ijk; \
+ for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[(len)-1 - ijk]; \
}
-#define STREAM_TO_UINT8(u8, p) \
- { \
- (u8) = (uint8_t)(*(p)); \
- (p) += 1; \
+#define STREAM_TO_UINT8(u8, p) \
+ { \
+ (u8) = (uint8_t)(*(p)); \
+ (p) += 1; \
}
#define STREAM_TO_UINT16(u16, p) \
{ \
@@ -148,14 +148,14 @@
#define STREAM_TO_UINT24(u32, p) \
{ \
(u32) = (((uint32_t)(*(p))) + ((((uint32_t)(*((p) + 1)))) << 8) + \
- ((((uint32_t)(*((p) + 2)))) << 16)); \
+ ((((uint32_t)(*((p) + 2)))) << 16)); \
(p) += 3; \
}
#define STREAM_TO_UINT32(u32, p) \
{ \
(u32) = (((uint32_t)(*(p))) + ((((uint32_t)(*((p) + 1)))) << 8) + \
- ((((uint32_t)(*((p) + 2)))) << 16) + \
- ((((uint32_t)(*((p) + 3)))) << 24)); \
+ ((((uint32_t)(*((p) + 2)))) << 16) + \
+ ((((uint32_t)(*((p) + 3)))) << 24)); \
(p) += 4; \
}
#define STREAM_TO_BDADDR(a, p) \
@@ -202,7 +202,7 @@
#define REVERSE_STREAM_TO_ARRAY(a, p, len) \
{ \
register int ijk; \
- register uint8_t* _pa = (uint8_t*)(a) + (len) - 1; \
+ register uint8_t* _pa = (uint8_t*)(a) + (len)-1; \
for (ijk = 0; ijk < (len); ijk++) *_pa-- = *(p)++; \
}
@@ -262,10 +262,10 @@
for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[ijk]; \
}
-#define BE_STREAM_TO_UINT8(u8, p) \
- { \
- (u8) = (uint8_t)(*(p)); \
- (p) += 1; \
+#define BE_STREAM_TO_UINT8(u8, p) \
+ { \
+ (u8) = (uint8_t)(*(p)); \
+ (p) += 1; \
}
#define BE_STREAM_TO_UINT16(u16, p) \
{ \
@@ -275,14 +275,14 @@
#define BE_STREAM_TO_UINT24(u32, p) \
{ \
(u32) = (((uint32_t)(*((p) + 2))) + ((uint32_t)(*((p) + 1)) << 8) + \
- ((uint32_t)(*(p)) << 16)); \
+ ((uint32_t)(*(p)) << 16)); \
(p) += 3; \
}
-#define BE_STREAM_TO_UINT32(u32, p) \
- { \
- (u32) = ((uint32_t)(*((p) + 3)) + ((uint32_t)(*((p) + 2)) << 8) + \
- ((uint32_t)(*((p) + 1)) << 16) + ((uint32_t)(*(p)) << 24)); \
- (p) += 4; \
+#define BE_STREAM_TO_UINT32(u32, p) \
+ { \
+ (u32) = ((uint32_t)(*((p) + 3)) + ((uint32_t)(*((p) + 2)) << 8) + \
+ ((uint32_t)(*((p) + 1)) << 16) + ((uint32_t)(*(p)) << 24)); \
+ (p) += 4; \
}
#define BE_STREAM_TO_ARRAY(p, a, len) \
{ \
diff --git a/src/nfa/int/nfa_ce_int.h b/src/nfa/include/nfa_ce_int.h
similarity index 100%
rename from src/nfa/int/nfa_ce_int.h
rename to src/nfa/include/nfa_ce_int.h
diff --git a/src/nfa/int/nfa_dm_int.h b/src/nfa/include/nfa_dm_int.h
similarity index 100%
rename from src/nfa/int/nfa_dm_int.h
rename to src/nfa/include/nfa_dm_int.h
diff --git a/src/nfa/int/nfa_dta_int.h b/src/nfa/include/nfa_dta_int.h
similarity index 100%
rename from src/nfa/int/nfa_dta_int.h
rename to src/nfa/include/nfa_dta_int.h
diff --git a/src/nfa/int/nfa_ee_int.h b/src/nfa/include/nfa_ee_int.h
similarity index 96%
rename from src/nfa/int/nfa_ee_int.h
rename to src/nfa/include/nfa_ee_int.h
index 349b0ad..580a222 100644
--- a/src/nfa/int/nfa_ee_int.h
+++ b/src/nfa/include/nfa_ee_int.h
@@ -421,15 +421,15 @@
tNFA_EE_CBACK* p_ee_cback[NFA_EE_MAX_CBACKS]; /* to report EE events */
tNFA_EE_CBACK* p_ee_disc_cback; /* to report EE discovery result */
tNFA_EE_ENABLE_DONE_CBACK*
- p_enable_cback; /* callback to notify on enable done*/
- tNFA_EE_EM_STATE em_state; /* NFA-EE state initialized or not */
- uint8_t wait_rsp; /* num of NCI rsp expected (update) */
- uint8_t num_ee_expecting; /* number of ee_info still expecting*/
- uint8_t cur_ee; /* the number of ee_info in cb */
- uint8_t ee_cfged; /* the bit mask of configured ECBs */
- uint8_t ee_cfg_sts; /* configuration status */
- tNFA_EE_WAIT ee_wait_evt; /* Pending event(s) to be reported */
- tNFA_EE_FLAGS ee_flags; /* flags */
+ p_enable_cback; /* callback to notify on enable done*/
+ tNFA_EE_EM_STATE em_state; /* NFA-EE state initialized or not */
+ uint8_t wait_rsp; /* num of NCI rsp expected (update) */
+ uint8_t num_ee_expecting; /* number of ee_info still expecting*/
+ uint8_t cur_ee; /* the number of ee_info in cb */
+ uint8_t ee_cfged; /* the bit mask of configured ECBs */
+ uint8_t ee_cfg_sts; /* configuration status */
+ tNFA_EE_WAIT ee_wait_evt; /* Pending event(s) to be reported */
+ tNFA_EE_FLAGS ee_flags; /* flags */
uint8_t route_block_control; /* controls route block feature */
} tNFA_EE_CB;
diff --git a/src/nfa/int/nfa_hci_int.h b/src/nfa/include/nfa_hci_int.h
similarity index 99%
rename from src/nfa/int/nfa_hci_int.h
rename to src/nfa/include/nfa_hci_int.h
index 23129dc..8c6b836 100644
--- a/src/nfa/int/nfa_hci_int.h
+++ b/src/nfa/include/nfa_hci_int.h
@@ -366,8 +366,8 @@
/* NFA HCI control block */
typedef struct {
- tNFA_HCI_STATE hci_state; /* state of the HCI */
- uint8_t num_nfcee; /* Number of NFCEE ID Discovered */
+ tNFA_HCI_STATE hci_state; /* state of the HCI */
+ uint8_t num_nfcee; /* Number of NFCEE ID Discovered */
tNFA_EE_INFO ee_info[NFA_HCI_MAX_HOST_IN_NETWORK]; /*NFCEE ID Info*/
uint8_t num_ee_dis_req_ntf; /* Number of ee discovery request ntf received */
uint8_t num_hot_plug_evts; /* Number of Hot plug events received after ee
diff --git a/src/nfa/int/nfa_p2p_int.h b/src/nfa/include/nfa_p2p_int.h
similarity index 100%
rename from src/nfa/int/nfa_p2p_int.h
rename to src/nfa/include/nfa_p2p_int.h
diff --git a/src/nfa/int/nfa_rw_int.h b/src/nfa/include/nfa_rw_int.h
similarity index 100%
rename from src/nfa/int/nfa_rw_int.h
rename to src/nfa/include/nfa_rw_int.h
diff --git a/src/nfa/int/nfa_snep_int.h b/src/nfa/include/nfa_snep_int.h
similarity index 100%
rename from src/nfa/int/nfa_snep_int.h
rename to src/nfa/include/nfa_snep_int.h
diff --git a/src/nfa/int/nfa_sys.h b/src/nfa/include/nfa_sys.h
similarity index 100%
rename from src/nfa/int/nfa_sys.h
rename to src/nfa/include/nfa_sys.h
diff --git a/src/nfa/int/nfa_sys_int.h b/src/nfa/include/nfa_sys_int.h
similarity index 100%
rename from src/nfa/int/nfa_sys_int.h
rename to src/nfa/include/nfa_sys_int.h
diff --git a/src/nfa/int/nfa_sys_ptim.h b/src/nfa/include/nfa_sys_ptim.h
similarity index 100%
rename from src/nfa/int/nfa_sys_ptim.h
rename to src/nfa/include/nfa_sys_ptim.h
diff --git a/src/nfc/int/ce_int.h b/src/nfc/include/ce_int.h
similarity index 100%
rename from src/nfc/int/ce_int.h
rename to src/nfc/include/ce_int.h
diff --git a/src/nfc/int/llcp_int.h b/src/nfc/include/llcp_int.h
similarity index 98%
rename from src/nfc/int/llcp_int.h
rename to src/nfc/include/llcp_int.h
index 4135102..84f6617 100644
--- a/src/nfc/int/llcp_int.h
+++ b/src/nfc/include/llcp_int.h
@@ -107,8 +107,8 @@
*/
typedef struct {
- uint8_t link_type; /* logical link and/or data link */
- char* p_service_name; /* GKI buffer containing service name */
+ uint8_t link_type; /* logical link and/or data link */
+ char* p_service_name; /* GKI buffer containing service name */
tLLCP_APP_CBACK* p_app_cback; /* application's callback pointer */
BUFFER_Q ui_xmit_q; /* UI PDU queue for transmitting */
diff --git a/src/nfc/int/nfc_int.h b/src/nfc/include/nfc_int.h
similarity index 94%
rename from src/nfc/int/nfc_int.h
rename to src/nfc/include/nfc_int.h
index 97238fa..9c04fea 100644
--- a/src/nfc/int/nfc_int.h
+++ b/src/nfc/include/nfc_int.h
@@ -125,15 +125,15 @@
typedef struct {
tNFC_CONN_CBACK* p_cback; /* the callback function to receive the data */
- BUFFER_Q tx_q; /* transmit queue */
- BUFFER_Q rx_q; /* receive queue */
- uint8_t id; /* NFCEE ID or RF Discovery ID or NFC_TEST_ID */
- uint8_t act_protocol; /* the active protocol on this logical connection */
+ BUFFER_Q tx_q; /* transmit queue */
+ BUFFER_Q rx_q; /* receive queue */
+ uint8_t id; /* NFCEE ID or RF Discovery ID or NFC_TEST_ID */
+ uint8_t act_protocol; /* the active protocol on this logical connection */
uint8_t act_interface; /* the active interface on this logical connection */
- uint8_t conn_id; /* the connection id assigned by NFCC for this conn */
- uint8_t buff_size; /* the max buffer size for this connection. . */
- uint8_t num_buff; /* num of buffers left to send on this connection */
- uint8_t init_credits; /* initial num of buffer credits */
+ uint8_t conn_id; /* the connection id assigned by NFCC for this conn */
+ uint8_t buff_size; /* the max buffer size for this connection. . */
+ uint8_t num_buff; /* num of buffers left to send on this connection */
+ uint8_t init_credits; /* initial num of buffer credits */
} tNFC_CONN_CB;
/* This data type is for NFC task to send a NCI VS command to NCIT task */
@@ -197,7 +197,7 @@
TIMER_LIST_Q timer_queue; /* 1-sec timer event queue */
TIMER_LIST_Q quick_timer_queue;
TIMER_LIST_ENT mode_set_ntf_timer; /* Timer to wait for deactivation */
- TIMER_LIST_ENT deactivate_timer; /* Timer to wait for deactivation */
+ TIMER_LIST_ENT deactivate_timer; /* Timer to wait for deactivation */
tNFC_STATE nfc_state;
bool reassembly; /* Reassemble fragmented data pkt */
diff --git a/src/nfc/int/nfc_vs.h b/src/nfc/include/nfc_vs.h
similarity index 100%
rename from src/nfc/int/nfc_vs.h
rename to src/nfc/include/nfc_vs.h
diff --git a/src/nfc/int/rw_int.h b/src/nfc/include/rw_int.h
similarity index 100%
rename from src/nfc/int/rw_int.h
rename to src/nfc/include/rw_int.h
diff --git a/src/nfc/int/tags_int.h b/src/nfc/include/tags_int.h
similarity index 100%
rename from src/nfc/int/tags_int.h
rename to src/nfc/include/tags_int.h