Don't rename DMA channels if they don't start at zero
This commit is contained in:
parent
ccc3468e62
commit
ea9e59931f
@ -1077,15 +1077,12 @@ def parse_dma():
|
|||||||
if result := re.match('.*' + n + '_(Channel|Stream)\[(\d+)-(\d+)\]', channels[0]['@Name']):
|
if result := re.match('.*' + n + '_(Channel|Stream)\[(\d+)-(\d+)\]', channels[0]['@Name']):
|
||||||
low = int(result.group(2))
|
low = int(result.group(2))
|
||||||
high = int(result.group(3))
|
high = int(result.group(3))
|
||||||
# Make sure all channels numbers start at 0
|
|
||||||
if low == 1:
|
|
||||||
low -= 1
|
|
||||||
high -= 1
|
|
||||||
for i in range(low, high + 1):
|
for i in range(low, high + 1):
|
||||||
chip_dma['channels'].append({
|
chip_dma['channels'].append({
|
||||||
'name': n + '_CH' + str(i),
|
'name': n + '_CH' + str(i),
|
||||||
'dma': n,
|
'dma': n,
|
||||||
'channel': i,
|
# Make sure all channels numbers start at 0
|
||||||
|
'channel': i - low,
|
||||||
'dmamux': dmamux,
|
'dmamux': dmamux,
|
||||||
'dmamux_channel': dmamux_channel,
|
'dmamux_channel': dmamux_channel,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user