今天用易码魔盒创建了一个工程,点亮一个LED灯,这算是最简单的了。
//************************************************************
// Copyright (c)
// FileName : main.c
// Module Function :
// Instructions : Contains the MCU initialization function and its H file
//************************************************************
/********************Includes************************************************************************/
#include "SC_Init.h" //MCU Init header,Include all IC resource headers
#include "SC_it.h"
#include "..\Drivers\SCDriver_list.h"
#include "HeadFiles\SysFunVarDefine.h"
/**************************************Generated by EasyCodeCube*************************************/
/*************************************.Generated by EasyCodeCube.************************************/
/*****************************************************************************************************
* Function Name: main
* Description : This function implements main function.
* Arguments : None
* Return Value : None
******************************************************************************************************/
void main(void)
{
long int i;
/*<Generated by EasyCodeCube begin>*/
/*<UserCodeStart>*//*<SinOne-Tag><3>*/
SC_Init(); /*** MCU init***/
/*<UserCodeEnd>*//*<SinOne-Tag><3>*/
/*<UserCodeStart>*//*<SinOne-Tag><4>*/
/*****MainLoop*****/
while(1)
{
/*<UserCodeStart>*//*<SinOne-Tag><5>*/
/*****User program*****/
GPIO_TogglePin(GPIO0,GPIO_PIN_1);
for(i=0;i<500000;i++);
/*<UserCodeEnd>*//*<SinOne-Tag><5>*/
/*<Begin-Inserted by EasyCodeCube for Condition>*/
}
/*<UserCodeEnd>*//*<SinOne-Tag><4>*/
/*<Generated by EasyCodeCube end>*/
}
效果图
|