summaryrefslogtreecommitdiff
path: root/system/stack/rfcomm/rfc_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'system/stack/rfcomm/rfc_int.h')
-rw-r--r--system/stack/rfcomm/rfc_int.h45
1 files changed, 1 insertions, 44 deletions
diff --git a/system/stack/rfcomm/rfc_int.h b/system/stack/rfcomm/rfc_int.h
index 9b9c96b5a8..61706a2946 100644
--- a/system/stack/rfcomm/rfc_int.h
+++ b/system/stack/rfcomm/rfc_int.h
@@ -34,6 +34,7 @@
#include "stack/include/l2c_api.h"
#include "stack/rfcomm/port_int.h"
#include "stack/rfcomm/rfc_event.h"
+#include "stack/rfcomm/rfc_state.h"
#include "types/raw_address.h"
/*
@@ -146,50 +147,6 @@ typedef struct {
#define LINE_STATUS_FRAME 0x08 /* Receive Framing error */
#define LINE_STATUS_FAILED 0x10 /* Connection Failed */
-/*
- * Define states and events for the RFC multiplexer state machine
-*/
-typedef enum : uint16_t {
- RFC_MX_STATE_IDLE = 0,
- RFC_MX_STATE_WAIT_CONN_CNF = 1,
- RFC_MX_STATE_CONFIGURE = 2,
- RFC_MX_STATE_SABME_WAIT_UA = 3,
- RFC_MX_STATE_WAIT_SABME = 4,
- RFC_MX_STATE_CONNECTED = 5,
- RFC_MX_STATE_DISC_WAIT_UA = 6,
-} tRFC_MX_STATE;
-
-inline std::string rfcomm_mx_state_text(tRFC_MX_STATE state) {
- switch (state) {
- case RFC_MX_STATE_IDLE:
- return std::string("idle");
- case RFC_MX_STATE_WAIT_CONN_CNF:
- return std::string("wait_config");
- case RFC_MX_STATE_CONFIGURE:
- return std::string("configure");
- case RFC_MX_STATE_SABME_WAIT_UA:
- return std::string("sabme_wait_ua");
- case RFC_MX_STATE_WAIT_SABME:
- return std::string("wait_sabme");
- case RFC_MX_STATE_CONNECTED:
- return std::string("connected");
- case RFC_MX_STATE_DISC_WAIT_UA:
- return std::string("disconnect_wait_ua");
- default:
- return std::string("UNKNOWN");
- }
-}
-
-/*
- * Define port states
- */
-#define RFC_STATE_CLOSED 0
-#define RFC_STATE_SABME_WAIT_UA 1
-#define RFC_STATE_ORIG_WAIT_SEC_CHECK 2
-#define RFC_STATE_TERM_WAIT_SEC_CHECK 3
-#define RFC_STATE_OPENED 4
-#define RFC_STATE_DISC_WAIT_UA 5
-
/* seconds to wait for reply with Poll bit */
#define RFC_T1_TIMEOUT 20
/* seconds to wait for reply with Poll bit other than MX */