Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RCS730 Class Reference
FeliCa Link(RC-S730) class. More...
#include <RCS730.h>
Data Structures | |
| struct | callbacktable_t |
| Callback Table. More... | |
Public Types | |
| enum | OpMode { OPMODE_LITES_HT = 0x00, OPMODE_PLUG = 0x01, OPMODE_NFCDEP = 0x02, OPMODE_LITES = 0x03 } |
Operation Mode. More... | |
| enum | PlugSysCode { PLUG_SYS_CODE_FEEL = 0, PLUG_SYS_CODE_NDEF = 2 } |
System Code in Plug mode. More... | |
Public Member Functions | |
| RCS730 (I2C &I2c) | |
| constructor | |
| virtual | ~RCS730 () |
| destructor | |
| void | setCallbackTable (const callbacktable_t *pInitTable) |
| Set Callback Table. | |
| int | byteWrite (uint16_t MemAddr, uint8_t Data) |
| Byte Write(1byte) | |
| int | pageWrite (uint16_t MemAddr, const uint8_t *pData, int Length) |
| Page Write. | |
| int | randomRead (uint16_t MemAddr, uint8_t *pData) |
| Random Read(1byte) | |
| int | sequentialRead (uint16_t MemAddr, uint8_t *pData, int Length) |
| Sequential Read. | |
| int | currentAddrRead (uint8_t *pData) |
| Current Address Read(1byte) | |
| int | readRegister (uint16_t Reg, uint32_t *pData) |
| Read Register. | |
| int | writeRegisterForce (uint16_t Reg, uint32_t Data) |
| Write Register Force. | |
| int | writeRegister (uint16_t Reg, uint32_t Data, uint32_t Mask=0xffffffff) |
| Write Register. | |
| int | setRegOpMode (OpMode Mode) |
| Set operation mode. | |
| int | setRegSlaveAddr (int SAddr) |
| Set I2C Slave Address. | |
| int | setRegInterruptMask (uint32_t Mask, uint32_t Value) |
| Set interrupt mask. | |
| int | setRegPlugSysCode (PlugSysCode SysCode) |
| Set System Code in Plug mode. | |
| int | goToInitializeStatus () |
| go to initialize status | |
| int | initFTMode (OpMode Mode) |
| initialize to FeliCa Through(FT) mode | |
| int | initNfcDepMode () |
| initialize to NFC-DEP mode | |
| void | isrIrq () |
| Interrupt Service Routine(IRQ pin) | |
Static Public Attributes | |
| static const uint16_t | BLK_PAD0 = 0x0000 |
| [addr]PAD0 | |
| static const uint16_t | BLK_PAD1 = 0x0001 |
| [addr]PAD1 | |
| static const uint16_t | BLK_PAD2 = 0x0002 |
| [addr]PAD2 | |
| static const uint16_t | BLK_PAD3 = 0x0003 |
| [addr]PAD3 | |
| static const uint16_t | BLK_PAD4 = 0x0004 |
| [addr]PAD4 | |
| static const uint16_t | BLK_PAD5 = 0x0005 |
| [addr]PAD5 | |
| static const uint16_t | BLK_PAD6 = 0x0006 |
| [addr]PAD6 | |
| static const uint16_t | BLK_PAD7 = 0x0007 |
| [addr]PAD7 | |
| static const uint16_t | BLK_PAD8 = 0x0008 |
| [addr]PAD8 | |
| static const uint16_t | BLK_PAD9 = 0x0009 |
| [addr]PAD9 | |
| static const uint16_t | BLK_PAD10 = 0x000a |
| [addr]PAD10 | |
| static const uint16_t | BLK_PAD11 = 0x000b |
| [addr]PAD11 | |
| static const uint16_t | BLK_PAD12 = 0x000c |
| [addr]PAD12 | |
| static const uint16_t | BLK_PAD13 = 0x000d |
| [addr]PAD13 | |
| static const uint16_t | BLK_REG = 0x000e |
| [addr]REG | |
| static const uint16_t | BLK_RC = 0x0080 |
| [addr]RC | |
| static const uint16_t | BLK_MAC = 0x0081 |
| [addr]MAC | |
| static const uint16_t | BLK_ID = 0x0082 |
| [addr]ID | |
| static const uint16_t | BLK_D_ID = 0x0083 |
| [addr]D_ID | |
| static const uint16_t | BLK_SER_C = 0x0084 |
| [addr]SER_C | |
| static const uint16_t | BLK_SYS_C = 0x0085 |
| [addr]SYS_C | |
| static const uint16_t | BLK_CKV = 0x0086 |
| [addr]CKV | |
| static const uint16_t | BLK_CK = 0x0087 |
| [addr]CK | |
| static const uint16_t | BLK_MC = 0x0088 |
| [addr]MC | |
| static const uint16_t | BLK_WCNT = 0x0090 |
| [addr]WCNT | |
| static const uint16_t | BLK_MAC_A = 0x0091 |
| [addr]MAC_A | |
| static const uint16_t | BLK_STATE = 0x0092 |
| [addr]STATE | |
| static const uint16_t | BLK_CRC_CHECK = 0x00a0 |
| [addr]CRC_CHECK | |
| static const uint16_t | REG_OPMODE = 0x0b00 |
| [addr]Operation Mode register | |
| static const uint16_t | REG_TAG_TX_CTRL = 0x0b04 |
| [addr]Tag TX Control register | |
| static const uint16_t | REG_TAG_RX_CTRL = 0x0b08 |
| [addr]Tag RX Control register | |
| static const uint16_t | REG_RF_STATUS = 0x0b0c |
| [addr]RF Status register | |
| static const uint16_t | REG_I2C_SLAVE_ADDR = 0x0b10 |
| [addr]I2C Slave Address register | |
| static const uint16_t | REG_I2C_BUFF_CTRL = 0x0b14 |
| [addr]I2C Buffer Control register | |
| static const uint16_t | REG_I2C_STATUS = 0x0b18 |
| [addr]I2C Status register | |
| static const uint16_t | REG_INT_MASK = 0x0b20 |
| [addr]Interrupt Mask register | |
| static const uint16_t | REG_INT_RAW_STATUS = 0x0b24 |
| [addr]Interrupt Raw Status register | |
| static const uint16_t | REG_INT_STATUS = 0x0b28 |
| [addr]Interrupt Status register | |
| static const uint16_t | REG_INT_CLEAR = 0x0b2c |
| [addr]Interrupt Clear register | |
| static const uint16_t | REG_WRT_PROTECT = 0x0b30 |
| [addr]Write Protect register | |
| static const uint16_t | REG_STBY_CTRL = 0x0b34 |
| [addr]Standby Control register | |
| static const uint16_t | REG_INIT_CTRL = 0x0b38 |
| [addr]Initialize Control register | |
| static const uint16_t | REG_HOST_IF_SECURITY = 0x0b40 |
| [addr]Host Interface Security register | |
| static const uint16_t | REG_HOST_IF_WCNT = 0x0b44 |
| [addr]Host Interface WCNT register | |
| static const uint16_t | REG_RF_PARAM = 0x0b50 |
| [addr]RF Parameter register | |
| static const uint16_t | REG_LITES_HT_CONF = 0x0b60 |
| [addr]Lite-S Host Through Configration register | |
| static const uint16_t | REG_LITES_PMM = 0x0b64 |
| [addr]Lite-S PMm register | |
| static const uint16_t | REG_PLUG_CONF1 = 0x0b80 |
| [addr]Plug Configration 1 register | |
| static const uint16_t | REG_PLUG_CONF2 = 0x0b84 |
| [addr]Plug Configration 2 register | |
| static const uint16_t | REG_PLUG_CONF3 = 0x0b88 |
| [addr]Plug Configration 3 register | |
| static const uint16_t | REG_DEP_CONF = 0x0ba0 |
| [addr]DEP Configration register | |
| static const uint16_t | REG_DEP_PMM1 = 0x0ba4 |
| [addr]DEP PMm1 register | |
| static const uint16_t | REG_DEP_PMM2 = 0x0ba8 |
| [addr]DEP PMm2 register | |
| static const uint16_t | REG_RW_CONF = 0x0bc0 |
| [addr]RW Configration register | |
| static const uint16_t | REG_RW_CTRL = 0x0b4c |
| [addr]RW Control register | |
| static const uint16_t | REG_RW_TIMEOUT = 0x0bc8 |
| [addr]RW Timeout register | |
| static const uint16_t | BUF_RF_COMM = 0x0c00 |
| [addr]RF Communication | |
| static const uint16_t | BUF_I2CFELICA_COMM = 0x0d00 |
| [addr]I2C FeliCa Communication | |
| static const uint32_t | MSK_MODE_CHANGED = 0x80000000 |
| OPMODE changed. | |
| static const uint32_t | MSK_INT_RW_RX_ERROR = 0x00080000 |
| [R/W] | |
| static const uint32_t | MSK_INT_RW_RX_TIMEOUT = 0x00040000 |
| [R/W] | |
| static const uint32_t | MSK_INT_RW_RX_DONE = 0x00020000 |
| [R/W] | |
| static const uint32_t | MSK_INT_RW_TX_DONE = 0x00010000 |
| [R/W] | |
| static const uint32_t | MSK_INT_I2C_FELICA_CMD_ERROR = 0x00000200 |
| [I2C] | |
| static const uint32_t | MSK_INT_I2C_FELICA_CMD_DONE = 0x00000100 |
| [I2C] | |
| static const uint32_t | MSK_INT_TAG_TX_DONE = 0x00000040 |
| [tag/DEP]Tx done | |
| static const uint32_t | MSK_INT_TAG_NFC_DEP_RX_DONE = 0x00000020 |
| [DEP]D4 command Rx done | |
| static const uint32_t | MSK_INT_TAG_RW_RX_DONE3 = 0x00000010 |
| [tag]Write w/o Enc Rx done for HT block | |
| static const uint32_t | MSK_INT_TAG_RW_RX_DONE2 = 0x00000008 |
| [tag]Read or Write w/o Enc Rx done for HT block | |
| static const uint32_t | MSK_INT_TAG_RW_RX_DONE1 = 0x00000004 |
| [tag]Write w/o Enc Rx done for User block | |
| static const uint32_t | MSK_INT_TAG_PL_RX_DONE = 0x00000002 |
| [tag]Polling Rx done | |
| static const uint32_t | MSK_INT_TAG_RX_DONE = 0x00000001 |
| [tag]Read or Write w/o Enc Rx done | |
Detailed Description
FeliCa Link(RC-S730) class.
Definition at line 21 of file RCS730.h.
Member Enumeration Documentation
| enum OpMode |
| enum PlugSysCode |
Constructor & Destructor Documentation
| RCS730 | ( | I2C & | I2c ) |
| ~RCS730 | ( | ) | [virtual] |
destructor
Definition at line 54 of file RCS730.cpp.
Member Function Documentation
| int byteWrite | ( | uint16_t | MemAddr, |
| uint8_t | Data | ||
| ) |
Byte Write(1byte)
- Parameters:
-
[in] MemAddr memory address to write [in] pData data to write
- Return values:
-
0 success
Definition at line 65 of file RCS730.cpp.
| int currentAddrRead | ( | uint8_t * | pData ) |
Current Address Read(1byte)
- Parameters:
-
[out] pData data buffer to read
- Return values:
-
0 success
Definition at line 135 of file RCS730.cpp.
| int goToInitializeStatus | ( | ) |
| int initFTMode | ( | OpMode | Mode ) |
initialize to FeliCa Through(FT) mode
- Parameters:
-
[in] Mode Operation Mode(OPMODE_LITES_HT or OPMODE_PLUG)
- Return values:
-
0 success
Definition at line 216 of file RCS730.cpp.
| int initNfcDepMode | ( | ) |
| void isrIrq | ( | ) |
Interrupt Service Routine(IRQ pin)
Definition at line 248 of file RCS730.cpp.
| int pageWrite | ( | uint16_t | MemAddr, |
| const uint8_t * | pData, | ||
| int | Length | ||
| ) |
Page Write.
- Parameters:
-
[in] MemAddr memory address to write [in] pData data to write [in] Length pData Length
- Return values:
-
0 success
Definition at line 83 of file RCS730.cpp.
| int randomRead | ( | uint16_t | MemAddr, |
| uint8_t * | pData | ||
| ) |
Random Read(1byte)
- Parameters:
-
[in] MemAddr memory address to read [out] pData data buffer to read
- Return values:
-
0 success
Definition at line 109 of file RCS730.cpp.
| int readRegister | ( | uint16_t | Reg, |
| uint32_t * | pData | ||
| ) |
Read Register.
- Parameters:
-
[in] Reg FeliCa Link Register [out] pData data buffer to read
- Return values:
-
0 success
Definition at line 148 of file RCS730.cpp.
| int sequentialRead | ( | uint16_t | MemAddr, |
| uint8_t * | pData, | ||
| int | Length | ||
| ) |
Sequential Read.
- Parameters:
-
[in] MemAddr memory address to read [out] pData data buffer to read [in] Length pData Length
- Return values:
-
0 success
Definition at line 115 of file RCS730.cpp.
| void setCallbackTable | ( | const callbacktable_t * | pInitTable ) |
Set Callback Table.
- Parameters:
-
[in] pInitTable callback table
Definition at line 59 of file RCS730.cpp.
| int setRegInterruptMask | ( | uint32_t | Mask, |
| uint32_t | Value | ||
| ) |
Set interrupt mask.
- Parameters:
-
[in] Mask Bit Mask [in] Value Set value to Mask
- Return values:
-
0 success
- Note:
- This value is written to non-volatile memory in FeliCa Link.
Definition at line 198 of file RCS730.cpp.
| int setRegOpMode | ( | OpMode | Mode ) |
Set operation mode.
- Parameters:
-
[in] Mode Operation Mode
- Return values:
-
0 success
- Note:
- This value is written to non-volatile memory in FeliCa Link.
Definition at line 178 of file RCS730.cpp.
| int setRegPlugSysCode | ( | PlugSysCode | SysCode ) |
Set System Code in Plug mode.
- Parameters:
-
[in] SysCode System Code
- Return values:
-
0 success
- Note:
- This value is written to non-volatile memory in FeliCa Link.
Definition at line 204 of file RCS730.cpp.
| int setRegSlaveAddr | ( | int | SAddr ) |
Set I2C Slave Address.
- Parameters:
-
[in] SAddr Slave Address(7bit address)
- Return values:
-
0 success
- Attention:
- SAddr is "7bit" address(not 8bit address).
- Note:
- This value is written to non-volatile memory in FeliCa Link.
- Default slave address is 0x40.
Definition at line 184 of file RCS730.cpp.
| int writeRegister | ( | uint16_t | Reg, |
| uint32_t | Data, | ||
| uint32_t | Mask = 0xffffffff |
||
| ) |
Write Register.
Write Register if not same value.
- Parameters:
-
[in] Reg FeliCa Link Register [in] Data data buffer to write [in] Mask write mask(default: 0xffffffff)
- Return values:
-
0 success
- Note:
- this API like below:
uint32_t val_old = REG[Reg]; uint32_t val_new = (val_old & ~Mask) | Data; if (val_old != val_new) { REG[Reg] = val_new; }
- this API like below:
Definition at line 160 of file RCS730.cpp.
| int writeRegisterForce | ( | uint16_t | Reg, |
| uint32_t | Data | ||
| ) |
Write Register Force.
- Parameters:
-
[in] Reg FeliCa Link Register [in] Data data buffer to write
- Return values:
-
0 success
Definition at line 154 of file RCS730.cpp.
Field Documentation
const uint16_t BLK_CRC_CHECK = 0x00a0 [static] |
const uint16_t BUF_I2CFELICA_COMM = 0x0d00 [static] |
const uint16_t BUF_RF_COMM = 0x0c00 [static] |
const uint32_t MSK_INT_I2C_FELICA_CMD_DONE = 0x00000100 [static] |
const uint32_t MSK_INT_I2C_FELICA_CMD_ERROR = 0x00000200 [static] |
const uint32_t MSK_INT_RW_RX_DONE = 0x00020000 [static] |
const uint32_t MSK_INT_RW_RX_ERROR = 0x00080000 [static] |
const uint32_t MSK_INT_RW_RX_TIMEOUT = 0x00040000 [static] |
const uint32_t MSK_INT_RW_TX_DONE = 0x00010000 [static] |
const uint32_t MSK_INT_TAG_NFC_DEP_RX_DONE = 0x00000020 [static] |
const uint32_t MSK_INT_TAG_PL_RX_DONE = 0x00000002 [static] |
const uint32_t MSK_INT_TAG_RW_RX_DONE1 = 0x00000004 [static] |
const uint32_t MSK_INT_TAG_RW_RX_DONE2 = 0x00000008 [static] |
const uint32_t MSK_INT_TAG_RW_RX_DONE3 = 0x00000010 [static] |
const uint32_t MSK_INT_TAG_RX_DONE = 0x00000001 [static] |
const uint32_t MSK_INT_TAG_TX_DONE = 0x00000040 [static] |
const uint32_t MSK_MODE_CHANGED = 0x80000000 [static] |
const uint16_t REG_DEP_CONF = 0x0ba0 [static] |
const uint16_t REG_DEP_PMM1 = 0x0ba4 [static] |
const uint16_t REG_DEP_PMM2 = 0x0ba8 [static] |
const uint16_t REG_HOST_IF_SECURITY = 0x0b40 [static] |
const uint16_t REG_HOST_IF_WCNT = 0x0b44 [static] |
const uint16_t REG_I2C_BUFF_CTRL = 0x0b14 [static] |
const uint16_t REG_I2C_SLAVE_ADDR = 0x0b10 [static] |
const uint16_t REG_I2C_STATUS = 0x0b18 [static] |
const uint16_t REG_INIT_CTRL = 0x0b38 [static] |
const uint16_t REG_INT_CLEAR = 0x0b2c [static] |
const uint16_t REG_INT_MASK = 0x0b20 [static] |
const uint16_t REG_INT_RAW_STATUS = 0x0b24 [static] |
const uint16_t REG_INT_STATUS = 0x0b28 [static] |
const uint16_t REG_LITES_HT_CONF = 0x0b60 [static] |
const uint16_t REG_LITES_PMM = 0x0b64 [static] |
const uint16_t REG_OPMODE = 0x0b00 [static] |
const uint16_t REG_PLUG_CONF1 = 0x0b80 [static] |
const uint16_t REG_PLUG_CONF2 = 0x0b84 [static] |
const uint16_t REG_PLUG_CONF3 = 0x0b88 [static] |
const uint16_t REG_RF_PARAM = 0x0b50 [static] |
const uint16_t REG_RF_STATUS = 0x0b0c [static] |
const uint16_t REG_RW_CONF = 0x0bc0 [static] |
const uint16_t REG_RW_CTRL = 0x0b4c [static] |
const uint16_t REG_RW_TIMEOUT = 0x0bc8 [static] |
const uint16_t REG_STBY_CTRL = 0x0b34 [static] |
const uint16_t REG_TAG_RX_CTRL = 0x0b08 [static] |
const uint16_t REG_TAG_TX_CTRL = 0x0b04 [static] |
const uint16_t REG_WRT_PROTECT = 0x0b30 [static] |
Generated on Sat Jul 30 2022 02:53:19 by
1.7.2