STM32 led灯光测试
/**
******************************************************************************
* @file main.c
* @author Creelinks Application Team
* @version V1.1.0
* @date 2016-11-10
* @brief 基于前后台(裸奔)Creelinks平台主入口函数
******************************************************************************
* @attention
*
*1)采用前后台方式,即非操作系统方式运行
*2)请保证主函数的完整性,即ceSystem.initial()和ceSystem.mainTask()不可缺少
*3)不要过长时间的阻塞while(1)循环,以保证各个模块工作正常。
* <h2><center>© COPYRIGHT 2016 Darcern</center></h2>
******************************************************************************
*/
#include "Creelinks.h" //定义Gpio属性对象
#include "CeLed1C.h"
CeLed1C myLed;
int main(void)
{
ceSystemOp.initial(); //Creelinks环境 初始化
ceDebugOp.initial(R9Uart); //通过Uart串口输出Debug信息到上位机
//TODO:请在此处插入模块初始化等操作
ceLed1COp.initialByGpio(&myLed, R1AGP);
while (1)
{
ceTaskOp.mainTask(); //Creelinks环境主循环任务,请保证此函数能够被周期调用
//TODO:请在此处插入用户操作
ceLed1COp.setOn(&myLed);
ceSystemOp.delayMs(500);
ceLed1COp.setOff(&myLed);
ceSystemOp.delayMs(500);
};
}