| /** |
| * @file flags_api.h |
| * @brief flags分区接口 |
| * |
| * Copyright (C) 2023 Sanechips Technology Co., Ltd. |
| * @author |
| * @ingroup |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. (必选:GPLv2 Licence) |
| * |
| */ |
| |
| |
| #ifndef FLAGS_API_H |
| #define FLAGS_API_H |
| |
| |
| /******************************************************************************* |
| * Include header files * |
| ******************************************************************************/ |
| #include "pub_flags.h" |
| |
| |
| /******************************************************************************* |
| * Macro definitions * |
| ******************************************************************************/ |
| |
| |
| /******************************************************************************* |
| * Type definitions * |
| ******************************************************************************/ |
| |
| |
| /******************************************************************************* |
| * Global variable declarations * |
| ******************************************************************************/ |
| |
| |
| /******************************************************************************* |
| * Global function declarations * |
| ******************************************************************************/ |
| /** |
| * @brief 初始化flags分区 |
| * @param[out] p_flags_info flags初始化数据 |
| * @return 0 初始化成功, -1 初始化失败 |
| * @note |
| */ |
| int flags_init(); |
| |
| |
| /** |
| * @brief 获取flags分区内容 |
| * @param[out] p_flags_info flags分区内容 |
| * @return 0 获取成功, -1 获取失败 |
| * @note |
| */ |
| int flags_get(T_FLAGS_INFO *p_flags_info); |
| |
| |
| /** |
| * @brief 设置flags分区内容 |
| * @param[out] p_flags_info flags分区内容 |
| * @return 0 设置成功, -1 设置失败 |
| * @note |
| */ |
| int flags_set(T_FLAGS_INFO *p_flags_info); |
| |
| |
| /** |
| * @brief 获取flags分区中ubifs状态 |
| * @param[out] status ubifs状态 |
| * @return 0 获取成功, -1 获取失败 |
| * @note |
| */ |
| int flags_get_ubifs_status(T_UBIFS_STATUS *p_ubifs_status); |
| |
| |
| /** |
| * @brief 设置flags分区中ubifs状态 |
| * @param[in] status ubifs状态 |
| * @return 0 设置成功, -1 设置失败 |
| * @note |
| */ |
| int flags_set_ubifs_status(T_UBIFS_STATUS *p_ubifs_status); |
| |
| |
| /** |
| * @brief 获取当前系统 |
| * @return 当前运行系统 |
| * @note |
| */ |
| int flags_get_current_system(); |
| |
| /** |
| * @brief »ñÈ¡flags·ÖÇøÖÐnvro_flag״̬ |
| * @param[out] |
| * @return nvro_flag |
| * @note |
| */ |
| unsigned int flags_get_nvroflag(void); |
| |
| /** |
| * @brief ÉèÖÃflags·ÖÇøÖÐnvro_flag |
| * @param[in] flag nvro״̬ |
| * @return 0 ÉèÖóɹ¦, -1 ÉèÖÃʧ°Ü |
| * @note |
| */ |
| int flags_set_nvroflag(unsigned int flag); |
| |
| |
| #endif // FLAGS_API_H |
| |