Availability:
     Level 7    , 't'

  Quick Help:
     Read Peripheral Register - channel or preamp, t[OpType],[RegAddr],[NumRegs],[RegMask],[RegPagAddr]

  Description:
    This command reads and displays the contents from the specified register(s) from the
    specified peripheral device.

  Input Parameters:

    0 - Operation Type.
    
        This parameter selects the type of peripheral device operation to be performed.
    
             0 = Read Preamp Register
             1 = Read Read Channel Register
    
          Type:    Unsigned 8-bit value
    
          Range:   0 or 1
    
          Default: 1 (Read Read Channel Register)
    
    1 - Register Address Offset.
    
        This parameter specifies the address offset of the peripheral register to be
        read.  If the peripheral registers has the page address mode, this parameter
        specifies the address offset in the page, which has been specified by the
        parameter 1, Register Page Address. Otherwise, it simply specifies the register
        address offset in the whole range of the register address.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 0
    
    2 - Number of Registers to Read.
    
        This parameter specifies the number of consecutive peripheral registers to read
        and display.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 1
    
    3 - Register Mask.
    
        This parameter specifies the bit mask with which the specified field of the
        register value is to be read from the register, when Parameter 3, Number of
        Registers to Read, is equal to one.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 0xFFFF
    
    4 - Register Page Address.
    
        This parameter specifies the page address of the peripheral register to be
        read.  If the peripheral registers do not have page address in its address
        mode, this input parameter is not needed and its defaul value does not affect
        the read from the peripheral register.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 0
    
  Output Data:

    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    

    If a single Preamp register was read, the following information will be displayed.
    
          "Preamp Reg cc = dd"
    
       where
    
          cc is the address of the register that was read
    
          dd is the value that was read from the register
    
    If multiple Preamp registers were read, the following information will be displayed.
    
          "Preamp"
          "    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F"
          "cc: dd dd dd dd dd dd dd dd dd dd dd dd dd dd dd dd"
    
       where
    
          cc is the address of the first register in the row
    
          dd is the value that was read from the register
    

    If a single Read Channel register was read, the following information will be displayed.
    
          "Read Channel Reg cccc = dddd"
    
       where
    
          cccc is the address of the register that was read
    
          dddd is the value that was read from the register
    
    If multiple Read Channel registers were read, the following information will be
    displayed.
    
          "Read Channel"
          "      0    1    2    3    4    5    6    7    8    A    B    C    D    E    F"
          "cccc: dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd"
    
       where
    
          cccc is the address of the first register in the row
    
          dddd is the value that was read from the register
    
  Revision History:

       0001.0000   Initial revision.
       0011.0000   Combined the PSG Diagnostic Error Codes (PSGDEC) and the Diagnostic External
                   Test Service Error Codes (DETSEC) into a single set of Diagnostic Error Codes
                   (DiagError).
       0012.0000   Corrected documentation and help string to say 'read' instead of write.