csi_dev.h File Reference

Common Serial Interface API. More...

#include "csi_plfabstr.h"
#include "csi_bus.h"
#include "csi_types.h"
+ Include dependency graph for csi_dev.h:
+ This graph shows which files directly or indirectly include this file:

Functions

CSI_API long CsiClose (struct CsiBus *pBus)
 Closes the serial connection and frees allocated resources. More...
 
CSI_API long CsiConnectToDevice (struct CsiBus *pBus, const char *SerialDeviceName, uint32_t BaudRate, uint32_t TimeoutMs, struct CsiDev *pDev, uint8_t NodeId)
 The function initializes the bus object (pBus), the serial channel object (pChan) with the baud rate and timeout values and opens the serial connection to the device. More...
 
CSI_API long CsiDevInit (struct CsiBus *pBus, uint8_t NodeId, struct CsiDev *pDev, enum CsiSerialProtocolVersion SerProtocolVersion)
 Initialize CSI device object with all parameters. More...
 
CSI_API long CsiDevReadLargeObject (struct CsiDev *pDev, uint16_t ObjDicIdx, uint8_t ObjDicSub, void *pDataBuffer, uint16_t BufferSize)
 This function reads object dictionary entries with a data size > 4 bytes. More...
 
CSI_API long CsiDevReadObject (struct CsiDev *pDev, uint16_t ObjDicIdx, uint8_t ObjDicSub, uint32_t *pRxDWord)
 This function reads up to 4 bytes of data from device object dictionary. More...
 
CSI_API long CsiDevWriteLargeObject (struct CsiDev *pDev, uint16_t ObjDicIdx, uint8_t ObjDicSub, void *pDataBuffer, uint32_t DataSize, CsiDataTransferCallback Callback)
 This function writes object dictionary entries with a data size > 4 bytes. More...
 
CSI_API long CsiDevWriteObject (struct CsiDev *pDev, uint16_t ObjDicIdx, uint8_t ObjDicSub, uint32_t TxDWord)
 This function writes up to 4 bytes of data into device object dictionary. More...
 
CSI_API long CsiOpen (struct CsiBus *pBus, const char *DeviceName, uint32_t BaudRate, uint32_t TimeoutMs)
 Initialize CSI API and connection to CSI bus. More...
 
CSI_API long CsiSetCommTimout (struct CsiBus *pBus, uint32_t TimeoutMs)
 Set timeout in milliseconds for bus communication (read/write). More...
 

Detailed Description

Common Serial Interface API.

Author
Uwe Kindler (UK)
Date
2009/08/25 The Aplication Programming Interface (API) defines a set of functions for common access to devices via a serial interface. The API never accesses the hardware directly. That means the API functions do not have to be modified when implementing the API on an existing hardware. The CSI API provides a common CANopen like interface for generic access to device parameters. So this common serial interface may be used for a wide variety of devices to access parameters in a common way. The driver is initialized with the function CsiInit(). After proper initialization a device can be initialized by the function CsiDevInit() This function will call several driver functions for correct setup of device object.