F💻W/Coding

Silicon Lab EFR32 코드 분석

천숭이 2023. 6. 26. 13:42

보드 : EFR32MG22

 

GPIO

LED0 : GPIOD2

LED1 : GPIOD3

BUTTON0 : GPIOB0

BUTTON2 : GPIOB1

 

- GPIO 세팅

  // Configure Button PB1 as input and enable interrupt
  GPIO_PinModeSet(BSP_GPIO_PB1_PORT, BSP_GPIO_PB1_PIN, gpioModeInputPull, 1);
  GPIO_ExtIntConfig(BSP_GPIO_PB1_PORT,
                    BSP_GPIO_PB1_PIN,
                    BSP_GPIO_PB1_PIN,
                    false,
                    true,
                    true);