Line data Source code
1 1 : /* 2 : * Copyright (c) 2024 STMicroelectronics 3 : * 4 : * SPDX-License-Identifier: Apache-2.0 5 : */ 6 : 7 : /** 8 : * @file 9 : * @brief Public APIs for STM32 PWR wake-up pins configuration 10 : */ 11 : 12 : #ifndef ZEPHYR_DRIVERS_MISC_STM32_WKUP_PINS_H_ 13 : #define ZEPHYR_DRIVERS_MISC_STM32_WKUP_PINS_H_ 14 : 15 : #include <zephyr/drivers/gpio.h> 16 : 17 : #ifdef __cplusplus 18 : extern "C" { 19 : #endif 20 : 21 : /** 22 : * @brief Configure a GPIO pin as a source for STM32 PWR wake-up pins 23 : * 24 : * @param gpio Container for GPIO pin information specified in devicetree 25 : * 26 : * @return 0 on success, -EINVAL on invalid values 27 : */ 28 1 : int stm32_pwr_wkup_pin_cfg_gpio(const struct gpio_dt_spec *gpio); 29 : 30 : /** 31 : * @brief Enable or Disable pull-up and pull-down configuration for 32 : * GPIO Ports that are associated with STM32 PWR wake-up pins 33 : */ 34 1 : void stm32_pwr_wkup_pin_cfg_pupd(void); 35 : 36 : #ifdef __cplusplus 37 : } 38 : #endif 39 : 40 : #endif /* ZEPHYR_DRIVERS_MISC_STM32_WKUP_PINS_H_ */