/* Writes an 8-bit register.. If UseMmio is TRUE, then the value is written to MMIO space. If UseMmio is FALSE, then the value is written to I/O space. The parameter Offset is added to the base address of the registers. */
UINT8 SerialPortWriteRegister(UINTN Base, UINTN Offset, UINT8 Value, BOOLEAN UseMmio, UINT8 RegisterStride)
/* Writes an 8-bit register.. If UseMmio is TRUE, then the value is written to MMIO space. If UseMmio is FALSE, then the value is written to I/O space. The parameter Offset is added to the base address of the registers. */
UINT8 SerialPortWriteRegister(UINTN Base, UINTN Offset, UINT8 Value, BOOLEAN UseMmio, UINT8 RegisterStride)
{
  if (UseMmio) {
    return MmioWrite8 (Base + Offset * RegisterStride, Value);
  } else {
    return IoWrite8 (Base + Offset * RegisterStride, Value);
  }
}