drivers/mtd: Implement MTDIOC_ERASESTATE for MTD drivers

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2021-07-16 14:16:41 -03:00
committed by Xiang Xiao
parent 50ea22314e
commit 882a0964b3
11 changed files with 99 additions and 0 deletions
+9
View File
@@ -449,6 +449,15 @@ static int filemtd_ioctl(FAR struct mtd_dev_s *dev, int cmd,
}
break;
case MTDIOC_ERASESTATE:
{
FAR uint8_t *result = (FAR uint8_t *)arg;
*result = CONFIG_FILEMTD_ERASESTATE;
ret = OK;
}
break;
default:
ret = -ENOTTY; /* Bad command */
break;