这篇教程C++ DEV_FUNC函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DEV_FUNC函数的典型用法代码示例。如果您正苦于以下问题:C++ DEV_FUNC函数的具体用法?C++ DEV_FUNC怎么用?C++ DEV_FUNC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DEV_FUNC函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: pciio_endian_set/* * Specify endianness constraints. The driver tells us what the device * does and how it would like to see things in memory. We reply with * how things will actually appear in memory. */pciio_endian_tpciio_endian_set(devfs_handle_t dev, pciio_endian_t device_end, pciio_endian_t desired_end){ ASSERT((device_end == PCIDMA_ENDIAN_BIG) || (device_end == PCIDMA_ENDIAN_LITTLE)); ASSERT((desired_end == PCIDMA_ENDIAN_BIG) || (desired_end == PCIDMA_ENDIAN_LITTLE));#if DEBUG#if defined(SUPPORT_PRINTING_V_FORMAT) PRINT_ALERT("%v: pciio_endian_set is going away./n" "/tplease use PCIIO_BYTE_STREAM or PCIIO_WORD_VALUES in your/n" "/tpciio_dmamap_alloc and pciio_dmatrans calls instead./n", dev);#else PRINT_ALERT("0x%x: pciio_endian_set is going away./n" "/tplease use PCIIO_BYTE_STREAM or PCIIO_WORD_VALUES in your/n" "/tpciio_dmamap_alloc and pciio_dmatrans calls instead./n", dev);#endif#endif return DEV_FUNC(dev, endian_set) (dev, device_end, desired_end);}
开发者ID:hugh712,项目名称:Jollen,代码行数:30,
示例2: pciio_error_devenableintpciio_error_devenable(devfs_handle_t pconn_vhdl, int error_code){ return DEV_FUNC(pconn_vhdl, error_devenable) (pconn_vhdl, error_code); /* no cleanup specific to this layer. */}
开发者ID:hugh712,项目名称:Jollen,代码行数:7,
示例3: rkusb_get_symbolstatic int rkusb_get_symbol( struct rkusb_dev *dev ){ switch ( DEV_FUNC(dev) ) { case FUNC_GSYM_KERNEL: return rkusb_get_kernel_symbols( dev ); case FUNC_GSYM_GETTASKS: return rksub_get_sym_tasks( dev ); case FUNC_GSYM_GETTASKVM: return rkusb_get_task_mm( dev ); case FUNC_GSYM_PROFILE: { char * buf = __rkusb_rwbuffer_start(dev); PROFILE_INFO pe; pe.size = sizeof( pe ); pe.npc = profile_check( buf ); pe.buf = (unsigned long)buf; pe.now = ktime_to_ns( ktime_get() ); rk28printk("%s::profile n=%ld/n" , __func__ , pe.npc ); rkusb_normal_data_xfer_onetime( dev , &pe ); return 0; } default: break; } return RKUSB_CB_FAILD;}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:26,
示例4: vflash_block_isbadstatic int vflash_block_isbad(int partition, int offset){ ItcRpcMsg req; int ret; // Construct a request message memset((void *)&req, 0, sizeof(req)); req.dev_func = DEV_FUNC(REMOTE_FLASH_DEVICE_ID, REMOTE_BLOCK_ISBAD, partition, 0); req.xid = read_c0_count(); req.u0 = 0; req.u1 = offset;#if DEBUG_DQM_IO printk("%s partition %d offset %08x/n", __func__, partition, offset);#endif ret = do_rpc_io(&req); #if 0 if(ret == 1) { printk("Bad Block at %08x/n", (unsigned int)offset); } #endif return ret; }
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.0.10mp5_OpenSrc,代码行数:25,
示例5: pciio_config_get/* * Read value of configuration register */uint64_tpciio_config_get(devfs_handle_t dev, unsigned reg, unsigned size){ uint64_t value = 0; unsigned shift = 0; /* handle accesses that cross words here, * since that's common code between all * possible providers. */ while (size > 0) { unsigned biw = 4 - (reg&3); if (biw > size) biw = size; value |= DEV_FUNC(dev, config_get) (dev, reg, biw) << shift; shift += 8*biw; reg += biw; size -= biw; } return value;}
开发者ID:hugh712,项目名称:Jollen,代码行数:29,
示例6: xtalk_intr_alloc_nothd/* * Allocate resources required for an interrupt as specified in dev_desc. * Unconditionally setup resources to be non-threaded. * Return resource handle in intr_hdl. */xtalk_intr_txtalk_intr_alloc_nothd(vertex_hdl_t dev, /* which Crosstalk device */ device_desc_t dev_desc, /* device descriptor */ vertex_hdl_t owner_dev) /* owner of this interrupt */{ return (xtalk_intr_t) DEV_FUNC(dev, intr_alloc_nothd) (dev, dev_desc, owner_dev);}
开发者ID:romanalexander,项目名称:Trickles,代码行数:13,
示例7: pciio_error_extract/* ===================================================================== * GENERIC PCI SUPPORT FUNCTIONS */pciio_slot_tpciio_error_extract(devfs_handle_t dev, pciio_space_t *space, iopaddr_t *offset){ ASSERT(dev != NODEV); return DEV_FUNC(dev,error_extract)(dev,space,offset);}
开发者ID:hugh712,项目名称:Jollen,代码行数:11,
示例8: rkusb_read_logstatic int rkusb_read_log( struct rkusb_dev *dev ){ switch ( DEV_FUNC(dev) ) { case FUNC_LOG_GETLUNS: /* first int:luns , next int:sizeof log_buffer */ { int num_size[2]; check_xtranfs_len( 8 ); num_size[0] = dev->luns; num_size[1] = sizeof(struct log_buffer ); rkusb_normal_data_xfer_onetime( dev , num_size ); } return 0; case FUNC_LOG_GETSTRUCT: /* report all log info */ { // check_xtranfs_len( sizeof dev->log ); sizeof dev->log may change. if( !check_log_valid( dev ) ) break; rkusb_normal_data_xfer_onetime( dev , dev->log ); } return 0; case FUNC_LOG_INIT: { int i = DEV_LUN( dev ); #if (LOG_NUM>2) static int rkusb_shell_initlog( struct log_buffer *p ); if( i == LUN_SHELL ) { if( rkusb_shell_initlog( &dev->log[i] ) ) { return RKUSB_CB_FAILD_CSW; } } #endif dev->log[i].getlog(&dev->log[i].va_start , &dev->log[i].offset , &dev->log[i].total_len); } return RKUSB_CB_OK_CSW; case FUNC_LOG_UNINIT: { if( DEV_LUN(dev) == LUN_SHELL ){ dev->log[DEV_LUN(dev)].property &= ~LOG_PROT_MAYWRITE; } } return RKUSB_CB_OK_CSW; case FUNC_LOG_OFFLEN: /* read new log info , first int=start offset , next int=len */ { int offset_len[2]; if( !check_log_valid( dev ) ) break; check_xtranfs_len( 8 ); dev->log[DEV_LUN(dev)].getlog_start_length( &dev->log[DEV_LUN(dev)].offset , &dev->log[DEV_LUN(dev)].len ); offset_len[0] = dev->log[DEV_LUN(dev)].offset; offset_len[1] = dev->log[DEV_LUN(dev)].len; rkusb_normal_data_xfer_onetime( dev , offset_len ); } return 0; default: break; } return -1;}
开发者ID:Tigrouzen,项目名称:k1099,代码行数:58,
示例9: pciio_piospace_freevoidpciio_piospace_free(devfs_handle_t dev, /* Device freeing space */ pciio_space_t space, /* Type of space */ iopaddr_t pciaddr, /* starting address */ size_t byte_count){ /* Range of address */ DEV_FUNC(dev, piospace_free) (dev, space, pciaddr, byte_count);}
开发者ID:hugh712,项目名称:Jollen,代码行数:9,
示例10: pciio_priority_set/* * Specify PCI arbitration priority. */pciio_priority_tpciio_priority_set(devfs_handle_t dev, pciio_priority_t device_prio){ ASSERT((device_prio == PCI_PRIO_HIGH) || (device_prio == PCI_PRIO_LOW)); return DEV_FUNC(dev, priority_set) (dev, device_prio);}
开发者ID:hugh712,项目名称:Jollen,代码行数:12,
示例11: pciio_intr_alloc/* * Allocate resources required for an interrupt as specified in intr_desc. * Return resource handle in intr_hdl. */pciio_intr_tpciio_intr_alloc(devfs_handle_t dev, /* which Crosstalk device */ device_desc_t dev_desc, /* device descriptor */ pciio_intr_line_t lines, /* INTR line(s) to attach */ devfs_handle_t owner_dev){ /* owner of this interrupt */ return (pciio_intr_t) DEV_FUNC(dev, intr_alloc) (dev, dev_desc, lines, owner_dev);}
开发者ID:hugh712,项目名称:Jollen,代码行数:13,
示例12: pciio_priority_set/* * Specify PCI arbitration priority. */pciio_priority_tpciio_priority_set(vertex_hdl_t dev, pciio_priority_t device_prio){ ASSERT((device_prio == PCI_PRIO_HIGH) || (device_prio == PCI_PRIO_LOW)); return DEV_FUNC(dev, priority_set) (dev, device_prio);}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:12,
示例13: vflash_read_buf/******************************************************************* * vflash_read_buf: * create a request message and send it via do_rpc_io * do_rpc_io waits for response or timeout ******************************************************************/static int vflash_read_buf(int partition, int offset, u_char *buffer, int numbytes){ ItcRpcMsg req; u_char *vmallocated_buf = NULL; int ret, is_buf_vmallocated;#if defined(CONFIG_MTD_BRCMNAND) uint8 * ecc_buf; uint8 * data_buf;#endif /* VMallocated (mmu translated) memory can't be used by the eCos CPU */ is_buf_vmallocated = KSEGX(buffer) == KSEG2; if (is_buf_vmallocated) { vmallocated_buf = buffer; buffer = kmalloc(numbytes, GFP_KERNEL); if (!buffer) return -EINVAL; } // Construct a request message memset((void *)&req, 0, sizeof(req)); req.dev_func = DEV_FUNC(REMOTE_FLASH_DEVICE_ID, REMOTE_READ, partition, numbytes); req.xid = read_c0_count(); req.u0 = (uint32)buffer; req.u1 = offset;#if !defined(CONFIG_MTD_BRCMNAND) bcm_cache_inv((uint32)buffer, (uint32)numbytes);#else data_buf = (uint8 *)(((BufArray *)buffer)->data_buf); if(data_buf) { bcm_cache_inv((uint32)data_buf, (uint32)numbytes); } ecc_buf = (uint8 *)(((BufArray *)buffer)->ecc_stat_buf); if(ecc_buf) { bcm_cache_inv((uint32)ecc_buf, (uint32)ecc_stat_buf_len); } bcm_cache_wback_inv((uint32)buffer, (uint32)sizeof(BufArray));#endif#if DEBUG_DQM_IO printk("%s partition %d offset %08x buffer %p size %d/n", __func__, partition, offset, buffer, numbytes);#endif ret = do_rpc_io(&req); if (is_buf_vmallocated) { memcpy(vmallocated_buf, buffer, numbytes); kfree(buffer); } return ret;}
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.0.10mp5_OpenSrc,代码行数:62,
示例14: pciio_dmamap_allocpciio_dmamap_tpciio_dmamap_alloc(devfs_handle_t dev, /* set up mappings for this device */ device_desc_t dev_desc, /* device descriptor */ size_t byte_count_max, /* max size of a mapping */ unsigned flags){ /* defined in dma.h */ return (pciio_dmamap_t) DEV_FUNC(dev, dmamap_alloc) (dev, dev_desc, byte_count_max, flags);}
开发者ID:hugh712,项目名称:Jollen,代码行数:9,
示例15: pciio_dmatrans_listalenlist_tpciio_dmatrans_list(devfs_handle_t dev, /* translate for this device */ device_desc_t dev_desc, /* device descriptor */ alenlist_t palenlist, /* system address/length list */ unsigned flags){ /* defined in dma.h */ return DEV_FUNC(dev, dmatrans_list) (dev, dev_desc, palenlist, flags);}
开发者ID:hugh712,项目名称:Jollen,代码行数:9,
示例16: xtalk_dmamap_allocxtalk_dmamap_txtalk_dmamap_alloc(vertex_hdl_t dev, /* set up mappings for this device */ device_desc_t dev_desc, /* device descriptor */ size_t byte_count_max, /* max size of a mapping */ unsigned flags){ /* defined in dma.h */ return (xtalk_dmamap_t) DEV_FUNC(dev, dmamap_alloc) (dev, dev_desc, byte_count_max, flags);}
开发者ID:romanalexander,项目名称:Trickles,代码行数:9,
示例17: xtalk_piotrans_addrcaddr_txtalk_piotrans_addr(vertex_hdl_t dev, /* translate for this device */ device_desc_t dev_desc, /* device descriptor */ iopaddr_t xtalk_addr, /* Crosstalk address */ size_t byte_count, /* map this many bytes */ unsigned flags){ /* (currently unused) */ return DEV_FUNC(dev, piotrans_addr) (dev, dev_desc, xtalk_addr, byte_count, flags);}
开发者ID:romanalexander,项目名称:Trickles,代码行数:10,
示例18: pciio_dmatrans_addriopaddr_tpciio_dmatrans_addr(devfs_handle_t dev, /* translate for this device */ device_desc_t dev_desc, /* device descriptor */ paddr_t paddr, /* system physical address */ size_t byte_count, /* length */ unsigned flags){ /* defined in dma.h */ return DEV_FUNC(dev, dmatrans_addr) (dev, dev_desc, paddr, byte_count, flags);}
开发者ID:hugh712,项目名称:Jollen,代码行数:10,
示例19: snia_pciio_endian_setpciio_endian_tsnia_pciio_endian_set(struct pci_dev *pci_dev, pciio_endian_t device_end, pciio_endian_t desired_end){ vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); return DEV_FUNC(dev, endian_set) (dev, device_end, desired_end);}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:10,
示例20: xtalk_piomap_allocxtalk_piomap_txtalk_piomap_alloc(vertex_hdl_t dev, /* set up mapping for this device */ device_desc_t dev_desc, /* device descriptor */ iopaddr_t xtalk_addr, /* map for this xtalk_addr range */ size_t byte_count, size_t byte_count_max, /* maximum size of a mapping */ unsigned flags){ /* defined in sys/pio.h */ return (xtalk_piomap_t) DEV_FUNC(dev, piomap_alloc) (dev, dev_desc, xtalk_addr, byte_count, byte_count_max, flags);}
开发者ID:romanalexander,项目名称:Trickles,代码行数:11,
示例21: pciio_piotrans_addrcaddr_tpciio_piotrans_addr(devfs_handle_t dev, /* translate for this device */ device_desc_t dev_desc, /* device descriptor */ pciio_space_t space, /* CFG, MEM, IO, or a device-decoded window */ iopaddr_t addr, /* starting address (or offset in window) */ size_t byte_count, /* map this many bytes */ unsigned flags){ /* (currently unused) */ return DEV_FUNC(dev, piotrans_addr) (dev, dev_desc, space, addr, byte_count, flags);}
开发者ID:hugh712,项目名称:Jollen,代码行数:11,
示例22: pciio_piospace_allociopaddr_tpciio_piospace_alloc(vertex_hdl_t dev, /* Device requiring space */ device_desc_t dev_desc, /* Device descriptor */ pciio_space_t space, /* MEM32/MEM64/IO */ size_t byte_count, /* Size of mapping */ size_t align){ /* Alignment needed */ if (align < PAGE_SIZE) align = PAGE_SIZE; return DEV_FUNC(dev, piospace_alloc) (dev, dev_desc, space, byte_count, align);}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:12,
示例23: pciio_piomap_allocpciio_piomap_tpciio_piomap_alloc(devfs_handle_t dev, /* set up mapping for this device */ device_desc_t dev_desc, /* device descriptor */ pciio_space_t space, /* CFG, MEM, IO, or a device-decoded window */ iopaddr_t addr, /* lowest address (or offset in window) */ size_t byte_count, /* size of region containing our mappings */ size_t byte_count_max, /* maximum size of a mapping */ unsigned flags){ /* defined in sys/pio.h */ return (pciio_piomap_t) DEV_FUNC(dev, piomap_alloc) (dev, dev_desc, space, addr, byte_count, byte_count_max, flags);}
开发者ID:hugh712,项目名称:Jollen,代码行数:12,
示例24: pciio_piospace_allociopaddr_tpciio_piospace_alloc(devfs_handle_t dev, /* Device requiring space */ device_desc_t dev_desc, /* Device descriptor */ pciio_space_t space, /* MEM32/MEM64/IO */ size_t byte_count, /* Size of mapping */ size_t align){ /* Alignment needed */ if (align < NBPP) align = NBPP; return DEV_FUNC(dev, piospace_alloc) (dev, dev_desc, space, byte_count, align);}
开发者ID:hugh712,项目名称:Jollen,代码行数:12,
示例25: vflash_block_markbadstatic int vflash_block_markbad(int partition, int offset){ ItcRpcMsg req; // Construct a request message memset((void *)&req, 0, sizeof(req)); req.dev_func = DEV_FUNC(REMOTE_FLASH_DEVICE_ID, REMOTE_BLOCK_MARKBAD, partition, 0); req.xid = read_c0_count(); req.u0 = 0; req.u1 = offset;#if DEBUG_DQM_IO printk("%s partition %d offset %08x/n", __func__, partition, offset);#endif return do_rpc_io(&req);}
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.0.10mp5_OpenSrc,代码行数:16,
示例26: snia_pciio_dmamap_allocpciio_dmamap_tsnia_pciio_dmamap_alloc(struct pci_dev *pci_dev, /* set up mappings for this device */ device_desc_t dev_desc, /* device descriptor */ size_t byte_count_max, /* max size of a mapping */ unsigned flags){ /* defined in dma.h */ vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); /* * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be * set. Otherwise, it must not be set. This applies to SN1 and SN2. */ return (pciio_dmamap_t) DEV_FUNC(dev, dmamap_alloc) (dev, dev_desc, byte_count_max, flags & ~PCIIO_BYTE_STREAM);}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:16,
示例27: snia_pciio_dmatrans_addriopaddr_tsnia_pciio_dmatrans_addr(struct pci_dev *pci_dev, /* translate for this device */ device_desc_t dev_desc, /* device descriptor */ paddr_t paddr, /* system physical address */ size_t byte_count, /* length */ unsigned flags){ /* defined in dma.h */ vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); /* * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be * set. Otherwise, it must not be set. This applies to SN1 and SN2. */ return DEV_FUNC(dev, dmatrans_addr) (dev, dev_desc, paddr, byte_count, flags & ~PCIIO_BYTE_STREAM);}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:17,
示例28: vflash_get_device_infostatic int vflash_get_device_info(vflash_info_t *info){ ItcRpcMsg req;#if DEBUG_DQM_IO printk("-->%s info=%p/n", __func__, (void*)info);#endif // Construct a request message memset((void *)&req, 0, sizeof(req)); req.dev_func = DEV_FUNC(REMOTE_FLASH_DEVICE_ID, REMOTE_GET_DEV_INFO, LINUX_KERNEL_ROOTFS_PARTITION, sizeof(struct vflash_info_t)); req.xid = read_c0_count(); req.u0 = (uint32)info; req.u1 = sizeof(struct vflash_info_t); bcm_cache_inv((uint32)info, sizeof(struct vflash_info_t)); return do_rpc_io(&req);}
开发者ID:tch-opensrc,项目名称:TC72XX_LxG1.0.10mp5_OpenSrc,代码行数:19,
注:本文中的DEV_FUNC函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DEXIT函数代码示例 C++ DEV_ERR函数代码示例 |