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

📄 hostport.h

📁 PEAKAUDIO用于EV2板的MCU控制源码
💻 H
字号:
/*************************************************************************

	Hostport.h

	This include file declares routines to interface to the Host port on
	the CobraNet Module. Also defines constants.

	Copyright (C) 2001-2004 by Cirrus Logic Inc. All Rights Reserved
*************************************************************************/

#ifndef hostport_h
#define hostport_h

#define cMUXOP_GOTO_TRANSLATION			0
#define cMUXOP_GOTO_PACKET_RX				1
#define cMUXOP_GOTO_COUNTERS				2
#define cMUXOP_TRANSMIT_PACKET			3
#define cMUXOP_PACKET_ACK						4
#define cMUXOP_GOTO_TRANSLATION_WR	5
#define cMUXOP_GOTO_PACKET_TX				6

#define cHACK_ENABLE_ptr	0x25000
#define cHACK_STATUS_ptr	0x25100

#define cHACK_ACTIVATE_RX			0x4
#define cHACK_ACTIVATE_TX			0x8
#define cHACK_ACTIVATE_ADDR		0x10
#define cHACK_ACTIVATE_VAR		0x20

#define cMSG_SET_ADDRESS         0xB2
#define cMSG_TRANSLATE_ADDRESS   0xB3
#define cMSG_INTERRUPT_ACK       0xB4
#define cMSG_MULTIPLEX_OP        0xB5

#define cHOST_PORT_ptr		0x8040		//Host address

#define cHOST_RESET_ptr		0x8051		//Host reset address

#define cHOST_MESSAGE_ptr	0x8040
#define cHOST_DATA_ptr		0x8044
#define cHOST_CONTROL_ptr	0x8048
#define cHOST_STATUS_ptr	0x8049

#define cHOST_CONTROL_REG	0x8
#define cHOST_STATUS_REG	0x9

#define cHRESET_ON	0
#define cHRESET_OFF	1

#define cHOST_CM1	1
#define cHOST_CM2	2

extern unsigned char CM_Detect_Test( void );
extern void init_Host_funcs( unsigned char which_module );
extern code char * get_host_error( unsigned char err_num );
extern unsigned char SetAddress( unsigned long the_Address );  
extern unsigned long Host_Peek( unsigned long the_Address, unsigned char * error_code );        
extern unsigned char Host_Poke( unsigned long Address, unsigned long Value );
extern void Host_Reset( unsigned char the_reset_param );
extern unsigned char Host_Sync_Translation( void );

#endif

⌨️ 快捷键说明

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