Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
1e010c8e82
|
@ -207,9 +207,9 @@ static const char* tle8888_pin_names[TLE8888_OUTPUTS] = {
|
|||
#if EFI_TUNER_STUDIO
|
||||
void tle8888PostState(TsDebugChannels *debugChannels) {
|
||||
|
||||
debugChannels->debugIntField1 = WindowWatchdogErrorCounterValue;
|
||||
debugChannels->debugIntField2 = FunctionalWatchdogPassCounterValue;
|
||||
debugChannels->debugIntField3 = TotalErrorCounterValue;
|
||||
debugChannels->debugIntField1 = (WindowWatchdogErrorCounterValue >> 8) & 0x3f;
|
||||
debugChannels->debugIntField2 = (FunctionalWatchdogPassCounterValue >> 8) & 0x3f;
|
||||
debugChannels->debugIntField3 = (TotalErrorCounterValue >> 8) & 0x3f;
|
||||
//debugChannels->debugIntField1 = tle8888SpiCounter;
|
||||
//debugChannels->debugIntField2 = spiTxb;
|
||||
//debugChannels->debugIntField3 = spiRxb;
|
||||
|
@ -685,6 +685,14 @@ err_gpios:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* DEBUG */
|
||||
void tle8888_read_reg(uint16_t reg, uint16_t *val)
|
||||
{
|
||||
struct tle8888_priv *chip = &chips[0];
|
||||
|
||||
tle8888_spi_rw(chip, CMD_R(reg), val);
|
||||
}
|
||||
|
||||
int tle8888_init(void * data)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
@ -52,6 +52,24 @@ PinRepository::PinRepository() {
|
|||
|
||||
static PinRepository instance;
|
||||
|
||||
/* DEBUG */
|
||||
extern "C" {
|
||||
extern void tle8888_read_reg(uint16_t reg, uint16_t *val);
|
||||
}
|
||||
static void tle8888_dump_regs(void)
|
||||
{
|
||||
int i;
|
||||
uint16_t tmp;
|
||||
|
||||
tle8888_read_reg(0, NULL);
|
||||
|
||||
for (i = 0; i < 0x7e + 1; i++) {
|
||||
tle8888_read_reg(i, &tmp);
|
||||
|
||||
scheduleMsg(&logger, "%02x: %02x", tmp & 0x7f ,(tmp >> 8) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
static void reportPins(void) {
|
||||
for (unsigned int i = 0; i < getNumBrainPins(); i++) {
|
||||
const char *pin_user = getBrainUsedPin(i);
|
||||
|
@ -161,6 +179,7 @@ void initPinRepository(void) {
|
|||
initialized = true;
|
||||
|
||||
addConsoleAction(CMD_PINS, reportPins);
|
||||
addConsoleAction("tle8888", tle8888_dump_regs);
|
||||
}
|
||||
|
||||
bool brain_pin_is_onchip(brain_pin_e brainPin)
|
||||
|
|
Loading…
Reference in New Issue