📄 init.cfg
字号:
/************************************************
*
* $Copyright 2001 Joseph J. Lemieux ALL RIGHTS RESERVED. $
*
* $Filename: C:\OSEKBook\src\CH01\cfg\init.cfg $
*
* Description: This file defines the lists of register and function
* initializers to be used in the application.
* three lists are automatically used as follows:
* InitResetRegs16 - 16 bit registers initialized
* after reset.
* InitResetRegs32 - 32 bit registers initialized
* after reset.
* InitFunctionList - List of functions to be invoked
* each time InitSystem is called.
* Fill in for each application.
*
************************************************/
#ifndef INITCFG
#define INITCFG
#include "register.h"
/************************************************
*
* Define lists of 16 bit registers for future
* initialization. Each list is passed to the
* interface InitReg16, which then sets the
* registers to the values
*
* The macros used to define each list are as
* below. They must appear in the following
* order:
*
* START_INIT_REG16_LIST(name,size)
* Start list of registers to be initialized.
* Only one allowed. size is number of add entries
* following.
* ADD_INIT_REG16_LIST(reg,value)
* register is the name of the PPC register as
* defined in registers.h.
* value is the 16 bit value that is written
* to the register.
* As many as required are included.
* END_INIT_REG16_LIST
* End the list. Only one appears for each list.
*
************************************************/
START_INIT_REG16_LIST(InitResetRegs16,2)
ADD_INIT_REG16_LIST(&usiuReg.rtcsc,0x0080)
ADD_INIT_REG16_LIST(&usiuReg.piscr,0x0000)
END_INIT_REG16_LIST
START_INIT_REG16_LIST(InitHardwareRegs16,0)
END_INIT_REG16_LIST
/************************************************
*
* Define lists of 32 bit registers for future
* initialization. Each list is passed to the
* interface InitReg32, which then sets the
* registers to the values
*
* The macros used to define each list are as
* below. They must appear in the following
* order:
*
* START_INIT_REG32_LIST(name,size)
* Start list of registers to be initialized.
* Only one allowed. size is number of add entries
* following.
* ADD_INIT_REG32_LIST(register,value)
* register is the name of the PPC register as
* defined in registers.h.
* value is the 32 bit value that is written
* to the register.
* As many as required are included.
* END_INIT_REG32_LIST
* End the list. Only one appears for each list.
*
************************************************/
START_INIT_REG32_LIST(InitResetRegs32,9)
ADD_INIT_REG32_LIST(&usiuReg.siumcr,0x00410400)
ADD_INIT_REG32_LIST(&usiuReg.sypcr,0xFFFFFF88)
ADD_INIT_REG32_LIST(&usiuReg.rtcsck,0x55CCAA33)
ADD_INIT_REG32_LIST(&usiuReg.rtck,0x55CCAA33)
ADD_INIT_REG32_LIST(&usiuReg.rtseck,0x55CCAA33)
ADD_INIT_REG32_LIST(&usiuReg.rtcalk,0x55CCAA33)
ADD_INIT_REG32_LIST(&usiuReg.sccr,0x00000200)
ADD_INIT_REG32_LIST(&usiuReg.simask,0x00000000)
ADD_INIT_REG32_LIST(&usiuReg.sipend,0x00000000)
END_INIT_REG32_LIST
START_INIT_REG32_LIST(InitHardwareRegs32,0)
END_INIT_REG32_LIST
/************************************************
*
* Define list of initialization functions for the
* application. Each function is executed each time
* the InitSystem function is called.
*
* The macros used to define each list are as
* below. They must appear in the following
* order:
*
* START_INIT_FUNCTION_LIST(name,size)
* Start list of registers to be initialized.
* Only one allowed. size is number of add entries
* following.
* ADD_INIT_FUNCTION_LIST(register,value)
* register is the name of the PPC register as
* defined in registers.h.
* value is the 32 bit value that is written
* to the register.
* As many as required are included.
* END_INIT_FUNCTION_LIST
* End the list. Only one appears for each list.
*
************************************************/
START_INIT_FUNCTION_LIST(InitFunctionList,0)
END_INIT_FUNCTION_LIST
#endif /* INITCFG */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -