From b42a2098ebec7ece6ba075ee55f5c29061526a24 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 26 Sep 2014 16:29:52 +1000 Subject: Change to GDriver to support an initialisation parameter --- src/gdriver/sys_defs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gdriver/sys_defs.h') diff --git a/src/gdriver/sys_defs.h b/src/gdriver/sys_defs.h index d8de25fc..f7bf622e 100644 --- a/src/gdriver/sys_defs.h +++ b/src/gdriver/sys_defs.h @@ -67,7 +67,7 @@ typedef struct GDriverVMT { uint16_t type; // @< What type of driver this is uint16_t flags; // @< Flags for the driver. Meaning is specific to each driver type. uint32_t objsize; // @< How big the runtime driver structure is - bool_t (*init)(GDriver *driver, unsigned driverinstance, unsigned systeminstance); // @< Initialise the driver. Returns TRUE if OK. + bool_t (*init)(GDriver *driver, void *param, 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. @@ -102,8 +102,9 @@ extern "C" { * @return The runtime driver structure or NULL if it fails. * * @param[in] vmt The driver's vmt + * @param[in] param An arbitrary paramater passed to the driver init routine. */ - GDriver *gdriverRegister(const GDriverVMT *vmt); + GDriver *gdriverRegister(const GDriverVMT *vmt, void *param); /** * @brief UnRegister a driver instance. -- cgit v1.2.3