3 ms·
> if(!sync() || !sync() || !sync()) return SWBB_FAIL; I don't know why, but I find this really elegant. It's a lovely use of short-circuit returns combined wit
by Schwolop 6y ago
> if(!sync() || !sync() || !sync()) return SWBB_FAIL;
I don't know why, but I find this really elegant. It's a lovely use of short-circuit returns combined with the electrical protocol to find the frame initialiser (3 syncs) that marks the start of a valid frame.
This is a really cool implementation!