/* * @Author: mbw * @Date: 2024-08-19 10:10:06 * @LastEditors: mbw && 1600520629@qq.com * @LastEditTime: 2024-09-14 15:13:54 * @FilePath: \USART1_Interrupt - RT-Thread\user\Source\main.c * @Description: * * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. */ /************************************************************************************************/ /** * @file main.c * @author MCU Ecosystem Development Team * @brief 应用程序主流程。 * * ************************************************************************************************** * @attention * Copyright (c) CEC Huada Electronic Design Co.,Ltd. All rights reserved. * ************************************************************************************************** */ /*------------------------------------------includes--------------------------------------------*/ #include "rtthread.h" #include "drv_uart.h" #include "bsp_rtc.h" #include "drv_gpio.h" #include "dev_pin.h" #include "user_rtt.h" #define LOG_TAG "main" #define LOG_LVL LOG_LVL_DBG #include /*--------------------------------------------variables-----------------------------------------*/ // #define LED0_PIN GET_PIN(B, 8) /*-------------------------------------------functions------------------------------------------*/ int main(void) { // uint8_t rtctime[3], rtcdate[3]; LOG_I("test CIU32 L051 RT-Thread!\r\n"); LOG_I("SystemCoreClock = %d MHZ\n", SystemCoreClock / 1000000); while (1) { // rt_pin_write(LED0_PIN, PIN_HIGH); // rt_thread_mdelay(1000); // rt_pin_write(LED0_PIN, PIN_LOW); rt_thread_mdelay(1000); } } // 软件复位函数 void System_Reset(void) { NVIC_SystemReset(); // 进行软件复位 } /* 导出到 msh 命令列表中 */ MSH_CMD_EXPORT(System_Reset, "System_Reset");