• 大小: 6.5MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-28
  • 语言: 其他
  • 标签: uCOSII  

资源简介

uCOSII移植STM32F103C8T6范例工程,主要实现了几个LED闪烁的功能。

资源截图

代码片段和文件信息

/*
*********************************************************************************************************
*                                              EXAMPLE CODE
*
*                          (c) Copyright 2003-2006; Micrium Inc.; Weston FL
*
*               All rights reserved.  Protected by international copyright laws.
*               Knowledge of the source code may NOT be used to develop a similar product.
*               Please help us continue to provide the embedded community with the finest
*               software available.  Your honesty is greatly appreciated.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                            EXAMPLE CODE
*
*                                     ST Microelectronics STM32
*                                              with the
*                                   STM3210B-EVAL Evaluation Board
*
* Filename      : app.c
* Version       : V1.10
* Programmer(s) : BAN
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                             INCLUDE FILES
*********************************************************************************************************
*/

#include “stm32f10x.h“
#include “stm32f10x_conf.h“
#include “ucos_ii.h“
#include “app_cfg.h“

//void SysTick_init(void)
//{
// RCC_ClocksTypeDef rcc_clocks;
// RCC_GetClocksFreq(&rcc_clocks); //获取系统时钟频率
// SysTick_Config(rcc_clocks.HCLK_Frequency / OS_TICKS_PER_SEC); //计算每次任务调度的时间倍数
//}

void LED_Init()
{
GPIO_InitTypeDef GPIO_InitStructure;
// RCC->APB2ENR |= (1<<3)|(1<<5);
// GPIOB->CRL &= ~(0xff<<20);
// GPIOB->CRL |= 0x33<<(4*5);

// GPIOD->CRL &= ~(0xff<<(4*3));
// GPIOD->CRL &= ~(u32)((u32)0xff<<(4*6));
// GPIOD->CRL |= 0x33<<(4*3);
// GPIOD->CRL |= 0x33<<(4*6);

/* GPIOD Periph clock enable */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC ENABLE);

/* Configure PD0 and PD2 in output pushpull mode */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 ;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC &GPIO_InitStructure);

LED1(OFF);
LED2(OFF);
LED3(OFF);
LED4(ON);
}

/* CPU统计任务 */
static void Statistics_Task(void *p_arg) 

OS_CPU_SysTickInit();  /* Initialize the SysTick. */

#if (OS_TASK_STAT_EN > 0) 
OSStatInit();  /* Determine CPU capacity. */ 
#endif  /* TODO: create application tasks here */

OSTaskDel(OS_PRIO_SELF); 
}

void TestLed1(void *p_arg)
{
OS_CPU_SysTickInit();
while(1)
{
LED1(ON);
OSTimeDlyHMSM(0010);
LED1(OFF);
OSTimeDlyHMSM(0010);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4070  2016-10-10 14:12  2016.10.10\APP\app.c

     文件       1742  2016-10-10 13:09  2016.10.10\APP\app_cfg.h

     文件       1558  2016-10-10 10:35  2016.10.10\APP\includes.h

     文件      10437  2016-10-10 13:55  2016.10.10\APP\os_cfg.h

     文件       1034  2016-05-12 10:43  2016.10.10\BSP\delay\delay.c

     文件        220  2016-05-12 10:43  2016.10.10\BSP\delay\delay.h

     文件      19342  2012-12-14 11:16  2016.10.10\BSP\DMP\dmpKey.h

     文件       6765  2012-12-14 11:16  2016.10.10\BSP\DMP\dmpmap.h

     文件      86170  2016-05-12 10:35  2016.10.10\BSP\DMP\inv_mpu.c

     文件       4651  2013-08-24 21:48  2016.10.10\BSP\DMP\inv_mpu.h

     文件      58394  2016-05-12 10:35  2016.10.10\BSP\DMP\inv_mpu_dmp_motion_driver.c

     文件       3538  2013-06-13 16:52  2016.10.10\BSP\DMP\inv_mpu_dmp_motion_driver.h

     文件       9434  2016-03-08 11:57  2016.10.10\BSP\IOI2C\IOI2C.c

     文件       3164  2016-03-05 13:31  2016.10.10\BSP\IOI2C\IOI2C.h

     文件       2065  2016-01-16 10:36  2016.10.10\BSP\TIM\TIM.c

     文件        360  2016-01-16 09:10  2016.10.10\BSP\TIM\TIM.h

     文件       2330  2016-03-05 10:49  2016.10.10\BSP\USART\USART.c

     文件        369  2016-03-05 10:49  2016.10.10\BSP\USART\USART.h

     文件      17273  2010-06-07 10:25  2016.10.10\CMSIS\CM3\CoreSupport\core_cm3.c

     文件      85714  2011-02-09 14:59  2016.10.10\CMSIS\CM3\CoreSupport\core_cm3.h

     文件      26297  2011-03-14 12:31  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html

     文件      15766  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s

     文件      15503  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s

     文件      15692  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s

     文件      12376  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s

     文件      13656  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s

     文件      12812  2016-10-08 09:45  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s

     文件      14073  2011-03-10 10:51  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s

     文件      15955  2011-03-10 10:51  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s

     文件      13072  2011-03-10 10:52  2016.10.10\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s

............此处省略282个文件信息

评论

共有 条评论