|
FreeNOS
|
Provides sequential byte stream of incoming (RX) and outgoing (TX) data. More...
#include <SerialDevice.h>
Public Member Functions | |
| SerialDevice (const u32 irq) | |
| Constructor. More... | |
| u32 | getIrq () const |
| Get interrupt vector. More... | |
Public Member Functions inherited from Device | |
| Device (const u32 inode, const FileSystem::FileType type) | |
| Constructor. More... | |
| virtual | ~Device () |
| Destructor. More... | |
| virtual const String & | getIdentifier () const |
| Get unique device identifier. More... | |
| virtual FileSystem::Result | initialize () |
| Initialize the device. More... | |
| virtual FileSystem::Result | interrupt (const Size vector) |
| Called when an interrupt has been triggered for this device. More... | |
Public Member Functions inherited from File | |
| File (const u32 inode, const FileSystem::FileType type=FileSystem::RegularFile, const UserID uid=ZERO, const GroupID gid=ZERO) | |
| Constructor function. More... | |
| virtual | ~File () |
| Destructor function. More... | |
| u32 | getInode () const |
| Get inode number. More... | |
| FileSystem::FileType | getType () const |
| Retrieve our filetype. More... | |
| virtual FileSystem::Result | read (IOBuffer &buffer, Size &size, const Size offset) |
| Read bytes from the file. More... | |
| virtual FileSystem::Result | write (IOBuffer &buffer, Size &size, const Size offset) |
| Write bytes to the file. More... | |
| virtual FileSystem::Result | status (FileSystem::FileStat &st) |
| Retrieve file statistics. More... | |
| virtual bool | canRead () const |
| Check if the File has data ready for reading. More... | |
| virtual bool | canWrite () const |
| Check if the File can be written to. More... | |
Static Public Attributes | |
| static u32 | inodeNumber = 2 |
| Keeps track of inode number for SerialDevices. More... | |
Protected Attributes | |
| const u32 | m_irq |
| interrupt vector More... | |
| Arch::IO | m_io |
| I/O instance. More... | |
Protected Attributes inherited from Device | |
| String | m_identifier |
| Unique identifier for this Device. More... | |
Protected Attributes inherited from File | |
| const u32 | m_inode |
| Inode number. More... | |
| const FileSystem::FileType | m_type |
| Type of this file. More... | |
| UserID | m_uid |
| Owner of the file. More... | |
| GroupID | m_gid |
| Group of the file. More... | |
| FileSystem::FileModes | m_access |
| Access permissions. More... | |
| Size | m_size |
| Size of the file, in bytes. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractFactory< SerialDevice > | |
| static SerialDevice * | create () |
| Abstract function to create an instance of T. More... | |
Provides sequential byte stream of incoming (RX) and outgoing (TX) data.
Definition at line 37 of file SerialDevice.h.
| SerialDevice::SerialDevice | ( | const u32 | irq | ) |
| u32 SerialDevice::getIrq | ( | ) | const |
Get interrupt vector.
Definition at line 29 of file SerialDevice.cpp.
References m_irq.
Referenced by main().
|
static |
Keeps track of inode number for SerialDevices.
Definition at line 57 of file SerialDevice.h.
Referenced by main().
|
protected |
I/O instance.
Definition at line 65 of file SerialDevice.h.
Referenced by i8250::i8250(), i8250::initialize(), PL011::initialize(), NS16550::initialize(), PL011::interrupt(), NS16550::interrupt(), i8250::read(), PL011::read(), NS16550::read(), NS16550::setDivisorLatch(), i8250::write(), PL011::write(), and NS16550::write().
|
protected |
interrupt vector
Definition at line 62 of file SerialDevice.h.
Referenced by getIrq(), i8250::initialize(), PL011::initialize(), NS16550::initialize(), i8250::interrupt(), PL011::interrupt(), and NS16550::read().
1.8.17