diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-19 19:47:51 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-19 19:47:51 +0530 |
commit | 4fd287655a72b9aea14cdac715ad5b90ed082ed2 (patch) | |
tree | 65d393bc0e699dd12d05b29ba568e04cea666207 /circuitpython/shared-bindings/countio/Counter.h | |
parent | 0150f70ce9c39e9e6dd878766c0620c85e47bed0 (diff) |
add circuitpython code
Diffstat (limited to 'circuitpython/shared-bindings/countio/Counter.h')
-rw-r--r-- | circuitpython/shared-bindings/countio/Counter.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/circuitpython/shared-bindings/countio/Counter.h b/circuitpython/shared-bindings/countio/Counter.h new file mode 100644 index 0000000..d660cc8 --- /dev/null +++ b/circuitpython/shared-bindings/countio/Counter.h @@ -0,0 +1,19 @@ +#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" +#include "shared-bindings/countio/Edge.h" +#include "shared-bindings/digitalio/Pull.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, countio_edge_t edge, digitalio_pull_t pull); +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); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H |