1 /* 2 * Copyright 2022-2023 NXP 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <stdint.h> 18 #include <stdio.h> 19 20 #define __PACKED__ __attribute__((packed)) 21 22 #define MWCESFW_COUNT 0x08 23 24 #define MWCESFW_A1V1_FW_OFFSET 0x00 25 #define MWCESFW_A1V1_RECOVERY_FW_OFFSET 0x01 26 #define MWCESFW_A1V2_FW_OFFSET 0x02 27 #define MWCESFW_A1V2_RECOVERY_FW_OFFSET 0x03 28 #define MWCESFW_A1V1_LC_FW_OFFSET 0x04 29 #define MWCESFW_A1V2_LC_FW_OFFSET 0x05 30 31 typedef struct __PACKED__ MWCESFW 32 { 33 uint32_t layout_version; 34 uint8_t fw_ver_major; 35 uint8_t fw_ver_minor; 36 uint8_t fw_ver_dev; 37 uint8_t fw_ver_is_to; 38 uint8_t fw_ver_git_sha1[32]; 39 uint32_t fw_artifact_number; 40 uint32_t lenCESFW; 41 uint8_t *pCESFW; 42 } MWCESFW_t; 43 44 typedef struct __PACKED__ UWBManifest 45 { 46 uint32_t layout_version; 47 uint8_t creation_date_yy; 48 uint8_t creation_date_month; 49 uint8_t creation_date_day; 50 uint8_t creation_date_hour; 51 uint8_t creation_date_minutes; 52 uint8_t creation_date_seconds; 53 uint8_t padding; 54 uint8_t countMWCESFW; 55 MWCESFW_t *mwCESFW[MWCESFW_COUNT]; 56 } UWBManifest_t; 57