media.h

来自「U盘控制器USB97C223的固件代码,对2kPAGE NAND FLASH 有」· C头文件 代码 · 共 986 行 · 第 1/3 页

H
986
字号
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_erase_block(void) reentrant;     // build sector map 

//+-----------------------------------------------------------------------------
// Name:
//   media_read_sector()
//
// Declaration:
//   t_result media_read_sector(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_read_sector(void) reentrant ; 

//+-----------------------------------------------------------------------------
// Name:
//   media_write_sector()
//
// Declaration:
//   t_result media_write_sector(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_write_sector(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_copy_sector()
//
// Declaration:
//   t_result media_copy_sector(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_copy_sector(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_read_cis()
//
// Declaration:
//   t_result media_read_cis(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_read_cis(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_phy2log()
//
// Declaration:
//   t_result media_phy2log(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_phy2log(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_bind_log2phy()
//
// Declaration:
//   t_result media_bind_log2phy(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_bind_log2phy(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_set_phyblock_failed()
//
// Declaration:
//   t_result media_set_phyblock_failed(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_set_phyblock_failed(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_is_phyblock_ok()
//
// Declaration:
//   t_result media_is_phyblock_ok(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_is_phyblock_ok(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_is_phyblock_blank()
//
// Declaration:
//   t_result media_is_phyblock_blank(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_is_phyblock_blank(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   ms_media_is_phyblock_reserved()
//
// Declaration:
//   t_result ms_media_is_phyblock_reserved() reentrant
//
// Purpose:
//   tells mapper whether or not a block is reserved (i.e. boot area) or
//   usable by mapper & user.  
//
// Arguments:
//
// Return:
//  k_true  if physical zone/block can be a user-accessible block
//  k_false if physical block should be ignored by the mapper for everything
//
// Notes:
//  a reserved block is NOT a factory or user-marked bad block.  it is a block reserved
//  for storing private data or boot information.  (i.e. boot blocks, boot area, etc.)
//  blocks marked bad by the factory will be detected in a subsequent call
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_is_phyblock_reserved(void) reentrant;

//+-----------------------------------------------------------------------------
// Name:
//   media_read_extra_data()
//
// Declaration:
//   t_result media_read_extra_data(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_read_extra_data(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_write_extra_data()
//
// Declaration:
//   t_result media_write_extra_data(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_write_extra_data(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_clear_extra_data()
//
// Declaration:
//   t_result media_clear_extra_data(void) reentrant
//
// Purpose:
//
// Arguments:
//
// Return:
//
// Notes:
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_clear_extra_data(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_resolve_conflict()
//
// Declaration:
//  t_result sm_media_resolve_conflict(void) reentrant
//
// Purpose:
//  provide common conflict resolution algorithm (checking for
//  errors in the extra-data...  if both phyblocks have a valid
//  binding according to the extra data, then the derived 
//  method will be called to pick one.
//
// Arguments:
//  - see Notes
//
// Return:
//  k_success always
//
// Notes:
//  when called, 
//    g_addr_rd_phy_blk contains one of the bindings, 
//    g_addr_wr_phy_blk contains the original mapping 
//
//  before returning, ensure:
//    g_addr_rd_phy_blk should contain the correct mapping
//    g_addr_wr_phy_blk should contain the block to be erased (or not used)
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------
t_result media_resolve_conflict(void) reentrant ;

//+-----------------------------------------------------------------------------
// Name:
//   media_erase_card()
//
// Declaration:
//   t_result media_erase_card() reentrant
//
// Purpose:
//   erase every physical block on a flash card except for the boot block
//
// Arguments:
//  TBD
//
// Return:
//  k_success always
//
// Notes:
//  TBD
//
// Since:
//   fmc-1.0
//------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?