![]() |
Max OS 0.3
|
Handles 8 bit ports. More...
#include <port.h>
Public Member Functions | |
| Port8Bit (uint16_t port_number) | |
| Construct a new Port object for ports handling 8 bit read/writes. | |
| virtual void | write (uint8_t data) |
| write a byte to the port | |
| virtual uint8_t | read () |
| read a byte from the port | |
Additional Inherited Members | |
Protected Member Functions inherited from MaxOS::hardwarecommunication::Port | |
| Port (uint16_t port_number) | |
| Construct a new Port object. | |
Protected Attributes inherited from MaxOS::hardwarecommunication::Port | |
| uint16_t | m_port_number |
| The port to write to / read from. | |
|
explicit |
|
virtual |
read a byte from the port
Definition at line 51 of file port.cpp.
References MaxOS::hardwarecommunication::Port::m_port_number.
Referenced by MaxOS::drivers::peripherals::KeyboardDriver::activate(), MaxOS::drivers::peripherals::MouseDriver::activate(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::flush(), MaxOS::drivers::peripherals::KeyboardDriver::handle_interrupt(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::identify(), MaxOS::drivers::SerialConsole::put_character(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::read(), MaxOS::drivers::SerialConsole::SerialConsole(), and MaxOS::drivers::disk::AdvancedTechnologyAttachment::write().
|
virtual |
write a byte to the port
| data | the byte to write |
Reimplemented in MaxOS::hardwarecommunication::Port8BitSlow.
Definition at line 41 of file port.cpp.
References MaxOS::hardwarecommunication::Port::m_port_number.
Referenced by MaxOS::drivers::peripherals::KeyboardDriver::activate(), MaxOS::drivers::peripherals::MouseDriver::activate(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::flush(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::identify(), MaxOS::drivers::SerialConsole::put_character(), MaxOS::drivers::disk::AdvancedTechnologyAttachment::read(), MaxOS::drivers::SerialConsole::SerialConsole(), and MaxOS::drivers::disk::AdvancedTechnologyAttachment::write().