Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SakuraIO by
commands.h
00001 /* SAKURA Internet IoT Communication Module Library for mbed 00002 * 00003 * The MIT License (MIT) 00004 * 00005 * Copyright (c) SAKURA Internet Inc. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a copy 00008 * of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00011 * and/or sell copies of the Software, and to permit persons to whom the Software 00012 * is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be included 00015 * in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00018 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00020 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00021 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00022 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 00025 // Common 00026 #define CMD_GET_CONNECTION_STATUS 0x01 // OK 00027 #define CMD_GET_SIGNAL_QUALITY 0x02 // OK 00028 #define CMD_GET_DATETIME 0x03 // OK 00029 #define CMD_ECHO_BACK 0x0f // OK 00030 00031 // IO 00032 #define CMD_READ_ADC 0x10 // OK 00033 00034 // Transmit 00035 #define CMD_TX_ENQUEUE 0x20 // OK 00036 #define CMD_TX_SENDIMMED 0x21 // OK 00037 #define CMD_TX_LENGTH 0x22 // OK 00038 #define CMD_TX_CLEAR 0x23 // OK 00039 #define CMD_TX_SEND 0x24 // OK 00040 #define CMD_TX_STAT 0x25 // OK 00041 00042 // Receive 00043 #define CMD_RX_DEQUEUE 0x30 // OK 00044 #define CMD_RX_PEEK 0x31 // OK 00045 #define CMD_RX_LENGTH 0x32 // OK 00046 #define CMD_RX_CLEAR 0x33 // OK 00047 00048 // File Download 00049 #define CMD_START_FILE_DOWNLOAD 0x40 // OK 00050 #define CMD_GET_FILE_METADATA 0x41 // OK 00051 #define CMD_GET_FILE_DOWNLOAD_STATUS 0x42 // OK 00052 #define CMD_CANCEL_FILE_DOWNLOAD 0x43 // OK 00053 #define CMD_GET_FILE_DATA 0x44 // OK 00054 00055 // Operation 00056 #define CMD_GET_PRODUCT_ID 0xA0 // OK 00057 #define CMD_GET_UNIQUE_ID 0xA1 // OK 00058 #define CMD_GET_FIRMWARE_VERSION 0xA2 // OK 00059 #define CMD_UNLOCK 0xA8 // OK 00060 #define CMD_UPDATE_FIRMWARE 0xA9 // OK 00061 #define CMD_GET_UPDATE_FIRMWARE_STATUS 0xAA // OK 00062 #define CMD_SOFTWARE_RESET 0xAF // OK 00063 00064 00065 // Response 00066 #define CMD_ERROR_NONE 0x01 00067 #define CMD_ERROR_PARITY 0x02 00068 #define CMD_ERROR_MISSING 0x03 00069 #define CMD_ERROR_INVALID_SYNTAX 0x04 00070 #define CMD_ERROR_RUNTIME 0x05 00071 #define CMD_ERROR_LOCKED 0x06 00072 #define CMD_ERROR_BUSY 0x07
Generated on Tue Jul 19 2022 22:02:05 by
1.7.2
