void CVDPAU::FiniVDPAUProcs() { if (vdp_device == VDP_INVALID_HANDLE) return; VdpStatus vdp_st; vdp_st = vdp_device_destroy(vdp_device); CheckStatus(vdp_st, __LINE__); vdp_device = VDP_INVALID_HANDLE; vdpauConfigured = false; }
buf *GetBufFromFreeList(buf *F_LIST){ buf *buffer = F_LIST -> free_fp; if(!CheckStatus(buffer, STAT_DWR)){ RemFromFreeList(buffer); return buffer; } else{ GetBufFromFreeList(buffer); } }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: freeCounter * Signature: (J)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_freeCounter (JNIEnv * env, jclass, jlong id) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI freeCounter"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; int32_t status = 0; freeCounter((void*)id, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_SPIJNI * Method: spiInitialize * Signature: (B)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiInitialize (JNIEnv * env, jclass, jbyte port) { SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiInitialize"; SPIJNI_LOG(logDEBUG) << "Port = " << (jint) port; int32_t status = 0; spiInitialize(port, &status); SPIJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: setCounterExternalDirectionMode * Signature: (J)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_setCounterExternalDirectionMode (JNIEnv * env, jclass, jlong id) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI setCounterExternalDirectionMode"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; int32_t status = 0; setCounterExternalDirectionMode((void*)id, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_SPIJNI * Method: spiSetChipSelectActiveLow * Signature: (B)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiSetChipSelectActiveLow (JNIEnv * env, jclass, jbyte port) { SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiSetCSActiveLow"; SPIJNI_LOG(logDEBUG) << "Port = " << (jint) port; int32_t status = 0; spiSetChipSelectActiveLow(port, &status); SPIJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_DIOJNI * Method: freeDIO * Signature: (J)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_DIOJNI_freeDIO (JNIEnv * env, jclass, jlong id) { DIOJNI_LOG(logDEBUG) << "Calling DIOJNI freeDIO"; DIOJNI_LOG(logDEBUG) << "Port Ptr = " << (void*)id; int32_t status = 0; freeDIO((void*)id, &status); DIOJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_SPIJNI * Method: spiResetAccumulator * Signature: (B)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiResetAccumulator( JNIEnv *env, jclass, jbyte port) { SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiResetAccumulator"; SPIJNI_LOG(logDEBUG) << "Port = " << (jint)port; int32_t status = 0; HAL_ResetSPIAccumulator(port, &status); SPIJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
// --------------------------------------------------------- // CPosPSYRequester::ReportStatus // From MPosParameterObserver // (other items were commented in a header). // --------------------------------------------------------- // void CPosPSYRequester::ReportStatus( const TPositionModuleId& /*aImplementationUid*/, const TPositionModuleStatus& aStatus) { if (iCheckStatus) { iModuleStatus = aStatus; CheckStatus(); } }
static portTASK_FUNCTION(HostTask, pvParameters) { (void)pvParameters; /* not used */ //FsMSD1_HostInit(); for(;;) { FsMSD1_AppTask(); CheckStatus(); FRTOS1_taskYIELD(); //FRTOS1_vTaskDelay(10/portTICK_RATE_MS); } }
static GLuint Load( const char * vert, const char * geom, const char * frag ) { GLuint prog = glCreateProgram(); if( vert ) AttachShader( prog, GL_VERTEX_SHADER, vert ); if( geom ) AttachShader( prog, GL_GEOMETRY_SHADER, geom ); if( frag ) AttachShader( prog, GL_FRAGMENT_SHADER, frag ); glLinkProgram( prog ); CheckStatus( prog ); return prog; }
BOOL SeekToTrackAndHold( IN INT cdrom, IN INT tindex ) /*++ Routine Description: Seek to specified track and enter hold state. Arguments: cdrom - index into gDevices array, specifies which CDROM device to access track - track on audio cd to seek to. Return Value: TRUE if successful, FALSE if not --*/ { DWORD status; CDROM_SEEK_AUDIO_MSF sam; sam.M = TRACK_M(cdrom,tindex); sam.S = TRACK_S(cdrom,tindex); sam.F = TRACK_F(cdrom,tindex); status = SeekCdrom( gDevices[ cdrom ]->hCd, &sam ); CheckStatus( "SeekToTrackAndHold", status, cdrom ); if (status == ERROR_SUCCESS) { ValidatePosition( cdrom ); } return( status==ERROR_SUCCESS ); }
/* * Class: edu_wpi_first_wpilibj_hal_SPIJNI * Method: spiSetAccumulatorDeadband * Signature: (BI)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiSetAccumulatorDeadband (JNIEnv *env, jclass, jbyte port, jint deadband) { SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiSetAccumulatorDeadband"; SPIJNI_LOG(logDEBUG) << "Port = " << (jint) port; SPIJNI_LOG(logDEBUG) << "Deadband = " << deadband; int32_t status = 0; spiSetAccumulatorDeadband(port, deadband, &status); SPIJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_SPIJNI * Method: spiSetAccumulatorCenter * Signature: (BI)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiSetAccumulatorCenter (JNIEnv *env, jclass, jbyte port, jint center) { SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiSetAccumulatorCenter"; SPIJNI_LOG(logDEBUG) << "Port = " << (jint) port; SPIJNI_LOG(logDEBUG) << "Center = " << center; int32_t status = 0; spiSetAccumulatorCenter(port, center, &status); SPIJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: setCounterMaxPeriod * Signature: (JD)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_setCounterMaxPeriod (JNIEnv * env, jclass, jlong id, jdouble value) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI setCounterMaxPeriod"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; COUNTERJNI_LOG(logDEBUG) << "MaxPeriod = " << value; int32_t status = 0; setCounterMaxPeriod((void*)id, value, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
std::vector<long> FitsFile::GetColumnDimensions(int columnIndex) { CheckOpen(); int naxis = 0, status = 0; constexpr int maxdim = 10; std::vector<long> axes(maxdim, 0); fits_read_tdim(_fptr, columnIndex, maxdim, &naxis, axes.data(), &status); CheckStatus(status); axes.resize(naxis); return axes; }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: setCounterReverseDirection * Signature: (JZ)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_setCounterReverseDirection (JNIEnv * env, jclass, jlong id, jboolean value) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI setCounterReverseDirection"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; COUNTERJNI_LOG(logDEBUG) << "ReverseDirection = " << (jint)value; int32_t status = 0; setCounterReverseDirection((void*)id, value, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
void StartupDevices(void) { gpio_ioctl_cb_t gpio_iocb; common_ioctl_cb_t uart_iocb; BYTE Status = 0; // Open GPIO driver and configure it hDevice[LEDs] = vos_dev_open(LEDs); // Set LED3 pin to output gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; gpio_iocb.value = LED3; Status |= vos_dev_ioctl(hDevice[LEDs], &gpio_iocb); // Open UART driver and configure it hDevice[UART] = vos_dev_open(UART); uart_iocb.ioctl_code = VOS_IOCTL_UART_SET_BAUD_RATE; uart_iocb.set.uart_baud_rate = UART_BAUD_3000000; Status = vos_dev_ioctl(hDevice[UART], &uart_iocb); uart_iocb.ioctl_code = VOS_IOCTL_UART_SET_FLOW_CONTROL; uart_iocb.set.param = UART_FLOW_NONE; // Status |= vos_dev_ioctl(hDevice[UART], &uart_iocb); uart_iocb.ioctl_code = VOS_IOCTL_UART_SET_DATA_BITS; uart_iocb.set.param = UART_DATA_BITS_8; Status |= vos_dev_ioctl(hDevice[UART], &uart_iocb); uart_iocb.ioctl_code = VOS_IOCTL_UART_SET_STOP_BITS; uart_iocb.set.param = UART_STOP_BITS_1; Status |= vos_dev_ioctl(hDevice[UART], &uart_iocb); uart_iocb.ioctl_code = VOS_IOCTL_UART_SET_PARITY; uart_iocb.set.param = UART_PARITY_NONE; // Status |= vos_dev_ioctl(hDevice[UART], &uart_iocb); // Since baud rate >= 115200 enable DMA for this channel uart_iocb.ioctl_code = VOS_IOCTL_COMMON_ENABLE_DMA; Status |= vos_dev_ioctl(hDevice[UART], &uart_iocb); // Finally enable UART interrupts are we're ready to go! vos_enable_interrupts(VOS_UART_INT_IEN); // Open two more GPIO drivers for the Logic Analyser and configure them hDevice[LA_In] = vos_dev_open(LA_In); // Set all port bits to input gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; gpio_iocb.value = 0; Status |= vos_dev_ioctl(hDevice[LA_In], &gpio_iocb); hDevice[LA_Out] = vos_dev_open(LA_Out); // Set all port bits to output gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; gpio_iocb.value = 0xFF; Status |= vos_dev_ioctl(hDevice[LA_Out], &gpio_iocb); // Spin up USB Host hDevice[Host] = vos_dev_open(Host); // Let other tasks know that devices are initialized vos_signal_semaphore(&DevicesStarted); CheckStatus(Status, ErrorStartupDevices); }
/* * Class: edu_wpi_first_wpilibj_hal_SolenoidJNI * Method: setSolenoid * Signature: (JZ)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_setSolenoid (JNIEnv *env, jclass, jlong solenoid_port, jboolean value) { SOLENOIDJNI_LOG(logDEBUG) << "Calling SolenoidJNI SetSolenoid"; SOLENOIDJNI_LOG(logDEBUG) << "Solenoid Port Pointer = " << (void*)solenoid_port; int32_t status = 0; setSolenoid((void*)solenoid_port, value, &status); CheckStatus(env, status); }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: setCounterAverageSize * Signature: (JI)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_setCounterAverageSize (JNIEnv * env, jclass, jlong id, jint value) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI setCounterAverageSize"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; COUNTERJNI_LOG(logDEBUG) << "AverageSize = " << value; int32_t status = 0; setCounterAverageSize((void*)id, value, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
void CLabelManagerLanguageMonitor::StartPage() { fprintf(stderr, "DEBUG: CLabelManagerLanguageMonitor::StartPage()\n"); if (IsFirstPage_) { CheckStatus(); } IsFirstPage_ = false; }
/* * Class: edu_wpi_first_wpilibj_hal_CounterJNI * Method: setCounterUpdateWhenEmpty * Signature: (JZ)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CounterJNI_setCounterUpdateWhenEmpty (JNIEnv * env, jclass, jlong id, jboolean value) { COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI setCounterMaxPeriod"; COUNTERJNI_LOG(logDEBUG) << "Counter Ptr = " << (void*)id; COUNTERJNI_LOG(logDEBUG) << "UpdateWhenEmpty = " << (jint)value; int32_t status = 0; setCounterUpdateWhenEmpty((void*)id, value, &status); COUNTERJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
void Sandbox::Load(const tPath & path, const char * filename) { tString realPath = path.GetReadPath(filename); if (realPath == "") return; VALUE args[] = { reinterpret_cast<VALUE>(this), rb_str_new2(realPath.c_str()) }; int status = 0; rb_protect(LoadProtect, reinterpret_cast<VALUE>(args), &status); CheckStatus(status); }
/* * Class: edu_wpi_first_wpilibj_hal_DIOJNI * Method: pulse * Signature: (JD)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_DIOJNI_pulse (JNIEnv *env, jclass, jlong id, jdouble value) { DIOJNI_LOG(logDEBUG) << "Calling DIOJNI pulse (RR upd)"; //DIOJNI_LOG(logDEBUG) << "Port Ptr = " << (void*)id; //DIOJNI_LOG(logDEBUG) << "Value = " << value; int32_t status = 0; pulse((void*)id, value, &status); DIOJNI_LOG(logDEBUG) << "Did it work? Status = " << status; CheckStatus(env, status); }
qboolean TTY_CheckForConnection(int handle) { ComPort *p; p = handleToPort[handle]; CheckStatus (p); if (p->useModem) { if (!p->modemRang) { if (!Modem_Response(p)) return false; if (Q_strncmp(p->buffer, "RING", 4) == 0) { Modem_Command (p, "ATA"); p->modemRang = true; p->timestamp = net_time; } return false; } if (!p->modemConnected) { if ((net_time - p->timestamp) > 35.0) { Con_Printf("Unable to establish modem connection\n"); p->modemRang = false; return false; } if (!Modem_Response(p)) return false; if (Q_strncmp (p->buffer, "CONNECT", 7) != 0) return false; disable(); p->modemConnected = true; p->outputQueue.head = p->outputQueue.tail = 0; p->inputQueue.head = p->inputQueue.tail = 0; enable(); Con_Printf("Modem Connect\n"); return true; } return true; } // direct connect case if (EMPTY (p->inputQueue)) return false; return true; }
/* * Class: edu_wpi_first_wpilibj_hal_DIOJNI * Method: isAnyPulsing * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_DIOJNI_isAnyPulsing (JNIEnv *env, jclass) { DIOJNI_LOG(logDEBUG) << "Calling DIOJNI isAnyPulsing (RR upd)"; int32_t status = 0; jboolean returnValue = isAnyPulsing( &status ); //DIOJNI_LOG(logDEBUG) << "Status = " << status; DIOJNI_LOG(logDEBUG) << "isAnyPulsingResult = " << (jint)returnValue; CheckStatus(env, status); return returnValue; }
/* * Class: edu_wpi_first_wpilibj_hal_DIOJNI * Method: setDIO * Signature: (JS)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_DIOJNI_setDIO (JNIEnv *env, jclass, jlong id, jshort value) { //DIOJNI_LOG(logDEBUG) << "Calling DIOJNI setDIO"; //DIOJNI_LOG(logDEBUG) << "Port Ptr = " << (void*)id; //DIOJNI_LOG(logDEBUG) << "Value = " << value; int32_t status = 0; setDIO((void*)id, value, &status); //DIOJNI_LOG(logDEBUG) << "Status = " << status; CheckStatus(env, status); }
void FitsFile::Create() { if(_isOpen) { throw FitsIOException("File was opened twice"); } else { int status = 0; fits_create_file(&_fptr, (std::string("!") + _filename).c_str(), &status); CheckStatus(status); _isOpen = true; } }
void FitsFile::Close() { if(_isOpen) { int status = 0; fits_close_file(_fptr, &status); CheckStatus(status); _isOpen = false; _fptr = 0; } else { throw FitsIOException("Non-opened file was closed"); } }
long FitsFile::GetColumnDimensionSize(int columnIndex, int dimension) { CheckOpen(); int naxis = 0, status = 0, maxdim = 10; long naxes[10]; for(size_t i=0;i!=10;++i) naxes[i] = 0; fits_read_tdim(_fptr, columnIndex, maxdim, &naxis, naxes, &status); CheckStatus(status); if(dimension >= naxis) throw FitsIOException("Requested dimension index not available in fits file"); return naxes[dimension]; }