进一步迭代优化统一管理

This commit is contained in:
冯佳
2026-01-23 14:35:51 +08:00
parent 988cc7ad4a
commit 075e8299cf
36 changed files with 6146 additions and 1590 deletions

View File

@ -10,6 +10,8 @@
#ifndef HAL_GPIO_H
#define HAL_GPIO_H
#include "hal.h"
/**
* @brief GPIO pin state definitions
*/
@ -105,29 +107,33 @@ typedef struct {
/**
* @brief Initialize GPIO hardware
* @retval HAL status code
*/
void hal_gpio_init(void);
hal_ret_t hal_gpio_init(void);
/**
* @brief Configure GPIO pin
* @param config: GPIO configuration structure
* @retval HAL status code
*/
void hal_gpio_configure_pin(const hal_gpio_config_t *config);
hal_ret_t hal_gpio_configure_pin(const hal_gpio_config_t *config);
/**
* @brief Write GPIO pin state
* @param port: GPIO port
* @param pin: GPIO pin
* @param state: GPIO pin state
* @retval HAL status code
*/
void hal_gpio_write_pin(hal_gpio_port_t port, hal_gpio_pin_t pin, hal_gpio_pin_state_t state);
hal_ret_t hal_gpio_write_pin(hal_gpio_port_t port, hal_gpio_pin_t pin, hal_gpio_pin_state_t state);
/**
* @brief Toggle GPIO pin state
* @param port: GPIO port
* @param pin: GPIO pin
* @retval HAL status code
*/
void hal_gpio_toggle_pin(hal_gpio_port_t port, hal_gpio_pin_t pin);
hal_ret_t hal_gpio_toggle_pin(hal_gpio_port_t port, hal_gpio_pin_t pin);
/**
* @brief Read GPIO pin state