Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- /**
- * @file main.h
- * @brief 主程序公共定义和 PLC 输出引脚映射。
- * @version 2.0
- * @author zengbingjie
- * @date 2026-07-29
- * @copyright 版权所有 (c) 2026 Xinje Electric。
- * @note 修改记录:2.0 将线圈 0 至 7 映射到 Q0 至 Q7。
- */
-
- #ifndef MAIN_H
- #define MAIN_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #include "stm32f4xx_hal.h"
-
- #include "app_cfg.h"
- #include "os_cfg.h"
- #include "ucos_ii.h"
-
- extern UART_HandleTypeDef Uart1Handle;
-
- #define PLC_Q0_PORT (GPIOF)
- #define PLC_Q0_PIN (GPIO_PIN_6)
- #define PLC_Q1_PORT (GPIOF)
- #define PLC_Q1_PIN (GPIO_PIN_8)
- #define PLC_Q2_PORT (GPIOF)
- #define PLC_Q2_PIN (GPIO_PIN_7)
- #define PLC_Q3_PORT (GPIOF)
- #define PLC_Q3_PIN (GPIO_PIN_9)
- #define PLC_Q4_PORT (GPIOI)
- #define PLC_Q4_PIN (GPIO_PIN_8)
- #define PLC_Q5_PORT (GPIOE)
- #define PLC_Q5_PIN (GPIO_PIN_6)
- #define PLC_Q6_PORT (GPIOE)
- #define PLC_Q6_PIN (GPIO_PIN_5)
- #define PLC_Q7_PORT (GPIOE)
- #define PLC_Q7_PIN (GPIO_PIN_4)
-
- void Error_Handler(void);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
|