/*********************************************************************/
/*
void Get8Bytes(unsigned long parm1, unsigned long parm2,
/*
/*
Description: This function converts the 2 four byte values to
/*
8 bytes for transmission to the SiteMaster.
/*
the first four bytes, parm2 occupies the second 4 bytes.
/*
Inputs:
parm1 - 4 byte unsigned long integer
/*
parm2 - 4 byte unsigned long integer
/*
Returns:
SUCCESS if the unit is in remote mode
/*
FAILURE if the command fails
/*
The resulting bytes are returned in the
/*
memory location pointed to by ByteData.
/*
location must have at least 8 empty bytes.
/*********************************************************************/
void Get8Bytes(unsigned long parm1, unsigned long parm2,
BYTE* ByteData)
{
// MSB of 1st parameter
*ByteData = (BYTE)((parm1 & 0xFF000000)>24);
*(ByteData+1) = (BYTE)((parm1 & 0x00FF0000)>16);
*(ByteData+2) = (BYTE)((parm1 & 0x0000FF00)>8);
// LSB of 1st parameter
*(ByteData+3) = (BYTE)(parm1 & 0x000000FF);
// MSB of 2nd parameter
*(ByteData+4)= (BYTE)((parm2 & 0xFF000000)>24);
*(ByteData+5)= (BYTE)((parm2 & 0x00FF0000)>16);
*(ByteData+6)= (BYTE)((parm2 & 0x0000FF00)>8);
// LSB of 2nd parameter
*(ByteData+7) = (BYTE)(parm2 & 0x000000FF);
} /* Get8Bytes */
100
BYTE* ByteData )
*/
*/
*/
parm1 occupies
*/
*/
*/
*/
*/
*/
This
*/
*/
Spectrum Master PM
Need help?
Do you have a question about the Spectrum Master MS2711D and is the answer not in the manual?
Questions and answers