Fix for mx2board (regex)

This commit is contained in:
Fabien Poussin 2017-09-06 13:30:40 +00:00
parent c0205baf7d
commit 5a9ac0f940
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ def gen_defines(project):
defines['PORT_'+label] = 'GPIO' + port_key
defines['PAD_'+label] = pad_key
if re.search(r"TIM\d_CH\d", signal, re.M):
if re.search(r"TIM\d+_CH\d$", signal, re.M):
timer = signal.replace('S_TIM', '').replace('_CH', '')[:-1]
ch_num = int(signal[-1:])