Go to the documentation of this file.
18 #include <FreeNOS/Constant.h>
19 #include <FreeNOS/User.h>
@ LineControlDivisorLatch
Size getCount() const
Get byte count.
virtual FileSystem::Result interrupt(const Size vector)
Called when an interrupt has been triggered for this device.
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.
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.
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Write bytes to the device.
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.
NS16550(const u32 irq)
Constructor.
virtual FileSystem::Result initialize()
Initializes the UART.
void setDivisorLatch(bool enabled)
Enable access to the divisor latch registers.
const u32 m_irq
interrupt vector
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read bytes from the device.
The NS16550 is a commonly available UART device.