aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gencfg/schema/common
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-15 15:58:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-15 15:58:20 +0000
commit7c68ef157d009f9932ac47ba21ba5d74e321623f (patch)
tree6c2442ca44cd090656ec3059ffb959f3d747e18d /tools/gencfg/schema/common
parent076746af63d317f8e96766b9137a65679f60463f (diff)
parente0d850113610f3efa0c0ac4946901f683e5e7332 (diff)
downloadChibiOS-7c68ef157d009f9932ac47ba21ba5d74e321623f.tar.gz
ChibiOS-7c68ef157d009f9932ac47ba21ba5d74e321623f.tar.bz2
ChibiOS-7c68ef157d009f9932ac47ba21ba5d74e321623f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@5854 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'tools/gencfg/schema/common')
-rw-r--r--tools/gencfg/schema/common/doc.xsd108
-rw-r--r--tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd214
2 files changed, 322 insertions, 0 deletions
diff --git a/tools/gencfg/schema/common/doc.xsd b/tools/gencfg/schema/common/doc.xsd
new file mode 100644
index 000000000..e5be361d5
--- /dev/null
+++ b/tools/gencfg/schema/common/doc.xsd
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema elementFormDefault="qualified"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="NamedItem">
+ <xs:annotation>
+ <xs:documentation>
+ >Generic item with optional name and brief
+ description
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="name" maxOccurs="1" minOccurs="1">
+ <xs:annotation>
+ <xs:documentation>Name of the object.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ <xs:pattern value="\w[\w\d_]*"></xs:pattern>
+ <xs:minLength value="1"></xs:minLength>
+ <xs:maxLength value="24"></xs:maxLength>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="DocumentedItem">
+ <xs:annotation>
+ <xs:documentation>>Something that can have a detailed description
+ attached
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="NamedItem">
+ <xs:sequence>
+ <xs:element name="brief" maxOccurs="1" minOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ Brief description of the object.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:minLength value="0"></xs:minLength>
+ <xs:maxLength value="72"></xs:maxLength>
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="details" maxOccurs="1" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Object documentation as text, does not preserve
+ formatting.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="pre" maxOccurs="unbounded" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Object pre-requisites as text, does not preserve
+ formatting.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="post" maxOccurs="unbounded" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Object post-requisites as text, does not preserve
+ formatting.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="note" maxOccurs="unbounded" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Object note as text, does not preserve formatting.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd b/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
new file mode 100644
index 000000000..c3ac59487
--- /dev/null
+++ b/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema
+ elementFormDefault="qualified"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="STM32GPIOv2PortType">
+
+ <xs:sequence>
+ <xs:element
+ name="pin0"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin1"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin2"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin3"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin4"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin5"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin6"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin7"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin8"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin9"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin10"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin11"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin12"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin13"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin14"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ <xs:element
+ name="pin15"
+ type="STM32GPIOv2PinType"
+ maxOccurs="1"
+ minOccurs="1"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="STM32GPIOv2PinType">
+ <xs:annotation>
+ <xs:documentation>
+ Object representing an STM32 pin for the GPIOv2
+ peripheral.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute
+ name="ID"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>Pin identifier, used to generate a #define with the
+ pin name.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="\w?[\w\d_]*"></xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Mode"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Pin mode, as defined for MODER register.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Input"></xs:enumeration>
+ <xs:enumeration value="Output"></xs:enumeration>
+ <xs:enumeration value="Alternate"></xs:enumeration>
+ <xs:enumeration value="Analog"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Level"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>Logic level for the ODR register.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="High"></xs:enumeration>
+ <xs:enumeration value="Low"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Speed"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Pin speed as defined in SPEEDR register.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Minimum"></xs:enumeration>
+ <xs:enumeration value="Low"></xs:enumeration>
+ <xs:enumeration value="High"></xs:enumeration>
+ <xs:enumeration value="Maximum"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Type"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Pin type as defined in TYPER register.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PushPull"></xs:enumeration>
+ <xs:enumeration value="OpenDrain"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Resistor"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Pin pull-up/down resistor as defined in PUDR register.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Floating"></xs:enumeration>
+ <xs:enumeration value="PullUp"></xs:enumeration>
+ <xs:enumeration value="PullDown"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="Alternate"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Pin alternate function number, only valid if
+ "Alternate" is selected
+ in the Mode attribute.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:minInclusive value="0"></xs:minInclusive>
+ <xs:maxInclusive value="15"></xs:maxInclusive>
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+</xs:schema>