Sample - Drivers Library
Changes
- V2.00 : Initial revision
- V3.00 : New M93CX6 SPI E2P driver
Library Description
This Driver sample ADL Library allows applications to use directly some
specefic devices, plugged on SPI, I2C or Parallel bus. The available drivers
are listed bellow :
- MAXIM MAX 6662 Temperature Sensor (SPI)
This driver allows to read the current temperature from the MAX6662 device.
- Samsung KS0719 graphical LCD (SPI)
This driver allows to draw points and to write characters on this graphical
display.
- ST M93CX6 E2P Memory (SPI)
This driver allows to write/read bytes to/from a M93CX6 external memory.
- Philips PCF8574 remote 8 bits I/O expander (I2C)
This driver allows to read/write from/on this IO expander.
- Parallel LCD plugged on PCF8574 remote 8 bits I/O expander (I2C)
This driver allows to write characters on a Parallel standard LCD, plugged
on the PCF8574 I/O expander.
- Parallel standard LCD
This driver allows to write characters an standard LCD plugged on the
Parallel bus (Wismo Pac only).
Library API
All constants and APIs are defined by the drv_global.h header file, which must
be included by any application to allows it to use the Drivers Library.
The library will need the global variable bellow on link operation, to define
the trace level on which will be displayed the Drivers traces :
extern u8 drv_TraceLevel;
The Drivers APIs are defined bellow :
drv_Subscribe
This API can be used to subscribe to a specific device driver.bool
drv_Subscribe
(
drv_ID_t
ID, drv_Settings_t *
pSettings
);
Parameter | Description |
ID | driver ID, defined in the drv_ID_t enum. |
pSettings | settings structure, defined as drv_Settings_t union
please refer to each driver header file for more
informations. |
drv_Unsubscribe
This API can be used to unsubscribe from the requested driver.bool
drv_Unsubscribe
(
drv_ID_t
ID
);
Parameter | Description |
ID | driver ID, defined in the drv_ID_t enum. |
drv_Write
This API can be used to write on the required device.bool
drv_Write
(
drv_ID_t
ID, drv_Write_t *
pWriteBuffer
);
Parameter | Description |
ID | driver ID, defined in the drv_ID_t enum. |
pWriteBuffer | write structure, defined as drv_Write_t union
please refer to each driver header file for more
informations. |
drv_Read
This API can be used to read from the required device.bool
drv_Read
(
drv_ID_t
ID, drv_Read_t *
pReadBuffer
);
Parameter | Description |
ID | driver ID, defined in the drv_ID_t enum. |
pReadBuffer | read structure, defined as drv_Read_t union
please refer to each driver header file for more
informations. |
Updated: Wed Apr 4 13:16:43 CEST 2007;