2015-08-18 12:03:44 -07:00
|
|
|
/*
|
|
|
|
* @file tachometer.cpp
|
2015-08-18 14:01:49 -07:00
|
|
|
* @brief This is about driving external analog tachometers
|
2015-08-18 12:03:44 -07:00
|
|
|
*
|
|
|
|
* @date Aug 18, 2015
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2015
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "tachometer.h"
|
2015-08-18 14:01:49 -07:00
|
|
|
#include "trigger_central.h"
|
2015-08-18 12:03:44 -07:00
|
|
|
|
|
|
|
EXTERN_ENGINE;
|
|
|
|
|
2015-08-18 14:01:49 -07:00
|
|
|
static OutputPin tachOut;
|
|
|
|
|
|
|
|
static void tachSignalCallback(trigger_event_e ckpSignalType,
|
|
|
|
uint32_t index DECLARE_ENGINE_PARAMETER_S) {
|
|
|
|
}
|
|
|
|
|
2015-08-18 12:03:44 -07:00
|
|
|
void initTachometer(void) {
|
|
|
|
if (boardConfiguration->tachOutputPin == GPIO_UNASSIGNED)
|
|
|
|
return;
|
|
|
|
|
2015-08-18 14:01:49 -07:00
|
|
|
outputPinRegisterExt2("tach", &tachOut, boardConfiguration->tachOutputPin, &boardConfiguration->tachOutputPinMode);
|
|
|
|
|
|
|
|
addTriggerEventListener(tachSignalCallback, "tach", engine);
|
|
|
|
|
|
|
|
|
2015-08-18 12:03:44 -07:00
|
|
|
}
|