summaryrefslogtreecommitdiff
path: root/shared-bindings/countio/Counter.h
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-05-13 08:22:57 -0700
committerGitHub <noreply@github.com>2020-05-13 08:22:57 -0700
commit82fdced180da8b6730753caae93ac6b9c9fcdaae (patch)
tree6989f946451ea25bfc40b901c4cd97119a1fcaeb /shared-bindings/countio/Counter.h
parent75f9969860870a4ae636c74ae210275413b13c2f (diff)
parent4612270f98988ac4646c5cbf4bebddb35e71f660 (diff)
Merge pull request #2827 from LearnWeaver/Optical-Encoder-Module
Countio
Diffstat (limited to 'shared-bindings/countio/Counter.h')
-rw-r--r--shared-bindings/countio/Counter.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/shared-bindings/countio/Counter.h b/shared-bindings/countio/Counter.h
new file mode 100644
index 000000000..15adbbe2a
--- /dev/null
+++ b/shared-bindings/countio/Counter.h
@@ -0,0 +1,18 @@
+#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H
+#define MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H
+
+#include "common-hal/microcontroller/Pin.h"
+#include "common-hal/countio/Counter.h"
+
+extern const mp_obj_type_t countio_counter_type;
+
+extern void common_hal_countio_counter_construct(countio_counter_obj_t* self,
+ const mcu_pin_obj_t* pin_a);
+extern void common_hal_countio_counter_deinit(countio_counter_obj_t* self);
+extern bool common_hal_countio_counter_deinited(countio_counter_obj_t* self);
+extern mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t* self);
+extern void common_hal_countio_counter_set_count(countio_counter_obj_t* self,
+ mp_int_t new_count);
+extern void common_hal_countio_counter_reset(countio_counter_obj_t* self);
+
+#endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H