2021-02-23 20:26:11 -05:00
|
|
|
|
|
|
|
#ifndef MICROPY_INCLUDED_RASPBERRRYPI_COMMON_HAL_COUNTIO_COUNTER_H
|
|
|
|
#define MICROPY_INCLUDED_RASPBERRRYPI_COMMON_HAL_COUNTIO_COUNTER_H
|
|
|
|
|
|
|
|
#include "common-hal/microcontroller/Pin.h"
|
|
|
|
|
|
|
|
#include "py/obj.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
mp_obj_base_t base;
|
2021-12-30 21:49:52 -05:00
|
|
|
uint8_t pin;
|
2021-02-23 20:26:11 -05:00
|
|
|
uint8_t slice_num;
|
|
|
|
mp_int_t count;
|
|
|
|
} countio_counter_obj_t;
|
|
|
|
|
|
|
|
|
2021-11-10 09:42:21 -05:00
|
|
|
void counter_interrupt_handler(void);
|
2021-02-23 20:26:11 -05:00
|
|
|
|
2021-08-27 20:39:19 -04:00
|
|
|
void reset_countio(void);
|
|
|
|
|
2021-02-23 20:26:11 -05:00
|
|
|
#endif // MICROPY_INCLUDED_RASPBERRRYPI_COMMON_HAL_COUNTIO_COUNTER_H
|