1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef PCIE_TEST_H 10 #define PCIE_TEST_H 11 12 #include "hdf_device_desc.h" 13 #include "platform_if.h" 14 15 enum PcieTestCmd { 16 PCIE_READ_AND_WRITE_01 = 0, 17 }; 18 19 struct PcieTester { 20 struct IDeviceIoService service; 21 struct HdfDeviceObject *device; 22 int32_t (*TestEntry)(struct PcieTester *tester, int32_t cmd); 23 uint32_t busNum; 24 DevHandle handle; 25 }; 26 GetPcieTester(void)27static inline struct PcieTester *GetPcieTester(void) 28 { 29 return (struct PcieTester *)DevSvcManagerClntGetService("PCIE_TEST"); 30 } 31 32 #endif /* PCIE_TEST_H */ 33