From 1a07e950eab06eb38989f41520dd26f7da37e8ea Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 4 Apr 2013 18:12:44 -0600 Subject: [PATCH] Move LPC17xx IOCON register definitions from lpc17_gpio.h to lpc17_iocon.h; fix a few more .gitignore files --- arch/arm/include/.gitignore | 4 ++-- arch/arm/src/.gitignore | 10 +++++----- arch/arm/src/lpc17xx/chip/lpc178x_iocon.h | 8 ++++++++ arch/arm/src/lpc17xx/lpc178x_gpio.c | 14 +++++++------- arch/arm/src/lpc17xx/lpc178x_gpio.h | 8 +------- arch/avr/include/.gitignore | 4 ++-- arch/avr/src/.gitignore | 10 +++++----- arch/hc/include/.gitignore | 5 ++--- arch/hc/src/.gitignore | 11 +++++------ arch/mips/include/.gitignore | 5 ++--- arch/mips/src/.gitignore | 8 ++++---- arch/rgmp/include/.gitignore | 5 ++--- arch/rgmp/src/.gitignore | 9 ++++----- arch/sim/include/.gitignore | 2 +- arch/sim/src/.gitignore | 16 ++++++++-------- arch/x86/include/.gitignore | 5 ++--- arch/x86/src/.gitignore | 8 ++++---- arch/z16/src/.gitignore | 10 +++++----- arch/z80/include/.gitignore | 5 ++--- arch/z80/src/.gitignore | 13 ++++++------- 20 files changed, 77 insertions(+), 83 deletions(-) diff --git a/arch/arm/include/.gitignore b/arch/arm/include/.gitignore index 06655cab47a..e6460c4a678 100644 --- a/arch/arm/include/.gitignore +++ b/arch/arm/include/.gitignore @@ -1,3 +1,3 @@ -board -chip +/board +/chip diff --git a/arch/arm/src/.gitignore b/arch/arm/src/.gitignore index 11ae4f83bf9..d9a7dec419b 100644 --- a/arch/arm/src/.gitignore +++ b/arch/arm/src/.gitignore @@ -1,6 +1,6 @@ -.depend -Make.dep -locked.r -board -chip +/.depend +/Make.dep +/locked.r +/board +/chip diff --git a/arch/arm/src/lpc17xx/chip/lpc178x_iocon.h b/arch/arm/src/lpc17xx/chip/lpc178x_iocon.h index e584adad6af..2891b58276d 100755 --- a/arch/arm/src/lpc17xx/chip/lpc178x_iocon.h +++ b/arch/arm/src/lpc17xx/chip/lpc178x_iocon.h @@ -336,6 +336,14 @@ #define IOCON_MODE_PU (2) /* 10: pin has a pull-up resistor enabled */ #define IOCON_MODE_RM (3) /* 11: pin has repeater mode enabled */ +/* Pin types */ + +#define IOCON_TYPE_D_MASK (0x0000067f) /* All ports except where ADC/DAC, USB, I2C is present */ +#define IOCON_TYPE_A_MASK (0x000105df) /* USB/ADC/DAC P0:12-13, P0:23-26, P1:30-31 */ +#define IOCON_TYPE_U_MASK (0x00000007) /* USB P0:29 to 31 */ +#define IOCON_TYPE_I_MASK (0x00000347) /* I2C/USB P0:27-28, P5:2-3 */ +#define IOCON_TYPE_W_MASK (0x000007ff) /* I2S P0:7-9 */ + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/arch/arm/src/lpc17xx/lpc178x_gpio.c b/arch/arm/src/lpc17xx/lpc178x_gpio.c index 544c608a439..fc9f477ae19 100644 --- a/arch/arm/src/lpc17xx/lpc178x_gpio.c +++ b/arch/arm/src/lpc17xx/lpc178x_gpio.c @@ -137,7 +137,7 @@ static int lpc17_configiocon(unsigned int port, unsigned int pin, { uint32_t regaddr; uint32_t regval; - uint32_t typemask = GPIO_IOCON_TYPE_D_MASK; + uint32_t typemask = IOCON_TYPE_D_MASK; /* Select the mask based on pin usage */ @@ -149,7 +149,7 @@ static int lpc17_configiocon(unsigned int port, unsigned int pin, case 7: case 8: case 9: - typemask = GPIO_IOCON_TYPE_W_MASK; + typemask = IOCON_TYPE_W_MASK; break; case 12: @@ -158,18 +158,18 @@ static int lpc17_configiocon(unsigned int port, unsigned int pin, case 24: case 25: case 26: - typemask = GPIO_IOCON_TYPE_A_MASK; + typemask = IOCON_TYPE_A_MASK; break; case 27: case 28: - typemask = GPIO_IOCON_TYPE_I_MASK; + typemask = IOCON_TYPE_I_MASK; break; case 29: case 30: case 31: - typemask = GPIO_IOCON_TYPE_U_MASK; + typemask = IOCON_TYPE_U_MASK; break; default: @@ -182,7 +182,7 @@ static int lpc17_configiocon(unsigned int port, unsigned int pin, { case 30: case 31: - typemask = GPIO_IOCON_TYPE_A_MASK; + typemask = IOCON_TYPE_A_MASK; break; default: @@ -195,7 +195,7 @@ static int lpc17_configiocon(unsigned int port, unsigned int pin, { case 2: case 3: - typemask = GPIO_IOCON_TYPE_I_MASK; + typemask = IOCON_TYPE_I_MASK; break; default: diff --git a/arch/arm/src/lpc17xx/lpc178x_gpio.h b/arch/arm/src/lpc17xx/lpc178x_gpio.h index 842cb569ac9..8005425b1fc 100644 --- a/arch/arm/src/lpc17xx/lpc178x_gpio.h +++ b/arch/arm/src/lpc17xx/lpc178x_gpio.h @@ -57,15 +57,9 @@ */ /* Special Pin Functions - * For pins that has ADC/DAC, USB, I2C + * For pins that have ADC/DAC, USB, I2C */ -#define GPIO_IOCON_TYPE_D_MASK (0x0000067f) /* All port except where ADC/DAC, USB, I2C is present */ -#define GPIO_IOCON_TYPE_A_MASK (0x000105df) /* USB/ADC/DAC P0:12-13, P0:23-26, P1:30-31 */ -#define GPIO_IOCON_TYPE_U_MASK (0x00000007) /* USB P0:29 to 31 */ -#define GPIO_IOCON_TYPE_I_MASK (0x00000347) /* I2C/USB P0:27-28, P5:2-3 */ -#define GPIO_IOCON_TYPE_W_MASK (0x000007ff) /* I2S P0:7-9 */ - #define GPIO_IOCON_MASK (0x00ff0000) # define GPIO_HYSTERESIS (1 << 16) /* Bit 16: HYSTERESIS: 0-Disable, 1-Enabled */ # define GPIO_INVERT (1 << 17) /* Bit 17: Input: 0-Not Inverted, 1-Inverted */ diff --git a/arch/avr/include/.gitignore b/arch/avr/include/.gitignore index 06655cab47a..e6460c4a678 100644 --- a/arch/avr/include/.gitignore +++ b/arch/avr/include/.gitignore @@ -1,3 +1,3 @@ -board -chip +/board +/chip diff --git a/arch/avr/src/.gitignore b/arch/avr/src/.gitignore index 11ae4f83bf9..d9a7dec419b 100644 --- a/arch/avr/src/.gitignore +++ b/arch/avr/src/.gitignore @@ -1,6 +1,6 @@ -.depend -Make.dep -locked.r -board -chip +/.depend +/Make.dep +/locked.r +/board +/chip diff --git a/arch/hc/include/.gitignore b/arch/hc/include/.gitignore index 8c2073f4cb7..8b8a2b105ce 100644 --- a/arch/hc/include/.gitignore +++ b/arch/hc/include/.gitignore @@ -1,4 +1,3 @@ -chip -board - +/chip +/board diff --git a/arch/hc/src/.gitignore b/arch/hc/src/.gitignore index 50d82248d5d..b5d295dd6ff 100644 --- a/arch/hc/src/.gitignore +++ b/arch/hc/src/.gitignore @@ -1,7 +1,6 @@ -.depend -Make.dep -board -chip -*.r - +/.depend +/Make.dep +/board +/chip +/*.r diff --git a/arch/mips/include/.gitignore b/arch/mips/include/.gitignore index dc63921a65a..e6460c4a678 100644 --- a/arch/mips/include/.gitignore +++ b/arch/mips/include/.gitignore @@ -1,4 +1,3 @@ -board -chip - +/board +/chip diff --git a/arch/mips/src/.gitignore b/arch/mips/src/.gitignore index 8200050d1c4..6a1830c0ef1 100644 --- a/arch/mips/src/.gitignore +++ b/arch/mips/src/.gitignore @@ -1,6 +1,6 @@ -.depend -Make.dep -board -chip +/.depend +/Make.dep +/board +/chip diff --git a/arch/rgmp/include/.gitignore b/arch/rgmp/include/.gitignore index dc63921a65a..e6460c4a678 100644 --- a/arch/rgmp/include/.gitignore +++ b/arch/rgmp/include/.gitignore @@ -1,4 +1,3 @@ -board -chip - +/board +/chip diff --git a/arch/rgmp/src/.gitignore b/arch/rgmp/src/.gitignore index 8200050d1c4..83210e8c18a 100644 --- a/arch/rgmp/src/.gitignore +++ b/arch/rgmp/src/.gitignore @@ -1,6 +1,5 @@ -.depend -Make.dep -board -chip - +/.depend +/Make.dep +/board +/chip diff --git a/arch/sim/include/.gitignore b/arch/sim/include/.gitignore index b4b4afafba9..12c22f4f28a 100644 --- a/arch/sim/include/.gitignore +++ b/arch/sim/include/.gitignore @@ -1,2 +1,2 @@ -board +/board diff --git a/arch/sim/src/.gitignore b/arch/sim/src/.gitignore index 0fea570657a..b5b31ec941b 100644 --- a/arch/sim/src/.gitignore +++ b/arch/sim/src/.gitignore @@ -1,9 +1,9 @@ -Make.dep -.depend -Cygwin-names.dat -Linux-names.dat -nuttx.rel -GNU -chip -board +/Make.dep +/.depend +/Cygwin-names.dat +/Linux-names.dat +/nuttx.rel +/GNU +/chip +/board diff --git a/arch/x86/include/.gitignore b/arch/x86/include/.gitignore index 8c2073f4cb7..8b8a2b105ce 100644 --- a/arch/x86/include/.gitignore +++ b/arch/x86/include/.gitignore @@ -1,4 +1,3 @@ -chip -board - +/chip +/board diff --git a/arch/x86/src/.gitignore b/arch/x86/src/.gitignore index 609a19c0994..a80d8bd37eb 100644 --- a/arch/x86/src/.gitignore +++ b/arch/x86/src/.gitignore @@ -1,5 +1,5 @@ -chip -board -.depend -Make.dep +/chip +/board +/.depend +/Make.dep diff --git a/arch/z16/src/.gitignore b/arch/z16/src/.gitignore index bfbab21d3bf..d61ab1f9ba6 100644 --- a/arch/z16/src/.gitignore +++ b/arch/z16/src/.gitignore @@ -1,8 +1,8 @@ -Make.dep -.depend -board -chip -nuttx.linkcmd +/Make.dep +/.depend +/board +/chip +/nuttx.linkcmd *.asm *.obj *.lib diff --git a/arch/z80/include/.gitignore b/arch/z80/include/.gitignore index dc63921a65a..e6460c4a678 100644 --- a/arch/z80/include/.gitignore +++ b/arch/z80/include/.gitignore @@ -1,4 +1,3 @@ -board -chip - +/board +/chip diff --git a/arch/z80/src/.gitignore b/arch/z80/src/.gitignore index a61725d0cfd..22342dd6d81 100644 --- a/arch/z80/src/.gitignore +++ b/arch/z80/src/.gitignore @@ -1,9 +1,9 @@ -Make.dep -.depend -up_mem.h -asm_mem.h -board -chip +/Make.dep +/.depend +/up_mem.h +/asm_mem.h +/board +/chip *.sym *.asm *.obj @@ -21,4 +21,3 @@ chip *.linkcmd *.noi -