📄 dspmbx.c
字号:
//////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004, Eyoka @ Microunit
// All Rights Reserved
//________________________________________________________________________
//
// FILENAME: dspmbx.c
// 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.
//////////////////////////////////////////////////////////////////////////
#include "dspmbx.h"
/////////////////////////////////////////////////////////////////////
// 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)
{
WORD flag = MBX_DSP2ARM1_FLAG & 0x0001;
if(flag)
{
return FALSE;
}
MBX_DSP2ARM1 = data;
MBX_DSP2ARM1B = cmd;
return TRUE;
}
//___________________________________________________________________
// 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)
{
WORD flag = MBX_DSP2ARM2_FLAG & 0x0001;
if(flag)
{
return FALSE;
}
MBX_DSP2ARM2 = data;
MBX_DSP2ARM2B = cmd;
return TRUE;
}
// the end
//////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -