From eec7e74d2eccf811f0d25bb40fa514dc47655d67 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 8 Mar 2016 02:15:51 +0100 Subject: Support XML configuration of device models --- pcilib/xml.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pcilib/xml.h') diff --git a/pcilib/xml.h b/pcilib/xml.h index d8a9693..f6fc91b 100644 --- a/pcilib/xml.h +++ b/pcilib/xml.h @@ -40,6 +40,16 @@ struct pcilib_xml_s { extern "C" { #endif +/** + * Resolves device model from vendor and device ids using XML configuration + * The association of vendor/device id pairs with model are provided devices.xml under PCILIB_MODEL_DIR + * @param[in,out] ctx - pcilib context + * @param[in] vendor_id - the vendor id + * @param[in] device_id - the device id + * @return - the name of model or NULL on an error and unknown device. It is caller responsibility to free returned string. + */ +char *pcilib_detect_xml_model(pcilib_t *ctx, unsigned int vendor_id, unsigned int device_id); + /** Initializes XML stack and loads a default set of XML files. * The default location for XML files is /usr/local/share/pcilib/models/@b{model}. * This can be altered using CMake PCILIB_MODEL_DIR variable while building or using -- cgit v1.2.3