diff options
| author | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-12-15 12:20:53 -0500 |
|---|---|---|
| committer | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-12-15 12:25:09 -0500 |
| commit | d2bee58caa082ed476d5b1d8bda39992df29fd07 (patch) | |
| tree | f73cc3ac21d210ad1979b77e1b8f1fbd8de0ee3c /src | |
| parent | c7e5123f6604fbb9ca510f01af9b60e777bf57b4 (diff) | |
Fix debug assert in ENET initialization
Wrong way to check for the ignored four low bits.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -67,7 +67,7 @@ impl<const N: u8> Enet<N> { // The user's buffer needs to be a non-zero multiple of 16 to account for // those extra bytes. We double-check this by asserting the requirement at // compile time in the IoBuffer types. - debug_assert!(rx_ring.mtu() != 0 && rx_ring.mtu() & 0xF == rx_ring.mtu()); + debug_assert!(rx_ring.mtu() != 0 && rx_ring.mtu() & 0xF == 0); ral::write_reg!(ral::enet, enet, MRBR, R_BUF_SIZE: (rx_ring.mtu() >> 4) as u32); // Descriptor rings are pre-configured when the user acquires the slices. |
