Hardware Abstraction Layer for FreeRTOS
counter_software.h
Go to the documentation of this file.
1
#ifndef COUNTER_SOFTWARE_H_
2
#define COUNTER_SOFTWARE_H_
3
4
#include <
counter.h
>
5
#define COUNTER_PRV
6
#include <
counter_prv.h
>
7
#include <
gpio.h
>
8
#include <
os.h
>
9
extern
const
struct
counter_ops software_counter_ops;
10
struct
counter_software {
11
struct
counter_generic
gen;
12
struct
gpio_pin *pin;
13
uint32_t counter;
14
enum
gpio_interrupt
inter;
15
#ifdef CONFIG_COUNTER_SOFTWARE_DEBUG
16
OS_DEFINE_TASK
(task, 512);
17
#endif
18
};
20
int32_t
counter_software_connect
(
struct
counter *c,
struct
gpio_pin *pin);
21
#define ADD_COUNTER_SOFTWARE(id) \
22
struct counter_software counter_software_##id = { \
23
COUNTER_INIT_DEV(software) \
24
HAL_NAME("Software COUNTER " #id) \
25
};\
26
COUNTER_ADDDEV(software, counter_software_##id)
27
#define COUNTER_SOFTWARE_ID(id) HAL_GET_ID(counter, software, counter_software_##id)
28
#endif
os.h
gpio_interrupt
gpio_interrupt
Definition:
gpio.h:67
OS_DEFINE_TASK
#define OS_DEFINE_TASK(name, stackSize)
Definition:
os.h:52
counter_generic
Definition:
counter.h:46
counter_prv.h
gpio.h
counter.h
counter_software_connect
int32_t counter_software_connect(struct counter *c, struct gpio_pin *pin)
driver
include
counter_software.h
Generated on Tue Aug 17 2021 15:19:23 for Hardware Abstraction Layer for FreeRTOS by
1.8.20