diff options
author | Matt Brejza <mbrejza@gmail.com> | 2016-08-23 23:13:03 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-08-25 13:49:51 +1000 |
commit | 5af6184e7251e44c17714466981c624dc7bd225d (patch) | |
tree | 459ea70478756e0220bdf4bd1f385514ae58b106 /stmhal/boards/make-pins.py | |
parent | c4283675439d549fac09c5695aa5f8d6c3319dd5 (diff) | |
download | micropython-5af6184e7251e44c17714466981c624dc7bd225d.tar.gz micropython-5af6184e7251e44c17714466981c624dc7bd225d.zip |
stmhal: Make ADC channel 16 available on L4 MCUs.
Diffstat (limited to 'stmhal/boards/make-pins.py')
-rwxr-xr-x | stmhal/boards/make-pins.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/stmhal/boards/make-pins.py b/stmhal/boards/make-pins.py index b7f4842144..ae614877d5 100755 --- a/stmhal/boards/make-pins.py +++ b/stmhal/boards/make-pins.py @@ -303,7 +303,9 @@ class Pins(object): def print_adc(self, adc_num): print(''); print('const pin_obj_t * const pin_adc{:d}[] = {{'.format(adc_num)) - for channel in range(16): + for channel in range(17): + if channel == 16: + print('#if defined(MCU_SERIES_L4)') adc_found = False for named_pin in self.cpu_pins: pin = named_pin.pin() @@ -314,6 +316,8 @@ class Pins(object): break if not adc_found: print(' NULL, // {:d}'.format(channel)) + if channel == 16: + print('#endif') print('};') |