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

📄 mbx.h

📁 以TI 公司的OMAP5910为例
💻 H
字号:
//////////////////////////////////////////////////////////////////////////
//            Copyright (C) 2004, Eyoka @ Microunit
//                           All Rights Reserved
//________________________________________________________________________
//
// FILENAME:    mbx.h
// PROJECT:     High-Resolution Video System On OMAP
// MODULE:      MPU System
// DESCRIPTION: MPU Mailbox Interface.
// TARGET CPU:  ARM-925T of OMAP5910
// VERSION:     0.2
//________________________________________________________________________
//
// REVISE HISTORY
// DATE         VERSION AUTHOR  DESCRIPTION
// 2004-11-08   0.2     Eyoka   Checked.
// 2004-11-01   0.1     Eyoka   Created.
//////////////////////////////////////////////////////////////////////////

#ifndef _MBX_H_
#define _MBX_H_

#include "datatypes.h"


/////////////////////////////////////////////////////////////////////
// MAILBOX REGISTERS
/////////////////////////////////////////////////////////////////////

//======================================
// ARM to DSP REGs, to be written.
//======================================
#define MBX_ARM2DSP1		REG16(0xFFFCF000)
#define MBX_ARM2DSP1B		REG16(0xFFFCF004)
#define MBX_ARM2DSP2		REG16(0xFFFCF024)
#define MBX_ARM2DSP2B		REG16(0xFFFCF028)

//======================================
// DSP to ARM REGs, to be read.
//======================================
#define MBX_DSP2ARM1		REG16(0xFFFCF008)
#define MBX_DSP2ARM1B		REG16(0xFFFCF00C)
#define MBX_DSP2ARM2		REG16(0xFFFCF010)
#define MBX_DSP2ARM2B		REG16(0xFFFCF014)

//======================================
// Mailbox pending flags.(1 if unanswered)
//======================================
#define MBX_ARM2DSP1_FLAG	REG16(0xFFFCF018)
#define MBX_ARM2DSP2_FLAG	REG16(0xFFFCF02C)


/////////////////////////////////////////////////////////////////////
// MAILBOX FUNCTIONS
/////////////////////////////////////////////////////////////////////

//___________________________________________________________________
// Function: MBX_Write1
// Usage: Write data and command to mailbox1.
// Parameters:
//	data			data to be written to DSP mailbox1
//	cmd				command to be written to DSP mailbox1
// Return Values:
//	BOOL			TRUE if successful; FALSE if not(mailbox maybe busy)
//___________________________________________________________________
//
BOOL MBX_Write1(WORD data, WORD cmd);

//___________________________________________________________________
// Function: MBX_Write2
// Usage: Write data and command to mailbox2.
// Parameters:
//	data			data to be written to DSP mailbox2
//	cmd				command to be written to DSP mailbox2
// Return Values:
//	BOOL			TRUE if successful; FALSE if not(mailbox maybe busy)
//___________________________________________________________________
//
BOOL MBX_Write2(WORD data, WORD cmd);

//___________________________________________________________________
// Function: MBX_Read1
// Usage: Read data and command from mailbox1.
// Parameters:
//	pData		out	pointer to store data in ARM mailbox1
//	pCmd		out	pointer to store command in ARM mailbox1
// Return Values:	N/A
//___________________________________________________________________
// NOTE: can ONLY be called in ISR.
void MBX_Read1(WORD *pData, WORD *pCmd);

//___________________________________________________________________
// Function: MBX_Read2
// Usage: Read data and command from mailbox2.
// Parameters:
//	pData		out	pointer to store data in ARM mailbox2
//	pCmd		out	pointer to store command in ARM mailbox2
// Return Values:	N/A
//___________________________________________________________________
// NOTE: can ONLY be called in ISR.
void MBX_Read2(WORD *pData, WORD *pCmd);



#endif // ifndef _MBX_H_

⌨️ 快捷键说明

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