emmc_lastcmd function added.