Skip to content

spi: Tolerate platforms defining their enums differently#144

Merged
chrysn merged 3 commits intomainfrom
stm32-spi
Jan 13, 2025
Merged

spi: Tolerate platforms defining their enums differently#144
chrysn merged 3 commits intomainfrom
stm32-spi

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Jan 13, 2025

When testing them with full RIOT, #141 had errors like this:

100 |             clk: riot_sys::spi_clk_t_SPI_CLK_5MHZ,
    |                            ^^^^^^^^^^^^^^^^^^^^^^ not found in `riot_sys`

This PR uses the cfg(accessible()) emulation to switch around between how the value is best accessed.

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Jan 13, 2025

Testing is a bit odd because we can't rely on CI (after all, #141 passed) and I don't want to add just another board for this PR. I tested this by running in tests/spi the command RIOTBASE=~/git/RIOT make BOARD=stm32f429i-disc1 -- a build test suffices here.

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Jan 13, 2025

Just Also tested with make buildtest BOARDS="remote-revb maple-mini cc2538dk samr34-xpro stm32f429i-disco stm32l496g-disco", an arbitrary selection just to get a bit more breadth.

I'm setting this to draft, tough, because on BOARD=usb-kw41z, I found more oddities; maybe this belongs in here still.

@chrysn chrysn marked this pull request as draft January 13, 2025 16:35
Copy link
Copy Markdown
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but not sure if I can assess the in-depth implications of this.

@chrysn chrysn marked this pull request as ready for review January 13, 2025 17:47
@chrysn chrysn merged commit 4861e4e into main Jan 13, 2025
@chrysn chrysn deleted the stm32-spi branch January 13, 2025 17:48
chrysn added a commit to chrysn-pull-requests/RIOT that referenced this pull request Jan 13, 2025
This pulls in the changes of [144].

[144]: RIOT-OS/rust-riot-wrappers#144
AnnsAnns pushed a commit to AnnsAnns/RIOT that referenced this pull request Jan 15, 2025
This pulls in the changes of [144].

[144]: RIOT-OS/rust-riot-wrappers#144
dprigoshij pushed a commit to dprigoshij/RIOT that referenced this pull request Mar 24, 2025
This pulls in the changes of [144].

[144]: RIOT-OS/rust-riot-wrappers#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants