2020-05-05 01:23:38 -04:00
|
|
|
#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"
|
2021-12-30 21:49:52 -05:00
|
|
|
#include "shared-bindings/countio/Edge.h"
|
|
|
|
#include "shared-bindings/digitalio/Pull.h"
|
2020-05-05 01:23:38 -04:00
|
|
|
|
|
|
|
extern const mp_obj_type_t countio_counter_type;
|
|
|
|
|
2021-03-15 09:57:36 -04:00
|
|
|
extern void common_hal_countio_counter_construct(countio_counter_obj_t *self,
|
2021-12-30 21:49:52 -05:00
|
|
|
const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull);
|
2021-03-15 09:57:36 -04:00
|
|
|
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,
|
2020-05-05 01:23:38 -04:00
|
|
|
mp_int_t new_count);
|
|
|
|
|
|
|
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H
|