diff options
author | Diego Ismirlian <dismirlian (at) google's mail.com> | 2018-08-20 20:50:22 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian (at) google's mail.com> | 2018-08-20 20:50:22 -0300 |
commit | 0936be2541015b384b00e31ece7f42a510511aaa (patch) | |
tree | b374d386e02aff0559457d11db61c96567a1fc50 /tools/templates/board_gpio.tpl | |
parent | 03615f40dc3d1cbb5354035c326963b49759f440 (diff) | |
parent | fe95e90b80a28dd2f40bfee1ad90822b99519c6a (diff) | |
download | ChibiOS-Contrib-0936be2541015b384b00e31ece7f42a510511aaa.tar.gz ChibiOS-Contrib-0936be2541015b384b00e31ece7f42a510511aaa.tar.bz2 ChibiOS-Contrib-0936be2541015b384b00e31ece7f42a510511aaa.zip |
Merge branch 'master' of https://github.com/ChibiOS/ChibiOS-Contrib
Diffstat (limited to 'tools/templates/board_gpio.tpl')
-rw-r--r-- | tools/templates/board_gpio.tpl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tools/templates/board_gpio.tpl b/tools/templates/board_gpio.tpl new file mode 100644 index 0000000..07a316d --- /dev/null +++ b/tools/templates/board_gpio.tpl @@ -0,0 +1,55 @@ +#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 |