Add LPC31 Kconfig

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5104 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-09-06 20:08:25 +00:00
parent dcd68236b1
commit 941daa511e
64 changed files with 555 additions and 303 deletions
+1 -1
View File
@@ -484,7 +484,7 @@ endmenu
menu "USB device driver options"
config USBDEV_EP0_MAXSIZE
config LPC17_USBDEV_EP0_MAXSIZE
int "EP0 Max packet size"
depends on LPC17_USBDEV
default 64
+6 -6
View File
@@ -69,8 +69,8 @@
/* Configuration ***************************************************************/
#ifndef CONFIG_USBDEV_EP0_MAXSIZE
# define CONFIG_USBDEV_EP0_MAXSIZE 64
#ifndef CONFIG_LPC17_USBDEV_EP0_MAXSIZE
# define CONFIG_LPC17_USBDEV_EP0_MAXSIZE 64
#endif
#ifndef CONFIG_USBDEV_MAXPOWER
@@ -1369,8 +1369,8 @@ static inline void lpc17_ep0configure(struct lpc17_usbdev_s *priv)
/* EndPoint 0 initialization */
lpc17_eprealize(&priv->eplist[LPC17_CTRLEP_OUT], 0, CONFIG_USBDEV_EP0_MAXSIZE);
lpc17_eprealize(&priv->eplist[LPC17_CTRLEP_IN], 1, CONFIG_USBDEV_EP0_MAXSIZE);
lpc17_eprealize(&priv->eplist[LPC17_CTRLEP_OUT], 0, CONFIG_LPC17_USBDEV_EP0_MAXSIZE);
lpc17_eprealize(&priv->eplist[LPC17_CTRLEP_IN], 1, CONFIG_LPC17_USBDEV_EP0_MAXSIZE);
/* Enable EP0 interrupts (not DMA) */
@@ -1930,7 +1930,7 @@ static inline void lpc17_ep0dataoutinterrupt(struct lpc17_usbdev_s *priv)
case LPC17_EP0SHORTWRITE:
{
priv->ep0state = LPC17_EP0STATUSOUT;
pktlen = lpc17_epread(LPC17_EP0_OUT, NULL, CONFIG_USBDEV_EP0_MAXSIZE);
pktlen = lpc17_epread(LPC17_EP0_OUT, NULL, CONFIG_LPC17_USBDEV_EP0_MAXSIZE);
if (LPC17_READOVERRUN(pktlen))
{
lpc17_ep0setup(priv);
@@ -1941,7 +1941,7 @@ static inline void lpc17_ep0dataoutinterrupt(struct lpc17_usbdev_s *priv)
case LPC17_EP0SHORTWRSENT:
{
priv->ep0state = LPC17_EP0REQUEST;
pktlen = lpc17_epread(LPC17_EP0_OUT, NULL, CONFIG_USBDEV_EP0_MAXSIZE);
pktlen = lpc17_epread(LPC17_EP0_OUT, NULL, CONFIG_LPC17_USBDEV_EP0_MAXSIZE);
if (LPC17_READOVERRUN(pktlen))
{
lpc17_ep0setup(priv);
+180
View File
@@ -2,3 +2,183 @@
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
choice
prompt "LPC31 Chip Selection"
default ARCH_CHIP_LPC3131
depends on ARCH_CHIP_LPC31XX
config ARCH_CHIP_LPC3130
bool "LPC3130"
config ARCH_CHIP_LPC3131
bool "LPC3131"
config ARCH_CHIP_LPC3152
bool "LPC3152"
config ARCH_CHIP_LPC3154
bool "LPC3154"
endchoice
choice
prompt "Toolchain Selection"
default LPC31_CODESOURCERYW
depends on ARCH_CHIP_LPC31XX
config LPC31_CODESOURCERYW
bool "CodeSourcery for Windows"
config LPC31_CODESOURCERYL
bool "CodeSourcery for Linux"
config LPC31_DEVKITARM
bool "DevkitARM (Windows)"
config LPC31_BUILDROOT
bool "NuttX buildroot (Cygwin or Linux)"
endchoice
menu "LPC31xx Memory Mapping"
config LPC31_EXTNAND
bool "Map external NAND"
default n
---help---
Map external NAND into the memory map.
config LPC31_EXTSDRAM
bool "Map external SDRAM"
default n
---help---
Map external SDRAM into the memory map.
config LPC31_EXTSDRAMHEAP
bool "Add external SDRAM to the heap"
default y
depends on LPC31_EXTSDRAM
---help---
Add external SDRAM into the heap.
config LPC31_EXTSDRAMSIZE
int "External SDRAM size"
depends on LPC31_EXTSDRAM
---help---
Size of the external SDRAM.
config LPC31_EXTSRAM0
bool "Map external SRAM0"
default n
---help---
Map external SRAM0 into the memory map.
config LPC31_EXTSRAM0HEAP
bool "Add external SRAM0 to the heap"
default y
depends on LPC31_EXTSRAM0
---help---
Add external SRAM0 into the heap.
config LPC31_EXTSRAM0SIZE
int "External SRAM size"
depends on LPC31_EXTSRAM0
---help---
Size of the external SRAM.
config LPC31_EXTSRAM1
bool "Map external SRAM0"
default n
---help---
Map external SRAM1 into the memory map.
config LPC31_EXTSRAM1HEAP
bool "Add external SRAM1 to the heap"
default y
depends on LPC31_EXTSRAM1
---help---
Add external SRAM1 into the heap.
config LPC31_EXTSRAM1SIZE
int "External SRAM1 size"
depends on LPC31_EXTSRAM1
---help---
Size of the external SRAM1.
endmenu
menu "LPC31xx Peripheral Support"
config LPC31_UART
bool "UART"
default n
select ARCH_HAS_UART
endmenu
menu "LPC31xx UART Configuration"
depends on LPC31_UART
config LPC31_UART_DIVADDVAL
int "BAUD pre-scaler divisor"
---help---
BAUD pre-scaler divisor
config LPC31_UART_DIVISOR
int "BAUD divisor"
---help---
BAUD divisor
config LPC31_UART_MULVAL
int "BAUD multiplier"
---help---
BAUD multiplier
endmenu
menu "USB device driver options"
config LPC31_USBDEV_EP0_MAXSIZE
int "EP0 Max packet size"
depends on USBDEV
default 64
---help---
Endpoint 0 maximum packet size. Default: 64
config LPC31_USBDEV_FRAME_INTERRUPT
bool "USB frame interrupt"
depends on USBDEV
default n
---help---
Handle USB Start-Of-Frame events. Enable reading SOF from interrupt
handler vs. simply reading on demand. Probably a bad idea... Unless
there is some issue with sampling the SOF from hardware asynchronously.
config LPC31_USBDEV_DMA
bool "Enable USB device DMA"
depends on USBDEV
default n
---help---
Enable lpc31xx-specific DMA support
config LPC31_USBDEV_REGDEBUG
bool "Register level debug"
depends on USBDEV && DEBUG
default n
---help---
Output detailed register-level USB device debug information. Requires also DEBUG.
endmenu
menu "SPI device driver options"
config LPC31_SPI_REGDEBUG
bool "Register level debug"
depends on DEBUG
default n
---help---
Output detailed register-level SPI device debug information. Requires also DEBUG.
endmenu
+1 -1
View File
@@ -2,7 +2,7 @@
# arch/arm/lpc31xx/Make.defs
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
+2 -3
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/chip.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,11 +59,10 @@
# define HAVE_INTSRAM1 1 /* 192Kb internal SRAM */
# define LPC31_NDMACH 12 /* 12 DMA channels */
# undef HAVE_AESENGINE /* No AES engine */
#elif defined(CONFIG_ARCH_CHIP_LPC3152)
#elif defined(CONFIG_ARCH_CHIP_LPC3154)
# define HAVE_INTSRAM1 1 /* 192Kb internal SRAM */
# define LPC31_NDMACH 12 /* 12 DMA channels */
# define HAVE_AESENGINE 1 /* AES engine */
# undef HAVE_AESENGINE /* No AES engine */
#else
# error "Unsupported LPC31XX architecture"
# undef HAVE_INTSRAM1 /* No INTSRAM1 */
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_adc.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_allocateheap.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_analogdie.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_bcrndx.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_cgu.h
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_cgudrvr.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_clkdomain.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_exten.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_clkfreq.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_clkinit.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -3,7 +3,7 @@
* arch/arm/src/chip/lpc31_decodeirq.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_defclk.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_dma.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_esrndx.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_evntrtr.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_fdcndx.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_fdivinit.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_freqin.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -4,7 +4,7 @@
* Author: David Hewson
*
* Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_i2c.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_i2s.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_intc.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_internal.h
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_ioconfig.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -3,7 +3,7 @@
* arch/arm/src/chip/lpc31_irq.c
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_lcd.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_mci.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_memorymap.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_mpmc.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_nand.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_otp.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_pcm.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_pllconfig.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_pwm.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_resetclks.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_rng.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_setfdiv.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_setfreqin.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_softreset.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009
+12 -14
View File
@@ -1,9 +1,9 @@
/************************************************************************************
* arm/arm/src/lpc31xx/lpc31_spi.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
* Author: David Hewson, deriving in part from other SPI drivers originally by
* Gregory Nutt <spudmonkey@racsa.co.cr>
* Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -62,14 +62,12 @@
/* Configuration ********************************************************************/
/* Debug ****************************************************************************/
/* Define the following to enable extremely detailed register debug */
#undef CONFIG_DEBUG_SPIREGS
/* CONFIG_DEBUG must also be defined */
/* CONFIG_LPC31_SPI_REGDEBUG enabled very low, register-level debug output.
* CONFIG_DEBUG must also be defined
*/
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_SPIREGS
# undef CONFIG_LPC31_SPI_REGDEBUG
#endif
/* FIFOs ****************************************************************************/
@@ -102,7 +100,7 @@ struct lpc31_spidev_s
* Private Function Prototypes
************************************************************************************/
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
static bool spi_checkreg(bool wr, uint32_t value, uint32_t address);
static void spi_putreg(uint32_t value, uint32_t address);
static uint32_t spi_getreg(uint32_t address);
@@ -163,7 +161,7 @@ static struct lpc31_spidev_s g_spidev =
.spidev = { &g_spiops },
};
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
static bool g_wrlast;
static uint32_t g_addresslast;
static uint32_t g_valuelast;
@@ -194,7 +192,7 @@ static int g_ntimes;
*
****************************************************************************/
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
static bool spi_checkreg(bool wr, uint32_t value, uint32_t address)
{
if (wr == g_wrlast && value == g_valuelast && address == g_addresslast)
@@ -233,7 +231,7 @@ static bool spi_checkreg(bool wr, uint32_t value, uint32_t address)
*
****************************************************************************/
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
static void spi_putreg(uint32_t value, uint32_t address)
{
if (spi_checkreg(true, value, address))
@@ -258,7 +256,7 @@ static void spi_putreg(uint32_t value, uint32_t address)
*
****************************************************************************/
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
static uint32_t spi_getreg(uint32_t address)
{
uint32_t value = getreg32(address);
@@ -920,7 +918,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
* default to "driven-by-IP" on reset.
*/
#ifdef CONFIG_DEBUG_SPIREGS
#ifdef CONFIG_LPC31_SPI_REGDEBUG
lldbg("PINS: %08x MODE0: %08x MODE1: %08x\n",
spi_getreg(LPC31_IOCONFIG_SPI_PINS),
spi_getreg(LPC31_IOCONFIG_SPI_MODE0),
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_spi.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_syscreg.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_timer.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_timerisr.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_uart.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+9 -9
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_usbdev.c
*
* Authors: David Hewson
* Gregory Nutt <spudmonkey@racsa.co.cr>
* Gregory Nutt <gnutt@nuttx.org>
*
* Part of the NuttX OS and based, in part, on the LPC2148 USB driver:
*
@@ -74,8 +74,8 @@
/* Configuration ***************************************************************/
#ifndef CONFIG_USBDEV_EP0_MAXSIZE
# define CONFIG_USBDEV_EP0_MAXSIZE 64
#ifndef CONFIG_LPC31_USBDEV_EP0_MAXSIZE
# define CONFIG_LPC31_LPC31_USBDEV_EP0_MAXSIZE 64
#endif
#ifndef CONFIG_USBDEV_MAXPOWER
@@ -401,7 +401,7 @@ static int lpc31_epdisable(FAR struct usbdev_ep_s *ep);
static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep);
static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep,
FAR struct usbdev_req_s *);
#ifdef CONFIG_ARCH_USBDEV_DMA
#ifdef CONFIG_LPC31_USBDEV_DMA
static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes);
static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf);
#endif
@@ -438,7 +438,7 @@ static const struct usbdev_epops_s g_epops =
.disable = lpc31_epdisable,
.allocreq = lpc31_epallocreq,
.freereq = lpc31_epfreereq,
#ifdef CONFIG_ARCH_USBDEV_DMA
#ifdef CONFIG_LPC31_USBDEV_DMA
.allocbuffer = lpc31_epallocbuffer,
.freebuffer = lpc31_epfreebuffer,
#endif
@@ -1003,11 +1003,11 @@ static void lpc31_dispatchrequest(struct lpc31_usbdev_s *priv,
static void lpc31_ep0configure(struct lpc31_usbdev_s *priv)
{
/* Enable ep0 IN and ep0 OUT */
g_qh[LPC31_EP0_OUT].capability = (DQH_CAPABILITY_MAX_PACKET(CONFIG_USBDEV_EP0_MAXSIZE) |
g_qh[LPC31_EP0_OUT].capability = (DQH_CAPABILITY_MAX_PACKET(CONFIG_LPC31_USBDEV_EP0_MAXSIZE) |
DQH_CAPABILITY_IOS |
DQH_CAPABILITY_ZLT);
g_qh[LPC31_EP0_IN ].capability = (DQH_CAPABILITY_MAX_PACKET(CONFIG_USBDEV_EP0_MAXSIZE) |
g_qh[LPC31_EP0_IN ].capability = (DQH_CAPABILITY_MAX_PACKET(CONFIG_LPC31_USBDEV_EP0_MAXSIZE) |
DQH_CAPABILITY_IOS |
DQH_CAPABILITY_ZLT);
@@ -1955,7 +1955,7 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
*
*******************************************************************************/
#ifdef CONFIG_ARCH_USBDEV_DMA
#ifdef CONFIG_LPC31_USBDEV_DMA
static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
{
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
@@ -1971,7 +1971,7 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
*
*******************************************************************************/
#ifdef CONFIG_LPC313x_USBDEV_DMA
#ifdef CONFIG_LPC31_USBDEV_DMA
static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
{
usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_usbotg.h
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* arch/arm/src/lpc31xx/lpc31_wdt.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions