diff options
Diffstat (limited to 'xml')
-rw-r--r-- | xml/CMakeLists.txt | 5 | ||||
-rw-r--r-- | xml/devices.xsd | 24 | ||||
-rw-r--r-- | xml/devices/testdevice.xml | 4 | ||||
-rw-r--r-- | xml/test/camera.xml | 2 | ||||
-rw-r--r-- | xml/test/dma.xml | 2 |
5 files changed, 35 insertions, 2 deletions
diff --git a/xml/CMakeLists.txt b/xml/CMakeLists.txt index a7ac800..8848c79 100644 --- a/xml/CMakeLists.txt +++ b/xml/CMakeLists.txt @@ -1,3 +1,8 @@ + +install(FILES devices.xsd + DESTINATION ${PCILIB_DATA_DIR} +) + install(FILES model.xsd references.xsd types.xsd DESTINATION ${PCILIB_MODEL_DIR} ) diff --git a/xml/devices.xsd b/xml/devices.xsd new file mode 100644 index 0000000..27e9b39 --- /dev/null +++ b/xml/devices.xsd @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:include schemaLocation="types.xsd"/> + + <xsd:simpleType name="hex16_t"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([a-fA-F0-9]){1,4}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="device_t"> + <xsd:attribute name="vendor" type="hex16_t" /> + <xsd:attribute name="device" type="hex16_t" /> + <xsd:attribute name="model" type="xsd:string" /> + </xsd:complexType> + + <xsd:element name="devices"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="device" type="device_t" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> +</xsd:schema> diff --git a/xml/devices/testdevice.xml b/xml/devices/testdevice.xml new file mode 100644 index 0000000..d7f7d11 --- /dev/null +++ b/xml/devices/testdevice.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<devices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <device vendor="0000" device="0" model="test"/> +</devices> diff --git a/xml/test/camera.xml b/xml/test/camera.xml index 6568f17..882963c 100644 --- a/xml/test/camera.xml +++ b/xml/test/camera.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x9000" write_address="0x9000" word_size="32" endianess="little" format="0x%lx" name="fpga" description="IPECamera Registers"> + <bank size="0x0200" protocol="software_registers" read_address="0x9000" write_address="0x9000" word_size="32" endianess="little" format="0x%lx" name="fpga" description="IPECamera Registers"> <register address="0x00" offset="0" size="32" default="0" rwmask="0" mode="RW" name="spi_conf_input"/> <register address="0x10" offset="0" size="32" default="0" rwmask="0" mode="R" name="spi_conf_output"/> <register address="0x20" offset="0" size="32" default="0" rwmask="0" mode="RW" name="spi_clk_speed"/> diff --git a/xml/test/dma.xml b/xml/test/dma.xml index 1d20725..582a7a3 100644 --- a/xml/test/dma.xml +++ b/xml/test/dma.xml @@ -1,4 +1,4 @@ <?xml version="1.0"?> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x0" write_address="0x0" word_size="32" endianess="little" format="0x%lx" name="dma" description="DMA Registers"/> + <bank size="0x0200" protocol="software_registers" read_address="0x0" write_address="0x0" word_size="32" endianess="little" format="0x%lx" name="dma" description="DMA Registers"/> </model> |