finsh_port.c 560 B

123456789101112131415161718192021222324252627282930
  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. */
  9. #include <rthw.h>
  10. #include <rtconfig.h>
  11. #ifndef RT_USING_FINSH
  12. #error Please uncomment the line <#include "finsh_config.h"> in the rtconfig.h
  13. #endif
  14. #ifdef RT_USING_FINSH
  15. RT_WEAK char rt_hw_console_getchar(void)
  16. {
  17. /* Note: the initial value of ch must < 0 */
  18. int ch = -1;
  19. #error "TODO 4: Read a char from the uart and assign it to 'ch'."
  20. return ch;
  21. }
  22. #endif /* RT_USING_FINSH */