aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdriver/sys_defs.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-09-25 17:43:43 +1000
committerinmarket <andrewh@inmarket.com.au>2014-09-25 17:45:14 +1000
commit0e73d65e58777f77882bc6dbbfd0e3e3aa5860b2 (patch)
treec5fddc5391c166a064533c8353d88f15ae56718c /src/gdriver/sys_defs.h
parent9f720b1f122ffc7986cc467ef1a7607000c6b491 (diff)
downloaduGFX-0e73d65e58777f77882bc6dbbfd0e3e3aa5860b2.tar.gz
uGFX-0e73d65e58777f77882bc6dbbfd0e3e3aa5860b2.tar.bz2
uGFX-0e73d65e58777f77882bc6dbbfd0e3e3aa5860b2.zip
Additional GDriver call
Diffstat (limited to 'src/gdriver/sys_defs.h')
-rw-r--r--src/gdriver/sys_defs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gdriver/sys_defs.h b/src/gdriver/sys_defs.h
index 546246de..d8de25fc 100644
--- a/src/gdriver/sys_defs.h
+++ b/src/gdriver/sys_defs.h
@@ -70,6 +70,7 @@ typedef struct GDriverVMT {
bool_t (*init)(GDriver *driver, unsigned driverinstance, unsigned systeminstance); // @< Initialise the driver. Returns TRUE if OK.
// driverinstance is the instance 0..n of this driver.
// systeminstance is the instance 0..n of this type of device.
+ // The memory allocated is cleared before this call.
void (*postinit)(GDriver *driver); // @< Called once the driver is registered.
void (*deinit)(GDriver *driver); // @< De-initialise the driver
} GDriverVMT;
@@ -131,6 +132,14 @@ extern "C" {
unsigned gdriverInstanceCount(uint16_t type);
/**
+ * @brief Get the instance number for a device
+ * @return The instance number or (unsigned)-1 if it fails.
+ *
+ * @param[in] driver The driver to find the instance number for
+ */
+ unsigned gdriverGetDriverInstanceNumber(GDriver *driver);
+
+ /**
* @brief Get the next driver for a type of device
* @return The runtime driver structure or NULL if there are no more.
*