May 01, 2005
Register Access in C++
Listing 5
struct uart_device_t
{
uint8_t STATUS;
uint8_t TXCTL;
... and so on ...
};
static volatile uart_device_t * const uart_device
= reinterpret_cast<volatile uart_device_t *>(0xfffe0000);
uart_device->TXBUF = 10;
uart_device->TXCTL = 3;
|
|
||||||||||||||||||||||||||||
|
|