b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 1 | /**
|
| 2 | * @file : gsw_oem_rw_interface.h
|
| 3 | * @brief : sdk interface
|
| 4 | * @date :
|
| 5 | * @author :
|
| 6 | * @version : v1.0
|
| 7 | * @copyright
|
| 8 | */
|
| 9 | #ifndef GSW_OEM_RW_INTERFACE_H
|
| 10 | #define GSW_OEM_RW_INTERFACE_H
|
| 11 |
|
| 12 | #include "gsw_hal_errcode.h"
|
| 13 |
|
| 14 | /**
|
| 15 | * @brief SDK interface to read data from spec page of flash only GM552A
|
| 16 | * @param [in] read data
|
| 17 | * @param [in] size, it must be less than (64 * 4096 - 8)Byte
|
| 18 | * @retval 0: success
|
| 19 | * @retval other: fail
|
| 20 | */
|
| 21 | int gsw_oem_read_data(void *data, unsigned int *len);
|
| 22 |
|
| 23 | /**
|
| 24 | * @brief SDK interface to write data to spec page of flash only GM552A
|
| 25 | * @param [in] write data
|
| 26 | * @param [in] size, it must be less than (64 * 4096 - 8)Byte
|
| 27 | * @retval 0: success
|
| 28 | * @retval other: fail
|
| 29 | */
|
| 30 | int gsw_oem_write_data(void *data, unsigned int len);
|
| 31 |
|
| 32 | /**
|
| 33 | * @brief Read data from spec block of flash
|
hong.liu | cd37079 | 2025-05-28 06:29:19 -0700 | [diff] [blame] | 34 | * @param [in] unsigned int:block_id value range[1-5]
|
b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 35 | * @param [out] void *
|
hong.liu | cd37079 | 2025-05-28 06:29:19 -0700 | [diff] [blame] | 36 | * @param [out] unsigned int *:len, it must be less than (256 * 1024 - 8)bytes
|
| 37 | * @retval GSW_HAL_SUCCESS\GSW_HAL_NORMAL_FAIL
|
| 38 | */
|
b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 39 | int gsw_oem_read_data_ext(unsigned int block_id, void *data, unsigned int *len);
|
| 40 |
|
| 41 | /**
|
| 42 | * @brief Write data to spec block of flash
|
hong.liu | cd37079 | 2025-05-28 06:29:19 -0700 | [diff] [blame] | 43 | * @param [in] unsigned int:block_id, value range[1-5]
|
b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 44 | * @param [in] void *
|
hong.liu | cd37079 | 2025-05-28 06:29:19 -0700 | [diff] [blame] | 45 | * @param [in] unsigned int:len, it must be less than (256 * 1024 - 8)bytes
|
b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 46 | * @retval 0: success
|
| 47 | * @retval GSW_HAL_SUCCESS\GSW_HAL_FAIL
|
| 48 | */
|
| 49 | int gsw_oem_write_data_ext(unsigned int block_id, void *data, unsigned int len);
|
| 50 | #endif /*GSW_RTC_INTERFACE_H*/
|