Add duration argument to watchdog.feed function.
watchdog.start function's delay keeps duration argument but it's meaning
changes to initial watchdog feeding.
This change makes the watchdog more flexible. It allows one to set
different initial timeout duration then during normal operation. This
allows to tighten the timeouts rather than having to use biggest one.
It would also allow one to set a long timeout before running some long
blocking operation.
Ensure that the fractional part of the clock divider is accurately
calculated. This does additional u32 division/mod operations, which I
think is better than using u64 for its extra precision.
Also:
- Add additional asserts to catch out-of-bounds results.
- Make the version that accepts the system clock as a parameter
const and public, so if anyone wants to hardcode the system
frequency they can avoid any runtime computation.
- Remove the `inline` attributes because the function has grown quite a
bit.
DS18B20 sensors require a strong pullup to be applied for the duration
of the temperature conversion, within 10us of the command. The rp2xxx
pins have sufficient drive strength to use as the pullup (no external
mosfet needed).
Add a new write_bytes_pullup() that will apply the pullup after
bytes are written. Existing read_bytes()/write_bytes() has no change to
onewire timing.
A pio_onewire_parasite example reads multiple sensors individually,
applying the strong pullup.
This commit adds a new PIO program which implements SPI. This allows
you to drive more than 2 SPI buses by using PIO state machines as
additional duplex SPI interfaces.
The driver supports both blocking and async modes of operation and
exclusively uses the DMA for async IO.
This commit adds StateMachineRx::dma_pull_repeated and
StateMachineTx::dma_push_repeated which allow you to discard reads or
send dummy writes to the state machine using the DMA hardware