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

Commit a8d114ff authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge "RootCanal: Implement the control command set_device_configuration" into main

parents bf7df198 56e2856b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -64,6 +64,8 @@ struct ControllerProperties {
  ControllerProperties(ControllerProperties&&) = default;
  ~ControllerProperties() = default;

  ControllerProperties& operator=(ControllerProperties const&) = default;

  // Perform a bitwise and operation on the supported commands mask;
  // the default bit setting is either loaded from the configuration
  // file or all 1s.
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ constexpr uint16_t kLeMaximumDataLength = 64;
constexpr uint16_t kLeMaximumDataTime = 0x148;
constexpr uint8_t kTransmitPowerLevel = -20;

void DualModeController::SetProperties(ControllerProperties properties) {
  WARNING(id_, "updating the device properties!");
  properties_ = std::move(properties);
}

// Device methods.
std::string DualModeController::GetTypeString() const {
  return "Simulated Bluetooth Controller";
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ class DualModeController : public Device {

  DualModeController& operator=(const DualModeController&) = delete;

  // Overwrite the configuration.
  void SetProperties(ControllerProperties properties);

  // Device methods.
  std::string GetTypeString() const override;

+4 −0
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@ bluetooth::hci::Address PhyDevice::GetAddress() const {
  return device_->GetAddress();
}

std::shared_ptr<Device> PhyDevice::GetDevice() const {
  return device_;
}

void PhyDevice::SetAddress(bluetooth::hci::Address address) {
  device_->SetAddress(std::move(address));
}
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ class PhyDevice {
            int8_t tx_power);

  bluetooth::hci::Address GetAddress() const;
  std::shared_ptr<Device> GetDevice() const;
  void SetAddress(bluetooth::hci::Address address);
  std::string ToString();

Loading