|
5 | 5 | * |
6 | 6 | * Change Logs: |
7 | 7 | * Date Author Notes |
8 | | - * 2018-11-06 zylx first version |
| 8 | + * 2021-08-27 Jiao first version |
9 | 9 | */ |
10 | 10 |
|
11 | 11 | #include <rtthread.h> |
12 | | -#include <rtdevice.h> |
13 | | -#include "fm33lc0xx_fl_gpio.h" |
14 | | -#include "fm33lc0xx_fl_flash.h" |
15 | | -#include "main.h" |
16 | | - |
17 | | - |
18 | | -static void LED_init(void) |
19 | | -{ |
20 | | - FL_GPIO_InitTypeDef GPIO_InitStruct = {0}; |
21 | | - |
22 | | - FL_GPIO_SetOutputPin(GPIOD,FL_GPIO_PIN_4); |
23 | | - GPIO_InitStruct.pin = FL_GPIO_PIN_4; |
24 | | - GPIO_InitStruct.mode = FL_GPIO_MODE_OUTPUT; |
25 | | - GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL; |
26 | | - GPIO_InitStruct.pull = FL_DISABLE; |
27 | | - FL_GPIO_Init(GPIOD, &GPIO_InitStruct); |
28 | | -} |
29 | | - |
| 12 | +#include "board.h" |
30 | 13 |
|
31 | 14 | int main(void) |
32 | 15 | { |
33 | | - LED_init(); |
| 16 | + FL_GPIO_InitTypeDef GPIO_InitStruct = {0}; |
| 17 | + |
| 18 | + FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4); |
| 19 | + GPIO_InitStruct.pin = FL_GPIO_PIN_4; |
| 20 | + GPIO_InitStruct.mode = FL_GPIO_MODE_OUTPUT; |
| 21 | + GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL; |
| 22 | + GPIO_InitStruct.pull = FL_DISABLE; |
| 23 | + FL_GPIO_Init(GPIOD, &GPIO_InitStruct); |
34 | 24 | while (1) |
35 | 25 | { |
36 | | - FL_GPIO_SetOutputPin(GPIOD,FL_GPIO_PIN_4); |
| 26 | + FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4); |
37 | 27 | rt_thread_mdelay(500); |
38 | | - FL_GPIO_ResetOutputPin(GPIOD,FL_GPIO_PIN_4); |
| 28 | + FL_GPIO_ResetOutputPin(GPIOD, FL_GPIO_PIN_4); |
39 | 29 | rt_thread_mdelay(500); |
40 | 30 | } |
41 | 31 |
|
42 | | -// return RT_EOK; |
43 | 32 | } |
44 | | - |
45 | | - |
0 commit comments