github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/machine_stm32_exti_exti.go (about)

     1  //go:build stm32l5
     2  
     3  package machine
     4  
     5  import (
     6  	"device/stm32"
     7  	"runtime/volatile"
     8  )
     9  
    10  func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
    11  	switch (pin & 0xf) / 4 {
    12  	case 0:
    13  		return &stm32.EXTI.EXTICR1
    14  	case 1:
    15  		return &stm32.EXTI.EXTICR2
    16  	case 2:
    17  		return &stm32.EXTI.EXTICR3
    18  	case 3:
    19  		return &stm32.EXTI.EXTICR4
    20  	}
    21  	return nil
    22  }
    23  
    24  func enableEXTIConfigRegisters() {
    25  	// No-op
    26  }