/* * Copyright ( C) 2015-2020 Alibaba Group Holding Limited */ #ifndef _IO_FLASH_H_ #define _IO_FLASH_H_ #ifdef __cplusplus extern "C" { #endif /** @defgroup flash_device_api flash * @ingroup driver_api * @{ */ /* Flash璁惧IOCTL鍛戒护 */ #define IOC_FLASH_BASE 'F' #define IOC_FLASH_ERASE_FLASH (IOC_FLASH_BASE + 0x1) /**< 鎿﹂櫎Flash */ #define IOC_FLASH_INFO_GET (IOC_FLASH_BASE + 0x2) /**< 鑾峰彇Flash淇℃伅 */ #define IOC_FLASH_ENABLE_SECURE (IOC_FLASH_BASE + 0x4) /**< 浣胯兘Flash鐨勫畨鍏ㄥ尯鍩� */ #define IOC_FLASH_DISABLE_SECURE (IOC_FLASH_BASE + 0x8) /**< 鍏抽棴Flash鐨勫畨鍏ㄥ尯鍩� */ #define IOC_BOOT_BASE 'O' /* OTA function ioctl ID */ #define IOC_FLASH_SET_BOOT_INFO (IOC_FLASH_BASE + IOC_BOOT_BASE + 0x0) /**< 璁剧疆Boot淇℃伅 */ #define IOC_FLASH_CLEAR_BOOT_COUNT (IOC_FLASH_BASE + IOC_BOOT_BASE + 0x1) /**< 娓呯悊Boot淇℃伅 */ #define IOC_FLASH_GET_BOOT_TYPE (IOC_FLASH_BASE + IOC_BOOT_BASE + 0x2) /**< 鑾峰彇Boot绫诲瀷 */ /** * 娉ㄥ唽Flash璁惧椹卞姩鍒癡FS妗嗘灦 * * @return 0锛氭垚鍔燂紝鍚﹀垯澶辫触 */ int vfs_flash_drv_init (void); /** * @} */ #ifdef __cplusplus } #endif #endif /*_IO_FLASH_H_*/