comparison Discovery/Src/tComm.c @ 1017:5924a2d1d3ba GasConsumption

Prepare custom block update function: In the flash area of the font lib some sectors may be used for custom data or a boot updater image. With this change a flash option is added to the maintainance menu. IMPORTANT: The fimwareEraseProgram.c is needed for compiling the firmware now => Add it e.g. by adding a link from the OtherSources location to your source folder.
author Ideenmodellierer
date Thu, 29 May 2025 22:04:46 +0200
parents 3123aa8723fd
children ca713e199f22
comparison
equal deleted inserted replaced
1014:8c0134a287da 1017:5924a2d1d3ba
1570 return 0; 1570 return 0;
1571 } 1571 }
1572 1572
1573 // neu 110212 1573 // neu 110212
1574 if(id == id_FONT) 1574 if(id == id_FONT)
1575 {
1575 offsetTotal = 256 * 256 * 256 * (uint32_t)sBuffer[1] + 256 * 256 * (uint32_t)sBuffer[2] + 256 * (uint32_t)sBuffer[3]; 1576 offsetTotal = 256 * 256 * 256 * (uint32_t)sBuffer[1] + 256 * 256 * (uint32_t)sBuffer[2] + 256 * (uint32_t)sBuffer[3];
1577 /* todo set offset depending on font version offsetTotal = 0; */
1578 }
1576 else 1579 else
1577 offsetTotal = 256 * 256 * 256 * (uint32_t)sBuffer[0] + 256 * 256 * (uint32_t)sBuffer[1] + 256 * (uint32_t)sBuffer[2] + sBuffer[3]; 1580 offsetTotal = 256 * 256 * 256 * (uint32_t)sBuffer[0] + 256 * 256 * (uint32_t)sBuffer[1] + 256 * (uint32_t)sBuffer[2] + sBuffer[3];
1578 1581
1579 // get checksum, bytes are in different order on Dev C++ code!!! 1582 // get checksum, bytes are in different order on Dev C++ code!!!
1580 if(HAL_UART_Receive(&UartHandle, sBuffer, 4,5000)!= HAL_OK) // 58000 1583 if(HAL_UART_Receive(&UartHandle, sBuffer, 4,5000)!= HAL_OK) // 58000