📄 tele_control.h
字号:
#ifndef _tele_control_H_
#define _tele_control_H_
//******************************
//define variable
//******************************
#include <pic.h>
#define uchar unsigned char
#define uint unsigned int
//***********************************
//define the address of ds1302
//***********************************
#define ds1302_sec 0x80
#define ds1302_min 0x82
#define ds1302_hour 0x84
#define ds1302_day 0x86
#define ds1302_month 0x88
#define ds1302_week 0x8a
#define ds1302_year 0x8c
#define ds1302_control 0x8e
#define ds1302_charger 0x90
#define ds1302_clkburst 0xbe
////////////////////////////
#define adr_jdqtimer 0xc0
#define adr_jdqsta 0xe0
#define adr_password 0xf0
#define adr_ringtimes 0xe2
//************************************
//define I/o port
//************************************
static volatile bit SCK595 @ (unsigned)&PORTC*8+6; //595 clock
static volatile bit RCK595 @ (unsigned)&PORTC*8+5; //595 put data
static volatile bit SEC595 @ (unsigned)&PORTC*8+4; //595 data
static volatile bit CLK1302 @ (unsigned)&PORTB*8+3; //DS1302 clock
static volatile bit DAT1302 @ (unsigned)&PORTB*8+2; //DS1302 data
static volatile bit RST1302 @ (unsigned)&PORTB*8+1; //DS1302 rst
static volatile bit HANG0 @ (unsigned)&PORTA*8+5; //Key hang 0
static volatile bit HANG1 @ (unsigned)&PORTC*8+7; //Key hang 1
static volatile bit LIE0 @ (unsigned)&PORTC*8+0; //Key lie 0
static volatile bit LIE1 @ (unsigned)&PORTC*8+1; //Key lie 1
static volatile bit LIE2 @ (unsigned)&PORTC*8+2; //Key lie 2
static volatile bit LIE3 @ (unsigned)&PORTC*8+3; //Key lie 3
static volatile bit JDQ0 @ (unsigned)&PORTB*8+5; //ji dian qu 0
static volatile bit JDQ1 @ (unsigned)&PORTB*8+4; //ji dian qu 1
static volatile bit JDQ2 @ (unsigned)&PORTB*8+6; //ji dian qu 2
static volatile bit JDQ3 @ (unsigned)&PORTB*8+7; //ji dian qu 3
//RC0~3 the telephone number value,input
static volatile bit CHANGE @ (unsigned)&PORTB*8+0; //voice change succed?
static volatile bit BUSY @ (unsigned)&PORTA*8+4; //telephone busy test
static volatile bit PHONEUP @ (unsigned)&PORTA*8+0; //touch the phone?
static volatile bit PHONEIN @ (unsigned)&PORTA*8+1; //phoneing?
static volatile bit VOICE @ (unsigned)&PORTA*8+3; //voice to the other phone
static volatile bit ANALOGUP @ (unsigned)&PORTA*8+2;//analog to phoned
//*************************************************
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -