STM32F7 BBSRAM fixed (and formated) flags
This commit is contained in:
parent
eacd672ab0
commit
efb2850b5f
@ -593,8 +593,9 @@ static int stm32_bbsram_ioctl(FAR struct file *filep, int cmd,
|
|||||||
bbrr->fileno = bbr->bbf->fileno;
|
bbrr->fileno = bbr->bbf->fileno;
|
||||||
bbrr->lastwrite = bbr->bbf->lastwrite;
|
bbrr->lastwrite = bbr->bbf->lastwrite;
|
||||||
bbrr->len = bbr->bbf->len;
|
bbrr->len = bbr->bbf->len;
|
||||||
bbrr->flags = (bbr->bbf->crc == stm32_bbsram_crc(bbr->bbf)) ? eCRCValid : 0;
|
bbrr->flags = ((bbr->bbf->crc == stm32_bbsram_crc(bbr->bbf))
|
||||||
bbrr->flags = (bbr->bbf->dirty) ? eDirty : 0;
|
? BBSRAM_CRC_VALID : 0);
|
||||||
|
bbrr->flags |= ((bbr->bbf->dirty) ? BBSRAM_DIRTY : 0);
|
||||||
ret = OK;
|
ret = OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* arch/arm/src/stm32f7/stm32_bbsram.h
|
* arch/arm/src/stm32f7/stm32_bbsram.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||||
* David Sidrane <david_s5@nscdg.com>
|
* David Sidrane <david_s5@nscdg.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -83,8 +83,8 @@
|
|||||||
|
|
||||||
enum bbsramdf_e
|
enum bbsramdf_e
|
||||||
{
|
{
|
||||||
eCRCValid = 1, /* The crc is valid */
|
BBSRAM_CRC_VALID = 1, /* The crc is valid */
|
||||||
eDirty = 2, /* The file was closed */
|
BBSRAM_DIRTY = 2, /* The file was closed */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user