📄 c33std.h
字号:
/****************************************************************************
* *
* C33 Standard Macro Header *
* *
* Copyright (C) SEIKO EPSON CORP. 2003 *
* *
* Function *
* C33 I/O *
* *
* Comment *
* *
* c33301.h, c33l11.h *
* *
* *
* Revision history *
* 2003/07/24 TaTeishi First revision (MISC module only) *
* 2003/07/25 TaTeishi add Key, Port *
* *
****************************************************************************/
#ifndef _C33STD_H_
#define _C33STD_H_
/****************************************************************************
* I/O register (Io0) [0x000-0x2ff] *
****************************************************************************/
typedef struct{
/* Prescaler (Psc) [0x000] */
volatile unsigned char Padding0[0x150];
/* Clock Timer (ClkTim) [0x150] */
volatile unsigned char Padding1[0x10];
/* 8bit Timer (Tim8) [0x160] */
volatile unsigned char Padding2[0x20];
/* Power Control (Pow) [0x180] */
volatile unsigned char Padding3[0x60];
/* Serial I/F (Sio) [0x1e0] */
volatile unsigned char Padding4[0x60];
/* A/D Converter (Adc) [0x240] */
volatile unsigned char Padding5[0x20];
/* Interrupt Controler (Itc) [0x260] */
volatile unsigned char Padding6[0x30];
/* DMA (Dma) [0x290] */
volatile unsigned char Padding7[0x10];
/* Extended Interrupt Controler (ExItc) [0x2a0] */
volatile unsigned char Padding8[0x20];
/* Key Port (Key) [0x2c0] */
struct{
union{
volatile unsigned char byte;
struct{
volatile unsigned char K50 : 1;
volatile unsigned char K51 : 1;
volatile unsigned char K52 : 1;
volatile unsigned char K53 : 1;
volatile unsigned char K54 : 1;
volatile unsigned char Rsv : 3;
} bit;
} K5xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char K50 : 1;
volatile unsigned char K51 : 1;
volatile unsigned char K52 : 1;
volatile unsigned char K53 : 1;
volatile unsigned char K54 : 1;
volatile unsigned char Rsv : 3;
} bit;
} K5xDat;
volatile unsigned char Padding0;
union{
volatile unsigned char byte;
struct{
volatile unsigned char K60 : 1;
volatile unsigned char K61 : 1;
volatile unsigned char K62 : 1;
volatile unsigned char K63 : 1;
volatile unsigned char K64 : 1;
volatile unsigned char K65 : 1;
volatile unsigned char K66 : 1;
volatile unsigned char K67 : 1;
} bit;
} K6xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char K60 : 1;
volatile unsigned char K61 : 1;
volatile unsigned char K62 : 1;
volatile unsigned char K63 : 1;
volatile unsigned char K64 : 1;
volatile unsigned char K65 : 1;
volatile unsigned char K66 : 1;
volatile unsigned char K67 : 1;
} bit;
} K6xDat;
volatile unsigned char Padding1;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpt0 : 2;
volatile unsigned char Fpt1 : 2;
volatile unsigned char Fpt2 : 2;
volatile unsigned char Fpt3 : 2;
} bit;
} FptSel0;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpt4 : 2;
volatile unsigned char Fpt5 : 2;
volatile unsigned char Fpt6 : 2;
volatile unsigned char Fpt7 : 2;
} bit;
} FptSel1;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpt0 : 1;
volatile unsigned char Fpt1 : 1;
volatile unsigned char Fpt2 : 1;
volatile unsigned char Fpt3 : 1;
volatile unsigned char Fpt4 : 1;
volatile unsigned char Fpt5 : 1;
volatile unsigned char Fpt6 : 1;
volatile unsigned char Fpt7 : 1;
} bit;
} FptPol;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpt0 : 1;
volatile unsigned char Fpt1 : 1;
volatile unsigned char Fpt2 : 1;
volatile unsigned char Fpt3 : 1;
volatile unsigned char Fpt4 : 1;
volatile unsigned char Fpt5 : 1;
volatile unsigned char Fpt6 : 1;
volatile unsigned char Fpt7 : 1;
} bit;
} FptEdge;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpk0x : 2;
volatile unsigned char Fpk1x : 2;
volatile unsigned char Rsv : 4;
} bit;
} FpkSel;
volatile unsigned char Padding2;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpk00 : 1;
volatile unsigned char Fpk01 : 1;
volatile unsigned char Fpk02 : 1;
volatile unsigned char Fpk03 : 1;
volatile unsigned char Fpk04 : 1;
volatile unsigned char Rsv : 3;
} bit;
} FpkPol0;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpk10 : 1;
volatile unsigned char Fpk11 : 1;
volatile unsigned char Fpk12 : 1;
volatile unsigned char Fpk13 : 1;
volatile unsigned char Rsv : 4;
} bit;
} FpkPol1;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpk00 : 1;
volatile unsigned char Fpk01 : 1;
volatile unsigned char Fpk02 : 1;
volatile unsigned char Fpk03 : 1;
volatile unsigned char Fpk04 : 1;
volatile unsigned char Rsv : 3;
} bit;
} FpkEna0;
union{
volatile unsigned char byte;
struct{
volatile unsigned char Fpk10 : 1;
volatile unsigned char Fpk11 : 1;
volatile unsigned char Fpk12 : 1;
volatile unsigned char Fpk13 : 1;
volatile unsigned char Rsv : 4;
} bit;
} FpkEna1;
} Key;
/* I/O Port (Port) [0x2d0] */
struct{
union{
volatile unsigned char byte;
struct{
volatile unsigned char P00 : 1;
volatile unsigned char P01 : 1;
volatile unsigned char P02 : 1;
volatile unsigned char P03 : 1;
volatile unsigned char P04 : 1;
volatile unsigned char P05 : 1;
volatile unsigned char P06 : 1;
volatile unsigned char P07 : 1;
} bit;
} P0xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P00 : 1;
volatile unsigned char P01 : 1;
volatile unsigned char P02 : 1;
volatile unsigned char P03 : 1;
volatile unsigned char P04 : 1;
volatile unsigned char P05 : 1;
volatile unsigned char P06 : 1;
volatile unsigned char P07 : 1;
} bit;
} P0xDat;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P00 : 1;
volatile unsigned char P01 : 1;
volatile unsigned char P02 : 1;
volatile unsigned char P03 : 1;
volatile unsigned char P04 : 1;
volatile unsigned char P05 : 1;
volatile unsigned char P06 : 1;
volatile unsigned char P07 : 1;
} bit;
} P0xCtl;
volatile unsigned char Padding0;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P10 : 1;
volatile unsigned char P11 : 1;
volatile unsigned char P12 : 1;
volatile unsigned char P13 : 1;
volatile unsigned char P14 : 1;
volatile unsigned char P15 : 1;
volatile unsigned char P16 : 1;
volatile unsigned char P17 : 1;
} bit;
} P1xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P10 : 1;
volatile unsigned char P11 : 1;
volatile unsigned char P12 : 1;
volatile unsigned char P13 : 1;
volatile unsigned char P14 : 1;
volatile unsigned char P15 : 1;
volatile unsigned char P16 : 1;
volatile unsigned char P17 : 1;
} bit;
} P1xDat;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P10 : 1;
volatile unsigned char P11 : 1;
volatile unsigned char P12 : 1;
volatile unsigned char P13 : 1;
volatile unsigned char P14 : 1;
volatile unsigned char P15 : 1;
volatile unsigned char P16 : 1;
volatile unsigned char P17 : 1;
} bit;
} P1xCtl;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P33 : 1;
volatile unsigned char P16 : 1;
volatile unsigned char P15 : 1;
volatile unsigned char P32 : 1;
volatile unsigned char Rsv : 4;
} bit;
} Ex2Sel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P20 : 1;
volatile unsigned char P21 : 1;
volatile unsigned char P22 : 1;
volatile unsigned char P23 : 1;
volatile unsigned char P24 : 1;
volatile unsigned char P25 : 1;
volatile unsigned char P26 : 1;
volatile unsigned char P27 : 1;
} bit;
} P2xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P20 : 1;
volatile unsigned char P21 : 1;
volatile unsigned char P22 : 1;
volatile unsigned char P23 : 1;
volatile unsigned char P24 : 1;
volatile unsigned char P25 : 1;
volatile unsigned char P26 : 1;
volatile unsigned char P27 : 1;
} bit;
} P2xDat;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P20 : 1;
volatile unsigned char P21 : 1;
volatile unsigned char P22 : 1;
volatile unsigned char P23 : 1;
volatile unsigned char P24 : 1;
volatile unsigned char P25 : 1;
volatile unsigned char P26 : 1;
volatile unsigned char P27 : 1;
} bit;
} P2xCtl;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P27 : 1;
volatile unsigned char P26 : 1;
volatile unsigned char P25 : 1;
volatile unsigned char P24 : 1;
volatile unsigned char Rsv : 4;
} bit;
} Ex1Sel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P30 : 1;
volatile unsigned char P31 : 1;
volatile unsigned char P32 : 1;
volatile unsigned char P33 : 1;
volatile unsigned char P34 : 1;
volatile unsigned char P35 : 1;
volatile unsigned char P36 : 1;
volatile unsigned char P37 : 1;
} bit;
} P3xSel;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P30 : 1;
volatile unsigned char P31 : 1;
volatile unsigned char P32 : 1;
volatile unsigned char P33 : 1;
volatile unsigned char P34 : 1;
volatile unsigned char P35 : 1;
volatile unsigned char P36 : 1;
volatile unsigned char P37 : 1;
} bit;
} P3xDat;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P30 : 1;
volatile unsigned char P31 : 1;
volatile unsigned char P32 : 1;
volatile unsigned char P33 : 1;
volatile unsigned char P34 : 1;
volatile unsigned char P35 : 1;
volatile unsigned char P36 : 1;
volatile unsigned char P37 : 1;
} bit;
} P3xCtl;
union{
volatile unsigned char byte;
struct{
volatile unsigned char P12_14 : 1;
volatile unsigned char P10_11_13 : 1;
volatile unsigned char P21 : 1;
volatile unsigned char P31 : 1;
volatile unsigned char P04 : 1;
volatile unsigned char P05 : 1;
volatile unsigned char P06 : 1;
volatile unsigned char P07 : 1;
} bit;
} Ex0Sel;
} Port;
/* Reserved [0x2e0] */
volatile unsigned char Padding[0x10];
} T_IO0;
/****************************************************************************
* I/O register (Io1) [0x000-2ff] *
****************************************************************************/
typedef struct{
/* Reserved [0x000] */
volatile unsigned char Padding0[0x120];
/* Bus Controler (Bcu) [0x120] */
volatile unsigned char Padding2[0x60];
/* 16bit Timer (Tim16) [0x180] */
volatile unsigned char Padding3[0x80];
/* IDMA Controler (Idma) [0x200] */
volatile unsigned char Padding4[0x20];
/* HSDMA Controler (Hsdma) [0x220] */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -