1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2016-09-20 Bernard the first version 9 */ 10 11 #ifndef PARTITION_H__ 12 #define PARTITION_H__ 13 14 #define PARTITION_RDONLY 0x000 15 #define PARTITION_WRITEABLE 0x100 /* Device is writable */ 16 #define PARTITION_POWERUP_LOCK 0x200 /* Always locked after reset */ 17 18 struct rt_partition 19 { 20 char name[8]; 21 22 rt_uint32_t offset; 23 rt_uint32_t size; 24 25 rt_uint32_t flags; 26 }; 27 28 int rt_partition_init(const char* flash_device, const struct rt_partition* parts, rt_size_t num); 29 30 #endif 31