begin implement own counter class

This commit is contained in:
2023-02-18 10:31:08 +01:00
parent 76ad017475
commit fa721acee5
2 changed files with 27 additions and 0 deletions
View File
+27
View File
@@ -0,0 +1,27 @@
/**
* @file pulseCounter.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2023-02-18
*
* @copyright Copyright (c) 2023
*
*/
#pragma once
#include <stdint.h.h>
#include <Arduino.h>
#include <esp32_pcnt.h>
class PulseCounter {
public:
PulseCounter(uint8_t pin, uint8_t unit);
private:
uint8_t pin;
uint8_t unit;
int16_t counter = 0;
};