summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-11-06 02:42:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-11-06 02:42:59 +0000
commitbdd764863020c9a7730ecf7a78d8d43247f6d0ce (patch)
tree45e817b95cf8a28df5e925ebab2d050854c62e8b /nuttx
parentdafb91b46c651eba17a63457a81917b53217c2b7 (diff)
downloadpx4-nuttx-bdd764863020c9a7730ecf7a78d8d43247f6d0ce.tar.gz
px4-nuttx-bdd764863020c9a7730ecf7a78d8d43247f6d0ce.tar.bz2
px4-nuttx-bdd764863020c9a7730ecf7a78d8d43247f6d0ce.zip
Progress debugging serial driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3078 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttX.html7
-rw-r--r--nuttx/arch/avr/src/at32uc3/at32uc3_serial.c4
-rw-r--r--nuttx/arch/avr/src/common/up_initialize.c13
4 files changed, 24 insertions, 5 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 6790a04c3..315a98d48 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -1323,6 +1323,9 @@
* configs/avr32dev1/ostest - The AVR32 port now successfully passes the
examples/ostest. We have a good AVR32 port!
* configs/avr32dev1/nsh - Added a configuration to support the NuttShell
- (NSH). Testing of this configuration is just beginning.
+ (NSH). As of this writing, here is a problem receiving serial data (this
+ is, very likely, my hardware setup).
+ * lib/lib_open.c - Fix an error in fdopen when a valid file desciptor does
+ not refer to an open file.
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 56817e3ce..d3fff7c9b 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -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: November 4, 2010</p>
+ <p>Last Updated: November 5, 2010</p>
</td>
</tr>
</table>
@@ -1952,7 +1952,10 @@ nuttx-5.13 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* configs/avr32dev1/ostest - The AVR32 port now successfully passes the
examples/ostest. We have a good AVR32 port!
* configs/avr32dev1/nsh - Added a configuration to support the NuttShell
- (NSH). Testing of this configuration is just beginning.
+ (NSH). As of this writing, here is a problem receiving serial data (this
+ is, very likely, my hardware setup).
+ * lib/lib_open.c - Fix an error in fdopen when a valid file desciptor does
+ not refer to an open file.
pascal-2.1 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c b/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c
index 7ed9d4b95..e0c2bae48 100644
--- a/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c
+++ b/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c
@@ -336,7 +336,7 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint32_t *imr)
{
if (imr)
{
- *imr = up_serialin(priv, AVR32_USART_IDR_OFFSET);
+ *imr = up_serialin(priv, AVR32_USART_IMR_OFFSET);
}
/* Disable all interrupts */
@@ -594,7 +594,7 @@ static int up_receive(struct uart_dev_s *dev, uint32_t *status)
static void up_rxint(struct uart_dev_s *dev, bool enable)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
-
+
if (enable)
{
/* Receive an interrupt when their is anything in the Rx data register (or an Rx
diff --git a/nuttx/arch/avr/src/common/up_initialize.c b/nuttx/arch/avr/src/common/up_initialize.c
index fde474ec6..abbff8532 100644
--- a/nuttx/arch/avr/src/common/up_initialize.c
+++ b/nuttx/arch/avr/src/common/up_initialize.c
@@ -51,6 +51,19 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+/* Determine which (if any) console driver to use. This will probably cause
+ * up_serialinit to be incorrectly called if there is no USART configured to
+ * be an RS-232 device (see as an example arch/avr/src/at32uc23/at32uc3_config.h)
+ * This will probably have to be revisited someday.
+ */
+
+#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
+# undef CONFIG_USE_SERIALDRIVER
+# undef CONFIG_USE_EARLYSERIALINIT
+#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
+# define CONFIG_USE_SERIALDRIVER 1
+# define CONFIG_USE_EARLYSERIALINIT 1
+#endif
/****************************************************************************
* Private Types