pub fn new(
        peripheral: impl Instance + 'd,
        rx_pin: impl PeripheralInput<'d>,
        tx_pin: impl PeripheralOutput<'d>,
        baud_rate: BaudRate,
        mode: TwaiMode,
    ) -> Self {
        Self::new_internal(peripheral.degrade(), rx_pin, tx_pin, baud_rate, false, mode)
    }
Create a new instance of [TwaiConfiguration]

You will need to use a transceiver to connect to the TWAI bus
esp-hal/src/twai/mod.rs