这篇教程C++ write16函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中write16函数的典型用法代码示例。如果您正苦于以下问题:C++ write16函数的具体用法?C++ write16怎么用?C++ write16使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了write16函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: read16/** * /brief Write a 16 bit value to EEPROM after first clearing the memory. * /li Erase and write time 5ms per manufacturer specification * /li Manufacturer does not specify max or min erase/write times * /param [in] reg Address to write to. * /param [in] data Value to write. */void MLX90614::writeEEProm(uint8_t reg, uint16_t data) { uint16_t val; reg |= 0x20; // read current value, compare to the new value, and do nothing on a match // or if there are read errors set the error status flag only val = read16(reg); if((val != data) && !_rwError) { // on any R/W errors it is assumed the memory is corrupted // clear the memory and wait Terase (per manufacturer's documentation) write16(reg, 0); delay(5); // if no write errors then write the new value if(_rwError) _rwError |= MLX90614_EECORRUPT; else { // write the data and wait Twrite (per manufacturer's documentation) write16(reg, data); delay(5); if(_rwError) _rwError |= MLX90614_EECORRUPT; } }}
开发者ID:ASelwa,项目名称:EtaVisionSystem,代码行数:32,
示例2: intel_extreme_uninitvoidintel_extreme_uninit(intel_info &info){ CALLED(); if (!info.fake_interrupts && info.shared_info->vblank_sem > 0) { // disable interrupt generation write16(info, find_reg(info, INTEL_INTERRUPT_ENABLED), 0); write16(info, find_reg(info, INTEL_INTERRUPT_MASK), ~0); remove_io_interrupt_handler(info.irq, intel_interrupt_handler, &info); if (info.use_msi && gPCIx86Module != NULL) { gPCIx86Module->disable_msi(info.pci->bus, info.pci->device, info.pci->function); gPCIx86Module->unconfigure_msi(info.pci->bus, info.pci->device, info.pci->function); } } gGART->unmap_aperture(info.aperture); delete_area(info.registers_area); delete_area(info.shared_area);}
开发者ID:rakex,项目名称:haiku,代码行数:25,
示例3: write16void DSA1Intro::write(ostream& strm) { header_size = 20; count = entries.size(); // WRONG! Come back later to change it u16 truecount = 0; write16(strm, count); for (u8 i=0; i<0x20-2; i++) write8(strm, 0); u32 offset = 0; for (u32 i=0; i<count; i++) { // Nach Duplikaten suchen und diese markieren u32 j = 0; for ( ; j<i; j++) { if (entries[i]->name == entries[j]->name) break; } if (j == i) { // Kein Duplikat gefunden entries[i]->offset = offset; entries[i]->write(strm); offset += entries[i]->size; truecount++; } else { // Duplikat gefunden entries[i]->offset = entries[j]->offset; assert(entries[i]->size == entries[j]->size); entries[i]->write(strm); } } for (u32 i=count; i < 139 ; i++) { for (u32 j=0; j < 0x20; j++) write8(strm, 0x00); } strm.seekp(0); write16(strm, truecount-1); // DUMMY nicht mitz C++ write32函数代码示例 C++ wresize函数代码示例
|