rusEFI needs K-line firmware support #3248
This commit is contained in:
parent
4a8946c286
commit
11138a1c74
|
@ -9,6 +9,8 @@ endif
|
|||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
||||
DDEFS += -DEFI_KLINE=TRUE
|
||||
|
||||
DDEFS += -DADC_MUX_PIN=Gpio::F2
|
||||
|
||||
# Add them all together
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "serial_hw.h"
|
||||
#include "idle_thread.h"
|
||||
#include "odometer.h"
|
||||
#include "kline.h"
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
#include "mpu_util.h"
|
||||
|
@ -342,6 +343,9 @@ void applyNewHardwareSettings() {
|
|||
startAuxSerialPins();
|
||||
#endif /* EFI_AUX_SERIAL */
|
||||
|
||||
initKLine();
|
||||
|
||||
|
||||
#if EFI_HIP_9011
|
||||
startHip9001_pins();
|
||||
#endif /* EFI_HIP_9011 */
|
||||
|
|
|
@ -15,6 +15,7 @@ HW_LAYER_EMS_CPP = \
|
|||
$(PROJECT_DIR)/hw_layer/digital_input/trigger/trigger_input_exti.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/digital_input/trigger/trigger_input_adc.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/hardware.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/kline.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/smart_gpio.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/mmc_card.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/adc/adc_inputs.cpp \
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#include "pch.h"
|
||||
#include "kline.h"
|
||||
|
||||
|
||||
static THD_WORKING_AREA(klThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||
|
||||
void kLineThread(void*)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
// todo: read one by in loop
|
||||
// to begin with just write byte to console
|
||||
// efiPrintf
|
||||
chThdSleepMilliseconds(50);
|
||||
}
|
||||
}
|
||||
|
||||
void initKLine() {
|
||||
|
||||
#ifdef EFI_KLINE
|
||||
chThdCreateStatic(klThreadStack, sizeof(klThreadStack), NORMALPRIO + 1, kLineThread, nullptr);
|
||||
// todo: conditional uart initialization matching 2003 miata k-line
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
void initKLine();
|
Loading…
Reference in New Issue