mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
gen-device-svd: fix lowercase cluster name
This commit is contained in:
@@ -342,6 +342,11 @@ func readSVD(path, sourceURL string) (*Device, error) {
|
|||||||
firstAddress := clusterRegisters[0].address
|
firstAddress := clusterRegisters[0].address
|
||||||
dimIncrement = int(lastAddress - firstAddress)
|
dimIncrement = int(lastAddress - firstAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !unicode.IsUpper(rune(clusterName[0])) && !unicode.IsDigit(rune(clusterName[0])) {
|
||||||
|
clusterName = strings.ToUpper(clusterName)
|
||||||
|
}
|
||||||
|
|
||||||
p.registers = append(p.registers, &PeripheralField{
|
p.registers = append(p.registers, &PeripheralField{
|
||||||
name: clusterName,
|
name: clusterName,
|
||||||
address: baseAddress + clusterOffset,
|
address: baseAddress + clusterOffset,
|
||||||
|
|||||||
Reference in New Issue
Block a user