Rev 760 | Rev 780 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 760 | Rev 767 | ||
---|---|---|---|
Line 232... | Line 232... | ||
232 | memcpy(OEM_String,&LicensePtr[OEM_IN_LICENSE], OEM_NAME_LENGHT); |
232 | memcpy(OEM_String,&LicensePtr[OEM_IN_LICENSE], OEM_NAME_LENGHT); |
233 | if(LicensePtr[OEM_IN_LICENSE] == 0) |
233 | if(LicensePtr[OEM_IN_LICENSE] == 0) |
234 | { |
234 | { |
235 | OEM_String[0] = 255; // that is a command to erease the OEM-string |
235 | OEM_String[0] = 255; // that is a command to erease the OEM-string |
236 | LicensePtr[OEM_IN_LICENSE] = 255; |
236 | LicensePtr[OEM_IN_LICENSE] = 255; |
237 | UART1_PutString("\r\n Erase OEM-String\n\r "); |
237 | UART1_PutString("\r\n Erase OEM-String\r\n "); |
238 | } |
238 | } |
239 | else |
239 | else |
240 | { |
240 | { |
241 | if(UART_VersionInfo.HWMajor >= 30) SendOemName = 1; |
241 | if(UART_VersionInfo.HWMajor >= 30) SendOemName = 1; |
242 | UART1_PutString("\r\n Write OEM-String: ");sprintf(msg, "(%s)\n\r",OEM_String);UART1_PutString(msg); |
242 | UART1_PutString("\r\n Write OEM-String: ");sprintf(msg, "(%s)\r\n",OEM_String);UART1_PutString(msg); |
243 | //sprintf(msg, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x \n\r",OEM_String[0],OEM_String[1],OEM_String[2],OEM_String[3],OEM_String[4],OEM_String[5],OEM_String[6],OEM_String[7],OEM_String[8],OEM_String[9],OEM_String[10],OEM_String[11],OEM_String[12],OEM_String[13],OEM_String[14],OEM_String[15]); UART1_PutString(msg); |
243 | //sprintf(msg, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x \n\r",OEM_String[0],OEM_String[1],OEM_String[2],OEM_String[3],OEM_String[4],OEM_String[5],OEM_String[6],OEM_String[7],OEM_String[8],OEM_String[9],OEM_String[10],OEM_String[11],OEM_String[12],OEM_String[13],OEM_String[14],OEM_String[15]); UART1_PutString(msg); |
244 | } |
244 | } |
245 | crc = 2; // Kompatibliaet |
245 | crc = 2; // Kompatibliaet |
246 | crc += CRC16(OEM_String,16); |
246 | crc += CRC16(OEM_String,16); |
247 | EEPROM_ReadBlock(EEPROM_ADR_OEM_Name_CRC,(u8 *)&crc2,2); |
247 | EEPROM_ReadBlock(EEPROM_ADR_OEM_Name_CRC,(u8 *)&crc2,2); |