📄 btdefines.h
字号:
#ifndef _BTDEFINES_H_#define _BTDEFINES_H_/* Debug output *///#define ENABLE_DEBUG_LOG/* Incoming connection channel assignments */#define BT_CHANNEL_HF 3#define BT_CHANNEL_HS 7/* Client/Server communication */#define BT_MAX_CLIENTS 10#define BT_MAX_HANDLES 10/* String lengths */#define BT_BDADDR_LEN 18#define BT_PIN_LEN 63/* Timeouts, usec */#define BT_TO_NONE 0#define BT_TO_INFINITE -1#define BT_TO_DEFAULT 100000#define BT_TO_LISTEN_RETRY (5)*1000000 /* 5 seconds between retries */#define BT_TO_LISTEN_TOTAL (30)*1000000 /* retry for 30 seconds */#define BT_TO_CONNECT_RETRY (10)*1000000 /* 10 seconds between retries */#define BT_TO_CONNECT_RETRY_1 (3)*1000000 /* 3 seconds between retries */#define BT_TO_CONNECT_TOTAL (60)*1000000 /* retry for 1 minute */#define BT_TO_RECONNECT_TOTAL (600)*1000000 /* retry for 10 minutes */#define BT_TO_APPREMOVE (5)*1000000 /* ppp shutdown timeout */#define BT_TO_TTYCREATE (5)*1000000 /* tty creation timeout, ppp related */#define BT_TO_PPPREADY (30)*1000000 /* ppp startup timeout */#define BT_TO_REMOVEACL (5)*1000000 /* ACL link removal timeout */#define BT_TO_PPPSTARTRETRY (10)*1000000 /* timeout between retries if the device is busy */#define BT_TO_PPPSTARTTOTAL (40)*1000000 /* total number of seconds to retry if the device is busy *//* Retry numbers */#define BT_NR_LISTEN 10/* Error codes */#define BT_ERR_NONE 0#define BT_ERR_FAILED -1#define BT_ERR_TIMEOUT -2#define BT_ERR_ARGUMENT -3#define BT_ERR_NOMEMORY -4#define BT_ERR_STATE -5#define BT_ERR_INUSE -6#define BT_ERR_CONNECTION -7/* Logic */#define BT_FALSE 0#define BT_TRUE 1/* States */#define BT_STATE_UNINITIALIZED 0#define BT_STATE_INITIALIZED 1#define BT_STATE_START_LISTENING 2#define BT_STATE_LISTENING 3#define BT_STATE_START_CONNECTING 4#define BT_STATE_REMOVE_CONNECTION 6#define BT_STATE_CONNECTING 7#define BT_STATE_CONNECTED 8#define BT_STATE_APP_START 9#define BT_STATE_APP_REMOVE_CONNECTION 10#define BT_STATE_APP_READY 11#define BT_STATE_APP_CLOSING 12#define BT_STATE_CLOSING 13/* Profiles */#define BT_PROFILE_UNDEFINED -1#define BT_PROFILE_HF 0#define BT_PROFILE_HS 1#define BT_PROFILE_DUN 3/* App */#define BT_PPP_NAME "/sbin/pppd"#define BT_PPP_BAUDRATE "115200"#define BT_PPP_UPFILE "/var/run/ppp.up"#define BT_PPP_PARAM_LEN 256#define BT_PPP_LINKNAME "btserver"#define BT_PPP_PIDFILE "/var/run/ppp-" BT_PPP_LINKNAME ".pid"/* App states */#define BT_PPP_STATE_UNINITIALIZED 100#define BT_PPP_STATE_INIT 101#define BT_PPP_STATE_REMOVE 102#define BT_PPP_STATE_CREATETTY 103#define BT_PPP_STATE_CHECKTTY 104#define BT_PPP_STATE_START 105#define BT_PPP_STATE_CHECKREADY 106#define BT_PPP_STATE_CLOSING 107/* Flags */#define BT_FLAG_UNDEFINED -1#define BT_FLAG_AUTORECONNECT 1#define BT_FLAG_LISTEN 2#define BT_FLAG_MULTICHANNEL 4#define BT_FLAG_OPEN 8#define BT_FLAG_DONOTRECONNECT 16/* max file descriptors */#define BT_FD_MAX 1024/* Pairing */#define BT_HCID_NAME "/sbin/hcid"#define BT_HCID_PAIR_ENABLE SIGUSR2#define BT_HCID_PAIR_DISABLE SIGUSR1/* HW */#define BT_FILENAME_MODELID "/proc/barcelona/modelid"#endif //_BTDEFINES_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -