Skip to content

Commit

Permalink
Correct generation of MX_Device.h (parsing of pin label) (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLesnjak authored Jul 16, 2024
1 parent 67e0a54 commit 0eaf9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/stm32CubeMX/mxDevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ func getPins(contextMap map[string]map[string]string, fMsp *os.File, peripheral
pinsName[key] = peri
label, ok := signal["GPIO_Label"]
if ok {
label = strings.Split(label, " ")[0]
label = strings.Split(label, "[")[0]
label = strings.TrimRight(label, " ")
label = replaceSpecialChars(label, "_")
pinsLabel[key] = strings.ReplaceAll(label, ".", "_")
}
Expand Down

0 comments on commit 0eaf9bd

Please sign in to comment.