We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a57a1d commit 4f6f878Copy full SHA for 4f6f878
1 file changed
klib/io/port.hpp
@@ -11,12 +11,38 @@ namespace klib::io {
11
template <bool Value = false>
12
class pin_dummy {
13
public:
14
+ // using for the array of callbacks
15
+ using interrupt_callback = void(*)();
16
+
17
+ /**
18
+ * @brief Enum for the dummy edge interrupts
19
+ *
20
+ */
21
+ enum class edge {
22
+ falling,
23
+ rising,
24
+ dual_edge,
25
+ low_level,
26
+ high_level,
27
+ };
28
29
/**
30
* @brief Init the fake pin
31
*
32
*/
33
constexpr static void init() {}
34
35
36
+ * @brief Init the fake pin using a edge trigger
37
38
+ * @note Will not do anything
39
40
+ * @tparam Edge
41
+ * @param callback
42
43
+ template <edge Edge>
44
+ constexpr static void init(interrupt_callback callback) {}
45
46
47
* @brief Get the value of the pin
48
0 commit comments