2020-01-18 08:38:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 08:38:21 +00:00
|
|
|
*/
|
|
|
|
|
2018-10-14 00:59:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-03 10:36:40 +00:00
|
|
|
#include <Kernel/Devices/Device.h>
|
2018-10-14 00:59:22 +00:00
|
|
|
|
2020-02-16 00:27:42 +00:00
|
|
|
namespace Kernel {
|
|
|
|
|
2019-02-15 23:47:20 +00:00
|
|
|
class CharacterDevice : public Device {
|
2018-10-14 00:59:22 +00:00
|
|
|
public:
|
2019-02-15 23:47:20 +00:00
|
|
|
virtual ~CharacterDevice() override;
|
2019-01-31 04:55:30 +00:00
|
|
|
|
2018-10-14 00:59:22 +00:00
|
|
|
protected:
|
2019-05-28 09:53:16 +00:00
|
|
|
CharacterDevice(unsigned major, unsigned minor)
|
2020-01-22 21:23:50 +00:00
|
|
|
: Device(major, minor)
|
2019-05-28 09:53:16 +00:00
|
|
|
{
|
|
|
|
}
|
2019-02-16 08:57:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
virtual bool is_character_device() const final { return true; }
|
2018-10-14 00:59:22 +00:00
|
|
|
};
|
2020-02-16 00:27:42 +00:00
|
|
|
|
|
|
|
}
|