1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 #ifndef H_IMG_MGMT_CONFIG_ 21 #define H_IMG_MGMT_CONFIG_ 22 23 #if defined MYNEWT 24 25 #include "syscfg/syscfg.h" 26 27 #define IMG_MGMT_UL_CHUNK_SIZE MYNEWT_VAL(IMG_MGMT_UL_CHUNK_SIZE) 28 #define IMG_MGMT_VERBOSE_ERR MYNEWT_VAL(IMG_MGMT_VERBOSE_ERR) 29 #define IMG_MGMT_LAZY_ERASE MYNEWT_VAL(IMG_MGMT_LAZY_ERASE) 30 #define IMG_MGMT_DUMMY_HDR MYNEWT_VAL(IMG_MGMT_DUMMY_HDR) 31 #define IMG_MGMT_BOOT_CURR_SLOT boot_current_slot 32 33 #elif defined __ZEPHYR__ 34 35 #define IMG_MGMT_UL_CHUNK_SIZE CONFIG_IMG_MGMT_UL_CHUNK_SIZE 36 #define IMG_MGMT_VERBOSE_ERR CONFIG_IMG_MGMT_VERBOSE_ERR 37 #define IMG_MGMT_LAZY_ERASE CONFIG_IMG_ERASE_PROGRESSIVELY 38 #define IMG_MGMT_DUMMY_HDR CONFIG_IMG_MGMT_DUMMY_HDR 39 #define IMG_MGMT_BOOT_CURR_SLOT 0 40 41 #else 42 43 /* No direct support for this OS. The application needs to define the above 44 * settings itself. 45 */ 46 47 #endif 48 49 #endif 50