FeliCa Link(RC-S730) Library

FeliCa Link(RC-S730) Library

  • Not all API is tested.

RC-S730

Sample

Files at this revision

API Documentation at this revision

Comitter:
hiro99ma
Date:
Sun Mar 29 07:59:13 2015 +0000
Parent:
0:be4ff952ae7a
Commit message:
fix comment

Changed in this revision

RCS730.cpp Show annotated file Show diff for this revision Revisions of this file
RCS730.h Show annotated file Show diff for this revision Revisions of this file
diff -r be4ff952ae7a -r bb5616cb01fb RCS730.cpp
--- a/RCS730.cpp	Sun Mar 29 06:11:57 2015 +0000
+++ b/RCS730.cpp	Sun Mar 29 07:59:13 2015 +0000
@@ -1,3 +1,10 @@
+/** FeliCa Link(RC-S730) Library
+ *
+ * @file    RCS730.cpp
+ * @author  hiro99ma
+ * @version 1.00
+ */
+
 #include "RCS730.h"
 
 
@@ -43,6 +50,7 @@
     _cbTable.pCbRxHTWDone = 0;
 }
 
+
 RCS730::~RCS730()
 {
 }
@@ -215,7 +223,6 @@
 
     ret = setRegOpMode(Mode);
     if (ret == 0) {
-        //ret = setRegInterruptMask(MSK_INT_TAG_TX_DONE | MSK_INT_TAG_RW_RX_DONE2, 0);
         ret = setRegInterruptMask(MSK_INT_TAG_RW_RX_DONE2, 0);
     }
 
@@ -230,7 +237,7 @@
 
     ret = setRegOpMode(OPMODE_NFCDEP);
     if (ret == 0) {
-        ret = setRegInterruptMask(MSK_INT_TAG_TX_DONE | MSK_INT_TAG_NFC_DEP_RX_DONE, 0);
+        ret = setRegInterruptMask(MSK_INT_TAG_NFC_DEP_RX_DONE, 0);
     }
 
     return ret;
@@ -297,7 +304,3 @@
         writeRegisterForce(REG_INT_CLEAR, intstat);
     }
 }
-
-
-
-
diff -r be4ff952ae7a -r bb5616cb01fb RCS730.h
--- a/RCS730.h	Sun Mar 29 06:11:57 2015 +0000
+++ b/RCS730.h	Sun Mar 29 07:59:13 2015 +0000
@@ -221,7 +221,7 @@
 
     /** Write Register
      *
-     * Write Register if not same.
+     * Write Register if not same value.
      *
      * @param   [in]    Reg         FeliCa Link Register
      * @param   [in]    Data        data buffer to write
@@ -231,14 +231,17 @@
      * @note
      *      - this API like below:
      *          @code
-     *              uint32_t val = REG[Reg];
-     *              REG[Reg] = (val & ~Mask) | Data;
+     *              uint32_t val_old = REG[Reg];
+     *              uint32_t val_new = (val_old & ~Mask) | Data;
+     *              if (val_old != val_new) {
+     *                  REG[Reg] = val_new;
+     *              }
      *          @endcode
      */
     int writeRegister(uint16_t Reg, uint32_t Data, uint32_t Mask=0xffffffff);
 
 
-    /** Set FeliCa Lite operation mode
+    /** Set operation mode
      *
      * @param   [in]    Mode        Operation Mode
      * @retval  0       success
@@ -264,7 +267,7 @@
     int setRegSlaveAddr(int SAddr);
 
 
-    /** Set FeliCa Lite interrupt mask
+    /** Set interrupt mask
      *
      * @param   [in]    Mask        Bit Mask
      * @param   [in]    Value       Set value to Mask
@@ -294,7 +297,7 @@
     int goToInitializeStatus();
 
 
-    /** initialize to FeliCa Through mode
+    /** initialize to FeliCa Through(FT) mode
      *
      * @param   [in]    Mode    Operation Mode(OPMODE_LITES_HT or OPMODE_PLUG)
      * @retval  0       success