1*b5bf0fc2SPatrick Venture /* 2*b5bf0fc2SPatrick Venture * Copyright 2019 Google Inc. 3*b5bf0fc2SPatrick Venture * 4*b5bf0fc2SPatrick Venture * Licensed under the Apache License, Version 2.0 (the "License"); 5*b5bf0fc2SPatrick Venture * you may not use this file except in compliance with the License. 6*b5bf0fc2SPatrick Venture * You may obtain a copy of the License at 7*b5bf0fc2SPatrick Venture * 8*b5bf0fc2SPatrick Venture * http://www.apache.org/licenses/LICENSE-2.0 9*b5bf0fc2SPatrick Venture * 10*b5bf0fc2SPatrick Venture * Unless required by applicable law or agreed to in writing, software 11*b5bf0fc2SPatrick Venture * distributed under the License is distributed on an "AS IS" BASIS, 12*b5bf0fc2SPatrick Venture * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*b5bf0fc2SPatrick Venture * See the License for the specific language governing permissions and 14*b5bf0fc2SPatrick Venture * limitations under the License. 15*b5bf0fc2SPatrick Venture */ 16*b5bf0fc2SPatrick Venture 17*b5bf0fc2SPatrick Venture #include "p2a.hpp" 18*b5bf0fc2SPatrick Venture 19*b5bf0fc2SPatrick Venture #include "pci.hpp" 20*b5bf0fc2SPatrick Venture 21*b5bf0fc2SPatrick Venture namespace host_tool 22*b5bf0fc2SPatrick Venture { 23*b5bf0fc2SPatrick Venture 24*b5bf0fc2SPatrick Venture bool P2aDataHandler::sendContents(const std::string& input, 25*b5bf0fc2SPatrick Venture std::uint16_t session) 26*b5bf0fc2SPatrick Venture { 27*b5bf0fc2SPatrick Venture PciUtilImpl pci; 28*b5bf0fc2SPatrick Venture PciFilter filter; 29*b5bf0fc2SPatrick Venture 30*b5bf0fc2SPatrick Venture filter.vid = aspeedVendorId; 31*b5bf0fc2SPatrick Venture filter.did = aspeedDeviceId; 32*b5bf0fc2SPatrick Venture 33*b5bf0fc2SPatrick Venture auto output = pci.getPciDevices(filter); 34*b5bf0fc2SPatrick Venture for (const auto& d : output) 35*b5bf0fc2SPatrick Venture { 36*b5bf0fc2SPatrick Venture std::fprintf(stderr, "0x%x", d.vid); 37*b5bf0fc2SPatrick Venture } 38*b5bf0fc2SPatrick Venture 39*b5bf0fc2SPatrick Venture return false; 40*b5bf0fc2SPatrick Venture } 41*b5bf0fc2SPatrick Venture 42*b5bf0fc2SPatrick Venture } // namespace host_tool 43