diff --git a/devices/pl011.c b/devices/pl011.c index fc94ee3..41f61e9 100644 --- a/devices/pl011.c +++ b/devices/pl011.c @@ -18,16 +18,17 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include + #define PL011_SERIAL_BASE 0x10009000 #define PL011_SERIAL_FLAG_REGISTER 0x18 #define PL011_SERIAL_BUFFER_FULL (1 << 5) void pl011_putc(char c) { - /* Wait until the serial buffer is empty */ - while (*(volatile unsigned long*)(PL011_SERIAL_BASE + PL011_SERIAL_FLAG_REGISTER) - & (PL011_SERIAL_BUFFER_FULL)); + /* Wait until the serial buffer is empty */ + while (*(volatile uint32*)(PL011_SERIAL_BASE + PL011_SERIAL_FLAG_REGISTER) & (PL011_SERIAL_BUFFER_FULL)); - /* When it's empty, put our character at the base */ - *(volatile unsigned long*)PL011_SERIAL_BASE = c; + /* When it's empty, put our character at the base */ + *(volatile uint32*)PL011_SERIAL_BASE = c; }