stop VSS pin

This commit is contained in:
rusefi 2017-04-05 18:08:36 -04:00
parent a1fb0bd72f
commit d2581fcdba
3 changed files with 13 additions and 0 deletions

View File

@ -231,6 +231,7 @@ void applyNewHardwareSettings(void) {
stopIgnitionPins();
stopCanPins();
stopETBPins();
stopVSSPins();
if (engineConfiguration->bc.is_enabled_spi_1 != activeConfiguration.bc.is_enabled_spi_1)
stopSpi(SPI_DEVICE_1);
@ -288,6 +289,7 @@ void applyNewHardwareSettings(void) {
startIgnitionPins();
startCanPins();
startETBPins();
startVSSPins();
adcConfigListener(engine);
}

View File

@ -66,6 +66,15 @@ bool hasVehicleSpeedSensor() {
return boardConfiguration->vehicleSpeedSensorInputPin != GPIO_UNASSIGNED;
}
void stopVSSPins(void) {
unmarkPin(activeConfiguration.bc.vehicleSpeedSensorInputPin);
// todo: remove driver from registeredIcus
}
void startVSSPins(void) {
// todo
}
void initVehicleSpeed(Logging *l) {
logger = l;
addConsoleAction("speedinfo", speedInfo);

View File

@ -17,5 +17,7 @@ float getVehicleSpeed(void);
void initVehicleSpeed(Logging *logger);
void setMockVehicleSpeed(float speedKPH);
bool hasVehicleSpeedSensor();
void stopVSSPins(void);
void startVSSPins(void);
#endif /* HW_LAYER_VEHICLE_SPEED_H_ */