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

📄 app_cfg.h

📁 ucOS_9263_Source ucOS-ii for 9263 port,from Micrium.com
💻 H
字号:
/*
*********************************************************************************************************
*                                              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.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                       APPLICATION CONFIGURATION
*
*                                          Atmel AT91SAM9263
*                                                on the
*                                  Atmel AT91SAM9263-EK Evaluation Board
*
* Filename      : app_cfg.h
* Version       : V1.00
* Programmer(s) : Brian Nagel
*********************************************************************************************************
*/

#ifndef  __APP_CFG_H__
#define  __APP_CFG_H__


/*
*********************************************************************************************************
*                                       ADDITIONAL uC/MODULE ENABLES
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*                                           BOOT LOADER CONFIGURATION
*********************************************************************************************************
*/

#define  APP_BOOT_RETRIES                    3                          /* Specify number of boot attempts before giving up         */

#define  APP_DEST_ADDR              0x20000000                          /* Dest. address in memory to which the image will be copied*/

#define  APP_IMG_SIZE               0x00080000                          /* Copy size. Must be greater than or equal to app size     */
#define  APP_IMG_ADDR               0x00008000

/*
*********************************************************************************************************
*                                      DATAFLASH SETTINGS / MACROS
*********************************************************************************************************
*/

#define  AT91C_BASE_SPI	       AT91C_BASE_SPI0                          /* Choose which SPI port to use                             */
#define  AT91C_ID_SPI	         AT91C_ID_SPI0                          /* Set the Atmel peripheral ID for the SPI port             */

#define  AT91C_SPI_CLK               33000000L                          /* Set the desires SPI baud rate                            */

                                                                        /* Configure the SPI pin characteristics (polarity, timing) */
                                                                        /* DLYBS = tCSS= 250ns min and DLYBCT = tCSH = 250ns        */
#define  DATAFLASH_TCSS	          (0x1a << 16)	                        /* 250ns min (tCSS) <=> 12/48000000 = 250ns                 */
#define  DATAFLASH_TCHS	          (0x01 << 24)                          /* 250ns min (tCSH) <=> (64*1+SCBR)/(2*48000000) */

                                                                        /* Configure the chip select pin with the desired settings  */
#define  DF_CS_SETTINGS 		 (AT91C_SPI_NCPHA                     | \
                                 (AT91C_SPI_DLYBS  & DATAFLASH_TCSS)  | \
                                 (AT91C_SPI_DLYBCT & DATAFLASH_TCHS)  | \
                               (((BSP_CPU_MclkFreq() * 2   /  AT91C_SPI_CLK) + 1) << 8))


/*
*********************************************************************************************************
*                                            TASKS PRIORITIES
*********************************************************************************************************
*/

#define  APP_TASK_START_PRIO                   5
#define  APP_TASK_BOOTLOADER_PRIO              6
#define  OS_VIEW_TASK_PRIO                     7
#define  OS_VIEW_TASK_ID                       7
#define  OS_TASK_TMR_PRIO                     10

/*
*********************************************************************************************************
*                                              STACK SIZES
*                            Size of the task stacks (# of OS_STK entries)
*********************************************************************************************************
*/

#define  APP_TASK_START_STK_SIZE             512
#define  APP_TASK_BOOTLOADER_STK_SIZE        512
#define  OS_VIEW_TASK_STK_SIZE               128

/*
*********************************************************************************************************
*                                           uC/OS-View CONSTANTS
*********************************************************************************************************
*/

#define  OS_VIEW_PARSE_TASK                     1                       /* Parsing of received packets will be done by a task   */
#define  OS_VIEW_TMR_32_BITS                    0                       /* uC/OS-View timer is 32 bits                          */
#define  OS_VIEW_TIMER_SEL                      2                       /* Choose an internal timer to use for OSView 0, 1, 2   */

#define  OS_VIEW_UART_0                         0

#define  OS_VIEW_COMM_SEL          OS_VIEW_UART_0                       /* Select a Comm Port to use with OSView                */

/*
*********************************************************************************************************
*                                           RS-232 CONSTANTS
*********************************************************************************************************
*/

#define  SER_UART_0                            0                /* UART0 selected                                           */
#define  SER_DBGU                              2                /* DBGU  selected                                           */
#define  SER_COMM_SEL                   SER_DBGU                /* Select DBGU  for printing                                */

/*
*********************************************************************************************************
*                                           DCC CONFIGURATION
*********************************************************************************************************
*/

#define  OS_CPU_ARM_DCC_EN                     1

/*
*********************************************************************************************************
*                                     TRACE / DEBUG CONFIGURATION*
*********************************************************************************************************
*/

#define  TRACE_LEVEL_OFF                       0
#define  TRACE_LEVEL_INFO                      1
#define  TRACE_LEVEL_DEBUG                     2

#define  APP_TRACE_LEVEL                TRACE_LEVEL_DEBUG
#define  APP_TRACE                        printf

#define  APP_TRACE_INFO(x)            ((APP_TRACE_LEVEL >= TRACE_LEVEL_INFO)  ? (void)(APP_TRACE x) : (void)0)
#define  APP_TRACE_DEBUG(x)           ((APP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) ? (void)(APP_TRACE x) : (void)0)




#endif

⌨️ 快捷键说明

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