rt-thread-official/bsp/stm32/stm32h743-openmv-h7plus/applications/main.c

32 lines
655 B
C
Raw Normal View History

2021-12-13 21:23:52 +08:00
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
2021-12-13 21:23:52 +08:00
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-12-14 supperthomas first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#define LED1_PIN GET_PIN(C, 0)
int main(void)
{
/* set LED2 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
#ifdef BSP_USING_USBD
rt_console_set_device("vcom");
#endif
2021-12-13 21:23:52 +08:00
while (1)
{
rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(2000);
rt_pin_write(LED1_PIN, PIN_LOW);
rt_thread_mdelay(2000);
}
}