Download CIF Device Driver - IntervalZero RTX
Transcript
Programming 5.1.1 17/30 DevInitBoard() Description After an application has opened the driver with DevOpenDriver() it must call DevInitBoard(). The application has to supply either a driver type or a device name and a device number between 0..3, because the driver is able to handle more than one device at a time. If a device is installed and running the function returns a driver and device handle. These handles are necessary for all other driver function. DevInitBoard() is also able to check the actual firmware and configuration against given files and if they are different a download will be carried out. To run the firmware check, only a directory path is necessary. The driver will choose the firmware file by itself, according to the hardware. For the configuration check a filename including the path (full file name) must be provided by the application Note: In case of DMA cards (CIF100), the application must always provide a firmware path and configuration file. short DevInitBoard ( unsigned short char unsigned short char char DRIVERHANDLE CIFHANDLE usDriverType, *pszDevName, usDevNumber, *pszFWFilePath, *pszCFFullFileName, *pDriver, *pDevInstance); Parameter Type Parameter Description unsigned char usDriverType Select a device by a driver type CIF_ISA = 1 (ISA hardware) CIF_PCI = 2 (PCI hardware) CIF_DMA = 3 (DMA hardware) If usDriverType = 0, pszDevName is used to select the device char *pszDevName Device name as a zero terminated string See section 'Supported CIF Cards, Fieldbus Systems and Protocols' for valid names (e.g. "CIF50-PB"). Device name is ignored if usDriverType is not 0 unsigned short usDevNumber Device number 0..3 char *pszFWFilePath File path to the directory where the firmware files are located as a zero terminated string. char *pszCFFullFileName File path and filename for the configuration database file as a zero terminated string DRIVERHANDLE *pDriver Buffer pointer to store the driver handle for this device CIFHANDLE Buffer pointer to store the device handle for this device *pCIF CIF Device Driver | IntervalZero RTX® DOC010801DRV06EN | Revision 6 | English | 2014-05 | Released | Public © Hilscher, 2001-2014