You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/08/10 16:04:37 UTC
[incubator-nuttx] branch master updated: lpc17_40: Fixed I2C port
sanity check.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 5b7ff03 lpc17_40: Fixed I2C port sanity check.
5b7ff03 is described below
commit 5b7ff03f405ec40e435882737f9a9898c99747af
Author: Fotis Panagiotopoulos <f....@gmail.com>
AuthorDate: Tue Aug 10 17:45:38 2021 +0300
lpc17_40: Fixed I2C port sanity check.
---
arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c
index 7e9ed99..edb8a09 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c
@@ -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;
}