blockdiag rmt_rx {
    node_width = 80;
    node_height = 60;
    default_group_color = lightgrey;

    o -> p -> a;
    q -> r;
    r -- s;
    s -> p [folded];

    a -> b [label=GPIO];
    b -> c -> d;
    e -- f;
    f -> b [folded];

    o [style=none, label="", background="../../../_static/rmt-waveform-modulated.png"]
    p [shape=endpoint, label="demod"]
    q [label="Remove\nCarrier"]
    r [style=none, label="", background="../../../_static/rmt-carrier.png"]
    s [shape=none, label=""]

    a [style=none, label="", background="../../../_static/rmt-waveform.png"]
    b [label=Filter]
    c [label="Edge\nDetect"]
    d [style=none, width=100, label="{11,high,7,low},\n{5,high,5,low},\n..."]
    e [style=none, width=60, height=40, label="Enable\nFilter"]
    f [shape=none, label=""]

    group {
        label = "Optional"
        q,r,o,p;
    }
    group {
        label = "Input"
        a,e;
    }
    group {
        label = "RMT Receiver"
        b,c;
    }
    group {
        label = "Output"
        d;
    }
}
