blob: 012d5f005e78681f8490ba963760c3c721a85aec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* -------------------------------------------
Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
------------------------------------------- */
#ifndef __PCI_ITERATOR_H__
#define __PCI_ITERATOR_H__
#include <KernelKit/PCI/Database.h>
#include <KernelKit/PCI/Device.h>
#include <NewKit/Array.h>
#include <NewKit/Defines.h>
#include <NewKit/Ref.h>
#define ZKA_BUS_COUNT (256)
#define ZKA_DEVICE_COUNT (33)
#define ZKA_FUNCTION_COUNT (8)
namespace Kernel::PCI
{
class Iterator final
{
public:
Iterator() = delete;
public:
explicit Iterator(const Types::PciDeviceKind& deviceType);
Iterator& operator=(const Iterator&) = default;
Iterator(const Iterator&) = default;
~Iterator();
public:
Ref<PCI::Device> operator[](const Size& sz);
private:
Array<PCI::Device, ZKA_BUS_COUNT> fDevices;
};
} // namespace Kernel::PCI
#endif // __PCI_ITERATOR_H__
|