📄 peripherals.h
字号:
/******************************************************************************
* COPYRIGHT (c) MOTOROLA 2002
* FILE NAME: peripherals.c REVISION 2.1
*
* PURPOSE: external declaration of on-chip peripheral variables for Star12.
*
*******************************************************************************
*******************************************************************************
** THIS CODE IS ONLY INTENDED AS AN EXAMPLE FOR THE METROWERKS COMPILER AND **
** THE STAR12 EVB AND HAS ONLY BEEN GIVEN A MIMIMUM LEVEL OF TEST. **
** IT IS PROVIDED 'AS SEEN' WITH NO GUARANTEES AND NO PROMISE OF SUPPORT. **
*******************************************************************************
*******************************************************************************
*
*
* DESCRIPTION: external declarations for control register blocks of on-chip
* peripherals.
* Include this file in programs that interact with on-chip
* peripherals.
*
* AUTHOR: r32151 LOCATION: SPS EKB
*
* UPDATE HISTORY
* REV AUTHOR DATE DESCRIPTION OF CHANGE
* --- ------ --------- ---------------------
* 1.0 M.Gallop 14/08/01 Original coding
* 2.0 M.Gallop 07/11/01 Added optional compilation and MC9S12Dx128
* declarations.
* 2.1 M.Gallop 07/05/02 Added optional compilation and MC9S12Dx64
* declarations.
* 2.2 r58711 19/09/02 Added optional compilation and MC9S12C32
* declarations.
******************************************************************************/
/*===========================================================================*/
/* Motorola reserves the right to make changes without further notice to any */
/* product herein to improve reliability, function, or design. Motorola does */
/* not assume any liability arising out of the application or use of any */
/* product, circuit, or software described herein; neither does it convey */
/* any license under its patent rights nor the rights of others. Motorola */
/* products are not designed, intended, or authorized for use as components */
/* in systems intended for surgical implant into the body, or other */
/* applications intended to support life, or for any other application in */
/* which the failure of the Motorola product could create a situation where */
/* personal injury or death may occur. Should Buyer purchase or use Motorola */
/* products for any such intended or unauthorized application, Buyer shall */
/* indemnify and hold Motorola and its officers, employees, subsidiaries, */
/* affiliates, and distributors harmless against all claims costs, damages, */
/* and expenses, and reasonable attorney fees arising out of, directly or */
/* indirectly, any claim of personal injury or death associated with such */
/* unintended or unauthorized use, even if such claim alleges that Motorola */
/* was negligent regarding the design or manufacture of the part. Motorola */
/* and the Motorola logo* are registered trademarks of Motorola Ltd. */
/*****************************************************************************/
#ifndef S12_PERIPHERALS_H //prevent duplicated includes
#define S12_PERIPHERALS_H
#include "s12_common.h"
#include "s12_register.h"
#include "s12_pim.h"
#include "s12_crg.h"
#include "s12_timer.h"
#include "s12_atd.h"
#include "s12_eeprom.h"
#include "s12_flash.h"
#include "s12_iic.h"
#include "s12_mscan.h"
#include "s12_page.h"
#include "s12_pwm.h"
#include "s12_spi.h"
#include "s12_sci.h"
#include "s12_bdlc.h"
#include "s12_byteflight.h"
/**** peripheral definitions compatible with MC9S12Dx256 ****/
#ifdef S12DP256
#pragma DATA_SEG S12_REG
extern tREGISTER Regs;
#pragma DATA_SEG S12_PLL
extern tCRG Crg;
#pragma DATA_SEG S12_TIMER
extern tTIMER Timer;
#pragma DATA_SEG S12_PIM
extern tPIM Pim;
#pragma DATA_SEG S12_CAN0
extern tMSCAN Can0;
#pragma DATA_SEG S12_CAN1
extern tMSCAN Can1;
#pragma DATA_SEG S12_CAN2
extern tMSCAN Can2;
#pragma DATA_SEG S12_CAN3
extern tMSCAN Can3;
#pragma DATA_SEG S12_CAN4
extern tMSCAN Can4;
#pragma DATA_SEG S12_ATD0
extern tATD Atd0;
#pragma DATA_SEG S12_ATD1
extern tATD Atd1;
#pragma DATA_SEG S12_PWM
extern tPWM Pwm;
#pragma DATA_SEG S12_SCI0
extern tSCI Sci0;
#pragma DATA_SEG S12_SCI1
extern tSCI Sci1;
#pragma DATA_SEG S12_SPI0
extern tSPI Spi0;
#pragma DATA_SEG S12_SPI1
extern tSPI Spi1;
#pragma DATA_SEG S12_SPI2
extern tSPI Spi2;
#pragma DATA_SEG S12_FLASH
extern tFLASH Flash;
#pragma DATA_SEG S12_EEPROM
extern tEEPROM Eeprom;
#pragma DATA_SEG S12_IIC
extern tIIC Iic;
#pragma DATA_SEG S12_PAGE
extern tPAGE Page;
#pragma DATA_SEG S12_BDLC
extern tBDLC Bdlc;
#endif /* S12DP256 */
/**** peripheral definitions compatible with MC9S12Dx128 ****/
#ifdef S12DX128
#pragma DATA_SEG S12_REG
extern tREGISTER Regs;
#pragma DATA_SEG S12_PLL
extern tCRG Crg;
#pragma DATA_SEG S12_TIMER
extern tTIMER Timer;
#pragma DATA_SEG S12_PIM
extern tPIM Pim;
#pragma DATA_SEG S12_CAN0
extern tMSCAN Can0;
#pragma DATA_SEG S12_CAN1
extern tMSCAN Can1;
#pragma DATA_SEG S12_CAN4
extern tMSCAN Can4;
#pragma DATA_SEG S12_ATD0
extern tATD Atd0;
#pragma DATA_SEG S12_ATD1
extern tATD Atd1;
#pragma DATA_SEG S12_PWM
extern tPWM Pwm;
#pragma DATA_SEG S12_SCI0
extern tSCI Sci0;
#pragma DATA_SEG S12_SCI1
extern tSCI Sci1;
#pragma DATA_SEG S12_SPI0
extern tSPI Spi0;
#pragma DATA_SEG S12_SPI1
extern tSPI Spi1;
#pragma DATA_SEG S12_FLASH
extern tFLASH Flash;
#pragma DATA_SEG S12_EEPROM
extern tEEPROM Eeprom;
#pragma DATA_SEG S12_IIC
extern tIIC Iic;
#pragma DATA_SEG S12_PAGE
extern tPAGE Page;
#pragma DATA_SEG S12_BDLC
extern tBDLC Bdlc;
#pragma DATA_SEG S12_BYTEFLIGHT
extern tBYTEFLIGHT byteFlight;
#endif /* S12DX128 */
/**** peripheral definitions compatible with MC9S12Dx64 ****/
#ifdef S12DX64
#pragma DATA_SEG S12_REG
extern tREGISTER Regs;
#pragma DATA_SEG S12_PLL
extern tCRG Crg;
#pragma DATA_SEG S12_TIMER
extern tTIMER Timer;
#pragma DATA_SEG S12_PIM
extern tPIM Pim;
#pragma DATA_SEG S12_CAN0
extern tMSCAN Can0;
#pragma DATA_SEG S12_ATD0
extern tATD Atd0;
#pragma DATA_SEG S12_ATD1
extern tATD Atd1;
#pragma DATA_SEG S12_PWM
extern tPWM Pwm;
#pragma DATA_SEG S12_SCI0
extern tSCI Sci0;
#pragma DATA_SEG S12_SCI1
extern tSCI Sci1;
#pragma DATA_SEG S12_SPI0
extern tSPI Spi0;
#pragma DATA_SEG S12_FLASH
extern tFLASH Flash;
#pragma DATA_SEG S12_EEPROM
extern tEEPROM Eeprom;
#pragma DATA_SEG S12_IIC
extern tIIC Iic;
#pragma DATA_SEG S12_PAGE
extern tPAGE Page;
#pragma DATA_SEG S12_BDLC
extern tBDLC Bdlc;
#endif /* S12Dx64 */
/**** peripheral definitions compatible with MC9S12C32 ****/
#ifdef S12C32
#pragma DATA_SEG S12_REG
extern tREGISTER Regs;
#pragma DATA_SEG S12_PAGE
extern tPAGE Page;
#pragma DATA_SEG S12_CRG
extern tCRG Crg;
#pragma DATA_SEG S12_TIMER
extern tTIMER Timer;
#pragma DATA_SEG S12_ATD0
extern tATD Atd0;
#pragma DATA_SEG S12_SCI0
extern tSCI Sci0;
#pragma DATA_SEG S12_SPI0
extern tSPI Spi0;
#pragma DATA_SEG S12_PWM
extern tPWM Pwm;
#pragma DATA_SEG S12_FLASH
extern tFLASH Flash;
#pragma DATA_SEG S12_CAN0
extern tMSCAN Can0;
#pragma DATA_SEG S12_PIM
extern tPIM Pim;
#endif /* S12C32 */
#pragma DATA_SEG DEFAULT
#endif /* S12_PERIPHERALS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -