这篇教程C++ DEBUG_OUTPUT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DEBUG_OUTPUT函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_OUTPUT函数的具体用法?C++ DEBUG_OUTPUT怎么用?C++ DEBUG_OUTPUT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DEBUG_OUTPUT函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DEBUG_OUTPUTvoid LocalPC::makeMaster(){ bool online = false; DEBUG_OUTPUT("[LocalPC]try make MASTER/n"); DEBUG_OUTPUT("[LocalPC]I'm %s/n", LOCAL_MASTER==getState()?"MASTER":"SLAVE"); enter(); online = floatIPOnline(); leave(); if(online) { DEBUG_OUTPUT("[LocalPC]ip(%s) online/n", mFloatIP); return; } bool master = !isSlave(); if(master) { makeSlave(); return; } enter(); DEBUG_OUTPUT("[LocalPC]add ip(%s) to ethernet(%s) ... /n", mFloatIP, mEthernet); Ipconfig ipconfig; ipconfig.addIP(mEthernet, mFloatIP, mFloatNetmask, mFloatGateway); online = floatIPOnline(); leave(); if(online) { DEBUG_OUTPUT("[LocalPC]add ip ok/n"); setState(LOCAL_MASTER); }}
开发者ID:zhlgh603,项目名称:contron-psm70,代码行数:33,
示例2: DEBUG_ENTERMyMoneyMoney ReportAccount::deepCurrencyPrice(const QDate& date, bool exactDate) const{ DEBUG_ENTER(Q_FUNC_INFO); MyMoneyMoney result(1, 1); MyMoneyFile* file = MyMoneyFile::instance(); MyMoneySecurity undersecurity = file->security(currencyId()); if (! undersecurity.isCurrency()) { const MyMoneyPrice &price = file->price(undersecurity.id(), undersecurity.tradingCurrency(), date, exactDate); if (price.isValid()) { result = price.rate(undersecurity.tradingCurrency()); DEBUG_OUTPUT(QString("Converting under %1 to deep %2, price on %3 is %4") .arg(undersecurity.name()) .arg(file->security(undersecurity.tradingCurrency()).name()) .arg(date.toString()) .arg(result.toDouble())); } else { DEBUG_OUTPUT(QString("No price to convert under %1 to deep %2 on %3") .arg(undersecurity.name()) .arg(file->security(undersecurity.tradingCurrency()).name()) .arg(date.toString())); result = MyMoneyMoney(); } } return result;}
开发者ID:KDE,项目名称:kmymoney,代码行数:29,
示例3: nrf24l01p_transmituint8_t nrf24l01p_transmit( uint8_t *data, uint8_t len ){ uint8_t status; uint8_t ret; /* Check fifo full */ status = nrf24l01p_singleReadReg( FIFO_STATUS ); if( fifo_tx_full( status ) ){ DEBUG_OUTPUT( "transmit error: fifo full/n" ); return 0; } nrf24l01p_doCommand( W_TX_PAYLOAD, data, 0, len ); if( nrf24l01p_conf.config & (1<<MASK_TX_DS) ){ // Interrupt disabled while( 1 ){ status = nrf24l01p_singleReadReg( STATUS ); if( status & (1<<TX_DS) ){ ret = 1; break; } else if( status & (1<<MAX_RT) ){ DEBUG_OUTPUT( "transmit error: timeout/r/n" ); ret = 0; break; } } } //nrf24l01p_singleWriteReg( STATUS, 0xff ); return ret;}
开发者ID:sannyas,项目名称:mculib,代码行数:31,
示例4: BlockFile/// Constructs a SimpleBlockFile based on sample data and writes/// it to disk.////// @param baseFileName The filename to use, but without an extension./// This constructor will add the appropriate/// extension (.au in this case)./// @param sampleData The sample data to be written to this block./// @param sampleLen The number of samples to be written to this block./// @param format The format of the given samples./// @param allowDeferredWrite Allow deferred write-cachingSimpleBlockFile::SimpleBlockFile(wxFileName baseFileName, samplePtr sampleData, sampleCount sampleLen, sampleFormat format, bool allowDeferredWrite /* = false */): BlockFile(wxFileName(baseFileName.GetFullPath() + wxT(".au")), sampleLen){ mCache.active = false; DEBUG_OUTPUT("SimpleBlockFile created based on sample data"); bool useCache = GetCache(); if (!(allowDeferredWrite && useCache)) WriteSimpleBlockFile(sampleData, sampleLen, format, NULL); if (useCache) { DEBUG_OUTPUT("Caching block file data"); mCache.active = true; mCache.needWrite = true; mCache.format = format; mCache.sampleData = new char[sampleLen * SAMPLE_SIZE(format)]; memcpy(mCache.sampleData, sampleData, sampleLen * SAMPLE_SIZE(format)); void* summaryData = BlockFile::CalcSummary(sampleData, sampleLen, format); mCache.summaryData = new char[mSummaryInfo.totalSummaryBytes]; memcpy(mCache.summaryData, summaryData, (size_t)mSummaryInfo.totalSummaryBytes); }}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:40,
示例5: pthread_mutex_lockstatic void *thread_task_entry(void *arg){ // attention! here no lock easy_tp_man *manager = ((thread_task_arg *)(arg))->man; thread_info *ti = ((thread_task_arg *)(arg))->ti; int id = ((thread_task_arg *)(arg))->id; // for (;;) { task_node *task; int ret = 0; struct timespec ts; pthread_mutex_lock(ti->active_mutex); clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec += THREAD_TIMED_OUT; while (ti->task == NULL && ret == 0) ret = pthread_cond_timedwait(ti->active_cond, ti->active_mutex, &ts); task = ti->task; ti->task = NULL; if (ret == ETIMEDOUT && ti->task == NULL) { DEBUG_OUTPUT("thread %d time out/n", id); ti->timedout = 1; } pthread_mutex_unlock(ti->active_mutex); if (!task) { DEBUG_OUTPUT("thread %d happend a NULL task/n", id); break; } if (task->func != exit_task_entry) { // ASSERT(ti->task); task->desc->ret = task->func(task->desc->arg); if (task->desc->fire_task_over) task->desc->fire_task_over(task->desc); free(task); // become idle pthread_mutex_lock(manager->idle_threads.mutex); manager->idle_threads.idxs[manager->idle_threads.size++] = id; pthread_mutex_unlock(manager->idle_threads.mutex); pthread_cond_signal(manager->idle_threads.cond); } else { free(task); break; } } exit_task_entry(&id); free(arg); return 0;}
开发者ID:persistentsnail,项目名称:easy-downloader,代码行数:58,
示例6: gps_satellite_telemetryvoid gps_satellite_telemetry() { DEBUG_OUTPUT("Time: %02d:%02d:%02d/r/n", NMEA::getHour(), NMEA::getMinute(), NMEA::getSecond()); DEBUG_OUTPUT("Satellites: %d/r/n", NMEA::getSatellites()); DEBUG_OUTPUT("Latitude: %0.5f/r/n", NMEA::getLatitude()); DEBUG_OUTPUT("Longitude: %0.5f/r/n", NMEA::getLongitude()); DEBUG_OUTPUT("Altitude: %0.2fm/r/n", NMEA::getAltitude()); DEBUG_OUTPUT("Speed: %0.2fkm/h/r/n", NMEA::getSpeed()); DEBUG_OUTPUT("GPS Bearing (Track made good): %0.2f degrees/r/n", NMEA::getBearing()); DEBUG_OUTPUT("Compass Bearing: %03.0f/r/n", bearing); DEBUG_OUTPUT("Heading Delta to Waypoint: %03.0f/r/n", heading_delta(180.0, bearing)); DEBUG_OUTPUT("Distance to Next Nav %06.2fm/r/n", distance_to_current_nav(degToRad((double)NMEA::getLatitude()), degToRad((double)NMEA::getLongitude())) );#ifdef SEND_TELEMETRY shedBoat_Telemetry telemetryMessage = shedBoat_Telemetry_init_zero; if(autopilotEngaged) { telemetryMessage.status = shedBoat_Telemetry_Status_UNDERWAY_AUTOPILOT; } else { telemetryMessage.status = shedBoat_Telemetry_Status_UNDERWAY_MANUAL; } telemetryMessage.has_location = true; telemetryMessage.location.has_latitude = true; telemetryMessage.location.latitude = NMEA::getLatitude(); telemetryMessage.location.has_longitude = true; telemetryMessage.location.longitude = NMEA::getLongitude(); telemetryMessage.location.has_number_of_satellites_visible = true; telemetryMessage.location.number_of_satellites_visible = NMEA::getSatellites(); telemetryMessage.location.has_true_heading = true; telemetryMessage.location.true_heading = heading * 1000; telemetryMessage.location.has_true_bearing = true; telemetryMessage.location.true_bearing = bearing * 1000; telemetryMessage.location.has_speed_over_ground = true; telemetryMessage.location.speed_over_ground = NMEA::getSpeed() * 1000; telemetryMessage.location.has_utc_seconds = true; telemetryMessage.location.utc_seconds = NMEA::getSecond(); telemetryMessage.location.fix_quality = (_shedBoat_Location_Quality)NMEA::getFixQuality(); telemetryMessage.location.has_distance_to_waypoint = true; telemetryMessage.location.distance_to_waypoint = (int32_t)distance_to_current_nav(degToRad((double)NMEA::getLatitude()), degToRad((double)NMEA::getLongitude())); telemetryMessage.location.has_waypoint_number = true; telemetryMessage.location.waypoint_number = get_nav_num(); uint8_t buffer[100]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); bool success = pb_encode(&stream, shedBoat_Telemetry_fields, &telemetryMessage); if(success) { send_xbee_packet(buffer, stream.bytes_written); } else { error("Failed to encode Proto Buffer"); }#endif}
开发者ID:graymalkin,项目名称:shed_boat,代码行数:54,
示例7: Java_xxl_core_io_raw_NativeRawAccess_readJNIEXPORT void JNICALLJava_xxl_core_io_raw_NativeRawAccess_read (JNIEnv *env, jobject obj, jbyteArray jblock, jlong sector) { FILE *jfilep = (FILE*) getfilep(env, obj); // Get the device int jlong fpos; // The position to read on the device jint sectorSize = getsectorSize(env, obj); jlong len = (*env)->GetArrayLength(env, jblock); jbyte *block = (*env)->GetByteArrayElements(env, jblock, 0); #ifdef SEQ_OPT jlong lastSector = getlastSector(env, obj);#endif DEBUG_OUTPUT("read: sector==%d", (long) sector); if (jfilep==0) { reportError(env,obj,"file not open"); return; } // Is it exactly one block if (len!=sectorSize) { reportError(env,obj,"byte array does not have sector size"); return; }#ifdef SEQ_OPT if (sector != lastSector+1) { // non sequential access!#endif fpos = (jlong) sector * sectorSize; if (fseek(jfilep,fpos,SEEK_SET)==-1) { reportError(env,obj,"filepointer could not be set"); return; }#ifdef SEQ_OPT }#endif DEBUG_OUTPUT("read the block",0); // Read the block if (fread(block, 1, sectorSize, jfilep)!=sectorSize) { reportError(env,obj,"read failed"); return; } // Convert the c block array to a java byte array (*env)->SetByteArrayRegion(env, jblock, 0, sectorSize, block);#ifdef SEQ_OPT setlastSector(env, obj, sector);#endif (*env)->ReleaseByteArrayElements(env, jblock, block, 0);}
开发者ID:InsightsDev,项目名称:xxl,代码行数:51,
示例8: entervoid LocalPC::makeSlave(){ bool found = false; enter(); DEBUG_OUTPUT("[LocalPC]delete ip(%s) from ethernet(%s) ... /n", mFloatIP, mEthernet); Ipconfig ipconfig; ipconfig.delIP(mEthernet, mFloatIP); found = (!ipconfig.hasIP(mFloatIP)); leave(); if(found) { DEBUG_OUTPUT("[LocalPC]delete ip ok/n"); setState(LOCAL_SLAVE); }}
开发者ID:zhlgh603,项目名称:contron-psm70,代码行数:15,
示例9: HubDriverDeviceReset//*****************************************************************************//// Start the process of enumerating a new device by issuing a reset to the// appropriate downstream port.////*****************************************************************************static voidHubDriverDeviceReset(uint8_t ui8Port){ DEBUG_OUTPUT("Starting enumeration for port %d/n", ui8Port); // // Record the fact that we are in the process of enumerating a device. // g_sRootHub.bEnumerationBusy = true; // // Save the port that is being enumerated. // g_sRootHub.ui8EnumIdx = ui8Port; // // Mark the port as being reset. // g_sRootHub.psPorts[ui8Port].iState = ePortResetActive; // // Initiate a reset on the relevant port to start the enumeration process. // HubSetPortFeature(&g_sRootHub, ui8Port, HUB_FEATURE_PORT_RESET);}
开发者ID:mileat,项目名称:proj-emb,代码行数:31,
示例10: MyMoneyAccountReportAccount::ReportAccount(const QString& accountid): MyMoneyAccount(MyMoneyFile::instance()->account(accountid)){ DEBUG_ENTER(Q_FUNC_INFO); DEBUG_OUTPUT(QString("Account %1").arg(accountid)); calculateAccountHierarchy();}
开发者ID:KDE,项目名称:kmymoney,代码行数:7,
示例11: send_debug_telemetryvoid send_debug_telemetry(){#ifdef SEND_TELEMETRY shedBoat_Telemetry telemetryMessage = shedBoat_Telemetry_init_zero; telemetryMessage.status = shedBoat_Telemetry_Status_STATIONARY; telemetryMessage.has_debug = true; telemetryMessage.debug.has_bearing_compensation = true; telemetryMessage.debug.bearing_compensation = bearingCompensation * 1000; telemetryMessage.debug.has_speed_over_ground_compensation = true; telemetryMessage.debug.speed_over_ground_compensation = speedOverGroundCompensation * 1000; telemetryMessage.debug.has_motor_1_throttle_compensation = true; telemetryMessage.debug.motor_1_throttle_compensation = leftThrottle * 1000; telemetryMessage.debug.has_motor_2_throttle_compensation = true; telemetryMessage.debug.motor_2_throttle_compensation = rightThrottle * 1000; uint8_t buffer[100]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); bool success = pb_encode(&stream, shedBoat_Telemetry_fields, &telemetryMessage); if(success) { send_xbee_packet(buffer, stream.bytes_written); } else { error("Failed to encode Proto Buffer"); DEBUG_OUTPUT("Failed to encode Proto Buffer /r/n"); }#endif}
开发者ID:graymalkin,项目名称:shed_boat,代码行数:29,
示例12: printStringvoid printString(const String* inStr){ if(inStr->length == 0) return; DEBUG_OUTPUT(("%.*s", inStr->length, inStr->str));}
开发者ID:rwl,项目名称:exip,代码行数:7,
示例13: HubGetPortStatus//*****************************************************************************//// This function is used to retrieve the current status of a port on the// hub.//// /param psHubInstance is the hub device instance.// /param ui8Port is the port number for this request.// /param pui16PortStatus is a pointer to the memory to store the current// status of the port.// /param pui16PortChange is a pointer to the memory to store the current// change status of the ports.//// This function is used to retrieve the current overall status and change// status for the port given in the /e ui8Port parameter. The /e ui8Port value// indicates which port number to send this request to and can range from 0 to// the number of valid ports on the given hub. A /e ui8Port value of 0 is an// access to the hub itself and not one of the hub ports.//// /return None.////*****************************************************************************static boolHubGetPortStatus(tHubInstance *psHubInstance, uint8_t ui8Port, uint16_t *pui16PortStatus, uint16_t *pui16PortChange){ uint32_t ui32Data, ui32Read; tUSBRequest sSetupPacket; tUSBHostDevice *psDevice; // // Retrieve the device pointer. // psDevice = psHubInstance->psDevice; // // This is a standard OUT request. // sSetupPacket.bmRequestType = USB_RTYPE_DIR_IN | USB_RTYPE_CLASS | USB_RTYPE_OTHER; // // Set the fields to get the hub status. // sSetupPacket.bRequest = USBREQ_GET_STATUS; sSetupPacket.wValue = 0; sSetupPacket.wIndex = (uint16_t)ui8Port; sSetupPacket.wLength = 4; // // Send the request. // ui32Read = USBHCDControlTransfer(0, &sSetupPacket, psDevice, (uint8_t *)&ui32Data, 4, psDevice->sDeviceDescriptor.bMaxPacketSize0); // // Check that we received the correct number of bytes. // if(ui32Read != 4) { return(false); } else { // // We got 4 bytes from the device. Now translate these into the 2 // 16-bit values we pass back to the caller. // *pui16PortStatus = (uint16_t)(ui32Data & 0xFFFF); *pui16PortChange = (uint16_t)(ui32Data >> 16); DEBUG_OUTPUT("Port %d, status 0x%04x, change 0x%04x/n", ui8Port, *pui16PortStatus, *pui16PortChange); } // // All is well. // return(true);}
开发者ID:mileat,项目名称:proj-emb,代码行数:80,
示例14: USBHHubClose//*****************************************************************************////! This function is used to release a hub device instance.//!//! /param psHubInstance is the hub device instance that is to be released.//!//! This function is called when an instance of the hub device must be//! released. This function is typically made in preparation for shutdown or a//! switch to function as a USB device when in OTG mode. Following this call,//! the hub device is no longer available, but it can be opened again using a//! call to USBHHubOpen(). After calling USBHHubClose(), the host hub driver//! no longer provides any callbacks or accepts calls to other hub driver APIs.//!//! /return None.////*****************************************************************************voidUSBHHubClose(tHubInstance *psHubInstance){ // // Forget the instance pointer and callback. // psHubInstance->psDevice = 0; psHubInstance->pfnCallback = 0; DEBUG_OUTPUT("USBHHubClose completed./n");}
开发者ID:mileat,项目名称:proj-emb,代码行数:27,
示例15: DEBUG_OUTPUT/// Read the summary section of the disk file.////// @param *data The buffer to write the data to. It must be at least/// mSummaryinfo.totalSummaryBytes long.bool SimpleBlockFile::ReadSummary(void *data){ if (mCache.active) { DEBUG_OUTPUT("ReadSummary: Summary is already in cache"); memcpy(data, mCache.summaryData, (size_t)mSummaryInfo.totalSummaryBytes); return true; } else { DEBUG_OUTPUT("ReadSummary: Reading summary from disk"); wxFFile file(mFileName.GetFullPath(), wxT("rb")); wxLogNull *silence=0; if(mSilentLog)silence= new wxLogNull(); if(!file.IsOpened() ){ memset(data,0,(size_t)mSummaryInfo.totalSummaryBytes); if(silence) delete silence; mSilentLog=TRUE; return true; } if(silence) delete silence; mSilentLog=FALSE; // The offset is just past the au header if( !file.Seek(sizeof(auHeader)) ) return false; int read = (int)file.Read(data, (size_t)mSummaryInfo.totalSummaryBytes); FixSummary(data); return (read == mSummaryInfo.totalSummaryBytes); }}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:45,
示例16: nrf24l01p_dataPendinguint8_t nrf24l01p_dataPending( ){ uint8_t status; uint8_t fifo_status; uint8_t pipeno = NRF24L01P_PIPE_NONE; status = nrf24l01p_singleReadReg( STATUS ); fifo_status = nrf24l01p_singleReadReg( FIFO_STATUS ); if( status & (1<<RX_DR) ){ nrf24l01p_singleWriteReg( STATUS, 0xff ); pipeno = (status&0x0e)>>1; DEBUG_OUTPUT( "jjjj" ); }
开发者ID:sannyas,项目名称:mculib,代码行数:12,
示例17: HubDriverDeviceConnect//*****************************************************************************//// A new device has been connected to the hub. Allocate resources to manage// it and pass details back to the main USB host enumeration code to have the// device enumerated.////*****************************************************************************static voidHubDriverDeviceConnect(uint8_t ui8Port){ DEBUG_OUTPUT("HubDriverDeviceConnect/n"); // // We've allocated a port table entry so fill it in then initiate a reset // on the device. // g_sRootHub.psPorts[ui8Port].bChanged = false; // // Mark the port as having a device present but not enumerated. // DEBUG_OUTPUT("Deferring enumeration for port %d/n", ui8Port); g_sRootHub.psPorts[ui8Port].iState = ePortConnected; // // Wait 100ms to reset the device. // g_sRootHub.psPorts[ui8Port].ui32Count = 100;}
开发者ID:mileat,项目名称:proj-emb,代码行数:29,
示例18: USBHHubOpen//*****************************************************************************////! This function is used to enable the host hub class driver before any//! devices are present.//!//! /param pfnCallback is the driver call back for host hub events.//!//! This function is called to open an instance of a host hub device and//! provides a valid callback function for host hub events in the//! /e pfnCallback parameter. This function must be called before the USB//! host code can successfully enumerate a hub device or any devices attached//! to the hub. The /e pui8HubPool is memory provided to the hub class to//! manage the devices that are connected to the hub. The /e ui32PoolSize is//! the number of bytes and should be at least 32 bytes per device including//! the hub device itself. A simple formula for providing memory to the hub//! class is /b MAX_USB_DEVICES * 32 bytes of data to allow for proper//! enumeration of connected devices. The value for /b MAX_USB_DEVICES is//! defined in the usblib.h file and controls the number of devices//! supported by the USB library. The /e ui32NumHubs parameter//! defaults to one and only one buffer of size tHubInstance is required to//! be passed in the /e psHubInstance parameter.//!//! /note Changing the value of /b MAX_USB_DEVICES requires a rebuild of the//! USB library to have an effect on the library.//!//! /return This function returns the driver instance to use for the other//! host hub functions. If there is no instance available at the time of//! this call, this function returns zero.////*****************************************************************************tHubInstance *USBHHubOpen(tUSBHHubCallback pfnCallback){ // // Only one hub is supported. // if(g_sRootHub.pfnCallback) { DEBUG_OUTPUT("USBHHubOpen failed - already connected./n"); return(0); } // // Save the instance data for this device. // g_sRootHub.pfnCallback = pfnCallback; DEBUG_OUTPUT("USBHHubOpen completed./n"); // // Return the device instance pointer. // return(&g_sRootHub);}
开发者ID:mileat,项目名称:proj-emb,代码行数:54,
示例19: nrf24l01p_enterRxModevoid nrf24l01p_enterRxMode( void ){ uint8_t config; nrf24l01p_chipEnable( 0 ); nrf24l01p_doCommand( FLUSH_TX, 0, 0, 0 ); nrf24l01p_doCommand( FLUSH_RX, 0, 0, 0 ); nrf24l01p_singleWriteReg( STATUS, 0xff ); //nrf24l01p_singleWriteReg( CONFIG, 0x07 ); DEBUG_OUTPUT( "enter RxMode, config=0x%x/n", nrf24l01p_conf.config|(1<<PRIM_RX)|(1<<PWR_UP)); nrf24l01p_singleWriteReg( CONFIG, nrf24l01p_conf.config|(1<<PRIM_RX)|(1<<PWR_UP) ); nrf24l01p_chipEnable( 1 );}
开发者ID:sannyas,项目名称:mculib,代码行数:15,
示例20: NVNewRoot/* * === FUNCTION ====================================================================== * Name: NVNewRoot * Description: * ===================================================================================== */int NVNewRoot(NVRDescr * addr, void *p, char * name, size_t size) { // check valid addr of p long newRootOffset = addr2offset(addr,p); void * brk = offset2addr(addr,addr->dataRegionOffset); // DEBUG_OUTPUT("test"); if ( newRootOffset>=addr->rootMapOffset || newRootOffset<=sizeof(NVRDescr)) { errno = EINVAL; e("NVNewRoot fail"); } NVRootmapItem_t * nvrmPtrCurr= offset2addr(addr, addr->rootMapOffset);// NVRootmapItem_t * nvrmPtrIdx=nvrmPtrCurr ;// DEBUG_OUTPUT("test"); if (NVFetchRoot(addr,name)!=NULL) { errno=EEXIST; e("NVNewRoot fail"); // return -1 } else { // DEBUG_OUTPUT("test"); // // segment fault // #ifdef DEBUG // printf("%p/n",nvrmPtrCurr); // printf("%p/n",brk); // #endif if ((void *)(--nvrmPtrCurr)> brk){ if (p==NULL){ DEBUG_OUTPUT("Error in input address"); return -2; } else { // DEBUG_OUTPUT("test"); nvrmPtrCurr->location = p; nvrmPtrCurr->type = size; strcpy(nvrmPtrCurr->name,name); // update meta data addr->rootMapOffset=addr2offset(membase,nvrmPtrCurr); addr->nvRootCnt++; // update dataregion mem return 0; } } else { errno =ENOMEM; e("NVNewRoot fail"); // return -1 } // DEBUG_OUTPUT("test"); }}
开发者ID:yishanhe,项目名称:nvm-simulator,代码行数:53,
示例21: USBHHubEnumerationError//*****************************************************************************////! Informs the hub class driver that a downstream device failed to enumerate.//!//! /param ui8Hub is the address of the hub to which the downstream device//! is attached.//! /param ui8Port is the port on the hub to which the downstream device is//! attached.//!//! This function is called by the host controller driver to inform the hub//! class driver that an attempt to enumerate a downstream device has failed.//! The hub driver then cleans up and continues enumeration of any other newly//! connected devices.//!//! /return None.////*****************************************************************************voidUSBHHubEnumerationError(uint8_t ui8Hub, uint8_t ui8Port){ DEBUG_OUTPUT("Enumeration error for hub %d, port %d/n", ui8Hub, ui8Port); // // Record the fact that the device is not working correctly. // g_sRootHub.psPorts[ui8Port].iState = ePortError; // // Clear the flag we use to defer further enumerations. This will cause // the next connected device (if any) to start enumeration on the next // call to USBHHubMain(). // g_sRootHub.bEnumerationBusy = false;}
开发者ID:mileat,项目名称:proj-emb,代码行数:34,
注:本文中的DEBUG_OUTPUT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DEBUG_PRINT函数代码示例 C++ DEBUG_OUT函数代码示例 |