这篇教程C++ uprint函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中uprint函数的典型用法代码示例。如果您正苦于以下问题:C++ uprint函数的具体用法?C++ uprint怎么用?C++ uprint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了uprint函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: TEST_LightMCUvoid TEST_LightMCU() { char rx[10]; unsigned int i, r, g, b, final; while (1) { uprint("l to loop, other for special"); rx[0] = uart1Rx(); if (rx[0] == 'l') { for (i = 0; i < 192; i ++) { uprint_int("Sending ", i); sendLightMCU(i); DELAY_MS(50); } } else { uprint("Enter r 0-4: "); uart1_gets(rx, 10); r = atoi(rx); uprint("Enter g 0-4: "); uart1_gets(rx, 10); g = atoi(rx); uprint("Enter b 0-4: "); uart1_gets(rx, 10); b = atoi(rx); final = 0b11000000 + (r << 4) + (g << 2) + b; uprint_int("Sending ", final); sendLightMCU(final); } }
开发者ID:Kropie,项目名称:ecen-4013-spring2014-mchammer,代码行数:31,
示例2: mainint main(void){ struct video *driver_implem; uprint("Video: Launching driver"); if (!(driver_implem = malloc(sizeof (struct video)))) { uprint("Video: Out of memory"); return 1; } if (video_initialize(driver_implem) < 0) { free(driver_implem); return 1; } driver_implem->opened = 0; uprint("Video: Initialization successful"); return video_driver_run(driver_implem);}
开发者ID:Nakrez,项目名称:zOS,代码行数:26,
示例3: TEST_RadioSendvoid TEST_RadioSend() { char rx[2]; while (1) { uprint("Enter character to send: "); uart1_gets(rx, 1); radioSendMessage(rx, 0x0A00); uprint("Sent message!"); }}
开发者ID:Kropie,项目名称:ecen-4013-spring2014-mchammer,代码行数:9,
示例4: TEST_RadioReceivevoid TEST_RadioReceive() { char rx[2]; while (1) { uprint("Wating for message ..."); radioGetMessage(rx, 1); uprint("Got message: "); uprint(rx); }}
开发者ID:Kropie,项目名称:ecen-4013-spring2014-mchammer,代码行数:11,
示例5: aoeprobestatic SDev*aoeprobe(char *path, SDev *s){ int n, i; char *p; Chan *c; Ctlr *ctlr; if((p = strrchr(path, '/')) == 0) error(Ebadarg); *p = 0; uprint("%s/ctl", path); *p = '/'; c = namec(up->genbuf, Aopen, OWRITE, 0); if(waserror()) { cclose(c); nexterror(); } n = uprint("discover %s", p+1); devtab[c->type]->write(c, up->genbuf, n, 0); poperror(); cclose(c); for(i = 0;; i += Probeintvl) { if(i > Probemax || waserror()) error(Etimedout); tsleep(&up->sleep, return0, 0, Probeintvl); poperror(); uprint("%s/ident", path); if(waserror()) continue; c = namec(up->genbuf, Aopen, OREAD, 0); poperror(); cclose(c); ctlr = newctlr(path); break; } if(s == nil && (s = malloc(sizeof *s)) == nil) return nil; s->ctlr = ctlr; s->ifc = &sdaoeifc; s->nunit = 1; return s;}
开发者ID:grobe0ba,项目名称:plan9front,代码行数:48,
示例6: set_coordivoid set_coordi(void){ uint8 logicalType; osal_nv_item_init( ZCD_NV_LOGICAL_TYPE, sizeof(logicalType), &logicalType ); logicalType = ZG_DEVICETYPE_COORDINATOR; if( osal_nv_write( ZCD_NV_LOGICAL_TYPE, 0 ,sizeof(logicalType), &logicalType) != ZSUCCESS) { uprint("set device to coordi failed"); }else { zgWriteStartupOptions (ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE); uprint("set device to coordi,restart it"); } return; }
开发者ID:cuu,项目名称:weiyi,代码行数:16,
示例7: fp_fsincos7struct fp_ext *fp_fsincos7(struct fp_ext *dest, struct fp_ext *src){ uprint("fsincos7/n"); return dest;}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:7,
示例8: date/* Format the date */static voiddate(const UChar *tz, UDateFormatStyle style, char *format, UErrorCode *status){ UChar *s = 0; int32_t len = 0; UDateFormat *fmt; UChar uFormat[100]; fmt = udat_open(style, style, 0, tz, -1,NULL,0, status); if ( format != NULL ) { u_charsToUChars(format,uFormat,strlen(format)), udat_applyPattern(fmt,FALSE,uFormat,strlen(format)); } len = udat_format(fmt, ucal_getNow(), 0, len, 0, status); if(*status == U_BUFFER_OVERFLOW_ERROR) { *status = U_ZERO_ERROR; s = (UChar*) malloc(sizeof(UChar) * (len+1)); if(s == 0) goto finish; udat_format(fmt, ucal_getNow(), s, len + 1, 0, status); if(U_FAILURE(*status)) goto finish; } /* print the date string */ uprint(s, stdout, status); /* print a trailing newline */ printf("/n"); finish: udat_close(fmt); free(s);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:36,
示例9: version/* Version information */static voidversion(){ UErrorCode status = U_ZERO_ERROR; const char *tzVer; int len = 256; UChar tzName[256]; printf("icudate version %s, created by Stephen F. Booth./n", DATE_VERSION); puts(U_COPYRIGHT_STRING); tzVer = ucal_getTZDataVersion(&status); if(U_FAILURE(status)) { tzVer = u_errorName(status); } printf("/n"); printf("ICU Version: %s/n", U_ICU_VERSION); printf("ICU Data (major+min): %s/n", U_ICUDATA_NAME); printf("Default Locale: %s/n", uloc_getDefault()); printf("Time Zone Data Version: %s/n", tzVer); printf("Default Time Zone: "); status = U_ZERO_ERROR; u_init(&status); len = ucal_getDefaultTimeZone(tzName, len, &status); if(U_FAILURE(status)) { printf(" ** Error getting default zone: %s/n", u_errorName(status)); } uprint(tzName, stdout, &status); printf("/n/n");}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:30,
示例10: identifystatic intidentify(Ctlr *c, ushort *id){ uchar oserial[21]; vlong osectors, s; osectors = c->sectors; memmove(oserial, c->serial, sizeof c->serial); s = idfeat(c, id); if(s == -1) { uprint("%s: identify fails", c->unit->name); print("%s/n", up->genbuf); error(up->genbuf); } idmove(c->serial, id+10, 20); idmove(c->firmware, id+23, 8); idmove(c->model, id+27, 40); if((osectors == 0 || osectors != s) && memcmp(oserial, c->serial, sizeof oserial) != 0) { c->sectors = s; c->drivechange = 1; c->vers++; } return 0;}
开发者ID:grobe0ba,项目名称:plan9front,代码行数:26,
示例11: aoeidentify/* must call with d qlocked */static intaoeidentify(Ctlr *d, SDunit *u){ Chan *c; c = nil; if(waserror()){ if(c) cclose(c); iprint("aoeidentify: %s/n", up->errstr); nexterror(); } uprint("%s/ident", d->path); c = namec(up->genbuf, Aopen, OREAD, 0); devtab[c->type]->read(c, d->ident, sizeof d->ident, 0); poperror(); cclose(c); d->feat = 0; d->smart = 0; identify(d, (ushort*)d->ident); memset(u->inquiry, 0, sizeof u->inquiry); u->inquiry[2] = 2; u->inquiry[3] = 2; u->inquiry[4] = sizeof u->inquiry - 4; memmove(u->inquiry+8, d->model, 40); return 0;}
开发者ID:carriercomm,项目名称:plan9-gpl,代码行数:33,
示例12: inorder/* (*uprint) user provided print function */void inorder(struct node_t *node, void (*uprint)(void *, void *)){ if (node != NULL) { inorder(node->left, uprint); uprint(node->key, node->value); inorder(node->right, uprint); }}
开发者ID:MintPaw,项目名称:College,代码行数:9,
示例13: TEST_Audiovoid TEST_Audio() { char rx[50]; unsigned char vol; unsigned int snd; while (1) { uprint("Enter volume level: "); uart1_gets(rx, 50); vol = atoi(rx); uprint_int("Volume is: ", vol); uprint("Enter sound: "); uart1_gets(rx, 50); snd = atoi(rx); uprint_int("Sound is: ", snd); setVolume(vol); playSound(snd); }}
开发者ID:Kropie,项目名称:ecen-4013-spring2014-mchammer,代码行数:17,
示例14: fp_flog2struct fp_ext *fp_flog2(struct fp_ext *dest, struct fp_ext *src){ uprint("flog2/n"); fp_monadic_check(dest, src); return dest;}
开发者ID:E-LLP,项目名称:n900,代码行数:9,
示例15: fp_ftentoxstruct fp_ext *fp_ftentox(struct fp_ext *dest, struct fp_ext *src){ uprint("ftentox/n"); fp_monadic_check(dest, src); return dest;}
开发者ID:E-LLP,项目名称:n900,代码行数:9,
示例16: fp_fcoshstruct fp_ext *fp_fcosh(struct fp_ext *dest, struct fp_ext *src){ uprint("fcosh/n"); fp_monadic_check(dest, src); return dest;}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:9,
示例17: fp_fatanstruct fp_ext *fp_fatan(struct fp_ext *dest, struct fp_ext *src){ uprint("fatan/n"); fp_monadic_check(dest, src); return dest;}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:9,
示例18: fp_fetoxm1struct fp_ext *fp_fetoxm1(struct fp_ext *dest, struct fp_ext *src){ uprint("fetoxm1/n"); fp_monadic_check(dest, src); return dest;}
开发者ID:08opt,项目名称:linux,代码行数:9,
示例19: printfint printf(const char* fmt,...){ va_list args; int i; char buf[500]; va_start(args,fmt); i=vsprintf(buf,fmt,args); va_end(args); uprint(buf); return i;}
开发者ID:hchunhui,项目名称:myos,代码行数:11,
示例20: set_routervoid set_router(void){ uint8 logicalType; osal_nv_item_init( ZCD_NV_LOGICAL_TYPE, sizeof(logicalType), &logicalType ); logicalType = ZG_DEVICETYPE_ROUTER; if( osal_nv_write( ZCD_NV_LOGICAL_TYPE, 0 ,sizeof(logicalType), &logicalType) != ZSUCCESS) { uprint("set device to router failed"); }else { zgWriteStartupOptions (ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE); uprint("set device to router,restart it"); } // zgWriteStartupOptions (ZG_STARTUP_SET, 0x02);// zgInit();// ZDOInitDevice( 0 );// SystemReset(); return; }
开发者ID:cuu,项目名称:weiyi,代码行数:20,
示例21: uprintstruct ext2_inode *ext2_icache_request(struct ext2fs *ext2, ino_t inode){ int i; uint64_t group; uint64_t index; int ret; struct fiu_instance *fi = ext2->fi; for (i = 0; i < EXT2_INODE_CACHE_SIZE; ++i) { if (ext2->inode_cache[i].inode == inode) { ++ext2->inode_cache[i].ref_count; return &(ext2->inode_cache[i].cinode); } } /* * If the inode was not in cache, we find a place to hold it in the cache * and we fetch it */ for (i = 0; i < EXT2_INODE_CACHE_SIZE; ++i) { if (ext2->inode_cache[i].inode == EXT2_BAD_INODE || ext2->inode_cache[i].ref_count == 0) break; } /* No place to hold it */ if (i == EXT2_INODE_CACHE_SIZE) { uprint("EXT2: Cache is full! FIXME!"); return NULL; } index = (inode - 1) % ext2->sb.inode_per_group; group = (inode - 1) / ext2->sb.inode_per_group; off_t lseek_off = (off_t)ext2->grp_table[group].inode_table * ext2->block_size + index * ext2->sb.sizeof_inode; ret = lseek(fi->device_fd, lseek_off, SEEK_SET); if (ret < 0) return NULL; ret = read(fi->device_fd, &ext2->inode_cache[i].cinode, sizeof (struct ext2_inode)); if (ret < 0) return NULL; ext2->inode_cache[i].inode = inode; ext2->inode_cache[i].ref_count = 1; return &ext2->inode_cache[i].cinode;}
开发者ID:Nakrez,项目名称:zOS,代码行数:52,
示例22: cloudMainvoid cloudMain() { uprint("/r/n ************************ BOOT UP (CLOUD) ************************ /r/n"); configureAudio(); audioReset(); configureIRSend(); int sta = configureRadio(0x0A00, 0x0000111111111111); uprint_int("Configured radio: ", sta); char rxbuf[2]; int damageToSend, i; configureCloudLighting(); DELAY_MS(400); playSound(CS_BOOT); DELAY_MS(CS_BOOT_LEN); while (1) { uprint("Beginning of main loop"); cloudLightingSetMode(ALGM_BLINK); uprint("Waiting for hammer message"); radioGetMessage(rxbuf, 1); uprint("Got message"); playSound(CS_FIRE); // Don't wait for this sound // Enter manual lighting mode cloudLightingSetMode(ALGM_OFF); cloudLightingSetAll(BRIGHTNESS_MAX); cloudLightingUpdate(); damageToSend = rxbuf[0]; for (i = 0; i < damageToSend; i ++) { uprint("Sending damage packet"); sendDamagePacket(); if ((i % 10) == 0) { cloudLightingSetAll(BRIGHTNESS_MAX); } else if ((i % 5) == 0) { cloudLightingSetAll(50); } cloudLightingUpdate(); } uprint("Sending DONE message"); radioSendMessage("DONE", 0x0A00); } }
开发者ID:Kropie,项目名称:ecen-4013-spring2014-mchammer,代码行数:58,
示例23: mainint main(void){ int tid; if (ide_detect(&ide) < 0) { uprint("ATA: No IDE controller found. Bye!"); return 1; } if (!ide_initialize(&ide)) { uprint("ATA: No disk have been detected. Bye!"); return 2; } uprint("ATA: configuration detected, creating devices ..."); for (int i = 0; i < 4; ++i) { if (ide.devices[i].exists) { tid = thread_create(driver_device_thread, 1, &ide.devices[i]); if (tid < 0) uprint("ATA: Fail to start thread"); } } while (1) sleep(1); return 0;}
开发者ID:Nakrez,项目名称:zOS,代码行数:36,
示例24: print_days/* Print the days */static voidprint_days(UChar *days [], FILE *f, UErrorCode *status){ int32_t i; if(U_FAILURE(*status)) return; /* Print the day names */ for(i = 0; i < DAY_COUNT; ++i) { uprint(days[i], f, status); putc(' ', f); }}
开发者ID:harrykipper,项目名称:Alcatel_OT_985_kernel,代码行数:16,
示例25: unit2devstatic Aoedev*unit2dev(ulong unit){ int i; Aoedev *d; rlock(&devs); i = 0; for(d = devs.d; d; d = d->next) if(i++ == unit){ runlock(&devs); return d; } runlock(&devs); uprint("unit lookup failure: %lux pc %#p", unit, getcallerpc(&unit)); error(up->genbuf); return nil;}
开发者ID:Earnestly,项目名称:plan9,代码行数:18,
示例26: GenericApp_ProcessZDOMsgs/********************************************************************* * @fn GenericApp_ProcessZDOMsgs() * * @brief Process response messages * * @param none * * @return none */static void GenericApp_ProcessZDOMsgs( zdoIncomingMsg_t *inMsg ){ switch ( inMsg->clusterID ) { case End_Device_Bind_rsp: if ( ZDO_ParseBindRsp( inMsg ) == ZSuccess ) { // Light LED HalLedSet( HAL_LED_2, HAL_LED_MODE_ON ); }#if defined( BLINK_LEDS ) else { // Flash LED to show failure HalLedSet ( HAL_LED_2, HAL_LED_MODE_FLASH ); }#endif break; case Match_Desc_rsp: { uprint("Match_Decs_rsp"); ZDO_ActiveEndpointRsp_t *pRsp = ZDO_ParseEPListRsp( inMsg ); if ( pRsp ) { if ( pRsp->status == ZSuccess && pRsp->cnt ) { GenericApp_DstAddr.addrMode = (afAddrMode_t)Addr16Bit; //GenericApp_DstAddr.addr.shortAddr = pRsp->nwkAddr; GenericApp_DstAddr.addr.shortAddr = 0xFFFF; // Take the first endpoint, Can be changed to search through endpoints GenericApp_DstAddr.endPoint = pRsp->epList[0]; // Light LED //HalLedSet( HAL_LED_2, HAL_LED_MODE_ON ); } osal_mem_free( pRsp ); } } break; }}
开发者ID:cuu,项目名称:weiyi,代码行数:52,
示例27: set_panidvoid set_panid( uint16 u16NewPanid){ uint8 u8BackCode; _NIB.nwkPanId = u16NewPanid; macRadioSetPanID ( _NIB.nwkPanId); ZMacSetReq( ZMacPanId, (byte *)& _NIB.nwkPanId); u8BackCode = osal_nv_write(ZCD_NV_PANID, 0, 2, &u16NewPanid); if( u8BackCode == ZSUCCESS) { NLME_UpdateNV(0x01);// HAL_SYSTEM_RESET(); } else { uprint("set_panid failed"); } }
开发者ID:cuu,项目名称:weiyi,代码行数:19,
示例28: subtest_ul/*** subtest_ul(test_list, status, ch)**** test transparent underline (ul)*/static voidsubtest_ul( struct test_list *t, int *state, int *ch){ if (!over_strike) { /* (ul) is used only if (os) is reset */ put_crlf(); sprintf(temp, "This text should %sbe underlined.", transparent_underline ? "" : "not "); uprint(temp); put_crlf(); ptextln("If the above line is not underlined the (ul) should be false."); sprintf(temp, "(ul) Transparent-underline is %s in the data base", transparent_underline ? "true" : "false"); ptextln(temp); generic_done_message(t, state, ch); }}
开发者ID:enthought,项目名称:ncurses-5.5,代码行数:25,
示例29: aoectlstatic voidaoectl(Ctlr *d, char *s){ Chan *c; c = nil; if(waserror()) { if(c) cclose(c); print("sdaoectl: %s/n", up->errstr); nexterror(); } uprint("%s/ctl", d->path); c = namec(up->genbuf, Aopen, OWRITE, 0); devtab[c->type]->write(c, s, strlen(s), 0); poperror(); cclose(c);}
开发者ID:grobe0ba,项目名称:plan9front,代码行数:20,
示例30: aoeconnectstatic intaoeconnect(SDunit *u, Ctlr *c){ qlock(c); if(waserror()){ qunlock(c); return -1; } aoeidentify(u->dev->ctlr, u); if(c->c) cclose(c->c); c->c = 0; uprint("%s/data", c->path); c->c = namec(up->genbuf, Aopen, ORDWR, 0); qunlock(c); poperror(); return 0;}
开发者ID:carriercomm,项目名称:plan9-gpl,代码行数:20,
注:本文中的uprint函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ uprintf函数代码示例 C++ uppercase函数代码示例 |