📄 include.h
字号:
/*******************************************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** *
* *** + *
* *** + + *** Common include file *
* *** +++ *** *
* *** *** *
* ************ *
* ********** *
* *
*******************************************************************************************************
* *
*******************************************************************************************************
* Compiler: Keil C51 *
* Target platform: 8051F005 *
*******************************************************************************************************
* Revision history: *
* Initial release, HKI, 01.08.2004 *
******************************************************************************************************/
#ifndef INCLUDE_H
#define INCLUDE_H
/******************************************************************************************************
* Standard include files *
******************************************************************************************************/
#include <c8051f000.h>
/******************************************************************************************************
* MCU port and signal definitions *
******************************************************************************************************/
// Pin names are equivalent to the naming in the schematics
#define A_PDATA P2
#define PKT_ACTIVE GIO1
#define CRC_OK GIO6
#define IN_SEL M_BTN
#define PAGEREG EMI0CN
sbit A_STR = P0^6;
sbit A_LRCK = P1^1;
sbit A_BCLK16 = P1^2;
sbit FIFO = P1^3;
sbit PKT = P1^4;
sbit R_TX = P1^5;
sbit R_RX = P1^6;
sbit GIO1 = P1^7;
sbit GIO6 = P3^0;
sbit M_SPI_CS = P3^1;
sbit M_BLED = P3^2;
sbit A_OE4094 = P3^3;
sbit S_RST = P3^4;
sbit M_MASTER = P3^5;
sbit M_BTN = P3^6;
sbit M_GLED = P3^7;
/******************************************************************************************************
* Common state/control definitions *
******************************************************************************************************/
// Key status bytes at absolute addresses for monitoring/debugging
#define statePtr 0x20
#define systemFlagsPtr 0x21
#define RegBank0R4ptr 0x04
#define RegBank0R5ptr 0x05
#define RegBank0R6ptr 0x06
#define RegBank0R7ptr 0x07
#define SYS_ID 0xA0
/*****************************************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -