/* --------------------------------------------------------------------------- * ElecStatusCache.h - v0.1 (c) 2008 Micro-key bv * --------------------------------------------------------------------------- * Micro-key bv * Industrieweg 28, 9804 TG Noordhorn * Postbus 92, 9800 AB Zuidhorn * The Netherlands * Tel: +31 594 503020 * Fax: +31 594 505825 * Email: support@microkey.nl * Web: www.microkey.nl * --------------------------------------------------------------------------- * Description: Stores all electronic status of other IO-controllers * --------------------------------------------------------------------------- * Version(s): 0.1, Jan 29, 2008, FSc * Creation. * --------------------------------------------------------------------------- */ #ifndef __ELECSTATUSCACHE_H__ #define __ELECSTATUSCACHE_H__ /** \file ElecStatusCache.h \brief */ /* --------------------------------------------------------------------------- * System include files. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Application include files. * --------------------------------------------------------------------------- */ //#include "BpMessageFormat.h" /* --------------------------------------------------------------------------- * Constant and macro definitions. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Type definitions. * --------------------------------------------------------------------------- */ typedef void (*t_bpec_write_callback)( int handle, BOOLEAN isDigital, UINT8 device, UINT8 channel, UINT16 value ); /* --------------------------------------------------------------------------- * Variable declarations. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Function declarations. * --------------------------------------------------------------------------- */ void bpecInit(); void bpecAttachWriteCallback(int busProtocolHandle, t_bpec_write_callback callback); void bpecDetachWriteCallback(); void bpecWriteDacValue( UINT8 device, UINT8 channel, UINT16 dacValue ); void bpecWriteDioValue( UINT8 device, UINT8 channel, BOOLEAN doValue ); void bpecSetAdcReadCache( UINT8 device, UINT16 adcValues[], UINT8 nrOfAdcValues); void bpecSetDioReadCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues); void bpecSetDioReadBackCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues); void bpecSetDacReadBackCache( UINT8 device, UINT16 dacValues[], UINT8 nrOfDacValues); UINT16 bpecAdcRead( UINT8 device, UINT8 channel ); BOOLEAN bpecDioRead( UINT8 device, UINT8 channel ); BOOLEAN bpecDioReadBack( UINT8 device, UINT8 channel ); UINT16 bpecDacReadBack( UINT8 device, UINT8 channel ); #endif /* __ELECSTATUSCACHE_H__ */