Actually `writeByte` takes `unsigned` so casting to that would be enough.