
/* ************************************************************************* */
/*
 *	status.h
 *
 *	(C) 1994, 1995 VoCAL Technologies Ltd.
 *
 *	ALL RIGHTS RESERVED.  PROPRIETARY AND CONFIDENTIAL.
 *
 *	VoCAL Technologies Ltd.
 *	3032 Scott Blvd.
 *	Santa Clara, CA 95054
 *
 *	Product:	ADI PUMP
 *
 *	Module:		INCLUDE
 *
 *	Define status event specific codes.
 *
 *	Revision Number:	$Revision: 1.15 $
 *	Revision Status:	$State: Exp $
 *	Last Modified:		$Date: 2000/02/05 14:26:57 $
 *	Identification:		$Id: status.h,v 1.15 2000/02/05 14:26:57 rick Exp $
 *
 *
 */
/* ************************************************************************* */

/* ************************************************************************* */
/*
 *	Define event/status types and mask
 *
 *	Bits 14 and 13 of the event/status type are used in the following combinations
 *
 *	14	13	Produced by				Used by					Notes
 *	0	0	Pump/Controller/Host	Pump					Only these events are routed from controller to pump
 *	0	1	Pump					Pump/Controller/Host
 *	1	0	Pump/Controller			Controller/Host			Status codes with associated data
 *	1	1	Controller/Host			Controller/Host
 *
 */
#define STATUS__MASK							0x07ff	/* Status numbers unique by this mask only! */

#define ST__API									0x1000	/* Minimal status reports */
#define ST__STATUS								0x4000	/* Normal status reports */
#define ST__PERIODIC							0x8000	/* Periodic status reports */

/* ************************************************************************* */
/*
 *	Define system status codes
 *
 */
#define STATUS__SPEED_SELECT					0x040 + ST__STATUS + ST__API
#define STATUS__TONE_DETECT						0x041 + ST__STATUS
#define STATUS__TRAINING_REPORT_1				0x042 + ST__STATUS
#define STATUS__TRAINING_REPORT_2				0x043 + ST__STATUS
#define STATUS__CONNECTION_REPORT_1				0x044 + ST__STATUS
#define STATUS__CONNECTION_REPORT_2				0x045 + ST__STATUS
#define STATUS__CONNECTION_END_REPORT_1			0x046 + ST__STATUS
#define STATUS__CONNECTION_END_REPORT_2			0x047 + ST__STATUS
#define STATUS__MSE_REPORT						0x048 + ST__PERIODIC + ST__STATUS
#define STATUS__LOAD_OVERLAY					0x049 + ST__STATUS + ST__API
#define STATUS__DTMF_DETECTED					0x04A + ST__STATUS + ST__API
#define STATUS__DTMF_DETECT_END					0x04B + ST__STATUS
#define STATUS__MF_DETECTED						0x04C + ST__STATUS + ST__API
#define STATUS__MF_DETECT_END					0x04D + ST__STATUS + ST__API
#define STATUS__V8_CALL_FUNCTION				0x04E + ST__STATUS + ST__API
#define STATUS__TX_SPEED						0x04F + ST__STATUS + ST__API
#define STATUS__VPCM_TX_ATTENUATION				0x050 + ST__STATUS + ST__API
#define STATUS__VPCM_TX_RBS						0x051 + ST__STATUS + ST__API
#define STATUS__VPCM_V90_MODE					0x052 + ST__STATUS
#define STATUS__VPCM_K56_MODE					0x053 + ST__STATUS
#define	STATUS__V24_LOOP2_ON					0x054 + ST__STATUS + ST__API
#define STATUS__VPCM_RX_ATTENUATION				0x055 + ST__STATUS + ST__API
#define STATUS__VPCM_RX_RBS						0x056 + ST__STATUS + ST__API
#define STATUS__VPCM_TX_STATE					0x057 + ST__STATUS
#define STATUS__VPCM_RX_STATE					0x058 + ST__STATUS
#define STATUS__VPCM_TX_CONSTELLATION			0x059 + ST__STATUS
#define STATUS__VPCM_RX_CONSTELLATION			0x05a + ST__STATUS

