1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef HCS_GENERATE_TREE_H 10 #define HCS_GENERATE_TREE_H 11 12 #include "device_resource_if.h" 13 14 #define TREE_STACK_MAX 64 15 struct TreeStack { 16 uint32_t offset; // The offset of the node in the blob. 17 struct DeviceResourceNode *node; // The head node of a layer tree. 18 }; 19 int32_t GenerateCfgTree(const char *treeStart, int32_t length, char *treeMem, struct DeviceResourceNode **root); 20 21 #endif /* HCS_GENERATE_TREE_H */