Ejemplo n.º 1
0
//! This fonction inform about the memory type
//!
//! @param lun        Logical unit number
//!
//! @return TRUE  -> The memory is removal
//!
Bool  mem_removal( U8 lun )
{
   switch( lun )
   {
#     if (LUN_0 == ENABLE)
      case LUN_ID_0:
         return Lun_0_removal();
         break;
#     endif
#     if (LUN_1 == ENABLE)
      case LUN_ID_1:
         return Lun_1_removal();
         break;
#     endif
#     if (LUN_2 == ENABLE)
      case LUN_ID_2:
         return Lun_2_removal();
         break;
#     endif
#     if (LUN_3 == ENABLE)
      case LUN_ID_3:
         return Lun_3_removal();
         break;
#     endif
#     if (LUN_4 == ENABLE)
      case LUN_ID_4:
         return Lun_4_removal();
         break;
#     endif
#     if (LUN_5 == ENABLE)
      case LUN_ID_5:
         return Lun_5_removal();
         break;
#     endif
#     if (LUN_6 == ENABLE)
      case LUN_ID_6:
         return Lun_6_removal();
         break;
#     endif
#     if (LUN_7 == ENABLE)
      case LUN_ID_7:
         return Lun_7_removal();
         break;
#     endif
#     if (LUN_USB == ENABLE)
      default:
         return Lun_usb_removal();
         break;
#     endif
   }
   return   CTRL_FAIL;
}
Ejemplo n.º 2
0
Bool mem_removal(U8 lun)
{
  Bool removal;

  if (!Ctrl_access_lock()) return TRUE;

  removal =
#if MAX_LUN
            (lun < MAX_LUN) ? lun_desc[lun].removal() :
#endif
#if LUN_USB == ENABLE
                              Lun_usb_removal();
#else
                              TRUE;
#endif

  Ctrl_access_unlock();

  return removal;
}
Ejemplo n.º 3
0
bool mem_removal(U8 lun)
{
  bool removal;
#if MAX_LUN==0
  UNUSED(lun);
#endif

  if (!Ctrl_access_lock()) return true;

  removal =
#if MAX_LUN
          (lun < MAX_LUN) ? lun_desc[lun].removal() :
#endif
#if LUN_USB == ENABLE
                              Lun_usb_removal();
#else
                              true;
#endif

  Ctrl_access_unlock();

  return removal;
}