mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 12:03:41 +00:00
93ac7cec0d
board/stm32: Add support for GNSE (Generic Node Sensor Edition) Thanks to @jamestait for his help on GNSE port
28 lines
434 B
Go
28 lines
434 B
Go
//go:build stm32wlx
|
|
// +build stm32wlx
|
|
|
|
package machine
|
|
|
|
import (
|
|
"device/stm32"
|
|
"runtime/volatile"
|
|
)
|
|
|
|
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
|
|
switch (pin & 0xf) / 4 {
|
|
case 0:
|
|
return &stm32.SYSCFG.EXTICR1
|
|
case 1:
|
|
return &stm32.SYSCFG.EXTICR2
|
|
case 2:
|
|
return &stm32.SYSCFG.EXTICR3
|
|
case 3:
|
|
return &stm32.SYSCFG.EXTICR4
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func enableEXTIConfigRegisters() {
|
|
// No registers to enable
|
|
}
|