DrvInt_t Struct Reference

Device driver structure. More...


Data Fields

const char * DrvName
const char * DrvFile
const char * LinkMap
BusInit_t BusInit
CmdSend_t CmdSend
CharWrite_t CharWrite
CharRead_t CharRead
BlockWrite_t BlockWrite
BlockRead_t BlockRead
int BlockSize
int BlocksNum


Detailed Description

Device driver structure.

Each device driver is represented by a data structure containing driver name, file that implements the driver itself, some data on required hardware link and all the methods exported by the driver.

The interface is the same for all device drivers.

Basically each device can be addressed as block device or character device (or both in some strange case). Each driver exports some mothods to access to the device itself. Not all possible methot must be implemented: each driver implements only required method to access to the full device or a part of it if it is not possible to access the full device at once: some particular device can be devided in two or more subdevices to simplify acess methods.

For example a microcontroller with embedded flash and eeprom memory cen be seen as two different devices at least: a flash memory, accessed as block device; an eeprom memory, accessed as block device; a bounch of fuses, probably accessed ad character device. All these methods cannot be included in a single device driver, we have to implement 3 differents device derivers for this single microcontroller.


Field Documentation

const char* DrvInt_t::DrvName

Driver name, this name must be unique.

const char* DrvInt_t::DrvFile

Driver implementation file name.

const char* DrvInt_t::LinkMap

Hardware link ascii-art.

BusInit_t DrvInt_t::BusInit

Bus init method, this method is used to initialize the driver itself.

CmdSend_t DrvInt_t::CmdSend

Method used to send commands.

CharWrite_t DrvInt_t::CharWrite

Method used to write data to the device as character device.

CharRead_t DrvInt_t::CharRead

Method used to read data from the device as character device.

BlockWrite_t DrvInt_t::BlockWrite

Method used to write data to the device as block device.

BlockRead_t DrvInt_t::BlockRead

Method used to read data from the device as block device.

Single block size or lenght of a single row.

Total number of blocks or rows number.


The documentation for this struct was generated from the following file:

Generated on Tue Jan 9 21:37:16 2018 for libdrivers by  doxygen 1.5.6