USB and TLE8888 not working for F4 or F767 #764
This commit is contained in:
parent
b0cdd1d532
commit
2501d69b04
|
@ -275,15 +275,22 @@ void applyNewHardwareSettings(void) {
|
|||
#if EFI_CAN_SUPPORT
|
||||
stopCanPins();
|
||||
#endif /* EFI_CAN_SUPPORT */
|
||||
|
||||
#if EFI_HIP_9011
|
||||
stopHip9001_pins();
|
||||
#endif /* EFI_HIP_9011 */
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
bool etbRestartNeeded = isETBRestartNeeded();
|
||||
if (etbRestartNeeded) {
|
||||
stopETBPins();
|
||||
}
|
||||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
||||
#if EFI_VEHICLE_SPEED
|
||||
stopVSSPins();
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
|
||||
#if EFI_AUX_PID
|
||||
stopAuxPins();
|
||||
#endif /* EFI_AUX_PID */
|
||||
|
@ -324,6 +331,11 @@ void applyNewHardwareSettings(void) {
|
|||
startCanPins();
|
||||
#endif /* EFI_CAN_SUPPORT */
|
||||
|
||||
#if EFI_HIP_9011
|
||||
startHip9001_pins();
|
||||
#endif /* EFI_HIP_9011 */
|
||||
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
if (etbRestartNeeded) {
|
||||
startETBPins();
|
||||
|
|
|
@ -378,6 +378,18 @@ static msg_t hipThread(void *arg) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
void stopHip9001_pins() {
|
||||
#if EFI_PROD_CODE
|
||||
brain_pin_markUnused(activeConfiguration.bc.hip9011IntHoldPin);
|
||||
brain_pin_markUnused(activeConfiguration.bc.hip9011CsPin);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void startHip9001_pins() {
|
||||
intHold.initPin("hip int/hold", CONFIGB(hip9011IntHoldPin), &CONFIGB(hip9011IntHoldPinMode));
|
||||
enginePins.hipCs.initPin("hip CS", CONFIGB(hip9011CsPin), &CONFIGB(hip9011CsPinMode));
|
||||
}
|
||||
|
||||
void initHip9011(Logging *sharedLogger) {
|
||||
logger = sharedLogger;
|
||||
addConsoleAction("hipinfo", showHipInfo);
|
||||
|
@ -398,10 +410,7 @@ void initHip9011(Logging *sharedLogger) {
|
|||
hipSpiCfg.sspad = getHwPin("hip", CONFIGB(hip9011CsPin));
|
||||
#endif
|
||||
|
||||
intHold.initPin("hip int/hold", CONFIGB(hip9011IntHoldPin),
|
||||
&CONFIGB(hip9011IntHoldPinMode));
|
||||
enginePins.hipCs.initPin("hip CS", CONFIGB(hip9011CsPin),
|
||||
&CONFIGB(hip9011CsPinMode));
|
||||
startHip9001_pins();
|
||||
|
||||
scheduleMsg(logger, "Starting HIP9011/TPIC8101 driver");
|
||||
spiStart(driver, &hipSpiCfg);
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#define HIP_THREAD_PERIOD 100
|
||||
|
||||
void initHip9011(Logging *sharedLogger);
|
||||
void startHip9001_pins();
|
||||
void stopHip9001_pins();
|
||||
void setHip9011FrankensoPinout(void);
|
||||
#if HAL_USE_ADC
|
||||
void hipAdcCallback(adcsample_t value);
|
||||
|
|
Loading…
Reference in New Issue