static int setOutputInterface(int vip_mode) { unsigned long value = 0; int i, j = 0; unsigned long out_mode = vip_mode ? 0x12 : 0x01; for (j = 0; j < chips; j++) { for (i = 0; i < MAX_DECODERS; i++) { readDword( &cx26828_interface[j], ALCS_VDECA_OUT_CTRL1 + (0x200*i), &value); value &= 0xFFFFFFEC; writeDword( &cx26828_interface[j], ALCS_VDECA_OUT_CTRL1 + (0x200*i), value | out_mode); readDword( &cx26828_interface[j], ALCS_VDECA_OUT_CTRL_NS + (0x200*i), &value); value &= 0xFFFFFFEC; writeDword( &cx26828_interface[j], ALCS_VDECA_OUT_CTRL_NS + (0x200*i), value | out_mode); } } printk("setOutputInterface: vip_mode = %d \n", vip_mode); return 0; }
void XMFileBase::writeDwords(const mp_dword* buffer,mp_sint32 count) { for (mp_sint32 i = 0; i < count; i++) { writeDword(*buffer); buffer++; } }
bool RTree::save(PxOutputStream& stream) const { // save the RTree root structure followed immediately by RTreePage pages to an output stream bool mismatch = (littleEndian() == 1); writeChunk('R', 'T', 'R', 'E', stream); writeDword(mVersion, mismatch, stream); writeFloatBuffer(&mBoundsMin.x, 4, mismatch, stream); writeFloatBuffer(&mBoundsMax.x, 4, mismatch, stream); writeFloatBuffer(&mInvDiagonal.x, 4, mismatch, stream); writeFloatBuffer(&mDiagonalScaler.x, 4, mismatch, stream); writeDword(mPageSize, mismatch, stream); writeDword(mNumRootPages, mismatch, stream); writeDword(mNumLevels, mismatch, stream); writeDword(mTotalNodes, mismatch, stream); writeDword(mTotalPages, mismatch, stream); writeDword(mUnused, mismatch, stream); for (PxU32 j = 0; j < mTotalPages; j++) { writeFloatBuffer(mPages[j].minx, RTreePage::SIZE, mismatch, stream); writeFloatBuffer(mPages[j].miny, RTreePage::SIZE, mismatch, stream); writeFloatBuffer(mPages[j].minz, RTreePage::SIZE, mismatch, stream); writeFloatBuffer(mPages[j].maxx, RTreePage::SIZE, mismatch, stream); writeFloatBuffer(mPages[j].maxy, RTreePage::SIZE, mismatch, stream); writeFloatBuffer(mPages[j].maxz, RTreePage::SIZE, mismatch, stream); WriteDwordBuffer(mPages[j].ptrs, RTreePage::SIZE, mismatch, stream); } return true; }
static void cx26828_set_ptz_channel(int camera_src_sel) { // // Custom settings to support PTZ // unsigned long value = 0; if ( camera_src_sel >= MAX_DECODERS ) return; readDword(&cx26828_interface[0], ALCS_VP_OMUX_C, &value); value &= 0xFFF3E08F; value |= (0xE0010 | ( (camera_src_sel * 2) << 8) ); writeDword(&cx26828_interface[0], ALCS_VP_OMUX_C, value); writeDword(&cx26828_interface[1], ALCS_VP_OMUX_C, 0x0000); readDword(&cx26828_interface[0], ALCS_VDECA_OUT_CTRL1 + (0x200 * camera_src_sel), &value); value &= 0xFFFFFCFF; //clear clk_ph_sel bits writeDword(&cx26828_interface[0], ALCS_VDECA_OUT_CTRL1 + (0x200 * camera_src_sel), value | 0x200); }
void MACHFile::setHeader_magic(unsigned int nValue) { writeDword(offsetof(mach_header,magic),nValue,isReverse()); if((nValue==MH_CIGAM)||(nValue==MH_CIGAM_64)) { nIsReverse=1; } else { nIsReverse=0; } }
bool writeHeader(NxI8 a, NxI8 b, NxI8 c, NxI8 d, NxU32 version, bool mismatch, NxStream& stream) { // Store endianness NxI8 streamFlags = littleEndian(); if(mismatch) streamFlags^=1; // Export header saveChunk('N', 'X', 'S', streamFlags, stream); // "Novodex stream" identifier saveChunk(a, b, c, d, stream); // Chunk identifier // stream.storeDword(version); // Version number writeDword(version, mismatch, stream); return true; }
void interpretStelem_d(Instruction* ins) { writeDword(popDword() + (popDword() * 4), popDword()); }
void MACHFile::setHeader_reserved(unsigned int nValue) { writeDword(offsetof(mach_header_64,reserved),nValue,isReverse()); }
void MACHFile::setHeader_flags(unsigned int nValue) { writeDword(offsetof(mach_header,flags),nValue,isReverse()); }
void MACHFile::setHeader_sizeofcmds(unsigned int nValue) { writeDword(offsetof(mach_header,sizeofcmds),nValue,isReverse()); }
void MACHFile::setHeader_cpusubtype(unsigned int nValue) { writeDword(offsetof(mach_header,cpusubtype),nValue,isReverse()); }
//Function to reset panel address in flash mem to broadcast address void resetAddress(char value, char *address){ writeDword(value, address); }