Fixed build of SAMV71-XULT/nsh. With the changes from 26f7b8c
the build process of the default configuration did not succeed anymore. This is fixed by this commit.
This commit is contained in:
parent
d4408264ec
commit
ed1f3aec61
@ -283,7 +283,7 @@ static const struct twi_attr_s g_twi2attr =
|
||||
.pid = SAM_PID_TWIHS2,
|
||||
.irq = SAM_IRQ_TWIHS2,
|
||||
.glitchfltr = CONFIG_SAMV7_TWIHS2_GLITCH_FILTER,
|
||||
#ifdef CONFIG_SAMV7_TWIHS0_SINGLE_MASTER
|
||||
#ifdef CONFIG_SAMV7_TWIHS2_SINGLE_MASTER
|
||||
.s_master = 1,
|
||||
#else
|
||||
.s_master = 0,
|
||||
@ -515,6 +515,7 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size)
|
||||
* all further interrupts for the TWIHS have been disabled.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
/* Check if an Arbitration Lost has occured */
|
||||
|
||||
if (priv->result == -EUSERS)
|
||||
@ -532,6 +533,7 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size)
|
||||
priv->result = -EIO;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return priv->result;
|
||||
}
|
||||
@ -646,6 +648,7 @@ static int twi_interrupt(struct twi_dev_s *priv)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
/* If Single-Master Mode is enabled and we lost arbitration (someone else or
|
||||
* an EMC-Pulse did something on the bus) something went very wrong. So we end
|
||||
* the current transfer with an EUSERS. The wait function will then reset
|
||||
@ -656,9 +659,10 @@ static int twi_interrupt(struct twi_dev_s *priv)
|
||||
{
|
||||
/* Wake up the thread with an Arbitration Lost error indication */
|
||||
|
||||
i2cllerr("ERROR: TWIHS%d Arbitration Lost\n");
|
||||
i2cerr("ERROR: TWIHS%d Arbitration Lost\n");
|
||||
twi_wakeup(priv, -EUSERS);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check for errors. We must check for errors *before* checking TXRDY or
|
||||
* TXCMP because the error can be signaled in combination with TXRDY or
|
||||
@ -945,6 +949,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev,
|
||||
|
||||
twi_setfrequency(priv, msgs->frequency);
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
/* When we are in Single Master Mode check if the bus is ready (no stuck
|
||||
* DATA or CLK line).
|
||||
* Otherwise initiate a bus reset.
|
||||
@ -960,6 +965,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev,
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initiate the transfer. The rest will be handled from interrupt
|
||||
* logic. Interrupts must be disabled to prevent re-entrance from the
|
||||
|
@ -290,6 +290,8 @@ CONFIG_SAMV7_SDRAMSIZE=2097152
|
||||
# TWIHS device driver options
|
||||
#
|
||||
CONFIG_SAMV7_TWIHS0_FREQUENCY=100000
|
||||
CONFIG_SAMV7_TWIHS0_GLITCH_FILTER=0
|
||||
CONFIG_SAMV7_TWIHS0_SINGLE_MASTER=y
|
||||
|
||||
#
|
||||
# HSMCI device driver options
|
||||
@ -515,12 +517,13 @@ CONFIG_DEV_NULL=y
|
||||
# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
|
||||
# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set
|
||||
# CONFIG_PWM is not set
|
||||
# CONFIG_ARCH_HAVE_I2CRESET is not set
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_I2C_SLAVE is not set
|
||||
# CONFIG_I2C_POLLED is not set
|
||||
# CONFIG_I2C_TRACE is not set
|
||||
CONFIG_I2C_DRIVER=y
|
||||
CONFIG_I2C_RESET=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_SLAVE is not set
|
||||
CONFIG_SPI_EXCHANGE=y
|
||||
|
Loading…
Reference in New Issue
Block a user