more SPI speeds and TLE8888 to full pinout

This commit is contained in:
rusefi 2019-03-26 10:35:33 -04:00
parent 7e58e54976
commit 8635065907
4 changed files with 12 additions and 1 deletions

View File

@ -540,6 +540,8 @@ typedef enum {
typedef enum __attribute__ ((__packed__)) {
_5MHz,
_2_5MHz,
_1_25MHz,
_150KHz
} spi_speed_e;

View File

@ -532,6 +532,11 @@ int getSpiPrescaler(spi_speed_e speed, spi_device_e device) {
switch (speed) {
case _5MHz:
return device == SPI_DEVICE_1 ? SPI_BaudRatePrescaler_16 : SPI_BaudRatePrescaler_8;
case _2_5MHz:
return device == SPI_DEVICE_1 ? SPI_BaudRatePrescaler_32 : SPI_BaudRatePrescaler_16;
case _1_25MHz:
return device == SPI_DEVICE_1 ? SPI_BaudRatePrescaler_64 : SPI_BaudRatePrescaler_32;
case _150KHz:
// SPI1 does not support 150KHz, it would be 300KHz for SPI1
return SPI_BaudRatePrescaler_256;

View File

@ -68,7 +68,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 25 20:38:40 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Mar 26 09:48:00 EDT 2019
pageSize = 20000
page = 1
@ -2405,6 +2405,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
panel = otherSensorInputs, East
dialog = allPins1
field = "TLE8888 CS", tle8888_cs
field = "TLE8888 SPI", tle8888spiDevice
field = "MAP ADC input", map_sensor_hwChannel
field = "frequencyReportingMapInputPin", frequencyReportingMapInputPin
field = "CLT ADC input", clt_adcChannel

View File

@ -1500,6 +1500,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
panel = otherSensorInputs, East
dialog = allPins1
field = "TLE8888 CS", tle8888_cs
field = "TLE8888 SPI", tle8888spiDevice
field = "MAP ADC input", map_sensor_hwChannel
field = "frequencyReportingMapInputPin", frequencyReportingMapInputPin
field = "CLT ADC input", clt_adcChannel