mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
tools/gen-device-svd: handle case with nested registers that have same address to avoid duplicates
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
committed by
Ayke van Laethem
parent
2ba7a438c2
commit
9ac2f39acc
@@ -370,7 +370,9 @@ const (
|
||||
regType += '\t\t_padding{padNumber} {subregType}\n'.format(padNumber=padNumber, subregType='RegValue16')
|
||||
else:
|
||||
numSkip = (subregister['address'] - subaddress)
|
||||
if numSkip == 1:
|
||||
if numSkip < 1:
|
||||
continue
|
||||
elif numSkip == 1:
|
||||
regType += '\t\t_padding{padNumber} {subregType}\n'.format(padNumber=padNumber, subregType='RegValue8')
|
||||
else:
|
||||
regType += '\t\t_padding{padNumber} [{num}]{subregType}\n'.format(padNumber=padNumber, num=numSkip, subregType='RegValue8')
|
||||
|
||||
Reference in New Issue
Block a user