33 lines
509 B
C
33 lines
509 B
C
/*
|
|
* GPIO_EXTI.h
|
|
*
|
|
* Created on: Jun 30, 2020
|
|
* Author: matth
|
|
*/
|
|
|
|
#ifndef STM32HAL_COMM_GPIO_EXTI_H_
|
|
#define STM32HAL_COMM_GPIO_EXTI_H_
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct sGPIO_EXIT {
|
|
TaskHandle_t task;
|
|
int cnt;
|
|
|
|
int total_cnt;
|
|
int last_cnt;
|
|
int pps;
|
|
} GPIO_EXIT_t;
|
|
|
|
int GPIO_EXIT_open(GPIO_EXIT_t *e, uint16_t pin);
|
|
|
|
int GPIO_EXIT_take(GPIO_EXIT_t *e, uint32_t millisec);
|
|
|
|
void GPIO_EXIT_stats(void);
|
|
|
|
|
|
#endif /* STM32HAL_COMM_GPIO_EXTI_H_ */
|