Instead of uint8_t use the type bool for check()

This will make the code more readable. Instead of checking for equality to 1,
you can just use the check() function as an expression.