main.c 670 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2022 Shanghai Eastsoft Microelectronics Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-05-08 liuhy the first version
  9. */
  10. #include "board.h"
  11. #ifdef ES_RTT_APP_LED_PIN
  12. #define LED_PIN ES_RTT_APP_LED_PIN
  13. #else
  14. #define LED_PIN GET_PIN( C , 12 )
  15. #endif
  16. int main(void)
  17. {
  18. int count = 1;
  19. /* set pin mode to output */
  20. rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
  21. while (count++)
  22. {
  23. rt_pin_write(LED_PIN, PIN_HIGH);
  24. rt_thread_mdelay(500);
  25. rt_pin_write(LED_PIN, PIN_LOW);
  26. rt_thread_mdelay(500);
  27. }
  28. return RT_EOK;
  29. }