#define STATUS__AGC1_GAIN						0x05b + ST__STATUS
#define STATUS__AGC1_EXPONENT					0x05c + ST__STATUS
#define STATUS__AGC2_GAIN						0x05d + ST__STATUS
#define STATUS__AGC2_EXPONENT					0x05e + ST__STATUS

#define STATUS__V34_PH2_ROUND_TRIP_DELAY		0x05f + ST__STATUS + ST__API
#define STATUS__V34_TX_ATTENUATION				0x060 + ST__STATUS + ST__API
#define STATUS__V34_TX_REQUIRED_ATTENUATION		0x061 + ST__STATUS + ST__API
#define STATUS__V34_TX_OPTIONAL_ATTENUATION		0x062 + ST__STATUS + ST__API
#define STATUS__V34_RX_ATTENUATION				0x063 + ST__STATUS + ST__API
#define STATUS__V34_RX_REQUIRED_ATTENUATION		0x064 + ST__STATUS + ST__API
#define STATUS__V34_RX_OPTIONAL_ATTENUATION		0x065 + ST__STATUS + ST__API

#define STATUS__V32_TX_RATE_MASK				0x066 + ST__STATUS + ST__API
#define STATUS__V32_RX_RATE_MASK				0x067 + ST__STATUS + ST__API
#define STATUS__V32_RESTRICT_MASK				0x068 + ST__STATUS + ST__API
#define STATUS__V32_FINAL_RATE_MASK				0x069 + ST__STATUS + ST__API

#define STATUS__MSE_REPORT_TRAINING				0x06A + ST__PERIODIC + ST__STATUS
#define STATUS__MSE_REPORT_MAXRATE				0x06B + ST__PERIODIC + ST__STATUS

#define STATUS__MP_FRAME_WORD					0x06C + ST__STATUS

#define STATUS__V34_TRN1_MSE					0x06d + ST__STATUS + ST__API
#define STATUS__V34_CONV_MSE					0x06e + ST__STATUS + ST__API
#define STATUS__V34_TRN2_MSE					0x06f + ST__STATUS + ST__API

#define	STATUS__LPF_REPORT_TRN1A				0x070 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_TRN1B				0x071 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_TRN1C				0x072 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_TRN2A				0x073 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_TRN2B				0x074 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_ECHO					0x075 + ST__PERIODIC + ST__STATUS
#define	STATUS__LPF_REPORT_DATA					0x076 + ST__PERIODIC + ST__STATUS

#define	STATUS__POWER_TX_1						0x080 + ST__PERIODIC + ST__STATUS
#define	STATUS__POWER_TX_2						0x081 + ST__PERIODIC + ST__STATUS
#define	STATUS__POWER_RX_1						0x082 + ST__PERIODIC + ST__STATUS
#define	STATUS__POWER_RX_2						0x083 + ST__PERIODIC + ST__STATUS

#define STATUS__FIRMWARE_RELEASE				0x090 + ST__STATUS + ST__API
#define STATUS__MINIMUM_CONFIG					0x091 + ST__STATUS
#define STATUS__RECONFIG_IN_PROGRESS			0x092 + ST__STATUS
#define STATUS__RECONFIG_COMPLETE				0x093 + ST__STATUS
#define STATUS__MEMORY_READ						0x099 + ST__STATUS

#define STATUS__MF_GENERATE						0x0A0 + ST__STATUS + ST__API

#define STATUS__WATCHDOG_OK						0x0A9 + ST__STATUS
#define STATUS__PUMP_ANOMALY_REPORT				0x0AF + ST__STATUS

/* ************************************************************************* */
/*
 *	Controller diagnostic status codes
 *
 */
