|
|
|
|
|
by geogriffin
1936 days ago
|
|
FWIW, you can write the conditional compilation example like so: fn read_keys(#[cfg(feature = "splitapple")]
port: nrf52840_hal::pac::P1,
#[cfg(feature = "keytron")]
port: nrf52833_hal::pac::P0) -> Packet {}
I suppose the compiler could try to suggest that as a fix. |
|
A more "rustic" solution would be to use a trait, e.g.