:) awesome, but please try to use macros at least.
and since i don't see neither `mode` 0x3 nor `mode` 0x6, why a simple enum and an `if (mode == ENUM_VAR)` is not good enough to use here?