author | Masaki Hosaka <hosaka@isb.co.jp> |
Wed, 24 Mar 2010 13:46:59 +0900 | |
changeset 52 | 0dfaca43d90e |
permissions | -rw-r--r-- |
52
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
1 |
import qemu |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
2 |
import os |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
3 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
4 |
class syborg_usbtest(qemu.devclass): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
5 |
REG_ID = 0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
6 |
REG_INT_ENABLE = 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
7 |
REG_DATA_TYPE = 2 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
8 |
REG_DMA_ADDR = 3 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
9 |
REG_DMA_SIZE = 4 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
10 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
11 |
def loadIMG(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
12 |
self.buf = open('test1.BMP','rb').read() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
13 |
self.bufC = open('test.BMP','rb').read() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
14 |
self.bmpsize = os.path.getsize('test1.BMP') |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
15 |
self.Csize = os.path.getsize('test.BMP') |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
16 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
17 |
def timertick(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
18 |
if self.cha==0: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
19 |
compSize=self.bmpsize |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
20 |
buf=self.buf |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
21 |
self.cha=1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
22 |
else: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
23 |
compSize=self.Csize |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
24 |
buf=self.bufC |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
25 |
self.cha=0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
26 |
if self.dma_size < compSize: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
27 |
self.dma_size = 0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
28 |
else: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
29 |
for x in buf: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
30 |
ch = ord(x) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
31 |
if self.dma_size > 0: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
32 |
self.dma_writeb(self.dma_addr, ch) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
33 |
self.dma_addr += 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
34 |
self.dma_size -= 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
35 |
self.set_irq_level(0, self.int_enable) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
36 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
37 |
def timer_on(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
38 |
self.ptimer = qemu.ptimer(self.timertick, 1) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
39 |
self.ptimer.run(0) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
40 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
41 |
def timer_off(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
42 |
self.ptimer.stop() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
43 |
self.set_irq_level(0, self.int_enable) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
44 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
45 |
def capturedata(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
46 |
if self.dma_size < self.Csize: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
47 |
self.dma_size = 0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
48 |
else: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
49 |
for x in self.bufC: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
50 |
ch = ord(x) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
51 |
if self.dma_size > 0: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
52 |
self.dma_writeb(self.dma_addr, ch) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
53 |
self.dma_addr += 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
54 |
self.dma_size -= 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
55 |
self.set_irq_level(0, self.int_enable) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
56 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
57 |
def create(self): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
58 |
self.int_enable = 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
59 |
self.dma_addr = 0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
60 |
self.dma_size =0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
61 |
self.cha=0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
62 |
self.loadIMG() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
63 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
64 |
def write_reg(self, offset, value): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
65 |
offset >>= 2 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
66 |
if offset==self.REG_INT_ENABLE: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
67 |
self.int_enable=value |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
68 |
if value==1: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
69 |
if self.data_type==0: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
70 |
self.timer_on() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
71 |
elif self.data_type==1: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
72 |
self.capturedata() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
73 |
else: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
74 |
if self.data_type==0: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
75 |
self.timer_off() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
76 |
elif self.data_type==1: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
77 |
self.set_irq_level(0, self.int_enable) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
78 |
elif offset == self.REG_DATA_TYPE: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
79 |
self.data_type = value |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
80 |
elif offset == self.REG_DMA_ADDR: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
81 |
self.dma_addr = value |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
82 |
elif offset == self.REG_DMA_SIZE: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
83 |
self.dma_size = value |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
84 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
85 |
def read_reg(self, offset): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
86 |
offset >>= 2 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
87 |
if offset == self.REG_ID: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
88 |
return 0xc600f000 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
89 |
elif offset == self.REG_INT_ENABLE: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
90 |
return self.int_enable |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
91 |
elif offset == self.REG_DMA_ADDR: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
92 |
return self.dma_addr |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
93 |
elif offset == self.REG_DMA_SIZE: |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
94 |
return self.dma_size |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
95 |
return 0 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
96 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
97 |
def save(self, f): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
98 |
f.put_u32(self.int_enable) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
99 |
f.put_u32(self.dma_addr) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
100 |
f.put_u32(self.dma_size) |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
101 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
102 |
def load(self, f): |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
103 |
self.int_enable = f.get_u32() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
104 |
self.dma_addr = f.get_u32() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
105 |
self.dma_size = f.get_u32() |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
106 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
107 |
# Device class properties |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
108 |
regions = [qemu.ioregion(0x1000, readl=read_reg, writel=write_reg)] |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
109 |
irqs = 1 |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
110 |
name = "syborg,usbtest" |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
111 |
properties={"chardev":None} |
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
112 |
|
0dfaca43d90e
Added web camera drivers and QEMU plug-in for obtaining and transferring dummy data.
Masaki Hosaka <hosaka@isb.co.jp>
parents:
diff
changeset
|
113 |
qemu.register_device(syborg_usbtest) |