zephyr: Fix duplicated definition warning
Fix a duplicated definition warning in zephyr/test/system.
BRANCH=none
TEST=zmake testall
LOG_MODULE_REGISTER(test);
-#define BBRAM_OFF(name) DT_PROP(DT_PATH(named_bbram_regions, name), offset)
-#define BBRAM_SIZE(name) DT_PROP(DT_PATH(named_bbram_regions, name), size)
+#define BBRAM_REGION_OFF(name) \
+ DT_PROP(DT_PATH(named_bbram_regions, name), offset)
+#define BBRAM_REGION_SIZE(name) \
+ DT_PROP(DT_PATH(named_bbram_regions, name), size)
static char mock_data[64] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@";
@@ -55,23 +57,23 @@ static void test_bbram_get(void)
rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD0, output);
zassert_equal(rc, 0, NULL);
- zassert_mem_equal(output, mock_data + BBRAM_OFF(pd0), BBRAM_SIZE(pd0),
- NULL);
+ zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd0),
+ BBRAM_REGION_SIZE(pd0), NULL);
rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD1, output);
zassert_equal(rc, 0, NULL);
- zassert_mem_equal(output, mock_data + BBRAM_OFF(pd1), BBRAM_SIZE(pd1),
- NULL);
+ zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd1),
+ BBRAM_REGION_SIZE(pd1), NULL);
rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD2, output);
zassert_equal(rc, 0, NULL);
- zassert_mem_equal(output, mock_data + BBRAM_OFF(pd2), BBRAM_SIZE(pd2),
- NULL);
+ zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd2),
+ BBRAM_REGION_SIZE(pd2), NULL);
rc = system_get_bbram(SYSTEM_BBRAM_IDX_TRY_SLOT, output);
zassert_equal(rc, 0, NULL);
- zassert_mem_equal(output, mock_data + BBRAM_OFF(try_slot),
- BBRAM_SIZE(try_slot), NULL);
+ zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(try_slot),
+ BBRAM_REGION_SIZE(try_slot), NULL);
}
void test_main(void)
