Device-LabJack
view release on metacpan or search on metacpan
// specified address. The data is read back and verified
// after the write. Memory 0-511 is used for configuration
// and calibration data. Memory from 512-1023 is unused by the
// the LabJack and available for the user (this corresponds to
// starting addresses from 512-1020). Memory 1024-8191 is
// used as a data buffer in hardware timed AI modes.
//
// Returns: LabJack errorcodes or 0 for no error (I32).
// Inputs: *idnum -Local ID, Serial Number, or -1 for first
// found (I32).
// unlocked -If >0, addresses 0-511 are unlocked for
// writing (I32).
// address -Starting address for writing 0-8188 (I32).
// data3 -Byte for address (I32).
// data2 -Byte for address+1 (I32).
// data1 -Byte for address+2 (I32).
// data0 -Byte for address+3 (I32).
// Outputs: *idnum -Returns the Local ID or -1 if no LabJack is
// found (I32).
//
// Time: 20 ms
//----------------------------------------------------------------------
long _stdcall WriteMem(long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0);
=cut
#// ###########################################################################
long
WriteMem(idnum,unlocked,address,data3,data2,data1,data0)
long idnum
long unlocked
long address
long data3
long data2
long data1
long data0
CODE:
RETVAL = WriteMem(&idnum,unlocked,address,data3,data2,data1,data0);
OUTPUT:
RETVAL
idnum
#// ###########################################################################
=head1 NAME
LabJack - access to USB LabJack libraries
linux-labjack/driver/linux-2.4/labjack.c view on Meta::CPAN
MOD_DEC_USE_COUNT;
exit:
dbg(2," %s : leave, return value %d", __func__, retval);
return retval;
}
/*
* NOTE: assumes minor_table and device are locked
*/
static int labjack_release_internal (struct labjack_usb *dev)
{
int retval = 0;
dbg(2," %s : enter", __func__);
if (dev->udev == NULL) {
/* the device was unplugged before the file was released */
labjack_delete (dev);
linux-labjack/liblabjack/ljackul.c view on Meta::CPAN
// specified address. The data is read back and verified
// after the write. Memory 0-511 is used for configuration
// and calibration data. Memory from 512-1023 is unused by the
// the LabJack and available for the user (this corresponds to
// starting addresses from 512-1020). Memory 1024-8191 is
// used as a data buffer in hardware timed AI modes.
//
// Returns: LabJack errorcodes or 0 for no error (I32).
// Inputs: *idnum -Local ID, Serial Number, or -1 for first
// found (I32).
// unlocked -If >0, addresses 0-511 are unlocked for
// writing (I32).
// address -Starting address for writing 0-8188 (I32).
// data3 -Byte for address (I32).
// data2 -Byte for address+1 (I32).
// data1 -Byte for address+2 (I32).
// data0 -Byte for address+3 (I32).
// Outputs: *idnum -Returns the Local ID or -1 if no LabJack is
// found (I32).
//
// Time: 20 ms
//----------------------------------------------------------------------
long WriteMem(long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0)
{
long errorcode;
long localID;
unsigned char sendBuffer[9]={0,0,0,0,0,0,0,0,0};
unsigned char readBuffer[9]={0,0,0,0,0,0,0,0,0};
long calData[20]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
long serialnum=0;
//Make sure inputs are valid
if(unlocked)
{
if ((address<0) || (address>8188))
{
errorcode=ILLEGAL_INPUT_ERROR_LJ;
*idnum=-1;
return errorcode;
}
}
else
{
linux-labjack/liblabjack/ljackul.h view on Meta::CPAN
// specified address. The data is read back and verified
// after the write. Memory 0-511 is used for configuration
// and calibration data. Memory from 512-1023 is unused by the
// the LabJack and available for the user (this corresponds to
// starting addresses from 512-1020). Memory 1024-8191 is
// used as a data buffer in hardware timed AI modes.
//
// Returns: LabJack errorcodes or 0 for no error (I32).
// Inputs: *idnum -Local ID, Serial Number, or -1 for first
// found (I32).
// unlocked -If >0, addresses 0-511 are unlocked for
// writing (I32).
// address -Starting address for writing 0-8188 (I32).
// data3 -Byte for address (I32).
// data2 -Byte for address+1 (I32).
// data1 -Byte for address+2 (I32).
// data0 -Byte for address+3 (I32).
// Outputs: *idnum -Returns the Local ID or -1 if no LabJack is
// found (I32).
//
// Time: 20 ms
//----------------------------------------------------------------------
long _stdcall WriteMem(long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0);
#if defined(__cplusplus)
}
#endif
// specified address. The data is read back and verified
// after the write. Memory 0-511 is used for configuration
// and calibration data. Memory from 512-1023 is unused by the
// the LabJack and available for the user (this corresponds to
// starting addresses from 512-1020). Memory 1024-8191 is
// used as a data buffer in hardware timed AI modes.
//
// Returns: LabJack errorcodes or 0 for no error (I32).
// Inputs: *idnum -Local ID, Serial Number, or -1 for first
// found (I32).
// unlocked -If >0, addresses 0-511 are unlocked for
// writing (I32).
// address -Starting address for writing 0-8188 (I32).
// data3 -Byte for address (I32).
// data2 -Byte for address+1 (I32).
// data1 -Byte for address+2 (I32).
// data0 -Byte for address+3 (I32).
// Outputs: *idnum -Returns the Local ID or -1 if no LabJack is
// found (I32).
//
// Time: 20 ms
//----------------------------------------------------------------------
long _stdcall WriteMem(long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0);
#if defined(__cplusplus)
}
#endif
ljackuw_1.074.h view on Meta::CPAN
// specified address. The data is read back and verified
// after the write. Memory 0-511 is used for configuration
// and calibration data. Memory from 512-1023 is unused by the
// the LabJack and available for the user (this corresponds to
// starting addresses from 512-1020). Memory 1024-8191 is
// used as a data buffer in hardware timed AI modes.
//
// Returns: LabJack errorcodes or 0 for no error (I32).
// Inputs: *idnum -Local ID, Serial Number, or -1 for first
// found (I32).
// unlocked -If >0, addresses 0-511 are unlocked for
// writing (I32).
// address -Starting address for writing 0-8188 (I32).
// data3 -Byte for address (I32).
// data2 -Byte for address+1 (I32).
// data1 -Byte for address+2 (I32).
// data0 -Byte for address+3 (I32).
// Outputs: *idnum -Returns the Local ID or -1 if no LabJack is
// found (I32).
//
// Time: 20 ms
//----------------------------------------------------------------------
long WINAPI WriteMem(long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0);
#if defined(__cplusplus)
}
#endif
( run in 0.361 second using v1.01-cache-2.11-cpan-cba739cd03b )