aboutsummaryrefslogtreecommitdiffstats
path: root/tools/board_gpio.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/board_gpio.tpl')
-rw-r--r--tools/board_gpio.tpl106
1 files changed, 54 insertions, 52 deletions
diff --git a/tools/board_gpio.tpl b/tools/board_gpio.tpl
index ea72b97..07a316d 100644
--- a/tools/board_gpio.tpl
+++ b/tools/board_gpio.tpl
@@ -1,53 +1,55 @@
-#ifndef _BOARD_GPIO_H_
-#define _BOARD_GPIO_H_
-
-{% for d, v in defines %}
-#define {{ d }} {{ v }}
-{%- endfor %}
-
-{% for p, v in ports %}
-/* PORT {{p}} */
-#define VAL_GPIO{{p}}_MODER ( \
- {%- for i in v.MODER %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_OTYPER ( \
- {%- for i in v.OTYPER %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_OSPEEDR ( \
- {%- for i in v.OSPEEDR %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_PUPDR ( \
- {%- for i in v.PUPDR %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_ODR ( \
- {%- for i in v.ODR %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_AFRL ( \
- {%- for i in v.AFRL %}
- {{ i }} | \
- {%- endfor %}
- 0)
-
-#define VAL_GPIO{{p}}_AFRH ( \
- {%- for i in v.AFRH %}
- {{ i }} | \
- {%- endfor %}
- 0)
-{% endfor %}
-
+#ifndef _BOARD_GPIO_H_
+#define _BOARD_GPIO_H_
+
+/* Generated by mx2board.py */
+
+{% for d, v in defines %}
+#define {{ d }} {{ v }}
+{%- endfor %}
+
+{% for p, v in ports %}
+/* PORT {{p}} */
+#define VAL_GPIO{{p}}_MODER ( \
+ {%- for i in v.MODER %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_OTYPER ( \
+ {%- for i in v.OTYPER %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_OSPEEDR ( \
+ {%- for i in v.OSPEEDR %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_PUPDR ( \
+ {%- for i in v.PUPDR %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_ODR ( \
+ {%- for i in v.ODR %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_AFRL ( \
+ {%- for i in v.AFRL %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+
+#define VAL_GPIO{{p}}_AFRH ( \
+ {%- for i in v.AFRH %}
+ {{ i }} | \
+ {%- endfor %}
+ 0)
+{% endfor %}
+
#endif \ No newline at end of file