From eacd672ab022de14d8ac3d9b6da515d0a0b99543 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 28 Jun 2016 16:25:04 -1000 Subject: [PATCH] STM32 BBSRAM fixed (and formated) flags --- arch/arm/src/stm32/stm32_bbsram.c | 5 +++-- arch/arm/src/stm32/stm32_bbsram.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/stm32/stm32_bbsram.c b/arch/arm/src/stm32/stm32_bbsram.c index e35f5e05a7..81c49340ae 100644 --- a/arch/arm/src/stm32/stm32_bbsram.c +++ b/arch/arm/src/stm32/stm32_bbsram.c @@ -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; } diff --git a/arch/arm/src/stm32/stm32_bbsram.h b/arch/arm/src/stm32/stm32_bbsram.h index 69d0046f5c..536273f115 100644 --- a/arch/arm/src/stm32/stm32_bbsram.h +++ b/arch/arm/src/stm32/stm32_bbsram.h @@ -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 */ };