aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-07-08 13:21:00 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-07-08 13:21:00 +0000
commit4399d50df58675f8a32abb338f6cbe721d0296bf (patch)
tree74a0cea85145c7b2ca0c0349ce56a13365edf3d1
parent10703d315c315361b47a7434a9d54175542af56b (diff)
downloadChibiOS-4399d50df58675f8a32abb338f6cbe721d0296bf.tar.gz
ChibiOS-4399d50df58675f8a32abb338f6cbe721d0296bf.tar.bz2
ChibiOS-4399d50df58675f8a32abb338f6cbe721d0296bf.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4436 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--tools/gencfg/processors/boards/stm32f4xx/datamodel/stm32f4board.xml148
-rw-r--r--tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl152
-rw-r--r--tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd223
3 files changed, 461 insertions, 62 deletions
diff --git a/tools/gencfg/processors/boards/stm32f4xx/datamodel/stm32f4board.xml b/tools/gencfg/processors/boards/stm32f4xx/datamodel/stm32f4board.xml
index bd5e1bdb0..88113fea3 100644
--- a/tools/gencfg/processors/boards/stm32f4xx/datamodel/stm32f4board.xml
+++ b/tools/gencfg/processors/boards/stm32f4xx/datamodel/stm32f4board.xml
@@ -14,8 +14,9 @@
<ports>
<GPIOA>
<pin0
- ID="PIPPO"
+ ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -23,6 +24,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -30,6 +32,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -37,6 +40,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -44,6 +48,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -51,6 +56,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -58,6 +64,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -65,6 +72,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -72,6 +80,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -79,6 +88,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -86,6 +96,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -93,6 +104,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -100,6 +112,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -107,6 +120,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -114,13 +128,15 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
Alternate="0" />
<pin15
- ID="PIPPO"
+ ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -130,6 +146,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -137,6 +154,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -144,6 +162,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -151,6 +170,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -158,6 +178,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -165,6 +186,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -172,6 +194,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -179,6 +202,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -186,6 +210,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -193,6 +218,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -200,6 +226,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -207,6 +234,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -214,6 +242,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -221,6 +250,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -228,6 +258,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -235,6 +266,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -244,6 +276,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -251,6 +284,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -258,6 +292,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -265,6 +300,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -272,6 +308,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -279,6 +316,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -286,6 +324,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -293,6 +332,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -300,6 +340,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -307,6 +348,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -314,6 +356,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -321,6 +364,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -328,6 +372,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -335,6 +380,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -342,6 +388,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -349,6 +396,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -358,6 +406,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -365,6 +414,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -372,6 +422,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -379,6 +430,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -386,6 +438,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -393,6 +446,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -400,6 +454,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -407,6 +462,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -414,6 +470,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -421,6 +478,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -428,6 +486,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -435,6 +494,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -442,6 +502,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -449,6 +510,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -456,6 +518,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -463,6 +526,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -472,6 +536,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -479,6 +544,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -486,6 +552,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -493,6 +560,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -500,6 +568,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -507,6 +576,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -514,6 +584,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -521,6 +592,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -528,6 +600,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -535,6 +608,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -542,6 +616,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -549,6 +624,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -556,6 +632,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -563,6 +640,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -570,6 +648,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -577,6 +656,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -586,6 +666,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -593,6 +674,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -600,6 +682,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -607,6 +690,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -614,6 +698,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -621,6 +706,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -628,6 +714,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -635,6 +722,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -642,6 +730,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -649,6 +738,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -656,6 +746,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -663,6 +754,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -670,6 +762,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -677,6 +770,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -684,6 +778,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -691,6 +786,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -700,6 +796,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -707,6 +804,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -714,6 +812,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -721,6 +820,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -728,6 +828,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -735,6 +836,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -742,6 +844,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -749,6 +852,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -756,6 +860,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -763,6 +868,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -770,6 +876,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -777,6 +884,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -784,6 +892,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -791,6 +900,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -798,6 +908,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -805,6 +916,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -814,6 +926,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -821,6 +934,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -828,6 +942,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -835,6 +950,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -842,6 +958,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -849,6 +966,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -856,6 +974,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -863,6 +982,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -870,6 +990,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -877,6 +998,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -884,6 +1006,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -891,6 +1014,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -898,6 +1022,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -905,6 +1030,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -912,6 +1038,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -919,6 +1046,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -928,6 +1056,7 @@
<pin0
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -935,6 +1064,7 @@
<pin1
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -942,6 +1072,7 @@
<pin2
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -949,6 +1080,7 @@
<pin3
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -956,6 +1088,7 @@
<pin4
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -963,6 +1096,7 @@
<pin5
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -970,6 +1104,7 @@
<pin6
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -977,6 +1112,7 @@
<pin7
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -984,6 +1120,7 @@
<pin8
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -991,6 +1128,7 @@
<pin9
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -998,6 +1136,7 @@
<pin10
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -1005,6 +1144,7 @@
<pin11
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -1012,6 +1152,7 @@
<pin12
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -1019,6 +1160,7 @@
<pin13
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -1026,6 +1168,7 @@
<pin14
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
@@ -1033,6 +1176,7 @@
<pin15
ID=""
Type="PushPull"
+ Level="High"
Speed="Minimum"
Resistor="Floating"
Mode="Input"
diff --git a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl
index 0873c9c55..9127e0a10 100644
--- a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl
+++ b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl
@@ -107,6 +107,8 @@
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2))
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2))
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2))
+#define PIN_ODR_LOW(n) (0U << (n))
+#define PIN_ODR_HIGH(n) (1U << (n))
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
#define PIN_OSPEED_2M(n) (0U << ((n) * 2))
@@ -149,7 +151,9 @@
[#assign pinidx = pinidx + 1 /]
[/#list]
*/
- [#-- Generating MODER register value.--]
+ [#--
+ -- Generating MODER register value.
+ --]
[#assign pinidx = 0 /]
[#list port.* as pin]
[#assign pin_name = pin?node_name?upper_case /]
@@ -169,10 +173,8 @@
[/#if]
[#if pinidx == 0]
[#assign line = "#define VAL_" + port_name + "_MODER (" + out /]
-[#--#define VAL_${port_name}_MODER (${out?right_pad(30, " ")}[#rt]--]
[#else]
[#assign line = " " + out /]
-[#-- ${out?right_pad(30, " ")}[#rt]--]
[/#if]
[#if pinidx < 15]
${(line + " |")?right_pad(76, " ") + "\\"}
@@ -181,6 +183,150 @@ ${line + ")"}
[/#if]
[#assign pinidx = pinidx + 1 /]
[/#list]
+ [#--
+ -- Generating OTYPER register value.
+ --]
+ [#assign pinidx = 0 /]
+ [#list port.* as pin]
+ [#assign pin_name = pin?node_name?upper_case /]
+ [#assign name = pin.@ID[0]?string?trim /]
+ [#if name?length == 0]
+ [#assign name = pin_name /]
+ [/#if]
+ [#assign type = pin.@Type[0] /]
+ [#if type == "PushPull"]
+ [#assign out = "PIN_OTYPE_PUSHPULL(" + port_name + "_" + pin_name + ")" /]
+ [#else]
+ [#assign out = "PIN_OTYPE_OPENDRAIN(" + port_name + "_" + pin_name + ")" /]
+ [/#if]
+ [#if pinidx == 0]
+ [#assign line = "#define VAL_" + port_name + "_OTYPER (" + out /]
+ [#else]
+ [#assign line = " " + out /]
+ [/#if]
+ [#if pinidx < 15]
+${(line + " |")?right_pad(76, " ") + "\\"}
+ [#else]
+${line + ")"}
+ [/#if]
+ [#assign pinidx = pinidx + 1 /]
+ [/#list]
+ [#--
+ -- Generating SPEEDR register value.
+ --]
+ [#assign pinidx = 0 /]
+ [#list port.* as pin]
+ [#assign pin_name = pin?node_name?upper_case /]
+ [#assign name = pin.@ID[0]?string?trim /]
+ [#if name?length == 0]
+ [#assign name = pin_name /]
+ [/#if]
+ [#assign speed = pin.@Speed[0] /]
+ [#if speed == "Minimum"]
+ [#assign out = "PIN_OSPEED_2M(" + port_name + "_" + pin_name + ")" /]
+ [#elseif speed == "Low"]
+ [#assign out = "PIN_OSPEED_25M(" + port_name + "_" + pin_name + ")" /]
+ [#elseif speed == "High"]
+ [#assign out = "PIN_OSPEED_50M(" + port_name + "_" + pin_name + ")" /]
+ [#else]
+ [#assign out = "PIN_OSPEED_100M(" + port_name + "_" + pin_name + ")" /]
+ [/#if]
+ [#if pinidx == 0]
+ [#assign line = "#define VAL_" + port_name + "_OSPEEDR (" + out /]
+ [#else]
+ [#assign line = " " + out /]
+ [/#if]
+ [#if pinidx < 15]
+${(line + " |")?right_pad(76, " ") + "\\"}
+ [#else]
+${line + ")"}
+ [/#if]
+ [#assign pinidx = pinidx + 1 /]
+ [/#list]
+ [#--
+ -- Generating PUDR register value.
+ --]
+ [#assign pinidx = 0 /]
+ [#list port.* as pin]
+ [#assign pin_name = pin?node_name?upper_case /]
+ [#assign name = pin.@ID[0]?string?trim /]
+ [#if name?length == 0]
+ [#assign name = pin_name /]
+ [/#if]
+ [#assign resistor = pin.@Resistor[0] /]
+ [#if resistor == "Floating"]
+ [#assign out = "PIN_PUDR_FLOATING(" + port_name + "_" + pin_name + ")" /]
+ [#elseif resistor == "PullUp"]
+ [#assign out = "PIN_PUDR_PULLUP(" + port_name + "_" + pin_name + ")" /]
+ [#else]
+ [#assign out = "PIN_PUDR_PULLDOWN(" + port_name + "_" + pin_name + ")" /]
+ [/#if]
+ [#if pinidx == 0]
+ [#assign line = "#define VAL_" + port_name + "_PUDR (" + out /]
+ [#else]
+ [#assign line = " " + out /]
+ [/#if]
+ [#if pinidx < 15]
+${(line + " |")?right_pad(76, " ") + "\\"}
+ [#else]
+${line + ")"}
+ [/#if]
+ [#assign pinidx = pinidx + 1 /]
+ [/#list]
+ [#--
+ -- Generating ODR register value.
+ --]
+ [#assign pinidx = 0 /]
+ [#list port.* as pin]
+ [#assign pin_name = pin?node_name?upper_case /]
+ [#assign name = pin.@ID[0]?string?trim /]
+ [#if name?length == 0]
+ [#assign name = pin_name /]
+ [/#if]
+ [#assign level = pin.@Level[0] /]
+ [#if level == "Low"]
+ [#assign out = "PIN_ODR_LOW(" + port_name + "_" + pin_name + ")" /]
+ [#else]
+ [#assign out = "PIN_ODR_HIGH(" + port_name + "_" + pin_name + ")" /]
+ [/#if]
+ [#if pinidx == 0]
+ [#assign line = "#define VAL_" + port_name + "_ODR (" + out /]
+ [#else]
+ [#assign line = " " + out /]
+ [/#if]
+ [#if pinidx < 15]
+${(line + " |")?right_pad(76, " ") + "\\"}
+ [#else]
+${line + ")"}
+ [/#if]
+ [#assign pinidx = pinidx + 1 /]
+ [/#list]
+ [#--
+ -- Generating AFRx registers values.
+ --]
+ [#assign pinidx = 0 /]
+ [#list port.* as pin]
+ [#assign pin_name = pin?node_name?upper_case /]
+ [#assign name = pin.@ID[0]?string?trim /]
+ [#if name?length == 0]
+ [#assign name = pin_name /]
+ [/#if]
+ [#assign alternate = pin.@Alternate[0]?trim /]
+ [#assign out = "PIN_AFIO_AF(" + port_name + "_" + pin_name + ", " + alternate + ")" /]
+ [#if pinidx == 0]
+ [#assign line = "#define VAL_" + port_name + "_AFRL (" + out /]
+ [#elseif pinidx == 8]
+ [#assign line = "#define VAL_" + port_name + "_AFRH (" + out /]
+ [#else]
+ [#assign line = " " + out /]
+ [/#if]
+ [#if (pinidx == 7) || (pinidx == 15)]
+${line + ")"}
+ [#else]
+${(line + " |")?right_pad(76, " ") + "\\"}
+ [/#if]
+ [#assign pinidx = pinidx + 1 /]
+ [/#list]
[/#list]
diff --git a/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd b/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
index b363b0006..c3ac59487 100644
--- a/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
+++ b/tools/gencfg/schema/common/stm32/stm32_gpiov2_port.xsd
@@ -1,49 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema elementFormDefault="qualified"
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<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: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>Object representing an STM32 pin for the GPIOv2 peripheral.</xs:documentation>
+ <xs:documentation>
+ </xs:documentation>
</xs:annotation>
- <xs:attribute name="ID" use="required">
- <xs:simpleType>
- <xs:annotation>
- <xs:documentation>Pin identifier, used to generate a #define with the pin name.</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
+ <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: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>
@@ -51,23 +130,29 @@
<xs:enumeration value="Analog"></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: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="PushPull"></xs:enumeration>
- <xs:enumeration value="OpenDrain"></xs:enumeration>
+ <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: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>
@@ -75,12 +160,31 @@
<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: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>
@@ -88,13 +192,18 @@
</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: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>