Change the pullup test
This commit is contained in:
parent
8d0af30aa7
commit
fb1c8ee0a3
|
|
@ -301,8 +301,11 @@ ISR(TIMER1_COMPA_vect) {
|
||||||
|
|
||||||
#ifdef DEBUG_PULLUP_CRASH
|
#ifdef DEBUG_PULLUP_CRASH
|
||||||
// check for faulty pull-ups enabled on thermistor inputs
|
// check for faulty pull-ups enabled on thermistor inputs
|
||||||
if (PORTF & 0x5F)
|
if ((PORTF & (uint8_t)(ADC_DIDR_MSK & 0xff)) || (PORTK & (uint8_t)((ADC_DIDR_MSK >> 8) & 0xff)))
|
||||||
pullup_error(false);
|
pullup_error(false);
|
||||||
|
#else
|
||||||
|
PORTF &= ~(uint8_t)(ADC_DIDR_MSK & 0xff);
|
||||||
|
PORTK &= ~(uint8_t)((ADC_DIDR_MSK >> 8) & 0xff);
|
||||||
#endif // DEBUG_PULLUP_CRASH
|
#endif // DEBUG_PULLUP_CRASH
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
#ifdef LIN_ADVANCE
|
||||||
|
|
|
||||||
|
|
@ -1685,8 +1685,11 @@ FORCE_INLINE static void temperature_isr()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_PULLUP_CRASH
|
#ifdef DEBUG_PULLUP_CRASH
|
||||||
// check for faulty pull-ups enabled on thermistor inputs
|
// check for faulty pull-ups enabled on thermistor inputs
|
||||||
if (PORTF & 0x5F)
|
if ((PORTF & (uint8_t)(ADC_DIDR_MSK & 0xff)) || (PORTK & (uint8_t)((ADC_DIDR_MSK >> 8) & 0xff)))
|
||||||
pullup_error(true);
|
pullup_error(true);
|
||||||
|
#else
|
||||||
|
PORTF &= ~(uint8_t)(ADC_DIDR_MSK & 0xff);
|
||||||
|
PORTK &= ~(uint8_t)((ADC_DIDR_MSK >> 8) & 0xff);
|
||||||
#endif // DEBUG_PULLUP_CRASH
|
#endif // DEBUG_PULLUP_CRASH
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue