Go to the documentation of this file.
19 #include <FreeNOS/Constant.h>
20 #include <FreeNOS/User.h>
25 return new PL011(UART0_IRQ);
71 (1 << 6) | (1 << 7) | (1 << 8) |
72 (1 << 9) | (1 << 10));
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Write bytes to the device.
The PL011 is a commonly available UART device frequently found in ARM systems.
Size getCount() const
Get byte count.
Result map(Address phys, Size size=4096, Memory::Access access=Memory::Readable|Memory::Writable|Memory::User)
Map I/O address space.
Arch::IO m_io
I/O instance.
void write(u32 reg, u32 data)
write to memory mapped I/O register
#define PAGESIZE
ARM uses 4K pages.
PL011(const u32 irq)
Constructor.
FileSystem::Result bufferedWrite(const void *buffer, const Size size)
Buffered write bytes to the I/O buffer.
C uint isKernel
Non-zero if this executable is linked as the kernel.
API::Result ProcessCtl(const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0)
Prototype for user applications.
void setBase(const Address base)
Set memory I/O base offset.
Abstract Input/Output buffer.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
static T * create()
Abstract function to create an instance of T.
u32 read(u32 reg) const
read from memory mapped I/O register
Provides sequential byte stream of incoming (RX) and outgoing (TX) data.
String m_identifier
Unique identifier for this Device.
Result
Result code for filesystem Actions.
unsigned char u8
Unsigned 8-bit number.
virtual FileSystem::Result interrupt(const Size vector)
Called when an interrupt has been triggered for this device.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read bytes from the device.
virtual FileSystem::Result initialize()
Initializes the UART.
const u32 m_irq
interrupt vector