refactoring: time to unify digital pin API
This commit is contained in:
parent
9cb18e89f7
commit
59130de601
|
@ -233,7 +233,7 @@ digital_input_s * addWaveAnalyzerDriver(const char *msg, brain_pin_e brainPin) {
|
|||
/**
|
||||
* turns pin off and returns digital_input_s back into registeredIcus pool
|
||||
*/
|
||||
void removeWaveAnalyzerDriver(const char *msg, brain_pin_e brainPin) {
|
||||
void stopDigitalCapture(const char *msg, brain_pin_e brainPin) {
|
||||
if (brainPin == GPIO_UNASSIGNED) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ void turnOffCapturePin(brain_pin_e brainPin);
|
|||
digital_input_s *addWaveAnalyzerDriver(const char *msg, brain_pin_e brainPin);
|
||||
void startInputDriver(const char *msg, /*nullable*/digital_input_s *hw, bool isActiveHigh);
|
||||
|
||||
void removeWaveAnalyzerDriver(const char *msg, brain_pin_e brainPin);
|
||||
void stopDigitalCapture(const char *msg, brain_pin_e brainPin);
|
||||
|
||||
//Nullable
|
||||
ICUDriver * getInputCaptureDriver(const char *msg, brain_pin_e hwPin);
|
||||
|
|
|
@ -77,7 +77,7 @@ void turnOnTriggerInputPin(const char *msg, int index, bool isVvtShaft) {
|
|||
}
|
||||
|
||||
void turnOffTriggerInputPin(brain_pin_e brainPin) {
|
||||
efiExtiDisablePin(brainPin);
|
||||
stopDigitalCapture("trigger", brainPin);
|
||||
}
|
||||
|
||||
void setPrimaryChannel(brain_pin_e brainPin) {
|
||||
|
|
|
@ -99,7 +99,7 @@ void turnOnTriggerInputPin(const char *msg, int index, bool isVvtShaft) {
|
|||
|
||||
void turnOffTriggerInputPin(brain_pin_e brainPin) {
|
||||
|
||||
removeWaveAnalyzerDriver("trigger", brainPin);
|
||||
stopDigitalCapture("trigger", brainPin);
|
||||
}
|
||||
|
||||
void setPrimaryChannel(brain_pin_e brainPin) {
|
||||
|
|
|
@ -67,7 +67,7 @@ bool hasVehicleSpeedSensor() {
|
|||
}
|
||||
|
||||
void stopVSSPins(void) {
|
||||
removeWaveAnalyzerDriver("VSS", activeConfiguration.bc.vehicleSpeedSensorInputPin);
|
||||
stopDigitalCapture("VSS", activeConfiguration.bc.vehicleSpeedSensorInputPin);
|
||||
}
|
||||
|
||||
void startVSSPins(void) {
|
||||
|
|
Loading…
Reference in New Issue