summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-18 19:16:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-18 19:16:44 +0000
commit8606eb53ff4105795a9feb7c42a677b8b26042ef (patch)
treee746a348a0a71399c9811f6645e7e4716ac45aee /nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
parent5eb6c1464f2e3dbaff32b53bed81990932ae4ef8 (diff)
downloadpx4-nuttx-8606eb53ff4105795a9feb7c42a677b8b26042ef.tar.gz
px4-nuttx-8606eb53ff4105795a9feb7c42a677b8b26042ef.tar.bz2
px4-nuttx-8606eb53ff4105795a9feb7c42a677b8b26042ef.zip
Refactor all lpc17xx header files (more like STM32 header file structure now)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5534 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c')
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
index 4cc73a3fc..9db9b136b 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
@@ -49,8 +50,7 @@
#include "up_arch.h"
#include "chip.h"
#include "lpc17_gpio.h"
-#include "lpc17_pinconn.h"
-#include "lpc17_internal.h"
+
/****************************************************************************
* Pre-processor Definitions
@@ -199,6 +199,7 @@ static int lpc17_pinsel(unsigned int port, unsigned int pin, unsigned int value)
putreg32(regval, regaddr);
return OK;
}
+
return -EINVAL;
}
@@ -265,6 +266,7 @@ static int lpc17_pullup(uint16_t cfgset, unsigned int port, unsigned int pin)
putreg32(regval, regaddr);
return OK;
}
+
return -EINVAL;
}
@@ -518,6 +520,7 @@ static int lpc17_configalternate(uint16_t cfgset, unsigned int port,
lpc17_setopendrain(port, pin);
}
+
return OK;
}
@@ -582,6 +585,7 @@ int lpc17_configgpio(uint16_t cfgset)
break;
}
}
+
return ret;
}
@@ -651,5 +655,6 @@ bool lpc17_gpioread(uint16_t pinset)
pin = (pinset & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT;
return ((getreg32(fiobase + LPC17_FIO_PIN_OFFSET) & (1 << pin)) != 0);
}
- return 0;
+
+ return false;
}