Micron MT29F NAND driver
MT_uint8 NAND_Lock ( void  )

The LOCK command locks all of the blocks in the device. Locked blocks are write-protected from PROGRAM and ERASE operations.

Returns:
Return code
Return values:
DRIVER_STATUS_NOT_INITIALIZED
NAND_SUCCESS
Pseudo Code Steps
  1. Send lock command (2Ah)

Definition at line 1281 of file nand_MT29F_lld.c.

References CMD_LOCK, driver_status, DRIVER_STATUS_INITIALIZED, DRIVER_STATUS_NOT_INITIALIZED, NAND_SUCCESS, PLATFORM_Close(), PLATFORM_Open(), and PLATFORM_SendCmd().

                         {

   /* verify if driver is initialized */
   if(DRIVER_STATUS_INITIALIZED != driver_status)
      return DRIVER_STATUS_NOT_INITIALIZED;

   /* init board transfer */
   PLATFORM_Open();

   /* send command */
   PLATFORM_SendCmd(CMD_LOCK);

   /* close board transfer */
   PLATFORM_Close();

   return NAND_SUCCESS;
}