mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
lpc17_40: Fixed I2C port sanity check.
This commit is contained in:
committed by
Xiang Xiao
parent
2b3106fb47
commit
5b7ff03f40
@@ -516,12 +516,6 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
|
||||
{
|
||||
struct lpc17_40_i2cdev_s *priv;
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
i2cerr("ERROR: LPC I2C Only supports ports 0 and 1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
irqstate_t flags;
|
||||
uint32_t regval;
|
||||
|
||||
@@ -615,6 +609,7 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
i2cerr("ERROR: LPC I2C Only supports ports 0, 1 and 2\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user