📄 dspmbx.h
字号:
//////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004, Eyoka @ Microunit
// All Rights Reserved
//________________________________________________________________________
//
// FILENAME: dspmbx.h
// PROJECT: High-Resolution Video System On OMAP
// MODULE: DSP System
// DESCRIPTION: DSP Mailbox support.
// TARGET CPU: DSP-C55xx of OMAP5910
// VERSION: 1.1
//________________________________________________________________________
//
// REVISE HISTORY
// DATE VERSION AUTHOR DESCRIPTION
// UNFINISHED 1.1 Eyoka Modified with new ARMSYS.
// 2004-10-13 1.0 Eyoka First release.
//////////////////////////////////////////////////////////////////////////
#ifndef _DSPMBX_H_
#define _DSPMBX_H_
#include "datatypes.h"
/////////////////////////////////////////////////////////////////////
// MAILBOX REGISTERS
/////////////////////////////////////////////////////////////////////
//======================================
// DSP to ARM REGs, to be written.
//======================================
#define MBX_DSP2ARM1 REG(0xF804)
#define MBX_DSP2ARM1B REG(0xF806)
#define MBX_DSP2ARM2 REG(0xF808)
#define MBX_DSP2ARM2B REG(0xF80A)
//======================================
// ARM to DSP REGs, to be read.
//======================================
#define MBX_ARM2DSP1 REG(0xF800)
#define MBX_ARM2DSP1B REG(0xF802)
#define MBX_ARM2DSP2 REG(0xF812)
#define MBX_ARM2DSP2B REG(0xF814)
//======================================
// Mailbox pending flags.(1 if unanswered)
//======================================
#define MBX_DSP2ARM1_FLAG REG(0xF80E)
#define MBX_DSP2ARM2_FLAG REG(0xF810)
/////////////////////////////////////////////////////////////////////
// MAILBOX FUNCTIONS
/////////////////////////////////////////////////////////////////////
//___________________________________________________________________
// Function: MBX_Write1
// Usage: Write data and command to mailbox1.
// Parameters:
// data - data to be written to ARM mailbox1
// cmd - command to be written to ARM 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 ARM mailbox2
// cmd - command to be written to ARM 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 DSP mailbox1
// pCmd out - pointer to store command in DSP mailbox1
// Return Values:
// N/A
//___________________________________________________________________
// NOTE: can ONLY be called in ISR.
inline void MBX_Read1(WORD *pData, WORD *pCmd)
{
*pData = MBX_ARM2DSP1;
*pCmd = MBX_ARM2DSP1B;
}
//___________________________________________________________________
// Function: MBX_Read2
// Usage: Read data and command from mailbox2.
// Parameters:
// pData out - pointer to store data in DSP mailbox2
// pCmd out - pointer to store command in DSP mailbox2
// Return Values:
// N/A
//___________________________________________________________________
// NOTE: can ONLY be called in ISR.
inline void MBX_Read2(WORD *pData, WORD *pCmd)
{
*pData = MBX_ARM2DSP2;
*pCmd = MBX_ARM2DSP2B;
}
#endif // ifndef _DSPMBX_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -