amlib.ccid

## Class ReaderAT45D041

- java.lang.Object
- - amlib.ccid.Reader
  - - amlib.ccid.ReaderAT45D041

-     public class ReaderAT45D041
      extends Reader

- - ### Field Summary

    - ### Fields inherited from class amlib.ccid.Reader

      `CardModeASYNC, CardModeAT45D041, CardModeAT88SC102, CardModeAT88SC153, CardModeAT88SC1608, CardModeI2C, CardModeINPHONE, CardModeSLE4428, CardModeSLE4442, CardModeSLE6636, CCID_POWEROFF, CCID_POWERON, CCID_PROTOCOL_NA, CCID_PROTOCOL_T0, CCID_PROTOCOL_T1, SLOT_STATUS_CARD_ABSENT, SLOT_STATUS_CARD_ACTIVE, SLOT_STATUS_CARD_INACTIVE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReaderAT45D041(HardwareInterface Dev)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `AT45D041Cmd(byte OPcode, int PageNo, int intStartAddr, int intWriteLen, byte[] pWriteData, int intReadLen, byte[] pReadData, int[] pIntReturnLen)` AT45D041Cmd reads/write data from/to the card.
    `int` | `open()` To open the reader.
    `int` | `open(int slot)` To open reader with given slot

    - ### Methods inherited from class amlib.ccid.Reader

      `close, escape, getAtr, getAtrString, getCardStatus, getCmdFailCode, getCurrentDev, getProtocol, getSN, setPower, setSlot, switchMode, transmit`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReaderAT45D041

          public ReaderAT45D041(HardwareInterface Dev)
                         throws ReaderException

      Constructor
      Parameters:
        `Dev` - HardwareInterface object which has been initialed
      Throws:
        `ReaderException`
      See Also:
        `ReaderException`

  - ### Method Detail

    - #### open

          public int open(int slot)

      Description copied from class: `Reader`
      To open reader with given slot
      Overrides:
        `open` in class `Reader`
      Parameters:
        `slot` - slot number to open
      Returns:
        READER_SUCCESSFUL or other error code

    - #### open

          public int open()

      Description copied from class: `Reader`
      To open the reader.
      Overrides:
        `open` in class `Reader`
      Returns:
        READER_SUCCESSFUL or other error code

    - #### AT45D041Cmd

          public int AT45D041Cmd(byte OPcode,
                                 int PageNo,
                                 int intStartAddr,
                                 int intWriteLen,
                                 byte[] pWriteData,
                                 int intReadLen,
                                 byte[] pReadData,
                                 int[] pIntReturnLen)

      AT45D041Cmd reads/write data from/to the card.
      Parameters:
        `OPcode` - The AT45D041 command code
        `PageNo` - The page number to access.
        `intStartAddr` - The memory address in the buffer or memory.
        `intWriteLen` - Number of bytes to be written to the card.
        `pWriteData` - Pointer to the buffer containing the data to be written to the card.
        `intReadLen` - Number of bytes to be read from the card.
        `pReadData` - Pointer to a buffer that receives the data read from the card.
        `pIntReturnLen` - Number of bytes which is actually received data from the card.
      Returns:
        zero for success.