Commit 371d4adb authored by Fabrice DJIATSA's avatar Fabrice DJIATSA Committed by Anas Nashif
Browse files

drivers: mipi_dbi: update macro to get address



DT_REG_ADDR now generates an unsigned string terminated with U
which doesn't match the way the macros is used in a CONCAT
to build a FMC_BANK1_(1/2/3) define that is defined in hal.
`DT_REG_ADDR_RAW` should now be used to get the RAW FMC bank index

Signed-off-by: default avatarFabrice DJIATSA <fabrice.djiatsa-ext@st.com>
parent 18e568d5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -178,7 +178,8 @@ static struct mipi_dbi_driver_api mipi_dbi_stm32_fmc_driver_api = {
	.write_display = mipi_dbi_stm32_fmc_write_display,
};

#define MIPI_DBI_FMC_GET_ADDRESS(n) _CONCAT(FMC_BANK1_, UTIL_INC(DT_REG_ADDR(DT_INST_PARENT(n))))
#define MIPI_DBI_FMC_GET_ADDRESS(n) _CONCAT(FMC_BANK1_,                                            \
					UTIL_INC(DT_REG_ADDR_RAW(DT_INST_PARENT(n))))

#define MIPI_DBI_FMC_GET_DATA_ADDRESS(n)                                                           \
	MIPI_DBI_FMC_GET_ADDRESS(n) + (1 << (DT_INST_PROP(n, register_select_pin) + 1))