GPIO / EXTI / PWM 的基础封装
syhanjin 2025-09-10 GPIO_t PWM_t 这个模块把 HAL 的 GPIO、外部中断和 PWM 接口做了一层很薄的封装,核心目标是统一句柄形式, 让上层代码只需要围绕和这类结构体操作,而不必反复处理底层 HAL 句柄细节。 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. https://www.gnu.org/licenses/ You should have received a copy of the GNU General Public License along with this program. If not, see. https://github.com/HITSZ-WTRobot-Packages/BasicComponents Project repository:
GPIO 面向对象封装(C++)
syhanjin 2026-06-30 gpio_driver.h 此头文件提供面向对象的 GPIO 操作 API,推荐用于所有新代码。 旧 C 风格 API 在中保留但已标记为弃用。 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. https://www.gnu.org/licenses/ You should have received a copy of the GNU General Public License along with this program. If not, see. https://github.com/HITSZ-WTRobot-Packages/BasicComponents Project repository:
TIM PWM 的基础封装
syhanjin 2025-09-10 这个头文件只做最常见的 PWM 启停和占空比换算,目的是让上层代码不用反复接触 __HAL_TIM_* 宏。 这样做的好处是调用方式统一,也更容易在代码里看出“这是一个 PWM 句柄,而不是裸 TIM 句柄”。 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. https://www.gnu.org/licenses/ You should have received a copy of the GNU General Public License along with this program. If not, see. https://github.com/HITSZ-WTRobot-Packages/BasicComponents Project repository: