rtlink_port.h 1022 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-02-02 xiangxistu the first version
  9. * 2021-05-15 Sherman function rename
  10. * 2021-07-13 Sherman add reconnect API
  11. */
  12. #ifndef __RT_LINK_PORT_H__
  13. #define __RT_LINK_PORT_H__
  14. #include <rtdef.h>
  15. /* Functions that need to be implemented at the hardware */
  16. rt_err_t rt_link_port_init(void);
  17. rt_err_t rt_link_port_deinit(void);
  18. rt_err_t rt_link_port_reconnect(void);
  19. rt_size_t rt_link_port_send(void *data, rt_size_t length);
  20. #ifdef RT_LINK_USING_HW_CRC
  21. rt_err_t rt_link_hw_crc32_init(void);
  22. rt_err_t rt_link_hw_crc32_deinit(void);
  23. rt_err_t rt_link_hw_crc32_reset(void);
  24. rt_uint32_t rt_link_hw_crc32(rt_uint8_t *data, rt_size_t u32_size)
  25. #endif
  26. /* Called when the hardware receives data and the data is transferred to RTLink */
  27. rt_size_t rt_link_hw_write_cb(void *data, rt_size_t length);
  28. #endif /* __RT_LINK_PORT_H__ */