rusefi-1/firmware/hw_layer/wave_analyzer_hw.h

40 lines
807 B
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/*
* wave_analyzer_hw.h
*
* @date Jun 23, 2013
* @author Andrey Belomutskiy, (c) 2012-2014
*/
#ifndef WAVE_ANALYZER_HW_H_
#define WAVE_ANALYZER_HW_H_
#include "main.h"
#include "listener_array.h"
typedef struct {
ICUDriver *driver;
GPIO_TypeDef *port;
int pin;
int activeMode; // 0 for ICU_INPUT_ACTIVE_LOW, 1 for ICU_INPUT_ACTIVE_HIGH
volatile int started;
IntListenerArray widthListeners;
IntListenerArray periodListeners;
} WaveReaderHw;
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void initWaveAnalyzerDriver(WaveReaderHw *hw, ICUDriver *driver,
ioportid_t port, ioportmask_t pin);
2014-08-31 15:02:50 -07:00
void setWaveReaderMode(WaveReaderHw *hw, bool mode);
2014-08-29 07:52:33 -07:00
ICUDriver * getInputCaptureDriver(brain_pin_e hwPin);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* WAVE_ANALYZER_HW_H_ */