blob: 8afd6ecce069cbda68c92d2a138abc12fd945a15 [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_DA7219_DRIVER_DA7219_H_
#define SRC_DA7219_DRIVER_DA7219_H_
#include <lib/driver2/driver2_cpp.h>
#include "i2c_channel.h"
namespace audio {
class Da7219Driver : public driver::DriverBase {
public:
Da7219Driver(driver::DriverStartArgs start_args, fdf::UnownedDispatcher driver_dispatcher)
: driver::DriverBase("da7219", std::move(start_args), std::move(driver_dispatcher)) {}
virtual ~Da7219Driver() = default;
zx::result<> Start() override;
private:
zx::result<> SetupI2cChannel();
std::shared_ptr<I2cChannel> i2c_channel_;
};
} // namespace audio
#endif // SRC_DA7219_DRIVER_DA7219_H_