• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ qemu_put_be32函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中qemu_put_be32函数的典型用法代码示例。如果您正苦于以下问题:C++ qemu_put_be32函数的具体用法?C++ qemu_put_be32怎么用?C++ qemu_put_be32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了qemu_put_be32函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: pxa2xx_lcdc_save

static void pxa2xx_lcdc_save(QEMUFile *f, void *opaque)
{
    PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
    int i;

    qemu_put_be32(f, s->irqlevel);
    qemu_put_be32(f, s->transp);

    for (i = 0; i < 6; i ++)
        qemu_put_be32s(f, &s->control[i]);
    for (i = 0; i < 2; i ++)
        qemu_put_be32s(f, &s->status[i]);
    for (i = 0; i < 2; i ++)
        qemu_put_be32s(f, &s->ovl1c[i]);
    for (i = 0; i < 2; i ++)
        qemu_put_be32s(f, &s->ovl2c[i]);
    qemu_put_be32s(f, &s->ccr);
    qemu_put_be32s(f, &s->cmdcr);
    qemu_put_be32s(f, &s->trgbr);
    qemu_put_be32s(f, &s->tcr);
    qemu_put_be32s(f, &s->liidr);
    qemu_put_8s(f, &s->bscntr);

    for (i = 0; i < 7; i ++) {
        qemu_put_betl(f, s->dma_ch[i].branch);
        qemu_put_byte(f, s->dma_ch[i].up);
        qemu_put_buffer(f, s->dma_ch[i].pbuffer, sizeof(s->dma_ch[i].pbuffer));

        qemu_put_betl(f, s->dma_ch[i].descriptor);
        qemu_put_betl(f, s->dma_ch[i].source);
        qemu_put_be32s(f, &s->dma_ch[i].id);
        qemu_put_be32s(f, &s->dma_ch[i].command);
    }
}
开发者ID:ESOS-Lab,项目名称:VSSIM,代码行数:34,代码来源:pxa2xx_lcd.c


示例2: virtio_audio_save

static void virtio_audio_save(QEMUFile *f, void *opaque)
{
    VirtIOAudio *s = opaque;
    VirtIOAudioStream *stream;
    int i;
    int mode;

    virtio_save(&s->vdev, f);

    for (i = 0; i < NUM_STREAMS; i++) {
        stream = &s->stream[i];

        if (stream->in_voice) {
            mode = 2;
            if (AUD_is_active_in(stream->in_voice))
                mode |= 1;
        } else if (stream->out_voice) {
            mode = 4;
            if (AUD_is_active_out(stream->out_voice))
                mode |= 1;
        } else {
            mode = 0;
        }
        qemu_put_byte(f, mode);
        qemu_put_byte(f, stream->fmt.endianness);
        qemu_put_be16(f, stream->fmt.nchannels);
        qemu_put_be32(f, stream->fmt.fmt);
        qemu_put_be32(f, stream->fmt.freq);
    }
}
开发者ID:cdaffara,项目名称:symbian-oss_adapt,代码行数:30,代码来源:virtio-audio.c


示例3: boot_property_save_property

static int
boot_property_save_property( QEMUFile  *f, BootProperty  *p )
{

    char *split = strchr(p->property, '=');
    if (split == NULL) {
        D("%s: save failed: illegal key/value pair \"%s\" (missing '=')\n",
          __FUNCTION__, p->property);
        qemu_file_set_error(f);
        return -1;
    }

    *split = '\0';  

    uint32_t key_buf_len = (split - p->property) + 1; 
    qemu_put_be32(f, key_buf_len);
    qemu_put_buffer(f, (uint8_t*) p->property, key_buf_len);

    uint32_t value_buf_len = p->length - key_buf_len + 1; 
    qemu_put_be32(f, value_buf_len);
    qemu_put_buffer(f, (uint8_t*) split + 1, value_buf_len);

    *split = '=';  

    return 0;
}
开发者ID:qtekfun,项目名称:htcDesire820Kernel,代码行数:26,代码来源:boot-properties.c


示例4: rtc_save_td

static void rtc_save_td(QEMUFile *f, void *opaque)
{
    RTCState *s = opaque;

    qemu_put_be32(f, s->irq_coalesced);
    qemu_put_be32(f, s->period);
}
开发者ID:ddk50,项目名称:ibkvm,代码行数:7,代码来源:mc146818rtc.c


示例5: cpu_put_seg

static void cpu_put_seg(QEMUFile *f, SegmentCache *dt)
{
    qemu_put_be32(f, dt->selector);
    qemu_put_betl(f, dt->base);
    qemu_put_be32(f, dt->limit);
    qemu_put_be32(f, dt->flags);
}
开发者ID:CPFL,项目名称:gxen,代码行数:7,代码来源:machine.c


示例6: virtio_balloon_save_device

static void virtio_balloon_save_device(VirtIODevice *vdev, QEMUFile *f)
{
    VirtIOBalloon *s = VIRTIO_BALLOON(vdev);

    qemu_put_be32(f, s->num_pages);
    qemu_put_be32(f, s->actual);
}
开发者ID:01org,项目名称:qemu-lite,代码行数:7,代码来源:virtio-balloon.c