#define STATUS__OMC_STATE_REPORT				0x0b0 + ST__STATUS
#define STATUS__OMC_ANOMALY_REPORT				0x0b1 + ST__STATUS
#define STATUS__CSC_STATE_REPORT				0x0b2 + ST__STATUS
#define STATUS__CSC_ANOMALY_REPORT				0x0b3 + ST__STATUS
#define STATUS__OMC_DATUM_A_REPORT				0x0b8 + ST__STATUS
#define STATUS__OMC_DATUM_B_REPORT				0x0b9 + ST__STATUS
#define STATUS__OMC_DATUM_C_REPORT				0x0ba + ST__STATUS
#define STATUS__OMC_DATUM_D_REPORT				0x0bb + ST__STATUS
#define STATUS__CSC_DATUM_A_REPORT				0x0bc + ST__STATUS
#define STATUS__CSC_DATUM_B_REPORT				0x0bd + ST__STATUS
#define STATUS__CSC_DATUM_C_REPORT				0x0be + ST__STATUS
#define STATUS__CSC_DATUM_D_REPORT				0x0bf + ST__STATUS

#define STATUS__V8BIS_DATUM_TX_REPORT			0x0c0 + ST__STATUS
#define STATUS__V8BIS_DATUM_RX_REPORT			0x0c1 + ST__STATUS
#define STATUS__V8_DATUM_TX_REPORT				0x0c2 + ST__STATUS
#define STATUS__V8_DATUM_RX_REPORT				0x0c3 + ST__STATUS

#define STATUS__OMC_DISCONNECT_REASON			0x0d0 + ST__STATUS
#define STATUS__DP_DISCONNECT_REASON			0x0d1 + ST__STATUS
#define STATUS__DP_DISCONNECT_SUBREASON			0x0d2 + ST__STATUS
#define STATUS__T30_DISCONNECT_REASON			0x0d3 + ST__STATUS
#define STATUS__AD_DETECT						0x0d4 + ST__STATUS
#define STATUS__FAXDET_DETECT					0x0d5 + ST__STATUS
#define STATUS__KB_CHARACTER_REPORT				0x0d6 + ST__STATUS
#define STATUS__T30_FRAME_REPORT				0x0d7 + ST__STATUS
#define STATUS__DP_TX_DF_RETX					0x0d8 + ST__STATUS
#define STATUS__DP_RX_DF_RETX					0x0d9 + ST__STATUS
#define STATUS__SCC_DETECT						0x0da + ST__STATUS
#define STATUS__FRAME_REPORT					0x0db + ST__STATUS
#define STATUS__T38_FRAME_REPORT				0x0dc + ST__STATUS
#define STATUS__T38_DATA_FIELD_REPORT			0x0dd + ST__STATUS
#define STATUS__RTMSC_AUDIO_REPORT				0x0de + ST__STATUS
#define STATUS__FRAME_DETAIL_REPORT				0x0df + ST__STATUS
#define STATUS__T38_REPORT						0x0f0 + ST__STATUS

#define STATUS__TSSC_DISCONNECT_REASON			0x0e0 + ST__STATUS + ST__API

/* ************************************************************************* */
/*
 *  Define kernel diagnostic status codes
 *
 */
#define STATUS__FG_EVENT_PROCESSED				0x700 + ST__STATUS
#define STATUS__FG_STATE_CHANGE					0x701 + ST__STATUS
#define STATUS__FG_STATE_EVENT_SERVICE			0x702 + ST__STATUS
#define STATUS__FG_STATE_START					0x703 + ST__STATUS
#define STATUS__FG_STATE_RESTART				0x704 + ST__STATUS
#define STATUS__FG_STATE_REPLACE				0x705 + ST__STATUS
#define STATUS__FG_STATE_STOP					0x706 + ST__STATUS
#define STATUS__FG_STATE_STOP_BY_OWNER			0x707 + ST__STATUS
#define STATUS__FG_STATE_CLEAR_ALL				0x708 + ST__STATUS

