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

📄 msplink_dsp55hpi.h

📁 MSP430与dsp接口技术,编辑环境C语言,我运行过,好
💻 H
字号:
/************************************************************ 
//  Copyright (C) 2004 Texas Instruments, Inc. 
//
//  File: msplink_dsp55hpi.h
//
//  Comment: MSP to TMS320C55x DSP HPI Link Driver
//
//  Author: Randy Wu
//  Company: Texas Instruments, Inc
//  Date: March 2004
//  IDE: Built with IAR Systems Embedded Workbench 430 V2
//
************************************************************/

#define MSPLINK_CMD01  1 
#define MSPLINK_CMD02  2
#define MSPLINK_CMD03  3
#define MSPLINK_CMD04  4
#define MSPLINK_CMD05  5
#define MSPLINK_CMD06  6
#define MSPLINK_CMD07  7
#define MSPLINK_CMD08  8 
#define MSPLINK_CMD09  9

#define MSPLINK_BYTESIZEINBITS   8
#define MSPLINK_WORDSIZEINBITS  16

#define MSPLINK_MSBMASK 0xFF00  // masks off LSB and keeps the MSB
#define MSPLINK_LSBMASK 0x00FF  // masks off MSB and keeps the LSB

#define MSPLINK_ALLPORTINPUTS   0x00
#define MSPLINK_ALLPORTOUTPUTS  0xFF

#define MSPLINK_HPIXADD   0x0020
#define MSPLINK_HPIDSPINT 0x0002

#define HPI_INMSG_HIWORD 0x0002 // address of DSP's INBOX
#define HPI_INMSG_LOWORD 0x7FFE
#define HPI_OUTMSG_HIWORD 0x0002  // address of DSP's OUTBOX
#define HPI_OUTMSG_LOWORD 0x7FFF

typedef struct MSPLINK_Msg {    // standard message format
  unsigned char cmd;  // command code to be executed
  unsigned char arg;  // optional argument for the command
} MSPLINK_Msg;

void MSPLINK_init(void);                // initializes the module as a whole
void MSPLINK_readMsg(MSPLINK_Msg *msg); // read a message incoming from DSP
void MSPLINK_sendMsg(MSPLINK_Msg  msg); // write a message out to the DSP

⌨️ 快捷键说明

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