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

Commit 9c61131d authored by Chris Manton's avatar Chris Manton
Browse files

Add helpers tL2C_CB::tL2C_LCB::tBT_TRANSPORT

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I55ec884b8fbff02337b02616ba56566c908aebf4
parent d2dda87d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -402,6 +402,12 @@ typedef struct t_l2c_linkcb {
  void SetDisconnectReason(uint16_t disc_reason) { disc_reason_ = disc_reason; }

  tBT_TRANSPORT transport;
  bool is_transport_br_edr() const { return transport == BT_TRANSPORT_BR_EDR; }
  bool is_transport_ble() const { return transport == BT_TRANSPORT_LE; }
  bool is_transport_valid() const {
    return is_transport_ble() || is_transport_br_edr();
  }

  uint8_t initiating_phys;  // LE PHY used for connection initiation
  tBLE_ADDR_TYPE ble_addr_type;
  uint16_t tx_data_len; /* tx data length used in data length extension */