dc550_hookswitchmonitor.h
来自「一款经典的数字电话设计资料」· C头文件 代码 · 共 41 行
H
41 行
/*****************************************************************************/
/* CONFIDENTIAL */
/* Sigpro Copyright 2003, All rights reserved */
/*****************************************************************************/
/* CLIENT: Telematrix */
/* PROJECT: DC550 Digital Centrex Phone */
/* FILE: dc550_hookswitchmonitor.h */
/*****************************************************************************/
/* This is the header file for dc550_hookswitchmonitor.c. */
/*****************************************************************************/
#ifndef __DC550_HOOKSWITCHMONITOR_HEADER__
#define __DC550_HOOKSWITCHMONITOR_HEADER__
#include "dc550_local.h"
/******************************************************************************
* FUNCTION PROTOTYPES
*****************************************************************************/
void hookswitchmonitor_init(void);
void hookswitchmonitor_exec(void);
unsigned int hookswitchmonitor_gethookswitchstate(void);
/******************************************************************************
* CONSTANTS
*****************************************************************************/
// Port definitions for signals used to monitor the hookswitch
#define HOOKSWITCH_DIR P6DIR
#define HOOKSWITCH_IN P6IN
#define HOOKSWITCH_MSK 0x10
/* Number of iterations the phone must be
* read as constantly on/off-hook in order
* to be considered fully debounced.
*/
#define HS_OFF_MAXCNT 10
#define HS_ON_MAXCNT 10
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?