rtlink_port.h 924 B

12345678910111213141516171819202122232425262728293031
  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. */
  11. #ifndef __RT_LINK_PORT_H__
  12. #define __RT_LINK_PORT_H__
  13. #include <rtdef.h>
  14. /* Functions that need to be implemented at the hardware */
  15. int rt_link_port_init(void);
  16. int rt_link_port_deinit(void);
  17. rt_size_t rt_link_port_send(void *data, rt_size_t length);
  18. #ifdef RT_LINK_USING_HW_CRC
  19. rt_err_t rt_link_hw_crc32_init(void);
  20. rt_err_t rt_link_hw_crc32_deinit(void);
  21. rt_err_t rt_link_hw_crc32_reset(void);
  22. rt_uint32_t rt_link_hw_crc32(rt_uint8_t *data, rt_size_t u32_size)
  23. #endif
  24. /* Called when the hardware receives data and the data is transferred to RTLink */
  25. rt_size_t rt_link_hw_write_cb(void *data, rt_size_t length);
  26. #endif /* __RT_LINK_PORT_H__ */