Hitachi S10mini User Manual page 158

Option
Hide thumbs Also See for S10mini:
Table of Contents

Advertisement

5 USER GUIDE
[CPU02 or LPU/CMU02-side C program example]
#define TOUKA_READ
#define RBUFADR
#define PARADDR
#define RW080
#define RW090
#define RW100
struct ToukaRead_p {
long
unsigned short *Erradr;
unsigned char
unsigned long
};
/****************************************/
/* task3:Reception (CPU02 or LPU/CMU02) */
/****************************************/
main()
{
register long
long
struct
unsigned short *nodeflg, *recvarea;
recvarea = ( unsigned short *)RW100;
nodeflg
toukaread = ( long(*)( ))TOUKA_READ;
read
if( ( *recvarea != 0x4000) ||
!( *nodeflg & 0x4000)) {
return;
}
send->node
send->Erradr = (unsigned short*)RW090;
send->dataadr = (unsigned char*)RBUFADR
send->datasiz = 1024;
rtn = ( toukaread )( read );
if( rtn != 0){
return;
}
while( 1 ){
if( !( *nodeflg & 0x8000)){
}
}
}
Note1: For the S10mini, change the #define TOUKA_READ value from 0xD60160 into
0xD74178L, the #define RBUFADR value from 0x450000L into 0x1E6000L, and
the #define PARADDR value from 0x452000L into 0x1E5000L.
0xD60160L
0x450000L
0x452000L
0x0E0C10L
0x0E0C12L
0x0E0C20L
node;
*dataadr;
datasiz;
( *toukaread )();
rtn;
ToukaRead_p
= ( unsigned short *)RW080;
= ( struct ToukaRead_p *)PARADDR;
= 0x00000001;
break;
/* toukaread() starting address (main) (For the S10V) */
/* Reception buffer address (For the S10V) */
/* Input parameter storage starting address (For the S10V) */
/* Self-node status transfer area (RW080) */
/* Transparent-message transmission error code area */
/* Transparent receiving flag area */
/* Transmission destination node number */
/* Error code storage address */
/* Reception data storage starting address */
/* Received data byte count */
*read;
/* Transparent receiving flag area */
/* Transparent receiving flag area check */
/* Self-node status check */
/* Transmission soure node number */
/* Error code storage address */
/* Reception data storage starting address */
/* Received data byte count */
/* Transparent-message reception */
/* Return code check */
/* Wait for message processing termination */
5-106

Advertisement

Table of Contents
loading

This manual is also suitable for:

S10vFl.netLqe500Lqe502

Table of Contents