sakura fan / SakuraIO_official

Fork of SakuraIO by SAKURA Internet

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers commands.h Source File

commands.h

00001 // Common
00002 #define CMD_GET_CONNECTION_STATUS 0x01  // OK
00003 #define CMD_GET_SIGNAL_QUALITY    0x02  // OK
00004 #define CMD_GET_DATETIME            0x03  // OK
00005 #define CMD_ECHO_BACK               0x0f  // OK
00006 
00007 // IO
00008 #define CMD_READ_ADC              0x10  // OK
00009 
00010 // Transmit
00011 #define CMD_TX_ENQUEUE              0x20  // OK
00012 #define CMD_TX_SENDIMMED          0x21  // OK
00013 #define CMD_TX_LENGTH               0x22  // OK
00014 #define CMD_TX_CLEAR                0x23  // OK
00015 #define CMD_TX_SEND               0x24  // OK
00016 #define CMD_TX_STAT               0x25  // OK
00017 
00018 // Receive
00019 #define CMD_RX_DEQUEUE            0x30  // OK
00020 #define CMD_RX_PEEK               0x31  // OK
00021 #define CMD_RX_LENGTH               0x32  // OK
00022 #define CMD_RX_CLEAR                0x33  // OK
00023 
00024 // File Download
00025 #define CMD_START_FILE_DOWNLOAD       0x40  // OK
00026 #define CMD_GET_FILE_METADATA         0x41  // OK
00027 #define CMD_GET_FILE_DOWNLOAD_STATUS  0x42  // OK
00028 #define CMD_CANCEL_FILE_DOWNLOAD      0x43  // OK
00029 #define CMD_GET_FILE_DATA             0x44  // OK
00030 
00031 // Operation
00032 #define CMD_GET_PRODUCT_ID        0xA0  // OK
00033 #define CMD_GET_UNIQUE_ID         0xA1  // OK
00034 #define CMD_GET_FIRMWARE_VERSION  0xA2  // OK
00035 #define CMD_UNLOCK                0xA8  // OK
00036 #define CMD_UPDATE_FIRMWARE       0xA9  // OK
00037 #define CMD_GET_UPDATE_FIRMWARE_STATUS       0xAA  // OK
00038 #define CMD_SOFTWARE_RESET        0xAF  // OK
00039 
00040 
00041 // Response
00042 #define CMD_ERROR_NONE             0x01
00043 #define CMD_ERROR_PARITY           0x02
00044 #define CMD_ERROR_MISSING          0x03
00045 #define CMD_ERROR_INVALID_SYNTAX   0x04
00046 #define CMD_ERROR_RUNTIME          0x05
00047 #define CMD_ERROR_LOCKED           0x06
00048 #define CMD_ERROR_BUSY             0x07