diff options
Diffstat (limited to 'arch/x86_64/arch/devices/pit.hpp')
| -rw-r--r-- | arch/x86_64/arch/devices/pit.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/x86_64/arch/devices/pit.hpp b/arch/x86_64/arch/devices/pit.hpp new file mode 100644 index 00000000..5104087b --- /dev/null +++ b/arch/x86_64/arch/devices/pit.hpp @@ -0,0 +1,32 @@ +#ifndef TEACHOS_ARCH_X86_64_DEVICES_PIT_HPP +#define TEACHOS_ARCH_X86_64_DEVICES_PIT_HPP + +#include <arch/bus/isa.hpp> + +#include <kapi/devices.hpp> + +#include <string_view> + +namespace arch::devices +{ + + //! The ISA device for the legacy Programmable Interrupt Timer. + //! + //! This type identifies the PIT device node to the driver, so the driver can be matched successfully. + struct pit final : kapi::devices::device, arch::bus::isa_identification + { + //! Construct a new PIT device. + pit(); + + //! Get the synthetic ISA identifier for this device. + //! + //! @return the string "pit" + [[nodiscard]] auto isa_name() const -> std::string_view override; + + protected: + auto query_interface(kapi::devices::interface interface) -> void * override; + }; + +} // namespace arch::devices + +#endif
\ No newline at end of file |
