stm32: support pin input interrupts

This commit is contained in:
Kenneth Bell
2021-05-31 17:45:49 -07:00
committed by Ron Evans
parent c017ed2242
commit 5f9e339cf3
16 changed files with 527 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// +build stm32l5
package machine
import (
"device/stm32"
"runtime/volatile"
)
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
switch (pin & 0xf) / 4 {
case 0:
return &stm32.EXTI.EXTICR1
case 1:
return &stm32.EXTI.EXTICR2
case 2:
return &stm32.EXTI.EXTICR3
case 3:
return &stm32.EXTI.EXTICR4
}
return nil
}
func enableEXTIConfigRegisters() {
// No-op
}