![]() |
Max OS 0.3
|
Driver for the PS/2 mouse, manages the mouse and triggers events when the mouse moves or a button is pressed. More...
#include <mouse.h>
Public Member Functions | |
| MouseDriver () | |
| Constructs a new MouseDriver object and registers it as an interrupt handler for interrupt 0x2C. | |
| void | activate () final |
| activate the mouse | |
| string | device_name () final |
| Get the name of the device. | |
Public Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| virtual system::cpu_status_t * | handle_interrupt (system::cpu_status_t *status) |
| Handles an interrupt and returns the status. | |
Public Member Functions inherited from MaxOS::drivers::Driver | |
| virtual void | deactivate () |
| Deactivate the driver. | |
| virtual void | initialise () |
| Initialise the driver. | |
| virtual uint32_t | reset () |
| Reset the driver. | |
| virtual string | vendor_name () |
| Get who created the device. | |
Public Member Functions inherited from MaxOS::common::EventManager< MouseEvents > | |
| void | connect_event_handler (EventHandler< MouseEvents > *handler) |
| connect an event handler to the event manager if it is not already connected | |
| void | disconnect_event_handler (EventHandler< MouseEvents > *handler) |
| disconnect an event handler from the event manager if it is connected | |
| Vector< Event< MouseEvents > * > | raise_event (Event< MouseEvents > *event) |
| Calls the on_event function of all the event m_handlers connected to the event manager and returns a list of the results. | |
Additional Inherited Members | |
Protected Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| InterruptHandler (uint8_t interrupt_number, int64_t redirect=-1, uint64_t redirect_index=0) | |
| Creates a new interrupt handler and registers it with the interrupt manager. | |
| ~InterruptHandler () | |
| Destroys the interrupt handler and unregisters it from the interrupt manager. | |
Protected Attributes inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| uint8_t | m_interrupt_number |
| The interrupt number this handler handles. | |
Protected Attributes inherited from MaxOS::common::EventManager< MouseEvents > | |
| Vector< EventHandler< MouseEvents > * > | m_handlers |
Driver for the PS/2 mouse, manages the mouse and triggers events when the mouse moves or a button is pressed.
| MouseDriver::MouseDriver | ( | ) |
Constructs a new MouseDriver object and registers it as an interrupt handler for interrupt 0x2C.
Definition at line 79 of file mouse.cpp.
|
finalvirtual |
activate the mouse
Reimplemented from MaxOS::drivers::Driver.
Definition at line 91 of file mouse.cpp.
References MaxOS::hardwarecommunication::Port8Bit::read(), and MaxOS::hardwarecommunication::Port8Bit::write().
|
finalvirtual |
Get the name of the device.
Reimplemented from MaxOS::drivers::Driver.
Definition at line 155 of file mouse.cpp.