diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-09-13 14:50:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-09-13 14:50:32 +1000 |
commit | 683ac0ab7fc5c379cec605257edac00b562bea86 (patch) | |
tree | afd6baa420ff537bfe8a91f7ec5ea8ff737c4859 /src/gdriver/sys_defs.h | |
parent | 0c7c74112e07f612ea5a2da00a5962728225d41f (diff) | |
download | uGFX-683ac0ab7fc5c379cec605257edac00b562bea86.tar.gz uGFX-683ac0ab7fc5c379cec605257edac00b562bea86.tar.bz2 uGFX-683ac0ab7fc5c379cec605257edac00b562bea86.zip |
Fixes to gdriver to make uGFXnet displays work
Diffstat (limited to 'src/gdriver/sys_defs.h')
-rw-r--r-- | src/gdriver/sys_defs.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gdriver/sys_defs.h b/src/gdriver/sys_defs.h index c5ab9862..7f50fc6d 100644 --- a/src/gdriver/sys_defs.h +++ b/src/gdriver/sys_defs.h @@ -67,12 +67,27 @@ 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, int driverinstance, int systeminstance); // @< Initialise the driver. + bool_t (*init)(GDriver *driver, int driverinstance, int 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. + void (*postinit)(GDriver *driver); // @< Called once the driver is registered. void (*deinit)(GDriver *driver); // @< De-initialise the driver } GDriverVMT; +/** + * @brief A definition that allows getting addresses of GDriverVMT structures to put into a list. + * @note eg. <code> + * const MyDriverVMTtype a[1] = {{...}}; + * const MyDriverVMTtype b[1] = {{...}}; + * ... + * #define DRIVER_LIST a, b + * extern GDriverVMTList DRIVER_LIST; // Now treated as single element arrays of GDriverVMT + * const GDriverVMT const * mylist = { DRIVER_LIST }; + * </code> + * + */ +typedef const struct GDriverVMT const GDriverVMTList[1]; + /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ |