📄 main.h
字号:
//*----------------------------------------------------------------------------
//* ATMEL Microcontroller Software Support - ROUSSET -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name : main.h
//* Object :
//*
//* 1.0 27/03/03 HIi : Creation
//* 1.01 03/05/04 HIi : AT9C_VERSION incremented to 1.01
//* 1.02 15/06/04 HIi : AT9C_VERSION incremented to 1.02 ==>
//* Add crc32 to verify dataflash download
//* 1.03 25/05/05 GGi : AT9C_VERSION incremented to 1.03 ==> 9261 version
//*----------------------------------------------------------------------------
#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 + -