summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-07 15:54:37 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-07 15:54:37 -0600
commit6c6c41ff791f5ab36108c84eb10aca162e48cc0e (patch)
tree7995212d68c1e06d3272138af169ad5866dba023
parent3b9fcb97ed990bcdfc36df0414828ce4e0ce8100 (diff)
downloadnuttx-6c6c41ff791f5ab36108c84eb10aca162e48cc0e.tar.gz
nuttx-6c6c41ff791f5ab36108c84eb10aca162e48cc0e.tar.bz2
nuttx-6c6c41ff791f5ab36108c84eb10aca162e48cc0e.zip
Fix some cloned errors in SAM GPIO interrupt setup
-rw-r--r--apps/examples/cc3000/cc3000basic.c2
-rw-r--r--apps/nshlib/README.txt2
-rw-r--r--apps/nshlib/nsh_parse.c2
-rw-r--r--misc/pascal/include/poff.h2
-rw-r--r--nuttx/Documentation/NfsHowto.html2
-rw-r--r--nuttx/Documentation/NuttShell.html2
-rwxr-xr-xnuttx/Documentation/NuttXCCodingStandard.html2
-rw-r--r--nuttx/arch/arm/src/sama5/sam_udphs.c2
-rw-r--r--nuttx/configs/cloudctrl/src/up_usb.c2
-rw-r--r--nuttx/configs/mikroe-stm32f4/src/up_usb.c2
-rw-r--r--nuttx/configs/olimex-stm32-p207/src/up_usb.c2
-rw-r--r--nuttx/configs/sam3u-ek/src/up_buttons.c11
-rw-r--r--nuttx/configs/sam4e-ek/src/sam_buttons.c37
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_buttons.c24
-rw-r--r--nuttx/configs/sam4s-xplained-pro/src/sam_buttons.c22
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_buttons.c24
-rw-r--r--nuttx/configs/sama5d3-xplained/src/sam_buttons.c22
-rw-r--r--nuttx/configs/sama5d3-xplained/src/sam_ethernet.c5
-rw-r--r--nuttx/configs/sama5d3-xplained/src/sam_usb.c4
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_buttons.c37
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_ethernet.c5
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_usb.c4
-rw-r--r--nuttx/configs/sama5d4-ek/src/sam_buttons.c21
-rw-r--r--nuttx/configs/sama5d4-ek/src/sam_ethernet.c5
-rw-r--r--nuttx/configs/sama5d4-ek/src/sam_usb.c4
-rw-r--r--nuttx/configs/shenzhou/src/up_usb.c2
-rw-r--r--nuttx/configs/stm3220g-eval/src/up_usb.c2
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_usb.c2
-rw-r--r--nuttx/configs/stm32f4discovery/src/stm32_usb.c2
-rw-r--r--nuttx/fs/nxffs/nxffs.h2
-rw-r--r--nuttx/fs/nxffs/nxffs_cache.c2
-rw-r--r--nuttx/include/nuttx/poff.h2
-rw-r--r--nuttx/libc/README.txt2
-rw-r--r--nuttx/syscall/README.txt2
-rw-r--r--nuttx/tools/mkdeps.c2
35 files changed, 162 insertions, 105 deletions
diff --git a/apps/examples/cc3000/cc3000basic.c b/apps/examples/cc3000/cc3000basic.c
index 2530680b6..260c6f821 100644
--- a/apps/examples/cc3000/cc3000basic.c
+++ b/apps/examples/cc3000/cc3000basic.c
@@ -806,7 +806,7 @@ void ListAccessPoints(void)
printf("List visible access points\n");
- printf(" Setting scan paramters...\n");
+ printf(" Setting scan parameters...\n");
for (i=0; i<NUM_CHANNELS; i++)
{
diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt
index 91cb19983..a4771679e 100644
--- a/apps/nshlib/README.txt
+++ b/apps/nshlib/README.txt
@@ -695,7 +695,7 @@ o mkrd [-m <minor>] [-s <sector-size>] <nsectors>
o mount [-t <fstype> <block-device> <dir-path>]
The mount command performs one of two different operations. If no
- paramters are provided on the command line after the mount command,
+ parameters are provided on the command line after the mount command,
then the 'mount' command will enumerate all of the current
mountpoints on the console.
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c
index a089aa5ec..2ed9452cf 100644
--- a/apps/nshlib/nsh_parse.c
+++ b/apps/nshlib/nsh_parse.c
@@ -1203,7 +1203,7 @@ static FAR char *nsh_argexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline,
*rptr = '\0';
- /* Then execute the command to get the paramter value */
+ /* Then execute the command to get the parameter value */
argument = nsh_cmdparm(vtbl, cmdline + 1, allocation);
}
diff --git a/misc/pascal/include/poff.h b/misc/pascal/include/poff.h
index 00cc5c8b0..fb5a8963f 100644
--- a/misc/pascal/include/poff.h
+++ b/misc/pascal/include/poff.h
@@ -420,7 +420,7 @@ typedef struct poffDebugFuncInfo_s poffDebugFuncInfo_t;
struct poffDebugArgInfo_s
{
- /* This is the size, in bytes, of one input paramter */
+ /* This is the size, in bytes, of one input parameter */
uint32_t da_size;
};
diff --git a/nuttx/Documentation/NfsHowto.html b/nuttx/Documentation/NfsHowto.html
index ed5e6793b..a6e7d3fb2 100644
--- a/nuttx/Documentation/NfsHowto.html
+++ b/nuttx/Documentation/NfsHowto.html
@@ -175,7 +175,7 @@ char *mountpoint;
ret = mount(NULL, mountpoint, string &quot;nfs&quot;, 0, (FAR void *)&data);
</pre></ul>
<p>
- NOTE that: (1) the block driver paramter is <code>NULL</code>.
+ NOTE that: (1) the block driver parameter is <code>NULL</code>.
The <code>mount()</code> is smart enough to know that no block driver is needed with the NFS file system.
(2) The NFS file system is identified with the simple string &quot;nfs&quot;
(3) A reference to <code>struct nfs_args</code> is passed as an NFS-specific argument.
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index 071214af8..b73fd77c3 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -1988,7 +1988,7 @@ mount -t &lt;fstype&gt; &lt;block-device&gt; <code>&lt;dir-path&gt;</code>
<p>
<b>Synopsis</b>.
The <code>mount</code> command performs one of two different operations.
- If no paramters are provided on the command line after the <code>mount</code> command, then the <code>mount</code> command will enumerate all of the current mountpoints on the console.
+ If no parameters are provided on the command line after the <code>mount</code> command, then the <code>mount</code> command will enumerate all of the current mountpoints on the console.
</p>
<p>
If the mount parameters are provied on the command after the <code>mount</code> command, then the <code>mount</code> command will mount a file system in the NuttX pseudo-file system.
diff --git a/nuttx/Documentation/NuttXCCodingStandard.html b/nuttx/Documentation/NuttXCCodingStandard.html
index 4cb4a9517..56eea5aaf 100755
--- a/nuttx/Documentation/NuttXCCodingStandard.html
+++ b/nuttx/Documentation/NuttXCCodingStandard.html
@@ -1665,7 +1665,7 @@ ptr = (FAR struct somestruct_s *)value;
<li>
<b><code> * Input Parameters:</code></b> followed by a description of the of each input parameter beginning on the second line.
Each input parameter begins on a separator line indented by two additional spaces.
- The description needs to include (1) the name of the input paramters, and (2) a short description of the input parameter.
+ The description needs to include (1) the name of the input parameters, and (2) a short description of the input parameter.
</li>
<li>
<b><code> * Returned Value:</code></b> followed by a description of the of returned value(s) beginning on the second line.
diff --git a/nuttx/arch/arm/src/sama5/sam_udphs.c b/nuttx/arch/arm/src/sama5/sam_udphs.c
index 5fcff8b59..ffef30b48 100644
--- a/nuttx/arch/arm/src/sama5/sam_udphs.c
+++ b/nuttx/arch/arm/src/sama5/sam_udphs.c
@@ -1567,7 +1567,7 @@ static void sam_req_rddisable(uint8_t epno)
* 'inflight' field to hold the maximum size of the transfer; but
* 'inflight' is not used with FIFO transfers.
*
- * When the transfer completes, the 'recvsize' paramter must be the
+ * When the transfer completes, the 'recvsize' parameter must be the
* size of the transfer that just completed. For the case of DMA,
* that is the size of the DMA transfer that has just been written to
* memory; for the FIFO transfer, recvsize is the number of bytes
diff --git a/nuttx/configs/cloudctrl/src/up_usb.c b/nuttx/configs/cloudctrl/src/up_usb.c
index f38689b5c..4442f9192 100644
--- a/nuttx/configs/cloudctrl/src/up_usb.c
+++ b/nuttx/configs/cloudctrl/src/up_usb.c
@@ -257,7 +257,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/mikroe-stm32f4/src/up_usb.c b/nuttx/configs/mikroe-stm32f4/src/up_usb.c
index 9a45c1a9b..b95413bad 100644
--- a/nuttx/configs/mikroe-stm32f4/src/up_usb.c
+++ b/nuttx/configs/mikroe-stm32f4/src/up_usb.c
@@ -256,7 +256,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/olimex-stm32-p207/src/up_usb.c b/nuttx/configs/olimex-stm32-p207/src/up_usb.c
index 60d6f72f7..15711b32d 100644
--- a/nuttx/configs/olimex-stm32-p207/src/up_usb.c
+++ b/nuttx/configs/olimex-stm32-p207/src/up_usb.c
@@ -207,7 +207,7 @@ int stm32_usbhost_initialize(void)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/sam3u-ek/src/up_buttons.c b/nuttx/configs/sam3u-ek/src/up_buttons.c
index da35ef643..fb9f9b08e 100644
--- a/nuttx/configs/sam3u-ek/src/up_buttons.c
+++ b/nuttx/configs/sam3u-ek/src/up_buttons.c
@@ -78,7 +78,8 @@ static xcpt_t g_irqbutton2;
****************************************************************************/
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
-static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
+static xcpt_t board_button_irqx(gpio_pinset_t pinset, int irq,
+ xcpt_t irqhandler, xcpt_t *store)
{
xcpt_t oldhandler;
irqstate_t flags;
@@ -100,7 +101,7 @@ static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
{
/* Configure the interrupt */
- sam_gpioirq(irq);
+ sam_gpioirq(pinset);
(void)irq_attach(irq, irqhandler);
sam_gpioirqenable(irq);
}
@@ -185,11 +186,13 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{
if (id == BUTTON1)
{
- return board_button_irqx(IRQ_BUTTON1, irqhandler, &g_irqbutton1);
+ return board_button_irqx(GPIO_BUTTON1, IRQ_BUTTON1,
+ irqhandler, &g_irqbutton1);
}
else if (id == BUTTON2)
{
- return board_button_irqx(IRQ_BUTTON2, irqhandler, &g_irqbutton2);
+ return board_button_irqx(GPIO_BUTTON2, IRQ_BUTTON2,
+ irqhandler, &g_irqbutton2);
}
else
{
diff --git a/nuttx/configs/sam4e-ek/src/sam_buttons.c b/nuttx/configs/sam4e-ek/src/sam_buttons.c
index 6f9611829..2a88250b1 100644
--- a/nuttx/configs/sam4e-ek/src/sam_buttons.c
+++ b/nuttx/configs/sam4e-ek/src/sam_buttons.c
@@ -80,7 +80,8 @@ static xcpt_t g_irq_tamp;
****************************************************************************/
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
-static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
+static xcpt_t board_button_irqx(gpio_pinset_t pinset, int irq,
+ xcpt_t irqhandler, xcpt_t *store)
{
xcpt_t oldhandler;
irqstate_t flags;
@@ -102,7 +103,7 @@ static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
{
/* Configure the interrupt */
- sam_gpioirq(irq);
+ sam_gpioirq(pinset);
(void)irq_attach(irq, irqhandler);
sam_gpioirqenable(irq);
}
@@ -130,10 +131,10 @@ static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
@@ -145,16 +146,16 @@ void board_button_initialize(void)
(void)sam_configgpio(GPIO_TAMP);
}
-/************************************************************************************
+/****************************************************************************
* Name: board_buttons
*
* Description:
- * After board_button_initialize() has been called, board_buttons() may be called to collect
- * the state of all buttons. board_buttons() returns an 8-bit bit set with each bit
- * associated with a button. See the BUTTON* definitions above for the meaning of
- * each bit in the returned value.
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the BUTTON*
+ * definitions above for the meaning of each bit in the returned value.
*
- ************************************************************************************/
+ ****************************************************************************/
uint8_t board_buttons(void)
{
@@ -192,16 +193,20 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
switch (id)
{
case BUTTON_SCROLLUP:
- return board_button_irqx(IRQ_SCROLLUP, irqhandler, &g_irq_scrollup);
+ return board_button_irqx(GPIO_SCROLLUP, IRQ_SCROLLUP,
+ irqhandler, &g_irq_scrollup);
case BUTTON_SCROLLDOWN:
- return board_button_irqx(IRQ_SCROLLDWN, irqhandler, &g_irq_scrolldown);
+ return board_button_irqx(GPIO_SCROLLDWN, IRQ_SCROLLDWN,
+ irqhandler, &g_irq_scrolldown);
case BUTTON_WAKU:
- return board_button_irqx(IRQ_WAKU, irqhandler, &g_irq_waku);
+ return board_button_irqx(GPIO_WAKU, IRQ_WAKU,
+ irqhandler, &g_irq_waku);
case BUTTON_TAMP:
- return board_button_irqx(IRQ_WAKU, irqhandler, &g_irq_tamp);
+ return board_button_irqx(GPIO_TAMP, IRQ_WAKU,
+ irqhandler, &g_irq_tamp);
default:
return NULL;
diff --git a/nuttx/configs/sam4l-xplained/src/sam_buttons.c b/nuttx/configs/sam4l-xplained/src/sam_buttons.c
index 8a5c01571..2cefec40b 100644
--- a/nuttx/configs/sam4l-xplained/src/sam_buttons.c
+++ b/nuttx/configs/sam4l-xplained/src/sam_buttons.c
@@ -76,10 +76,10 @@ static xcpt_t g_irqsw0;
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
@@ -88,16 +88,16 @@ void board_button_initialize(void)
(void)sam_configgpio(GPIO_SW0);
}
-/************************************************************************************
+/****************************************************************************
* Name: board_buttons
*
* Description:
- * After board_button_initialize() has been called, board_buttons() may be called to collect
- * the state of all buttons. board_buttons() returns an 8-bit bit set with each bit
- * associated with a button. See the BUTTON* definitions above for the meaning of
- * each bit in the returned value.
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the BUTTON*
+ * definitions above for the meaning of each bit in the returned value.
*
- ************************************************************************************/
+ ****************************************************************************/
uint8_t board_buttons(void)
{
@@ -111,7 +111,7 @@ uint8_t board_buttons(void)
* This function may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is one
* of the BUTTON* definitions provided above. The previous interrupt
- * handler address isreturned (so that it may restored, if so desired).
+ * handler address is returned (so that it may restored, if so desired).
*
* Configuration Notes:
* Configuration CONFIG_AVR32_GPIOIRQ must be selected to enable the
@@ -148,7 +148,7 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{
/* Configure the interrupt */
- sam_gpioirq(IRQ_SW0);
+ sam_gpioirq(GPIO_SW0);
(void)irq_attach(IRQ_SW0, irqhandler);
sam_gpioirqenable(IRQ_SW0);
}
diff --git a/nuttx/configs/sam4s-xplained-pro/src/sam_buttons.c b/nuttx/configs/sam4s-xplained-pro/src/sam_buttons.c
index ce2420df2..f76a86cda 100644
--- a/nuttx/configs/sam4s-xplained-pro/src/sam_buttons.c
+++ b/nuttx/configs/sam4s-xplained-pro/src/sam_buttons.c
@@ -75,10 +75,10 @@ static xcpt_t g_irqsw0;
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
@@ -87,16 +87,16 @@ void board_button_initialize(void)
(void)sam_configgpio(GPIO_SW0);
}
-/************************************************************************************
+/****************************************************************************
* Name: board_buttons
*
* Description:
- * After board_button_initialize() has been called, board_buttons() may be called to collect
- * the state of all buttons. board_buttons() returns an 8-bit bit set with each bit
- * associated with a button. See the BUTTON* definitions above for the meaning of
- * each bit in the returned value.
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the BUTTON*
+ * definitions above for the meaning of each bit in the returned value.
*
- ************************************************************************************/
+ ****************************************************************************/
uint8_t board_buttons(void)
{
@@ -147,7 +147,7 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{
/* Configure the interrupt */
- sam_gpioirq(IRQ_SW0);
+ sam_gpioirq(GPIO_SW0);
(void)irq_attach(IRQ_SW0, irqhandler);
sam_gpioirqenable(IRQ_SW0);
}
diff --git a/nuttx/configs/sam4s-xplained/src/sam_buttons.c b/nuttx/configs/sam4s-xplained/src/sam_buttons.c
index 86b47fadd..e69d60182 100644
--- a/nuttx/configs/sam4s-xplained/src/sam_buttons.c
+++ b/nuttx/configs/sam4s-xplained/src/sam_buttons.c
@@ -74,10 +74,10 @@ static xcpt_t g_irqbp2;
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
@@ -86,16 +86,16 @@ void board_button_initialize(void)
(void)sam_configgpio(GPIO_BP2);
}
-/************************************************************************************
+/****************************************************************************
* Name: board_buttons
*
* Description:
- * After board_button_initialize() has been called, board_buttons() may be called to collect
- * the state of all buttons. board_buttons() returns an 8-bit bit set with each bit
- * associated with a button. See the BUTTON* definitions above for the meaning of
- * each bit in the returned value.
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the BUTTON*
+ * definitions above for the meaning of each bit in the returned value.
*
- ************************************************************************************/
+ ****************************************************************************/
uint8_t board_buttons(void)
{
@@ -109,7 +109,7 @@ uint8_t board_buttons(void)
* This function may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is one
* of the BUTTON* definitions provided above. The previous interrupt
- * handler address isreturned (so that it may restored, if so desired).
+ * handler address is returned (so that it may restored, if so desired).
*
* Configuration Notes:
* Configuration CONFIG_AVR32_GPIOIRQ must be selected to enable the
@@ -146,7 +146,7 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{
/* Configure the interrupt */
- sam_gpioirq(IRQ_BP2);
+ sam_gpioirq(GPIO_BP2);
(void)irq_attach(IRQ_BP2, irqhandler);
sam_gpioirqenable(IRQ_BP2);
}
diff --git a/nuttx/configs/sama5d3-xplained/src/sam_buttons.c b/nuttx/configs/sama5d3-xplained/src/sam_buttons.c
index e4eb35b75..9e66cf3d9 100644
--- a/nuttx/configs/sama5d3-xplained/src/sam_buttons.c
+++ b/nuttx/configs/sama5d3-xplained/src/sam_buttons.c
@@ -126,7 +126,7 @@ uint8_t board_buttons(void)
* This function may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is one
* of the BUTTON* definitions provided above. The previous interrupt
- * handler address isreturned (so that it may restored, if so desired).
+ * handler address is returned (so that it may restored, if so desired).
*
* Configuration Notes:
* Configuration CONFIG_SAMA5_PIO_IRQ must be selected to enable the
@@ -155,11 +155,25 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
oldhandler = g_irquser1;
g_irquser1 = irqhandler;
+ /* Are we attaching or detaching? */
+
+ if (irqhandler != NULL)
+ {
+ /* Configure the interrupt */
+
+ sam_pioirq(PIO_USER);
+ (void)irq_attach(IRQ_USER1, irqhandler);
+ sam_pioirqenable(IRQ_USER1);
+ }
+ else
+ {
+ /* Disable and detach the interrupt */
+
+ sam_pioirqdisable(IRQ_USER1);
+ (void)irq_detach(IRQ_USER1);
+ }
/* Configure the interrupt */
- sam_pioirq(IRQ_USER1);
- (void)irq_attach(IRQ_USER1, irqhandler);
- sam_pioirqenable(IRQ_USER1);
irqrestore(flags);
}
diff --git a/nuttx/configs/sama5d3-xplained/src/sam_ethernet.c b/nuttx/configs/sama5d3-xplained/src/sam_ethernet.c
index 37a77b292..788880805 100644
--- a/nuttx/configs/sama5d3-xplained/src/sam_ethernet.c
+++ b/nuttx/configs/sama5d3-xplained/src/sam_ethernet.c
@@ -136,12 +136,14 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
irqstate_t flags;
xcpt_t *handler;
xcpt_t oldhandler;
+ pio_pinset_t pinset;
int irq;
#ifdef CONFIG_SAMA5_EMACA
if (intf == EMAC_INTF)
{
handler = &g_emac_handler;
+ pinset = PIO_INT_ETH1;
irq = IRQ_INT_ETH1;
}
else
@@ -150,6 +152,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
if (intf == GMAC_INTF)
{
handler = &g_gmac_handler;
+ pinset = PIO_INT_ETH0;
irq = IRQ_INT_ETH0;
}
else
@@ -172,7 +175,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
/* Configure the interrupt */
- sam_pioirq(irq);
+ sam_pioirq(pinset);
(void)irq_attach(irq, irqhandler);
sam_pioirqenable(irq);
diff --git a/nuttx/configs/sama5d3-xplained/src/sam_usb.c b/nuttx/configs/sama5d3-xplained/src/sam_usb.c
index 089032431..13deaea7a 100644
--- a/nuttx/configs/sama5d3-xplained/src/sam_usb.c
+++ b/nuttx/configs/sama5d3-xplained/src/sam_usb.c
@@ -463,7 +463,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
* REVISIT: Since this is a common signal, we will need to come up with some way
* to inform both EHCI and OHCI drivers when this error occurs.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
@@ -493,7 +493,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
/* Configure the interrupt */
- sam_pioirq(IRQ_USBBC_VBUS_OVERCURRENT);
+ sam_pioirq(PIO_USBBC_VBUS_OVERCURRENT);
(void)irq_attach(IRQ_USBBC_VBUS_OVERCURRENT, handler);
sam_pioirqenable(IRQ_USBBC_VBUS_OVERCURRENT);
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_buttons.c b/nuttx/configs/sama5d3x-ek/src/sam_buttons.c
index 9d8afcfba..a76696847 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_buttons.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_buttons.c
@@ -91,10 +91,10 @@ static xcpt_t g_irquser1;
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
@@ -107,10 +107,10 @@ void board_button_initialize(void)
* Name: board_buttons
*
* Description:
- * After board_button_initialize() has been called, board_buttons() may be called to
- * collect the state of all buttons. board_buttons() returns an 8-bit bit set
- * with each bit associated with a button. See the BUTTON* definitions
- * above for the meaning of each bit in the returned value.
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the BUTTON*
+ * definitions above for the meaning of each bit in the returned value.
*
****************************************************************************/
@@ -155,11 +155,24 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
oldhandler = g_irquser1;
g_irquser1 = irqhandler;
- /* Configure the interrupt */
+ /* Are we attaching or detaching? */
+
+ if (irqhandler != NULL)
+ {
+ /* Configure the interrupt */
+
+ sam_pioirq(PIO_USER1);
+ (void)irq_attach(IRQ_USER1, irqhandler);
+ sam_pioirqenable(IRQ_USER1);
+ }
+ else
+ {
+ /* Disable and detach the interrupt */
+
+ sam_pioirqdisable(IRQ_USER1);
+ (void)irq_detach(IRQ_USER1);
+ }
- sam_pioirq(IRQ_USER1);
- (void)irq_attach(IRQ_USER1, irqhandler);
- sam_pioirqenable(IRQ_USER1);
irqrestore(flags);
}
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_ethernet.c b/nuttx/configs/sama5d3x-ek/src/sam_ethernet.c
index 4e5927d5d..813ef3b28 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_ethernet.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_ethernet.c
@@ -136,12 +136,14 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
irqstate_t flags;
xcpt_t *handler;
xcpt_t oldhandler;
+ pio_pinset_t pinset;
int irq;
#ifdef CONFIG_SAMA5_EMACA
if (intf == EMAC_INTF)
{
handler = &g_emac_handler;
+ pinset = PIO_INT_ETH1;
irq = IRQ_INT_ETH1;
}
else
@@ -150,6 +152,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
if (intf == GMAC_INTF)
{
handler = &g_gmac_handler;
+ pinset = PIO_INT_ETH0;
irq = IRQ_INT_ETH0;
}
else
@@ -172,7 +175,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
/* Configure the interrupt */
- sam_pioirq(irq);
+ sam_pioirq(pinset);
(void)irq_attach(irq, irqhandler);
sam_pioirqenable(irq);
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_usb.c b/nuttx/configs/sama5d3x-ek/src/sam_usb.c
index 556ee2cf1..1c7a86e85 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_usb.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_usb.c
@@ -463,7 +463,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
* REVISIT: Since this is a common signal, we will need to come up with some way
* to inform both EHCI and OHCI drivers when this error occurs.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
@@ -493,7 +493,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
/* Configure the interrupt */
- sam_pioirq(IRQ_USBBC_VBUS_OVERCURRENT);
+ sam_pioirq(PIO_USBBC_VBUS_OVERCURRENT);
(void)irq_attach(IRQ_USBBC_VBUS_OVERCURRENT, handler);
sam_pioirqenable(IRQ_USBBC_VBUS_OVERCURRENT);
diff --git a/nuttx/configs/sama5d4-ek/src/sam_buttons.c b/nuttx/configs/sama5d4-ek/src/sam_buttons.c
index 1d6925aed..2df0c8fbe 100644
--- a/nuttx/configs/sama5d4-ek/src/sam_buttons.c
+++ b/nuttx/configs/sama5d4-ek/src/sam_buttons.c
@@ -151,11 +151,24 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler)
oldhandler = g_irquser1;
g_irquser1 = irqhandler;
- /* Configure the interrupt */
+ /* Are we attaching or detaching? */
+
+ if (irqhandler != NULL)
+ {
+ /* Configure the interrupt */
+
+ sam_pioirq(PIO_BTN_USER);
+ (void)irq_attach(IRQ_BTN_USER, irqhandler);
+ sam_pioirqenable(IRQ_BTN_USER);
+ }
+ else
+ {
+ /* Disable and detach the interrupt */
+
+ sam_pioirqdisable(IRQ_BTN_USER);
+ (void)irq_detach(IRQ_BTN_USER);
+ }
- sam_pioirq(IRQ_USER1);
- (void)irq_attach(IRQ_USER1, irqhandler);
- sam_pioirqenable(IRQ_USER1);
irqrestore(flags);
}
diff --git a/nuttx/configs/sama5d4-ek/src/sam_ethernet.c b/nuttx/configs/sama5d4-ek/src/sam_ethernet.c
index aa53a25e3..67bcfa549 100644
--- a/nuttx/configs/sama5d4-ek/src/sam_ethernet.c
+++ b/nuttx/configs/sama5d4-ek/src/sam_ethernet.c
@@ -105,12 +105,14 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
irqstate_t flags;
xcpt_t *handler;
xcpt_t oldhandler;
+ pio_pinset_t pinset;
int irq;
#ifdef CONFIG_SAMA5_EMAC0
if (intf == EMAC0_INTF)
{
handler = &g_emac0_handler;
+ pinset = PIO_INT_ETH0;
irq = IRQ_INT_ETH0;
}
else
@@ -119,6 +121,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
if (intf == EMAC1_INTF)
{
handler = &g_emac1_handler;
+ pinset = PIO_INT_ETH1;
irq = IRQ_INT_ETH1;
}
else
@@ -141,7 +144,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
/* Configure the interrupt */
- sam_pioirq(irq);
+ sam_pioirq(pinset);
(void)irq_attach(irq, irqhandler);
sam_pioirqenable(irq);
diff --git a/nuttx/configs/sama5d4-ek/src/sam_usb.c b/nuttx/configs/sama5d4-ek/src/sam_usb.c
index 3aa749a03..b3f510b9f 100644
--- a/nuttx/configs/sama5d4-ek/src/sam_usb.c
+++ b/nuttx/configs/sama5d4-ek/src/sam_usb.c
@@ -464,7 +464,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
* REVISIT: Since this is a common signal, we will need to come up with some way
* to inform both EHCI and OHCI drivers when this error occurs.
*
- * Input paramter:
+ * Input Parameters:
* handler - New over-current interrupt handler
*
* Returned value:
@@ -494,7 +494,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
/* Configure the interrupt */
- sam_pioirq(IRQ_USBBC_VBUS_OVERCURRENT);
+ sam_pioirq(PIO_USBBC_VBUS_OVERCURRENT);
(void)irq_attach(IRQ_USBBC_VBUS_OVERCURRENT, handler);
sam_pioirqenable(IRQ_USBBC_VBUS_OVERCURRENT);
diff --git a/nuttx/configs/shenzhou/src/up_usb.c b/nuttx/configs/shenzhou/src/up_usb.c
index e3416d86e..948974c4a 100644
--- a/nuttx/configs/shenzhou/src/up_usb.c
+++ b/nuttx/configs/shenzhou/src/up_usb.c
@@ -256,7 +256,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/stm3220g-eval/src/up_usb.c b/nuttx/configs/stm3220g-eval/src/up_usb.c
index d1638b210..b83d8e53d 100644
--- a/nuttx/configs/stm3220g-eval/src/up_usb.c
+++ b/nuttx/configs/stm3220g-eval/src/up_usb.c
@@ -256,7 +256,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/stm3240g-eval/src/up_usb.c b/nuttx/configs/stm3240g-eval/src/up_usb.c
index e12e65e43..102054dd6 100644
--- a/nuttx/configs/stm3240g-eval/src/up_usb.c
+++ b/nuttx/configs/stm3240g-eval/src/up_usb.c
@@ -256,7 +256,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/configs/stm32f4discovery/src/stm32_usb.c b/nuttx/configs/stm32f4discovery/src/stm32_usb.c
index fbc77fdd5..055c1e427 100644
--- a/nuttx/configs/stm32f4discovery/src/stm32_usb.c
+++ b/nuttx/configs/stm32f4discovery/src/stm32_usb.c
@@ -275,7 +275,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
*
- * Input paramter:
+ * Input Parameter:
* handler - New overcurrent interrupt handler
*
* Returned value:
diff --git a/nuttx/fs/nxffs/nxffs.h b/nuttx/fs/nxffs/nxffs.h
index 5882cf3e3..26e35f506 100644
--- a/nuttx/fs/nxffs/nxffs.h
+++ b/nuttx/fs/nxffs/nxffs.h
@@ -553,7 +553,7 @@ off_t nxffs_iotell(FAR struct nxffs_volume_s *volume);
* over bad blocks and block headers as necessary.
*
* Input Parameters:
- * volume - Describes the NXFFS volume. The paramters ioblock and iooffset
+ * volume - Describes the NXFFS volume. The parameters ioblock and iooffset
* in the volume structure determine the behavior of nxffs_getc().
* reserve - If less than this much space is available at the end of the
* block, then skip to the next block.
diff --git a/nuttx/fs/nxffs/nxffs_cache.c b/nuttx/fs/nxffs/nxffs_cache.c
index 72b2ac0a6..5d87cb239 100644
--- a/nuttx/fs/nxffs/nxffs_cache.c
+++ b/nuttx/fs/nxffs/nxffs_cache.c
@@ -195,7 +195,7 @@ off_t nxffs_iotell(FAR struct nxffs_volume_s *volume)
* over bad blocks and block headers as necessary.
*
* Input Parameters:
- * volume - Describes the NXFFS volume. The paramters ioblock and iooffset
+ * volume - Describes the NXFFS volume. The parameters ioblock and iooffset
* in the volume structure determine the behavior of nxffs_getc().
* reserve - If less than this much space is available at the end of the
* block, then skip to the next block.
diff --git a/nuttx/include/nuttx/poff.h b/nuttx/include/nuttx/poff.h
index b2b2c08c2..05349e53a 100644
--- a/nuttx/include/nuttx/poff.h
+++ b/nuttx/include/nuttx/poff.h
@@ -425,7 +425,7 @@ typedef struct poff_debugfuncinfo_s poff_debugfuncinfo_t;
struct poff_debugarginfo_s
{
- /* This is the size, in bytes, of one input paramter */
+ /* This is the size, in bytes, of one input parameter */
uint32_t da_size;
};
diff --git a/nuttx/libc/README.txt b/nuttx/libc/README.txt
index 4ecc7c299..b165bd74b 100644
--- a/nuttx/libc/README.txt
+++ b/nuttx/libc/README.txt
@@ -78,7 +78,7 @@ Each type field has a format as follows:
A similar situation exists for unions. For example, the formal
parameter type union sigval -- You cannot cast a uintptr_t to
a union sigval, but you can cast to the type of one of the union
- member types when passing the actual paramter. Similarly, we
+ member types when passing the actual parameter. Similarly, we
cannot cast a union sigval to a uinptr_t either. Rather, we need
to cast a specific union member fieldname to uintptr_t.
diff --git a/nuttx/syscall/README.txt b/nuttx/syscall/README.txt
index 11942a7b7..39c8694f7 100644
--- a/nuttx/syscall/README.txt
+++ b/nuttx/syscall/README.txt
@@ -104,7 +104,7 @@ Each type field has a format as follows:
A similar situation exists for unions. For example, the formal
parameter type union sigval -- You cannot cast a uintptr_t to
a union sigval, but you can cast to the type of one of the union
- member types when passing the actual paramter. Similarly, we
+ member types when passing the actual parameter. Similarly, we
cannot cast a union sigval to a uinptr_t either. Rather, we need
to cast a specific union member fieldname to uintptr_t.
diff --git a/nuttx/tools/mkdeps.c b/nuttx/tools/mkdeps.c
index 1b8989e87..a4bc68955 100644
--- a/nuttx/tools/mkdeps.c
+++ b/nuttx/tools/mkdeps.c
@@ -394,7 +394,7 @@ static void parse_args(int argc, char **argv)
fprintf(stderr, " Windows Native : [%s]\n", g_winnative ? "TRUE" : "FALSE");
}
- /* Check for required paramters */
+ /* Check for required parameters */
if (!g_cc)
{