diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-22 22:32:04 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-18 21:40:58 +0100 |
commit | 50ea86fe8b95ec8ce091061c34f449773ebe216a (patch) | |
tree | 42f7f1cd492db66270a3546ed4cde903da7dfc9d /stmhal/boards/make-pins.py | |
parent | 2e5704d1016d7ea873379ce47a81f6706a803ef6 (diff) | |
download | micropython-50ea86fe8b95ec8ce091061c34f449773ebe216a.tar.gz micropython-50ea86fe8b95ec8ce091061c34f449773ebe216a.zip |
stmhal: For pins, define macros mapping board names to cpu names.
Diffstat (limited to 'stmhal/boards/make-pins.py')
-rwxr-xr-x | stmhal/boards/make-pins.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stmhal/boards/make-pins.py b/stmhal/boards/make-pins.py index 44da266ae1..afb594e412 100755 --- a/stmhal/boards/make-pins.py +++ b/stmhal/boards/make-pins.py @@ -282,6 +282,9 @@ class Pins(object): hdr_file.write('extern const pin_obj_t * const pin_adc1[];\n') hdr_file.write('extern const pin_obj_t * const pin_adc2[];\n') hdr_file.write('extern const pin_obj_t * const pin_adc3[];\n') + # provide #define's mapping board to cpu name + for named_pin in self.board_pins: + hdr_file.write("#define pyb_pin_{:s} pin_{:s}\n".format(named_pin.name(), named_pin.pin().cpu_pin_name())) def print_qstr(self, qstr_filename): with open(qstr_filename, 'wt') as qstr_file: |