Use writeBitmasked for configuring output