Public Member Functions | Static Public Attributes | Protected Attributes
SerialDevice Class Reference

Provides sequential byte stream of incoming (RX) and outgoing (TX) data. More...

#include <SerialDevice.h>

Inheritance diagram for SerialDevice:
Device AbstractFactory< SerialDevice > File i8250 NS16550 PL011

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 StringgetIdentifier () 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 SerialDevicecreate ()
 Abstract function to create an instance of T. More...

Detailed Description

Provides sequential byte stream of incoming (RX) and outgoing (TX) data.

Definition at line 37 of file SerialDevice.h.

Constructor & Destructor Documentation

◆ SerialDevice()

SerialDevice::SerialDevice ( const u32  irq)


irqInterrupt vector

Definition at line 22 of file SerialDevice.cpp.

Member Function Documentation

◆ getIrq()

u32 SerialDevice::getIrq ( ) const

Get interrupt vector.

Interrupt vector

Definition at line 29 of file SerialDevice.cpp.

References m_irq.

Referenced by main().

Field Documentation

◆ inodeNumber

u32 SerialDevice::inodeNumber = 2

Keeps track of inode number for SerialDevices.

Definition at line 57 of file SerialDevice.h.

Referenced by main().

◆ m_io

Arch::IO SerialDevice::m_io

◆ m_irq

const u32 SerialDevice::m_irq

The documentation for this class was generated from the following files: