we need TLE8888 driver #714

saving exact TLE8888 reponses
This commit is contained in:
rusefi 2019-06-08 16:13:24 -04:00
parent 735aee7280
commit bd4c5a017e
1 changed files with 7 additions and 0 deletions

View File

@ -103,6 +103,9 @@ static THD_WORKING_AREA(tle8888_thread_1_wa, 256);
static int tle8888SpiCounter = 0;
static int initResponses = 0;
static int initResponse0 = 0;
static int initResponse1 = 0;
/* Driver private data */
struct tle8888_priv {
@ -173,6 +176,8 @@ static int tle8888_spi_rw(struct tle8888_priv *chip, uint16_t tx, uint16_t *rx)
tsOutputChannels.debugIntField2 = tx;
tsOutputChannels.debugIntField3 = rxb;
tsOutputChannels.debugIntField4 = initResponses;
tsOutputChannels.debugFloatField1 = initResponse0;
tsOutputChannels.debugFloatField2 = initResponse1;
}
#endif /* EFI_TUNER_STUDIO */
@ -353,6 +358,7 @@ int tle8888_chip_init(void * data)
if (response == 253) {
initResponses += 4;
}
initResponse0 = response;
/**
* Table 8. Reset Times. All reset times not more than 20uS
@ -366,6 +372,7 @@ int tle8888_chip_init(void * data)
if (response == 53) {
initResponses += 8;
}
initResponse1 = response;
chip->o_direct_mask = 0;
chip->o_oe_mask = 0;