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