📄 cpu.c
字号:
/*
** ###################################################################
**
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**
** Filename : Cpu.C
**
** Project : LK24E
**
** Processor : MC68HC908LK24FAC_80
**
** Beantype : MC68HC908LK24_80
**
** Version : Bean 01.001, Driver 01.17, CPU db: 2.89.000
**
** Compiler : Metrowerks HC08 C Compiler
**
** Date/Time : 2004-1-3, 17:14
**
** Abstract :
**
** This bean "MC68HC908LK24_80" implements properties, methods,
** and events of the CPU.
**
** Settings :
**
** Clock setting
** External clock : 0.032768 MHz
** CPU mode selection : Monitor mode
** Initialization interrupt priority : 1
** LVI module : no
**
** Speed modes
** High speed clock : Main clock frequency / 1
** Internal bus clock : 0.008192 MHz
** Low speed mode : Disabled
** Slow speed mode : Disabled
**
** Contents :
**
** GetSpeedMode - byte Cpu_GetSpeedMode(void);
** EnableInt - void Cpu_EnableInt(void);
** DisableInt - void Cpu_DisableInt(void);
**
**
** (c) Copyright UNIS, spol. s r.o. 1997-2002
**
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
**
** http : www.processorexpert.com
** mail : info@processorexpert.com
**
** ###################################################################
*/
/* MODULE Cpu. */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Events.h"
#include "Cpu.h"
#define CGM_DELAY 255
/* Global variables */
volatile byte CCR_reg; /* Current CCR register */
byte CpuMode = HIGH_SPEED; /* Current speed mode */
/*
** ===================================================================
** Method : Cpu_Interrupt (bean MC68HC908LK24_80)
**
** Description :
** This method is internal. It is used by Processor Expert
** only.
** ===================================================================
*/
__interrupt void Cpu_Interrupt(void)
{
}
/*
** ===================================================================
** Method : Cpu_SWIInterrupt (bean MC68HC908LK24_80)
**
** Description :
** This method is internal. It is used by Processor Expert
** only.
** ===================================================================
*/
__interrupt void Cpu_SWIInterrupt(void)
{
Cpu_OnSwINT(); /* Invoke user event */
}
/*
** ===================================================================
** Method : Cpu_DisableInt (bean MC68HC908LK24_80)
**
** Description :
** Disable maskable interrupts
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void Cpu_DisableInt(void)
** This method is implemented as macro in the header module. **
*/
/*
** ===================================================================
** Method : Cpu_EnableInt (bean MC68HC908LK24_80)
**
** Description :
** Enable maskable interrupts
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void Cpu_EnableInt(void)
** This method is implemented as macro in the header module. **
*/
/*
** ===================================================================
** Method : Cpu_GetSpeedMode (bean MC68HC908LK24_80)
**
** Description :
** Get current speed mode
** Parameters : None
** Returns :
** --- - Speed mode (HIGH_SPEED, LOW_SPEED,
** SLOW_SPEED)
** ===================================================================
*/
byte Cpu_GetSpeedMode(void)
{
return CpuMode; /* Result the actual cpu mode */
}
/*
** ===================================================================
** Method : _EntryPoint (bean MC68HC908LK24_80)
**
** Description :
** This method is internal. It is used by Processor Expert
** only.
** ===================================================================
*/
extern void _Startup(void); /* Forward declaration of external startup function declared in file Start12.c */
#pragma NO_FRAME
#pragma NO_EXIT
void _EntryPoint(void)
{
/*** ### MC68HC908LK24_80 "Cpu" init code ... ***/
/*** PE initialization code after reset ***/
/* System clock initialization */
/* CONFIG1: COPRS=0,LVISTOP=0,LVIRSTD=0,LVIPWRD=1,??=0,SSREC=0,STOP=0,COPD=1 */
CONFIG1 = 17; /* Set the CONFIG1 register */
/* CONFIG2: PEE=0,STOP_IRCDIS=0,STOP_XCLKEN=0,DIV2CLK=0,PCEH=0,PCEL=0,LVISEL1=0,LVISEL0=0 */
CONFIG2 = 0; /* Set the CONFIG2 register */
/*** End of PE initialization code after reset ***/
__asm jmp _Startup ; /* Jump to C startup code */
}
/*
** ===================================================================
** Method : PE_low_level_init (bean MC68HC908LK24_80)
**
** Description :
** This method is internal. It is used by Processor Expert
** only.
** ===================================================================
*/
void PE_low_level_init(void)
{
/* Common initialization of the CPU registers */
/* ### MC68HC908LK24_80 "Cpu" init code ... */
__EI(); /* Enable interrupts */
}
/* END Cpu. */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 03.23 for
** the Motorola HC08 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -