From 0e82a4c43958e2bdfc1da4a5f7d997ae8c050d36 Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 2 Sep 2010 09:16:47 +0000 Subject: [PATCH] Rename macros. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4222 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/flash_lpc2.c | 2 +- bertos/struct/bitarray.h | 4 ++-- bertos/struct/bitarray_test.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bertos/cpu/arm/drv/flash_lpc2.c b/bertos/cpu/arm/drv/flash_lpc2.c index a9ffcc67..ffcc1b0a 100644 --- a/bertos/cpu/arm/drv/flash_lpc2.c +++ b/bertos/cpu/arm/drv/flash_lpc2.c @@ -94,7 +94,7 @@ struct FlashHardware #define FLASH_PAGE_CNT FLASH_MEM_SIZE / FLASH_PAGE_SIZE_BYTES -ALLOC_BITARRAY(page_dirty, FLASH_PAGE_CNT); +BITARRAY_ALLOC(page_dirty, FLASH_PAGE_CNT); static BitArray lpc2_bitx; uint8_t erase_group[] = { diff --git a/bertos/struct/bitarray.h b/bertos/struct/bitarray.h index fdd9b86f..36d1aa2a 100644 --- a/bertos/struct/bitarray.h +++ b/bertos/struct/bitarray.h @@ -52,8 +52,8 @@ typedef struct BitArray uint8_t *array; } BitArray; -#define ALLOC_BITARRAY(name, size) uint8_t name[DIV_ROUNDUP((size), 8)] -#define BIT_ARRAY_SIZE(name) (sizeof((name)) * 8) +#define BITARRAY_ALLOC(name, size) uint8_t name[DIV_ROUNDUP((size), 8)] +#define BITARRAY_SIZE(name) (sizeof((name)) * 8) INLINE void bitarray_set(BitArray *bitx, int idx) { diff --git a/bertos/struct/bitarray_test.c b/bertos/struct/bitarray_test.c index 250977de..bea6771f 100644 --- a/bertos/struct/bitarray_test.c +++ b/bertos/struct/bitarray_test.c @@ -46,8 +46,8 @@ #define TEST1_LEN 31 #define TEST2_LEN 17 -ALLOC_BITARRAY(test1, TEST1_LEN); -ALLOC_BITARRAY(test2, TEST2_LEN); +BITARRAY_ALLOC(test1, TEST1_LEN); +BITARRAY_ALLOC(test2, TEST2_LEN); BitArray bitx1; BitArray bitx2; -- 2.25.1