Go to the source code of this file.
Classes | |
struct | _tag_driver_function_array |
Defines | |
#define | __DRIVER_H__ |
#define | IILC_DRIVER_API |
#define | DECLARE_DRIVER_INTERFACE_FUNC(name, retVal, args) |
Nifty little macro to typedef a function pointer which complies with the standards for a driver function pointer. Note that to get the Doxygen generation to be correct, you need to have the config file setup so that ENABLE_PREPROCESSING and MACRO_EXPANSION options are set to 'yes'. | |
Typedefs | |
typedef void(* | pfnDrvCBFanSpeed )(void *context, unsigned int fan_id, unsigned int rpm) |
typedef void(* | pfnDrvCBTemp )(void *context, unsigned int sensor_id, double degrees_c) |
typedef void(* | pfnDrvCBKeyEvent )(void *context, unsigned int key_event) |
typedef _tag_driver_instance_data * | LP_DRIVER_INSTANCE |
A pointer to instance data held by the driver implementation. | |
typedef _tag_driver_function_array * | LP_DRIVER_FN_ARRAY |
typedef int(* | pfnDriverCreate )(const char *pszPort, LP_DRIVER_FN_ARRAY pFnArray, LP_DRIVER_INSTANCE *ppDriverInstData) |
typedef int(* | pfnDriverDispose )(LP_DRIVER_INSTANCE *ppDriverInstData) |
typedef int(* | pfnDriverStart )(LP_DRIVER_INSTANCE pDriverInstData) |
typedef int(* | pfnDriverStop )(LP_DRIVER_INSTANCE pDriverInstData) |
typedef int(* | pfnDriverSetBacklight )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int nBacklightValue) |
typedef int(* | pfnDriverSetContrast )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int nBacklightValue) |
typedef int(* | pfnDriverSetLED )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int led_id, unsigned int nRed, unsigned int nGreen, unsigned int nBlue) |
typedef int(* | pfnDriverRestart )(LP_DRIVER_INSTANCE pDriverInstData) |
typedef int(* | pfnDriverClearScreen )(LP_DRIVER_INSTANCE pDriverInstData) |
typedef int(* | pfnDriverWriteText )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int x, unsigned int y, char *strData, unsigned int strLen) |
typedef int(* | pfnDriverSetFanPower )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id, unsigned int nPower) |
typedef int(* | pfnDriverGetHardwareVersion )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int *pnVersionMajor, unsigned int *pnVersionMinor) |
typedef int(* | pfnDriverGetScreenSize )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int *pnScreenWidth, unsigned int *pnScreenHeight) |
typedef int(* | pfnDriverEnableFanReport )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id) |
typedef int(* | pfnDriverDisableFanReport )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id) |
typedef int(* | pfnDriverEnableTempReport )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int sensor_id) |
typedef int(* | pfnDriverDisableTempReport )(LP_DRIVER_INSTANCE pDriverInstData, unsigned int sensor_id) |
typedef int(* | pfnDriverSetCallbackFan )(LP_DRIVER_INSTANCE pDriverInstData, pfnDrvCBFanSpeed pfnDrvCBFanSpeed, void *context) |
typedef int(* | pfnDriverSetCallbackTemp )(LP_DRIVER_INSTANCE pDriverInstData, pfnDrvCBTemp pfnDrvCBTemp, void *context) |
typedef _tag_driver_function_array | DRIVER_FN_ARRAY |
Functions | |
int | driver_Create (const char *pszPort, LP_DRIVER_FN_ARRAY pFnArray, LP_DRIVER_INSTANCE *ppDriverInstData) |
Performs the initial creation of the driver instance. | |
int | driver_Dispose (LP_DRIVER_INSTANCE *ppDriverInstData) |
Performs the final shutdown and cleanup of the driver instance. | |
int | driver_Start (LP_DRIVER_INSTANCE pDriverInstData) |
Signals to the implementation to commence communications with the physical device. | |
int | driver_Stop (LP_DRIVER_INSTANCE pDriverInstData) |
Signals to the implementation to cease communications with the physical device. | |
int | driver_SetBacklight (LP_DRIVER_INSTANCE pDriverInstData, unsigned int nBacklightValue) |
Instructs the display to set the backlight to the specified brightness level. | |
int | driver_SetContrast (LP_DRIVER_INSTANCE pDriverInstData, unsigned int nBacklightValue) |
Instructs the display to set the contrast to the specified ratio. | |
int | driver_SetLED (LP_DRIVER_INSTANCE pDriverInstData, unsigned int led_id, unsigned int nRed, unsigned int nGreen, unsigned int nBlue) |
Sets the specified LED to the given colour. | |
int | driver_Restart (LP_DRIVER_INSTANCE pDriverInstData) |
Restarts the physical device, resetting it to the initial power-on status. | |
int | driver_ClearScreen (LP_DRIVER_INSTANCE pDriverInstData) |
Clears the screen of the display. | |
int | driver_WriteText (LP_DRIVER_INSTANCE pDriverInstData, unsigned int x, unsigned int y, char *strData, unsigned int strLen) |
Writes the supplied text to the device at the location given. | |
int | driver_SetFanPower (LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id, unsigned int nPower) |
Sets the specified fan to a given power level. | |
int | driver_GetHardwareVersion (LP_DRIVER_INSTANCE pDriverInstData, unsigned int *pnVersionMajor, unsigned int *pnVersionMinor) |
int | driver_GetScreenSize (LP_DRIVER_INSTANCE pDriverInstData, unsigned int *pnScreenWidth, unsigned int *pnScreenHeight) |
int | driver_EnableFanReport (LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id) |
int | driver_DisableFanReport (LP_DRIVER_INSTANCE pDriverInstData, unsigned int fan_id) |
int | driver_EnableTempReport (LP_DRIVER_INSTANCE pDriverInstData, unsigned int sensor_id) |
int | driver_DisableTempReport (LP_DRIVER_INSTANCE pDriverInstData, unsigned int sensor_id) |
int | driver_SetCallbackFan (LP_DRIVER_INSTANCE pDriverInstData, pfnDrvCBFanSpeed pfnDrvCBFanSpeed, void *context) |
int | driver_SetCallbackTemp (LP_DRIVER_INSTANCE pDriverInstData, pfnDrvCBTemp pfnDrvCBTemp, void *context) |
Definition in file driver.h.
|
Value: IILC_DRIVER_API retVal driver_ ## name args ; \ typedef retVal (* pfnDriver ## name ) args
|
|
A pointer to instance data held by the driver implementation. This is really just a better way of writing "void *", as this way the compiler gets to do a bit more type-checking. |
|
Clears the screen of the display.
Definition at line 884 of file cfontz.c. Referenced by driver_ClearScreen(). |
|
Performs the initial creation of the driver instance. This will be the first function called for a given instance. This function will be called once and once only per device.
Definition at line 97 of file cfontz.c. Referenced by driver_Create(). |
|
Performs the final shutdown and cleanup of the driver instance. This function should cleanup any resources it allocated during the driver_Create() function call, or at any point during its lifecycle.
Definition at line 352 of file cfontz.c. Referenced by driver_Create(), and driver_Dispose(). |
|
Restarts the physical device, resetting it to the initial power-on status.
Definition at line 938 of file cfontz.c. Referenced by driver_Restart(). |
|
Instructs the display to set the backlight to the specified brightness level. The brightness level is expressed as a percentage - 0 represents off, 100 represents on. A value outside of this range is an error.
Definition at line 834 of file cfontz.c. Referenced by driver_Create(), and driver_SetBacklight(). |
|
Instructs the display to set the contrast to the specified ratio. The contrast ratio is expressed as a percentage - 0 represents off, 100 represents on. A value outside of this range is an error.
Definition at line 861 of file cfontz.c. Referenced by driver_Create(), and driver_SetContrast(). |
|
Sets the specified fan to a given power level. Fan power is expressed as a percentage and the value supplied must be in the range 0 to 100 inclusive.
Definition at line 969 of file cfontz.c. Referenced by driver_Create(), and driver_SetFanPower(). |
|
Sets the specified LED to the given colour. Colour is expressed as a percentage of the three primary additive colours. Each of these values must be in the range 0 to 100 inclusive. An implementation should ignore a colour component if the LED device cannot render that specific colour.
Definition at line 441 of file cfontz.c. Referenced by driver_SetLED(). |
|
Signals to the implementation to commence communications with the physical device. This function will be called after the driver_Create() function, but before any other functions. There are no restrictions against the driver establishing communications before this function call, but it is an error for the driver to produce callbacks until after this function has exited.
Definition at line 409 of file cfontz.c. Referenced by driver_Create(), and driver_Start(). |
|
Signals to the implementation to cease communications with the physical device. This function will be called before the driver_Dispose() function. There are no restrictions against the driver maintaining communications after this function call, but it is an error for the driver to produce callbacks after this function has exited. It is permissible for there to be multiple driver_Start(), driver_Stop() cycles during the lifetime (driver_Create() to driver_Dispose()) of a driver instance. The implementation should cope with this eventuality.
Definition at line 419 of file cfontz.c. Referenced by driver_Create(), and driver_Stop(). |
|
Writes the supplied text to the device at the location given.
Definition at line 907 of file cfontz.c. Referenced by driver_Create(), and driver_WriteText(). |