STM32 BBSRAM fixed (and formated) flags

This commit is contained in:
David Sidrane 2016-06-28 16:25:04 -10:00
parent 8323e97201
commit eacd672ab0
2 changed files with 5 additions and 4 deletions

View File

@ -593,8 +593,9 @@ static int stm32_bbsram_ioctl(FAR struct file *filep, int cmd,
bbrr->fileno = bbr->bbf->fileno;
bbrr->lastwrite = bbr->bbf->lastwrite;
bbrr->len = bbr->bbf->len;
bbrr->flags = (bbr->bbf->crc == stm32_bbsram_crc(bbr->bbf)) ? eCRCValid : 0;
bbrr->flags = (bbr->bbf->dirty) ? eDirty : 0;
bbrr->flags = ((bbr->bbf->crc == stm32_bbsram_crc(bbr->bbf))
? BBSRAM_CRC_VALID : 0);
bbrr->flags |= ((bbr->bbf->dirty) ? BBSRAM_DIRTY : 0);
ret = OK;
}

View File

@ -83,8 +83,8 @@
enum bbsramdf_e
{
eCRCValid = 1, /* The crc is valid */
eDirty = 2, /* The file was closed */
BBSRAM_CRC_VALID = 1, /* The crc is valid */
BBSRAM_DIRTY = 2, /* The file was closed */
};