rusefi-1/firmware/config/stm32f7ems/efifeatures.h

111 lines
2.4 KiB
C

/**
* @file efifeatures.h
*
* @brief In this header we can configure which firmware modules are used.
*
* STM32F7 config is inherited from STM32F4. This file contains only differences between F4 and F7.
* This is more consistent way to maintain these config 'branches' and add new features.
*
* @date Aug 29, 2013
* @author Andrey Belomutskiy, (c) 2012-2017
*/
#include "../stm32f4ems/efifeatures.h"
#pragma once
// Warning! This is a test config!
#undef EFI_USE_CCM
#define EFI_USE_CCM TRUE
#undef EFI_POTENTIOMETER
#define EFI_POTENTIOMETER FALSE
#undef EFI_MAX_31855
#define EFI_MAX_31855 FALSE
#undef EFI_MCP_3208
#define EFI_MCP_3208 FALSE
#undef EFI_MC33816
#define EFI_MC33816 FALSE
#undef EFI_DENSO_ADC
#define EFI_DENSO_ADC FALSE
#undef EFI_MEMS
#define EFI_MEMS FALSE
#ifndef BOARD_TLE6240_COUNT
#define BOARD_TLE6240_COUNT 1
#endif
#ifndef BOARD_MC33972_COUNT
#define BOARD_MC33972_COUNT 1
#endif
#ifndef BOARD_TLE8888_COUNT
#define BOARD_TLE8888_COUNT 1
#endif
// todo: move this outside of efifeatures.h
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#undef EFI_CAN_SUPPORT
#define EFI_CAN_SUPPORT TRUE
#undef EFI_HD44780_LCD
#define EFI_HD44780_LCD TRUE
#undef EFI_LCD
#define EFI_LCD FALSE
/**
* Do we need file logging (like SD card) logic?
*/
#undef EFI_FILE_LOGGING
#define EFI_FILE_LOGGING FALSE
#undef EFI_USB_SERIAL
#define EFI_USB_SERIAL TRUE
/**
* Do we need GPS logic?
*/
#undef EFI_UART_GPS
#define EFI_UART_GPS FALSE
// todo: start using consoleUartDevice? Not sure
#undef EFI_CONSOLE_SERIAL_DEVICE
#define EFI_CONSOLE_SERIAL_DEVICE (&SD3)
// todo: our "DMA-half" ChibiOS patch not implemented for USARTv2/STM32F7
#undef TS_UART_DMA_MODE
#define TS_UART_DMA_MODE FALSE
#undef TS_UART_DEVICE
#define TS_UART_DEVICE (&UARTD3)
#undef TS_SERIAL_DEVICE
#define TS_SERIAL_DEVICE (&SD3)
// todo: add DMA-mode for Console?
#if (TS_UART_DMA_MODE || TS_UART_MODE)
#undef EFI_CONSOLE_SERIAL_DEVICE
#endif
// todo: start using consoleSerialTxPin? Not sure
#undef EFI_CONSOLE_TX_PORT
#define EFI_CONSOLE_TX_PORT GPIOD
#undef EFI_CONSOLE_TX_PIN
#define EFI_CONSOLE_TX_PIN 8
// todo: start using consoleSerialRxPin? Not sure
#undef EFI_CONSOLE_RX_PORT
#define EFI_CONSOLE_RX_PORT GPIOD
#undef EFI_CONSOLE_RX_PIN
#define EFI_CONSOLE_RX_PIN 9
// todo: temporary ignore errors, this is a test config
#define EFI_PRINT_ERRORS_AS_WARNINGS TRUE