User`s guide

High-Speed Simultaneous Transfer
Host-Side Client Interface
277Targeting MC56F83xx/DSP5685x Controllers
NOTE Before launching the program, the IDE plugin needs to be created
and placed in the folder: CodeWarrior\bin\Plugins\Com.
Listing 9.1 Sample HSST Host Program
#include "CodeWarriorCommands.h"
#include "HSSTInterface.h"
#include <cstdio>
#include <cstdlib>
unsigned __stdcall HSSTClientMain ( void *pArguments );
#define buf_size 1000 /* Data size */
/* Assigning name for Plugin and Menu Title */
extern const CWPluginID kToolbarTestPluginID = "HSST_host_sample";
extern const wchar_t* MenuTitle = L"HSST_host_sample";
unsigned __stdcall HSSTClientMain ( void *pArguments )
{
IMWHSST_Client *pHSST = (IMWHSST_Client *)pArguments;
long data[buf_size];
size_t channel_1, channel_2, read_items, written_items;
* Opening channel 1 and 2 from HOST side */
HRESULT hr_1 = pHSST->hsst_open ( "channel_1",
&channel_1 );
HRESULT hr_2 = pHSST->hsst_open ( "channel_2",
&channel_2 );
/* HOST reading data from channel 1 */
pHSST->hsst_read ( data, sizeof(long), buf_size, channel_1,
&read_items );
/* HOST writing data to channel 2 */
pHSST->hsst_write( data, sizeof(long), buf_size, channel_2,
&written_items );