main.c 787 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-08-27 Jiao first version
  9. */
  10. #include <rtthread.h>
  11. #include "board.h"
  12. int main(void)
  13. {
  14. FL_GPIO_InitTypeDef GPIO_InitStruct = {0};
  15. FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
  16. GPIO_InitStruct.pin = FL_GPIO_PIN_4;
  17. GPIO_InitStruct.mode = FL_GPIO_MODE_OUTPUT;
  18. GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL;
  19. GPIO_InitStruct.pull = FL_DISABLE;
  20. FL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  21. while (1)
  22. {
  23. FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
  24. rt_thread_mdelay(500);
  25. FL_GPIO_ResetOutputPin(GPIOD, FL_GPIO_PIN_4);
  26. rt_thread_mdelay(500);
  27. }
  28. }