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

📄 main.h

📁 关于测试at91sam9260的各种驱动和功能的测试源代码。
💻 H
字号:
/*************************************** Copyright (c) *************************************************
*
*			            POLAR STAR
*				   北天星国际有限公司
*				   http://www.po-star.com
*
*文 件 名: main.h 
*
*编译环境:ADS1.2
*
********************************************************************************************************/



#ifndef main_h
#define main_h

#include "AT91SAM9260.h"
#include "lib_AT91SAM9260.h"

#define TRUE	(1==1)
#define FALSE	(1==0)

#undef MCK_100_MHZ

#ifdef MCK_100_MHZ
#define AT91C_MASTER_CLOCK              99300000 
#else
#define AT91C_MASTER_CLOCK              45174500
#endif

#define AT91C_MASTER_CLOCK_FOR_I2S      45174500

#define AT91C_BAUD_RATE                 115200

#define AT91C_OFFSET_VECT6              0x14        //* Offset for ARM vector 6

#define AT91C_VERSION   "VER 1.0"


/*-----------------*/
/* Leds Definition */
/*-----------------*/
#define LED_POWER       (1<<9) // PA9

#define LED1            (1<<6)	// PA6
#define NB_LEB			 1

#define LED_MASK        (LED1)

/*--------------------*/
/* Buttons Definition */
/*--------------------*/
#define BUTTON3         (1<<30)	// PA30
#define BUTTON4         (1<<31)	// PA31

#define NB_BUTTONS 			 2

#define BUTTON_MASK     (BUTTON3|BUTTON4)


#define AT91C_ATMEL_WAVE	0x21000000


/*-------------------*/
/* TYPES DEFINITIONS */
/*-------------------*/
typedef unsigned char   u_char;
typedef unsigned short  u_short;
typedef unsigned int	u_int;

typedef unsigned int    uint;
typedef unsigned long	u_long;

typedef unsigned char   uint8_t;
typedef unsigned short  uint16_t;
typedef unsigned int    uint32_t;

typedef unsigned char	uchar;
typedef unsigned short	ushort;
typedef unsigned long	ulong;



// Global variables and functions definition
extern void AT91F_Configure_DBGU (unsigned int uClock);
extern void AT91F_DBGU_Printk(char *);
extern unsigned int AT91F_Wait4KeyPressed(void);

extern unsigned int AT91F_SetPLL(void);
extern void AT91F_InitSDRAM (unsigned int uClock);

#endif

⌨️ 快捷键说明

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