2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file trigger_input.h
|
|
|
|
* @brief Position sensor hardware layer
|
|
|
|
*
|
|
|
|
* @date Dec 30, 2012
|
2019-11-11 19:19:35 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CRANK_INPUT_H_
|
|
|
|
#define CRANK_INPUT_H_
|
|
|
|
|
|
|
|
#include "engine.h"
|
2019-11-11 19:19:35 -08:00
|
|
|
#include "pin_repository.h"
|
|
|
|
#include "trigger_structure.h"
|
|
|
|
#include "trigger_central.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-11-11 18:25:40 -08:00
|
|
|
#define TRIGGER_SUPPORTED_CHANNELS 2
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
void turnOnTriggerInputPins(Logging *sharedLogger);
|
|
|
|
void applyNewTriggerInputPins(void);
|
2019-04-09 19:15:55 -07:00
|
|
|
void startTriggerInputPins(void);
|
|
|
|
void stopTriggerInputPins(void);
|
2019-11-11 19:19:35 -08:00
|
|
|
void setPrimaryChannel(brain_pin_e brainPin);
|
|
|
|
void turnOffTriggerInputPin(brain_pin_e brainPin);
|
2019-11-12 16:04:33 -08:00
|
|
|
void turnOnTriggerInputPin(const char *msg, int index, bool isTriggerShaft);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#endif /* CRANK_INPUT_H_ */
|