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
This commit is contained in:
patacongo 2011-07-12 13:29:44 +00:00
parent a5aca26e66
commit f204ed65fe
5 changed files with 57 additions and 36 deletions

View File

@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec"> <h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i> <i>NuttX RTOS Porting Guide</i>
</font></big></h1> </font></big></h1>
<p>Last Updated: July 1, 2011</p> <p>Last Updated: July 12, 2011</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -1127,6 +1127,7 @@ include/
<ul><pre> <ul><pre>
tools/ tools/
|-- Makefile.host |-- Makefile.host
|-- Makefile.export
|-- README.txt |-- README.txt
|-- configure.sh |-- configure.sh
|-- cfgparser.c |-- cfgparser.c
@ -1137,6 +1138,7 @@ tools/
|-- link.sh |-- link.sh
|-- mkconfig.c |-- mkconfig.c
|-- mkdeps.sh |-- mkdeps.sh
|-- mkexport.sh
|-- mkimage.sh |-- mkimage.sh
|-- mknulldeps.sh |-- mknulldeps.sh
|-- mkromfsimg.sh |-- mkromfsimg.sh

View File

@ -55,16 +55,23 @@
* Private Types * 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? * 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) static void *memset32(void *s, uint32_t c, size_t n)
{ {
uint32_t *p = (uint32_t *)s; uint32_t *p = (uint32_t *)s;
while (n-- > 0) *p++ = c; while (n-- > 0) *p++ = c;
return s; return s;
} }
#endif
/**************************************************************************** /****************************************************************************
* Private Function Prototypes * Private Function Prototypes
****************************************************************************/ ****************************************************************************/

View File

@ -159,23 +159,26 @@ extern uint32_t _ebss; /* End+1 of .bss */
#ifndef __ASSEMBLY__ #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); extern void up_boot(void);
/* Context switching */
extern void up_copystate(uint32_t *dest, uint32_t *src); extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_decodeirq(uint32_t *regs); 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 int up_saveusercontext(uint32_t *saveregs);
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
/* Signal handling **********************************************************/
extern void up_sigdeliver(void); extern void up_sigdeliver(void);
extern int up_timerisr(int irq, uint32_t *regs);
extern void up_lowputc(char ch); /* Interrupt handling *******************************************************/
extern void up_puts(const char *str);
extern void up_lowputs(const char *str); extern void up_irqinitialize(void);
extern void up_maskack_irq(int irq);
#ifdef CONFIG_ARCH_CORTEXM3 #ifdef CONFIG_ARCH_CORTEXM3
@ -201,8 +204,6 @@ extern void up_undefinedinsn(uint32_t *regs);
#endif /* CONFIG_ARCH_CORTEXM3 */ #endif /* CONFIG_ARCH_CORTEXM3 */
/* Defined in up_vectors.S */
extern void up_vectorundefinsn(void); extern void up_vectorundefinsn(void);
extern void up_vectorswi(void); extern void up_vectorswi(void);
extern void up_vectorprefetch(void); extern void up_vectorprefetch(void);
@ -211,15 +212,16 @@ extern void up_vectoraddrexcptn(void);
extern void up_vectorirq(void); extern void up_vectorirq(void);
extern void up_vectorfiq(void); extern void up_vectorfiq(void);
/* Defined in up_allocateheap.c */ /* System timer *************************************************************/
#if CONFIG_MM_REGIONS > 1 extern void up_timerinit(void);
void up_addregion(void); extern int up_timerisr(int irq, uint32_t *regs);
#else
# define up_addregion()
#endif
/* 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 #if CONFIG_NFILE_DESCRIPTORS > 0
extern void up_earlyserialinit(void); extern void up_earlyserialinit(void);
@ -237,19 +239,25 @@ extern void lowconsole_init(void);
# define lowconsole_init() # define lowconsole_init()
#endif #endif
/* Defined in up_watchdog.c */ /* DMA **********************************************************************/
#ifdef CONFIG_ARCH_DMA
extern void weak_function up_dmainitialize(void);
#endif
/* Memory management ********************************************************/
#if CONFIG_MM_REGIONS > 1
void up_addregion(void);
#else
# define up_addregion()
#endif
/* Watchdog timer ***********************************************************/
extern void up_wdtinit(void); extern void up_wdtinit(void);
/* Defined in up_timerisr.c */ /* LED interfaces provided by board-level logic *****************************/
extern void up_timerinit(void);
/* Defined in up_irq.c */
extern void up_maskack_irq(int irq);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS #ifdef CONFIG_ARCH_LEDS
extern void up_ledinit(void); extern void up_ledinit(void);
@ -261,9 +269,11 @@ extern void up_ledoff(int led);
# define up_ledoff(led) # define up_ledoff(led)
#endif #endif
/* Networking ***************************************************************/
/* Defined in board/up_network.c for board-specific ethernet implementations, /* Defined in board/up_network.c for board-specific ethernet implementations,
* or chip/xyx_ethernet.c for chip-specific ethernet implementations, or * 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. * there is no ethernet driver to be initialized.
*/ */
@ -273,6 +283,8 @@ extern void up_netinitialize(void);
# define up_netinitialize() # define up_netinitialize()
#endif #endif
/* USB **********************************************************************/
#ifdef CONFIG_USBDEV #ifdef CONFIG_USBDEV
extern void up_usbinitialize(void); extern void up_usbinitialize(void);
extern void up_usbuninitialize(void); extern void up_usbuninitialize(void);

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/lpc17xx/lpc17_can.h * 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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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_SM (1 << 4) /* Bit 4: Sleep Mode */
#define CAN_MOD_RPM (1 << 5) /* Bit 5: Receive Polarity Mode */ #define CAN_MOD_RPM (1 << 5) /* Bit 5: Receive Polarity Mode */
/* Bit 6: Reserved */ /* 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 */ /* Bits 8-31: Reserved */
/* Command bits */ /* Command bits */
@ -411,7 +411,7 @@
#define CAN_RFS_DLC_SHIFT (16) /* Bits 16-19: Message Data Length Code (DLC) */ #define CAN_RFS_DLC_SHIFT (16) /* Bits 16-19: Message Data Length Code (DLC) */
#define CAN_RFS_DLC_MASK (15 << yy) #define CAN_RFS_DLC_MASK (15 << yy)
/* Bits 20-29: Reserved */ /* 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 */ #define CAN_RFS_FF (1 << 31) /* Bit 31: Message 29-bit vs 11-bit ID */
/* Received Identifier */ /* Received Identifier */

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* drivers/can.c * 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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without