Files
hc32f460_boot/device/dev_rs485.h
T

23 lines
437 B
C
Raw Normal View History

2026-04-23 13:49:53 +08:00
#ifndef _DEV_RS485_H_
#define _DEV_RS485_H_
#include "hdl_usart.h"
#define RS485_CTRL_PORT (GPIO_PORT_C)
#define RS485_CTRL_PIN (GPIO_PIN_07)
typedef void (*dev_rs485_cb_t)(uint8_t dat);
extern int dev_rs485_init(void);
extern void dev_rs485_send(uint8_t *buf, int len);
extern int dev_rs485_read(uint8_t *buf, int len);
extern int dev_rs485_rx_register(dev_rs485_cb_t fnCallback);
extern int dev_rs485_deinit(void);
#endif