aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/machine_stm32_exti_exti.go
blob: 73db5e1e4435174807be7a5bd47fa04c7faf68fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
}