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

📄 target.h

📁 讲述LPC2468在无操作系统条件下使用YAFFS文件系统是如何实现的以及完整的测试代码,代码部分详见lpc2468_yaffs2.rar
💻 H
字号:
/*****************************************************************************
 *   target.h:  Header file for NXP LPC23xx/24xx Family Microprocessors
 *
 *   Copyright(C) 2006, NXP Semiconductor
 *   All rights reserved.
 *
 *   History
 *   2006.09.20  ver 1.00    Prelimnary version, first Release
 *
******************************************************************************/
#ifndef __TARGET_H 
#define __TARGET_H

#ifdef __cplusplus
   extern "C" {
#endif

#define KEIL_BOARD_LPC23XX         0
#define EA_BOARD_LPC24XX           0
#define OLIMEX_BOARD_LPC2378_EK    1

/* If USB device is used, the CCLK setting needs to be 57.6Mhz, CCO will be 288Mhz
to get precise USB clock 48Mhz. If USB is not used, you set any clock you want
based on the table below. If you want to use USB, change "define USE_USB" from 0 to 1 */
 
#define	USE_USB					1

//This segment should not be modified
#ifndef TRUE
#define TRUE  1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#if USE_USB		/* 1 is USB, 0 is non-USB related */  
/* Fcck = 57.6Mhz, Fosc = 288Mhz, and USB 48Mhz */
#define PLL_MValue			12
#define PLL_NValue			0
#define CCLKDivValue		5
#define USBCLKDivValue		5

/* System configuration: Fosc, Fcclk, Fcco, Fpclk must be defined */
/* PLL input Crystal frequence range 4KHz~20MHz. */
/*Fcco = Fosc * 2 * (PLL_MValue + 1) / (PLL_NValue + 1)*/
#define Fosc	11059200
/* System frequence,should be less than 80MHz. */
#define Fcclk	47923200
#define Fcco	287539200
#else

/* Fcck = 50Mhz, Fosc = 300Mhz, and USB 48Mhz */
#define PLL_MValue			24
#define PLL_NValue			1
#define CCLKDivValue		5
#define USBCLKDivValue		6

/* System configuration: Fosc, Fcclk, Fcco, Fpclk must be defined */
/* PLL input Crystal frequence range 4KHz~20MHz. */
#define Fosc	12000000
/* System frequence,should be less than 80MHz. */
#define Fcclk	50000000
#define Fcco	300000000

#endif

/* APB clock frequence , must be 1/2/4 multiples of ( Fcclk/4 ). */
/* If USB is enabled, the minimum APB must be greater than 16Mhz */ 
#if USE_USB
#define Fpclk	(Fcclk / 1)
#else
#define Fpclk	(Fcclk / 4)
#endif

/******************************************************************************
** Function name:		TargetInit
**
** Descriptions:		Initialize the target board; it is called in a 
**				necessary place, change it as needed
**
** parameters:			None
** Returned value:		None
**
******************************************************************************/
extern void TargetInit(void);
extern void ConfigurePLL( void );
extern void TargetResetInit(void);

#ifdef __cplusplus
   }
#endif

#include <stdint.h>
#include <common/LPC24xx.h>					/* LPC23xx definitions */
#include <common/LPC_UTIL_DEFS.h>
#include <common/target.h>
#include <common/irq.h>
#include <common/can.h>
#include <common/armVIC.h>
#include <common/DataHandle.h>
#include <common/uart.h>
#include <common/ex_sdram.h>
#include <common/fio.h>
#include <common/uart.h>
#include <common/emac.h>
 
#endif /* end __TARGET_H */
/******************************************************************************
**                            End Of File
******************************************************************************/

⌨️ 快捷键说明

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