public void WriteRegister(byte addr, byte data) { if (addr != UARTDATA) { throw new Exception("UART: Writing invalid register " + addr); } _attachedDevice.SendByte(data); }