auto-sync
This commit is contained in:
parent
7d35f9bee5
commit
46e54c5512
|
@ -588,7 +588,7 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="hw_layer/gpio_helper.cpp|hw_layer/board_test.cpp|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/OTGv1|chibios/os/hal/platforms/STM32/GPIOv2|chibios/os/hal/platforms/STM32F0xx|chibios/os/various/fatfs_bindings|util/LocalVersionHolder.cpp|util/histogram.c|util/data_buffer.c|util/cyclic_buffer.cpp|controllers/algo|controllers/system/SingleTimerExecutor.cpp|controllers/system/signal_executor_sleep.c|controllers/system/pwm_generator_logic.cpp|controllers/system/event_queue.cpp|chibios/ext/fatfs|config/engines|hw_layer/rtc_helper.c|hw_layer/mmc_card.c|hw_layer/neo6m.c|hw_layer/lcd|controllers/core|controllers/math|controllers/sensors|controllers/trigger|controllers/sensors/tps.cpp|controllers/sensors/thermistors.cpp|controllers/sensors/map.cpp|controllers/sensors/maf.cpp|controllers/sensors/ego.cpp|hw_layer/wave_analyzer_hw.c|hw_layer/vehicle_speed.cpp|hw_layer/trigger_input.cpp|hw_layer/stepper.cpp|hw_layer/pwm_generator.cpp|hw_layer/HIP9011.cpp|controllers/map_multiplier_thread.cpp|controllers/map_averaging.cpp|controllers/malfunction_indicator.cpp|controllers/lcd_controller.cpp|controllers/injector_central.cpp|console/tunerstudio|controllers/idle_thread.cpp|controllers/electronic_throttle.cpp|controllers/alternatorController.cpp|controllers/engine_controller.cpp|rusefi.cpp|chibios/boards/ST_STM32F4_DISCOVERY|hw_layer/stm32f4|chibios/os/hal/platforms/STM32/USARTv1|chibios/os/hal/platforms/STM32/I2Cv1|chibios/os/ports/GCC/ARMCMx/chcore_v7m.c|chibios/os/ports/GCC/ARMCMx/STM32F4xx|chibios/os/hal/platforms/STM32F4xx|config/stm32f4ems|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/os/ports/IAR|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="chibios/os/ports/GCC/ARMCMx/chcore_v6m.c|chibios/os/ports/GCC/ARMCMx/STM32F0xx|console/status_loop.cpp|controllers/settings.cpp|controllers/flash_main.cpp|development|hw_layer/joystick.cpp|hw_layer/servo.cpp|hw_layer/pin_repository.c|hw_layer/microsecond_timer.c|hw_layer/io_pins.cpp|hw_layer/flash.c|hw_layer/adc_inputs.cpp|hw_layer/hardware.cpp|hw_layer/gpio_helper.cpp|hw_layer/board_test.cpp|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/OTGv1|chibios/os/hal/platforms/STM32/GPIOv2|chibios/os/hal/platforms/STM32F0xx|chibios/os/various/fatfs_bindings|util/LocalVersionHolder.cpp|util/histogram.c|util/data_buffer.c|util/cyclic_buffer.cpp|controllers/algo|controllers/system/SingleTimerExecutor.cpp|controllers/system/signal_executor_sleep.c|controllers/system/pwm_generator_logic.cpp|controllers/system/event_queue.cpp|chibios/ext/fatfs|config/engines|hw_layer/rtc_helper.c|hw_layer/mmc_card.c|hw_layer/neo6m.c|hw_layer/lcd|controllers/core|controllers/math|controllers/sensors|controllers/trigger|controllers/sensors/tps.cpp|controllers/sensors/thermistors.cpp|controllers/sensors/map.cpp|controllers/sensors/maf.cpp|controllers/sensors/ego.cpp|hw_layer/wave_analyzer_hw.c|hw_layer/vehicle_speed.cpp|hw_layer/trigger_input.cpp|hw_layer/stepper.cpp|hw_layer/pwm_generator.cpp|hw_layer/HIP9011.cpp|controllers/map_multiplier_thread.cpp|controllers/map_averaging.cpp|controllers/malfunction_indicator.cpp|controllers/lcd_controller.cpp|controllers/injector_central.cpp|console/tunerstudio|controllers/idle_thread.cpp|controllers/electronic_throttle.cpp|controllers/alternatorController.cpp|controllers/engine_controller.cpp|rusefi.cpp|chibios/boards/ST_STM32F4_DISCOVERY|hw_layer/stm32f4|chibios/os/hal/platforms/STM32/USARTv1|chibios/os/hal/platforms/STM32/I2Cv1|chibios/os/ports/GCC/ARMCMx/STM32F4xx|chibios/os/hal/platforms/STM32F4xx|config/stm32f4ems|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/os/ports/IAR|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#ifndef _CHCONF_H_
|
||||
#define _CHCONF_H_
|
||||
|
||||
#define ON_LOCK_HOOK
|
||||
#define ON_UNLOCK_HOOK
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel parameters and options
|
||||
|
@ -357,7 +360,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
#define hal_lld_get_counter_value() DWT_CYCCNT
|
||||
|
||||
#define EFI_USE_UART_FOR_CONSOLE TRUE
|
||||
|
||||
#define EFI_CONSOLE_UART_DEVICE (&SD1)
|
||||
#define EFI_USE_UART_FOR_CONSOLE FALSE
|
||||
|
||||
#define EFI_CONSOLE_TX_PORT GPIOC
|
||||
#define EFI_CONSOLE_TX_PIN 10
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
||||
#define STM32_SPI_USE_SPI3 FALSE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
|
|
|
@ -20,16 +20,14 @@
|
|||
|
||||
#include "main.h"
|
||||
#include "console_io.h"
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
|
||||
extern SerialUSBDriver SDU1;
|
||||
#endif
|
||||
#include "usbcfg.h"
|
||||
#include "usbconsole.h"
|
||||
#endif
|
||||
#include "rfiutil.h"
|
||||
|
||||
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
|
||||
#include "usbcfg.h"
|
||||
#include "usbconsole.h"
|
||||
extern SerialUSBDriver SDU1;
|
||||
#endif
|
||||
|
||||
int lastWriteSize;
|
||||
int lastWriteActual;
|
||||
|
||||
|
@ -122,19 +120,23 @@ bool isSerialOverUart(void) {
|
|||
return is_serial_over_uart;
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE || EFI_EGT
|
||||
|
||||
#if EFI_USE_UART_FOR_CONSOLE || defined(__DOXYGEN__)
|
||||
static SerialConfig serialConfig = { SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
|
||||
#endif
|
||||
|
||||
#if EFI_PROD_CODE || EFI_EGT || defined(__DOXYGEN__)
|
||||
|
||||
SerialDriver * getConsoleChannel(void) {
|
||||
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
|
||||
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
|
||||
if (isSerialOverUart()) {
|
||||
return (SerialDriver *) EFI_CONSOLE_UART_DEVICE;
|
||||
} else {
|
||||
return (SerialDriver *) &SDU1;
|
||||
}
|
||||
#endif /* EFI_CONSOLE_UART_DEVICE */
|
||||
|
||||
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
|
||||
return (SerialDriver *) &SDU1;
|
||||
#else
|
||||
return (SerialDriver *) EFI_CONSOLE_UART_DEVICE;
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -201,7 +203,7 @@ void consoleOutputBuffer(const uint8_t *buf, int size) {
|
|||
void startConsole(void (*console_line_callback_p)(char *)) {
|
||||
console_line_callback = console_line_callback_p;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
#if EFI_USE_UART_FOR_CONSOLE
|
||||
|
||||
palSetPadMode(CONSOLE_MODE_SWITCH_PORT, CONSOLE_MODE_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
|
||||
|
||||
|
@ -222,6 +224,8 @@ void startConsole(void (*console_line_callback_p)(char *)) {
|
|||
|
||||
chEvtRegisterMask((EventSource *) chnGetEventSource(EFI_CONSOLE_UART_DEVICE), &consoleEventListener, 1);
|
||||
}
|
||||
#else
|
||||
is_serial_over_uart = false;
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
chThdCreateStatic(consoleThreadStack, sizeof(consoleThreadStack), NORMALPRIO, consoleThreadThreadEntryPoint, NULL);
|
||||
|
|
Loading…
Reference in New Issue