blob: cbb322a2a11942e39eddcdeb2962fe140e7bde5c [file] [log] [blame]
Shawn McCarney8a3afd72020-03-12 14:28:44 -05001/**
2 * Copyright © 2020 IBM Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "i2c_interface.hpp"
17
18#include <memory>
19
20namespace phosphor::power::regulators::test_utils
21{
22
23/**
24 * Create an I2CInterface object with hard-coded bus and address values.
25 *
26 * @return I2CInterface object wrapped in a unique_ptr
27 */
28inline std::unique_ptr<i2c::I2CInterface> createI2CInterface()
29{
30 return i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
31}
32
33} // namespace phosphor::power::regulators::test_utils