Listing 7

static const unsigned int baseAddress = 0xfffe0000;
enum Registers
{
    STATUS = 0x00, // UART status register
    TXCTL  = 0x01, // Transmit control
    RXCTL  = 0x02, // Receive control
    ... and so on ...
};

inline volatile uint8_t *regAddress(Registers reg)
{
    return reinterpret_cast<volatile uint8_t*>(baseAddress + reg);
}