blob: a22a3609f99f81241e54f3f5a40ef7e0aa1c94cf [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/**
2 * Copyright (C) ARM Limited 2013-2014. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef HWMON_H
10#define HWMON_H
11
12#include "Driver.h"
13
14class Buffer;
15class HwmonCounter;
16
17class Hwmon : public Driver {
18public:
19 Hwmon();
20 ~Hwmon();
21
22 void setup();
23
24 bool claimCounter(const Counter &counter) const;
25 bool countersEnabled() const;
26 void resetCounters();
27 void setupCounter(Counter &counter);
28
29 int writeCounters(mxml_node_t *root) const;
30 void writeEvents(mxml_node_t *root) const;
31
32 void start();
33 void read(Buffer * buffer);
34
35private:
36 HwmonCounter *findCounter(const Counter &counter) const;
37
38 HwmonCounter *counters;
39
40 // Intentionally unimplemented
41 Hwmon(const Hwmon &);
42 Hwmon &operator=(const Hwmon &);
43};
44
45#endif // HWMON_H