コード例 #1
0
ファイル: dtfun.cpp プロジェクト: el-fran/weka-bci2000
int DTFUN::CleanUp( void )
{
    int     i, bcount, status;

    status= olDaFlushBuffers( lphDass );

    bcount= BUFNUM;

    for (i=0; i<bcount; i++)
    {
        status+= olDaGetBuffer( lphDass, &hbuf[i] );
        status+= olDmFreeBuffer( hbuf[i] );
    }

    if (outputclockonusercounter)
        status+= olDaReleaseDASS( lphDassCT );

    status+= olDaReleaseDASS( lphDass );
    return( status );
}
コード例 #2
0
COctopusAOTF::~COctopusAOTF()
{	

	B.AOTF_loaded = false;

	HBUF hBuf = NULL;
	olDaAbort( hdass_9834 );
	olDaFlushBuffers( hdass_9834 ); 
	
	do {
		olDaGetBuffer( hdass_9834, &hBuf );           // get the buffer from the done queue
		if( hBuf != NULL ) olDmFreeBuffer( hBuf );    // and free it
	} while( hBuf != NULL );                          // until the done queue is empty	

	olDaReleaseDASS( hdass_9834 );					  // release the subsystem and the board
	olDaTerminate( hdrvr_9834 );
}
コード例 #3
0
float AdInput(UINT channel)
{
	float volts;
	long adcvalue;
	long value;

	CHECKERROR(olDaGetSingleValue(board.hdass, &adcvalue, channel, gain));

	if (encoding != OL_ENC_BINARY) {
		value ^= 1L << (resolution - 1);
		value &= (1L << resolution) - 1;
	}

	volts = ((float)max - (float)min) / (1L << resolution) * adcvalue;// + (float)min;
	olDaReleaseDASS(board.hdass);

	return volts;
}
コード例 #4
0
int DaOutput(DBL dacvalue, UINT channel)
{
	float volts;
	long value;

	volts = (float)dacvalue;

	value = (long)((1L << resolution) / ((float)max - (float)min) * (volts - (float)min));
	value = min((1L << resolution) - 1, value);

	if (encoding != OL_ENC_BINARY) {
		long sign = 1L << (resolution - 1);
		value ^= sign;
		if (value & sign) value |= 0xffffffffL << resolution;
	}

	olDaPutSingleValue(board.hdass, value, channel, gain);
	olDaReleaseDASS(board.hdass);

	return 0;

}
コード例 #5
0
OctopusLaser::~OctopusLaser() 
{
	olDaReleaseDASS( hdass_9812_DAC );
	olDaTerminate( hdrvr_9812 );
	TRACE("Ending OctopusLaser\n");
}