⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_config.h

📁 最新版IAR FOR ARM(EWARM)5.11中的代码例子
💻 H
字号:
/*********************************************************************
 *
 *  IAR PowerPac - RTOS
 *
 *  (c) Copyright IAR Systems 2006.  All rights reserved.
 *
**********************************************************************
----------------------------------------------------------------------
File    : OS_Config.h
Purpose : Configuration settings for the OS
          Setup configuration according to your hardware
--------  END-OF-HEADER  ---------------------------------------------
*/

#ifndef OS_CONFIG_H                     /* Avoid multiple inclusion */
#define OS_CONFIG_H

/*********************************************************************
*
*       Configuration for RTOSInit
*
*********************************************************************/

/*********************************************************************
*
*       Clock frequency settings
*
*       The IAR ST Giveaway board is delivered with a
*       4.0000 MHz crystal which is default CPU clock
*       if PLL is not initialized
*/

#define _CRYSTAL_CLOCK  5000000L   /* FREEOSC frequency   */
#define OS_INIT_PLL     0          /* Don't init PLL during startup*/

#define TICK_PER_SEC    400
#define _TIM_PESCALER   1

/*********************************************************************
*
*       UART settings for OSView
*/

#define OS_UART -1                /* Don't init UART during startup */
#define OS_BAUDRATE 38400L

/****** End of modifiable configuration settings ********************/

/*********************************************************************
*
*       Calculated configuration settings
*/

#ifndef OS_INIT_PLL
  #define OS_INIT_PLL 1
#endif

#if OS_INIT_PLL
  #define OS_PLL_MULTIPLIER   16  /* PLL multiplies by 16         */
#else
  #define OS_PLL_MULTIPLIER   1   /* PLL not used                 */
#endif

#define OS_HCLK_DIVIDER       4  /* H clk divider                 */
#define OS_TIMCLK_DIVIDER     1  /* TIM clk divider               */
#define OS_PCLK_DIVIDER       1  /* P clk divider                 */

#define OS_FSYS ((_CRYSTAL_CLOCK * OS_PLL_MULTIPLIER)/OS_HCLK_DIVIDER)

/********************************************************************/

#endif                                  /* Avoid multiple inclusion */

/*****  EOF  ********************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -