blob: 6d0ab37f9aba92f28c106a0a7a97b52e8bf9ee0d [file] [log] [blame]
Patrick Ventureb5bf0fc2019-05-03 14:33:49 -07001/*
2 * Copyright 2019 Google Inc.
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
17#include "p2a.hpp"
18
19#include "pci.hpp"
20
21namespace host_tool
22{
23
24bool P2aDataHandler::sendContents(const std::string& input,
25 std::uint16_t session)
26{
27 PciUtilImpl pci;
28 PciFilter filter;
29
30 filter.vid = aspeedVendorId;
31 filter.did = aspeedDeviceId;
32
33 auto output = pci.getPciDevices(filter);
34 for (const auto& d : output)
35 {
36 std::fprintf(stderr, "0x%x", d.vid);
37 }
38
39 return false;
40}
41
42} // namespace host_tool