bsp_drv_flash28f_utils.h (2704B)
1 /* 2 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 * 4 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 5 */ 6 7 #ifndef __BSP_DRV_FLASH28F_UTILS_INCLUDED 8 #define __BSP_DRV_FLASH28F_UTILS_INCLUDED 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #include "bsp_drv_flash28f_dev.h" 15 16 STATUS 17 bspDrvFlash28fGet_protected_info( 18 const BSP_FLASH28F_DEF_INF *flash_info, /*Flash information*/ 19 char *string, /* where to copy flash memory */ 20 int strLen, /* maximum number of bytes to copy */ 21 int offset /* byte offset into flash memory */ 22 ); 23 STATUS 24 bspDrvFlash28fKick_protected_info( 25 const BSP_FLASH28F_DEF_INF *flash_info, /*Flash information*/ 26 int do_poll_indication, /* Flag. Non-Zero: print progress indication.*/ 27 int sector /* Number of sector to kick (starting from */ 28 /* zero. If negative then erase the whole */ 29 /* memory space. If number of sector is */ 30 /* larger than the maximal for that flash */ 31 /* type, last sector is erased. */ 32 ); 33 STATUS 34 bspDrvFlash28fErase_protected_info( 35 const BSP_FLASH28F_DEF_INF *flash_info, /*Flash information*/ 36 int do_poll_indication, /* Flag. Non-Zero print progress indication*/ 37 /* in percentage. */ 38 int sector /* Number of sector to erase (starting from*/ 39 /* zero. If negative then erase the whole */ 40 /* memory space. If number of sector is */ 41 /* larger than the maximal for that flash */ 42 /* type, last sector is erased. */ 43 ); 44 STATUS 45 bspDrvFlash28fWrite_protected_info( 46 const BSP_FLASH28F_DEF_INF *flash_info, /*Flash information*/ 47 FLASH_28F_DEF *pFB, /* string to be copied; use <value> if NULL */ 48 int size, /* size to program in bytes */ 49 int offset, /* byte offset into flash memory */ 50 FLASH_28F_DEF value, /* value to program */ 51 int (*poll_indication_func)(unsigned long current_work_load) /* Function to call when polling the Flash.*/ 52 /* If NULL then call no function. */ 53 ); 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif /* __BSP_DRV_FLASH28F_UTILS_INCLUDED */