Specifications

October 25, 2006 Cypress Semiconductor – Rev. ** 51
LIN Bus 2.0 Reference Design 5. Demonstration Projects
do
{
bError = ConfigureNode(1, 0x1234, 0x1003, 0x32);
Retries++;
}
while((bError == 1) && (Retries < 2));
// Configure Message 0x1001 of DIA
Retries = 0;
do
{
bError = ConfigureNode(2, 0x1234, 0x1001, 0x80);
Retries++;
}
while((bError == 1) && (Retries < 2));
// Configure Message 0x1002 of DIA
Retries = 0;
do
{
bError = ConfigureNode(2, 0x1234, 0x1002, 0x85);
Retries++;
}
while((bError == 1) && (Retries < 2));
}
// This function reads the Node information from the nodes in cluster
void ReadNodeInformation(void)
{
WORD CPMSupplierId;
WORD DIASupplierId;
WORD CPMFunctionId;
WORD DIAFunctionId;
BYTE CPMVariant;
BYTE DIAVariant;
long CPMSerialNo;
long DIASerialNo;
// Read Node information from Slave CPM
ReadByIdentifier0(1, 0x1234, 0x2345, &CPMSupplierId, &CPMFunctionId, &CPMVariant);
// Read Serial Number of Slave CPM
ReadByIdentifier1(1, 0x1234, 0x2345, &CPMSerialNo);
// Read Node information from Slave DIA
ReadByIdentifier0(2, 0x1234, 0x2346, &DIASupplierId, &DIAFunctionId, &DIAVariant);
// Read Serial Number of Slave DIA
ReadByIdentifier1(2, 0x1234, 0x2346, &DIASerialNo);
}