com.pax.dal.memorycard

Interface ICardAT24Cxx

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void close()
      下电
      Power down
      void open(int cardType, byte devAddr)
      注册操作的信息
      The deck information for the registration operation.
      byte[] read(int addr, int exLen)
      按顺序读取指定的地址和数据长度
      Read specified address and length of data in order
      void write(int addr, byte[] data)
      使用字节写模式,在卡片的指定地址写数据
      Use byte writting mode.Write data at the specified address of the card
    • Method Detail

      • open

        void open(int cardType,
                  byte devAddr)
           throws AT24CxxDevException
        注册操作的信息
        The deck information for the registration operation.
        Parameters:
        cardType -
        卡类型。类型值包括:1,2,4,8,16,32,64.
        the type of card.Type value inclues 1,2,4,8,16,32,64.
        devAddr -
        设备地址。 格式是(XXXXXA2A1A0)b。考虑参数填充:
        • 卡类型1,A2A1A0由硬件脚A2/A1/A0连接决定
        • 卡类型2,A2A1A0由硬件脚A2/A1/A0连接决定
        • 卡类型4,A2A1由硬件脚A2/A1,A0=(0)b连接决定
        • 卡类型8,A2由硬件脚A2,A1A0=(00)b连接决定
        • 卡类型16,A2A1A0=(000)b
        • 卡类型32,A2A1A0=(000)b
        • 卡类型64,A2A1A0=(000)b
        the address of the device. The format is (XXXXXA2A1A0)b.Parameter Filling Considerations: cardType=1,A2A1A0 is determined by the connection of hardware leg A2/A1/A0. cardType=2,A2A1A0 is determined by the connection of hardware leg A2/A1/A0. cardType=4,A2A1 is determined by the connection of hardware leg A2/A1,A0=(0)b. cardType=8,A2 is determined by the connection of hardware leg A2,A1A0=(00)b. cardType=16,A2A1A0=(000)b. cardType=32,A2A1A0=(000)b. cardType=64,A2A1A0=(000)b.
        Throws:
        AT24CxxDevException
      • read

        byte[] read(int addr,
                    int exLen)
             throws AT24CxxDevException
        按顺序读取指定的地址和数据长度
        Read specified address and length of data in order
        Parameters:
        addr -
        读取数据的地址
        the address of the read data.
        exLen -
        读取数据期望长度
        the expected length of the read data.
        Returns:
        读取到的数据
        the read data.
        Throws:
        AT24CxxDevException
      • write

        void write(int addr,
                   byte[] data)
            throws AT24CxxDevException
        使用字节写模式,在卡片的指定地址写数据
        Use byte writting mode.Write data at the specified address of the card
        Parameters:
        addr -
        写数据的指定地址
        the specified address to write data.
        data -
        要写的数据
        the written data.
        Throws:
        AT24CxxDevException