hlx.c 782 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * hlx.c
  3. *
  4. * Created on: 2025年8月22日
  5. * Author: 龙三郎
  6. */
  7. #include "tr_usb0_host_driver.h"
  8. #include "tr_timer_driver.h"
  9. #include "tr_led.h"
  10. #include "tr_queue.h"
  11. #include "uart.h"
  12. #include "uartStdio.h"
  13. #include "soc_C6748.h"
  14. void HlxInit(void)
  15. {
  16. TimerInit(); // 定时器
  17. LedInit(); // Led初始化
  18. Usb0HostInit(); // usb初始化
  19. dataforwardInit(); // 数据转发模块初始化
  20. // UARTStdioInit(); // uart2初始化
  21. }
  22. void HlxMain(void)
  23. {
  24. LedFlashingMain();
  25. Usb0HostMain(); // usb模块主流程
  26. dataforwardMain(); // 数据转发主流程
  27. // uart2获取数据
  28. // while(UARTCharsAvail(SOC_UART_2_REGS))
  29. // {
  30. // // 读下一个字符
  31. // unsigned char ucChar = UARTGetc();
  32. // enqueueFromUart(ucChar);
  33. // UARTPutc(ucChar);
  34. // }
  35. }