Sakura IoT Platform b
Fork of SakuraIO by
SakuraIO/commands.h@4:85955eb2e61a, 2016-11-21 (annotated)
- Committer:
- sakurafan
- Date:
- Mon Nov 21 14:10:51 2016 +0000
- Revision:
- 4:85955eb2e61a
- Parent:
- 0:8d34375d954c
- Child:
- 3:c54a1eba22c4
fix spi
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spiralray | 0:8d34375d954c | 1 | // Common |
spiralray | 0:8d34375d954c | 2 | #define CMD_GET_CONNECTION_STATUS 0x01 // OK |
spiralray | 0:8d34375d954c | 3 | #define CMD_GET_SIGNAL_QUALITY 0x02 // OK |
spiralray | 0:8d34375d954c | 4 | #define CMD_GET_DATETIME 0x03 // OK |
spiralray | 0:8d34375d954c | 5 | #define CMD_ECHO_BACK 0x0f // OK |
spiralray | 0:8d34375d954c | 6 | |
spiralray | 0:8d34375d954c | 7 | // IO |
spiralray | 0:8d34375d954c | 8 | #define CMD_READ_ADC 0x10 // OK |
spiralray | 0:8d34375d954c | 9 | |
spiralray | 0:8d34375d954c | 10 | // Transmit |
spiralray | 0:8d34375d954c | 11 | #define CMD_TX_ENQUEUE 0x20 // OK |
spiralray | 0:8d34375d954c | 12 | #define CMD_TX_SENDIMMED 0x21 // OK |
spiralray | 0:8d34375d954c | 13 | #define CMD_TX_LENGTH 0x22 // OK |
spiralray | 0:8d34375d954c | 14 | #define CMD_TX_CLEAR 0x23 // OK |
spiralray | 0:8d34375d954c | 15 | #define CMD_TX_SEND 0x24 // OK |
spiralray | 0:8d34375d954c | 16 | #define CMD_TX_STAT 0x25 // OK |
spiralray | 0:8d34375d954c | 17 | |
spiralray | 0:8d34375d954c | 18 | // Receive |
spiralray | 0:8d34375d954c | 19 | #define CMD_RX_DEQUEUE 0x30 // OK |
spiralray | 0:8d34375d954c | 20 | #define CMD_RX_PEEK 0x31 // OK |
spiralray | 0:8d34375d954c | 21 | #define CMD_RX_LENGTH 0x32 // OK |
spiralray | 0:8d34375d954c | 22 | #define CMD_RX_CLEAR 0x33 // OK |
spiralray | 0:8d34375d954c | 23 | |
spiralray | 0:8d34375d954c | 24 | // File Download |
spiralray | 0:8d34375d954c | 25 | #define CMD_START_FILE_DOWNLOAD 0x40 // OK |
spiralray | 0:8d34375d954c | 26 | #define CMD_GET_FILE_METADATA 0x41 // OK |
spiralray | 0:8d34375d954c | 27 | #define CMD_GET_FILE_DOWNLOAD_STATUS 0x42 // OK |
spiralray | 0:8d34375d954c | 28 | #define CMD_CANCEL_FILE_DOWNLOAD 0x43 // OK |
spiralray | 0:8d34375d954c | 29 | #define CMD_GET_FILE_DATA 0x44 // OK |
spiralray | 0:8d34375d954c | 30 | |
spiralray | 0:8d34375d954c | 31 | // Operation |
spiralray | 0:8d34375d954c | 32 | #define CMD_GET_PRODUCT_ID 0xA0 // OK |
spiralray | 0:8d34375d954c | 33 | #define CMD_GET_UNIQUE_ID 0xA1 // OK |
spiralray | 0:8d34375d954c | 34 | #define CMD_GET_FIRMWARE_VERSION 0xA2 // OK |
spiralray | 0:8d34375d954c | 35 | #define CMD_UNLOCK 0xA8 // OK |
spiralray | 0:8d34375d954c | 36 | #define CMD_UPDATE_FIRMWARE 0xA9 // OK |
spiralray | 0:8d34375d954c | 37 | #define CMD_GET_UPDATE_FIRMWARE_STATUS 0xAA // OK |
spiralray | 0:8d34375d954c | 38 | #define CMD_SOFTWARE_RESET 0xAF // OK |
spiralray | 0:8d34375d954c | 39 | |
spiralray | 0:8d34375d954c | 40 | |
spiralray | 0:8d34375d954c | 41 | // Response |
spiralray | 0:8d34375d954c | 42 | #define CMD_ERROR_NONE 0x01 |
spiralray | 0:8d34375d954c | 43 | #define CMD_ERROR_PARITY 0x02 |
spiralray | 0:8d34375d954c | 44 | #define CMD_ERROR_MISSING 0x03 |
spiralray | 0:8d34375d954c | 45 | #define CMD_ERROR_INVALID_SYNTAX 0x04 |
spiralray | 0:8d34375d954c | 46 | #define CMD_ERROR_RUNTIME 0x05 |
spiralray | 0:8d34375d954c | 47 | #define CMD_ERROR_LOCKED 0x06 |
spiralray | 0:8d34375d954c | 48 | #define CMD_ERROR_BUSY 0x07 |