This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 50ea22314e787de13b8dcd73ca0ee694ad3123f6 Author: Gustavo Henrique Nihei <gustavo.ni...@espressif.com> AuthorDate: Fri Jul 16 14:15:51 2021 -0300 arm/lpc43xx: Implement MTDIOC_ERASESTATE for SPIFI Flash driver Signed-off-by: Gustavo Henrique Nihei <gustavo.ni...@espressif.com> --- arch/arm/src/lpc43xx/lpc43_spifi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.c b/arch/arm/src/lpc43xx/lpc43_spifi.c index 1e5df20..cbc2905 100644 --- a/arch/arm/src/lpc43xx/lpc43_spifi.c +++ b/arch/arm/src/lpc43xx/lpc43_spifi.c @@ -895,6 +895,15 @@ static int lpc43_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) } break; + case MTDIOC_ERASESTATE: + { + FAR uint8_t *result = (FAR uint8_t *)arg; + *result = SPIFI_ERASED_STATE; + + ret = OK; + } + break; + case MTDIOC_XIPBASE: default: ret = -ENOTTY; /* Bad command */