pl011: use types.h definition of uint32 instead of 'unsigned long'
This commit is contained in:
parent
fa96f9293b
commit
e550deab5c
@ -18,16 +18,17 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user