#define STATUS__FG_THREAD_INSERT				0x710 + ST__STATUS
#define STATUS__FG_THREAD_REMOVE				0x711 + ST__STATUS
#define STATUS__FG_THREAD_IDENT					0x712 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_ALL				0x713 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_MODULATION		0x714 + ST__STATUS
#define	STATUS__FG_THREAD_CLEAR_BY_OWNER		0x715 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR					0x716 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_RX_MODULATION	0x717 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_TX_MODULATION	0x718 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_AUTOMODE		0x719 + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_FACSIMILE		0x71a + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_RX_DATA			0x71b + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_TX_DATA			0x71c + ST__STATUS
#define STATUS__FG_THREAD_CLEAR_TELEPHONY		0x71d + ST__STATUS

#define STATUS__FG_TIMER_MS_START_1				0x720 + ST__STATUS
#define STATUS__FG_TIMER_MS_START_2				0x721 + ST__STATUS
#define STATUS__FG_TIMER_BIT_START_1			0x722 + ST__STATUS
#define STATUS__FG_TIMER_BIT_START_2			0x723 + ST__STATUS
#define STATUS__FG_TIMER_BAUD_START_1			0x724 + ST__STATUS
#define STATUS__FG_TIMER_BAUD_START_2			0x725 + ST__STATUS
#define STATUS__FG_TIMER_CLEAR_1				0x726 + ST__STATUS
#define STATUS__FG_TIMER_CLEAR_2				0x727 + ST__STATUS
#define STATUS__FG_TIMER_STOP					0x728 + ST__STATUS
#define STATUS__FG_TIMER_CLEAR_ALL				0x729 + ST__STATUS

#define STATUS__BG_EVENT_PROCESSED				0x730 + ST__STATUS
#define STATUS__BG_STATE_CHANGE					0x731 + ST__STATUS
#define STATUS__BG_STATE_EVENT_SERVICE			0x732 + ST__STATUS
#define STATUS__BG_STATE_START					0x733 + ST__STATUS
#define STATUS__BG_STATE_RESTART				0x734 + ST__STATUS
#define STATUS__BG_STATE_REPLACE				0x735 + ST__STATUS
#define STATUS__BG_STATE_STOP					0x736 + ST__STATUS
#define STATUS__BG_STATE_STOP_BY_OWNER			0x737 + ST__STATUS
#define STATUS__BG_STATE_CLEAR_ALL				0x738 + ST__STATUS

/* ************************************************************************* */
/*
 *  Define kernel error codes
 *
 */
#define STATUS__EVENT_BUFFER_OVERFLOW			0x770 + ST__STATUS
#define STATUS__STATUS_BUFFER_OVERFLOW			0x771 + ST__STATUS
#define STATUS__OVERLAY_CONFLICT				0x772 + ST__STATUS

/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */

/* ************************************************************************* */
/*
 *	Developer temporary status codes
 *
 */
#define STATUS__DEVELOPER_GROUP					0x780 + ST__STATUS

/* ************************************************************************* */
/*
 *	Customer status codes
 *
 */
#define STATUS__CUSTOMER_GROUP					0x7f0 + ST__STATUS

/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */
/* ************************************************************************* */

#ifdef DENSE
/*
 * Dense status reports
 */

/*
 *	These are for debugging
 */
#define	STATUS__DENSE_DTEIF_RX				(0x601 + ST__STATUS)
#define	STATUS__DENSE_DTEIF_TX				(0x602 + ST__STATUS)
#define	STATUS__DENSE_DTEIF_TX_LOST			(0x603 + ST__STATUS)
#define	STATUS__DENSE_DTEIF_RX_LOST			(0x604 + ST__STATUS)
#define	STATUS__DENSE_DTEIF_TX_STATE_SET	(0x605 + ST__STATUS)
#define	STATUS__DENSE_DTEIF_TX_CNT			(0x606 + ST__STATUS)
#endif
