[Libphidget-cvs-commits] CVS: libphidget/src/libphidget phidget.c,1.22,1.23 phidget.h,1.14,1.15
Status: Alpha
Brought to you by:
jstrohm
From: Jack S. <js...@us...> - 2002-12-14 23:38:16
|
Update of /cvsroot/libphidget/libphidget/src/libphidget In directory sc8-pr-cvs1:/tmp/cvs-serv16834/libphidget Modified Files: phidget.c phidget.h Log Message: Added digital output on the 488, should work on the 880 also. Index: phidget.c =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** phidget.c 14 Dec 2002 18:23:06 -0000 1.22 --- phidget.c 14 Dec 2002 23:38:13 -0000 1.23 *************** *** 1406,1409 **** --- 1406,1423 ---- } + /** + * Helper function to turn the Text LCD on and configure it + */ + enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value) + { + char buffer[4]; + + buffer[0] = index+(value << 3); + buffer[1] = 0; + buffer[2] = 0; + buffer[3] = 0; + phidgetWrite(phidgetDevice,buffer,4); + } + /** * Helper function to read from an interface kit. Index: phidget.h =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** phidget.h 14 Dec 2002 18:23:06 -0000 1.14 --- phidget.h 14 Dec 2002 23:38:13 -0000 1.15 *************** *** 214,219 **** enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice); enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice); ! enum ELPError phidgetInterfaceKit488(struct phidget *phidgetDevice, float analog[4], int digital[8]); ! enum ELPError phidgetInterfaceKit880(struct phidget *phidgetDevice, float analog[8], int digital[8]); enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str); enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice); --- 214,220 ---- enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice); enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice); ! enum ELPError phidgetInterfaceKit488Read(struct phidget *phidgetDevice, float analog[4], int digital[8]); ! enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value); ! enum ELPError phidgetInterfaceKit880Read(struct phidget *phidgetDevice, float analog[8], int digital[8]); enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str); enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice); |