summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/boards/make-pins.py
diff options
context:
space:
mode:
authorMatt Brejza <mbrejza@gmail.com>2016-08-23 23:13:03 +0100
committerDamien George <damien.p.george@gmail.com>2016-08-25 13:49:51 +1000
commit5af6184e7251e44c17714466981c624dc7bd225d (patch)
tree459ea70478756e0220bdf4bd1f385514ae58b106 /stmhal/boards/make-pins.py
parentc4283675439d549fac09c5695aa5f8d6c3319dd5 (diff)
downloadmicropython-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-xstmhal/boards/make-pins.py6
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('};')