Loading system/stack/rfcomm/port_int.h +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ #include "stack/include/l2c_api.h" #include "stack/include/port_api.h" #include "stack/include/rfcdefs.h" #include "stack/rfcomm/rfc_state.h" #include "types/raw_address.h" /* * Flow control configuration values for the mux */ Loading Loading @@ -88,7 +90,7 @@ typedef struct { RawAddress::kEmpty; /* BD ADDR of the peer if initiator */ uint16_t lcid; /* Local cid used for this channel */ uint16_t peer_l2cap_mtu; /* Max frame that can be sent to peer L2CAP */ uint8_t state; /* Current multiplexer channel state */ tRFC_MX_STATE state; /* Current multiplexer channel state */ uint8_t is_initiator; /* true if this side sends SABME (dlci=0) */ bool restart_required; /* true if has to restart channel after disc */ bool peer_ready; /* True if other side can accept frames */ Loading system/stack/rfcomm/rfc_state.h +8 −0 Original line number Diff line number Diff line Loading @@ -71,3 +71,11 @@ inline std::string rfcomm_port_state_text(const tRFC_PORT_STATE& state) { return std::string("UNKNOWN[") + std::to_string(state) + std::string("]"); } } namespace fmt { template <> struct formatter<tRFC_MX_STATE> : enum_formatter<tRFC_MX_STATE> {}; template <> struct formatter<tRFC_PORT_STATE> : enum_formatter<tRFC_PORT_STATE> {}; } // namespace fmt Loading
system/stack/rfcomm/port_int.h +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ #include "stack/include/l2c_api.h" #include "stack/include/port_api.h" #include "stack/include/rfcdefs.h" #include "stack/rfcomm/rfc_state.h" #include "types/raw_address.h" /* * Flow control configuration values for the mux */ Loading Loading @@ -88,7 +90,7 @@ typedef struct { RawAddress::kEmpty; /* BD ADDR of the peer if initiator */ uint16_t lcid; /* Local cid used for this channel */ uint16_t peer_l2cap_mtu; /* Max frame that can be sent to peer L2CAP */ uint8_t state; /* Current multiplexer channel state */ tRFC_MX_STATE state; /* Current multiplexer channel state */ uint8_t is_initiator; /* true if this side sends SABME (dlci=0) */ bool restart_required; /* true if has to restart channel after disc */ bool peer_ready; /* True if other side can accept frames */ Loading
system/stack/rfcomm/rfc_state.h +8 −0 Original line number Diff line number Diff line Loading @@ -71,3 +71,11 @@ inline std::string rfcomm_port_state_text(const tRFC_PORT_STATE& state) { return std::string("UNKNOWN[") + std::to_string(state) + std::string("]"); } } namespace fmt { template <> struct formatter<tRFC_MX_STATE> : enum_formatter<tRFC_MX_STATE> {}; template <> struct formatter<tRFC_PORT_STATE> : enum_formatter<tRFC_PORT_STATE> {}; } // namespace fmt