From 1bf942576814e1b3dd745b51ad2b8de050ce5e62 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 3 Aug 2016 21:34:44 +0200 Subject: Remove misleading padding fields from ROM header definition The first two bytes of the date field are unused - and the date is indeed encoded in the following six bytes, i.e. also using the padding bytes. So the header definition is currently very confusing. Let's simply remove the padding fields and make the date field a little bit bigger instead - and add a proper comment about the encoding of the date field. Signed-off-by: Thomas Huth Reviewed-by: Adrian Reber Signed-off-by: Alexey Kardashevskiy --- include/calculatecrc.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/calculatecrc.h b/include/calculatecrc.h index 26a90df..a19a229 100644 --- a/include/calculatecrc.h +++ b/include/calculatecrc.h @@ -26,10 +26,8 @@ struct stH { uint64_t flashlen; // dyn char version[16]; // $DRIVER_INFO alignment! char platform_name[32]; // (hardware) headerfile - char date[6]; // dyn (format -> JB) - char padding1[2]; // padding byte - char mdate[6]; // modify date - char padding2[2]; // padding byte + char date[8]; // BCD encoded creation date (first two bytes unused) + char mdate[8]; // BCD encoded modification date (first two bytes unused) char platform_revision[4];// (hardware) headerfile uint32_t padding; uint64_t ui64CRC; // insert calculated CRC here -- cgit v1.1