diff --git a/boards/ek-lm4f120xl/include/board.h b/boards/ek-lm4f120xl/include/board.h index f4acd46b5e9f..2863d1bac218 100644 --- a/boards/ek-lm4f120xl/include/board.h +++ b/boards/ek-lm4f120xl/include/board.h @@ -46,22 +46,26 @@ extern "C" { #define LED1_PIN GPIO_PIN(5, 2) #define LED2_PIN GPIO_PIN(5, 3) -#define LED_PORT (GPIO_PORTF_DATA_R) +/** + * @brief Port used for `LED0_ON` and similar implementations + * @internal + * */ +#define LED_PORT() (GPIO_PORTF_DATA_R) #define LED0_MASK (1 << 7) #define LED1_MASK (1 << 2) #define LED2_MASK (1 << 1) -#define LED0_ON (LED_PORT |= LED0_MASK) -#define LED0_OFF (LED_PORT &= ~LED0_MASK) -#define LED0_TOGGLE (LED_PORT ^= LED0_MASK) +#define LED0_ON (LED_PORT() |= LED0_MASK) +#define LED0_OFF (LED_PORT() &= ~LED0_MASK) +#define LED0_TOGGLE (LED_PORT() ^= LED0_MASK) -#define LED1_ON (LED_PORT |= LED1_MASK) -#define LED1_OFF (LED_PORT &= ~LED1_MASK) -#define LED1_TOGGLE (LED_PORT ^= LED1_MASK) +#define LED1_ON (LED_PORT() |= LED1_MASK) +#define LED1_OFF (LED_PORT() &= ~LED1_MASK) +#define LED1_TOGGLE (LED_PORT() ^= LED1_MASK) -#define LED2_ON (LED_PORT |= LED2_MASK) -#define LED2_OFF (LED_PORT &= ~LED2_MASK) -#define LED2_TOGGLE (LED_PORT ^= LED2_MASK) +#define LED2_ON (LED_PORT() |= LED2_MASK) +#define LED2_OFF (LED_PORT() &= ~LED2_MASK) +#define LED2_TOGGLE (LED_PORT() ^= LED2_MASK) /** @} */ /** diff --git a/examples/rust-gcoap/Makefile b/examples/rust-gcoap/Makefile index 9fa9de25437d..418cfb060873 100644 --- a/examples/rust-gcoap/Makefile +++ b/examples/rust-gcoap/Makefile @@ -48,8 +48,4 @@ BASELIBS += $(APPLICATION_RUST_MODULE).module FEATURES_REQUIRED += rust_target -# Currently unknown, something related to the LED_PORT definition that doesn't -# pass C2Rust's transpilation -BOARD_BLACKLIST := ek-lm4f120xl - include $(RIOTBASE)/Makefile.include diff --git a/examples/rust-hello-world/Makefile b/examples/rust-hello-world/Makefile index b6d08353e4af..c411d26d268b 100644 --- a/examples/rust-hello-world/Makefile +++ b/examples/rust-hello-world/Makefile @@ -21,8 +21,4 @@ BASELIBS += $(APPLICATION_RUST_MODULE).module FEATURES_REQUIRED += rust_target -# Currently unknown, something related to the LED_PORT definition that doesn't -# pass C2Rust's transpilation -BOARD_BLACKLIST := ek-lm4f120xl - include $(RIOTBASE)/Makefile.include diff --git a/tests/rust_libs/Makefile b/tests/rust_libs/Makefile index 9e587f31a564..b2936e89683e 100644 --- a/tests/rust_libs/Makefile +++ b/tests/rust_libs/Makefile @@ -6,8 +6,4 @@ USEMODULE += ztimer_msec FEATURES_REQUIRED += rust_target -# Currently unknown, something related to the LED_PORT definition that doesn't -# pass C2Rust's transpilation -BOARD_BLACKLIST := ek-lm4f120xl - include $(RIOTBASE)/Makefile.include diff --git a/tests/rust_minimal/Makefile b/tests/rust_minimal/Makefile index 9001f83c6c9b..37ef882eee1b 100644 --- a/tests/rust_minimal/Makefile +++ b/tests/rust_minimal/Makefile @@ -5,8 +5,4 @@ BASELIBS += $(APPLICATION_RUST_MODULE).module FEATURES_REQUIRED += rust_target -# Currently unknown, something related to the LED_PORT definition that doesn't -# pass C2Rust's transpilation -BOARD_BLACKLIST := ek-lm4f120xl - include $(RIOTBASE)/Makefile.include