CPU运行期间LED灯按照两秒周期闪烁,运行1分钟后,进入休眠工作,只有按键才能唤醒;CPU唤醒后将重新开始LED闪烁.
* Copyright (c) 2006-2019, RT-Thread Development Team
* Copyright (c) 2019-Present Nuclei Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-03-26 Huaqi the first version
*/
#include "nuclei_sdk_soc.h"
//#include "rtthread.h"
#include "pctl_def_macro.h"
#include "pctl_def_flag.h"
#include
#include "drv_hw_opt_led_run.h"
#include "cthread_led_blink.h"
//*<--------------------- STATIC VARIABLE: DECLARATIONS------------
//*<--------------------- DECLARATIONS INSTANCE -------------------
//*<--------------------- VARIABLE -------------------
//*<--------------------- FUNCTION DECLARATIONS -------------------
//*<--------------------- FUNCTION INSTANCE -------------------
int main (void)
{
rt_uint32_t count = 0;
drv_cfg_init_gpio_led ();
//创建动态线程
cthd_led_dev_open_creat (D_THREAD_STACKSIZE_LED_BLINK, D_THREAD_PRIORITY_LED_BLINK, D_THREAD_TIMETICK_LED_BLINK);
cthd_led_dev_open_startup (); //启动线程
while (1)
{
}
}