summaryrefslogtreecommitdiff
path: root/system/stack/rfcomm/rfc_int.h
diff options
context:
space:
mode:
authorRob Seymour <rseymour@google.com>2022-04-02 03:52:13 +0000
committerRob Seymour <rseymour@google.com>2022-04-02 04:01:22 +0000
commit4c7dc59bef24cc991251f9a7924ceada90c6bd63 (patch)
treea90550aa3ce1bc5e002ab6444c96954deca81af0 /system/stack/rfcomm/rfc_int.h
parent6fa2bea006b362a285f744f65f15b5902e55797a (diff)
parentdd4d23c4e1de011f8cd4eb132422172d5e283a73 (diff)
Merge TP1A.220328.001
Change-Id: I5f07094ba2fb3991da03673f97d2957b1f68018b
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 */