Commit 2c06a4eb authored by Daniel Drake's avatar Daniel Drake

Expose driver info to library users

parent 711bb115
......@@ -118,6 +118,11 @@ API_EXPORTED void fp_dscv_devs_free(struct fp_dscv_dev **devs)
API_EXPORTED const struct fp_driver *fp_dscv_dev_get_driver(struct fp_dscv_dev *dev)
return dev->drv;
API_EXPORTED struct fp_dev *fp_dev_open(struct fp_dscv_dev *ddev)
struct fp_dev *dev;
......@@ -152,6 +157,21 @@ API_EXPORTED void fp_dev_close(struct fp_dev *dev)
API_EXPORTED const struct fp_driver *fp_dev_get_driver(struct fp_dev *dev)
return dev->drv;
API_EXPORTED const char *fp_driver_get_name(const struct fp_driver *drv)
return drv->name;
API_EXPORTED const char *fp_driver_get_full_name(const struct fp_driver *drv)
return drv->full_name;
API_EXPORTED int fp_init(void)
......@@ -23,14 +23,21 @@
/* structs that applications are not allowed to peek into */
struct fp_dscv_dev;
struct fp_dev;
struct fp_driver;
/* Device discovery */
struct fp_dscv_dev **fp_discover_devs(void);
void fp_dscv_devs_free(struct fp_dscv_dev **devs);
const struct fp_driver *fp_dscv_dev_get_driver(struct fp_dscv_dev *dev);
/* Device handling */
struct fp_dev *fp_dev_open(struct fp_dscv_dev *ddev);
void fp_dev_close(struct fp_dev *dev);
const struct fp_driver *fp_dev_get_driver(struct fp_dev *dev);
/* Drivers */
const char *fp_driver_get_name(const struct fp_driver *drv);
const char *fp_driver_get_full_name(const struct fp_driver *drv);
int fp_init(void);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment