rccu.h

来自「以ST公司CPU为核心的彩色电视机的完整源程序。」· C头文件 代码 · 共 52 行

H
52
字号
#ifndef _RCCU
#define _RCCU


/************************************************************************/
/*      ST9+ family RCCU control registers    release 4.0       */
/*                                                                      */
/*      ST9+ FAMILY RCCU CONTROL REGISTERS.                             */
/*                                                                      */
/************************************************************************/

#define RCCU_PG  ((unsigned char)55)                             /* RCCU page */


register volatile unsigned char CLKCTL  asm("R240");            /* Clock Control register */


#define Cm_lpowfi  ((unsigned char)0x01)                       /* Low Power Mode during Wait for interrupt*/
#define Cm_wficksel  ((unsigned char)0x02)                     /* WFI Clock select*/
#define Cm_ckafsel  ((unsigned char)0x04)                      /* Alternate Function Clock Select */
#define Cm_sresen  ((unsigned char)0x08)                       /* HALT command  */
#define Cm_intsel  ((unsigned char)0x80)                       /* Interrupt selection */


register volatile unsigned char CLK_FLAG  asm("R242");         /* Clock Flag register */


#define Cm_csucksel  ((unsigned char)0x01)                     /* System Clock selection */
#define Cm_ckafst  ((unsigned char)0x04)                       /* Flag for alternate function clock */
#define Cm_xtdiv16 ((unsigned char)0x08)                       /* CLOCK2/16 selection */
#define Cm_xtstop  ((unsigned char)0x10)                       /* Xtal oscillator stop */
#define Cm_softres  ((unsigned char)0x20)                      /* Software reset flag */
#define Cm_wdgres ((unsigned char)0x40)                        /* Watchdog reset flag */
#define Cm_exstp ((unsigned char)0x80)                         /* external stop flag */

register volatile unsigned char PLLCONF  asm("R246");         /* PLL configuration register */


#define Cm_mul14  ((unsigned char)0x20)                     /* PLL multiplication factor : 14 */
#define Cm_mul10  ((unsigned char)0x00)                     /* PLL multiplication factor : 10*/
#define Cm_mul8 ((unsigned char)0x30)                       /* PLL multiplication factor : 8*/
#define Cm_mul6  ((unsigned char)0x10)                      /* PLL multiplication factor : 6*/
#define Cm_div1  ((unsigned char)0x00)                      /* PLL divider factor : 1*/
#define Cm_div2 ((unsigned char)0x01)                       /* PLL divider factor : 2*/
#define Cm_div3 ((unsigned char)0x02)                       /* PLL divider factor : 3*/
#define Cm_div4  ((unsigned char)0x03)                      /* PLL divider factor : 4*/
#define Cm_div5 ((unsigned char)0x04)                       /* PLL divider factor : 5*/
#define Cm_div6 ((unsigned char)0x05)                       /* PLL divider factor : 6*/
#define Cm_div7 ((unsigned char)0x06)                       /* PLL divider factor : 7*/
#define Cm_plloff ((unsigned char)0x07)                     /* PLL OFF */

#endif

⌨️ 快捷键说明

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