Device-LabJack
view release on metacpan or search on metacpan
254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595// 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
312313314315316317318319320321322323324325326327328329330331332
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
4406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454// 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
1622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655// 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
1610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643// 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
925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958// 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.376 second using v1.01-cache-2.11-cpan-cba739cd03b )