mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +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
|
||||
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{
|
||||
name: clusterName,
|
||||
address: baseAddress + clusterOffset,
|
||||
|
||||
Reference in New Issue
Block a user