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