⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdla_chdlc.h

📁 linux得一些常用命令,以及linux环境下的c编程
💻 H
📖 第 1 页 / 共 3 页
字号:
#define TRACE_DATA_AVAIL_APP_INT_PEND	0x80	/* a trace data available interrupt is pending *//* modem status changes */#define DCD_HIGH			0x08#define CTS_HIGH			0x20/* ---------------------------------------------------------------------------- *                   Constants for Data frame transmission * --------------------------------------------------------------------------*//* the Data frame transmit status element configuration structure */typedef struct {	unsigned short number_Tx_status_elements PACKED;	/* number of transmit status elements */	unsigned long base_addr_Tx_status_elements PACKED;	/* base address of the transmit element list */	unsigned long next_Tx_status_element_to_use PACKED;	/* pointer to the next transmit element to be used */} CHDLC_TX_STATUS_EL_CFG_STRUCT;/* the Data frame transmit status element structure */typedef struct {	unsigned char opp_flag PACKED;		/* opp flag */	unsigned short frame_length PACKED;	/* length of the frame to be transmitted */	unsigned char reserved_1 PACKED;	/* reserved for internal use */	unsigned long reserved_2 PACKED;	/* reserved for internal use */	unsigned long reserved_3 PACKED;	/* reserved for internal use */	unsigned long ptr_data_bfr PACKED;	/* pointer to the data area */} CHDLC_DATA_TX_STATUS_EL_STRUCT;/* ---------------------------------------------------------------------------- *                   Constants for Data frame reception * --------------------------------------------------------------------------*//* the Data frame receive status element configuration structure */typedef struct {	unsigned short number_Rx_status_elements PACKED;	/* number of receive status elements */	unsigned long base_addr_Rx_status_elements PACKED;	/* base address of the receive element list */	unsigned long next_Rx_status_element_to_use PACKED;	/* pointer to the next receive element to be used */	unsigned long base_addr_Rx_buffer PACKED;		/* base address of the receive data buffer */	unsigned long end_addr_Rx_buffer PACKED;		/* end address of the receive data buffer */} CHDLC_RX_STATUS_EL_CFG_STRUCT;/* the Data frame receive status element structure */typedef struct {	unsigned char opp_flag PACKED;		/* opp flag */	unsigned short frame_length PACKED;   /* length of the received frame */        unsigned char error_flag PACKED; /* frame errors (HDLC_STREAMING_MODE)*/        unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */        unsigned long reserved_1 PACKED; 	/* reserved for internal use */        unsigned short reserved_2 PACKED; 	/* reserved for internal use */        unsigned long ptr_data_bfr PACKED;	/* pointer to the data area */} CHDLC_DATA_RX_STATUS_EL_STRUCT;/* ---------------------------------------------------------------------------- *         Constants defining the shared memory information area * --------------------------------------------------------------------------*//* the global information structure */typedef struct { 	unsigned char global_status PACKED;		/* global status */ 	unsigned char modem_status PACKED;		/* current modem status */ 	unsigned char global_excep_conditions PACKED;	/* global exception conditions */	unsigned char glob_info_reserved[5] PACKED;	/* reserved */	unsigned char codename[4] PACKED;		/* Firmware name */	unsigned char codeversion[4] PACKED;		/* Firmware version */} GLOBAL_INFORMATION_STRUCT;/* the CHDLC information structure */typedef struct {	unsigned char CHDLC_status PACKED;		/* CHDLC status */ 	unsigned char CHDLC_excep_conditions PACKED;	/* CHDLC exception conditions */	unsigned char CHDLC_info_reserved[14] PACKED;	/* reserved */} CHDLC_INFORMATION_STRUCT;/* the interrupt information structure */typedef struct { 	unsigned char interrupt_type PACKED;		/* type of interrupt triggered */ 	unsigned char interrupt_permission PACKED;	/* interrupt permission mask */	unsigned char int_info_reserved[14] PACKED;	/* reserved */} INTERRUPT_INFORMATION_STRUCT;/* the S508/FT1 information structure */typedef struct { 	unsigned char parallel_port_A_input PACKED;	/* input - parallel port A */ 	unsigned char parallel_port_B_input PACKED;	/* input - parallel port B */	unsigned char FT1_info_reserved[14] PACKED;	/* reserved */} FT1_INFORMATION_STRUCT;/* the shared memory area information structure */typedef struct {	GLOBAL_INFORMATION_STRUCT global_info_struct PACKED;		/* the global information structure */	CHDLC_INFORMATION_STRUCT CHDLC_info_struct PACKED;		/* the CHDLC information structure */	INTERRUPT_INFORMATION_STRUCT interrupt_info_struct PACKED;	/* the interrupt information structure */	FT1_INFORMATION_STRUCT FT1_info_struct PACKED;			/* the S508/FT1 information structure */} SHARED_MEMORY_INFO_STRUCT;/* ---------------------------------------------------------------------------- *        UDP Management constants and structures  * --------------------------------------------------------------------------*//* The embedded control block for UDP mgmt    This is essentially a mailbox structure, without the large data field */typedef struct {        unsigned char  opp_flag PACKED;                  /* the opp flag */        unsigned char  command PACKED;                   /* the user command */        unsigned short buffer_length PACKED;             /* the data length */        unsigned char  return_code PACKED;               /* the return code */	unsigned char  MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED;	/* reserved for later */} cblock_t;/* UDP management packet layout (data area of ip packet) *//*typedef struct {	unsigned char		signature[8]	PACKED;	unsigned char		request_reply	PACKED;	unsigned char		id		PACKED;	unsigned char		reserved[6]	PACKED;	cblock_t		cblock		PACKED;	unsigned char		num_frames	PACKED;	unsigned char		ismoredata	PACKED;	unsigned char 		data[SIZEOF_MB_DATA_BFR] 	PACKED;} udp_management_packet_t;*/typedef struct {	unsigned char		num_frames	PACKED;	unsigned char		ismoredata	PACKED;} trace_info_t;typedef struct {	ip_pkt_t 		ip_pkt		PACKED;	udp_pkt_t		udp_pkt		PACKED;	wp_mgmt_t		wp_mgmt		PACKED;	cblock_t                cblock          PACKED;	trace_info_t       	trace_info      PACKED;	unsigned char           data[SIZEOF_MB_DATA_BFR]      PACKED;} chdlc_udp_pkt_t;typedef struct ft1_exec_cmd{	unsigned char  command PACKED;                   /* the user command */        unsigned short buffer_length PACKED;             /* the data length */        unsigned char  return_code PACKED;               /* the return code */	unsigned char  MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED;} ft1_exec_cmd_t;typedef struct {	unsigned char  opp_flag 			PACKED;	ft1_exec_cmd_t cmd				PACKED;	unsigned char  data[SIZEOF_MB_DATA_BFR]      	PACKED;} ft1_exec_t;#define UDPMGMT_SIGNATURE	"CTPIPEAB"/* UDP/IP packet (for UDP management) layout *//*typedef struct {	unsigned char	reserved[2]	PACKED;	unsigned short	ip_length	PACKED;	unsigned char	reserved2[4]	PACKED;	unsigned char	ip_ttl		PACKED;	unsigned char	ip_protocol	PACKED;	unsigned short	ip_checksum	PACKED;	unsigned long	ip_src_address	PACKED;	unsigned long	ip_dst_address	PACKED;	unsigned short	udp_src_port	PACKED;	unsigned short	udp_dst_port	PACKED;	unsigned short	udp_length	PACKED;	unsigned short	udp_checksum	PACKED;	udp_management_packet_t um_packet PACKED;} ip_packet_t;*//* valid ip_protocol for UDP management */#define UDPMGMT_UDP_PROTOCOL 0x11typedef struct {	unsigned char	status		PACKED;	unsigned char	data_avail	PACKED;	unsigned short	real_length	PACKED;	unsigned short	time_stamp	PACKED;	unsigned char	data[1]		PACKED;} trace_pkt_t;typedef struct {	unsigned char	error_flag	PACKED;	unsigned short	time_stamp	PACKED;	unsigned char	reserved[13]	PACKED;} api_rx_hdr_t;typedef struct {        api_rx_hdr_t	api_rx_hdr      PACKED;        void *   	data    	PACKED;} api_rx_element_t;typedef struct {	unsigned char 	attr		PACKED;	unsigned char  	reserved[15]	PACKED;} api_tx_hdr_t;typedef struct {	api_tx_hdr_t 	api_tx_hdr	PACKED;	void *		data		PACKED;} api_tx_element_t;/* ---------------------------------------------------------------------------- *   Constants for the SET_FT1_CONFIGURATION/READ_FT1_CONFIGURATION command * --------------------------------------------------------------------------*//* the FT1 configuration structure */typedef struct {	unsigned short framing_mode;	unsigned short encoding_mode;	unsigned short line_build_out;	unsigned short channel_base;	unsigned short baud_rate_kbps;					/* the baud rate (in kbps) */		unsigned short clock_mode;} ft1_config_t;/* settings for the 'framing_mode' */#define ESF_FRAMING 	0x00	/* ESF framing */#define D4_FRAMING  	0x01	/* D4 framing *//* settings for the 'encoding_mode' */#define B8ZS_ENCODING 	0x00	/* B8ZS encoding */#define AMI_ENCODING	0x01	/* AMI encoding *//* settings for the 'line_build_out' */#define LN_BLD_CSU_0dB_DSX1_0_to_133	0x00	/* set build out to CSU (0db) or DSX-1 (0-133ft) */#define LN_BLD_DSX1_133_to_266		0x01	/* set build out DSX-1 (133-266ft) */#define LN_BLD_DSX1_266_to_399		0x02	/* set build out DSX-1 (266-399ft) */#define LN_BLD_DSX1_399_to_533		0x03	/* set build out DSX-1 (399-533ft) */#define LN_BLD_DSX1_533_to_655		0x04	/* set build out DSX-1 (533-655ft) */#define LN_BLD_CSU_NEG_7dB		0x05	/* set build out to CSU (-7.5db) */#define LN_BLD_CSU_NEG_15dB		0x06	/* set build out to CSU (-15db) */#define LN_BLD_CSU_NEG_22dB		0x07	/* set build out to CSU (-22.5db) *//* settings for the 'channel_base' */#define MIN_CHANNEL_BASE_VALUE		1		/* the minimum permitted channel base value */#define MAX_CHANNEL_BASE_VALUE		24		/* the maximum permitted channel base value *//* settings for the 'baud_rate_kbps' */#define MIN_BAUD_RATE_KBPS		0		/* the minimum permitted baud rate (kbps) */#define MAX_BAUD_RATE_KBPS 		1536	/* the maximum permitted baud rate (kbps) */#define BAUD_RATE_FT1_AUTO_CONFIG	0xFFFF /* the baud rate used to trigger an automatic FT1 configuration *//* settings for the 'clock_mode' */#define CLOCK_MODE_NORMAL		0x00	/* clock mode set to normal (slave) */#define CLOCK_MODE_MASTER		0x01	/* clock mode set to master */#define BAUD_RATE_FT1_AUTO_CONFIG   	0xFFFF#define AUTO_FT1_CONFIG_NOT_COMPLETE	0x08#define AUTO_FT1_CFG_FAIL_OP_MODE	0x0C#define AUTO_FT1_CFG_FAIL_INVALID_LINE 	0x0D #ifdef		_MSC_#  pragma	pack()#endif#endif	/* _SDLA_CHDLC_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -