STM_ATEM/User/rs485_driver.h
2026-01-25 17:16:17 +08:00

15 lines
430 B
C

#ifndef RS485_DRIVER_H
#define RS485_DRIVER_H
#include "main.h"
// 假设 DE/RE 控制引脚 - 请根据实际情况修改
#define RS485_DE_RE_PORT GPIOC
#define RS485_DE_RE_PIN GPIO_PIN_7
void RS485_Init(UART_HandleTypeDef *huart, GPIO_TypeDef* de_re_port, uint16_t de_re_pin);
HAL_StatusTypeDef RS485_SendData(uint8_t *pData, uint16_t Size);
void RS485_TxCpltCallback(UART_HandleTypeDef *huart);
#endif // RS485_DRIVER_H