main.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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-08-23 AisinoChip the first version
  9. */
  10. #include <rthw.h>
  11. #include <rtthread.h>
  12. #include "board.h"
  13. /*******************************************************************************
  14. * Function Name : assert_failed
  15. * Description : Reports the name of the source file and the source line number
  16. * where the assert error has occurred.
  17. * Input : - file: pointer to the source file name
  18. * - line: assert error line source number
  19. * Output : None
  20. * Return : None
  21. *******************************************************************************/
  22. void assert_failed(uint8_t *file, uint32_t line)
  23. {
  24. rt_kprintf("\n\r Wrong parameter value detected on\r\n");
  25. rt_kprintf(" file %s\r\n", file);
  26. rt_kprintf(" line %d\r\n", line);
  27. while (1) ;
  28. }
  29. int main(void)
  30. {
  31. rt_hw_led_init();
  32. while(1)
  33. {
  34. rt_hw_led_on(0);
  35. rt_thread_delay(RT_TICK_PER_SECOND/2);
  36. rt_hw_led_off(0);
  37. rt_thread_delay(RT_TICK_PER_SECOND/2);
  38. }
  39. }