提交 56016647 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

[stm32f401 nucleo] update main.c revert blinking LED

上级 f71a287a
......@@ -6,16 +6,25 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2022-04-19 Meco Man solve LED interferes with SPI
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
/* defined the LD2 (user LED) pin: PB1 */
#define LED2_PIN GET_PIN(A, 5)
int main(void)
{
/* set LED0 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (1)
{
rt_kprintf("Hello RT-Thread!\n");
rt_thread_mdelay(1000);
rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED2_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册