summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-12 13:29:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-12 13:29:44 +0000
commit63a3dea74d1a3bb9b867016295079276036b72b5 (patch)
treefe13d4bc794e75aad56a1fc4012c3503289e17c3
parent8536067568baaaf22921d527d54d1edf9921f75a (diff)
downloadnuttx-63a3dea74d1a3bb9b867016295079276036b72b5.tar.gz
nuttx-63a3dea74d1a3bb9b867016295079276036b72b5.tar.bz2
nuttx-63a3dea74d1a3bb9b867016295079276036b72b5.zip
Correct errors in LPC17xx CAN register defines
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3773 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html4
-rw-r--r--nuttx/arch/arm/src/common/up_createstack.c11
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h64
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/lpc17_can.h6
-rw-r--r--nuttx/drivers/can.c2
5 files changed, 54 insertions, 33 deletions
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index f0bc05161..4e5991001 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
- <p>Last Updated: July 1, 2011</p>
+ <p>Last Updated: July 12, 2011</p>
</td>
</tr>
</table>
@@ -1127,6 +1127,7 @@ include/
<ul><pre>
tools/
|-- Makefile.host
+|-- Makefile.export
|-- README.txt
|-- configure.sh
|-- cfgparser.c
@@ -1137,6 +1138,7 @@ tools/
|-- link.sh
|-- mkconfig.c
|-- mkdeps.sh
+|-- mkexport.sh
|-- mkimage.sh
|-- mknulldeps.sh
|-- mkromfsimg.sh
diff --git a/nuttx/arch/arm/src/common/up_createstack.c b/nuttx/arch/arm/src/common/up_createstack.c
index 71d9302b1..0d78d9ce9 100644
--- a/nuttx/arch/arm/src/common/up_createstack.c
+++ b/nuttx/arch/arm/src/common/up_createstack.c
@@ -55,16 +55,23 @@
* Private Types
****************************************************************************/
-/* On most larger then 8 bit archs this will need to be word aligned so
+/****************************************************************************
+ * Name: memset32
+ *
+ * On most larger then 8 bit archs this will need to be word aligned so
* so maybe some checks should be put in place?
- */
+ *
+ ****************************************************************************/
+#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
static void *memset32(void *s, uint32_t c, size_t n)
{
uint32_t *p = (uint32_t *)s;
while (n-- > 0) *p++ = c;
return s;
}
+#endif
+
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 0d9f1560f..ac6c0d3ea 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -159,23 +159,26 @@ extern uint32_t _ebss; /* End+1 of .bss */
#ifndef __ASSEMBLY__
-/* Defined in files with the same name as the function */
+/* Low level initialization provided by board-level logic ******************/
extern void up_boot(void);
+
+/* Context switching */
+
extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_decodeirq(uint32_t *regs);
-extern void up_irqinitialize(void);
-#ifdef CONFIG_ARCH_DMA
-extern void weak_function up_dmainitialize(void);
-#endif
extern int up_saveusercontext(uint32_t *saveregs);
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
+
+/* Signal handling **********************************************************/
+
extern void up_sigdeliver(void);
-extern int up_timerisr(int irq, uint32_t *regs);
-extern void up_lowputc(char ch);
-extern void up_puts(const char *str);
-extern void up_lowputs(const char *str);
+
+/* Interrupt handling *******************************************************/
+
+extern void up_irqinitialize(void);
+extern void up_maskack_irq(int irq);
#ifdef CONFIG_ARCH_CORTEXM3
@@ -201,8 +204,6 @@ extern void up_undefinedinsn(uint32_t *regs);
#endif /* CONFIG_ARCH_CORTEXM3 */
-/* Defined in up_vectors.S */
-
extern void up_vectorundefinsn(void);
extern void up_vectorswi(void);
extern void up_vectorprefetch(void);
@@ -211,15 +212,16 @@ extern void up_vectoraddrexcptn(void);
extern void up_vectorirq(void);
extern void up_vectorfiq(void);
-/* Defined in up_allocateheap.c */
+/* System timer *************************************************************/
-#if CONFIG_MM_REGIONS > 1
-void up_addregion(void);
-#else
-# define up_addregion()
-#endif
+extern void up_timerinit(void);
+extern int up_timerisr(int irq, uint32_t *regs);
-/* Defined in up_serial.c */
+/* Low level serial output **************************************************/
+
+extern void up_lowputc(char ch);
+extern void up_puts(const char *str);
+extern void up_lowputs(const char *str);
#if CONFIG_NFILE_DESCRIPTORS > 0
extern void up_earlyserialinit(void);
@@ -237,19 +239,25 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
-/* Defined in up_watchdog.c */
+/* DMA **********************************************************************/
-extern void up_wdtinit(void);
+#ifdef CONFIG_ARCH_DMA
+extern void weak_function up_dmainitialize(void);
+#endif
-/* Defined in up_timerisr.c */
+/* Memory management ********************************************************/
-extern void up_timerinit(void);
+#if CONFIG_MM_REGIONS > 1
+void up_addregion(void);
+#else
+# define up_addregion()
+#endif
-/* Defined in up_irq.c */
+/* Watchdog timer ***********************************************************/
-extern void up_maskack_irq(int irq);
+extern void up_wdtinit(void);
-/* Defined in board/up_leds.c */
+/* LED interfaces provided by board-level logic *****************************/
#ifdef CONFIG_ARCH_LEDS
extern void up_ledinit(void);
@@ -261,9 +269,11 @@ extern void up_ledoff(int led);
# define up_ledoff(led)
#endif
+/* Networking ***************************************************************/
+
/* Defined in board/up_network.c for board-specific ethernet implementations,
* or chip/xyx_ethernet.c for chip-specific ethernet implementations, or
- * common/up_etherstub.c for a cornercase where the network is enable yet
+ * common/up_etherstub.c for a cornercase where the network is enabled yet
* there is no ethernet driver to be initialized.
*/
@@ -273,6 +283,8 @@ extern void up_netinitialize(void);
# define up_netinitialize()
#endif
+/* USB **********************************************************************/
+
#ifdef CONFIG_USBDEV
extern void up_usbinitialize(void);
extern void up_usbuninitialize(void);
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_can.h b/nuttx/arch/arm/src/lpc17xx/lpc17_can.h
index 7bfaadf6e..f59699121 100755
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_can.h
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_can.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/lpc17xx/lpc17_can.h
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -266,7 +266,7 @@
#define CAN_MOD_SM (1 << 4) /* Bit 4: Sleep Mode */
#define CAN_MOD_RPM (1 << 5) /* Bit 5: Receive Polarity Mode */
/* Bit 6: Reserved */
-#define CAN_MOD_TM (1 << 7) /* Bit 7: Test Mode
+#define CAN_MOD_TM (1 << 7) /* Bit 7: Test Mode */
/* Bits 8-31: Reserved */
/* Command bits */
@@ -411,7 +411,7 @@
#define CAN_RFS_DLC_SHIFT (16) /* Bits 16-19: Message Data Length Code (DLC) */
#define CAN_RFS_DLC_MASK (15 << yy)
/* Bits 20-29: Reserved */
-define CAN_RFS_RTR (1 << 30) /* Bit 30: Message Remote Transmission Request */
+#define CAN_RFS_RTR (1 << 30) /* Bit 30: Message Remote Transmission Request */
#define CAN_RFS_FF (1 << 31) /* Bit 31: Message 29-bit vs 11-bit ID */
/* Received Identifier */
diff --git a/nuttx/drivers/can.c b/nuttx/drivers/can.c
index 3be0248dc..accafce3c 100644
--- a/nuttx/drivers/can.c
+++ b/nuttx/drivers/can.c
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/can.c
*
- * Copyright (C) 2008-2009Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without