`DOSE_TIMER_DEV` is defined in `board.h`, so we have to include it.
It's not included by the header (and should not), so move the check
to the .c file.
Previously we would not disable the sense pin, this meant that
a node could still wake up if the standby pin is not connected.
Properly disable sensing when in standby and wait for a state
transition to IDLE to avoid aborting a reception and messing up the
DOSE internal state.
Some CAN transceivers have a standby pin that has to be pulled low
in order to use it.
If the interface is disabled we can set it to high again to save some
power.
A fixed timeout is either too long for high symbol rates or too short
for low symbol rates.
To fix this, calculate the timeout based on the symbol rate.
For this, the old 5ms timeout is equivalent to 58 bytes being transmitted
at 115200 baud (8 data bit + start & stop bit).
I rounded this to 50 bytes which should yield 4340 µs.
The expandable GPIO API requires the comparison of structured GPIO types. This means that inline functions must be used instead of direct comparisons. For the migration process, drivers must first be changed so that they use the inline comparison functions.