Fix PIO interface bug

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2586 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-04-11 18:07:49 +00:00
parent 03b90172f4
commit 4ee22ed85c
3 changed files with 42 additions and 36 deletions

View File

@ -1086,3 +1086,6 @@
* configs/olimex-lpc2378, arch/arm/include/lpc2378, and arch/arm/src/lpc2378 -
Basic port of the NXP 2378 on the Olimex board contributed by
Rommel Marcelo.
* arch/arm/src/sam3u/sam3u_internal.h - Fixed a critical bug in the AT91SAM3U
PIO decoding. No PIOs greater than 15 could be used on any port! Obviously,
no one has been using this port.

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: April 8, 2010</p>
<p>Last Updated: April 11, 2010</p>
</td>
</tr>
</table>
@ -1668,6 +1668,9 @@ nuttx-5.3 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* configs/olimex-lpc2378, arch/arm/include/lpc2378, and arch/arm/src/lpc2378 -
Basic port of the NXP 2378 on the Olimex board contributed by
Rommel Marcelo.
* arch/arm/src/sam3u/sam3u_internal.h - Fixed a critical bug in the AT91SAM3U
PIO decoding. No PIOs greater than 15 could be used on any port! Obviously,
no one has been using this port.
pascal-2.1 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;

View File

@ -85,7 +85,7 @@
*/
#define GPIO_CFG_SHIFT (11) /* Bits 11-13: GPIO configuration bits */
#define GPIO_CFG_MASK (3 << GPIO_CFG_SHIFT)
#define GPIO_CFG_MASK (7 << GPIO_CFG_SHIFT)
# define GPIO_CFG_DEFAULT (0 << GPIO_CFG_SHIFT) /* Default, no attribute */
# define GPIO_CFG_PULLUP (1 << GPIO_CFG_SHIFT) /* Bit 11: Internal pull-up */
# define GPIO_CFG_DEGLITCH (2 << GPIO_CFG_SHIFT) /* Bit 12: Internal glitch filter */
@ -125,8 +125,8 @@
* .... .... ...B BBBB
*/
#define GPIO_PIN_SHIFT 0 /* Bits 0-3: GPIO number: 0-15 */
#define GPIO_PIN_MASK (15 << GPIO_PIN_SHIFT)
#define GPIO_PIN_SHIFT 0 /* Bits 0-4: GPIO number: 0-31 */
#define GPIO_PIN_MASK (31 << GPIO_PIN_SHIFT)
#define GPIO_PIN0 (0 << GPIO_PIN_SHIFT)
#define GPIO_PIN1 (1 << GPIO_PIN_SHIFT)
#define GPIO_PIN2 (2 << GPIO_PIN_SHIFT)