::ready_valid::

Module escape_byte

Enums

Escaped
RxState
TxState

Entities

escape_byte_th

Implementations

impl Rv<Escaped<uint<8>>>
entity escape_bytes<F, #uint N>(self, clk: clock, rst: bool, escapees: [uint<8>; N], escape_fn: F, escape_prefix: uint<8>) -> Rv<uint<8>>
where
    F: Fn(uint<8>) -> uint<8>,

Escapes bytes in the escapees list by first emitting an escape prefix, then emitting the the result of the escape_fn function on the escaped byte.

For example, the stream 1, 2, 3, 4 when called with escapees == [3] and escape_fn = fn (byte) {trunc(byte + 10)} and escape_prefix = 0 will result in 1 2 0 13 4

impl Option<uint<8>>
entity unescape_byte<F>(self, clk: clock, rst: bool, unescape_fn: F, escape_prefix: uint<8>) -> Option<uint<8>>
where
    F: Fn(uint<8>) -> uint<8>,