Files
motor/Common/exti/GPIO_EXTI.h
T
2024-09-26 22:32:20 +08:00

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_ */