Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69343025 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "stack::rfcomm::tPORT: Use proper type tRFC_MX_STATE" into main am: 9da39a94

parents fffb00b7 9da39a94
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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
*/
@@ -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 */
+8 −0
Original line number Diff line number Diff line
@@ -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