diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-23 17:55:42 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-23 17:55:42 +1000 |
commit | 0c7c74112e07f612ea5a2da00a5962728225d41f (patch) | |
tree | 093d8e253f77a87b303db89dacc3e339454347ce /src/gdriver/sys_defs.h | |
parent | 339150c55f934afccc989c75954a46f16612a777 (diff) | |
download | uGFX-0c7c74112e07f612ea5a2da00a5962728225d41f.tar.gz uGFX-0c7c74112e07f612ea5a2da00a5962728225d41f.tar.bz2 uGFX-0c7c74112e07f612ea5a2da00a5962728225d41f.zip |
GDRIVER now working for GDISP including multiple displays.
Still uses old GDISP driver model for now
Untested with uGFXnet.
Still to come: Input drivers etc
Diffstat (limited to 'src/gdriver/sys_defs.h')
-rw-r--r-- | src/gdriver/sys_defs.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/gdriver/sys_defs.h b/src/gdriver/sys_defs.h index 3392f73a..c5ab9862 100644 --- a/src/gdriver/sys_defs.h +++ b/src/gdriver/sys_defs.h @@ -34,7 +34,7 @@ #ifndef _GDRIVER_H #define _GDRIVER_H -#if GFX_NEED_GDRIVER || defined(__DOXYGEN__) +#if GFX_USE_GDRIVER || defined(__DOXYGEN__) /*===========================================================================*/ /* Type definitions */ @@ -56,7 +56,7 @@ * dynamically by the system for each driver instance. */ typedef struct GDriver { - GDriver * driverchain; + struct GDriver * driverchain; const struct GDriverVMT * vmt; } GDriver; @@ -64,13 +64,13 @@ typedef struct GDriver { * @brief All driver VMT's start with this structure. */ 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)(void *driver, int driverinstance, int systeminstance); // @< Initialise the driver. - // driverinstance is the instance 0..n of this driver. - // systeminstance is the instance 0..n of this type of device. - void (*deinit)(void *driver); // @< De-initialise the driver + 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. + // driverinstance is the instance 0..n of this driver. + // systeminstance is the instance 0..n of this type of device. + void (*deinit)(GDriver *driver); // @< De-initialise the driver } GDriverVMT; /*===========================================================================*/ @@ -115,11 +115,20 @@ extern "C" { */ int gdriverInstanceCount(uint16_t type); + /** + * @brief Get the next driver for a type of device + * @return The runtime driver structure or NULL if there are no more. + * + * @param[in] type The type of driver to find + * @param[in] driver The last driver returned or NULL to start again + */ + GDriver *gdriverGetNext(uint16_t type, GDriver *driver); + #ifdef __cplusplus } #endif -#endif /* GFX_NEED_GDRIVER */ +#endif /* GFX_USE_GDRIVER */ #endif /* _GDRIVER_H */ /** @} */ |