aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/ports/raspberrypi/common-hal/countio/Counter.h
blob: 3355036eed2aff3b07309f6a9f434b0a086f3386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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;
    uint8_t pin;
    uint8_t slice_num;
    mp_int_t count;
} countio_counter_obj_t;


void counter_interrupt_handler(void);

void reset_countio(void);

#endif // MICROPY_INCLUDED_RASPBERRRYPI_COMMON_HAL_COUNTIO_COUNTER_H