📄 clock_switching.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 : clock_switching.h
//* Object : Clock Switching Prototyping File.
//* 1.0 17/10/01 S.C : Creation
//* 1.1 05/mar/03 JPP : Set the old mode APMC definition
//*----------------------------------------------------------------------------
#ifndef clock_switching_h
#define clock_switching_h
#define MCK_INTERRUPT_LEVEL 7
//*-----------------------------------------------------------------------------
//* ------------------------- General constant definition ----------------------
//*-----------------------------------------------------------------------------
//* Set Presxaler Parameter
#define APMC_PRES_DIV4 2
#define APMC_PRES_DIV8 3
#define APMC_PRES APMC_PRES_DIV4
#define PRESCALER_VAL 4
#define MASK_PRESCALER 0x70
#define SHIFT_PRESCALER 4
#define EXTARNAL_CLOCK_Mhz 16
#define TO_LF_OSCILLATOR 0x0 /* The target frequency source is low frequency oscillator */
#define TO_HF_OSCILLATOR 0x1 /* The target frequency source is the main oscillator */
#define TO_PLL_OUTPUT 0x2 /* The target frequency source is the PLL output */
#define CSS_MASK 0xc000 /* All field are masked except CSS */
#define MAX_MUL 0x3f00 /* Maximum for the Multiplier field definition */
#define APMC_CSS_PLL 0x8000
#define APMC_MOSC_EN 0x2
#define APMC_CSS_MOSC 0x4000
#define APMC_CSS_LF 0x0
#define APMC_MOSCS 0x1
#define APMC_PLL_LOCK 0x2
#define B_MUL 8
/* Include Standard c Libraries to allow stand alone compiling and operation */
#define TRUE 1
#define FALSE 0
#define AIC_SRCTYPE_EXT_LOW_LEVEL AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE
//*-----------------------------------------------------------------------------
//* -------------------- General Function Prototyping -------------------------
//*-----------------------------------------------------------------------------
extern void mck_clock_speed (short source , char frequency_multiplier) ;
extern void set_Prescaler (unsigned int Prescaler);
#endif /* clock_switching_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -