Sie sind nicht angemeldet.

Anmelden
Diese Seite kann nicht editiert werden.
 
 
 

Feature Report Protocol

Von $1

    Inhaltsverzeichnis
    Um zurückzugehen, müssen die aktuelle und die ältere Version mit Hilfe der Historie verglichen werden.

    Kombinierter Revisionsvergleich

    Vergleich der Version vom 19:31, 1 Mar 2015 von stephan mit der Version modifiziert am 06:59, 2 Mar 2015 von stephan.

    ...

    Please do only use this low level protocol, if you know why you're doing it. When codingprogramming on a Windows platform, using the supplied Arcaze DLL is generally preferable, as it simplifies and harmonizes usage and also covers changes in the low level protocol. Changes are not overly common, but be aware that the feature report commands are subject to change (as opposed to the DLL functions).

    The main reason to use thisMain reason to use the low level feature report protocol, would be platform independence, as currently there is no Arcaze DLL implementation for other platforms than MS Windows.

    ...

    Command ID Description
    ReadRamCmdIdReadRam 2  Read TransferRAM contents from Arcaze
    WriteToRamCmdIdWriteToRam 3  Write TransferRAM contents in Arcaze
    CopyFlashToRamCmdIdCopyFlashToRam 4  Copy Flash contents to TransferRAM
    ClearFlashCmdIdClearFlash 5  Erase a flash sector
    ProgRamToFlashCmdIdProgRamToFlash 6  Program Flash sector from TransferRAM
    ClearRamCmdIdClearRam 7  Clear TransferRAM contents

    ...

     
    Command ID Description
    CmdIdSetPadMode 9 obsolete ValidateConfigCmdIdReadDebugInfo 1210 Validate a configuration after only usable in manufacturing/production environment CmdIdValidateConfig 12  copying it to flash.
    InvalidateConfigCmdIdInvalidateConfig 13CmdIDEnumerate 14   CmdIdReadBootSerialNumber 15  Invalidate a configuration. Arcaze will not use it anymore.
    ReadStatusCmdIdReadConfigSerialNumber 1716  Reads status of configuration (valid / invalid)
    ReadConfigNumberCmdIdReadStatus 1817  Reads ID of the currently active configuration
    StartMacrosCmdIdReadConfigNumber 2118  Start execution of all macros in configuration
    StopMacrosCmdIdGetPadMode 2220  Stop execution of all macros in configuration
    SetConfigCmdIdStartMacros 2821  Activates a specific configuration
    ResetCmdIdStopMacros 25222  Soft-Resets the whole Arcaze USB-Interface
    ReadBootSerialNumberCmdIdPrintMacros 25323  Reads base serial number of the USB-Interface
    EnumerateCmdIdSetTimerIRQ 25424  Resets the USB bus only / Re-Enumerates
    InvalidateFirmwareCmdIdPrintInReports 25525 Invalidates the firmware. Firmware update will be mandatory after this command!only usable in manufacturing/production environment

    OnboardOnboard Port Commands

    Quadrature Encoder CommandsCommandIDDescription
    Command ID Description
    ReadPortsCmdIdReadPorts 8  
    CmdIdPrintADC 26 only usable in manufacturing/production environment ReadADCCmdIdReadADC 27  
    CmdIdSetConfig 28   SetPinDirectionCmdIdSetPinDirection 29  
    SetPinCmdIdSetPin 30  
    SetPortDirectionCmdIdSetPortDirection 31  
    SetPortCmdIdSetPort 32  
    ReadQuadratureEncodersCmdIdReadQuadratureEncoders 44  
    ReadPortsWithHistoryCmdIdReadPortsWithHistory 45  

    ...

    Note about Leading ZeroAttention: Note that, when

    When using the Microsoft UsbHid implementation, there is a leading zero as the first byte of each feature report. This byte is returned with every in report and is required in every out report. This byte is not part of the payload and can not be used for anything. We did not remove it in the implementation of the Demo, to make you aware of this. But it is not documented in the Command descriptions below, as it is not part of the protocol. In different implementations of UsbHid this will be different.has to be

    So, be aware that when using MS Windows, compared to this documentation, you will additionally be receiving a leading zero in front of each in report and will be required to additionally prefix a leading zero in front of each of your out reports!aprefix zero byte attached to all reports

    Status Return Valuesdefined below

    Many commands return a status value. This can be one of the following values:.Thismay not be required on different platforms

    Name Value Comment
    SUCCESS 0  
    WRITE_OUTSIDE_RAM 1  
    READ_OUTSIDE_RAM 2  
    WRONG_SECTOR 3  
    FLASH_FAILURE 4  
    COMMAND_NOT_IMPLEMENTED 5  
    WRONG_HASH 6  

    {{ simpsol.pagebreak{}. }}

    ...

    System Commands

    CMD_ID_READ_PORTS (8)

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d8 1 CMD_ID_READ_PORTS
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_ID_READ_PORTS
    1 Status   1  
    2 Reserved   1 Reserved (was LastChanged, but currently not implemented)
    3...22 Port A[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    23...42 Port B[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    43...63 not used 0 1 not used

    {{ simpsol.pagebreak{} }}

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_ID_READ_PORTS
    1 StatusReturn Value   1  
    2 Reserved   1 Reserved (was LastChanged, but currently not implemented)
    3...22 Port A[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    23...42 Port B[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    43...63 not used 0 1 not used

    ...

    Reads 8 bit representations of ADC values of the 6 internal ADCs. Item size is 16 bits, but in Arcaze USB-Interface V3 only 10 bits are used. In Arcaze USB-Interface V4 12 bits are used.This will soon be replaced by a 16 bit version.

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d10 1 CMD_READ_ADC
    1 Status   1  
    2 ADC port 0 (AIN 1) value (LSB first)   21  
    42 ADC port 1 (AIN 2) value (LSB first)   21  
    63 ADC port 2 (AIN 3) value (LSB first)   21  
    84 ADC port 3 (AIN 4) value (LSB first)   21  
    105 ADC port 4 (AIN 5) value (LSB first)   21  
    126 ADC port 5 (AIN 6) value (LSB first)   21  
    14.7...63       not used

    ...

    Version vom 19:31, 1 Mar 2015

    Diese Revision wurde von stephan (Sperren) verändert

    ...

    Please do only use this low level protocol, if you know why you're doing it. When programming on a Windows platform, using the supplied Arcaze DLL is generally preferable, as it simplifies and harmonizes usage and also covers changes in the low level protocol. Changes are not overly common, but be aware that the feature report commands are subject to change (as opposed to the DLL functions).

    Main reason to use the low level feature report protocol, would platform independence, as currently there is no Arcaze DLL implementation for other platforms than MS Windows.

    ...

    Command ID Description
    CmdIdReadRam 2  
    CmdIdWriteToRam 3  
    CmdIdCopyFlashToRam 4  
    CmdIdClearFlash 5  
    CmdIdProgRamToFlash 6  
    CmdIdClearRam 7  

    ...

    Command ID Description
    CmdIdSetPadMode 9 obsolete
    CmdIdReadDebugInfo 10 only usable in manufacturing/production environment
    CmdIdValidateConfig 12  
    CmdIdInvalidateConfig 13  
    CmdIDEnumerate 14  
    CmdIdReadBootSerialNumber 15  
    CmdIdReadConfigSerialNumber 16  
    CmdIdReadStatus 17  
    CmdIdReadConfigNumber 18  
    CmdIdGetPadMode 20  
    CmdIdStartMacros 21  
    CmdIdStopMacros 22  
    CmdIdPrintMacros 23  
    CmdIdSetTimerIRQ 24  
    CmdIdPrintInReports 25 only usable in manufacturing/production environment

    Onboard Port Commands

    Command ID Description
    CmdIdReadPorts 8  
    CmdIdPrintADC 26 only usable in manufacturing/production environment
    CmdIdReadADC 27  
    CmdIdSetConfig 28  
    CmdIdSetPinDirection 29  
    CmdIdSetPin 30  
    CmdIdSetPortDirection 31  
    CmdIdSetPort 32  

    Quadrature Encoder Commands

    Command ID Description
    CmdIdReadQuadratureEncoders 44  
    CmdIdReadPortsWithHistory 45  

    ...

    Attention: Note that, when using the Microsoft UsbHid implementation, there has to be a prefix zero byte attached to all reports defined below. This may not be required on different platforms.

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_ID_READ_PORTS
    1 Return Value   1  

    ...

    Reads 8 bit representations of ADC values of the 6 internal ADCs. This will soon be replaced by a 16 bit version.

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d10 1 CMD_READ_ADC
    1 ADC port 0 (AIN 1) value   1  
    2 ADC port 1 (AIN 2) value   1  
    3 ADC port 2 (AIN 3) value   1  
    4 ADC port 3 (AIN 4) value   1  
    5 ADC port 4 (AIN 5) value   1  
    6 ADC port 5 (AIN 6) value   1  
    7...63       not used

    ...

    Version seit 06:59, 2 Mar 2015

    Diese Revision wurde von stephan (Sperren) verändert

    ...

    Please do only use this low level protocol, if you know why you're doing it. When coding on a Windows platform, using the supplied Arcaze DLL is generally preferable, as it simplifies and harmonizes usage and also covers changes in the low level protocol. Changes are not overly common, but be aware that the feature report commands are subject to change (as opposed to the DLL functions).

    The main reason to use this low level feature report protocol, would be platform independence, as currently there is no Arcaze DLL implementation for other platforms than MS Windows.

    ...

    Command ID Description
    ReadRam 2 Read TransferRAM contents from Arcaze
    WriteToRam 3 Write TransferRAM contents in Arcaze
    CopyFlashToRam 4 Copy Flash contents to TransferRAM
    ClearFlash 5 Erase a flash sector
    ProgRamToFlash 6 Program Flash sector from TransferRAM
    ClearRam 7 Clear TransferRAM contents

    ...

    Command ID Description
    ValidateConfig 12 Validate a configuration after copying it to flash.
    InvalidateConfig 13 Invalidate a configuration. Arcaze will not use it anymore.
    ReadStatus 17 Reads status of configuration (valid / invalid)
    ReadConfigNumber 18 Reads ID of the currently active configuration
    StartMacros 21 Start execution of all macros in configuration
    StopMacros 22 Stop execution of all macros in configuration
    SetConfig 28 Activates a specific configuration
    Reset 252 Soft-Resets the whole Arcaze USB-Interface
    ReadBootSerialNumber 253 Reads base serial number of the USB-Interface
    Enumerate 254 Resets the USB bus only / Re-Enumerates
    InvalidateFirmware 255 Invalidates the firmware. Firmware update will be mandatory after this command!

    Onboard Port Commands

    Command ID Description
    ReadPorts 8  
    ReadADC 27  
    SetPinDirection 29  
    SetPin 30  
    SetPortDirection 31  
    SetPort 32  
    ReadQuadratureEncoders 44  
    ReadPortsWithHistory 45  

    ...

    Note about Leading Zero

    When using the Microsoft UsbHid implementation, there is a leading zero as the first byte of each feature report. This byte is returned with every in report and is required in every out report. This byte is not part of the payload and can not be used for anything. We did not remove it in the implementation of the Demo, to make you aware of this. But it is not documented in the Command descriptions below, as it is not part of the protocol. In different implementations of UsbHid this will be different.

    So, be aware that when using MS Windows, compared to this documentation, you will additionally be receiving a leading zero in front of each in report and will be required to additionally prefix a leading zero in front of each of your out reports!

    Status Return Values

    Many commands return a status value. This can be one of the following values:

    Name Value Comment
    SUCCESS 0  
    WRITE_OUTSIDE_RAM 1  
    READ_OUTSIDE_RAM 2  
    WRONG_SECTOR 3  
    FLASH_FAILURE 4  
    COMMAND_NOT_IMPLEMENTED 5  
    WRONG_HASH 6  

    {{ simpsol.pagebreak{} }}

    ...

    System Commands

    CMD_ID_READ_PORTS (8)

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d8 1 CMD_ID_READ_PORTS
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_ID_READ_PORTS
    1 Status   1  
    2 Reserved   1 Reserved (was LastChanged, but currently not implemented)
    3...22 Port A[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    23...42 Port B[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    43...63 not used 0 1 not used

    {{ simpsol.pagebreak{} }}

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_ID_READ_PORTS
    1 Status   1  
    2 Reserved   1 Reserved (was LastChanged, but currently not implemented)
    3...22 Port A[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    23...42 Port B[1...20] values 0 or 1 20 1 byte per Port. Values will be 0 or 1.
    43...63 not used 0 1 not used

    ...

    Reads ADC values of the 6 internal ADCs. Item size is 16 bits, but in Arcaze USB-Interface V3 only 10 bits are used. In Arcaze USB-Interface V4 12 bits are used.

    ...

    Address Content Value Length (Bytes) Remarks
    0 Command 0d10 1 CMD_READ_ADC
    1 Status   1  
    2 ADC port 0 (AIN 1) value (LSB first)   2  
    4 ADC port 1 (AIN 2) value (LSB first)   2  
    6 ADC port 2 (AIN 3) value (LSB first)   2  
    8 ADC port 3 (AIN 4) value (LSB first)   2  
    10 ADC port 4 (AIN 5) value (LSB first)   2  
    12 ADC port 5 (AIN 6) value (LSB first)   2  
    14...63       not used

    ...

     
    © Simple Solutions  •  Impressum  •  Wiki powered by Mindtouch