stmhal: For pins, define macros mapping board names to cpu names.

This commit is contained in:
Damien George 2015-02-22 22:32:04 +00:00
parent 2e5704d101
commit 50ea86fe8b
1 changed files with 3 additions and 0 deletions

View File

@ -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: