Subversion Repositories HomeAutomation

Rev

Rev 1870 | Rev 1955 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1870 Rev 1910
Line 136... Line 136...
136
    txMsg.Header.ModuleType = CAN_MODULE_TYPE_SNS_DHT11; ///TODO: Change this to the actual module type
136
    txMsg.Header.ModuleType = CAN_MODULE_TYPE_SNS_DHT11; ///TODO: Change this to the actual module type
137
    txMsg.Header.ModuleId = sns_DHT11_ID;
137
    txMsg.Header.ModuleId = sns_DHT11_ID;
138
    txMsg.Header.Command = CAN_MODULE_CMD_GLOBAL_LIST;
138
    txMsg.Header.Command = CAN_MODULE_CMD_GLOBAL_LIST;
139
    txMsg.Length = 6;
139
    txMsg.Length = 6;
140
 
140
 
-
 
141
    uint32_t HwId=BIOS_GetHwId();
141
    txMsg.Data[0] = NODE_HW_ID_BYTE0;
142
    txMsg.Data[0] = HwId&0xff;
142
    txMsg.Data[1] = NODE_HW_ID_BYTE1;
143
    txMsg.Data[1] = (HwId>>8)&0xff;
143
    txMsg.Data[2] = NODE_HW_ID_BYTE2;
144
    txMsg.Data[2] = (HwId>>16)&0xff;
144
    txMsg.Data[3] = NODE_HW_ID_BYTE3;
145
    txMsg.Data[3] = (HwId>>24)&0xff;
145
 
146
 
146
    txMsg.Data[4] = NUMBER_OF_MODULES;
147
    txMsg.Data[4] = NUMBER_OF_MODULES;
147
    txMsg.Data[5] = ModuleSequenceNumber;
148
    txMsg.Data[5] = ModuleSequenceNumber;
148
 
149
 
149
    while (StdCan_Put(&txMsg) != StdCan_Ret_OK);
150
    while (StdCan_Put(&txMsg) != StdCan_Ret_OK);