示例7: boot_property_save_property

/* Saves a single BootProperty to file.
 */
static int
boot_property_save_property( QEMUFile  *f, BootProperty  *p )
{
    /* split in key and value, so we can re-use boot_property_add (and its
     * sanity checks) when loading
     */

    char *split = strchr(p->property, '=');
    if (split == NULL) {
        D("%s: save failed: illegal key/value pair \"%s\" (missing '=')\n",
          __FUNCTION__, p->property);
        qemu_file_set_error(f, -EINVAL);
        return -1;
    }

    *split = '\0';  /* p->property is now "<key>\0<value>\0" */

    uint32_t key_buf_len = (split - p->property) + 1; // +1: '\0' terminator
    qemu_put_be32(f, key_buf_len);
    qemu_put_buffer(f, (uint8_t*) p->property, key_buf_len);

    uint32_t value_buf_len = p->length - key_buf_len + 1; // +1: '\0' terminator
    qemu_put_be32(f, value_buf_len);
    qemu_put_buffer(f, (uint8_t*) split + 1, value_buf_len);

    *split = '=';  /* restore property to "<key>=<value>\0" */

    return 0;
}
开发者ID:Dorahe,项目名称:platform_external_qemu,代码行数:31,代码来源:boot-properties.c


示例8: virtio_save

void virtio_save(VirtIODevice *vdev, QEMUFile *f)
{
    int i;

    if (vdev->binding->save_config)
        vdev->binding->save_config(vdev->binding_opaque, f);

    qemu_put_8s(f, &vdev->status);
    qemu_put_8s(f, &vdev->isr);
    qemu_put_be16s(f, &vdev->queue_sel);
    qemu_put_be32s(f, &vdev->guest_features);
    qemu_put_be32(f, vdev->config_len);
    qemu_put_buffer(f, vdev->config, vdev->config_len);

    for (i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) {
        if (vdev->vq[i].vring.num == 0)
            break;
    }

    qemu_put_be32(f, i);

    for (i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) {
        if (vdev->vq[i].vring.num == 0)
            break;

        qemu_put_be32(f, vdev->vq[i].vring.num);
        qemu_put_be64(f, vdev->vq[i].pa);
        qemu_put_be16s(f, &vdev->vq[i].last_avail_idx);
        if (vdev->binding->save_queue)
            vdev->binding->save_queue(vdev->binding_opaque, i, f);
    }
}
开发者ID:iggy,项目名称:qemu,代码行数:32,代码来源:virtio.c


示例9: goldfish_pipe_save

static void
goldfish_pipe_save( QEMUFile* file, void* opaque )
{
    PipeDevice* dev = opaque;
    Pipe* pipe;

    qemu_put_be32(file, dev->address);
    qemu_put_be32(file, dev->size);
    qemu_put_be32(file, dev->status);
    qemu_put_be32(file, dev->channel);
    qemu_put_be32(file, dev->wakes);
    qemu_put_be64(file, dev->params_addr);

    
    int count = 0;
    for ( pipe = dev->pipes; pipe; pipe = pipe->next )
        count++;

    qemu_put_sbe32(file, count);

    
    for ( pipe = dev->pipes; pipe; pipe = pipe->next ) {
        pipe_save(pipe, file);
    }
}
开发者ID:qtekfun,项目名称:htcDesire820Kernel,代码行数:25,代码来源:goldfish_pipe.c


示例10: pxa2xx_timer_save

static void pxa2xx_timer_save(QEMUFile *f, void *opaque)
{
    pxa2xx_timer_info *s = (pxa2xx_timer_info *) opaque;
    int i;

    qemu_put_be32s(f, &s->clock);
    qemu_put_be32s(f, &s->oldclock);
    qemu_put_be64s(f, &s->lastload);

    for (i = 0; i < 4; i ++) {
        qemu_put_be32s(f, &s->timer[i].value);
        qemu_put_be32(f, s->timer[i].level);
    }
    if (s->tm4)
        for (i = 0; i < 8; i ++) {
            qemu_put_be32s(f, &s->tm4[i].tm.value);
            qemu_put_be32(f, s->tm4[i].tm.level);
            qemu_put_be32s(f, &s->tm4[i].oldclock);
            qemu_put_be32s(f, &s->tm4[i].clock);
            qemu_put_be64s(f, &s->tm4[i].lastload);
            qemu_put_be32s(f, &s->tm4[i].freq);
            qemu_put_be32s(f, &s->tm4[i].control);
        }

    qemu_put_be32s(f, &s->events);
    qemu_put_be32s(f, &s->irq_enabled);
    qemu_put_be32s(f, &s->reset3);
    qemu_put_be32s(f, &s->snapshot);
}
开发者ID:hackndev,项目名称:qemu,代码行数:29,代码来源:pxa2xx_timer.c


