📄 port.h
字号:
/*------------------------------------------------------------------*-
Port.H (v1.00)
------------------------------------------------------------------
'Port Header' (see Chap 10) for the project 0_01_12g (see Chap 14)
COPYRIGHT
---------
This code is from the book:
PATTERNS FOR TIME-TRIGGERED EMBEDDED SYSTEMS by Michael J. Pont
[Pearson Education, 2001; ISBN: 0-201-33138-1].
This code is copyright (c) 2001 by Michael J. Pont.
See book for copyright details and other information.
-*------------------------------------------------------------------*/
// ------ Sch51.C ----------------------------------------
// Comment this line out if error reporting is NOT required
#define SCH_REPORT_ERRORS
#ifdef SCH_REPORT_ERRORS
// The port on which error codes will be displayed
// ONLY USED IF ERRORS ARE REPORTED
#define Error_port P2
#endif
// ------ LED_Flas.C -----------------------------------------------
// Connect LED from +5V (etc) to this pin, via appropriate resistor
// [see Chapter 7 for details]
//165的时钟端,上升沿触发
sbit _165_clk=P2^0;
//165的数据端
sbit _165_sda=P2^1;
//165的锁存移位端,0锁存数据,1开始移位
sbit _165_sft=P2^2;
sbit LED_pin = P3^3;
//sbit DQ = P1^7;
sbit Buzzer = P2^6;
sbit _138_a = P1^0;
sbit _138_b = P1^1;
sbit _138_c = P1^2;
sbit _138_oe = P1^3;
sbit Right = P1^6;
sbit Left = P1^7;
sbit _164_sda = P1^4;
sbit _164_sck = P1^5;
sbit AlarmP = P2^7;
//sbit _164_sta = P1^6;
/*------------------------------------------------------------------*-
---- END OF FILE -------------------------------------------------
-*------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -