drv_rs485.h 561 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-07-22 kurisaw first version
  9. */
  10. #ifndef __DRV_RS485_H__
  11. #define __DRV_RS485_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define RS485_SEND_MODE 0
  18. #define RS485_RECV_MODE 1
  19. extern int rs485_send_data(const void *tbuf, rt_uint16_t t_len);
  20. extern int rs485_init(void);
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24. #endif /* drv_rs485.h */