aboutsummaryrefslogtreecommitdiffstats
path: root/tools/eclipse/config_wizard/resources/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
blob: c3ac5948745d2136490fd4b24e2c6b546dc80c14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
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>