CIU32_L051_M307R/user/Source/main.c

65 lines
1.8 KiB
C
Raw Normal View History

/*
* @Author: mbw
* @Date: 2024-08-19 10:10:06
* @LastEditors: mbw && 1600520629@qq.com
2024-09-14 16:50:58 +08:00
* @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 Ӧ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̡<EFBFBD>
*
*
**************************************************************************************************
* @attention
* Copyright (c) CEC Huada Electronic Design Co.,Ltd. All rights reserved.
*
**************************************************************************************************
*/
/*------------------------------------------includes--------------------------------------------*/
#include "rtthread.h"
#include "drv_uart.h"
2024-08-23 14:07:32 +08:00
#include "bsp_rtc.h"
2024-09-05 10:01:45 +08:00
#include "drv_gpio.h"
#include "dev_pin.h"
#include "user_rtt.h"
#define LOG_TAG "main"
#define LOG_LVL LOG_LVL_DBG
#include <ulog.h>
/*--------------------------------------------variables-----------------------------------------*/
2024-09-05 15:30:19 +08:00
// #define LED0_PIN GET_PIN(B, 8)
/*-------------------------------------------functions------------------------------------------*/
int main(void)
{
// uint8_t rtctime[3], rtcdate[3];
2024-09-14 16:50:58 +08:00
LOG_I("test CIU32 L051 RT-Thread!\r\n");
2024-09-14 16:50:58 +08:00
LOG_I("SystemCoreClock = %d MHZ\n", SystemCoreClock / 1000000);
while (1)
{
2024-09-05 15:30:19 +08:00
// rt_pin_write(LED0_PIN, PIN_HIGH);
// rt_thread_mdelay(1000);
// rt_pin_write(LED0_PIN, PIN_LOW);
2024-09-05 10:01:45 +08:00
rt_thread_mdelay(1000);
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
void System_Reset(void)
{
NVIC_SystemReset(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
}
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> msh <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD> */
MSH_CMD_EXPORT(System_Reset, "System_Reset");