mirror of https://github.com/rusefi/rusefi-1.git
we need TLE8888 driver #714
This commit is contained in:
parent
8cf20976f6
commit
17f073a439
|
@ -319,7 +319,7 @@ void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->tle8888_cs = GPIOD_5;
|
||||
engineConfiguration->tle8888_csPinMode = OM_OPENDRAIN;
|
||||
// engineConfiguration->tle8888_csPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->directSelfStimulation = true;
|
||||
|
||||
boardConfiguration->ignitionPins[0] = GPIOG_3;
|
||||
|
@ -333,12 +333,13 @@ void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->tle8888spiDevice = SPI_DEVICE_1;
|
||||
|
||||
// PB3 is nicely both SWO and SPI1 SCK so logic analyzer could be used on SWO header
|
||||
boardConfiguration->is_enabled_spi_1 = true;
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->spi1MosiMode = PO_OPENDRAIN;
|
||||
engineConfiguration->spi1MisoMode = PO_PULLUP;
|
||||
engineConfiguration->spi1SckMode = PO_OPENDRAIN;
|
||||
// engineConfiguration->spi1MosiMode = PO_OPENDRAIN;
|
||||
// engineConfiguration->spi1MisoMode = PO_PULLUP;
|
||||
// engineConfiguration->spi1SckMode = PO_OPENDRAIN;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ static int tle8888_spi_rw(struct tle8888_priv *chip, uint16_t tx, uint16_t *rx)
|
|||
/* Slave Select assertion. */
|
||||
spiSelect(spi);
|
||||
/* Atomic transfer operations. */
|
||||
// todo 16 bit for F4? rxb = spiPolledExchange(spi, tx);
|
||||
spiExchange(spi, 2, &tx, &rxb);
|
||||
rxb = spiPolledExchange(spi, tx);
|
||||
//spiExchange(spi, 2, &tx, &rxb); 8 bit version just in case?
|
||||
/* Slave Select de-assertion. */
|
||||
spiUnselect(spi);
|
||||
/* Ownership release. */
|
||||
|
|
Loading…
Reference in New Issue