stm32例程24个,附操作系统RTX,ucOSII 具体如下:
1,LED
2,RCC系统时钟
3,独立按键
4,静态数码管
5,8位动态数码管
6,SysTick定时器(精确定时控制小灯流水)
7,步进电机正反转控制
8,矩阵键盘显示键值
9,点阵屏显示汉字 10,74HC595串转并控制小灯
11,74HC165并转串控制小灯
12,外部中断
13,按键智能控制EEPROM读写(LCD显示)
14,EEPROM记录开关机次数(24C16应用)
15,AD-DA
16,LCD1602
17,定时器
18,串口通信
19,DS18B20 温度传感器 20,RTC实时时钟打印输出给PC
21,秒表设计
22,PWM呼吸灯设计
23,可调式数字钟
24,DS1302万年历设计
keilkill.bat
模板
操作系统 例程
/*
*********************************************************************************************************
* main()
*
* Description : This is the standard entry point for C code. It is assumed that your code will call
* main() once you have performed all necessary initialization.
*
* Argument : none.
*
* Return : none.
*********************************************************************************************************
*/
int main(void)
{
CPU_INT08U os_err;
//BSP_IntDisAll(); /* Disable all ints until we are ready to accept them. */
CPU_IntDis();
OSInit(); /* Initialize "uC/OS-II, The Real-Time Kernel". */
BSP_Init(); /* Initialize BSP functions. */
App_DispScr_SignOn();
printf("OS Init OK!\r\n");
os_err = OSTaskCreate((void (*) (void *)) App_TaskStart,
/* Create the start task. */
(void *) 0,
(OS_STK *) &App_TaskStartStk[APP_TASK_START_STK_SIZE - 1],
(INT8U) APP_TASK_START_PRIO);
printf("Creat App_TaskStart!\r\n");
#if (OS_TASK_NAME_SIZE >= 11)
OSTaskNameSet(APP_TASK_START_PRIO, (CPU_INT08U *) "Start Task", &os_err);
#endif
// InfoSem = OSSemCreate(0);
// Disp_Box = OSMboxCreate((void *) 0);
OSTimeSet(0);
OSStart(); /* Start multitasking (i.e. give control to uC/OS-II). */
return (0);
}
评论