状态码

public class StateCode {

/*---------------------------------------------------------------------
 *connection status
 * ---------------------------------------------------------------------*/
public final static int CONNECTION_OK = 1;        //Connection successful
public final static int CONNECTION_FAILED = 2;    //Connection Fail
public final static int CONNECTION_DISCONNECT = 0;//disconnect
public final static int CONNECTION_CONNECTING = 3;//connecting
public final static int CONNECTION_CONNECTED = 4; //connected

/*---------------------------------------------------------------------
 * Response Status
 * ---------------------------------------------------------------------*/
public final static int STATUS_SUCCESS = 0;                  //successful
public final static int STATUS_FAIL = 1;                     //failure
public final static int STATUS_UNKOWN_CMD = 2;               //unknown command
public final static int STATUS_BUSY = 3;                     //device is busy
public final static int STATUS_NO_RESOURCE = 4;              //no resource
public final static int STATUS_CRC_ERROR = 5;                //CRC check error
public final static int STATUS_ALL_DATA_CRC_ERROR = 6;       //all data CRC error
public final static int STATUS_PARAMETER_ERROR = 7;          //parameter error
public final static int STATUS_RESPONSE_DATA_OVER_LIMIT = 8; //The reply data exceeded the limit

/*--------------------------------------------------------------------
 * TWS
 *--------------------------------------------------------------------*/
/* =================== *
 * earphone status
 * =================== */
//Do not display popovers
public final static int TWS_HEADSET_STATUS_DIMISS = 0;
//Bluetooth is disconnected
public final static int TWS_HEADSET_STATUS_DISCONNECTED = 1;
//Bluetooth is connected
public final static int TWS_HEADSET_STATUS_CONNECTED = 2;
//Bluetooth is connecting
public final static int TWS_HEADSET_STATUS_CONNECTING = 3;

//C0
public final static int ADV_SETTINGS_ERROR_IN_GAME_MODE = 1; //Game mode causes Settings to fail
//The length of bluetooth name exceeds the limit
public final static int ADV_SETTINGS_ERROR_DEVICE_NAME_LENGTH_OVER_LIMIT = 2;
//Failed to set flash in non-Bluetooth mode
public final static int ADV_SETTINGS_ERROR_LED_SETTINGS_FAILED = 3;

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • """1.个性化消息: 将用户的姓名存到一个变量中,并向该用户显示一条消息。显示的消息应非常简单,如“Hello ...
    她即我命阅读 3,323评论 0 5
  • 为了让我有一个更快速、更精彩、更辉煌的成长,我将开始这段刻骨铭心的自我蜕变之旅!从今天开始,我将每天坚持阅...
    李薇帆阅读 1,971评论 0 3
  • 似乎最近一直都在路上,每次出来走的时候感受都会很不一样。 1、感恩一直遇到好心人,很幸运。在路上总是...
    时间里的花Lily阅读 1,415评论 0 2
  • 1、expected an indented block 冒号后面是要写上一定的内容的(新手容易遗忘这一点); 缩...
    庵下桃花仙阅读 550评论 0 1
  • 一、工具箱(多种工具共用一个快捷键的可同时按【Shift】加此快捷键选取)矩形、椭圆选框工具 【M】移动工具 【V...
    墨雅丫阅读 549评论 0 0