Nfc: Change return types for Nfc hal to specified type.

Test: Compiles and test passes
Bug: 32998929
Change-Id: I6787b90e5e745b32c7a5a951203496cc614fdc10
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
diff --git a/nfc/1.0/INfc.hal b/nfc/1.0/INfc.hal
index 1c952db..c6e1511 100644
--- a/nfc/1.0/INfc.hal
+++ b/nfc/1.0/INfc.hal
@@ -27,72 +27,80 @@
      * NCI initialization - ie accept CORE_RESET and subsequent commands through
      * the write() call.
      *
-     * If open() returns 0, the NCI stack will wait for a NfcEvent.OPEN_CPLT
-     * before continuing.
+     * If open() returns NfcStatus::OK, the NCI stack will wait for a
+     * NfcEvent.OPEN_CPLT before continuing.
      *
-     * If open() returns any other value, the NCI stack will stop.
+     * If open() returns NfcStatus::FAILED, the NCI stack will stop.
      *
      */
     @entry
     @callflow(next={"write", "coreInitialized", "prediscover", "powerCycle", "controlGranted"})
-    open(INfcClientCallback clientCallback) generates (int32_t retval);
+    open(INfcClientCallback clientCallback) generates (NfcStatus status);
 
     /*
      * Performs an NCI write.
      *
      * This method may queue writes and return immediately. The only
      * requirement is that the writes are executed in order.
+     *
+     * @return number of bytes written to the NFCC
      */
     @callflow(next={"write", "prediscover", "coreInitialized", "close", "powerCycle",
                     "controlGranted"})
-    write(NfcData data) generates (int32_t retval);
+    write(NfcData data) generates (uint32_t retval);
 
     /*
-     * coreInitialized() is called after the CORE_INIT_RSP is received from the NFCC.
-     * At this time, the HAL can do any chip-specific configuration.
+     * coreInitialized() is called after the CORE_INIT_RSP is received from the
+     * NFCC. At this time, the HAL can do any chip-specific configuration.
      *
-     * If coreInitialized() returns 0, the NCI stack will wait for a NfcEvent.POST_INIT_CPLT
-     * before continuing.
+     * If coreInitialized() returns NfcStatus::OK, the NCI stack will wait for a
+     * NfcEvent.POST_INIT_CPLT before continuing.
      *
-     * If coreInitialized() returns any other value, the NCI stack will continue
-     * immediately.
+     * If coreInitialized() returns NfcStatus::FAILED, the NCI stack will
+     * continue immediately.
      */
     @callflow(next={"write", "prediscover", "close"})
-    coreInitialized(NfcData data) generates (int32_t retval);
+    coreInitialized(NfcData data) generates (NfcStatus status);
 
     /*
      * prediscover is called every time before starting RF discovery.
      * It is a good place to do vendor-specific configuration that must be
      * performed every time RF discovery is about to be started.
      *
-     * If prediscover() returns 0, the NCI stack will wait for a NfcEvent.PREDISCOVER_CPLT
-     * before continuing.
+     * If prediscover() returns NfcStatus::OK, the NCI stack will wait for a
+     * NfcEvent.PREDISCOVER_CPLT before continuing.
      *
-     * If prediscover() returns any other value, the NCI stack will start
+     * If prediscover() returns NfcStatus::FAILED, the NCI stack will start
      * RF discovery immediately.
      */
     @callflow(next={"write", "close", "coreInitialized", "powerCycle", "controlGranted"})
-    prediscover() generates (int32_t retval);
+    prediscover() generates (NfcStatus status);
 
     /*
      * Close the NFC controller. Should free all resources.
+     *
+     * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
      */
     @exit
-    close() generates (int32_t retval);
+    close() generates (NfcStatus status);
 
     /*
      * Grant HAL the exclusive control to send NCI commands.
      * Called in response to NfcEvent.REQUEST_CONTROL.
      * Must only be called when there are no NCI commands pending.
      * NfcEvent.RELEASE_CONTROL will notify when HAL no longer needs exclusive control.
+     *
+     * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
      */
     @callflow(next={"write", "close", "prediscover", "coreInitialized", "powerCycle"})
-    controlGranted() generates (int32_t retval);
+    controlGranted() generates (NfcStatus status);
 
      /*
      * Restart controller by power cyle;
      * NfcEvent.OPEN_CPLT will notify when operation is complete.
+     *
+     * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
      */
     @callflow(next={"write", "coreInitialized", "prediscover", "controlGranted", "close"})
-    powerCycle() generates (int32_t retval);
+    powerCycle() generates (NfcStatus status);
 };