示例11: virtio_mmio_save_config

static void virtio_mmio_save_config(DeviceState *opaque, QEMUFile *f)
{
    VirtIOMMIOProxy *proxy = VIRTIO_MMIO(opaque);

    qemu_put_be32(f, proxy->host_features_sel);
    qemu_put_be32(f, proxy->guest_features_sel);
    qemu_put_be32(f, proxy->guest_page_shift);
}
开发者ID:patricksjackson,项目名称:qemu,代码行数:8,代码来源:virtio-mmio.c


示例12: arm_timer_save

static void arm_timer_save(QEMUFile *f, void *opaque)
{
    arm_timer_state *s = (arm_timer_state *)opaque;
    qemu_put_be32(f, s->control);
    qemu_put_be32(f, s->limit);
    qemu_put_be32(f, s->int_level);
    qemu_put_ptimer(f, s->timer);
}
开发者ID:astarasikov,项目名称:qemu,代码行数:8,代码来源:arm_timer.c


示例13: goldfish_audio_buff_put

static void
goldfish_audio_buff_put( struct goldfish_audio_buff*  b, QEMUFile*  f )
{
    qemu_put_be32(f, b->address );
    qemu_put_be32(f, b->length );
    qemu_put_be32(f, b->offset );
    qemu_put_buffer(f, b->data, b->length );
}
开发者ID:0-14N,项目名称:NDroid,代码行数:8,代码来源:goldfish_audio.c


示例14: omap3_l4ta_save_state

static void omap3_l4ta_save_state(QEMUFile *f, void *opaque)
{
    struct omap_target_agent_s *s = (struct omap_target_agent_s *)opaque;

    qemu_put_be32(f, s->control);
    qemu_put_be32(f, s->control_h);
    qemu_put_be32(f, s->status);
}
开发者ID:XVilka,项目名称:qemu,代码行数:8,代码来源:omap_l4.c


示例15: ps2_common_save

static void ps2_common_save (QEMUFile *f, PS2State *s)
{
    qemu_put_be32 (f, s->write_cmd);
    qemu_put_be32 (f, s->queue.rptr);
    qemu_put_be32 (f, s->queue.wptr);
    qemu_put_be32 (f, s->queue.count);
    qemu_put_buffer (f, s->queue.data, sizeof (s->queue.data));
}
开发者ID:SymbianSource,项目名称:oss.FCL.interim.QEMU,代码行数:8,代码来源:ps2.c


示例16: ps2_kbd_save

static void ps2_kbd_save(QEMUFile* f, void* opaque)
{
    PS2KbdState *s = (PS2KbdState*)opaque;

    ps2_common_save (f, &s->common);
    qemu_put_be32(f, s->scan_enabled);
    qemu_put_be32(f, s->translate);
}
开发者ID:ducdung,项目名称:Detector,代码行数:8,代码来源:ps2.c


示例17: virtio_balloon_save

static void virtio_balloon_save(QEMUFile *f, void *opaque)
{
    VirtIOBalloon *s = opaque;

    virtio_save(&s->vdev, f);

    qemu_put_be32(f, s->num_pages);
    qemu_put_be32(f, s->actual);
}
开发者ID:frenchleaf,项目名称:qemu,代码行数:9,代码来源:virtio-balloon.c


示例18: goldfish_tty_save

static void  goldfish_tty_save(QEMUFile*  f, void*  opaque)
{
    struct tty_state*  s = opaque;

    qemu_put_be32( f, s->ptr );
    qemu_put_be32( f, s->ptr_len );
    qemu_put_byte( f, s->ready );
    qemu_put_byte( f, s->data_count );
    qemu_put_buffer( f, s->data, s->data_count );
}
开发者ID:ecit241,项目名称:qemu-android,代码行数:10,代码来源:tty.c


示例19: virtio_balloon_save

static void virtio_balloon_save(QEMUFile *f, void *opaque)
{
    VirtIOBalloon *s = VIRTIO_BALLOON(opaque);
    VirtIODevice *vdev = VIRTIO_DEVICE(s);

    virtio_save(vdev, f);

    qemu_put_be32(f, s->num_pages);
    qemu_put_be32(f, s->actual);
}
开发者ID:Kozzi11,项目名称:qemu,代码行数:10,代码来源:virtio-balloon.c


示例20: syborg_int_save

static void syborg_int_save(QEMUFile *f, void *opaque)
{
    SyborgIntState *s = (SyborgIntState *)opaque;
    int i;

    qemu_put_be32(f, s->num_irqs);
    qemu_put_be32(f, s->pending_count);
    for (i = 0; i < s->num_irqs; i++) {
        qemu_put_be32(f, s->flags[i].enabled
                         | ((unsigned)s->flags[i].level << 1));
    }
}
开发者ID:stweil,项目名称:qemu,代码行数:12,代码来源:syborg_interrupt.c



注:本文中的qemu_put_be32函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ qemu_put_buffer函数代码示例发布时间:2022-05-30
下一篇:
C++ qemu_opts_del函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap