From 612735d392e7eab30237e67e5b0c55d2ea24cdcc Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 3 Sep 2012 15:16:32 +0000 Subject: [PATCH 01/95] configure.sh now will ignore appconfig files if CONFIG_NUTTX_NEWCONFIG is defined git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5080 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/tools/configure.sh | 18 ++++++++++++++++-- nuttx/tools/csvparser.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh index 8b4a3e4860..0d6c412a5c 100755 --- a/nuttx/tools/configure.sh +++ b/nuttx/tools/configure.sh @@ -115,6 +115,18 @@ if [ ! -r "${configpath}/defconfig" ]; then exit 6 fi +# Extract values needed from the defconfig file. We need: +# (1) The CONFIG_NUTTX_NEWCONFIG setting to know if this is a "new" style +# configuration, and +# (2) The CONFIG_APPS_DIR to see if there is a configured location for the +# application directory. + +newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2` + +if [ -z "${appdir}" ]; then + appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2` +fi + # Check for the apps/ dir in the usual place if appdir was not provided if [ -z "${appdir}" ]; then @@ -150,9 +162,11 @@ chmod 755 "${TOPDIR}/setenv.sh" install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \ { echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; } -# Copy option appconfig +# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config +# if both (1) ${appdir} is defined and (2) we are not using the new configuration +# (which does not require a .config file in the appsdir. -if [ ! -z "${appdir}" ]; then +if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then if [ ! -r "${configpath}/appconfig" ]; then echo "NOTE: No readable appconfig file found in ${configpath}" else diff --git a/nuttx/tools/csvparser.c b/nuttx/tools/csvparser.c index 739e5e1f8b..3f1916e2bf 100644 --- a/nuttx/tools/csvparser.c +++ b/nuttx/tools/csvparser.c @@ -67,17 +67,27 @@ int g_lineno; * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: skip_space + ****************************************************************************/ + static char *skip_space(char *ptr) { while (*ptr && isspace((int)*ptr)) ptr++; return ptr; } +/**************************************************************************** + * Name: copy_parm + ****************************************************************************/ + static char *copy_parm(char *src, char *dest) { char *start = src; int i; + /* De-quote the parameter and copy it into the parameter array */ + for (i = 0; i < MAX_PARMSIZE; i++) { if (*src == '"') @@ -100,6 +110,10 @@ static char *copy_parm(char *src, char *dest) exit(3); } +/**************************************************************************** + * Name: find_parm + ****************************************************************************/ + static char *find_parm(char *ptr) { char *start = ptr; @@ -138,6 +152,10 @@ static char *find_parm(char *ptr) * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: read_line + ****************************************************************************/ + char *read_line(FILE *stream) { char *ptr; @@ -166,6 +184,10 @@ char *read_line(FILE *stream) } } +/**************************************************************************** + * Name: parse_csvline + ****************************************************************************/ + int parse_csvline(char *ptr) { int nparms; @@ -185,6 +207,10 @@ int parse_csvline(char *ptr) ptr++; nparms = 0; + /* Copy each comma-separated value in an array (stripping quotes from each + * of the values). + */ + do { ptr = copy_parm(ptr, &g_parm[nparms][0]); @@ -193,6 +219,8 @@ int parse_csvline(char *ptr) } while (ptr); + /* If debug is enabled, show what we got */ + if (g_debug) { printf("Parameters: %d\n", nparms); @@ -201,5 +229,6 @@ int parse_csvline(char *ptr) printf(" Parm%d: \"%s\"\n", i+1, g_parm[i]); } } + return nparms; } From d593a95d5adc05bbe11cc0b6d84132be2bbc70e5 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 00:54:09 +0000 Subject: [PATCH 02/95] Add support for multiple work queues git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5081 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 + nuttx/Documentation/NuttxPortingGuide.html | 14 ++ nuttx/arch/arm/src/kinetis/kinetis_sdhc.c | 6 +- nuttx/arch/arm/src/sam3u/sam3u_hsmci.c | 6 +- nuttx/arch/arm/src/stm32/stm32_sdio.c | 2 +- nuttx/configs/README.txt | 13 +- .../configs/pic32mx7mmb/src/up_touchscreen.c | 4 +- nuttx/drivers/input/ads7843e.c | 4 +- nuttx/drivers/input/stmpe811_base.c | 2 +- nuttx/drivers/input/stmpe811_tsc.c | 2 +- nuttx/drivers/input/tsc2007.c | 4 +- nuttx/drivers/net/enc28j60.c | 2 +- nuttx/drivers/power/pm_update.c | 4 +- nuttx/drivers/rwbuffer.c | 4 +- nuttx/drivers/usbhost/usbhost_hidkbd.c | 2 +- nuttx/drivers/usbhost/usbhost_skeleton.c | 6 +- nuttx/drivers/usbhost/usbhost_storage.c | 2 +- nuttx/include/nuttx/wqueue.h | 84 ++++++- nuttx/sched/Kconfig | 33 +++ nuttx/sched/Makefile | 2 +- nuttx/sched/os_bringup.c | 24 +- nuttx/sched/sched_free.c | 4 +- nuttx/sched/work_cancel.c | 16 +- nuttx/sched/work_internal.h | 48 ++-- nuttx/sched/work_queue.c | 14 +- nuttx/sched/work_signal.c | 96 ++++++++ nuttx/sched/work_thread.c | 233 ++++++++++-------- nuttx/tools/configure.sh | 18 +- 28 files changed, 475 insertions(+), 176 deletions(-) create mode 100644 nuttx/sched/work_signal.c diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index b67c066bcb..86e6b52572 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3250,3 +3250,5 @@ * sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith) * configs/stm3210e-eval/src/up_idle.c: Correct some power management compilation errors (reported by Diego Sanchez). + * include/nuttx/wqueue.h, sched/work*, and others: Added logic to support + a second, lower priority work queue (CONFIG_SCHED_LPWORK). diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 9df1f9378f..a03d9810fc 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -4068,6 +4068,20 @@ build CONFIG_SIG_SIGWORK: The signal number that will be used to wake-up the worker thread. Default: 4 +
  • + CONFIG_SCHED_LPWORK: If CONFIG_SCHED_WORKQUEUE is defined, then a single work queue is created by default. + If CONFIG_SCHED_LPWORK is also defined then an additional, lower-priority work queue will also be created. + This lower priority work queue is better suited for more extended processing (such as file system clean-up operations) +
  • +
  • + CONFIG_SCHED_LPWORKPRIORITY: The execution priority of the lower priority worker thread. Default: 50 +
  • +
  • + CONFIG_SCHED_LPWORKPERIOD: How often the lower priority worker thread checks for work in units of microseconds. Default: 50*1000 (50 MS). +
  • +
  • + CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. +
  • CONFIG_SCHED_WAITPID: Enables the waitpid() API
  • diff --git a/nuttx/arch/arm/src/kinetis/kinetis_sdhc.c b/nuttx/arch/arm/src/kinetis/kinetis_sdhc.c index 8be3e092af..eec5fba0e0 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_sdhc.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_sdhc.c @@ -1,8 +1,8 @@ /**************************************************************************** * arch/arm/src/kinetis/kinetis_sdhc.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2733,7 +2733,7 @@ static void kinetis_callback(void *arg) /* Yes.. queue it */ fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); - (void)work_queue(&priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); + (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { diff --git a/nuttx/arch/arm/src/sam3u/sam3u_hsmci.c b/nuttx/arch/arm/src/sam3u/sam3u_hsmci.c index b7872a2195..9d7c308ca3 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_hsmci.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_hsmci.c @@ -1,8 +1,8 @@ /**************************************************************************** * arch/arm/src/sam3u/sam3u_sdio.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2343,7 +2343,7 @@ static void sam3u_callback(void *arg) /* Yes.. queue it */ fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); - (void)work_queue(&priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); + (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { diff --git a/nuttx/arch/arm/src/stm32/stm32_sdio.c b/nuttx/arch/arm/src/stm32/stm32_sdio.c index 57d5f80d96..057a5836fd 100644 --- a/nuttx/arch/arm/src/stm32/stm32_sdio.c +++ b/nuttx/arch/arm/src/stm32/stm32_sdio.c @@ -2660,7 +2660,7 @@ static void stm32_callback(void *arg) /* Yes.. queue it */ fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); - (void)work_queue(&priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); + (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 1b405b3e45..7ad2825d0c 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -361,13 +361,24 @@ defconfig -- This is a configuration file similar to the Linux if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE is enabled, then the following options can also be used: CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker - thread. Default: 50 + thread. Default: 192 CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for work in units of microseconds. Default: 50*1000 (50 MS). CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up the worker thread. Default: 4 + CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single + work queue is created by default. If CONFIG_SCHED_LPWORK is also defined + then an additional, lower-priority work queue will also be created. This + lower priority work queue is better suited for more extended processing + (such as file system clean-up operations) + CONFIG_SCHED_LPWORKPRIORITY - The execution priority of the lower priority + worker thread. Default: 50 + CONFIG_SCHED_LPWORKPERIOD - How often the lower priority worker thread + checks for work in units of microseconds. Default: 50*1000 (50 MS). + CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower + priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. CONFIG_SCHED_WAITPID - Enables the waitpid() API CONFIG_SCHED_ATEXIT - Enables the atexit() API CONFIG_SCHED_ATEXIT_MAX - By default if CONFIG_SCHED_ATEXIT is diff --git a/nuttx/configs/pic32mx7mmb/src/up_touchscreen.c b/nuttx/configs/pic32mx7mmb/src/up_touchscreen.c index 33d7dcbe3f..c8fe53507a 100644 --- a/nuttx/configs/pic32mx7mmb/src/up_touchscreen.c +++ b/nuttx/configs/pic32mx7mmb/src/up_touchscreen.c @@ -972,7 +972,7 @@ static void tc_worker(FAR void *arg) /* Set up the next sample event */ - ret = work_queue(&priv->work, tc_worker, priv, delay); + ret = work_queue(HPWORK, &priv->work, tc_worker, priv, delay); ASSERT(ret == 0); } @@ -1420,7 +1420,7 @@ int arch_tcinitialize(int minor) */ priv->state = TC_READY; - ret = work_queue(&priv->work, tc_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, tc_worker, priv, 0); if (ret != 0) { idbg("Failed to queue work: %d\n", ret); diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c index 750b91ff2e..e08a7a7280 100644 --- a/nuttx/drivers/input/ads7843e.c +++ b/nuttx/drivers/input/ads7843e.c @@ -521,7 +521,7 @@ static int ads7843e_schedule(FAR struct ads7843e_dev_s *priv) */ DEBUGASSERT(priv->work.worker == NULL); - ret = work_queue(&priv->work, ads7843e_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, ads7843e_worker, priv, 0); if (ret != 0) { illdbg("Failed to queue work: %d\n", ret); @@ -1179,7 +1179,7 @@ int ads7843e_register(FAR struct spi_dev_s *dev, * availability conditions. */ - ret = work_queue(&priv->work, ads7843e_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, ads7843e_worker, priv, 0); if (ret != 0) { idbg("Failed to queue work: %d\n", ret); diff --git a/nuttx/drivers/input/stmpe811_base.c b/nuttx/drivers/input/stmpe811_base.c index 72af1575a9..f37c24622c 100644 --- a/nuttx/drivers/input/stmpe811_base.c +++ b/nuttx/drivers/input/stmpe811_base.c @@ -195,7 +195,7 @@ static int stmpe811_interrupt(int irq, FAR void *context) * action should be required to protect the work queue. */ - ret = work_queue(&priv->work, stmpe811_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, stmpe811_worker, priv, 0); if (ret != 0) { illdbg("Failed to queue work: %d\n", ret); diff --git a/nuttx/drivers/input/stmpe811_tsc.c b/nuttx/drivers/input/stmpe811_tsc.c index e2ab2827d5..c7f8b473b8 100644 --- a/nuttx/drivers/input/stmpe811_tsc.c +++ b/nuttx/drivers/input/stmpe811_tsc.c @@ -783,7 +783,7 @@ static void stmpe811_timeout(int argc, uint32_t arg1, ...) * action should be required to protect the work queue. */ - ret = work_queue(&priv->timeout, stmpe811_timeoutworker, priv, 0); + ret = work_queue(HPWORK, &priv->timeout, stmpe811_timeoutworker, priv, 0); if (ret != 0) { illdbg("Failed to queue work: %d\n", ret); diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c index 07acb53712..163118b95d 100644 --- a/nuttx/drivers/input/tsc2007.c +++ b/nuttx/drivers/input/tsc2007.c @@ -775,7 +775,7 @@ static int tsc2007_interrupt(int irq, FAR void *context) */ DEBUGASSERT(priv->work.worker == NULL); - ret = work_queue(&priv->work, tsc2007_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, tsc2007_worker, priv, 0); if (ret != 0) { illdbg("Failed to queue work: %d\n", ret); @@ -1316,7 +1316,7 @@ int tsc2007_register(FAR struct i2c_dev_s *dev, * availability conditions. */ - ret = work_queue(&priv->work, tsc2007_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, tsc2007_worker, priv, 0); if (ret != 0) { idbg("Failed to queue work: %d\n", ret); diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 76b0f205b1..0239406a1c 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -1509,7 +1509,7 @@ static int enc_interrupt(int irq, FAR void *context) * a good thing to do in any event. */ - return work_queue(&priv->work, enc_worker, (FAR void *)priv, 0); + return work_queue(HPWORK, &priv->work, enc_worker, (FAR void *)priv, 0); #endif } diff --git a/nuttx/drivers/power/pm_update.c b/nuttx/drivers/power/pm_update.c index ae5e1f8409..4b6b58c550 100644 --- a/nuttx/drivers/power/pm_update.c +++ b/nuttx/drivers/power/pm_update.c @@ -328,7 +328,7 @@ void pm_update(int16_t accum) /* The work will be performed on the worker thread */ DEBUGASSERT(g_pmglobals.work.worker == NULL); - (void)work_queue(&g_pmglobals.work, pm_worker, (FAR void*)((intptr_t)accum), 0); + (void)work_queue(HPWORK, &g_pmglobals.work, pm_worker, (FAR void*)((intptr_t)accum), 0); } -#endif /* CONFIG_PM */ \ No newline at end of file +#endif /* CONFIG_PM */ diff --git a/nuttx/drivers/rwbuffer.c b/nuttx/drivers/rwbuffer.c index 1d924e2a05..076ebc7816 100644 --- a/nuttx/drivers/rwbuffer.c +++ b/nuttx/drivers/rwbuffer.c @@ -213,7 +213,7 @@ static void rwb_wrstarttimeout(FAR struct rwbuffer_s *rwb) */ int ticks = (CONFIG_FS_WRDELAY + CLK_TCK/2) / CLK_TCK; - (void)work_queue(&rwb->work, rwb_wrtimeout, (FAR void *)rwb, ticks); + (void)work_queue(LPWORK, &rwb->work, rwb_wrtimeout, (FAR void *)rwb, ticks); } /**************************************************************************** @@ -222,7 +222,7 @@ static void rwb_wrstarttimeout(FAR struct rwbuffer_s *rwb) static inline void rwb_wrcanceltimeout(struct rwbuffer_s *rwb) { - (void)work_cancel(&rwb->work); + (void)work_cancel(LPWORK, &rwb->work); } /**************************************************************************** diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c index 73224ff5c0..bb3ecad9e4 100644 --- a/nuttx/drivers/usbhost/usbhost_hidkbd.c +++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c @@ -1674,7 +1674,7 @@ static int usbhost_disconnected(struct usbhost_class_s *class) */ DEBUGASSERT(priv->work.worker == NULL); - (void)work_queue(&priv->work, usbhost_destroy, priv, 0); + (void)work_queue(HPWORK, &priv->work, usbhost_destroy, priv, 0); } return OK; diff --git a/nuttx/drivers/usbhost/usbhost_skeleton.c b/nuttx/drivers/usbhost/usbhost_skeleton.c index 0a88a4f1ba..c44a265e80 100644 --- a/nuttx/drivers/usbhost/usbhost_skeleton.c +++ b/nuttx/drivers/usbhost/usbhost_skeleton.c @@ -1,8 +1,8 @@ /**************************************************************************** * drivers/usbhost/usbhost_skeleton.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1015,7 +1015,7 @@ static int usbhost_disconnected(struct usbhost_class_s *class) uvdbg("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); DEBUGASSERT(priv->work.worker == NULL); - (void)work_queue(&priv->work, usbhost_destroy, priv, 0); + (void)work_queue(HPWORK, &priv->work, usbhost_destroy, priv, 0); } else { diff --git a/nuttx/drivers/usbhost/usbhost_storage.c b/nuttx/drivers/usbhost/usbhost_storage.c index 2e3136b339..2b14676d71 100644 --- a/nuttx/drivers/usbhost/usbhost_storage.c +++ b/nuttx/drivers/usbhost/usbhost_storage.c @@ -1786,7 +1786,7 @@ static int usbhost_disconnected(struct usbhost_class_s *class) uvdbg("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); DEBUGASSERT(priv->work.worker == NULL); - (void)work_queue(&priv->work, usbhost_destroy, priv, 0); + (void)work_queue(HPWORK, &priv->work, usbhost_destroy, priv, 0); } else { diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h index dfd424c8dc..644585c56f 100644 --- a/nuttx/include/nuttx/wqueue.h +++ b/nuttx/include/nuttx/wqueue.h @@ -50,6 +50,75 @@ /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ +/* CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to + * handle delayed processing from interrupt handlers. This feature + * is required for some drivers but, if there are not complaints, + * can be safely disabled. The worker thread also performs + * garbage collection -- completing any delayed memory deallocations + * from interrupt handlers. If the worker thread is disabled, + * then that clean will be performed by the IDLE thread instead + * (which runs at the lowest of priority and may not be appropriate + * if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE + * is enabled, then the following options can also be used: + * CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker + * thread. Default: 192 + * CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for + * work in units of microseconds. Default: 50*1000 (50 MS). + * CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker + * thread. Default: CONFIG_IDLETHREAD_STACKSIZE. + * CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up + * the worker thread. Default: 4 + * + * CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single + * work queue is created by default. If CONFIG_SCHED_LPWORK is also defined + * then an additional, lower-priority work queue will also be created. This + * lower priority work queue is better suited for more extended processing + * (such as file system clean-up operations) + * CONFIG_SCHED_LPWORKPRIORITY - The execution priority of the lower priority + * worker thread. Default: 50 + * CONFIG_SCHED_LPWORKPERIOD - How often the lower priority worker thread + * checks for work in units of microseconds. Default: 50*1000 (50 MS). + * CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower + * priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. + */ + +#ifndef CONFIG_SCHED_WORKPRIORITY +# define CONFIG_SCHED_WORKPRIORITY 192 +#endif + +#ifndef CONFIG_SCHED_WORKPERIOD +# define CONFIG_SCHED_WORKPERIOD (50*1000) /* 50 milliseconds */ +#endif + +#ifndef CONFIG_SCHED_WORKSTACKSIZE +# define CONFIG_SCHED_WORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE +#endif + +#ifdef CONFIG_SCHED_LPWORK +# ifndef CONFIG_SCHED_LPWORKPRIORITY +# define CONFIG_SCHED_LPWORKPRIORITY 50 +# endif + +# ifndef CONFIG_SCHED_LPWORKPERIOD +# define CONFIG_SCHED_LPWORKPERIOD (50*1000) /* 50 milliseconds */ +# endif + +# ifndef CONFIG_SCHED_LPWORKSTACKSIZE +# define CONFIG_SCHED_LPWORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE +# endif +#endif + +/* Work queue IDs (indices). These are both zero if there is only one work + * queue. + */ + +#define HPWORK 0 +#ifdef CONFIG_SCHED_LPWORK +# define LPWORK 1 +#else +# define LPWORK HPWORK +#endif /**************************************************************************** * Public Types @@ -86,10 +155,6 @@ extern "C" { #define EXTERN extern #endif -/* The task ID of the worker thread */ - -EXTERN pid_t g_worker; - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -109,6 +174,7 @@ EXTERN pid_t g_worker; * and remove it from the work queue. * * Input parameters: + * qid - The work queue ID * work - The work structure to queue * worker - The worker callback to be invoked. The callback will invoked * on the worker thread of execution. @@ -122,7 +188,8 @@ EXTERN pid_t g_worker; * ****************************************************************************/ -EXTERN int work_queue(struct work_s *work, worker_t worker, FAR void *arg, uint32_t delay); +EXTERN int work_queue(int qid, FAR struct work_s *work, worker_t worker, + FAR void *arg, uint32_t delay); /**************************************************************************** * Name: work_cancel @@ -133,6 +200,7 @@ EXTERN int work_queue(struct work_s *work, worker_t worker, FAR void *arg, uint3 * again. * * Input parameters: + * qid - The work queue ID * work - The previously queue work structure to cancel * * Returned Value: @@ -140,7 +208,7 @@ EXTERN int work_queue(struct work_s *work, worker_t worker, FAR void *arg, uint3 * ****************************************************************************/ -EXTERN int work_cancel(struct work_s *work); +EXTERN int work_cancel(int qid, FAR struct work_s *work); /**************************************************************************** * Name: work_signal @@ -151,14 +219,14 @@ EXTERN int work_cancel(struct work_s *work); * user to force an immediate re-assessment of pending work. * * Input parameters: - * None + * qid - The work queue ID * * Returned Value: * Zero on success, a negated errno on failure * ****************************************************************************/ -#define work_signal() kill(g_worker, SIGWORK) +EXTERN int work_signal(int qid); /**************************************************************************** * Name: work_available diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 37ce0ebd61..58d6ead703 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -166,6 +166,39 @@ config SIG_SIGWORK The signal number that will be used to wake-up the worker thread. Default: 4 +config SCHED_LPWORK + bool "Enable a lower priority worker thread" + default n + depends on SCHED_WORKQUEUE + ---help--- + If SCHED_WORKQUEUE is defined, then a single work queue is created by + default. If SCHED_LPWORK is also defined then an additional, lower- + priority work queue will also be created. This lower priority work + queue is better suited for more extended processing (such as file system + clean-up operations) + +config SCHED_LPWORKPRIORITY + int "Lower priority worker thread priority" + default 192 + depends on SCHED_LPWORK + ---help--- + The execution priority of the lopwer priority worker thread. Default: 192 + +config SCHED_LPWORKPERIOD + int "Lower priority worker thread period" + default 50000 + depends on SCHED_LPWORK + ---help--- + How often the lower priority worker thread checks for work in units + of microseconds. Default: 50*1000 (50 MS). + +config SCHED_LPWORKSTACKSIZE + int "Lower priority worker thread stack size" + default 2048 + depends on SCHED_LPWORK + ---help--- + The stack size allocated for the lower priority worker thread. Default: 2K. + config SCHED_WAITPID bool "Enable waitpid() API" default n diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile index dfdc6f68b6..1e0a55aeaf 100644 --- a/nuttx/sched/Makefile +++ b/nuttx/sched/Makefile @@ -141,7 +141,7 @@ TIMER_SRCS = timer_initialize.c timer_create.c timer_delete.c timer_getoverrun.c endif ifeq ($(CONFIG_SCHED_WORKQUEUE),y) -WORK_SRCS = work_thread.c work_queue.c work_cancel.c +WORK_SRCS = work_thread.c work_queue.c work_cancel.c work_signal.c endif ifeq ($(CONFIG_PAGING),y) diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c index d6d9431377..ec61528914 100644 --- a/nuttx/sched/os_bringup.c +++ b/nuttx/sched/os_bringup.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/os_bringup.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * With extensions by: @@ -47,6 +47,7 @@ #include #include +#include #include "os_internal.h" #ifdef CONFIG_PAGING @@ -149,10 +150,23 @@ int os_bringup(void) #ifdef CONFIG_SCHED_WORKQUEUE svdbg("Starting worker thread\n"); - g_worker = KERNEL_THREAD("work", CONFIG_SCHED_WORKPRIORITY, - CONFIG_SCHED_WORKSTACKSIZE, - (main_t)work_thread, (const char **)NULL); - ASSERT(g_worker != ERROR); + g_work[HPWORK].pid = KERNEL_THREAD("work0", CONFIG_SCHED_WORKPRIORITY, + CONFIG_SCHED_WORKSTACKSIZE, + (main_t)work_hpthread, (const char **)NULL); + ASSERT(g_work[HPWORK].pid != ERROR); + + /* Start a lower priority worker thread for other, non-critical continuation + * tasks + */ + +#ifdef CONFIG_SCHED_LPWORK + svdbg("Starting worker thread\n"); + + g_work[LPWORK].pid = KERNEL_THREAD("work1", CONFIG_SCHED_LPWORKPRIORITY, + CONFIG_SCHED_LPWORKSTACKSIZE, + (main_t)work_lpthread, (const char **)NULL); + ASSERT(g_work[LPWORK].pid != ERROR); +#endif #endif /* Once the operating system has been initialized, the system must be diff --git a/nuttx/sched/sched_free.c b/nuttx/sched/sched_free.c index 4df77b109a..e5e0bdacf0 100644 --- a/nuttx/sched/sched_free.c +++ b/nuttx/sched/sched_free.c @@ -1,7 +1,7 @@ /************************************************************************ * sched/sched_free.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -99,7 +99,7 @@ void sched_free(FAR void *address) /* Signal the worker thread that is has some clean up to do */ #ifdef CONFIG_SCHED_WORKQUEUE - work_signal(); + work_signal(LPWORK); #endif irqrestore(saved_state); } diff --git a/nuttx/sched/work_cancel.c b/nuttx/sched/work_cancel.c index 30b650826b..55df86f44f 100644 --- a/nuttx/sched/work_cancel.c +++ b/nuttx/sched/work_cancel.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/work_cancel.c * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -74,6 +74,7 @@ /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: work_cancel * @@ -83,6 +84,7 @@ * again. * * Input parameters: + * qid - The work queue ID * work - The previously queue work structure to cancel * * Returned Value: @@ -90,11 +92,12 @@ * ****************************************************************************/ -int work_cancel(struct work_s *work) +int work_cancel(int qid, FAR struct work_s *work) { + FAR struct wqueue_s *wqueue = &g_work[qid]; irqstate_t flags; - DEBUGASSERT(work != NULL); + DEBUGASSERT(work != NULL && (unsigned)qid < NWORKERS); /* Cancelling the work is simply a matter of removing the work structure * from the work queue. This must be done with interrupts disabled because @@ -106,18 +109,19 @@ int work_cancel(struct work_s *work) { /* A little test of the integrity of the work queue */ - DEBUGASSERT(work->dq.flink ||(FAR dq_entry_t *)work == g_work.tail); - DEBUGASSERT(work->dq.blink ||(FAR dq_entry_t *)work == g_work.head); + DEBUGASSERT(work->dq.flink ||(FAR dq_entry_t *)work == wqueue->q.tail); + DEBUGASSERT(work->dq.blink ||(FAR dq_entry_t *)work == wqueue->q.head); /* Remove the entry from the work queue and make sure that it is * mark as availalbe (i.e., the worker field is nullified). */ - dq_rem((FAR dq_entry_t *)work, &g_work); + dq_rem((FAR dq_entry_t *)work, &wqueue->q); work->worker = NULL; } irqrestore(flags); return OK; } + #endif /* CONFIG_SCHED_WORKQUEUE */ diff --git a/nuttx/sched/work_internal.h b/nuttx/sched/work_internal.h index 69b7bf5470..7f6c1a9373 100644 --- a/nuttx/sched/work_internal.h +++ b/nuttx/sched/work_internal.h @@ -51,51 +51,49 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_SCHED_WORKPRIORITY -# define CONFIG_SCHED_WORKPRIORITY 50 -#endif - -#ifndef CONFIG_SCHED_WORKPERIOD -# define CONFIG_SCHED_WORKPERIOD (50*1000) /* 50 milliseconds */ -#endif - -#ifndef CONFIG_SCHED_WORKSTACKSIZE -# define CONFIG_SCHED_WORKSTACKSIZE CONFIG_IDLETHREAD_STACKSIZE -#endif - #ifdef CONFIG_DISABLE_SIGNALS # warning "Worker thread support requires signals" #endif +#ifdef CONFIG_SCHED_LPWORK +# define NWORKERS 2 +#else +# define NWORKERS 1 +#endif + /**************************************************************************** * Public Types ****************************************************************************/ #ifndef __ASSEMBLY__ +/* This structure defines the state on one work queue */ + +struct wqueue_s +{ + pid_t pid; /* The task ID of the worker thread */ + struct dq_queue_s q; /* The queue of pending work */ +}; + /**************************************************************************** * Public Data ****************************************************************************/ -/* The queue of pending work */ +/* The state of each work queue */ -extern struct dq_queue_s g_work; - -/* The task ID of the worker thread */ - -extern pid_t g_worker; +extern struct wqueue_s g_work[NWORKERS]; /**************************************************************************** * Public Function Prototypes ****************************************************************************/ /**************************************************************************** - * Name: work_thread + * Name: work_hpthread and work_lpthread * * Description: - * This is the main worker thread that performs actions placed on the work - * queue. It also performs periodic garbage collection (that is performed - * by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined). + * These are the main worker threads that performs actions placed on the + * work lists. One thread also performs periodic garbage collection (that + * is performed by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined). * * Input parameters: * argc, argv (not used) @@ -105,7 +103,11 @@ extern pid_t g_worker; * ****************************************************************************/ -int work_thread(int argc, char *argv[]); +int work_hpthread(int argc, char *argv[]); + +#ifdef CONFIG_SCHED_LPWORK +int work_lpthread(int argc, char *argv[]); +#endif #endif /* __ASSEMBLY__ */ #endif /* CONFIG_SCHED_WORKQUEUE */ diff --git a/nuttx/sched/work_queue.c b/nuttx/sched/work_queue.c index beeac168dd..075f08a4d7 100644 --- a/nuttx/sched/work_queue.c +++ b/nuttx/sched/work_queue.c @@ -76,6 +76,7 @@ /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: work_queue * @@ -91,6 +92,7 @@ * and remove it from the work queue. * * Input parameters: + * qid - The work queue ID (index) * work - The work structure to queue * worker - The worker callback to be invoked. The callback will invoked * on the worker thread of execution. @@ -104,11 +106,13 @@ * ****************************************************************************/ -int work_queue(struct work_s *work, worker_t worker, FAR void *arg, uint32_t delay) +int work_queue(int qid, FAR struct work_s *work, worker_t worker, + FAR void *arg, uint32_t delay) { + FAR struct wqueue_s *wqueue = &g_work[qid]; irqstate_t flags; - DEBUGASSERT(work != NULL); + DEBUGASSERT(work != NULL && (unsigned)qid < NWORKERS); /* First, initialize the work structure */ @@ -123,8 +127,10 @@ int work_queue(struct work_s *work, worker_t worker, FAR void *arg, uint32_t del flags = irqsave(); work->qtime = clock_systimer(); /* Time work queued */ - dq_addlast((FAR dq_entry_t *)work, &g_work); - work_signal(); /* Wake up the worker thread */ + + dq_addlast((FAR dq_entry_t *)work, &wqueue->q); + kill(wqueue->pid, SIGWORK); /* Wake up the worker thread */ + irqrestore(flags); return OK; } diff --git a/nuttx/sched/work_signal.c b/nuttx/sched/work_signal.c new file mode 100644 index 0000000000..6e6838c695 --- /dev/null +++ b/nuttx/sched/work_signal.c @@ -0,0 +1,96 @@ +/**************************************************************************** + * sched/work_signal.c + * + * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include + +#include "work_internal.h" + +#ifdef CONFIG_SCHED_WORKQUEUE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Type Declarations + ****************************************************************************/ + +/**************************************************************************** + * Public Variables + ****************************************************************************/ + +/**************************************************************************** + * Private Variables + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ +/**************************************************************************** + * Name: work_signal + * + * Description: + * Signal the worker thread to process the work queue now. This function + * is used internally by the work logic but could also be used by the + * user to force an immediate re-assessment of pending work. + * + * Input parameters: + * qid - The work queue ID + * + * Returned Value: + * Zero on success, a negated errno on failure + * + ****************************************************************************/ + +int work_signal(int qid) +{ + DEBUGASSERT((unsigned)qid < NWORKERS); + return kill(g_work[qid].pid, SIGWORK); +} + +#endif /* CONFIG_SCHED_WORKQUEUE */ diff --git a/nuttx/sched/work_thread.c b/nuttx/sched/work_thread.c index fe14ae5e58..abd86f7710 100644 --- a/nuttx/sched/work_thread.c +++ b/nuttx/sched/work_thread.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/work_thread.c * - * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -67,15 +67,9 @@ * Public Variables ****************************************************************************/ -/* The queue of pending work */ +/* The state of each work queue */ -struct dq_queue_s g_work; - -/* The task ID of the worker thread */ - -#ifdef CONFIG_SCHED_WORKQUEUE -pid_t g_worker; -#endif +struct wqueue_s g_work[NWORKERS]; /**************************************************************************** * Private Variables @@ -85,16 +79,116 @@ pid_t g_worker; * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: work_process + * + * Description: + * This is the logic that performs actions placed on any work list. + * + * Input parameters: + * wqueue - Describes the work queue to be processed + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void work_process(FAR struct wqueue_s *wqueue) +{ + volatile FAR struct work_s *work; + worker_t worker; + irqstate_t flags; + FAR void *arg; + uint32_t elapsed; + uint32_t remaining; + uint32_t next; + + /* Then process queued work. We need to keep interrupts disabled while + * we process items in the work list. + */ + + next = CONFIG_SCHED_WORKPERIOD / USEC_PER_TICK; + flags = irqsave(); + work = (FAR struct work_s *)wqueue->q.head; + while (work) + { + /* Is this work ready? It is ready if there is no delay or if + * the delay has elapsed. qtime is the time that the work was added + * to the work queue. It will always be greater than or equal to + * zero. Therefore a delay of zero will always execute immediately. + */ + + elapsed = clock_systimer() - work->qtime; + if (elapsed >= work->delay) + { + /* Remove the ready-to-execute work from the list */ + + (void)dq_rem((struct dq_entry_s *)work, &wqueue->q); + + /* Extract the work description from the entry (in case the work + * instance by the re-used after it has been de-queued). + */ + + worker = work->worker; + arg = work->arg; + + /* Mark the work as no longer being queued */ + + work->worker = NULL; + + /* Do the work. Re-enable interrupts while the work is being + * performed... we don't have any idea how long that will take! + */ + + irqrestore(flags); + worker(arg); + + /* Now, unfortunately, since we re-enabled interrupts we don't + * know the state of the work list and we will have to start + * back at the head of the list. + */ + + flags = irqsave(); + work = (FAR struct work_s *)wqueue->q.head; + } + else + { + /* This one is not ready.. will it be ready before the next + * scheduled wakeup interval? + */ + + remaining = elapsed - work->delay; + if (remaining < next) + { + /* Yes.. Then schedule to wake up when the work is ready */ + + next = remaining; + } + + /* Then try the next in the list. */ + + work = (FAR struct work_s *)work->dq.flink; + } + } + + /* Wait awhile to check the work list. We will wait here until either + * the time elapses or until we are awakened by a signal. + */ + + usleep(next * USEC_PER_TICK); + irqrestore(flags); +} + /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: work_thread + * Name: work_hpthread and work_lpthread * * Description: - * This is the main worker thread that performs actions placed on the work - * list. It also performs periodic garbage collection (that is performed - * by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined). + * These are the main worker threads that performs actions placed on the + * work lists. One thread also performs periodic garbage collection (that + * is performed by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined). * * Input parameters: * argc, argv (not used) @@ -104,30 +198,40 @@ pid_t g_worker; * ****************************************************************************/ -int work_thread(int argc, char *argv[]) +int work_hpthread(int argc, char *argv[]) { - volatile FAR struct work_s *work; - worker_t worker; - FAR void *arg; - uint32_t elapsed; - uint32_t remaining; - uint32_t next; - int usec; - irqstate_t flags; - /* Loop forever */ - usec = CONFIG_SCHED_WORKPERIOD; - flags = irqsave(); for (;;) { - /* Wait awhile to check the work list. We will wait here until either - * the time elapses or until we are awakened by a signal. + /* First, perform garbage collection. This cleans-up memory de-allocations + * that were queued because they could not be freed in that execution + * context (for example, if the memory was freed from an interrupt handler). + * NOTE: If the work thread is disabled, this clean-up is performed by + * the IDLE thread (at a very, very lower priority). */ - usleep(usec); - irqrestore(flags); +#ifdef CONFIG_SCHED_LPWORK + sched_garbagecollection(); +#endif + /* Then process queued work. We need to keep interrupts disabled while + * we process items in the work list. + */ + + work_process(&g_work[HPWORK]); + } + + return OK; /* To keep some compilers happy */ +} + +#ifdef CONFIG_SCHED_LPWORK +int work_lpthread(int argc, char *argv[]) +{ + /* Loop forever */ + + for (;;) + { /* First, perform garbage collection. This cleans-up memory de-allocations * that were queued because they could not be freed in that execution * context (for example, if the memory was freed from an interrupt handler). @@ -141,75 +245,12 @@ int work_thread(int argc, char *argv[]) * we process items in the work list. */ - next = CONFIG_SCHED_WORKPERIOD / USEC_PER_TICK; - flags = irqsave(); - work = (FAR struct work_s *)g_work.head; - while (work) - { - /* Is this work ready? It is ready if there is no delay or if - * the delay has elapsed. qtime is the time that the work was added - * to the work queue. It will always be greater than or equal to - * zero. Therefore a delay of zero will always execute immediately. - */ - - elapsed = clock_systimer() - work->qtime; - if (elapsed >= work->delay) - { - /* Remove the ready-to-execute work from the list */ - - (void)dq_rem((struct dq_entry_s *)work, &g_work); - - /* Extract the work description from the entry (in case the work - * instance by the re-used after it has been de-queued). - */ - - worker = work->worker; - arg = work->arg; - - /* Mark the work as no longer being queued */ - - work->worker = NULL; - - /* Do the work. Re-enable interrupts while the work is being - * performed... we don't have any idea how long that will take! - */ - - irqrestore(flags); - worker(arg); - - /* Now, unfortunately, since we re-enabled interrupts we don't - * know the state of the work list and we will have to start - * back at the head of the list. - */ - - flags = irqsave(); - work = (FAR struct work_s *)g_work.head; - } - else - { - /* This one is not ready.. will it be ready before the next - * scheduled wakeup interval? - */ - - remaining = elapsed - work->delay; - if (remaining < next) - { - /* Yes.. Then schedule to wake up when the work is ready */ - - next = remaining; - } - - /* Then try the next in the list. */ - - work = (FAR struct work_s *)work->dq.flink; - } - } - - /* Now calculate the microsecond delay we should wait */ - - usec = next * USEC_PER_TICK; + work_process(&g_work[LPWORK]); } return OK; /* To keep some compilers happy */ } + +#endif /* CONFIG_SCHED_LPWORK */ + #endif /* CONFIG_SCHED_WORKQUEUE */ diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh index 0d6c412a5c..c0df7035f0 100755 --- a/nuttx/tools/configure.sh +++ b/nuttx/tools/configure.sh @@ -101,17 +101,17 @@ if [ ! -d "${configpath}" ]; then fi if [ ! -r "${configpath}/Make.defs" ]; then - echo "File ${configpath}/Make.defs does not exist" + echo "File \"${configpath}/Make.defs\" does not exist" exit 4 fi if [ ! -r "${configpath}/setenv.sh" ]; then - echo "File ${configpath}/setenv.sh does not exist" + echo "File \"${configpath}/setenv.sh\" does not exist" exit 5 fi if [ ! -r "${configpath}/defconfig" ]; then - echo "File ${configpath}/defconfig does not exist" + echo "File \"${configpath}/defconfig\" does not exist" exit 6 fi @@ -127,7 +127,7 @@ if [ -z "${appdir}" ]; then appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2` fi -# Check for the apps/ dir in the usual place if appdir was not provided +# Check for the apps/ directory in the usual place if appdir was not provided if [ -z "${appdir}" ]; then @@ -152,7 +152,15 @@ if [ -z "${appdir}" ]; then fi fi -# Okay... setup the configuration +# If appsdir was provided (or discovered) then make sure that the apps/ +# directory exists + +if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${appdir}" ]; then + echo "Directory \"${TOPDIR}/${appdir}\" does not exist" + exit 7 +fi + +# Okay... Everything looks good. Setup the configuration install -C "${configpath}/Make.defs" "${TOPDIR}/." || \ { echo "Failed to copy ${configpath}/Make.defs" ; exit 7 ; } From 86beee54a7c60c11a61c3d81ef637fc90b97f6e7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 02:47:46 +0000 Subject: [PATCH 03/95] STM32 SDIO DMA should only 16-bits wide when DMA-ing to/from FSMC SRAM git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5082 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 + .../src/stm32/chip/stm32f10xxx_memorymap.h | 11 ++++- .../src/stm32/chip/stm32f20xxx_memorymap.h | 10 +++- .../src/stm32/chip/stm32f40xxx_memorymap.h | 8 +++ nuttx/arch/arm/src/stm32/stm32_sdio.c | 49 +++++++++++++++++-- 5 files changed, 74 insertions(+), 6 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 86e6b52572..f1688c4b96 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3252,3 +3252,5 @@ compilation errors (reported by Diego Sanchez). * include/nuttx/wqueue.h, sched/work*, and others: Added logic to support a second, lower priority work queue (CONFIG_SCHED_LPWORK). + * arch/arm/src/stm32/stm32_dma.c, chip/stm32*_memorymap.h: FSMC SRAM is + only 16-bits wide and the SDIO DMA must be set up differently. diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h index 80b38a89fe..843f006135 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h @@ -47,6 +47,9 @@ #define STM32_SRAMBB_BASE 0x22000000 #define STM32_PERIPH_BASE 0x40000000 +#define STM32_REGION_MASK 0x0fffffff +#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) + /* Register Base Address ************************************************************/ /* APB1 bus */ @@ -123,7 +126,13 @@ /* Flexible SRAM controller (FSMC) */ -#define STM32_FSMC_BASE 0xa0000000 +#define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */ +#define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */ +#define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ +#define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/ +#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) + +#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */ /* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this * address range diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h index 2fa7056076..f26ccff944 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h @@ -46,11 +46,19 @@ #define STM32_SRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: 512Mb sram block */ #define STM32_PERIPH_BASE 0x40000000 /* 0x40000000-0x5fffffff: 512Mb peripheral block */ #define STM32_FSMC_BASE12 0x60000000 /* 0x60000000-0x7fffffff: 512Mb FSMC bank1&2 block */ +# define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */ +# define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */ #define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */ +# define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ +# define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/ #define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */ /* 0xc0000000-0xdfffffff: 512Mb (not used) */ #define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */ +#define STM32_REGION_MASK 0x0fffffff +#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) +#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) + /* Code Base Addresses **************************************************************/ #define STM32_BOOT_BASE 0x00000000 /* 0x00000000-0x000fffff: Aliased boot memory */ @@ -185,7 +193,7 @@ #define STM32_HASH_BASE 0x50060400 /* 0x50060400-0x500607ff: HASH */ #define STM32_RNG_BASE 0x50060800 /* 0x50060800-0x50060bff: RNG */ -/* Cortex-M4 Base Addresses *********************************************************/ +/* Cortex-M3 Base Addresses *********************************************************/ /* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this * address range */ diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h index c7f7ff2ec3..a7ee8e97cf 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h @@ -46,11 +46,19 @@ #define STM32_SRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: 512Mb sram block */ #define STM32_PERIPH_BASE 0x40000000 /* 0x40000000-0x5fffffff: 512Mb peripheral block */ #define STM32_FSMC_BASE12 0x60000000 /* 0x60000000-0x7fffffff: 512Mb FSMC bank1&2 block */ +# define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */ +# define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */ #define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */ +# define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ +# define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/ #define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */ /* 0xc0000000-0xdfffffff: 512Mb (not used) */ #define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */ +#define STM32_REGION_MASK 0x0fffffff +#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) +#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) + /* Code Base Addresses **************************************************************/ #define STM32_BOOT_BASE 0x00000000 /* 0x00000000-0x000fffff: Aliased boot memory */ diff --git a/nuttx/arch/arm/src/stm32/stm32_sdio.c b/nuttx/arch/arm/src/stm32/stm32_sdio.c index 057a5836fd..236d166df2 100644 --- a/nuttx/arch/arm/src/stm32/stm32_sdio.c +++ b/nuttx/arch/arm/src/stm32/stm32_sdio.c @@ -185,8 +185,12 @@ #if defined(CONFIG_STM32_STM32F10XX) # define SDIO_RXDMA32_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_32BITS|\ DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC) +# define SDIO_RXDMA16_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_16BITS|\ + DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC) # define SDIO_TXDMA32_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_32BITS|\ DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC|DMA_CCR_DIR) +# define SDIO_TXDMA16_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_16BITS|\ + DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC|DMA_CCR_DIR) /* STM32 F4 stream configuration register (SCR) settings. */ @@ -195,10 +199,18 @@ DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_32BITS|\ CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ DMA_SCR_MBURST_INCR4) +# define SDIO_RXDMA16_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_P2M|DMA_SCR_MINC|\ + DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_16BITS|\ + CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ + DMA_SCR_MBURST_INCR4) # define SDIO_TXDMA32_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_M2P|DMA_SCR_MINC|\ DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_32BITS|\ CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ DMA_SCR_MBURST_INCR4) +# define SDIO_TXDMA16_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_M2P|DMA_SCR_MINC|\ + DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_16BITS|\ + CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ + DMA_SCR_MBURST_INCR4) #else # error "Unknown STM32 DMA" #endif @@ -2502,8 +2514,22 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, stm32_configxfrints(priv, SDIO_DMARECV_MASK); putreg32(1, SDIO_DCTRL_DMAEN_BB); - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG); + + /* On-chip SRAM is 32-bits wide. FSMC SRAM is 16-bits wide */ + +#ifdef CONFIG_STM32_FSMC + if (STM32_IS_EXTSRAM(buffer)) + { + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 1) >> 1, SDIO_RXDMA16_CONFIG); + } + else +#endif + { + DEBUGASSERT(STM32_IS_SRAM(buffer)); + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG); + } /* Start the DMA */ @@ -2512,6 +2538,7 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, stm32_sample(priv, SAMPLENDX_AFTER_SETUP); ret = OK; } + return ret; } #endif @@ -2570,8 +2597,21 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, /* Configure the TX DMA */ - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 3) >> 2, SDIO_TXDMA32_CONFIG); + /* On-chip SRAM is 32-bits wide. FSMC SRAM is 16-bits wide */ + +#ifdef CONFIG_STM32_FSMC + if (STM32_IS_EXTSRAM(buffer)) + { + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 1) >> 1, SDIO_TXDMA16_CONFIG); + } + else +#endif + { + DEBUGASSERT(STM32_IS_SRAM(buffer)); + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_TXDMA32_CONFIG); + } stm32_sample(priv, SAMPLENDX_BEFORE_ENABLE); putreg32(1, SDIO_DCTRL_DMAEN_BB); @@ -2587,6 +2627,7 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, ret = OK; } + return ret; } #endif From c50e1660685939173b0c53642b7cd895d0f54104 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 03:06:47 +0000 Subject: [PATCH 04/95] Oops... bits in region mask are inverted git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5083 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h | 2 +- nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h | 2 +- nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h index 843f006135..88eb1ad672 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h @@ -47,7 +47,7 @@ #define STM32_SRAMBB_BASE 0x22000000 #define STM32_PERIPH_BASE 0x40000000 -#define STM32_REGION_MASK 0x0fffffff +#define STM32_REGION_MASK 0xf0000000 #define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) /* Register Base Address ************************************************************/ diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h index f26ccff944..777b9595fe 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_memorymap.h @@ -55,7 +55,7 @@ /* 0xc0000000-0xdfffffff: 512Mb (not used) */ #define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */ -#define STM32_REGION_MASK 0x0fffffff +#define STM32_REGION_MASK 0xf0000000 #define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) #define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h index a7ee8e97cf..6b99121216 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_memorymap.h @@ -55,7 +55,7 @@ /* 0xc0000000-0xdfffffff: 512Mb (not used) */ #define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M4 block */ -#define STM32_REGION_MASK 0x0fffffff +#define STM32_REGION_MASK 0xf0000000 #define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) #define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) From 64e2a8f85c8917b62beb344d06d268d054d2775c Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 12:35:47 +0000 Subject: [PATCH 05/95] Back out the last STM32 SDIO DMA change. It is incorrect git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5084 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 ++ nuttx/arch/arm/src/stm32/stm32_sdio.c | 47 +++------------------------ 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index f1688c4b96..d331601aca 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3254,3 +3254,5 @@ a second, lower priority work queue (CONFIG_SCHED_LPWORK). * arch/arm/src/stm32/stm32_dma.c, chip/stm32*_memorymap.h: FSMC SRAM is only 16-bits wide and the SDIO DMA must be set up differently. + * arch/arm/src/stm32/stm32_dma.c: Back out the 16-bit DMA change. It + is incorrect. diff --git a/nuttx/arch/arm/src/stm32/stm32_sdio.c b/nuttx/arch/arm/src/stm32/stm32_sdio.c index 236d166df2..a8bcae3070 100644 --- a/nuttx/arch/arm/src/stm32/stm32_sdio.c +++ b/nuttx/arch/arm/src/stm32/stm32_sdio.c @@ -185,12 +185,8 @@ #if defined(CONFIG_STM32_STM32F10XX) # define SDIO_RXDMA32_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_32BITS|\ DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC) -# define SDIO_RXDMA16_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_16BITS|\ - DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC) # define SDIO_TXDMA32_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_32BITS|\ DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC|DMA_CCR_DIR) -# define SDIO_TXDMA16_CONFIG (CONFIG_SDIO_DMAPRIO|DMA_CCR_MSIZE_16BITS|\ - DMA_CCR_PSIZE_32BITS|DMA_CCR_MINC|DMA_CCR_DIR) /* STM32 F4 stream configuration register (SCR) settings. */ @@ -199,18 +195,10 @@ DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_32BITS|\ CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ DMA_SCR_MBURST_INCR4) -# define SDIO_RXDMA16_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_P2M|DMA_SCR_MINC|\ - DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_16BITS|\ - CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ - DMA_SCR_MBURST_INCR4) # define SDIO_TXDMA32_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_M2P|DMA_SCR_MINC|\ DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_32BITS|\ CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ DMA_SCR_MBURST_INCR4) -# define SDIO_TXDMA16_CONFIG (DMA_SCR_PFCTRL|DMA_SCR_DIR_M2P|DMA_SCR_MINC|\ - DMA_SCR_PSIZE_32BITS|DMA_SCR_MSIZE_16BITS|\ - CONFIG_SDIO_DMAPRIO|DMA_SCR_PBURST_INCR4|\ - DMA_SCR_MBURST_INCR4) #else # error "Unknown STM32 DMA" #endif @@ -2514,22 +2502,8 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, stm32_configxfrints(priv, SDIO_DMARECV_MASK); putreg32(1, SDIO_DCTRL_DMAEN_BB); - - /* On-chip SRAM is 32-bits wide. FSMC SRAM is 16-bits wide */ - -#ifdef CONFIG_STM32_FSMC - if (STM32_IS_EXTSRAM(buffer)) - { - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 1) >> 1, SDIO_RXDMA16_CONFIG); - } - else -#endif - { - DEBUGASSERT(STM32_IS_SRAM(buffer)); - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG); - } + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG); /* Start the DMA */ @@ -2597,21 +2571,8 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, /* Configure the TX DMA */ - /* On-chip SRAM is 32-bits wide. FSMC SRAM is 16-bits wide */ - -#ifdef CONFIG_STM32_FSMC - if (STM32_IS_EXTSRAM(buffer)) - { - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 1) >> 1, SDIO_TXDMA16_CONFIG); - } - else -#endif - { - DEBUGASSERT(STM32_IS_SRAM(buffer)); - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, - (buflen + 3) >> 2, SDIO_TXDMA32_CONFIG); - } + stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_TXDMA32_CONFIG); stm32_sample(priv, SAMPLENDX_BEFORE_ENABLE); putreg32(1, SDIO_DCTRL_DMAEN_BB); From a32f081a2996f75dcd584ab263be45232844575b Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 14:43:56 +0000 Subject: [PATCH 06/95] Changes to Kconfig and matching defconfig files git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5085 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Kconfig | 4 +- nuttx/arch/arm/src/stm32/Kconfig | 38 ++++++------ nuttx/arch/arm/src/stm32/stm32_lowputc.c | 20 +++--- nuttx/arch/arm/src/stm32/stm32_serial.c | 62 +++++++++---------- nuttx/arch/arm/src/stm32/stm32_uart.h | 44 ++++++------- nuttx/configs/amber/hello/defconfig | 4 +- nuttx/configs/avr32dev1/nsh/defconfig | 6 +- nuttx/configs/avr32dev1/ostest/defconfig | 6 +- nuttx/configs/c5471evm/httpd/defconfig | 6 +- nuttx/configs/c5471evm/nettest/defconfig | 6 +- nuttx/configs/c5471evm/nsh/defconfig | 6 +- nuttx/configs/c5471evm/ostest/defconfig | 6 +- .../configs/compal_e88/nsh_highram/defconfig | 6 +- .../compal_e99/nsh_compalram/defconfig | 6 +- .../configs/compal_e99/nsh_highram/defconfig | 6 +- nuttx/configs/demo9s12ne64/ostest/defconfig | 6 +- nuttx/configs/ea3131/nsh/defconfig | 4 +- nuttx/configs/ea3131/ostest/defconfig | 4 +- nuttx/configs/ea3131/pgnsh/defconfig | 4 +- nuttx/configs/ea3131/usbserial/defconfig | 4 +- nuttx/configs/ea3131/usbstorage/defconfig | 4 +- nuttx/configs/ea3152/ostest/defconfig | 4 +- nuttx/configs/eagle100/httpd/defconfig | 6 +- nuttx/configs/eagle100/nettest/defconfig | 6 +- nuttx/configs/eagle100/nsh/defconfig | 6 +- nuttx/configs/eagle100/nxflat/defconfig | 6 +- nuttx/configs/eagle100/ostest/defconfig | 6 +- nuttx/configs/eagle100/thttpd/defconfig | 6 +- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 8 +-- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 8 +-- .../configs/ez80f910200kitg/ostest/defconfig | 4 +- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 4 +- nuttx/configs/ez80f910200zco/httpd/defconfig | 4 +- .../configs/ez80f910200zco/nettest/defconfig | 4 +- nuttx/configs/ez80f910200zco/nsh/defconfig | 4 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 4 +- nuttx/configs/ez80f910200zco/poll/defconfig | 4 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 36 +++++------ nuttx/configs/hymini-stm32v/nsh/defconfig | 36 +++++------ nuttx/configs/hymini-stm32v/nsh2/defconfig | 36 +++++------ nuttx/configs/hymini-stm32v/nx/defconfig | 36 +++++------ nuttx/configs/hymini-stm32v/nxlines/defconfig | 36 +++++------ .../configs/hymini-stm32v/usbserial/defconfig | 36 +++++------ .../hymini-stm32v/usbstorage/defconfig | 36 +++++------ nuttx/configs/lincoln60/nsh/defconfig | 8 +-- nuttx/configs/lincoln60/ostest/defconfig | 8 +-- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 8 +-- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 8 +-- nuttx/configs/lm3s6965-ek/nsh/defconfig | 8 +-- nuttx/configs/lm3s6965-ek/nx/defconfig | 8 +-- nuttx/configs/lm3s6965-ek/ostest/defconfig | 8 +-- nuttx/configs/lm3s8962-ek/nsh/defconfig | 8 +-- nuttx/configs/lm3s8962-ek/nx/defconfig | 8 +-- nuttx/configs/lm3s8962-ek/ostest/defconfig | 8 +-- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 8 +-- .../configs/lpc4330-xplorer/ostest/defconfig | 8 +-- .../lpcxpresso-lpc1768/dhcpd/defconfig | 8 +-- .../configs/lpcxpresso-lpc1768/nsh/defconfig | 8 +-- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 8 +-- .../lpcxpresso-lpc1768/ostest/defconfig | 8 +-- .../lpcxpresso-lpc1768/thttpd/defconfig | 8 +-- .../lpcxpresso-lpc1768/usbstorage/defconfig | 8 +-- nuttx/configs/m68332evb/defconfig | 6 +- nuttx/configs/mbed/hidkbd/defconfig | 8 +-- nuttx/configs/mbed/nsh/defconfig | 8 +-- .../mcu123-lpc214x/composite/defconfig | 6 +- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 6 +- nuttx/configs/mcu123-lpc214x/ostest/defconfig | 6 +- .../mcu123-lpc214x/usbserial/defconfig | 6 +- .../mcu123-lpc214x/usbstorage/defconfig | 6 +- nuttx/configs/micropendous3/hello/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 4 +- nuttx/configs/mirtoo/nxffs/defconfig | 4 +- nuttx/configs/mirtoo/ostest/defconfig | 4 +- nuttx/configs/mx1ads/ostest/defconfig | 8 +-- nuttx/configs/ne64badge/ostest/defconfig | 6 +- nuttx/configs/ntosd-dm320/nettest/defconfig | 6 +- nuttx/configs/ntosd-dm320/nsh/defconfig | 6 +- nuttx/configs/ntosd-dm320/ostest/defconfig | 6 +- nuttx/configs/ntosd-dm320/poll/defconfig | 6 +- nuttx/configs/ntosd-dm320/thttpd/defconfig | 6 +- nuttx/configs/ntosd-dm320/udp/defconfig | 6 +- nuttx/configs/ntosd-dm320/uip/defconfig | 6 +- nuttx/configs/nucleus2g/nsh/defconfig | 8 +-- nuttx/configs/nucleus2g/ostest/defconfig | 8 +-- nuttx/configs/nucleus2g/usbserial/defconfig | 8 +-- nuttx/configs/nucleus2g/usbstorage/defconfig | 8 +-- .../configs/olimex-lpc1766stk/ftpc/defconfig | 8 +-- .../olimex-lpc1766stk/hidkbd/defconfig | 8 +-- .../olimex-lpc1766stk/nettest/defconfig | 8 +-- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 8 +-- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 8 +-- .../olimex-lpc1766stk/ostest/defconfig | 8 +-- .../olimex-lpc1766stk/slip-httpd/defconfig | 8 +-- .../olimex-lpc1766stk/thttpd/defconfig | 8 +-- .../olimex-lpc1766stk/usbserial/defconfig | 8 +-- .../olimex-lpc1766stk/usbstorage/defconfig | 8 +-- .../configs/olimex-lpc1766stk/wlan/defconfig | 8 +-- nuttx/configs/olimex-lpc2378/nsh/defconfig | 6 +- nuttx/configs/olimex-lpc2378/ostest/defconfig | 6 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 36 +++++------ .../olimex-stm32-p107/ostest/defconfig | 36 +++++------ .../configs/olimex-strp711/nettest/defconfig | 10 +-- nuttx/configs/olimex-strp711/nsh/defconfig | 10 +-- nuttx/configs/olimex-strp711/ostest/defconfig | 10 +-- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 4 +- .../configs/pcblogic-pic32mx/ostest/defconfig | 4 +- nuttx/configs/pic32-starterkit/nsh/defconfig | 12 ++-- nuttx/configs/pic32-starterkit/nsh2/defconfig | 12 ++-- .../configs/pic32-starterkit/ostest/defconfig | 12 ++-- nuttx/configs/pic32mx7mmb/nsh/defconfig | 12 ++-- nuttx/configs/pic32mx7mmb/ostest/defconfig | 12 ++-- nuttx/configs/qemu-i486/nsh/defconfig | 10 +-- nuttx/configs/qemu-i486/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 12 ++-- nuttx/configs/sam3u-ek/nsh/defconfig | 12 ++-- nuttx/configs/sam3u-ek/nx/defconfig | 12 ++-- nuttx/configs/sam3u-ek/ostest/defconfig | 12 ++-- nuttx/configs/sam3u-ek/touchscreen/defconfig | 12 ++-- nuttx/configs/skp16c26/ostest/defconfig | 8 +-- nuttx/configs/stm3210e-eval/RIDE/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/buttons/defconfig | 36 +++++------ .../configs/stm3210e-eval/composite/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/nsh/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/nsh2/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/nx/defconfig | 36 +++++------ .../configs/stm3210e-eval/nxconsole/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/nxlines/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/nxtext/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/ostest/defconfig | 36 +++++------ nuttx/configs/stm3210e-eval/pm/defconfig | 36 +++++------ .../configs/stm3210e-eval/usbserial/defconfig | 36 +++++------ .../stm3210e-eval/usbstorage/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/dhcpd/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/nettest/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/nsh/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/nsh2/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/nxwm/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/ostest/defconfig | 36 +++++------ nuttx/configs/stm3220g-eval/telnetd/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/dhcpd/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/nettest/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/nsh/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/nsh2/defconfig | 36 +++++------ .../configs/stm3240g-eval/nxconsole/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/nxwm/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/ostest/defconfig | 36 +++++------ nuttx/configs/stm3240g-eval/telnetd/defconfig | 36 +++++------ .../configs/stm3240g-eval/webserver/defconfig | 36 +++++------ nuttx/configs/stm32f4discovery/nsh/defconfig | 36 +++++------ .../stm32f4discovery/nxlines/defconfig | 36 +++++------ .../configs/stm32f4discovery/ostest/defconfig | 36 +++++------ nuttx/configs/stm32f4discovery/pm/defconfig | 36 +++++------ nuttx/configs/sure-pic32mx/nsh/defconfig | 4 +- nuttx/configs/sure-pic32mx/ostest/defconfig | 4 +- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 4 +- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/nsh/defconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/ubw32/nsh/defconfig | 4 +- nuttx/configs/ubw32/ostest/defconfig | 4 +- nuttx/configs/us7032evb1/nsh/defconfig | 6 +- nuttx/configs/us7032evb1/ostest/defconfig | 6 +- nuttx/configs/vsn/nsh/defconfig | 36 +++++------ .../configs/z16f2800100zcog/ostest/defconfig | 4 +- .../z16f2800100zcog/pashello/defconfig | 4 +- nuttx/configs/z8encore000zco/ostest/defconfig | 4 +- nuttx/configs/z8f64200100kit/ostest/defconfig | 4 +- nuttx/sched/Kconfig | 4 +- 171 files changed, 1261 insertions(+), 1261 deletions(-) diff --git a/nuttx/Kconfig b/nuttx/Kconfig index 7a8ba9bf28..7c85401c44 100644 --- a/nuttx/Kconfig +++ b/nuttx/Kconfig @@ -16,7 +16,7 @@ config NUTTX_NEWCONFIG bool default y -menu "General Setup" +menu "Build Setup" config EXPERIMENTAL bool "Prompt for development and/or incomplete code/drivers" @@ -258,7 +258,7 @@ menu "Board Selection" source "configs/Kconfig" endmenu -menu "Kernel Features" +menu "RTOS Features" source sched/Kconfig endmenu diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index bf7c59c11a..c3130864cb 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -1591,52 +1591,52 @@ endmenu menu "UART4 Configuration" depends on STM32_UART4 -config USART4_SERIAL_CONSOLE +config UART4_SERIAL_CONSOLE bool "UART4 serial console" default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 ---help--- Selects the UART4 for the console and ttys0 (default is the USART1). -config USART4_RXBUFSIZE +config UART4_RXBUFSIZE int "UART4 Rx buffer size" default 256 ---help--- Characters are buffered as received. This specific the size of the receive buffer. -config USART4_TXBUFSIZE +config UART4_TXBUFSIZE int "UART4 Tx buffer size" default 256 ---help--- Characters are buffered before being sent. This specific the size of the transmit buffer -config USART4_BAUD +config UART4_BAUD int "UART4 BAUD" default 11520 ---help--- The configured BAUD of the UART -config USART4_BITS +config UART4_BITS int "UART4 number of bits" default 8 ---help--- The number of bits. Must be either 7 or 8. -config USART4_PARITY +config UART4_PARITY int "UART4 parity" default 0 ---help--- 0=no parity, 1=odd parity, 2=even parity -config USART4_2STOP +config UART4_2STOP bool "UART4 two stop bits" default n ---help--- Two stop bits -config USART4_RXDMA - bool "USART4 Rx DMA" +config UART4_RXDMA + bool "UART4 Rx DMA" default n depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 ---help--- @@ -1647,52 +1647,52 @@ endmenu menu "UART5 Configuration" depends on STM32_UART5 -config USART5_SERIAL_CONSOLE +config UART5_SERIAL_CONSOLE bool "UART5 serial console" default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4 ---help--- Selects the UART5 for the console and ttys0 (default is the USART1). -config USART5_RXBUFSIZE - int "USART5 Rx buffer size" +config UART5_RXBUFSIZE + int "UART5 Rx buffer size" default 256 ---help--- Characters are buffered as received. This specific the size of the receive buffer. -config USART5_TXBUFSIZE +config UART5_TXBUFSIZE int "UART5 Tx buffer size" default 256 ---help--- Characters are buffered before being sent. This specific the size of the transmit buffer -config USART5_BAUD +config UART5_BAUD int "UART5 BAUD" default 11520 ---help--- The configured BAUD of the UART -config USART5_BITS +config UART5_BITS int "UART5 number of bits" default 8 ---help--- The number of bits. Must be either 7 or 8. -config USART5_PARITY +config UART5_PARITY int "UART5 parity" default 0 ---help--- 0=no parity, 1=odd parity, 2=even parity -config USART5_2STOP +config UART5_2STOP bool "UART5 two stop bits" default n ---help--- Two stop bits -config USART5_RXDMA - bool "USART5 Rx DMA" +config UART5_RXDMA + bool "UART5 Rx DMA" default n depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 ---help--- diff --git a/nuttx/arch/arm/src/stm32/stm32_lowputc.c b/nuttx/arch/arm/src/stm32/stm32_lowputc.c index 14f4efae46..7f72056729 100644 --- a/nuttx/arch/arm/src/stm32/stm32_lowputc.c +++ b/nuttx/arch/arm/src/stm32/stm32_lowputc.c @@ -85,22 +85,22 @@ # define STM32_CONSOLE_2STOP CONFIG_USART3_2STOP # define STM32_CONSOLE_TX GPIO_USART3_TX # define STM32_CONSOLE_RX GPIO_USART3_RX -#elif defined(CONFIG_USART4_SERIAL_CONSOLE) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) # define STM32_CONSOLE_BASE STM32_UART4_BASE # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY -# define STM32_CONSOLE_BAUD CONFIG_USART4_BAUD -# define STM32_CONSOLE_BITS CONFIG_USART4_BITS -# define STM32_CONSOLE_PARITY CONFIG_USART4_PARITY -# define STM32_CONSOLE_2STOP CONFIG_USART4_2STOP +# define STM32_CONSOLE_BAUD CONFIG_UART4_BAUD +# define STM32_CONSOLE_BITS CONFIG_UART4_BITS +# define STM32_CONSOLE_PARITY CONFIG_UART4_PARITY +# define STM32_CONSOLE_2STOP CONFIG_UART4_2STOP # define STM32_CONSOLE_TX GPIO_UART4_TX # define STM32_CONSOLE_RX GPIO_UART4_RX -#elif defined(CONFIG_USART5_SERIAL_CONSOLE) +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) # define STM32_CONSOLE_BASE STM32_UART5_BASE # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY -# define STM32_CONSOLE_BAUD CONFIG_USART5_BAUD -# define STM32_CONSOLE_BITS CONFIG_USART5_BITS -# define STM32_CONSOLE_PARITY CONFIG_USART5_PARITY -# define STM32_CONSOLE_2STOP CONFIG_USART5_2STOP +# define STM32_CONSOLE_BAUD CONFIG_UART5_BAUD +# define STM32_CONSOLE_BITS CONFIG_UART5_BITS +# define STM32_CONSOLE_PARITY CONFIG_UART5_PARITY +# define STM32_CONSOLE_2STOP CONFIG_UART5_2STOP # define STM32_CONSOLE_TX GPIO_UART5_TX # define STM32_CONSOLE_RX GPIO_UART5_RX #elif defined(CONFIG_USART6_SERIAL_CONSOLE) diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index 265abfbf35..b90e4ee976 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -90,7 +90,7 @@ # endif # if defined(CONFIG_USART2_RXDMA) || defined(CONFIG_USART3_RXDMA) || \ - defined(CONFIG_USART4_RXDMA) || defined(CONFIG_USART5_RXDMA) + defined(CONFIG_UART4_RXDMA) || defined(CONFIG_UART5_RXDMA) # ifndef CONFIG_STM32_DMA1 # error STM32 USART2/3/4/5 receive DMA requires CONFIG_STM32_DMA1 # endif @@ -113,11 +113,11 @@ # error "USART3 DMA channel not defined (DMAMAP_USART3_RX)" # endif -# if defined(CONFIG_USART4_RXDMA) && !defined(DMAMAP_UART4_RX) +# if defined(CONFIG_UART4_RXDMA) && !defined(DMAMAP_UART4_RX) # error "UART4 DMA channel not defined (DMAMAP_UART4_RX)" # endif -# if defined(CONFIG_USART5_RXDMA) && !defined(DMAMAP_UART5_RX) +# if defined(CONFIG_UART5_RXDMA) && !defined(DMAMAP_UART5_RX) # error "UART5 DMA channel not defined (DMAMAP_UART5_RX)" # endif @@ -338,17 +338,17 @@ static char g_usart3rxfifo[RXDMA_BUFFER_SIZE]; #endif #ifdef CONFIG_STM32_UART4 -static char g_uart4rxbuffer[CONFIG_USART4_RXBUFSIZE]; -static char g_uart4txbuffer[CONFIG_USART4_TXBUFSIZE]; -# ifdef CONFIG_USART4_RXDMA +static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE]; +static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE]; +# ifdef CONFIG_UART4_RXDMA static char g_uart4rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif #ifdef CONFIG_STM32_UART5 -static char g_uart5rxbuffer[CONFIG_USART5_RXBUFSIZE]; -static char g_uart5txbuffer[CONFIG_USART5_TXBUFSIZE]; -# ifdef CONFIG_USART5_RXDMA +static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE]; +static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE]; +# ifdef CONFIG_UART5_RXDMA static char g_uart5rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif @@ -526,15 +526,15 @@ static struct up_dev_s g_uart4priv = #endif .recv = { - .size = CONFIG_USART4_RXBUFSIZE, + .size = CONFIG_UART4_RXBUFSIZE, .buffer = g_uart4rxbuffer, }, .xmit = { - .size = CONFIG_USART4_TXBUFSIZE, + .size = CONFIG_UART4_TXBUFSIZE, .buffer = g_uart4txbuffer, }, -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA .ops = &g_uart_dma_ops, #else .ops = &g_uart_ops, @@ -543,21 +543,21 @@ static struct up_dev_s g_uart4priv = }, .irq = STM32_IRQ_UART4, - .parity = CONFIG_USART4_PARITY, - .bits = CONFIG_USART4_BITS, - .stopbits2 = CONFIG_USART4_2STOP, - .baud = CONFIG_USART4_BAUD, + .parity = CONFIG_UART4_PARITY, + .bits = CONFIG_UART4_BITS, + .stopbits2 = CONFIG_UART4_2STOP, + .baud = CONFIG_UART4_BAUD, .apbclock = STM32_PCLK1_FREQUENCY, .usartbase = STM32_UART4_BASE, .tx_gpio = GPIO_UART4_TX, .rx_gpio = GPIO_UART4_RX, -#ifdef GPIO_USART4_CTS +#ifdef GPIO_UART4_CTS .cts_gpio = GPIO_UART4_CTS, #endif -#ifdef GPIO_USART4_RTS +#ifdef GPIO_UART4_RTS .rts_gpio = GPIO_UART4_RTS, #endif -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA .rxdma_channel = DMAMAP_UART4_RX, .rxfifo = g_uart4rxfifo, #endif @@ -577,15 +577,15 @@ static struct up_dev_s g_uart5priv = #endif .recv = { - .size = CONFIG_USART5_RXBUFSIZE, + .size = CONFIG_UART5_RXBUFSIZE, .buffer = g_uart5rxbuffer, }, .xmit = { - .size = CONFIG_USART5_TXBUFSIZE, + .size = CONFIG_UART5_TXBUFSIZE, .buffer = g_uart5txbuffer, }, -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA .ops = &g_uart_dma_ops, #else .ops = &g_uart_ops, @@ -594,21 +594,21 @@ static struct up_dev_s g_uart5priv = }, .irq = STM32_IRQ_UART5, - .parity = CONFIG_USART5_PARITY, - .bits = CONFIG_USART5_BITS, - .stopbits2 = CONFIG_USART5_2STOP, - .baud = CONFIG_USART5_BAUD, + .parity = CONFIG_UART5_PARITY, + .bits = CONFIG_UART5_BITS, + .stopbits2 = CONFIG_UART5_2STOP, + .baud = CONFIG_UART5_BAUD, .apbclock = STM32_PCLK1_FREQUENCY, .usartbase = STM32_UART5_BASE, .tx_gpio = GPIO_UART5_TX, .rx_gpio = GPIO_UART5_RX, -#ifdef GPIO_USART5_CTS +#ifdef GPIO_UART5_CTS .cts_gpio = GPIO_UART5_CTS, #endif -#ifdef GPIO_USART5_RTS +#ifdef GPIO_UART5_RTS .rts_gpio = GPIO_UART5_RTS, #endif -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA .rxdma_channel = DMAMAP_UART5_RX, .rxfifo = g_uart5rxfifo, #endif @@ -1898,14 +1898,14 @@ void stm32_serial_dma_poll(void) } #endif -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA if (g_uart4priv.rxdma != NULL) { up_dma_rxcallback(g_uart4priv.rxdma, 0, &g_uart4priv); } #endif -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA if (g_uart5priv.rxdma != NULL) { up_dma_rxcallback(g_uart5priv.rxdma, 0, &g_uart5priv); diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h index 42fe9e346b..f51265b18f 100644 --- a/nuttx/arch/arm/src/stm32/stm32_uart.h +++ b/nuttx/arch/arm/src/stm32/stm32_uart.h @@ -84,40 +84,40 @@ #if defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART1) # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 1 # define HAVE_CONSOLE 1 #elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART2) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 2 # define HAVE_CONSOLE 1 #elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART3) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 3 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 4 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5) +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 5 # define HAVE_CONSOLE 1 @@ -125,16 +125,16 @@ # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # define CONSOLE_UART 6 # define HAVE_CONSOLE 1 #else # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 0 # undef HAVE_CONSOLE @@ -149,8 +149,8 @@ # undef CONFIG_USART1_RXDMA # undef CONFIG_USART2_RXDMA # undef CONFIG_USART3_RXDMA -# undef CONFIG_USART4_RXDMA -# undef CONFIG_USART5_RXDMA +# undef CONFIG_UART4_RXDMA +# undef CONFIG_UART5_RXDMA # undef CONFIG_USART6_RXDMA #endif @@ -169,11 +169,11 @@ #endif #ifndef CONFIG_STM32_UART4 -# undef CONFIG_USART4_RXDMA +# undef CONFIG_UART4_RXDMA #endif #ifndef CONFIG_STM32_UART5 -# undef CONFIG_USART5_RXDMA +# undef CONFIG_UART5_RXDMA #endif #ifndef CONFIG_STM32_USART6 @@ -184,8 +184,8 @@ #undef SERIAL_HAVE_DMA #if defined(CONFIG_USART1_RXDMA) || defined(CONFIG_USART2_RXDMA) || \ - defined(CONFIG_USART3_RXDMA) || defined(CONFIG_USART4_RXDMA) || \ - defined(CONFIG_USART5_RXDMA) || defined(CONFIG_USART6_RXDMA) + defined(CONFIG_USART3_RXDMA) || defined(CONFIG_UART4_RXDMA) || \ + defined(CONFIG_UART5_RXDMA) || defined(CONFIG_USART6_RXDMA) # define SERIAL_HAVE_DMA 1 #endif @@ -198,9 +198,9 @@ # undef SERIAL_HAVE_ONLY_DMA #elif defined(CONFIG_STM32_USART3) && !defined(CONFIG_USART3_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART4) && !defined(CONFIG_USART4_RXDMA) +#elif defined(CONFIG_STM32_UART4) && !defined(CONFIG_UART4_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART5) && !defined(CONFIG_USART5_RXDMA) +#elif defined(CONFIG_STM32_UART5) && !defined(CONFIG_UART5_RXDMA) # undef SERIAL_HAVE_ONLY_DMA #elif defined(CONFIG_STM32_USART6) && !defined(CONFIG_USART6_RXDMA) # undef SERIAL_HAVE_ONLY_DMA diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index a6b5728252..55b37bd9b8 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -93,7 +93,7 @@ CONFIG_USART0_RXBUFSIZE=256 CONFIG_USART0_BAUD=38400 CONFIG_USART0_BITS=8 CONFIG_USART0_PARITY=0 -CONFIG_USART0_2STOP=0 +CONFIG_USART0_2STOP=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 @@ -101,7 +101,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 +CONFIG_USART1_2STOP=n # # General build options diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index dbb562eaef..bffd38f3d6 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -125,9 +125,9 @@ CONFIG_USART0_PARITY=0 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n # # General build options diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 6d5aa4d08c..b022b25a37 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -125,9 +125,9 @@ CONFIG_USART0_PARITY=0 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n # # General build options diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig index 6c48506e60..1b3298f93b 100644 --- a/nuttx/configs/c5471evm/httpd/defconfig +++ b/nuttx/configs/c5471evm/httpd/defconfig @@ -49,7 +49,7 @@ CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x11000000 +CONFIG_DRAM_SIZE=285212672 # # C5471 specific device driver settings @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig index ac1677b8fc..8bf39e9d1d 100644 --- a/nuttx/configs/c5471evm/nettest/defconfig +++ b/nuttx/configs/c5471evm/nettest/defconfig @@ -49,7 +49,7 @@ CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x11000000 +CONFIG_DRAM_SIZE=285212672 # # General build options @@ -75,8 +75,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig index 88db3508e8..d952f9415f 100644 --- a/nuttx/configs/c5471evm/nsh/defconfig +++ b/nuttx/configs/c5471evm/nsh/defconfig @@ -49,7 +49,7 @@ CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x11000000 +CONFIG_DRAM_SIZE=285212672 # # C5471 specific device driver settings @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig index 26ea842647..56bd14bc74 100644 --- a/nuttx/configs/c5471evm/ostest/defconfig +++ b/nuttx/configs/c5471evm/ostest/defconfig @@ -49,7 +49,7 @@ CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x11000000 +CONFIG_DRAM_SIZE=285212672 # # C5471 specific device driver settings @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/compal_e88/nsh_highram/defconfig b/nuttx/configs/compal_e88/nsh_highram/defconfig index f1882aff68..a4660ccdab 100644 --- a/nuttx/configs/compal_e88/nsh_highram/defconfig +++ b/nuttx/configs/compal_e88/nsh_highram/defconfig @@ -49,7 +49,7 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x00840000 +CONFIG_DRAM_SIZE=8650752 # # C5471 specific device driver settings @@ -68,8 +68,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/compal_e99/nsh_compalram/defconfig b/nuttx/configs/compal_e99/nsh_compalram/defconfig index d06f685ee8..4fa607b37f 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/defconfig +++ b/nuttx/configs/compal_e99/nsh_compalram/defconfig @@ -52,7 +52,7 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x00840000 +CONFIG_DRAM_SIZE=8650752 # # C5471 specific device driver settings @@ -71,8 +71,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig index c221b4e55d..7526569754 100644 --- a/nuttx/configs/compal_e99/nsh_highram/defconfig +++ b/nuttx/configs/compal_e99/nsh_highram/defconfig @@ -52,7 +52,7 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0 -CONFIG_DRAM_SIZE=0x00840000 +CONFIG_DRAM_SIZE=8650752 # # C5471 specific device driver settings @@ -71,8 +71,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_MODEM_2STOP=0 +CONFIG_UART_IRDA_2STOP=n +CONFIG_UART_MODEM_2STOP=n CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index fb2b85d0eb..68976ae8c9 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_MCS92S12NEC64=y CONFIG_ARCH_BOARD="demo9s12ne64" CONFIG_ARCH_BOARD_DEMOS92S12NEC64=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n @@ -77,7 +77,7 @@ CONFIG_SCI0_RXBUFSIZE=32 CONFIG_SCI0_BAUD=115200 CONFIG_SCI0_BITS=8 CONFIG_SCI0_PARITY=0 -CONFIG_SCI0_2STOP=0 +CONFIG_SCI0_2STOP=n CONFIG_SCI1_SERIAL_CONSOLE=n CONFIG_SCI1_TXBUFSIZE=32 @@ -85,7 +85,7 @@ CONFIG_SCI1_RXBUFSIZE=32 CONFIG_SCI1_BAUD=115200 CONFIG_SCI1_BITS=8 CONFIG_SCI1_PARITY=0 -CONFIG_SCI1_2STOP=0 +CONFIG_SCI1_2STOP=n # # MC9S12NEC64 specific SSI device driver settings diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 0f26f02b09..4025ce9000 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # General build options diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 7bf95899f2..5581e2e88f 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # General build options diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index 8bb50a4a40..e609f35e65 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # MP25x Configuration diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 13adb17ef7..017be2404e 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # General build options diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index a350502d24..3a04eab372 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # General build options diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index b239db331e..a86ba4bf94 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LPC3152=y CONFIG_ARCH_BOARD="ea3152" CONFIG_ARCH_BOARD_EA3152=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=0 +CONFIG_UART_2STOP=n # # General build options diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index 8c0c4516ea..a0959b0769 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index e0aa45e2f3..261b2dafec 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index 9eedda0a9a..e5d3608bb8 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index fc5e6a2305..10ee50c440 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index 008b23a455..afccba390b 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index 5201bca781..e7b91bc6f9 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_BOARD="eagle100" CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index 6d24f5ac9e..4d9c1c1783 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_CHIP_LM3S9B96=y CONFIG_ARCH_BOARD="ekk-lm3s9b96" CONFIG_ARCH_BOARD_EKKLM3S9B96=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00018000 +CONFIG_DRAM_SIZE=98304 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -99,9 +99,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6B96 specific SSI device driver settings diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index 7de2f33ead..daced73603 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_CHIP_LM3S9B96=y CONFIG_ARCH_BOARD="ekk-lm3s9b96" CONFIG_ARCH_BOARD_EKKLM3S9B96=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00018000 +CONFIG_DRAM_SIZE=98304 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -99,9 +99,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6B96 specific SSI device driver settings diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 5947962bc1..3ecc95f4b4 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -68,8 +68,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index 64591ad509..c75c62a5ad 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index bc8c3bb65f..4c477713a1 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index 0a87a96e24..4b64856350 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index 4066d0ea7d..a4fc9cfb0a 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 11bba8dcff..1a375c1ed1 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -70,8 +70,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index 8ac0dde327..97f8a64336 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # ez80 EMAC diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index fe9629ee46..335d97fa8a 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103VCT6=y CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -116,44 +116,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index 881e582102..fa0b79e2f5 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103VCT6=y CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -114,44 +114,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index d309248453..a0c6145699 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103VCT6=y CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -119,44 +119,44 @@ CONFIG_STM32_TIM3_PARTIAL_REMAP=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index 16940a2a85..0e05696cea 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103VCT6=y CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -114,44 +114,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index 9ce18314a5..efb37bd3a0 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -118,44 +118,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 285fefd9cd..1b96eb9c6d 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -116,44 +116,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 129a045c4e..0ce6086919 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="hymini-stm32v" CONFIG_ARCH_BOARD_HYMINI_STM32V=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x0000C000 +CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -115,44 +115,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index 907a86291a..4bf6b0bb9e 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 6d2ad64b78..b713cb0a22 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index bc8f56ba69..42f44f7447 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6432=y CONFIG_ARCH_BOARD="lm3s6432-s2e" CONFIG_ARCH_BOARD_LM3S6432S2E=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6432 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index 78934fbb2c..408c01c4c8 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6432=y CONFIG_ARCH_BOARD="lm3s6432-s2e" CONFIG_ARCH_BOARD_LM3S6432S2E=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6432 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 46df76a3c5..58cfb2b045 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index bad0fe348d..d4482f6cc6 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 7346d33893..f44187174c 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index bc094bcc6f..47a54d81ca 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S8962=y CONFIG_ARCH_BOARD="lm3s8962-ek" CONFIG_ARCH_BOARD_LM3S8962EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index 6086e264b7..e61d7cb0e9 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S8962=y CONFIG_ARCH_BOARD="lm3s8962-ek" CONFIG_ARCH_BOARD_LM3S8962EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index 2ab5688788..44bcd00032 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_LM3S8962=y CONFIG_ARCH_BOARD="lm3s8962-ek" CONFIG_ARCH_BOARD_LM3S8962EK=y CONFIG_BOARD_LOOPSPERMSEC=4531 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index db3474a4a6..9169cd29bf 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -157,10 +157,10 @@ CONFIG_UART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_USART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # CONFIG_USART0_RS485MODE=n diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 40af52c5a9..520dc23cff 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -155,10 +155,10 @@ CONFIG_UART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_USART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # CONFIG_USART0_RS485MODE=n diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 681744b6e0..7b6ce7ff2a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index 718e071314..c9090cbb83 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index 839eb2c9af..2c6da96610 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index da6da59483..b000e69d72 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 8150d89f68..538ecb881b 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 8d0f34b44f..ffe545f6da 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index 79033bcd2f..e652747d6d 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -40,7 +40,7 @@ CONFIG_ARCH_M68332=y CONFIG_ARCH_M68332EVB=y CONFIG_ARCH_BOARD="m68332evb" CONFIG_ARCH_BOARD_M68332EVB=y -CONFIG_DRAM_SIZE=0x003000 +CONFIG_DRAM_SIZE=12288 CONFIG_ARCH_STACKDUMP=y # @@ -58,8 +58,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index 4d0a0b0d59..80511aabbf 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index 0d40702939..96f4454bfa 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig index eae7dc791f..b73737adc8 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/defconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="mcu123-lpc214x" CONFIG_ARCH_BOARD_MCU123=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index 62b870f727..5589c5639d 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="mcu123-lpc214x" CONFIG_ARCH_BOARD_MCU123=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index 0a416b7f74..af801923a4 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="mcu123-lpc214x" CONFIG_ARCH_BOARD_MCU123=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig index 0749c7834a..b77aba3991 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="mcu123-lpc214x" CONFIG_ARCH_BOARD_MCU123=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig index 4b0ce174d7..d655829ddc 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="mcu123-lpc214x" CONFIG_ARCH_BOARD_MCU123=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index a76093424f..9a43c5fcaf 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 +CONFIG_USART1_2STOP=n # # General build options diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index 0ee9cc34e1..76cda2488d 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -153,8 +153,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index a9dce182b9..616f882cd3 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -153,8 +153,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index e830aefa06..96eaeb25cc 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index 6680246936..30b5fe8681 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_IMX1=y CONFIG_ARCH_BOARD="mx1ads" CONFIG_ARCH_BOARD_MX1ADS=y CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x01000000 +CONFIG_DRAM_SIZE=16777216 CONFIG_DRAM_START=0x08000000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_DRAM_NUTTXENTRY=0x01004000 @@ -80,9 +80,9 @@ CONFIG_UART3_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # IMX specific SPI device driver settings diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 709467d830..bbf41583fa 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_MCS92S12NEC64=y CONFIG_ARCH_BOARD="ne64badge" CONFIG_ARCH_BOARD_NE64BADGE=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n @@ -83,7 +83,7 @@ CONFIG_SCI0_RXBUFSIZE=32 CONFIG_SCI0_BAUD=38400 CONFIG_SCI0_BITS=8 CONFIG_SCI0_PARITY=0 -CONFIG_SCI0_2STOP=0 +CONFIG_SCI0_2STOP=n CONFIG_SCI1_SERIAL_CONSOLE=n CONFIG_SCI1_TXBUFSIZE=32 @@ -91,7 +91,7 @@ CONFIG_SCI1_RXBUFSIZE=32 CONFIG_SCI1_BAUD=38400 CONFIG_SCI1_BITS=8 CONFIG_SCI1_PARITY=0 -CONFIG_SCI1_2STOP=0 +CONFIG_SCI1_2STOP=n # # MC9S12NEC64 specific SSI device driver settings diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index ce80f13cb4..fbab35a7ab 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index b6116fb2cc..436d324f99 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -78,8 +78,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index 3f59be6369..aa4449b0a3 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig index ba70d32445..f004093e49 100644 --- a/nuttx/configs/ntosd-dm320/poll/defconfig +++ b/nuttx/configs/ntosd-dm320/poll/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index 27b0097b92..f0749ba2ff 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index e1174a13c9..e88fedcd5b 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig index 63e21a93e8..9c5f0f0d1c 100644 --- a/nuttx/configs/ntosd-dm320/uip/defconfig +++ b/nuttx/configs/ntosd-dm320/uip/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="ntosd-dm320" CONFIG_ARCH_BOARD_NTOSD_DM320=y CONFIG_ARCH_NTOSD_DEVBOARD=n CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_DRAM_SIZE=0x02000000 +CONFIG_DRAM_SIZE=33554432 CONFIG_DRAM_START=0x01100000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_ARCH_INTERRUPTSTACK=0 @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index d846e9a0d7..afb2f8854a 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 194c5d817b..71254a7b07 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index d3c8bc7dc7..08d5c46bbe 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 2f1f6a3698..469c6faa24 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index c11d40999e..95b6cdc7e1 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index ce40fc25dc..5989708e20 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 7c0046b857..cf1c642bf6 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 9bc96d1bec..ce73f6b1a0 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 4096713778..986e08ada4 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index f7b701cc3c..68793fcceb 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index 6eb34db144..c358fef59e 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -136,10 +136,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index 9690f800f0..bd8fd19c23 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index ed41b08d0f..0fe27df980 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index b01e79a5d4..caf2e37722 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index a0e5da662d..02847d6b4c 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index 5424927158..2615f35a93 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -50,7 +50,7 @@ CONFIG_ARCH_BOARD_OLIMEXLPC2378=y CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK= CONFIG_ARCH_STACKDUMP=y @@ -101,8 +101,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART2_PARITY=0 # 2 Stop Bits ? -CONFIG_UART0_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index ef883dfaab..7e0b862f02 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -50,7 +50,7 @@ CONFIG_ARCH_BOARD_OLIMEXLPC2378=y CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 CONFIG_ARCH_INTERRUPTSTACK= CONFIG_ARCH_STACKDUMP=y @@ -101,8 +101,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART2_PARITY=0 # 2 Stop Bits ? -CONFIG_UART0_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index b38fd35a8e..fc3b4f0c47 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y CONFIG_ARCH_BOARD="olimex-stm32-p107" CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) CONFIG_ARCH_IRQPRIO=y @@ -144,44 +144,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index c51b52c149..a6268b8bcb 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y CONFIG_ARCH_BOARD="olimex-stm32-p107" CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) CONFIG_ARCH_IRQPRIO=y @@ -146,44 +146,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index d0df26adf9..58a4673e4c 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -47,7 +47,7 @@ CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=1431 CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=y -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # General build options diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index 84db85567d..8b74e88db8 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=1431 CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=y -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # General build options diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index cada293a95..ecb2011060 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=1431 CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=y -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # General build options diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index e79efc67a0..3015f0af64 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index 0fe51f08e2..668adab783 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index fe18e1dbdf..7997282e8e 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 -CONFIG_UART4_2STOP=0 -CONFIG_UART5_2STOP=0 -CONFIG_UART6_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n +CONFIG_UART6_2STOP=n # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 1879e80da6..797f2e82ba 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 -CONFIG_UART4_2STOP=0 -CONFIG_UART5_2STOP=0 -CONFIG_UART6_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n +CONFIG_UART6_2STOP=n # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index bd1c372ed0..510d1e3707 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 -CONFIG_UART4_2STOP=0 -CONFIG_UART5_2STOP=0 -CONFIG_UART6_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n +CONFIG_UART6_2STOP=n # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index 3a89bca7e6..eac9a52706 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 -CONFIG_UART4_2STOP=0 -CONFIG_UART5_2STOP=0 -CONFIG_UART6_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n +CONFIG_UART6_2STOP=n # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index bc307e44a3..163d6b4551 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 -CONFIG_UART4_2STOP=0 -CONFIG_UART5_2STOP=0 -CONFIG_UART6_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n +CONFIG_UART6_2STOP=n # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index 34475e69a8..96a74839b5 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_BOARD="qemu-i486" CONFIG_ARCH_BOARD_QEMU_I486=y CONFIG_BOARD_LOOPSPERMSEC=999 -CONFIG_DRAM_SIZE=0x00100000 +CONFIG_DRAM_SIZE=1048576 CONFIG_DRAM_START=0x00100000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_STACKDUMP=y @@ -111,10 +111,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n +CONFIG_UART3_2STOP=n # # General OS setup diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig index 7372d34801..cd59503a1e 100644 --- a/nuttx/configs/qemu-i486/ostest/defconfig +++ b/nuttx/configs/qemu-i486/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_BOARD="qemu-i486" CONFIG_ARCH_BOARD_QEMU_I486=y CONFIG_BOARD_LOOPSPERMSEC=999 -CONFIG_DRAM_SIZE=0x00100000 +CONFIG_DRAM_SIZE=1048576 CONFIG_DRAM_START=0x00100000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_STACKDUMP=y diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 07088cf311..2c43581f56 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y CONFIG_ARCH_BOARD="sam3u-ek" CONFIG_ARCH_BOARD_SAM3UEK=y CONFIG_BOARD_LOOPSPERMSEC=4768 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -131,11 +131,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_UART_2STOP=n +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # # General build options diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 51d7a4a3e8..57572fe00a 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y CONFIG_ARCH_BOARD="sam3u-ek" CONFIG_ARCH_BOARD_SAM3UEK=y CONFIG_BOARD_LOOPSPERMSEC=4768 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -126,11 +126,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_UART_2STOP=n +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # # General build options diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 386225647f..6ce5597e4e 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y CONFIG_ARCH_BOARD="sam3u-ek" CONFIG_ARCH_BOARD_SAM3UEK=y CONFIG_BOARD_LOOPSPERMSEC=4768 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -126,11 +126,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_UART_2STOP=n +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # # General build options diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index f8b8eb264b..65b91d0fe7 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y CONFIG_ARCH_BOARD="sam3u-ek" CONFIG_ARCH_BOARD_SAM3UEK=y CONFIG_BOARD_LOOPSPERMSEC=4768 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -127,11 +127,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_UART_2STOP=n +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # # General build options diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index b1a33fd866..894012e7f9 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_AT91SAM3U4E=y CONFIG_ARCH_BOARD="sam3u-ek" CONFIG_ARCH_BOARD_SAM3UEK=y CONFIG_BOARD_LOOPSPERMSEC=4768 -CONFIG_DRAM_SIZE=0x00008000 +CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -127,11 +127,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=0 -CONFIG_USART0_2STOP=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 +CONFIG_UART_2STOP=n +CONFIG_USART0_2STOP=n +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n # # Input device configuration diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig index c0ab37c7cd..72fc5a446c 100644 --- a/nuttx/configs/skp16c26/ostest/defconfig +++ b/nuttx/configs/skp16c26/ostest/defconfig @@ -45,7 +45,7 @@ CONFIG_ARCH_BOARD="skp16c26" CONFIG_ARCH_BOARD_SKP16C26=y CONFIG_ARCH_NOINTC=y CONFIG_ENDIAN_BIG=y -CONFIG_DRAM_SIZE=0x00800 +CONFIG_DRAM_SIZE=2048 CONFIG_DRAM_START=0x00400 CONFIG_BOARD_LOOPSPERMSEC=16945 CONFIG_ARCH_INTERRUPTSTACK=128 @@ -78,9 +78,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # Enable LCD console diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index db01c2da5a..5282c62134 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -112,44 +112,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index 8bc0e934e0..b0b616a25c 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -123,44 +123,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 6839e15aad..4db4686223 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 56d2af420b..5ce350e9e6 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 93dbef8a3d..2c202e0d86 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -142,44 +142,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index cee087a6c4..e6aacd817f 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index 5af0985e6f..adc83a1f5f 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index a1e3775598..607e11d3ce 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index d5669cdd27..2a6f26be4e 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index f9d777ebd4..6a08daf43d 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -122,44 +122,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index dc5b27cd58..5e3c47658e 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -152,44 +152,44 @@ CONFIG_RTC_ALARM=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index fef61f6df4..3ae6b228d8 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -122,44 +122,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 2ab5ed7829..7e804e1a40 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F103ZET6=y CONFIG_ARCH_BOARD="stm3210e-eval" CONFIG_ARCH_BOARD_STM3210E_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -121,44 +121,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index d7d3c8aa93..18bfda2d77 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 44e9cf7cd8..367e2a14fe 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index f40dffeebd..2ea6b73cfc 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index 522840f228..bbf63a10d0 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index f3ef33377a..6978255fd8 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 35e52507c3..87741f950c 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 0b3f350777..f40108f09c 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=10926 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -144,44 +144,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index e79f774df1..0b5b17448e 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index d4ba400ced..027b470296 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index eab1cef665..fbafb988a1 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index b06ae45b73..f78e7f94f4 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -151,44 +151,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 36273579f6..acc8da70eb 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 2e8bceb10e..5920872c37 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index e4bc6923b8..9e2c809fe0 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 5de905c043..400d372b1a 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 0a625f93f0..6885b8d7bc 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_BOARD="stm3240g-eval" CONFIG_ARCH_BOARD_STM3240G_EVAL=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -150,44 +150,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=y -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 47e4aeca65..5445b5526e 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_BOARD="stm32f4discovery" CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -139,44 +139,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index b57d72be1e..019769eeef 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_BOARD="stm32f4discovery" CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -139,44 +139,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 0ff024904f..6fe0a9b8d5 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_BOARD="stm32f4discovery" CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -139,44 +139,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 6999949479..88890708a4 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -43,7 +43,7 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_BOARD="stm32f4discovery" CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_DRAM_SIZE=0x00030000 +CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n @@ -140,44 +140,44 @@ CONFIG_STM32_TIM11=n CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=128 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=128 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=128 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index d52bf55090..00af0957d5 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # PIC32MX-specific USB device setup diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index ce09306f0c..d6939a6c07 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 76704a121a..622ed56540 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # PIC32MX-specific USB device setup diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index aa61354717..d97cd59556 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 +CONFIG_USART1_2STOP=n # # General build options diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index 7108d27fee..6313c13148 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 +CONFIG_USART1_2STOP=n # # General build options diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index 87931ee248..ad7d13ef6e 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 +CONFIG_USART1_2STOP=n # # General build options diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index d5e491dc25..b9670c3984 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="twr-k60n512" CONFIG_ARCH_BOARD_TWR_K60N512=y CONFIG_BOARD_LOOPSPERMSEC=9535 CONFIG_DRAM_START=0x1fff0000 -CONFIG_DRAM_SIZE=0x00020000 +CONFIG_DRAM_SIZE=131072 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_STACKDUMP=y diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index af92b70b18..5d5b1245c5 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_BOARD="twr-k60n512" CONFIG_ARCH_BOARD_TWR_K60N512=y CONFIG_BOARD_LOOPSPERMSEC=9535 CONFIG_DRAM_START=0x1fff0000 -CONFIG_DRAM_SIZE=0x00020000 +CONFIG_DRAM_SIZE=131072 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_STACKDUMP=y diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index c198067df5..81129771df 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index dcbdc88ba0..b6a1814b96 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 +CONFIG_UART1_2STOP=n +CONFIG_UART2_2STOP=n # # General build options diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index f685371cb9..2cf0b23511 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=572 CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=y -CONFIG_DRAM_SIZE=0x0000e000 +CONFIG_DRAM_SIZE=57344 CONFIG_DRAM_START=0x0a002000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -85,8 +85,8 @@ CONFIG_SCI0_BITS=8 CONFIG_SCI1_BITS=8 CONFIG_SCI0_PARITY=0 CONFIG_SCI1_PARITY=0 -CONFIG_SCI0_2STOP=0 -CONFIG_SCI1_2STOP=0 +CONFIG_SCI0_2STOP=n +CONFIG_SCI1_2STOP=n # # General build options diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index 8ecf50ea1b..97dc1a6bf3 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=572 CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=y -CONFIG_DRAM_SIZE=0x0000e000 +CONFIG_DRAM_SIZE=57344 CONFIG_DRAM_START=0x0a002000 CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y @@ -85,8 +85,8 @@ CONFIG_SCI0_BITS=8 CONFIG_SCI1_BITS=8 CONFIG_SCI0_PARITY=0 CONFIG_SCI1_PARITY=0 -CONFIG_SCI0_2STOP=0 -CONFIG_SCI1_2STOP=0 +CONFIG_SCI0_2STOP=n +CONFIG_SCI1_2STOP=n # # General build options diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 5fbf2c7994..9cba2a7dfe 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y CONFIG_ARCH_BOARD="vsn" CONFIG_ARCH_BOARD_VSN=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n @@ -142,44 +142,44 @@ CONFIG_STM32_ADC3=n CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 CONFIG_USART3_TXBUFSIZE=256 -CONFIG_USART4_TXBUFSIZE=256 -CONFIG_USART5_TXBUFSIZE=256 +CONFIG_UART4_TXBUFSIZE=256 +CONFIG_UART5_TXBUFSIZE=256 CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART3_RXBUFSIZE=256 -CONFIG_USART4_RXBUFSIZE=256 -CONFIG_USART5_RXBUFSIZE=256 +CONFIG_UART4_RXBUFSIZE=256 +CONFIG_UART5_RXBUFSIZE=256 CONFIG_USART1_BAUD=115200 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=0 -CONFIG_USART2_2STOP=0 -CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_USART1_2STOP=n +CONFIG_USART2_2STOP=n +CONFIG_USART3_2STOP=n +CONFIG_UART4_2STOP=n +CONFIG_UART5_2STOP=n # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index 24e228a4b7..65c6f8beb1 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -64,8 +64,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index 95cb6f09b3..d456974439 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -64,8 +64,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index c193790972..e5848c63de 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -62,8 +62,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index 5108247230..e6e978b7f4 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -62,8 +62,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n # # General build options diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 58d6ead703..02c3ed48ab 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -179,7 +179,7 @@ config SCHED_LPWORK config SCHED_LPWORKPRIORITY int "Lower priority worker thread priority" - default 192 + default 50 depends on SCHED_LPWORK ---help--- The execution priority of the lopwer priority worker thread. Default: 192 @@ -236,7 +236,7 @@ config SCHED_ONEXIT_MAX number that you require. config USER_ENTRYPOINT - string "Appliation entry point" + string "Application entry point" default "user_start" ---help--- The name of the entry point for user applications. For the example From 43d533da11ecc04b9012851c1b9825e7ed8dfb63 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 15:28:56 +0000 Subject: [PATCH 07/95] Kconfig changes + back out part of last check-in: The 2STOP setting must be integer 0/1, not boolean git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5086 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/lpc43xx/Kconfig | 24 ++++++------- nuttx/arch/arm/src/stm32/Kconfig | 36 +++++++++---------- nuttx/arch/mips/src/pic32mx/Kconfig | 36 +++++++++---------- nuttx/configs/amber/hello/defconfig | 4 +-- nuttx/configs/avr32dev1/nsh/defconfig | 6 ++-- nuttx/configs/avr32dev1/ostest/defconfig | 6 ++-- nuttx/configs/c5471evm/httpd/defconfig | 4 +-- nuttx/configs/c5471evm/nettest/defconfig | 4 +-- nuttx/configs/c5471evm/nsh/defconfig | 4 +-- nuttx/configs/c5471evm/ostest/defconfig | 4 +-- .../configs/compal_e88/nsh_highram/defconfig | 4 +-- .../compal_e99/nsh_compalram/defconfig | 4 +-- .../configs/compal_e99/nsh_highram/defconfig | 4 +-- nuttx/configs/demo9s12ne64/ostest/defconfig | 4 +-- nuttx/configs/ea3131/nsh/defconfig | 2 +- nuttx/configs/ea3131/ostest/defconfig | 2 +- nuttx/configs/ea3131/pgnsh/defconfig | 2 +- nuttx/configs/ea3131/usbserial/defconfig | 2 +- nuttx/configs/ea3131/usbstorage/defconfig | 2 +- nuttx/configs/ea3152/ostest/defconfig | 2 +- nuttx/configs/eagle100/httpd/defconfig | 4 +-- nuttx/configs/eagle100/nettest/defconfig | 4 +-- nuttx/configs/eagle100/nsh/defconfig | 4 +-- nuttx/configs/eagle100/nxflat/defconfig | 4 +-- nuttx/configs/eagle100/ostest/defconfig | 4 +-- nuttx/configs/eagle100/thttpd/defconfig | 4 +-- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 6 ++-- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 6 ++-- .../configs/ez80f910200kitg/ostest/defconfig | 4 +-- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 4 +-- nuttx/configs/ez80f910200zco/httpd/defconfig | 4 +-- .../configs/ez80f910200zco/nettest/defconfig | 4 +-- nuttx/configs/ez80f910200zco/nsh/defconfig | 4 +-- nuttx/configs/ez80f910200zco/ostest/defconfig | 4 +-- nuttx/configs/ez80f910200zco/poll/defconfig | 4 +-- nuttx/configs/hymini-stm32v/buttons/defconfig | 10 +++--- nuttx/configs/hymini-stm32v/nsh/defconfig | 10 +++--- nuttx/configs/hymini-stm32v/nsh2/defconfig | 10 +++--- nuttx/configs/hymini-stm32v/nx/defconfig | 10 +++--- nuttx/configs/hymini-stm32v/nxlines/defconfig | 10 +++--- .../configs/hymini-stm32v/usbserial/defconfig | 10 +++--- .../hymini-stm32v/usbstorage/defconfig | 10 +++--- nuttx/configs/lincoln60/nsh/defconfig | 8 ++--- nuttx/configs/lincoln60/ostest/defconfig | 8 ++--- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 6 ++-- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 6 ++-- nuttx/configs/lm3s6965-ek/nsh/defconfig | 6 ++-- nuttx/configs/lm3s6965-ek/nx/defconfig | 6 ++-- nuttx/configs/lm3s6965-ek/ostest/defconfig | 6 ++-- nuttx/configs/lm3s8962-ek/nsh/defconfig | 6 ++-- nuttx/configs/lm3s8962-ek/nx/defconfig | 6 ++-- nuttx/configs/lm3s8962-ek/ostest/defconfig | 6 ++-- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 8 ++--- .../configs/lpc4330-xplorer/ostest/defconfig | 8 ++--- .../lpcxpresso-lpc1768/dhcpd/defconfig | 8 ++--- .../configs/lpcxpresso-lpc1768/nsh/defconfig | 8 ++--- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 8 ++--- .../lpcxpresso-lpc1768/ostest/defconfig | 8 ++--- .../lpcxpresso-lpc1768/thttpd/defconfig | 8 ++--- .../lpcxpresso-lpc1768/usbstorage/defconfig | 8 ++--- nuttx/configs/m68332evb/defconfig | 4 +-- nuttx/configs/mbed/hidkbd/defconfig | 8 ++--- nuttx/configs/mbed/nsh/defconfig | 8 ++--- .../mcu123-lpc214x/composite/defconfig | 4 +-- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 4 +-- nuttx/configs/mcu123-lpc214x/ostest/defconfig | 4 +-- .../mcu123-lpc214x/usbserial/defconfig | 4 +-- .../mcu123-lpc214x/usbstorage/defconfig | 4 +-- nuttx/configs/micropendous3/hello/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 4 +-- nuttx/configs/mirtoo/nxffs/defconfig | 4 +-- nuttx/configs/mirtoo/ostest/defconfig | 4 +-- nuttx/configs/mx1ads/ostest/defconfig | 6 ++-- nuttx/configs/ne64badge/ostest/defconfig | 4 +-- nuttx/configs/ntosd-dm320/nettest/defconfig | 4 +-- nuttx/configs/ntosd-dm320/nsh/defconfig | 4 +-- nuttx/configs/ntosd-dm320/ostest/defconfig | 4 +-- nuttx/configs/ntosd-dm320/poll/defconfig | 4 +-- nuttx/configs/ntosd-dm320/thttpd/defconfig | 4 +-- nuttx/configs/ntosd-dm320/udp/defconfig | 4 +-- nuttx/configs/ntosd-dm320/uip/defconfig | 4 +-- nuttx/configs/nucleus2g/nsh/defconfig | 8 ++--- nuttx/configs/nucleus2g/ostest/defconfig | 8 ++--- nuttx/configs/nucleus2g/usbserial/defconfig | 8 ++--- nuttx/configs/nucleus2g/usbstorage/defconfig | 8 ++--- .../configs/olimex-lpc1766stk/ftpc/defconfig | 8 ++--- .../olimex-lpc1766stk/hidkbd/defconfig | 8 ++--- .../olimex-lpc1766stk/nettest/defconfig | 8 ++--- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 8 ++--- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 8 ++--- .../olimex-lpc1766stk/ostest/defconfig | 8 ++--- .../olimex-lpc1766stk/slip-httpd/defconfig | 8 ++--- .../olimex-lpc1766stk/thttpd/defconfig | 8 ++--- .../olimex-lpc1766stk/usbserial/defconfig | 8 ++--- .../olimex-lpc1766stk/usbstorage/defconfig | 8 ++--- .../configs/olimex-lpc1766stk/wlan/defconfig | 8 ++--- nuttx/configs/olimex-lpc2378/nsh/defconfig | 4 +-- nuttx/configs/olimex-lpc2378/ostest/defconfig | 4 +-- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 10 +++--- .../olimex-stm32-p107/ostest/defconfig | 10 +++--- .../configs/olimex-strp711/nettest/defconfig | 8 ++--- nuttx/configs/olimex-strp711/nsh/defconfig | 8 ++--- nuttx/configs/olimex-strp711/ostest/defconfig | 8 ++--- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 4 +-- .../configs/pcblogic-pic32mx/ostest/defconfig | 4 +-- nuttx/configs/pic32-starterkit/nsh/defconfig | 12 +++---- nuttx/configs/pic32-starterkit/nsh2/defconfig | 12 +++---- .../configs/pic32-starterkit/ostest/defconfig | 12 +++---- nuttx/configs/pic32mx7mmb/nsh/defconfig | 12 +++---- nuttx/configs/pic32mx7mmb/ostest/defconfig | 12 +++---- nuttx/configs/qemu-i486/nsh/defconfig | 8 ++--- nuttx/configs/sam3u-ek/knsh/defconfig | 10 +++--- nuttx/configs/sam3u-ek/nsh/defconfig | 10 +++--- nuttx/configs/sam3u-ek/nx/defconfig | 10 +++--- nuttx/configs/sam3u-ek/ostest/defconfig | 10 +++--- nuttx/configs/sam3u-ek/touchscreen/defconfig | 10 +++--- nuttx/configs/skp16c26/ostest/defconfig | 6 ++-- nuttx/configs/stm3210e-eval/RIDE/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/buttons/defconfig | 10 +++--- .../configs/stm3210e-eval/composite/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/nsh/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/nsh2/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/nx/defconfig | 10 +++--- .../configs/stm3210e-eval/nxconsole/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/nxlines/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/nxtext/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/ostest/defconfig | 10 +++--- nuttx/configs/stm3210e-eval/pm/defconfig | 10 +++--- .../configs/stm3210e-eval/usbserial/defconfig | 10 +++--- .../stm3210e-eval/usbstorage/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/nettest/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/nsh/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/nsh2/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/nxwm/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/ostest/defconfig | 10 +++--- nuttx/configs/stm3220g-eval/telnetd/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/nettest/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/nsh/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/nsh2/defconfig | 10 +++--- .../configs/stm3240g-eval/nxconsole/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/nxwm/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/ostest/defconfig | 10 +++--- nuttx/configs/stm3240g-eval/telnetd/defconfig | 10 +++--- .../configs/stm3240g-eval/webserver/defconfig | 10 +++--- nuttx/configs/stm32f4discovery/nsh/defconfig | 10 +++--- .../stm32f4discovery/nxlines/defconfig | 10 +++--- .../configs/stm32f4discovery/ostest/defconfig | 10 +++--- nuttx/configs/stm32f4discovery/pm/defconfig | 10 +++--- nuttx/configs/sure-pic32mx/nsh/defconfig | 4 +-- nuttx/configs/sure-pic32mx/ostest/defconfig | 4 +-- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 4 +-- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/nsh/defconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/ubw32/nsh/defconfig | 4 +-- nuttx/configs/ubw32/ostest/defconfig | 4 +-- nuttx/configs/us7032evb1/nsh/defconfig | 4 +-- nuttx/configs/us7032evb1/ostest/defconfig | 4 +-- nuttx/configs/vsn/nsh/defconfig | 10 +++--- .../configs/z16f2800100zcog/ostest/defconfig | 4 +-- .../z16f2800100zcog/pashello/defconfig | 4 +-- nuttx/configs/z8encore000zco/ostest/defconfig | 4 +-- nuttx/configs/z8f64200100kit/ostest/defconfig | 4 +-- nuttx/drivers/serial/Kconfig | 24 ++++++------- 166 files changed, 614 insertions(+), 614 deletions(-) diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 920b601c40..68d705e3ef 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -331,10 +331,10 @@ config USART0_PARITY 0=no parity, 1=odd parity, 2=even parity config USART0_2STOP - bool "USART0 two stop bits" - default n + int "USART0 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -380,10 +380,10 @@ config UART1_PARITY 0=no parity, 1=odd parity, 2=even parity config UART1_2STOP - bool "UART1 two stop bits" - default n + int "UART1 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -429,10 +429,10 @@ config USART2_PARITY 0=no parity, 1=odd parity, 2=even parity config USART2_2STOP - bool "USART2 two stop bits" - default n + int "USART2 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -478,10 +478,10 @@ config USART3_PARITY 0=no parity, 1=odd parity, 2=even parity config USART3_2STOP - bool "USART3 two stop bits" - default n + int "USART3 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index c3130864cb..695fe8e94d 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -1462,10 +1462,10 @@ config USART1_PARITY 0=no parity, 1=odd parity, 2=even parity config USART1_2STOP - bool "USART1 two stop bits" - default n + int "USART1 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config USART1_RXDMA bool "USART1 Rx DMA" @@ -1518,10 +1518,10 @@ config USART2_PARITY 0=no parity, 1=odd parity, 2=even parity config USART2_2STOP - bool "USART2 two stop bits" - default n + int "USART2 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config USART2_RXDMA bool "USART2 Rx DMA" @@ -1574,10 +1574,10 @@ config USART3_PARITY 0=no parity, 1=odd parity, 2=even parity config USART3_2STOP - bool "USART3 two stop bits" - default n + int "USART3 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config USART3_RXDMA bool "USART3 Rx DMA" @@ -1630,10 +1630,10 @@ config UART4_PARITY 0=no parity, 1=odd parity, 2=even parity config UART4_2STOP - bool "UART4 two stop bits" - default n + int "UART4 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config UART4_RXDMA bool "UART4 Rx DMA" @@ -1686,10 +1686,10 @@ config UART5_PARITY 0=no parity, 1=odd parity, 2=even parity config UART5_2STOP - bool "UART5 two stop bits" - default n + int "UART5 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config UART5_RXDMA bool "UART5 Rx DMA" @@ -1742,10 +1742,10 @@ config USART6_PARITY 0=no parity, 1=odd parity, 2=even parity config USART6_2STOP - bool "USART6 two stop bits" - default n + int "USART6 two stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config USART6_RXDMA bool "USART6 Rx DMA" diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 5c17f72c10..7c2c9bb23d 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -946,10 +946,10 @@ config UART1_PARITY 0=no parity, 1=odd parity, 2=even parity config UART1_2STOP - bool "UART1 2 stop bits" - default n + int "UART1 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -993,10 +993,10 @@ config UART2_PARITY 0=no parity, 1=odd parity, 2=even parity config UART2_2STOP - bool "UART2 2 stop bits" - default n + int "UART2 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -1040,10 +1040,10 @@ config UART3_PARITY 0=no parity, 1=odd parity, 2=even parity config UART3_2STOP - bool "UART3 2 stop bits" - default n + int "UART3 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -1087,10 +1087,10 @@ config UART4_PARITY 0=no parity, 1=odd parity, 2=even parity config UART4_2STOP - bool "UART4 2 stop bits" - default n + int "UART4 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -1134,10 +1134,10 @@ config UART5_PARITY 0=no parity, 1=odd parity, 2=even parity config UART5_2STOP - bool "UART5 2 stop bits" - default n + int "UART5 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu @@ -1181,10 +1181,10 @@ config UART6_PARITY 0=no parity, 1=odd parity, 2=even parity config UART6_2STOP - bool "UART6 2 stop bits" - default n + int "UART6 2 stop bits" + default 0 ---help--- - Two stop bits + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit endmenu diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index 55b37bd9b8..a6b5728252 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -93,7 +93,7 @@ CONFIG_USART0_RXBUFSIZE=256 CONFIG_USART0_BAUD=38400 CONFIG_USART0_BITS=8 CONFIG_USART0_PARITY=0 -CONFIG_USART0_2STOP=n +CONFIG_USART0_2STOP=0 CONFIG_USART1_SERIAL_CONSOLE=n CONFIG_USART1_TXBUFSIZE=256 @@ -101,7 +101,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=n +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index bffd38f3d6..dbb562eaef 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -125,9 +125,9 @@ CONFIG_USART0_PARITY=0 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 # # General build options diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index b022b25a37..6d5aa4d08c 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -125,9 +125,9 @@ CONFIG_USART0_PARITY=0 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 # # General build options diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig index 1b3298f93b..adbd97d6d5 100644 --- a/nuttx/configs/c5471evm/httpd/defconfig +++ b/nuttx/configs/c5471evm/httpd/defconfig @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig index 8bf39e9d1d..af9266863a 100644 --- a/nuttx/configs/c5471evm/nettest/defconfig +++ b/nuttx/configs/c5471evm/nettest/defconfig @@ -75,8 +75,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig index d952f9415f..a0a2264e4d 100644 --- a/nuttx/configs/c5471evm/nsh/defconfig +++ b/nuttx/configs/c5471evm/nsh/defconfig @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig index 56bd14bc74..5d3d70a221 100644 --- a/nuttx/configs/c5471evm/ostest/defconfig +++ b/nuttx/configs/c5471evm/ostest/defconfig @@ -67,8 +67,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 # # C5471 Ethernet Driver settings diff --git a/nuttx/configs/compal_e88/nsh_highram/defconfig b/nuttx/configs/compal_e88/nsh_highram/defconfig index a4660ccdab..30287a80d4 100644 --- a/nuttx/configs/compal_e88/nsh_highram/defconfig +++ b/nuttx/configs/compal_e88/nsh_highram/defconfig @@ -68,8 +68,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/compal_e99/nsh_compalram/defconfig b/nuttx/configs/compal_e99/nsh_compalram/defconfig index 4fa607b37f..a52e2aaf06 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/defconfig +++ b/nuttx/configs/compal_e99/nsh_compalram/defconfig @@ -71,8 +71,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig index 7526569754..e5f997ebf7 100644 --- a/nuttx/configs/compal_e99/nsh_highram/defconfig +++ b/nuttx/configs/compal_e99/nsh_highram/defconfig @@ -71,8 +71,8 @@ CONFIG_UART_IRDA_BITS=8 CONFIG_UART_MODEM_BITS=8 CONFIG_UART_IRDA_PARITY=0 CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_IRDA_2STOP=n -CONFIG_UART_MODEM_2STOP=n +CONFIG_UART_IRDA_2STOP=0 +CONFIG_UART_MODEM_2STOP=0 CONFIG_STDIO_LINE_BUFFER=y # diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index 68976ae8c9..3a6faab74c 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -77,7 +77,7 @@ CONFIG_SCI0_RXBUFSIZE=32 CONFIG_SCI0_BAUD=115200 CONFIG_SCI0_BITS=8 CONFIG_SCI0_PARITY=0 -CONFIG_SCI0_2STOP=n +CONFIG_SCI0_2STOP=0 CONFIG_SCI1_SERIAL_CONSOLE=n CONFIG_SCI1_TXBUFSIZE=32 @@ -85,7 +85,7 @@ CONFIG_SCI1_RXBUFSIZE=32 CONFIG_SCI1_BAUD=115200 CONFIG_SCI1_BITS=8 CONFIG_SCI1_PARITY=0 -CONFIG_SCI1_2STOP=n +CONFIG_SCI1_2STOP=0 # # MC9S12NEC64 specific SSI device driver settings diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 4025ce9000..a50104ba4b 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # General build options diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 5581e2e88f..2e76bebbd0 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # General build options diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index e609f35e65..a28f1f8273 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # MP25x Configuration diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 017be2404e..abd2855dfd 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # General build options diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index 3a04eab372..1d4c5dfd49 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # General build options diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index a86ba4bf94..ebb9e637bd 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -99,7 +99,7 @@ CONFIG_UART_RXBUFSIZE=256 CONFIG_UART_BAUD=115200 CONFIG_UART_BITS=8 CONFIG_UART_PARITY=0 -CONFIG_UART_2STOP=n +CONFIG_UART_2STOP=0 # # General build options diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index a0959b0769..eea8d657b8 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index 261b2dafec..d52986372f 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index e5d3608bb8..36212e59b7 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index 10ee50c440..5835fbb4fd 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index afccba390b..0cf7440872 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index e7b91bc6f9..5493345cee 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -83,8 +83,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # LM3S6918 specific SSI device driver settings diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index 4d9c1c1783..7a12fd28b4 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -99,9 +99,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6B96 specific SSI device driver settings diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index daced73603..03c6574e2f 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -99,9 +99,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6B96 specific SSI device driver settings diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 3ecc95f4b4..5947962bc1 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -68,8 +68,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index c75c62a5ad..64591ad509 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index 4c477713a1..bc8c3bb65f 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index 4b64856350..0a87a96e24 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index a4fc9cfb0a..4066d0ea7d 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 1a375c1ed1..11bba8dcff 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -70,8 +70,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index 97f8a64336..8ac0dde327 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -71,8 +71,8 @@ CONFIG_UART0_BITS=0 CONFIG_UART1_BITS=0 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # ez80 EMAC diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index 335d97fa8a..5038643192 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -149,11 +149,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index fa0b79e2f5..17aaf9f6cb 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -147,11 +147,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index a0c6145699..54574b26c5 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -152,11 +152,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index 0e05696cea..2d3d03832c 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -147,11 +147,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index efb37bd3a0..1dc04c0134 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -151,11 +151,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 1b96eb9c6d..8f0e1f3d46 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -149,11 +149,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 0ce6086919..85627dfda5 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -148,11 +148,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103V specific SSI device driver settings diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index 4bf6b0bb9e..907a86291a 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index b713cb0a22..6d2ad64b78 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index 42f44f7447..ebfa4aa49a 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6432 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index 408c01c4c8..84ea31b2c8 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6432 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 58cfb2b045..845978a48c 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index d4482f6cc6..53b54b56c1 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index f44187174c..c06898463d 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S6965 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index 47a54d81ca..8c7ac03c6c 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index e61d7cb0e9..5e0366af8a 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index 44bcd00032..6c554b8ad5 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -98,9 +98,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # LM3S8962 specific SSI device driver settings diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index 9169cd29bf..db3474a4a6 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -157,10 +157,10 @@ CONFIG_UART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_USART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # CONFIG_USART0_RS485MODE=n diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 520dc23cff..40af52c5a9 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -155,10 +155,10 @@ CONFIG_UART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_USART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # CONFIG_USART0_RS485MODE=n diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 7b6ce7ff2a..681744b6e0 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index c9090cbb83..718e071314 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index 2c6da96610..839eb2c9af 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index b000e69d72..da6da59483 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 538ecb881b..8150d89f68 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index ffe545f6da..8d0f34b44f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -130,10 +130,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index e652747d6d..b05cf0d7b8 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -58,8 +58,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index 80511aabbf..4d0a0b0d59 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index 96f4454bfa..0d40702939 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig index b73737adc8..62e75452b8 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/defconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index 5589c5639d..a1e16fe529 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index af801923a4..3d179beec6 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig index b77aba3991..9cf4e64834 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig index d655829ddc..a27fad9d35 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig @@ -80,8 +80,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index 9a43c5fcaf..a76093424f 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=n +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index 76cda2488d..0ee9cc34e1 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -153,8 +153,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index 616f882cd3..a9dce182b9 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -153,8 +153,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index 96eaeb25cc..e830aefa06 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index 30b5fe8681..f85910a981 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -80,9 +80,9 @@ CONFIG_UART3_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # IMX specific SPI device driver settings diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index bbf41583fa..020dd5cc08 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -83,7 +83,7 @@ CONFIG_SCI0_RXBUFSIZE=32 CONFIG_SCI0_BAUD=38400 CONFIG_SCI0_BITS=8 CONFIG_SCI0_PARITY=0 -CONFIG_SCI0_2STOP=n +CONFIG_SCI0_2STOP=0 CONFIG_SCI1_SERIAL_CONSOLE=n CONFIG_SCI1_TXBUFSIZE=32 @@ -91,7 +91,7 @@ CONFIG_SCI1_RXBUFSIZE=32 CONFIG_SCI1_BAUD=38400 CONFIG_SCI1_BITS=8 CONFIG_SCI1_PARITY=0 -CONFIG_SCI1_2STOP=n +CONFIG_SCI1_2STOP=0 # # MC9S12NEC64 specific SSI device driver settings diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index fbab35a7ab..466f9e4817 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index 436d324f99..48de4f76ae 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -78,8 +78,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index aa4449b0a3..fcc5d2f2cc 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig index f004093e49..ff2a193ab3 100644 --- a/nuttx/configs/ntosd-dm320/poll/defconfig +++ b/nuttx/configs/ntosd-dm320/poll/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index f0749ba2ff..5e1d8f1c8d 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index e88fedcd5b..9560255c47 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig index 9c5f0f0d1c..046dd64971 100644 --- a/nuttx/configs/ntosd-dm320/uip/defconfig +++ b/nuttx/configs/ntosd-dm320/uip/defconfig @@ -79,8 +79,8 @@ CONFIG_UART0_BITS=8 CONFIG_UART1_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index afb2f8854a..d846e9a0d7 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 71254a7b07..194c5d817b 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index 08d5c46bbe..d3c8bc7dc7 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 469c6faa24..2f1f6a3698 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index 95b6cdc7e1..c11d40999e 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index 5989708e20..ce40fc25dc 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index cf1c642bf6..7c0046b857 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index ce73f6b1a0..9bc96d1bec 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 986e08ada4..4096713778 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 68793fcceb..f7b701cc3c 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index c358fef59e..6eb34db144 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -136,10 +136,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index bd8fd19c23..9690f800f0 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index 0fe27df980..ed41b08d0f 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index caf2e37722..b01e79a5d4 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -134,10 +134,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 02847d6b4c..a0e5da662d 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -128,10 +128,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # LPC17xx specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index 2615f35a93..8f0174c9ba 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -101,8 +101,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART2_PARITY=0 # 2 Stop Bits ? -CONFIG_UART0_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index 7e0b862f02..79051c568b 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -101,8 +101,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART2_PARITY=0 # 2 Stop Bits ? -CONFIG_UART0_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index fc3b4f0c47..781dcd64ca 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index a6268b8bcb..ad07b7aa1c 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -179,11 +179,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 58a4673e4c..2954c7ca72 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # General build options diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index 8b74e88db8..1f4976a487 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # General build options diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index ecb2011060..579ba769e5 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -117,10 +117,10 @@ CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # General build options diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index 3015f0af64..e79efc67a0 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index 668adab783..0fe51f08e2 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index 7997282e8e..fe18e1dbdf 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n -CONFIG_UART6_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 +CONFIG_UART6_2STOP=0 # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 797f2e82ba..1879e80da6 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n -CONFIG_UART6_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 +CONFIG_UART6_2STOP=0 # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index 510d1e3707..bd1c372ed0 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n -CONFIG_UART6_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 +CONFIG_UART6_2STOP=0 # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index eac9a52706..3a89bca7e6 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n -CONFIG_UART6_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 +CONFIG_UART6_2STOP=0 # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index 163d6b4551..bc307e44a3 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -180,12 +180,12 @@ CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 CONFIG_UART6_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n -CONFIG_UART6_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 +CONFIG_UART6_2STOP=0 # # PIC32MX specific PHY/Ethernet device driver settings diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index 96a74839b5..8de40fcab5 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -111,10 +111,10 @@ CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 CONFIG_UART3_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n -CONFIG_UART3_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 +CONFIG_UART3_2STOP=0 # # General OS setup diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 2c43581f56..2017250006 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -131,11 +131,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=n -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_UART_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # # General build options diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 57572fe00a..15b4d8d867 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -126,11 +126,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=n -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_UART_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # # General build options diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 6ce5597e4e..f124164dc8 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -126,11 +126,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=n -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_UART_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # # General build options diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index 65b91d0fe7..1138094ec3 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -127,11 +127,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=n -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_UART_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # # General build options diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index 894012e7f9..eef3c1dc19 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -127,11 +127,11 @@ CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_UART_2STOP=n -CONFIG_USART0_2STOP=n -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n +CONFIG_UART_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 # # Input device configuration diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig index 72fc5a446c..0bb6240934 100644 --- a/nuttx/configs/skp16c26/ostest/defconfig +++ b/nuttx/configs/skp16c26/ostest/defconfig @@ -78,9 +78,9 @@ CONFIG_UART2_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # Enable LCD console diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index 5282c62134..4d87e2d2c8 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -145,11 +145,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index b0b616a25c..08703af7d3 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -156,11 +156,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 4db4686223..16415e793f 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 5ce350e9e6..3aedb6bd55 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 2c202e0d86..a9d2790512 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -175,11 +175,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index e6aacd817f..359e70969e 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index adc83a1f5f..4d30ed8eaa 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index 607e11d3ce..476f85e5fb 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index 2a6f26be4e..cef3a62467 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 6a08daf43d..18239c9958 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -155,11 +155,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 5e3c47658e..48b9e83b3b 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -185,11 +185,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index 3ae6b228d8..da13a876dd 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -155,11 +155,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 7e804e1a40..05b5a288fa 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -154,11 +154,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 18bfda2d77..d8cac6aabf 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 367e2a14fe..ebd176269c 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 2ea6b73cfc..937ce76861 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index bbf63a10d0..7e4d8127c7 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index 6978255fd8..cbbdca2e32 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 87741f950c..1ae110716d 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index f40108f09c..f39e104bd5 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -177,11 +177,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F20xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index 0b5b17448e..a8372456f0 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 027b470296..500a8ab15b 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index fbafb988a1..4a0246ef43 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index f78e7f94f4..e9e0c272f6 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -184,11 +184,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index acc8da70eb..8413a1b594 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 5920872c37..de8ebffaec 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 9e2c809fe0..58b86beea0 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 400d372b1a..39cde6b0fb 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 6885b8d7bc..5c6e573d54 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -183,11 +183,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 5445b5526e..0a07e84895 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -172,11 +172,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 019769eeef..52705977ab 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -172,11 +172,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 6fe0a9b8d5..c7cee2331f 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -172,11 +172,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SSI device driver settings diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 88890708a4..592ce5701c 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -173,11 +173,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F40xxx specific SPI device driver settings diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index 00af0957d5..d52bf55090 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # PIC32MX-specific USB device setup diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index d6939a6c07..ce09306f0c 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 622ed56540..76704a121a 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -146,8 +146,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # PIC32MX-specific USB device setup diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index d97cd59556..aa61354717 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=n +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index 6313c13148..7108d27fee 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=n +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index ad7d13ef6e..87931ee248 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -96,7 +96,7 @@ CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_BAUD=38400 CONFIG_USART1_BITS=8 CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=n +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index 81129771df..c198067df5 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index b6a1814b96..dcbdc88ba0 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -145,8 +145,8 @@ CONFIG_UART2_BITS=8 CONFIG_UART1_PARITY=0 CONFIG_UART2_PARITY=0 -CONFIG_UART1_2STOP=n -CONFIG_UART2_2STOP=n +CONFIG_UART1_2STOP=0 +CONFIG_UART2_2STOP=0 # # General build options diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index 2cf0b23511..0ad714e67b 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -85,8 +85,8 @@ CONFIG_SCI0_BITS=8 CONFIG_SCI1_BITS=8 CONFIG_SCI0_PARITY=0 CONFIG_SCI1_PARITY=0 -CONFIG_SCI0_2STOP=n -CONFIG_SCI1_2STOP=n +CONFIG_SCI0_2STOP=0 +CONFIG_SCI1_2STOP=0 # # General build options diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index 97dc1a6bf3..02633fbf50 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -85,8 +85,8 @@ CONFIG_SCI0_BITS=8 CONFIG_SCI1_BITS=8 CONFIG_SCI0_PARITY=0 CONFIG_SCI1_PARITY=0 -CONFIG_SCI0_2STOP=n -CONFIG_SCI1_2STOP=n +CONFIG_SCI0_2STOP=0 +CONFIG_SCI1_2STOP=0 # # General build options diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 9cba2a7dfe..348a678448 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -175,11 +175,11 @@ CONFIG_USART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -CONFIG_USART1_2STOP=n -CONFIG_USART2_2STOP=n -CONFIG_USART3_2STOP=n -CONFIG_UART4_2STOP=n -CONFIG_UART5_2STOP=n +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 +CONFIG_USART3_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 # # STM32F103Z specific SSI device driver settings diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index 65c6f8beb1..24e228a4b7 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -64,8 +64,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index d456974439..95cb6f09b3 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -64,8 +64,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index e5848c63de..c193790972 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -62,8 +62,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index e6e978b7f4..5108247230 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -62,8 +62,8 @@ CONFIG_UART0_BAUD=57600 CONFIG_UART1_BAUD=57600 CONFIG_UART0_PARITY=0 CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=n -CONFIG_UART1_2STOP=n +CONFIG_UART0_2STOP=0 +CONFIG_UART1_2STOP=0 # # General build options diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig index b8867bd3f7..96052fad38 100644 --- a/nuttx/drivers/serial/Kconfig +++ b/nuttx/drivers/serial/Kconfig @@ -44,10 +44,10 @@ config 16550_UART0_BITS 16550 UART0 number of bits. Default: 8 config 16550_UART0_2STOP - bool "16550 UART0 two stop bits" - default n + int "16550 UART0 two stop bits" + default 0 ---help--- - 16550 UART0 two stop bits. Default: 1 + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config 16550_UART0_RXBUFSIZE int "16550 UART0 Rx buffer size" @@ -94,10 +94,10 @@ config 16550_UART1_BITS 16550 UART1 number of bits. Default: 8 config 16550_UART1_2STOP - bool "16550 UART1 two stop bits" - default n + int "16550 UART1 two stop bits" + default 0 ---help--- - 16550 UART1 two stop bits. Default: 1 + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config 16550_UART1_RXBUFSIZE int "16550 UART1 Rx buffer size" @@ -144,10 +144,10 @@ config 16550_UART2_BITS 16550 UART2 number of bits. Default: 8 config 16550_UART2_2STOP - bool "16550 UART2 two stop bits" - default n + int "16550 UART2 two stop bits" + default 0 ---help--- - 16550 UART2 two stop bits. Default: 1 + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config 16550_UART2_RXBUFSIZE int "16550 UART2 Rx buffer size" @@ -194,10 +194,10 @@ config 16550_UART3_BITS 16550 UART3 number of bits. Default: 8 config 16550_UART3_2STOP - bool "16550 UART3 two stop bits" - default n + int "16550 UART3 two stop bits" + default 0 ---help--- - 16550 UART3 two stop bits. Default: 1 + 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit config 16550_UART3_RXBUFSIZE int "16550 UART3 Rx buffer size" From 90ef4d1d10f5e7d0796b96451bc8f34e8112a9f6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 16:04:31 +0000 Subject: [PATCH 08/95] Fix scrambled Kconfig Make.defs files git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5087 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/system/Make.defs | 16 ++++++++-------- apps/vsn/Make.defs | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/apps/system/Make.defs b/apps/system/Make.defs index e72f56ef53..a4aea2d318 100644 --- a/apps/system/Make.defs +++ b/apps/system/Make.defs @@ -34,18 +34,18 @@ # ############################################################################ -ifeq ($(CONFIG_VSN_POWEROFF),y) -CONFIGURED_APPS += vsn/poweroff +ifeq ($(CONFIG_SYSTEM_FREE),y) +CONFIGURED_APPS += system/free endif -ifeq ($(CONFIG_VSN_RAMTRON),y) -CONFIGURED_APPS += vsn/ramtron +ifeq ($(CONFIG_SYSTEM_I2CTOOL),y) +CONFIGURED_APPS += system/i2c endif -ifeq ($(CONFIG_VSN_SDCARD),y) -CONFIGURED_APPS += vsn/sdcard +ifeq ($(CONFIG_SYSTEM_INSTALL),y) +CONFIGURED_APPS += system/install endif -ifeq ($(CONFIG_VSN_SYSINFO),y) -CONFIGURED_APPS += vsn/sysinfo +ifeq ($(CONFIG_SYSTEM_READLINE),y) +CONFIGURED_APPS += system/readline endif diff --git a/apps/vsn/Make.defs b/apps/vsn/Make.defs index 399fefee8a..6d59ab8384 100644 --- a/apps/vsn/Make.defs +++ b/apps/vsn/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# apps/namedapps/Make.defs +# apps/vsn/Make.defs # Adds selected applications to apps/ build # # Copyright (C) 2012 Gregory Nutt. All rights reserved. @@ -34,7 +34,18 @@ # ############################################################################ -ifeq ($(CONFIG_NAMEDAPP),y) -CONFIGURED_APPS += namedapp +ifeq ($(CONFIG_VSN_POWEROFF),y) +CONFIGURED_APPS += vsn/poweroff endif +ifeq ($(CONFIG_VSN_RAMTRON),y) +CONFIGURED_APPS += vsn/ramtron +endif + +ifeq ($(CONFIG_VSN_SDCARD),y) +CONFIGURED_APPS += vsn/sdcard +endif + +ifeq ($(CONFIG_VSN_SYSINFO),y) +CONFIGURED_APPS += vsn/sysinfo +endif From d06103b98b453e7fd55d6dab1f0c9284e049b91e Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 16:59:24 +0000 Subject: [PATCH 09/95] Enhancements to the uIP web server from Kate git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5088 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 3 + apps/include/netutils/httpd.h | 3 + apps/netutils/webserver/Kconfig | 23 ++++- apps/netutils/webserver/Makefile | 9 +- apps/netutils/webserver/httpd.c | 118 ++++++++++++++++++------ apps/netutils/webserver/httpd.h | 7 +- apps/netutils/webserver/httpd_mmap.c | 131 +++++++++++++++++++++++++++ nuttx/ChangeLog | 3 + 8 files changed, 264 insertions(+), 33 deletions(-) create mode 100644 apps/netutils/webserver/httpd_mmap.c diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 5b75f40ed6..0713a2eb5b 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -305,3 +305,6 @@ netutils/webserver/httpd_fsdata.c has been replaced with a dynamically built configuration located at apps/examples/uip (Contributed by Max Holtzberg). + * apps/netutils/webserver: Several inenhancements from Kate including the + ability to elide scripting and SERVER headers and the ability to map + files into memory before transferring them. diff --git a/apps/include/netutils/httpd.h b/apps/include/netutils/httpd.h index 46a32bd621..bcecca73ba 100644 --- a/apps/include/netutils/httpd.h +++ b/apps/include/netutils/httpd.h @@ -96,6 +96,9 @@ struct httpd_fs_file { char *data; int len; +#ifdef CONFIG_NETUTILS_HTTPD_MMAP + int fd; +#endif }; struct httpd_state diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig index 2fb80fe959..b1a98f09bf 100644 --- a/apps/netutils/webserver/Kconfig +++ b/apps/netutils/webserver/Kconfig @@ -7,7 +7,28 @@ config NETUTILS_WEBSERVER bool "uIP web server" default n ---help--- - Enable support for the uIP web server. + Enable support for the uIP web server. This tiny web server was + from uIP 1.0, but has undergone many changes. It is, however, + still referred to as the "uIP" web server. if NETUTILS_WEBSERVER + +config NETUTILS_HTTPD_SCRIPT_DISABLE + bool "Disable %! scripting" + default n + ---help--- + This option, if selected, will elide the %! scripting + +config NETUTILS_HTTPD_SERVERHEADER_DISABLE, which elides the Server: header + bool "Disabled the SERVER header" + default n + ---help--- + This option, if selected, will elide the Server: header + +config NETUTILS_HTTPD_MMAP + bool "File mmap-ing" + default n + ---help--- + Replaces standard uIP server file open operations with mmap-ing operations. + endif diff --git a/apps/netutils/webserver/Makefile b/apps/netutils/webserver/Makefile index 174bcd0d75..6d96c8fc5f 100644 --- a/apps/netutils/webserver/Makefile +++ b/apps/netutils/webserver/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/netutils/webserver/Makefile # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -43,7 +43,12 @@ ASRCS = CSRCS = ifeq ($(CONFIG_NET_TCP),y) -CSRCS = httpd.c httpd_fs.c httpd_cgi.c +CSRCS = httpd.c httpd_cgi.c +ifeq ($(CONFIG_NETUTILS_HTTPD_MMAP),y) +CSRCS += httpd_mmap.c +else +CSRCS += httpd_fs.c +endif endif AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index c7c4a2291f..0e255416ac 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -77,6 +77,10 @@ #define ISO_slash 0x2f #define ISO_colon 0x3a +#ifndef CONFIG_NETUTILS_HTTPD_PATH +# define CONFIG_NETUTILS_HTTPD_PATH "/mnt" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -89,32 +93,60 @@ static const char g_httpcontenttypejpg[] = "Content-type: image/jpeg\r\n\r\n" static const char g_httpcontenttypeplain[] = "Content-type: text/plain\r\n\r\n"; static const char g_httpcontenttypepng[] = "Content-type: image/png\r\n\r\n"; -static const char g_httpextensionhtml[] = ".html"; +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE static const char g_httpextensionshtml[] = ".shtml"; +#endif +static const char g_httpextensionhtml[] = ".html"; static const char g_httpextensioncss[] = ".css"; static const char g_httpextensionpng[] = ".png"; static const char g_httpextensiongif[] = ".gif"; static const char g_httpextensionjpg[] = ".jpg"; static const char g_http404path[] = "/404.html"; +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE static const char g_httpindexpath[] = "/index.shtml"; +#else +static const char g_httpindexpath[] = "/index.html"; +#endif static const char g_httpcmdget[] = "GET "; static const char g_httpheader200[] = "HTTP/1.0 200 OK\r\n" +#ifndef CONFIG_NETUTILS_HTTPD_SERVERHEADER_DISABLE "Server: uIP/1.0 http://www.sics.se/~adam/uip/\r\n" +#endif "Connection: close\r\n"; static const char g_httpheader404[] = "HTTP/1.0 404 Not found\r\n" +#ifndef CONFIG_NETUTILS_HTTPD_SERVERHEADER_DISABLE "Server: uIP/1.0 http://www.sics.se/~adam/uip/\r\n" +#endif "Connection: close\r\n"; /**************************************************************************** * Private Functions ****************************************************************************/ +static int httpd_open(const char *name, struct httpd_fs_file *file) +{ +#ifdef CONFIG_NETUTILS_HTTPD_MMAP + return httpd_mmap_open(name, file); +#else + return httpd_fs_open(name, file); +#endif +} + +static int httpd_close(struct httpd_fs_file *file) +{ +#ifdef CONFIG_NETUTILS_HTTPD_MMAP + return httpd_mmap_close(file); +#else + return OK; +#endif +} + #ifdef CONFIG_NETUTILS_HTTPD_DUMPBUFFER static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { @@ -145,6 +177,7 @@ static void httpd_dumppstate(struct httpd_state *pstate, const char *msg) # define httpd_dumppstate(pstate, msg) #endif +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE static void next_scriptstate(struct httpd_state *pstate) { char *p; @@ -152,7 +185,9 @@ static void next_scriptstate(struct httpd_state *pstate) pstate->ht_scriptlen -= (unsigned short)(p - pstate->ht_scriptptr); pstate->ht_scriptptr = p; } +#endif +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE static int handle_script(struct httpd_state *pstate) { int len; @@ -168,8 +203,14 @@ static int handle_script(struct httpd_state *pstate) pstate->ht_scriptlen = pstate->ht_file.len - 3; if (*(pstate->ht_scriptptr - 1) == ISO_colon) { - httpd_fs_open(pstate->ht_scriptptr + 1, &pstate->ht_file); + if (httpd_open(pstate->ht_scriptptr + 1, &pstate->ht_file) != OK) + { + return ERROR; + } + send(pstate->ht_sockfd, pstate->ht_file.data, pstate->ht_file.len, 0); + + httpd_close(&pstate->ht_file); } else { @@ -223,6 +264,7 @@ static int handle_script(struct httpd_state *pstate) } return OK; } +#endif static int httpd_addchunk(struct httpd_state *pstate, const char *buffer, int len) { @@ -244,6 +286,7 @@ static int httpd_addchunk(struct httpd_state *pstate, const char *buffer, int le { chunklen = len; } + nvdbg("[%d] sndlen=%d len=%d newlen=%d chunklen=%d\n", pstate->ht_sockfd, pstate->ht_sndlen, len, newlen, chunklen); @@ -270,6 +313,7 @@ static int httpd_addchunk(struct httpd_state *pstate, const char *buffer, int le buffer += chunklen; } while (len > 0); + return OK; } @@ -282,9 +326,9 @@ static int httpd_flush(struct httpd_state *pstate) httpd_dumpbuffer("Outgoing buffer", pstate->ht_buffer, pstate->ht_sndlen); ret = send(pstate->ht_sockfd, pstate->ht_buffer, pstate->ht_sndlen, 0); if (ret >= 0) - { - pstate->ht_sndlen = 0; - } + { + pstate->ht_sndlen = 0; + } } return ret; } @@ -305,8 +349,11 @@ static int send_headers(struct httpd_state *pstate, const char *statushdr, int l { ret = httpd_addchunk(pstate, g_httpcontenttypebinary, strlen(g_httpcontenttypebinary)); } - else if (strncmp(g_httpextensionhtml, ptr, strlen(g_httpextensionhtml)) == 0 || - strncmp(g_httpextensionshtml, ptr, strlen(g_httpextensionshtml)) == 0) + else if (strncmp(g_httpextensionhtml, ptr, strlen(g_httpextensionhtml)) == 0 +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE + || strncmp(g_httpextensionshtml, ptr, strlen(g_httpextensionshtml)) == 0 +#endif + ) { ret = httpd_addchunk(pstate, g_httpcontenttypehtml, strlen(g_httpcontenttypehtml)); } @@ -336,17 +383,24 @@ static int send_headers(struct httpd_state *pstate, const char *statushdr, int l static int httpd_sendfile(struct httpd_state *pstate) { +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE char *ptr; +#endif int ret = ERROR; pstate->ht_sndlen = 0; nvdbg("[%d] sending file '%s'\n", pstate->ht_sockfd, pstate->ht_filename); - if (!httpd_fs_open(pstate->ht_filename, &pstate->ht_file)) + + if (httpd_open(pstate->ht_filename, &pstate->ht_file) != OK) { ndbg("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename); memcpy(pstate->ht_filename, g_http404path, strlen(g_http404path)); - httpd_fs_open(g_http404path, &pstate->ht_file); + if (httpd_open(g_http404path, &pstate->ht_file) != OK) + { + return ERROR; + } + if (send_headers(pstate, g_httpheader404, strlen(g_httpheader404)) == OK) { ret = httpd_addchunk(pstate, pstate->ht_file.data, pstate->ht_file.len); @@ -356,34 +410,38 @@ static int httpd_sendfile(struct httpd_state *pstate) { if (send_headers(pstate, g_httpheader200, strlen(g_httpheader200)) == OK) { - if (httpd_flush(pstate) < 0) - { - ret = ERROR; - } - else - { - ptr = strchr(pstate->ht_filename, ISO_period); - if (ptr != NULL && - strncmp(ptr, g_httpextensionshtml, strlen(g_httpextensionshtml)) == 0) - { - ret = handle_script(pstate); - } - else - { - ret = httpd_addchunk(pstate, pstate->ht_file.data, pstate->ht_file.len); - } - } + if (httpd_flush(pstate) < 0) + { + ret = ERROR; + } + else + { +#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE + ptr = strchr(pstate->ht_filename, ISO_period); + if (ptr != NULL && + strncmp(ptr, g_httpextensionshtml, strlen(g_httpextensionshtml)) == 0) + { + ret = handle_script(pstate); + } + else +#endif + { + ret = httpd_addchunk(pstate, pstate->ht_file.data, pstate->ht_file.len); + } + } } } + (void)httpd_close(&pstate->ht_file); + /* Send anything remaining in the buffer */ if (ret == OK && pstate->ht_sndlen > 0) { if (httpd_flush(pstate) < 0) - { - ret = ERROR; - } + { + ret = ERROR; + } } return ret; @@ -522,5 +580,7 @@ int httpd_listen(void) void httpd_init(void) { +#ifndef CONFIG_NETUTILS_HTTPD_MMAP httpd_fs_init(); +#endif } diff --git a/apps/netutils/webserver/httpd.h b/apps/netutils/webserver/httpd.h index 346159fb29..42a1e13f76 100644 --- a/apps/netutils/webserver/httpd.h +++ b/apps/netutils/webserver/httpd.h @@ -56,9 +56,14 @@ * Public Function Prototypes ****************************************************************************/ -/* file must be allocated by caller and will be filled in by the function. */ +/* 'file' must be allocated by caller and will be filled in by the function. */ int httpd_fs_open(const char *name, struct httpd_fs_file *file); void httpd_fs_init(void); +#ifdef CONFIG_NETUTILS_HTTPD_MMAP +int httpd_mmap_open(const char *name, struct httpd_fs_file *file); +int httpd_mmap_close(struct httpd_fs_file *file); +#endif + #endif /* _NETUTILS_WEBSERVER_HTTPD_H */ diff --git a/apps/netutils/webserver/httpd_mmap.c b/apps/netutils/webserver/httpd_mmap.c new file mode 100644 index 0000000000..301168a092 --- /dev/null +++ b/apps/netutils/webserver/httpd_mmap.c @@ -0,0 +1,131 @@ +/**************************************************************************** + * netutils/webserver/httpd_mmap.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Header Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "httpd.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +int httpd_mmap_open(const char *name, struct httpd_fs_file *file) +{ + char path[PATH_MAX]; + struct stat st; + + if (sizeof path < snprintf(path, sizeof path, "%s%s", + CONFIG_NETUTILS_HTTPD_PATH, name)) + { + errno = ENAMETOOLONG; + return ERROR; + } + + /* XXX: awaiting fstat to avoid a race */ + + if (-1 == stat(path, &st)) + { + return ERROR; + } + + if (st.st_size > INT_MAX) + { + errno = EFBIG; + return ERROR; + } + + file->fd = open(path, O_RDONLY); + if (file->fd == -1) + { + return ERROR; + } + + file->data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED | MAP_FILE, file->fd, 0); + if (file->data == MAP_FAILED) + { + (void) close(file->fd); + return ERROR; + } + + file->len = (int) st.st_size; + + return OK; +} + +int httpd_mmap_close(struct httpd_fs_file *file) +{ +#ifdef CONFIG_FS_RAMMAP + if (-1 == munmap(file->data, file->len)) + { + return ERROR; + } +#endif + + if (-1 == close(file->fd)) + { + return ERROR; + } + + return OK; +} diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index d331601aca..47bb4c3712 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3256,3 +3256,6 @@ only 16-bits wide and the SDIO DMA must be set up differently. * arch/arm/src/stm32/stm32_dma.c: Back out the 16-bit DMA change. It is incorrect. + * configs/: Make use of UART4/5 vs USART4/5 consistent in all places. + * Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean. + From e5581cb0bcf76c0bdc4cb32f92d41bdb23649895 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 18:01:54 +0000 Subject: [PATCH 10/95] Syntax error in last apps/netutils/webserver/Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5089 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/netutils/webserver/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig index b1a98f09bf..ef7171a8ef 100644 --- a/apps/netutils/webserver/Kconfig +++ b/apps/netutils/webserver/Kconfig @@ -19,11 +19,11 @@ config NETUTILS_HTTPD_SCRIPT_DISABLE ---help--- This option, if selected, will elide the %! scripting -config NETUTILS_HTTPD_SERVERHEADER_DISABLE, which elides the Server: header +config NETUTILS_HTTPD_SERVERHEADER_DISABLE bool "Disabled the SERVER header" default n ---help--- - This option, if selected, will elide the Server: header + This option, if selected, will elide the Server\: header config NETUTILS_HTTPD_MMAP bool "File mmap-ing" From fb06dd2182b71b763f349d98e7deab415db333c0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 23:59:24 +0000 Subject: [PATCH 11/95] Add sendfile() git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5090 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 + nuttx/include/sys/sendfile.h | 123 ++++++++++++++ nuttx/lib/Kconfig | 8 +- nuttx/lib/lib.csv | 1 + nuttx/lib/misc/Make.defs | 14 ++ nuttx/lib/misc/lib_dbg.c | 2 +- nuttx/lib/misc/lib_dumpbuffer.c | 2 +- nuttx/lib/misc/lib_filesem.c | 2 +- nuttx/lib/misc/lib_init.c | 2 +- nuttx/lib/misc/lib_sendfile.c | 277 ++++++++++++++++++++++++++++++++ nuttx/lib/misc/lib_streamsem.c | 2 +- 11 files changed, 429 insertions(+), 6 deletions(-) create mode 100644 nuttx/include/sys/sendfile.h create mode 100644 nuttx/lib/misc/lib_sendfile.c diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 47bb4c3712..a48619140d 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3258,4 +3258,6 @@ is incorrect. * configs/: Make use of UART4/5 vs USART4/5 consistent in all places. * Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean. + * lib/misc/sendfile.c and include/sys/sendfile.h: Add a Linux style + sendfile() (non-standard!) diff --git a/nuttx/include/sys/sendfile.h b/nuttx/include/sys/sendfile.h new file mode 100644 index 0000000000..0f3c05444a --- /dev/null +++ b/nuttx/include/sys/sendfile.h @@ -0,0 +1,123 @@ +/**************************************************************************** + * include/sys/sendfile.h + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __INCLUDE_SYS_SENDFILE_H +#define __INCLUDE_SYS_SENDFILE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_LIB_SENDFILE_BUFSIZE +# define CONFIG_LIB_SENDFILE_BUFSIZE 512 +#endif + +/**************************************************************************** + * Public Type Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/************************************************************************ + * Name: sendfile + * + * Description: + * sendfile() copies data between one file descriptor and another. + * sendfile() basically just wraps a sequence of reads() and writes() + * to perform a copy. It serves a purpose in systems where there is + * a penalty for copies to between user and kernal space, but really + * nothing in NuttX but provide some Linux compatible (and adding + * another 'almost standard' interface). + * + * NOTE: This interface is *not* specified in POSIX.1-2001, or other + * standards. The implementation here is very similar to the Linux + * sendfile interface. Other UNIX systems implement sendfile() with + * different semantics and prototypes. sendfile() should not be used + * in portable programs. + * + * Input Parmeters: + * infd - A file (or socket) descriptor opened for reading + * outfd - A descriptor opened for writing. + * offset - If 'offset' is not NULL, then it points to a variable + * holding the file offset from which sendfile() will start + * reading data from 'infd'. When sendfile() returns, this + * variable will be set to the offset of the byte following + * the last byte that was read. If 'offset' is not NULL, + * then sendfile() does not modify the current file offset of + * 'infd'; otherwise the current file offset is adjusted to + * reflect the number of bytes read from 'infd.' + * + * If 'offset' is NULL, then data will be read from 'infd' + * starting at the current file offset, and the file offset + * will be updated by the call. + * count - The number of bytes to copy between the file descriptors. + * + * Returned Value: + * If the transfer was successful, the number of bytes written to outfd is + * returned. On error, -1 is returned, and errno is set appropriately. + * There error values are those returned by read() or write() plus: + * + * EINVAL - Bad input parameters. + * ENOMEM - Could not allocated an I/O buffer + * + ************************************************************************/ + +EXTERN ssize_t sendfile (int outfd, int infd, FAR off_t *offset, size_t count); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __INCLUDE_SYS_SENDFILE_H */ diff --git a/nuttx/lib/Kconfig b/nuttx/lib/Kconfig index d94a274f9b..1f9bc07df3 100644 --- a/nuttx/lib/Kconfig +++ b/nuttx/lib/Kconfig @@ -96,7 +96,13 @@ config ARCH_LOWPUTC default "y" ---help--- architecture supports low-level, boot time console output - + +config LIB_SENDFILE_BUFSIZE + int "sendfile() buffer size" + default 512 + ---help--- + Size of the I/O buffer to allocate in sendfile(). Default: 512b + config ENABLE_ARCH_OPTIMIZED_FUN bool "Enable arch optimized functions" default n diff --git a/nuttx/lib/lib.csv b/nuttx/lib/lib.csv index aa63653f5c..171f64e9b7 100644 --- a/nuttx/lib/lib.csv +++ b/nuttx/lib/lib.csv @@ -109,6 +109,7 @@ "sched_get_priority_min","sched.h","","int","int" "sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *" "sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int" +"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t" "sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int" "sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int" "sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *" diff --git a/nuttx/lib/misc/Make.defs b/nuttx/lib/misc/Make.defs index 484f822d0f..c12533f754 100644 --- a/nuttx/lib/misc/Make.defs +++ b/nuttx/lib/misc/Make.defs @@ -37,9 +37,23 @@ CSRCS += lib_init.c lib_filesem.c +# Add C files that depend on file OR socket descriptors + ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) + +CSRCS += lib_sendfile.c ifneq ($(CONFIG_NFILE_STREAMS),0) CSRCS += lib_streamsem.c +endif + +else +ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) + +CSRCS += lib_sendfile.c +ifneq ($(CONFIG_NFILE_STREAMS),0) +CSRCS += lib_streamsem.c +endif + endif endif diff --git a/nuttx/lib/misc/lib_dbg.c b/nuttx/lib/misc/lib_dbg.c index 6f326bf4fc..aacdaa30a9 100644 --- a/nuttx/lib/misc/lib_dbg.c +++ b/nuttx/lib/misc/lib_dbg.c @@ -2,7 +2,7 @@ * lib/misc/lib_dbg.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/misc/lib_dumpbuffer.c b/nuttx/lib/misc/lib_dumpbuffer.c index 1f1f54e8db..155468ca12 100644 --- a/nuttx/lib/misc/lib_dumpbuffer.c +++ b/nuttx/lib/misc/lib_dumpbuffer.c @@ -2,7 +2,7 @@ * lib/misc/lib_dumpbuffer.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/misc/lib_filesem.c b/nuttx/lib/misc/lib_filesem.c index e6a3fdb671..1d1f25c2fd 100644 --- a/nuttx/lib/misc/lib_filesem.c +++ b/nuttx/lib/misc/lib_filesem.c @@ -2,7 +2,7 @@ * lib/misc/lib_filesem.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/misc/lib_init.c b/nuttx/lib/misc/lib_init.c index fb246b1ad3..3403a837b9 100644 --- a/nuttx/lib/misc/lib_init.c +++ b/nuttx/lib/misc/lib_init.c @@ -2,7 +2,7 @@ * lib/misc/lib_init.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/misc/lib_sendfile.c b/nuttx/lib/misc/lib_sendfile.c new file mode 100644 index 0000000000..7d7a781f58 --- /dev/null +++ b/nuttx/lib/misc/lib_sendfile.c @@ -0,0 +1,277 @@ +/************************************************************************ + * lib/misc/lib_streamsem.c + * + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************/ + +/************************************************************************ + * Included Files + ************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +#if CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 + +/************************************************************************ + * Private types + ************************************************************************/ + +/************************************************************************ + * Private Variables + ************************************************************************/ + +/************************************************************************ + * Public Variables + ************************************************************************/ + +/************************************************************************ + * Private Functions + ************************************************************************/ + +/************************************************************************ + * Public Functions + ************************************************************************/ + +/************************************************************************ + * Name: sendfile + * + * Description: + * sendfile() copies data between one file descriptor and another. + * sendfile() basically just wraps a sequence of reads() and writes() + * to perform a copy. It serves a purpose in systems where there is + * a penalty for copies to between user and kernal space, but really + * nothing in NuttX but provide some Linux compatible (and adding + * another 'almost standard' interface). + * + * NOTE: This interface is *not* specified in POSIX.1-2001, or other + * standards. The implementation here is very similar to the Linux + * sendfile interface. Other UNIX systems implement sendfile() with + * different semantics and prototypes. sendfile() should not be used + * in portable programs. + * + * Input Parmeters: + * infd - A file (or socket) descriptor opened for reading + * outfd - A descriptor opened for writing. + * offset - If 'offset' is not NULL, then it points to a variable + * holding the file offset from which sendfile() will start + * reading data from 'infd'. When sendfile() returns, this + * variable will be set to the offset of the byte following + * the last byte that was read. If 'offset' is not NULL, + * then sendfile() does not modify the current file offset of + * 'infd'; otherwise the current file offset is adjusted to + * reflect the number of bytes read from 'infd.' + * + * If 'offset' is NULL, then data will be read from 'infd' + * starting at the current file offset, and the file offset + * will be updated by the call. + * count - The number of bytes to copy between the file descriptors. + * + * Returned Value: + * If the transfer was successful, the number of bytes written to outfd is + * returned. On error, -1 is returned, and errno is set appropriately. + * There error values are those returned by read() or write() plus: + * + * EINVAL - Bad input parameters. + * ENOMEM - Could not allocated an I/O buffer + * + ************************************************************************/ + +ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) +{ + FAR uint8_t *iobuffer; + off_t startpos = 0; + ssize_t nbytesread; + ssize_t nbyteswritten; + size_t ntransferred; + bool endxfr; + + /* Get the current file position. */ + + if (offset) + { + /* Use lseek to get the current position */ + + startpos = lseek(infd, 0, SEEK_CUR); + if (startpos == (off_t)-1) + { + return ERROR; + } + + /* Use lseek again to set the new position */ + + if (lseek(infd, *offset, SEEK_SET) == (off_t)-1) + { + return ERROR; + } + } + + /* Allocate an I/O buffer */ + + iobuffer = (FAR void *)malloc(CONFIG_LIB_SENDFILE_BUFSIZE); + if (!iobuffer) + { + set_errno(ENOMEM); + return ERROR; + } + + /* Now transfer 'count' bytes from the infd to the outfd */ + + for (ntransferred = 0, endxfr = false; ntransferred < count && !endxfr; ) + { + /* Loop until the read side of the transfer comes to some conclusion */ + + do + { + /* Read a buffer of data from the infd */ + + nbytesread = read(infd, iobuffer, CONFIG_LIB_SENDFILE_BUFSIZE); + + /* Check for end of file */ + + if (nbytesread == 0) + { + /* End of file. Break out and return current number of bytes + * transferred. + */ + + endxfr = true; + break; + } + + /* Check for a read ERROR. EINTR is a special case. This function + * should break out and return an error if EINTR is returned and + * no data has been transferred. But what should it do if some + * data has been transferred? I suppose just continue? + */ + + else if (nbytesread < 0) + { + /* EINTR is not an error (but will still stop the copy) */ + +#ifndef CONFIG_DISABLE_SIGNALS + if (errno != EINTR || ntransferred == 0) +#endif + { + /* Read error. Break out and return the error condition. */ + + ntransferred = ERROR; + endxfr = true; + break; + } + } + } + while (nbytesread < 0); + + /* Was anything read? */ + + if (!endxfr) + { + /* Yes.. Loop until the read side of the transfer comes to some + * conclusion. + */ + + do + { + nbyteswritten = write(outfd, iobuffer, nbytesread); + + /* Check for a complete (or parial write) */ + + if (nbyteswritten >= 0) + { + nbytesread -= nbyteswritten; + } + + /* Otherwise an error occurred (write should not return zero) */ + + else + { + /* Check for a read ERROR. EINTR is a special case. This + * function should break out and return an error if EINTR + * is returned and no data has been transferred. But what + * should it do if some data has been transferred? I + * suppose just continue? + */ + +#ifndef CONFIG_DISABLE_SIGNALS + if (errno != EINTR || ntransferred == 0) +#endif + { + /* Write error. Break out and return the error condition */ + + ntransferred = ERROR; + endxfr = true; + break; + } + } + } + while (nbytesread > 0); + } + } + + /* Release the I/O buffer */ + + free(iobuffer); + + /* Get the current file position */ + + if (offset) + { + /* Use lseek to get the current position */ + + off_t curpos = lseek(infd, 0, SEEK_CUR); + if (curpos == (off_t)-1) + { + return ERROR; + } + + /* Return the current file position */ + + *offset = curpos; + + /* Use lseek again to restore the original position */ + + if (lseek(infd, startpos, SEEK_SET) == (off_t)-1) + { + return ERROR; + } + } + + return ntransferred; +} + +#endif /* CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 */ \ No newline at end of file diff --git a/nuttx/lib/misc/lib_streamsem.c b/nuttx/lib/misc/lib_streamsem.c index 3d86ab280e..fdf494e751 100644 --- a/nuttx/lib/misc/lib_streamsem.c +++ b/nuttx/lib/misc/lib_streamsem.c @@ -2,7 +2,7 @@ * lib/misc/lib_streamsem.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From bdd2c5b28836a80e3a79be23bfe45fd159203d8a Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 01:59:54 +0000 Subject: [PATCH 12/95] Oops.. sendfile() was not keeping track of the number bytes transferred or handling partial writes correctly. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5091 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/lib/misc/lib_sendfile.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/nuttx/lib/misc/lib_sendfile.c b/nuttx/lib/misc/lib_sendfile.c index 7d7a781f58..b7959482e3 100644 --- a/nuttx/lib/misc/lib_sendfile.c +++ b/nuttx/lib/misc/lib_sendfile.c @@ -114,6 +114,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) { FAR uint8_t *iobuffer; + FAR uint8_t *wrbuffer; off_t startpos = 0; ssize_t nbytesread; ssize_t nbyteswritten; @@ -205,18 +206,31 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) * conclusion. */ + wrbuffer = iobuffer; do { - nbyteswritten = write(outfd, iobuffer, nbytesread); + nbyteswritten = write(outfd, wrbuffer, nbytesread); - /* Check for a complete (or parial write) */ + /* Check for a complete (or parial write). write() should not + * return zero. + */ if (nbyteswritten >= 0) { - nbytesread -= nbyteswritten; + /* Advance the buffer pointer and decrement the number of bytes + * remaining in the iobuffer. Typically, nbytesread will now + * be zero. + */ + + wrbuffer += nbyteswritten; + nbytesread -= nbyteswritten; + + /* Increment the total number of bytes successfully transferred. */ + + ntransferred += nbyteswritten; } - /* Otherwise an error occurred (write should not return zero) */ + /* Otherwise an error occurred */ else { From 8870a08597a5dc66b762f1badd7fbc11f2fe3241 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 12:45:35 +0000 Subject: [PATCH 13/95] Refactor serial configuratin; AVR teensy Kconfig now builds git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5092 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/nsh/Kconfig | 2 + nuttx/ChangeLog | 3 +- nuttx/arch/arm/src/lpc43xx/Kconfig | 156 +----------- nuttx/arch/arm/src/stm32/Kconfig | 200 +--------------- nuttx/arch/avr/Kconfig | 8 + nuttx/arch/mips/src/pic32mx/Kconfig | 18 -- nuttx/drivers/serial/Kconfig | 354 ++++++++++++++++++++++++++++ nuttx/lib/misc/lib_sendfile.c | 18 +- 8 files changed, 385 insertions(+), 374 deletions(-) diff --git a/apps/examples/nsh/Kconfig b/apps/examples/nsh/Kconfig index 289c7e515e..309aa925eb 100644 --- a/apps/examples/nsh/Kconfig +++ b/apps/examples/nsh/Kconfig @@ -6,6 +6,8 @@ config EXAMPLES_NSH bool "NuttShell (NSH) example" default n + select NSH_LIBRARY + select SYSTEM_READLINE ---help--- Enable the NuttShell (NSH) example diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index a48619140d..66fc415138 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3260,4 +3260,5 @@ * Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean. * lib/misc/sendfile.c and include/sys/sendfile.h: Add a Linux style sendfile() (non-standard!) - + * Kconfig: Refactor serial settings (moved from chip to drivers/serial). + AVR "teensy" now builds with Kconfig (contributed by Richard Cochran). diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 68d705e3ef..351b940aa1 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -256,6 +256,7 @@ config LPC43_TMR3 config LPC43_USART0 bool "USART0" + select ARCH_HAS_USART0 default n config LPC43_UART1 @@ -264,10 +265,12 @@ config LPC43_UART1 config LPC43_USART2 bool "USART2" + select ARCH_HAS_USART2 default n config LPC43_USART3 bool "USART3" + select ARCH_HAS_USART3 default n config LPC43_USB0 @@ -289,64 +292,9 @@ config LPC43_WWDT endmenu -menu "USART0 Configuration" - depends on LPC43_USART0 - -config USART0_SERIAL_CONSOLE - bool "USART0 serial console" - default y - ---help--- - Selects the USART0 for the console and ttys0 (default is the USART0). - -config USART0_RXBUFSIZE - int "USART0 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART0_TXBUFSIZE - int "USART0 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART0_BAUD - int "USART0 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART0_BITS - int "USART0 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART0_PARITY - int "USART0 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART0_2STOP - int "USART0 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - menu "UART1 Configuration" depends on LPC43_UART1 -config UART1_SERIAL_CONSOLE - bool "UART1 serial console" - default y if !LPC43_USART0 - ---help--- - Selects the UART1 for the console and ttys0 (default is the UART1). - config UART1_RXBUFSIZE int "UART1 Rx buffer size" default 256 @@ -387,104 +335,6 @@ config UART1_2STOP endmenu -menu "USART2 Configuration" - depends on LPC43_USART2 - -config USART2_SERIAL_CONSOLE - bool "USART2 serial console" - default y if !LPC43_USART0 && !LPC43_UART1 - ---help--- - Selects the USART2 for the console and ttys0 (default is the USART2). - -config USART2_RXBUFSIZE - int "USART2 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART2_TXBUFSIZE - int "USART2 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART2_BAUD - int "USART2 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART2_BITS - int "USART2 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART2_PARITY - int "USART2 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART2_2STOP - int "USART2 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "USART3 Configuration" - depends on LPC43_USART3 - -config USART3_SERIAL_CONSOLE - bool "USART3 serial console" - default y if !LPC43_USART0 && !LPC43_UART1 && !LPC43_USART2 - ---help--- - Selects the USART3 for the console and ttys0 (default is the USART3). - -config USART3_RXBUFSIZE - int "USART3 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART3_TXBUFSIZE - int "USART3 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART3_BAUD - int "USART3 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART3_BITS - int "USART3 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART3_PARITY - int "USART3 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART3_2STOP - int "USART3 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3 diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 695fe8e94d..0aa1f76b71 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -288,14 +288,17 @@ config STM32_TIM14 config STM32_USART1 bool "USART1" + select ARCH_HAS_USART1 default n config STM32_USART2 bool "USART2" + select ARCH_HAS_USART2 default n config STM32_USART3 bool "USART3" + select ARCH_HAS_USART3 default n config STM32_UART4 @@ -309,6 +312,7 @@ config STM32_UART5 config STM32_USART6 bool "USART6" default n + select ARCH_HAS_USART6 depends on STM32_STM32F20XX || STM32_STM32F40XX config STM32_USB @@ -1420,53 +1424,6 @@ config STM32_TIM14_DAC2 endchoice -menu "USART1 Configuration" - depends on STM32_USART1 - -config USART1_SERIAL_CONSOLE - bool "USART1 serial console" - default y - ---help--- - Selects the USART1 for the console and ttys0 (default is the USART1). - -config USART1_RXBUFSIZE - int "USART1 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART1_TXBUFSIZE - int "USART1 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART1_BAUD - int "USART1 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART1_BITS - int "USART1 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART1_PARITY - int "USART1 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART1_2STOP - int "USART1 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART1_RXDMA bool "USART1 Rx DMA" default n @@ -1474,55 +1431,6 @@ config USART1_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - -menu "USART2 Configuration" - depends on STM32_USART2 - -config USART2_SERIAL_CONSOLE - bool "USART2 serial console" - default y if !STM32_USART1 - ---help--- - Selects the USART2 for the console and ttys0 (default is the USART2). - -config USART2_RXBUFSIZE - int "USART2 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART2_TXBUFSIZE - int "USART2 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART2_BAUD - int "USART2 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART2_BITS - int "USART2 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART2_PARITY - int "USART2 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART2_2STOP - int "USART2 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART2_RXDMA bool "USART2 Rx DMA" default n @@ -1530,55 +1438,6 @@ config USART2_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - -menu "USART3 Configuration" - depends on STM32_USART3 - -config USART3_SERIAL_CONSOLE - bool "USART3 serial console" - default y if !STM32_USART1 && !STM32_USART2 - ---help--- - Selects the USART3 for the console and ttys0 (default is the USART3). - -config USART3_RXBUFSIZE - int "USART3 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART3_TXBUFSIZE - int "USART3 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART3_BAUD - int "USART3 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART3_BITS - int "USART3 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART3_PARITY - int "USART3 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART3_2STOP - int "USART3 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART3_RXDMA bool "USART3 Rx DMA" default n @@ -1586,8 +1445,6 @@ config USART3_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - menu "UART4 Configuration" depends on STM32_UART4 @@ -1700,53 +1557,6 @@ config UART5_RXDMA endmenu -menu "USART6 Configuration" - depends on STM32_USART6 - -config USART6_SERIAL_CONSOLE - bool "USART6 serial console" - default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4 && !STM32_UART5 - ---help--- - Selects the USART6 for the console and ttys0 (default is the USART6). - -config USART6_RXBUFSIZE - int "USART6 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART6_TXBUFSIZE - int "USART6 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART6_BAUD - int "USART6 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART6_BITS - int "USART6 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART6_PARITY - int "USART6 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART6_2STOP - int "USART6 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART6_RXDMA bool "USART6 Rx DMA" default n @@ -1754,8 +1564,6 @@ config USART6_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 diff --git a/nuttx/arch/avr/Kconfig b/nuttx/arch/avr/Kconfig index 0fe839b795..0108371425 100644 --- a/nuttx/arch/avr/Kconfig +++ b/nuttx/arch/avr/Kconfig @@ -116,4 +116,12 @@ source arch/avr/src/atmega/Kconfig source arch/avr/src/avr32/Kconfig source arch/avr/src/at32uc3/Kconfig +config AVR_USART0 + bool "USART0 specific serial device driver settings" + select ARCH_HAS_USART0 + +config AVR_USART1 + bool "USART1 specific serial device driver settings" + select ARCH_HAS_USART1 + endif diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 7c2c9bb23d..908046f833 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -909,12 +909,6 @@ endmenu menu "UART1 Configuration" depends on PIC32MX_UART1 -config UART1_SERIAL_CONSOLE - bool "UART1 serial console" - default y - ---help--- - Selects the UART1 for the console and ttys0. Default: UART1 (if enabled). - config UART1_RXBUFSIZE int "UART1 Rx buffer size" default 256 @@ -956,12 +950,6 @@ endmenu menu "UART2 Configuration" depends on PIC32MX_UART2 -config UART2_SERIAL_CONSOLE - bool "UART2 serial console" - default y if !PIC32MX_UART1 - ---help--- - Selects the UART2 for the console and ttys0. Default: UART2 (if enabled). - config UART2_RXBUFSIZE int "UART2 Rx buffer size" default 256 @@ -1003,12 +991,6 @@ endmenu menu "UART3 Configuration" depends on PIC32MX_UART3 -config UART3_SERIAL_CONSOLE - bool "UART3 serial console" - default y if !PIC32MX_UART1 && !PIC32MX_UART2 - ---help--- - Selects the UART3 for the console and ttys0. Default: UART3 (if enabled). - config UART3_RXBUFSIZE int "UART3 Rx buffer size" default 256 diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig index 96052fad38..df80a1ded5 100644 --- a/nuttx/drivers/serial/Kconfig +++ b/nuttx/drivers/serial/Kconfig @@ -282,4 +282,358 @@ config CONFIG_SERIAL_NPOLLWAITERS endif +# +# USARTn_XYZ settings +# +config ARCH_HAS_USART0 + bool +config ARCH_HAS_USART1 + bool +config ARCH_HAS_USART2 + bool +config ARCH_HAS_USART3 + bool +config ARCH_HAS_USART4 + bool +config ARCH_HAS_USART5 + bool +config ARCH_HAS_USART6 + bool + +choice + prompt "Serial console" + depends on ARCH_HAS_USART0 || \ + ARCH_HAS_USART1 || ARCH_HAS_USART2 || ARCH_HAS_USART3 || \ + ARCH_HAS_USART4 || ARCH_HAS_USART5 || ARCH_HAS_USART6 + +config USART0_SERIAL_CONSOLE + bool "USART0" + depends on ARCH_HAS_USART0 + +config USART1_SERIAL_CONSOLE + bool "USART1" + depends on ARCH_HAS_USART1 + +config USART2_SERIAL_CONSOLE + bool "USART2" + depends on ARCH_HAS_USART2 + +config USART3_SERIAL_CONSOLE + bool "USART3" + depends on ARCH_HAS_USART3 + +config USART4_SERIAL_CONSOLE + bool "USART4" + depends on ARCH_HAS_USART4 + +config USART5_SERIAL_CONSOLE + bool "USART5" + depends on ARCH_HAS_USART5 + +config USART6_SERIAL_CONSOLE + bool "USART6" + depends on ARCH_HAS_USART6 + +endchoice + +menu "USART0 Configuration" + depends on ARCH_HAS_USART0 + +config USART0_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART0_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART0_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART0_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART0_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART0_2STOP + int "use 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART1 Configuration" + depends on ARCH_HAS_USART1 + +config USART1_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART1_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART1_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART1_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART1_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART1_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART2 Configuration" + depends on ARCH_HAS_USART2 + +config USART2_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART2_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART2_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART2_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART2_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART2_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART3 Configuration" + depends on ARCH_HAS_USART3 + +config USART3_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART3_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART3_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART3_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART3_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART3_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART4 Configuration" + depends on ARCH_HAS_USART4 + +config USART4_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART4_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART4_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART4_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART4_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART4_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART5 Configuration" + depends on ARCH_HAS_USART5 + +config USART5_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART5_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART5_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART5_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART5_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART5_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "USART6 Configuration" + depends on ARCH_HAS_USART6 + +config USART6_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config USART6_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config USART6_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the USART. + +config USART6_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config USART6_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config USART6_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu diff --git a/nuttx/lib/misc/lib_sendfile.c b/nuttx/lib/misc/lib_sendfile.c index b7959482e3..e4b53d8c87 100644 --- a/nuttx/lib/misc/lib_sendfile.c +++ b/nuttx/lib/misc/lib_sendfile.c @@ -125,7 +125,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) if (offset) { - /* Use lseek to get the current position */ + /* Use lseek to get the current file position */ startpos = lseek(infd, 0, SEEK_CUR); if (startpos == (off_t)-1) @@ -133,7 +133,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) return ERROR; } - /* Use lseek again to set the new position */ + /* Use lseek again to set the new file position */ if (lseek(infd, *offset, SEEK_SET) == (off_t)-1) { @@ -209,9 +209,11 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) wrbuffer = iobuffer; do { + /* Write the buffer of data to the outfd */ + nbyteswritten = write(outfd, wrbuffer, nbytesread); - /* Check for a complete (or parial write). write() should not + /* Check for a complete (or parial) write. write() should not * return zero. */ @@ -261,11 +263,11 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) free(iobuffer); - /* Get the current file position */ + /* Return the current file position */ if (offset) { - /* Use lseek to get the current position */ + /* Use lseek to get the current file position */ off_t curpos = lseek(infd, 0, SEEK_CUR); if (curpos == (off_t)-1) @@ -277,7 +279,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) *offset = curpos; - /* Use lseek again to restore the original position */ + /* Use lseek again to restore the original file position */ if (lseek(infd, startpos, SEEK_SET) == (off_t)-1) { @@ -285,6 +287,10 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) } } + /* Finally return the number of bytes actually transferred (or ERROR + * if any failure occurred). + */ + return ntransferred; } From 37c517c25c0f3911cc18d6c138b37d82056f99b7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 13:18:14 +0000 Subject: [PATCH 14/95] Things missing from lib/Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5093 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/lib/Kconfig | 122 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 101 insertions(+), 21 deletions(-) diff --git a/nuttx/lib/Kconfig b/nuttx/lib/Kconfig index 1f9bc07df3..e3348f26b6 100644 --- a/nuttx/lib/Kconfig +++ b/nuttx/lib/Kconfig @@ -82,41 +82,53 @@ config LIBC_PERROR_STDOUT be defined, however, to provide perror() output that is serialized with other stdout messages. -config LIBC_PERROR_DEVNAME - string "perror() to device" - default "/dev/console" - depends on !LIBC_PERROR_STDOUT - ---help--- - Another non-standard option is to provide perror() output to a logging device - or file. LIBC_PERROR_DEVNAME may be defined to be any write-able, - character device (or file). - config ARCH_LOWPUTC bool "Low-level console output" default "y" ---help--- - architecture supports low-level, boot time console output + architecture supports low-level, boot time console output config LIB_SENDFILE_BUFSIZE int "sendfile() buffer size" default 512 ---help--- - Size of the I/O buffer to allocate in sendfile(). Default: 512b + Size of the I/O buffer to allocate in sendfile(). Default: 512b -config ENABLE_ARCH_OPTIMIZED_FUN +config ARCH_ROMGETC + bool "Support for ROM string access" + default n + ---help--- + In Harvard architectures, data accesses and instruction accesses + occur on different busses, perhaps concurrently. All data accesses + are performed on the data bus unless special machine instructions + are used to read data from the instruction address space. Also, in + the typical MCU, the available SRAM data memory is much smaller that + the non-volatile FLASH instruction memory. So if the application + requires many constant strings, the only practical solution may be + to store those constant strings in FLASH memory where they can only + be accessed using architecture-specific machine instructions. + + If ARCH_ROMGETC is defined, then the architecture logic must export + the function up_romgetc(). up_romgetc() will simply read one byte + of data from the instruction space. + + If ARCH_ROMGETC, certain C stdio functions are effected: (1) All + format strings in printf, fprintf, sprintf, etc. are assumed to lie + in FLASH (string arguments for %s are still assumed to reside in SRAM). + And (2), the string argument to puts and fputs is assumed to reside + in FLASH. Clearly, these assumptions may have to modified for the + particular needs of your environment. There is no "one-size-fits-all" + solution for this problem. + +config ARCH_OPTIMIZED_FUNCTIONS bool "Enable arch optimized functions" default n ---help--- - Allow for architecture optimized implementations - - The architecture can provide optimized versions of the - following to improve system performance + Allow for architecture optimized implementations of certain library + functions. Architecture-specific implementations can improve overall + system performance. - The architecture may provide custom versions of certain - standard header files: - config ARCH_MATH_H, ARCH_STDBOOL_H, ARCH_STDINT_H - -if ENABLE_ARCH_OPTIMIZED_FUN +if ARCH_OPTIMIZED_FUNCTIONS config ARCH_MEMCPY bool "memcpy" default n @@ -157,3 +169,71 @@ config ARCH_BZERO bool "bzero" default n endif + +config ARCH_HEADER_FILES + bool "Customize header files" + default n + ---help--- + The architecture may provide custom versions of certain + standard header files + +if ARCH_HEADER_FILES +config ARCH_STDBOOL_H + bool "stdbool.h" + default n + ---help--- + The stdbool.h header file can be found at nuttx/include/stdbool.h. + However, that header includes logic to redirect the inclusion of an + architecture specific header file like: + + #ifdef CONFIG_ARCH_STDBOOL_H + # include + #else + ... + #endif + + Recall that that include path, include/arch, is a symbolic link and + will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h. + +config ARCH_MATH_H + bool "math.h" + default n + ---help--- + There is also a re-directing version of math.h in the source tree. + However, it resides out-of-the-way at include/nuttx/math.h because it + conflicts too often with the system math.h. If ARCH_MATH_H=y is + defined, however, the top-level makefile will copy the redirecting + math.h header file from include/nuttx/math.h to include/math.h. math.h + will then include the architecture-specific version of math.h that you + must provide at nuttx/arch/>architecture + #endif + + So for the architectures that define ARCH_MATH_H=y, include/math.h + will be the redirecting math.h header file; for the architectures + that don't select ARCH_MATH_H, the redirecting math.h header file + will stay out-of-the-way in include/nuttx/. + +config ARCH_STDARG_H + bool "stdarg.h" + default n + ---help--- + There is also a redirecting version of stdarg.h in the source tree + as well. It also resides out-of-the-way at include/nuttx/stdarg.h. + This is because you should normally use your toolchain's stdarg.h + file. But sometimes, your toolchain's stdarg.h file may have other + header file dependencies and so may not be usable in the NuttX build + environment. In those cases, you may have to create a architecture- + specific stdarg.h header file at nuttx/arch//include/stdarg.h + + If ARCH_STDARG_H=y is defined, the top-level makefile will copy the + re-directing stdarg.h header file from include/nuttx/stdarg.h to + include/stdarg.h. So for the architectures that cannot use their + toolchain's stdarg.h file, they can use this alternative by defining + ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then + the stdarg.h header file will stay out-of-the-way in include/nuttx/. + +endif + From 77c753b32ad4cad3d6988e4720868c29e1479e66 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 17:20:19 +0000 Subject: [PATCH 15/95] Add Kconfig settings for the LPC17xx git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5094 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/nshlib/Kconfig | 1 + nuttx/Kconfig | 73 +++- nuttx/arch/arm/src/lpc17xx/Kconfig | 449 +++++++++++++++++++++++++ nuttx/arch/arm/src/lpc43xx/Kconfig | 44 +-- nuttx/arch/arm/src/stm32/Kconfig | 100 +----- nuttx/arch/mips/src/pic32mx/Kconfig | 288 +--------------- nuttx/configs/qemu-i486/nsh/defconfig | 60 ++-- nuttx/drivers/serial/Kconfig | 460 ++++++++++++++++++++++++-- nuttx/drivers/serial/uart_16550.c | 74 ++--- nuttx/lib/Kconfig | 68 ---- nuttx/net/Kconfig | 19 ++ 11 files changed, 1053 insertions(+), 583 deletions(-) diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index ff692f43ba..b03dcdc907 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -6,6 +6,7 @@ config NSH_LIBRARY bool "NSH Library" default n + select SYSTEM_READLINE ---help--- Build the NSH support library. This is used, for example, by examples/nsh in order to implement the full NuttShell (NSH). diff --git a/nuttx/Kconfig b/nuttx/Kconfig index 7c85401c44..fdd99ead06 100644 --- a/nuttx/Kconfig +++ b/nuttx/Kconfig @@ -152,26 +152,91 @@ config RAW_BINARY should not be selected if you are not using the GNU toolchain. endmenu +menu "Customize Header Files" + +config ARCH_STDBOOL_H + bool "stdbool.h" + default n + ---help--- + The stdbool.h header file can be found at nuttx/include/stdbool.h. + However, that header includes logic to redirect the inclusion of an + architecture specific header file like: + + #ifdef CONFIG_ARCH_STDBOOL_H + # include + #else + ... + #endif + + Recall that that include path, include/arch, is a symbolic link and + will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h. + +config ARCH_MATH_H + bool "math.h" + default n + ---help--- + There is also a re-directing version of math.h in the source tree. + However, it resides out-of-the-way at include/nuttx/math.h because it + conflicts too often with the system math.h. If ARCH_MATH_H=y is + defined, however, the top-level makefile will copy the redirecting + math.h header file from include/nuttx/math.h to include/math.h. math.h + will then include the architecture-specific version of math.h that you + must provide at nuttx/arch/>architecture + #endif + + So for the architectures that define ARCH_MATH_H=y, include/math.h + will be the redirecting math.h header file; for the architectures + that don't select ARCH_MATH_H, the redirecting math.h header file + will stay out-of-the-way in include/nuttx/. + +config ARCH_STDARG_H + bool "stdarg.h" + default n + ---help--- + There is also a redirecting version of stdarg.h in the source tree + as well. It also resides out-of-the-way at include/nuttx/stdarg.h. + This is because you should normally use your toolchain's stdarg.h + file. But sometimes, your toolchain's stdarg.h file may have other + header file dependencies and so may not be usable in the NuttX build + environment. In those cases, you may have to create a architecture- + specific stdarg.h header file at nuttx/arch//include/stdarg.h + + If ARCH_STDARG_H=y is defined, the top-level makefile will copy the + re-directing stdarg.h header file from include/nuttx/stdarg.h to + include/stdarg.h. So for the architectures that cannot use their + toolchain's stdarg.h file, they can use this alternative by defining + ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then + the stdarg.h header file will stay out-of-the-way in include/nuttx/. + +endmenu + menu "Debug Options" config DEBUG - bool "Enable debug output" + bool "Enable debug features" default n ---help--- - enables built-in debug options + Enables built-in debug features. Selecting this option will (1) Enable + debug assertions in the code, (2) enable extended parameter testing in + many functions, and (3) enable support for debug output. Note that enabling + this option by itself does not produce debug output. Debug output must + also be selected on a subsystem-by-subsystem basis. if DEBUG config DEBUG_VERBOSE bool "Enable debug verbose output" default n ---help--- - enables verbose debug output + Enables verbose debug output (assuming debug output is enabled) config DEBUG_ENABLE bool "Enable debug controls" default n ---help--- - Support an interface to enable or disable debug output. + Support an interface to dynamically enable or disable debug output. config DEBUG_SCHED bool "Enable scheduler debug output" diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index ae2bf31307..44e34f9f4c 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -2,3 +2,452 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +choice + prompt "NXP LPC17XX Chip Selection" + default ARCH_CHIP_LPC1768 + depends on ARCH_CHIP_LPC17XX + +config ARCH_CHIP_LPC1751 + bool "LPC1751" + +config ARCH_CHIP_LPC1752 + bool "LPC1752" + +config ARCH_CHIP_LPC1754 + bool "LPC1754" + +config ARCH_CHIP_LPC1756 + bool "LPC1756" + +config ARCH_CHIP_LPC1758 + bool "LPC1758" + +config ARCH_CHIP_LPC1759 + bool "LPC1759" + +config ARCH_CHIP_LPC1764 + bool "LPC1764" + +config ARCH_CHIP_LPC1765 + bool "LPC1765" + +config ARCH_CHIP_LPC1766 + bool "LPC1766" + +config ARCH_CHIP_LPC1767 + bool "LPC1767" + +config ARCH_CHIP_LPC1768 + bool "LPC1768" + +config ARCH_CHIP_LPC1769 + bool "LPC1769" + +endchoice + +config ARCH_FAMILY_LPC175X + bool + default y if ARCH_CHIP_LPC1751 || ARCH_CHIP_LPC1752 || ARCH_CHIP_LPC1754 || ARCH_CHIP_LPC1756 || ARCH_CHIP_LPC1758 || ARCH_CHIP_LPC1759 + +config ARCH_FAMILY_LPC176X + bool + default y if ARCH_CHIP_LPC1764 || ARCH_CHIP_LPC1765 || ARCH_CHIP_LPC1766 || ARCH_CHIP_LPC1767 || ARCH_CHIP_LPC1768 || ARCH_CHIP_LPC1769 + +config ARCH_CORTEXM3 + bool + default y if ARCH_CHIP_LPC17XX + +config ARCH_CORTEXM4 + bool + default n + +menu "LPC17xx Peripheral Support" + +config LPC17_MAINOSC + bool "Main oscillator" + default y + +config LPC17_PLL0 + bool "PLL0" + default y + +config LPC17_PLL1 + bool "PLL1" + default y + +config LPC17_ETHERNET + bool "Ethernet" + select NET + select ARCH_HAS_PHY + default n + +config LPC17_USBHOST + bool "USB host" + select USBHOST + default n + +config LPC17_USBDEV + bool "USB Device" + select USBDEV + default n + +config LPC17_USBOTG + bool "USB OTG" + default n + depends on LPC17_USBHOST && LPC17_USBDEV + +config LPC17_UART0 + bool "UART0" + select ARCH_HAS_UART0 + default n + +config LPC17_UART1 + bool "UART1" + select ARCH_HAS_UART1 + default n + +config LPC17_UART2 + bool "UART2" + select ARCH_HAS_UART2 + default n + +config LPC17_UART3 + bool "UART3" + select ARCH_HAS_UART3 + default n + +config LPC17_CAN1 + bool "CAN1" + select ARCH_HAS_UART4 + default n + +config LPC17_CAN2 + bool "CAN2" + default n + +config LPC17_SPI + bool "SPI" + default n + +config LPC17_SSP0 + bool "SSP0" + default n + +config LPC17_SSP1 + bool "SSP1" + default n + +config LPC17_I2C0 + bool "I2C0" + default n + +config LPC17_I2C1 + bool "I2C1" + default n + +config LPC17_I2S + bool "I2S" + default n + +config LPC17_TMR0 + bool "Timer 0" + default n + +config LPC17_TMR1 + bool "Timer 1" + default n + +config LPC17_TMR2 + bool "Timer 2" + default n + +config LPC17_TMR3 + bool "Timer 3" + default n + +config LPC17_RIT + bool "RIT" + default n + +config LPC17_PWM + bool "PWM" + default n + +config LPC17_MCPWM + bool "MCPWM" + default n + +config LPC17_QEI + bool "QEI" + default n + +config LPC17_RTC + bool "RTC" + default n + +config LPC17_WDT + bool "WDT" + default n + +config LPC17_ADC + bool "ADC" + default n + +config LPC17_DAC + bool "DAC" + default n + +config LPC17_GPDMA + bool "GPDMA" + default n + +config LPC17_FLASH + bool "FLASH" + default n + +endmenu + +config SERIAL_TERMIOS + bool "Serial driver TERMIOS supported" + depends on LPC17_UART0 || LPC17_UART1 || LPC17_UART2 || LPC17_UART3 + default n + ---help--- + Serial driver supports termios.h interfaces (tcsetattr, tcflush, etc.). + If this is not defined, then the terminal settings (baud, parity, etc). + are not configurable at runtime; serial streams cannot be flushed, etc.. + +menu "CAN driver options" + +config CAN_EXTID + bool "CAN extended IDs" + depends on LPC17_CAN1 || LPC17_CAN2 + default n + ---help--- + Enables support for the 29-bit extended ID. Default Standard 11-bit IDs. + +config CAN1_BAUD + int "CAN1 BAUD" + depends on LPC17_CAN1 + ---help--- + CAN1 BAUD rate. Required if LPC17_CAN1 is defined. + +config CAN2_BAUD + int "CAN2 BAUD" + depends on LPC17_CAN2 + ---help--- + CAN2 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. + +config CAN1_DIVISOR + int "CAN1 CCLK divisor" + depends on LPC17_CAN1 + default 4 + ---help--- + CAN1 is clocked at CCLK divided by this number. (the CCLK frequency is divided + by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4. + +config CAN2_DIVISOR + int "CAN2 CCLK divisor" + depends on LPC17_CAN2 + default 4 + ---help--- + CAN2 is clocked at CCLK divided by this number. (the CCLK frequency is divided + by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4. + +config CAN_TSEG1 + bool "TSEG1 quanta" + depends on LPC17_CAN1 || LPC17_CAN2 + default 6 + ---help--- + The number of CAN time quanta in segment 1. Default: 6 + +config CAN_TSEG2 + bool "TSEG2 quanta" + depends on LPC17_CAN1 || LPC17_CAN2 + default 4 + ---help--- + The number of CAN time quanta in segment 2. Default: 7 + +endmenu + +menu "Ethernet driver options" + +config PHY_AUTONEG + bool "Autonegiation" + depends on LPC17_ETHERNET + ---help--- + Enable auto-negotion + +config PHY_SPEED100 + bool "100Mbit/Sec" + depends on LPC17_ETHERNET && !PHY_AUTONEG + ---help--- + Select 100Mbit vs. 10Mbit speed. + +config PHY_FDUPLEX + bool "Full duplex" + depends on LPC17_ETHERNET && !PHY_AUTONEG + ---help--- + Select full (vs. half) duplex + +config NET_EMACRAM_SIZE + int "EMAC RAM Size" + depends on LPC17_ETHERNET + default 16384 + ---help--- + Size of EMAC RAM. Default: 16384 bytes + +config NET_NTXDESC + int "Number of Tx descriptors" + depends on LPC17_ETHERNET + default 18 + ---help--- + Configured number of Tx descriptors. Default: 18 + +config NET_NRXDESC + int "Number of Rx descriptors" + depends on LPC17_ETHERNET + default 18 + ---help--- + Configured number of Rx descriptors. Default: 18 + +config NET_PRIORITY + int "Ethernet interrupt priority" + depends on LPC17_ETHERNET + default 0 + ---help--- + Ethernet interrupt priority. The is default is the higest priority (0). + +config NET_WOL + bool "Wake-up on LAN" + depends on LPC17_ETHERNET + default n + ---help--- + Enable Wake-up on Lan (not fully implemented). + +config NET_REGDEBUG + bool "Ethernet register-level debug" + depends on LPC17_ETHERNET && DEBUG + default n + ---help--- + Enable low level register debug. Also needs DEBUG. + +config NET_DUMPPACKET + bool "Enable packet dumping" + depends on LPC17_ETHERNET && DEBUG + default n + ---help--- + Dump all received and transmitted packets. Also needs DEBUG. + +config NET_HASH + bool "Hashing" + depends on LPC17_ETHERNET + default n + ---help--- + Enable receipt of near-perfect match frames. + +config NET_MULTICAST + bool "Multicast" + depends on LPC17_ETHERNET + default y if NET_IGMP + default n if !NET_IGMP + ---help--- + Enable receipt of multicast (and unicast) frames. Automatically set + if NET_IGMP is selected. + +endmenu + +menu "USB device driver options" + +config LPC17_USBDEV_FRAME_INTERRUPT + bool "USB " + depends on LPC17_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 LPC17_USBDEV_EPFAST_INTERRUPT + bool "EP fast interrupt handling" + depends on LPC17_USBDEV + default n + ---help--- + Enable high priority interrupts. I have no idea why you might want to do that + +config LPC17_USBDEV_NDMADESCRIPTORS + int "Number of DMA descriptors" + depends on LPC17_USBDEV + default 8 + ---help--- + Number of DMA descriptors to allocate in SRAM. Default: 8 + +config LPC17_USBDEV_DMA + bool "Enable USB device DMA" + depends on LPC17_USBDEV + default n + ---help--- + Enable lpc17xx-specific DMA support + +config LPC17_USBDEV_NOVBUS + bool "Disable VBUS support" + depends on LPC17_USBDEV + default n + ---help--- + Define if the hardware implementation does not support the VBUS signal + +config LPC17_USBDEV_NOLED + bool "Disable USB device LCD support" + depends on LPC17_USBDEV + default n + ---help--- + Define if the hardware implementation does not support the LED output + +endmenu + +menu "USB host driver options" + +config USBHOST_OHCIRAM_SIZE + int "OHCI RAM Size" + depends on LPC17_USBHOST + default 16384 + ---help--- + Total size of OHCI RAM (in AHB SRAM Bank 1). Default: 16384 + +config USBHOST_NEDS + int "Number of Endpoint Descriptors" + depends on LPC17_USBHOST + default 2 + ---help--- + Number of endpoint descriptors. Default: 2 + +config USBHOST_NTDS + int "Number of transfer descriptors" + depends on LPC17_USBHOST + default 3 + ---help--- + Number of transfer descriptors. Default: 3 + +config USBHOST_TDBUFFERS + int "Number of descriptor buffers" + depends on LPC17_USBHOST + default 2 + ---help--- + Number of transfer descriptor buffers. Default: 2 + +config USBHOST_TDBUFSIZE + int "Descriptor buffer size" + depends on LPC17_USBHOST + default 128 + ---help--- + Size of one transfer descriptor buffer. Default 128 + +config USBHOST_IOBUFSIZE + int "I/O buffer size" + depends on LPC17_USBHOST + default 512 + ---help--- + Size of one end-user I/O buffer. This can be zero if the application + can guarantee that all end-user I/O buffers reside in AHB SRAM. + +endmenu diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 351b940aa1..3010046efa 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -261,6 +261,7 @@ config LPC43_USART0 config LPC43_UART1 bool "UART1" + select ARCH_HAS_UART1 default n config LPC43_USART2 @@ -292,49 +293,6 @@ config LPC43_WWDT endmenu -menu "UART1 Configuration" - depends on LPC43_UART1 - -config UART1_RXBUFSIZE - int "UART1 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config UART1_TXBUFSIZE - int "UART1 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config UART1_BAUD - int "UART1 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config UART1_BITS - int "UART1 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART1_PARITY - int "UART1 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART1_2STOP - int "UART1 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3 diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 0aa1f76b71..371d39ed4f 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -303,10 +303,12 @@ config STM32_USART3 config STM32_UART4 bool "UART4" + select ARCH_HAS_UART4 default n config STM32_UART5 bool "UART5" + select ARCH_HAS_UART5 default n config STM32_USART6 @@ -1445,53 +1447,6 @@ config USART3_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -menu "UART4 Configuration" - depends on STM32_UART4 - -config UART4_SERIAL_CONSOLE - bool "UART4 serial console" - default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 - ---help--- - Selects the UART4 for the console and ttys0 (default is the USART1). - -config UART4_RXBUFSIZE - int "UART4 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config UART4_TXBUFSIZE - int "UART4 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config UART4_BAUD - int "UART4 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config UART4_BITS - int "UART4 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART4_PARITY - int "UART4 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART4_2STOP - int "UART4 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config UART4_RXDMA bool "UART4 Rx DMA" default n @@ -1499,55 +1454,6 @@ config UART4_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - -menu "UART5 Configuration" - depends on STM32_UART5 - -config UART5_SERIAL_CONSOLE - bool "UART5 serial console" - default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4 - ---help--- - Selects the UART5 for the console and ttys0 (default is the USART1). - -config UART5_RXBUFSIZE - int "UART5 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config UART5_TXBUFSIZE - int "UART5 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config UART5_BAUD - int "UART5 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config UART5_BITS - int "UART5 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART5_PARITY - int "UART5 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART5_2STOP - int "UART5 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config UART5_RXDMA bool "UART5 Rx DMA" default n @@ -1555,8 +1461,6 @@ config UART5_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - config USART6_RXDMA bool "USART6 Rx DMA" default n diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 908046f833..74a093e3f3 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -493,26 +493,32 @@ config PIC32MX_SPI4 config PIC32MX_UART1 bool "UART1" default n + select ARCH_HAS_UART1 config PIC32MX_UART2 bool "UART2" default n + select ARCH_HAS_UART1 config PIC32MX_UART3 bool "UART3" default n + select ARCH_HAS_UART3 config PIC32MX_UART4 bool "UART4" default n + select ARCH_HAS_UART4 config PIC32MX_UART5 bool "UART5" default n + select ARCH_HAS_UART5 config PIC32MX_UART6 bool "UART6" default n + select ARCH_HAS_UART6 config PIC32MX_ADC bool "ADC1" @@ -561,6 +567,8 @@ config PIC32MX_CAN2 config PIC32MX_ETHERNET bool "Ethernet" default n + select NET + select ARCH_HAS_PHY config PIC32MX_CTMU bool "Charge Time Measurement Unit (CMTU)" @@ -906,270 +914,6 @@ config PIC32MX_USBPRIO endmenu -menu "UART1 Configuration" - depends on PIC32MX_UART1 - -config UART1_RXBUFSIZE - int "UART1 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART1_TXBUFSIZE - int "UART1 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART1_BAUD - int "UART1 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART1_BITS - int "UART1 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART1_PARITY - int "UART1 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART1_2STOP - int "UART1 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "UART2 Configuration" - depends on PIC32MX_UART2 - -config UART2_RXBUFSIZE - int "UART2 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART2_TXBUFSIZE - int "UART2 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART2_BAUD - int "UART2 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART2_BITS - int "UART2 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART2_PARITY - int "UART2 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART2_2STOP - int "UART2 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "UART3 Configuration" - depends on PIC32MX_UART3 - -config UART3_RXBUFSIZE - int "UART3 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART3_TXBUFSIZE - int "UART3 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART3_BAUD - int "UART3 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART3_BITS - int "UART3 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART3_PARITY - int "UART3 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART3_2STOP - int "UART3 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "UART4 Configuration" - depends on PIC32MX_UART4 - -config UART4_SERIAL_CONSOLE - bool "UART4 serial console" - default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3 - ---help--- - Selects the UART4 for the console and ttys0. Default: UART4 (if enabled). - -config UART4_RXBUFSIZE - int "UART4 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART4_TXBUFSIZE - int "UART4 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART4_BAUD - int "UART4 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART4_BITS - int "UART4 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART4_PARITY - int "UART4 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART4_2STOP - int "UART4 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "UART5 Configuration" - depends on PIC32MX_UART5 - -config UART5_SERIAL_CONSOLE - bool "UART5 serial console" - default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3 && !PIC32MX_UART4 - ---help--- - Selects the UART5 for the console and ttys0. Default: UART5 (if enabled). - -config UART5_RXBUFSIZE - int "UART5 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART5_TXBUFSIZE - int "UART5 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART5_BAUD - int "UART5 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART5_BITS - int "UART5 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART5_PARITY - int "UART5 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART5_2STOP - int "UART5 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "UART6 Configuration" - depends on PIC32MX_UART6 - -config UART6_SERIAL_CONSOLE - bool "UART6 serial console" - default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3 && !PIC32MX_UART4 && !PIC32MX_UART5 - ---help--- - Selects the UART6 for the console and ttys0. Default: UART6 (if enabled). - -config UART6_RXBUFSIZE - int "UART6 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive buffer - -config UART6_TXBUFSIZE - int "UART6 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the transmit buffer. - -config UART6_BAUD - int "UART6 BAUD" - default 115200 - ---help--- - The configure BAUD of the UART. - -config UART6_BITS - int "UART6 bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config UART6_PARITY - int "UART6 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config UART6_2STOP - int "UART6 2 stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on PIC32MX_UART1 || PIC32MX_UART2 || PIC32MX_UART3 || PIC32MX_UART4 || PIC32MX_UART5 || PIC32MX_UART6 @@ -1179,22 +923,6 @@ config SERIAL_TERMIOS If this is not defined, then the terminal settings (baud, parity, etc). are not configurable at runtime; serial streams cannot be flushed, etc.. -choice - prompt "PIC32MX PHY Selection" - depends on PIC32MX_ETHERNET - default PHY_KS8721 - -config PHY_KS8721 - bool "Micrel KS8721 PHY" - -config PHY_DP83848C - bool "National Semiconduction DP83848C PHY" - -config PHY_LAN8720 - int "SMSC LAN8720 PHY" - -endchoice - menu "PIC32MX PHY/Ethernet device driver settings" depends on PIC32MX_ETHERNET diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index 8de40fcab5..d83474c9d7 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -61,18 +61,22 @@ CONFIG_16550_REGWIDTH=8 CONFIG_16550_ADDRWIDTH=16 CONFIG_16550_SUPRESS_CONFIG=y CONFIG_SUPPRESS_SERIAL_INTS=n + CONFIG_16550_UART0=y CONFIG_16550_UART0_BASE=0x3f8 CONFIG_16550_UART0_CLOCK=16000000 CONFIG_16550_UART0_IRQ=IRQ4 + CONFIG_16550_UART1=n CONFIG_16550_UART1_BASE=0x2f8 CONFIG_16550_UART1_CLOCK=16000000 CONFIG_16550_UART1_IRQ=IRQ3 + CONFIG_16550_UART2=n CONFIG_16550_UART2_BASE=0x3e8 CONFIG_16550_UART2_CLOCK=16000000 CONFIG_16550_UART2_IRQ=IRQ4 + CONFIG_16550_UART3=n CONFIG_16550_UART3_BASE=0x2e8 CONFIG_16550_UART3_CLOCK=16000000 @@ -81,40 +85,40 @@ CONFIG_16550_UART3_IRQ=IRQ3 # # Serial device driver settings # -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_SERIAL_CONSOLE=n -CONFIG_UART2_SERIAL_CONSOLE=n -CONFIG_UART3_SERIAL_CONSOLE=n +CONFIG_16550_UART0_SERIAL_CONSOLE=y +CONFIG_16550_UART1_SERIAL_CONSOLE=n +CONFIG_16550_UART2_SERIAL_CONSOLE=n +CONFIG_16550_UART3_SERIAL_CONSOLE=n -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART2_TXBUFSIZE=256 -CONFIG_UART3_TXBUFSIZE=256 +CONFIG_16550_UART0_TXBUFSIZE=256 +CONFIG_16550_UART1_TXBUFSIZE=256 +CONFIG_16550_UART2_TXBUFSIZE=256 +CONFIG_16550_UART3_TXBUFSIZE=256 -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART2_RXBUFSIZE=256 -CONFIG_UART3_RXBUFSIZE=256 +CONFIG_16550_UART0_RXBUFSIZE=256 +CONFIG_16550_UART1_RXBUFSIZE=256 +CONFIG_16550_UART2_RXBUFSIZE=256 +CONFIG_16550_UART3_RXBUFSIZE=256 -CONFIG_UART0_BAUD=57600 -CONFIG_UART2_BAUD=57600 -CONFIG_UART3_BAUD=57600 -CONFIG_UART1_BAUD=57600 +CONFIG_16550_UART0_BAUD=57600 +CONFIG_16550_UART2_BAUD=57600 +CONFIG_16550_UART3_BAUD=57600 +CONFIG_16550_UART1_BAUD=57600 -CONFIG_UART0_BITS=8 -CONFIG_UART1_BITS=8 -CONFIG_UART2_BITS=8 -CONFIG_UART3_BITS=8 +CONFIG_16550_UART0_BITS=8 +CONFIG_16550_UART1_BITS=8 +CONFIG_16550_UART2_BITS=8 +CONFIG_16550_UART3_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART1_PARITY=0 -CONFIG_UART2_PARITY=0 -CONFIG_UART3_PARITY=0 +CONFIG_16550_UART0_PARITY=0 +CONFIG_16550_UART1_PARITY=0 +CONFIG_16550_UART2_PARITY=0 +CONFIG_16550_UART3_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_16550_UART0_2STOP=0 +CONFIG_16550_UART1_2STOP=0 +CONFIG_16550_UART2_2STOP=0 +CONFIG_16550_UART3_2STOP=0 # # General OS setup diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig index df80a1ded5..0448f1268b 100644 --- a/nuttx/drivers/serial/Kconfig +++ b/nuttx/drivers/serial/Kconfig @@ -215,25 +215,25 @@ endif choice prompt "16550 Serial Console" - default NO_SERIAL_CONSOLE + default 16550_NO_SERIAL_CONSOLE -config UART0_SERIAL_CONSOLE +config 16550_UART0_SERIAL_CONSOLE bool "16550 UART0 serial console" depends on 16550_UART0 -config UART1_SERIAL_CONSOLE +config 16550_UART1_SERIAL_CONSOLE bool "16550 UART1 serial console" depends on 16550_UART1 -config UART2_SERIAL_CONSOLE +config 16550_UART2_SERIAL_CONSOLE bool "16550 UART2 serial console" depends on 16550_UART2 -config UART3_SERIAL_CONSOLE +config 16550_UART3_SERIAL_CONSOLE bool "16550 UART3 serial console" depends on 16550_UART3 -config NO_SERIAL_CONSOLE +config 16550_NO_SERIAL_CONSOLE bool "No 16550 serial console" endchoice @@ -267,25 +267,27 @@ config 16550_ADDRWIDTH endif -config STANDARD_SERIAL - bool "Standard serial" - default y if !LOWLEVEL_CONSOLE && !16550_UART - -if STANDARD_SERIAL -config CONFIG_SERIAL_NPOLLWAITERS - int "Number of poll threads" - default 2 - depends on !DISABLE_POLL - ---help--- - Maximum number of threads than can be waiting for POLL events. - Default: 2 - -endif - # -# USARTn_XYZ settings +# MCU serial peripheral driver? # +config ARCH_HAS_UART + bool +config ARCH_HAS_UART0 + bool +config ARCH_HAS_UART1 + bool +config ARCH_HAS_UART2 + bool +config ARCH_HAS_UART3 + bool +config ARCH_HAS_UART4 + bool +config ARCH_HAS_UART5 + bool +config ARCH_HAS_UART6 + bool + config ARCH_HAS_USART0 bool config ARCH_HAS_USART1 @@ -301,42 +303,192 @@ config ARCH_HAS_USART5 config ARCH_HAS_USART6 bool +config MCU_SERIAL + bool + default y if ARCH_HAS_UART || ARCH_HAS_UART0 || ARCH_HAS_USART0 || ARCH_HAS_UART1 || ARCH_HAS_USART1 || \ + ARCH_HAS_UART2 || ARCH_HAS_USART2 || ARCH_HAS_UART3 || ARCH_HAS_USART3 || \ + ARCH_HAS_UART4 || ARCH_HAS_USART4 || ARCH_HAS_UART5 || ARCH_HAS_USART5 || ARCH_HAS_UART6 || ARCH_HAS_USART6 + +# +# Standard serial driver configuration +# + +config STANDARD_SERIAL + bool "Enable standard \"upper-half\" serial driver" + default y if MCU_SERIAL + default n if !MCU_SERIAL + depends on !LOWLEVEL_CONSOLE + ---help--- + Enable the standard, upper-half serial driver used by most MCU serial peripherals. + +config CONFIG_SERIAL_NPOLLWAITERS + int "Number of poll threads" + default 2 + depends on !DISABLE_POLL && STANDARD_SERIAL + ---help--- + Maximum number of threads than can be waiting for POLL events. + Default: 2 + +# +# U[S]ARTn_XYZ settings for MCU serial drivers +# + choice prompt "Serial console" - depends on ARCH_HAS_USART0 || \ - ARCH_HAS_USART1 || ARCH_HAS_USART2 || ARCH_HAS_USART3 || \ - ARCH_HAS_USART4 || ARCH_HAS_USART5 || ARCH_HAS_USART6 + depends on MCU_SERIAL + default NO_SERIAL_CONSOLE + +config UART_SERIAL_CONSOLE + bool "UART" + depends on ARCH_HAS_UART + +config UART0_SERIAL_CONSOLE + bool "UART0" + depends on ARCH_HAS_UART0 config USART0_SERIAL_CONSOLE bool "USART0" depends on ARCH_HAS_USART0 +config UART1_SERIAL_CONSOLE + bool "UART1" + depends on ARCH_HAS_UART1 + config USART1_SERIAL_CONSOLE bool "USART1" depends on ARCH_HAS_USART1 +config UART2_SERIAL_CONSOLE + bool "UART2" + depends on ARCH_HAS_UART2 + config USART2_SERIAL_CONSOLE bool "USART2" depends on ARCH_HAS_USART2 +config UART3_SERIAL_CONSOLE + bool "UART3" + depends on ARCH_HAS_UART3 + config USART3_SERIAL_CONSOLE bool "USART3" depends on ARCH_HAS_USART3 +config UART4_SERIAL_CONSOLE + bool "UART4" + depends on ARCH_HAS_UART4 + config USART4_SERIAL_CONSOLE bool "USART4" depends on ARCH_HAS_USART4 +config UART5_SERIAL_CONSOLE + bool "UART5" + depends on ARCH_HAS_UART5 + config USART5_SERIAL_CONSOLE bool "USART5" depends on ARCH_HAS_USART5 +config UART6_SERIAL_CONSOLE + bool "UART6" + depends on ARCH_HAS_UART6 + config USART6_SERIAL_CONSOLE bool "USART6" depends on ARCH_HAS_USART6 +config NO_SERIAL_CONSOLE + bool "No serial console" + endchoice +menu "UART Configuration" + depends on ARCH_HAS_UART + +config UART_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART_2STOP + int "use 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + +menu "UART0 Configuration" + depends on ARCH_HAS_UART0 + +config UART0_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART0_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART0_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART0_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART0_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART0_2STOP + int "use 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART0 Configuration" depends on ARCH_HAS_USART0 @@ -380,6 +532,49 @@ config USART0_2STOP endmenu +menu "UART1 Configuration" + depends on ARCH_HAS_UART1 + +config UART1_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART1_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART1_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART1_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART1_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART1_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART1 Configuration" depends on ARCH_HAS_USART1 @@ -423,6 +618,49 @@ config USART1_2STOP endmenu +menu "UART2 Configuration" + depends on ARCH_HAS_UART2 + +config UART2_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART2_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART2_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART2_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART2_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART2_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART2 Configuration" depends on ARCH_HAS_USART2 @@ -466,6 +704,49 @@ config USART2_2STOP endmenu +menu "UART3 Configuration" + depends on ARCH_HAS_UART3 + +config UART3_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART3_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART3_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART3_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART3_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART3_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART3 Configuration" depends on ARCH_HAS_USART3 @@ -509,6 +790,49 @@ config USART3_2STOP endmenu +menu "UART4 Configuration" + depends on ARCH_HAS_UART4 + +config UART4_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART4_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART4_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART4_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART4_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART4_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART4 Configuration" depends on ARCH_HAS_USART4 @@ -552,6 +876,49 @@ config USART4_2STOP endmenu +menu "UART5 Configuration" + depends on ARCH_HAS_UART5 + +config UART5_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART5_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART5_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART5_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART5_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART5_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu + menu "USART5 Configuration" depends on ARCH_HAS_USART5 @@ -637,3 +1004,46 @@ config USART6_2STOP 1=Two stop bits endmenu + +menu "UART6 Configuration" + depends on ARCH_HAS_UART6 + +config UART6_RXBUFSIZE + int "receive buffer size" + default 256 + help + Characters are buffered as they are received. This specifies + the size of the receive buffer. + +config UART6_TXBUFSIZE + int "transmit buffer size" + default 256 + help + Characters are buffered before being sent. This specifies + the size of the transmit buffer. + +config UART6_BAUD + int "baud rate" + default 11520 + help + The configured BAUD of the UART. + +config UART6_BITS + int "character size" + default 8 + help + The number of bits. Must be either 7 or 8. + +config UART6_PARITY + int "parity setting" + default 0 + help + 0=no parity, 1=odd parity, 2=even parity + +config UART6_2STOP + int "uses 2 stop bits" + default 0 + help + 1=Two stop bits + +endmenu diff --git a/nuttx/drivers/serial/uart_16550.c b/nuttx/drivers/serial/uart_16550.c index ea7d944f3a..8fb71bfd23 100644 --- a/nuttx/drivers/serial/uart_16550.c +++ b/nuttx/drivers/serial/uart_16550.c @@ -128,20 +128,20 @@ struct uart_ops_s g_uart_ops = /* I/O buffers */ #ifdef CONFIG_16550_UART0 -static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE]; -static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; +static char g_uart0rxbuffer[CONFIG_16550_UART0_RXBUFSIZE]; +static char g_uart0txbuffer[CONFIG_16550_UART0_TXBUFSIZE]; #endif #ifdef CONFIG_16550_UART1 -static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE]; +static char g_uart1rxbuffer[CONFIG_16550_UART1_RXBUFSIZE]; +static char g_uart1txbuffer[CONFIG_16550_UART1_TXBUFSIZE]; #endif #ifdef CONFIG_16550_UART2 -static char g_uart2rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart2txbuffer[CONFIG_UART1_TXBUFSIZE]; +static char g_uart2rxbuffer[CONFIG_16550_UART2_RXBUFSIZE]; +static char g_uart2txbuffer[CONFIG_16550_UART2_TXBUFSIZE]; #endif #ifdef CONFIG_16550_UART3 -static char g_uart3rxbuffer[CONFIG_UART1_RXBUFSIZE]; -static char g_uart3txbuffer[CONFIG_UART1_TXBUFSIZE]; +static char g_uart3rxbuffer[CONFIG_16550_UART3_RXBUFSIZE]; +static char g_uart3txbuffer[CONFIG_16550_UART3_TXBUFSIZE]; #endif /* This describes the state of the LPC17xx uart0 port. */ @@ -151,16 +151,16 @@ static struct u16550_s g_uart0priv = { .uartbase = CONFIG_16550_UART0_BASE, #ifndef CONFIG_16550_SUPRESS_CONFIG - .baud = CONFIG_UART0_BAUD, + .baud = CONFIG_16550_UART0_BAUD, .uartclk = CONFIG_16550_UART0_CLOCK, #endif #ifndef CONFIG_SUPPRESS_SERIAL_INTS .irq = CONFIG_16550_UART0_IRQ, #endif #ifndef CONFIG_16550_SUPRESS_CONFIG - .parity = CONFIG_UART0_PARITY, - .bits = CONFIG_UART0_BITS, - .stopbits2 = CONFIG_UART0_2STOP, + .parity = CONFIG_16550_UART0_PARITY, + .bits = CONFIG_16550_UART0_BITS, + .stopbits2 = CONFIG_16550_UART0_2STOP, #endif }; @@ -168,12 +168,12 @@ static uart_dev_t g_uart0port = { .recv = { - .size = CONFIG_UART0_RXBUFSIZE, + .size = CONFIG_16550_UART0_RXBUFSIZE, .buffer = g_uart0rxbuffer, }, .xmit = { - .size = CONFIG_UART0_TXBUFSIZE, + .size = CONFIG_16550_UART0_TXBUFSIZE, .buffer = g_uart0txbuffer, }, .ops = &g_uart_ops, @@ -188,16 +188,16 @@ static struct u16550_s g_uart1priv = { .uartbase = CONFIG_16550_UART1_BASE, #ifndef CONFIG_16550_SUPRESS_CONFIG - .baud = CONFIG_UART1_BAUD, + .baud = CONFIG_16550_UART1_BAUD, .uartclk = CONFIG_16550_UART1_CLOCK, #endif #ifndef CONFIG_SUPPRESS_SERIAL_INTS .irq = CONFIG_16550_UART1_IRQ, #endif #ifndef CONFIG_16550_SUPRESS_CONFIG - .parity = CONFIG_UART1_PARITY, - .bits = CONFIG_UART1_BITS, - .stopbits2 = CONFIG_UART1_2STOP, + .parity = CONFIG_16550_UART1_PARITY, + .bits = CONFIG_16550_UART1_BITS, + .stopbits2 = CONFIG_16550_UART1_2STOP, #endif }; @@ -205,12 +205,12 @@ static uart_dev_t g_uart1port = { .recv = { - .size = CONFIG_UART1_RXBUFSIZE, + .size = CONFIG_16550_UART1_RXBUFSIZE, .buffer = g_uart1rxbuffer, }, .xmit = { - .size = CONFIG_UART1_TXBUFSIZE, + .size = CONFIG_16550_UART1_TXBUFSIZE, .buffer = g_uart1txbuffer, }, .ops = &g_uart_ops, @@ -225,16 +225,16 @@ static struct u16550_s g_uart2priv = { .uartbase = CONFIG_16550_UART2_BASE, #ifndef CONFIG_16550_SUPRESS_CONFIG - .baud = CONFIG_UART2_BAUD, + .baud = CONFIG_16550_UART2_BAUD, .uartclk = CONFIG_16550_UART2_CLOCK, #endif #ifndef CONFIG_SUPPRESS_SERIAL_INTS .irq = CONFIG_16550_UART2_IRQ, #endif #ifndef CONFIG_16550_SUPRESS_CONFIG - .parity = CONFIG_UART2_PARITY, - .bits = CONFIG_UART2_BITS, - .stopbits2 = CONFIG_UART2_2STOP, + .parity = CONFIG_16550_UART2_PARITY, + .bits = CONFIG_16550_UART2_BITS, + .stopbits2 = CONFIG_16550_UART2_2STOP, #endif }; @@ -242,12 +242,12 @@ static uart_dev_t g_uart2port = { .recv = { - .size = CONFIG_UART2_RXBUFSIZE, + .size = CONFIG_16550_UART2_RXBUFSIZE, .buffer = g_uart2rxbuffer, }, .xmit = { - .size = CONFIG_UART2_TXBUFSIZE, + .size = CONFIG_16550_UART2_TXBUFSIZE, .buffer = g_uart2txbuffer, }, .ops = &g_uart_ops, @@ -262,16 +262,16 @@ static struct u16550_s g_uart3priv = { .uartbase = CONFIG_16550_UART3_BASE, #ifndef CONFIG_16550_SUPRESS_CONFIG - .baud = CONFIG_UART3_BAUD, + .baud = CONFIG_16550_UART3_BAUD, .uartclk = CONFIG_16550_UART3_CLOCK, #endif #ifndef CONFIG_SUPPRESS_SERIAL_INTS .irq = CONFIG_16550_UART3_IRQ, #endif #ifndef CONFIG_16550_SUPRESS_CONFIG - .parity = CONFIG_UART3_PARITY, - .bits = CONFIG_UART3_BITS, - .stopbits2 = CONFIG_UART3_2STOP, + .parity = CONFIG_16550_UART3_PARITY, + .bits = CONFIG_16550_UART3_BITS, + .stopbits2 = CONFIG_16550_UART3_2STOP, #endif }; @@ -279,12 +279,12 @@ static uart_dev_t g_uart3port = { .recv = { - .size = CONFIG_UART3_RXBUFSIZE, + .size = CONFIG_16550_UART3_RXBUFSIZE, .buffer = g_uart3rxbuffer, }, .xmit = { - .size = CONFIG_UART3_TXBUFSIZE, + .size = CONFIG_16550_UART3_TXBUFSIZE, .buffer = g_uart3txbuffer, }, .ops = &g_uart_ops, @@ -294,7 +294,7 @@ static uart_dev_t g_uart3port = /* Which UART with be tty0/console and which tty1? tty2? tty3? */ -#if defined(CONFIG_UART0_SERIAL_CONSOLE) +#if defined(CONFIG_16550_UART0_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart0port /* UART0=console */ # define TTYS0_DEV g_uart0port /* UART0=ttyS0 */ # ifdef CONFIG_16550_UART1 @@ -333,7 +333,7 @@ static uart_dev_t g_uart3port = # undef TTYS3_DEV /* No ttyS3 */ # endif # endif -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) +#elif defined(CONFIG_16550_UART1_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart1port /* UART1=console */ # define TTYS0_DEV g_uart1port /* UART1=ttyS0 */ # ifdef CONFIG_16550_UART @@ -372,7 +372,7 @@ static uart_dev_t g_uart3port = # undef TTYS3_DEV /* No ttyS3 */ # endif # endif -#elif defined(CONFIG_UART2_SERIAL_CONSOLE) +#elif defined(CONFIG_16550_UART2_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart2port /* UART2=console */ # define TTYS0_DEV g_uart2port /* UART2=ttyS0 */ # ifdef CONFIG_16550_UART @@ -411,7 +411,7 @@ static uart_dev_t g_uart3port = # undef TTYS3_DEV /* No ttyS3 */ # endif # endif -#elif defined(CONFIG_UART3_SERIAL_CONSOLE) +#elif defined(CONFIG_16550_UART3_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart3port /* UART3=console */ # define TTYS0_DEV g_uart3port /* UART3=ttyS0 */ # ifdef CONFIG_16550_UART @@ -1161,4 +1161,4 @@ int up_putc(int ch) } #endif -#endif /* CONFIG_UART_16550 */ +#endif /* CONFIG_16550_UART */ diff --git a/nuttx/lib/Kconfig b/nuttx/lib/Kconfig index e3348f26b6..a5b62e588f 100644 --- a/nuttx/lib/Kconfig +++ b/nuttx/lib/Kconfig @@ -169,71 +169,3 @@ config ARCH_BZERO bool "bzero" default n endif - -config ARCH_HEADER_FILES - bool "Customize header files" - default n - ---help--- - The architecture may provide custom versions of certain - standard header files - -if ARCH_HEADER_FILES -config ARCH_STDBOOL_H - bool "stdbool.h" - default n - ---help--- - The stdbool.h header file can be found at nuttx/include/stdbool.h. - However, that header includes logic to redirect the inclusion of an - architecture specific header file like: - - #ifdef CONFIG_ARCH_STDBOOL_H - # include - #else - ... - #endif - - Recall that that include path, include/arch, is a symbolic link and - will refer to a version of stdbool.h at nuttx/arch//include/stdbool.h. - -config ARCH_MATH_H - bool "math.h" - default n - ---help--- - There is also a re-directing version of math.h in the source tree. - However, it resides out-of-the-way at include/nuttx/math.h because it - conflicts too often with the system math.h. If ARCH_MATH_H=y is - defined, however, the top-level makefile will copy the redirecting - math.h header file from include/nuttx/math.h to include/math.h. math.h - will then include the architecture-specific version of math.h that you - must provide at nuttx/arch/>architecture - #endif - - So for the architectures that define ARCH_MATH_H=y, include/math.h - will be the redirecting math.h header file; for the architectures - that don't select ARCH_MATH_H, the redirecting math.h header file - will stay out-of-the-way in include/nuttx/. - -config ARCH_STDARG_H - bool "stdarg.h" - default n - ---help--- - There is also a redirecting version of stdarg.h in the source tree - as well. It also resides out-of-the-way at include/nuttx/stdarg.h. - This is because you should normally use your toolchain's stdarg.h - file. But sometimes, your toolchain's stdarg.h file may have other - header file dependencies and so may not be usable in the NuttX build - environment. In those cases, you may have to create a architecture- - specific stdarg.h header file at nuttx/arch//include/stdarg.h - - If ARCH_STDARG_H=y is defined, the top-level makefile will copy the - re-directing stdarg.h header file from include/nuttx/stdarg.h to - include/stdarg.h. So for the architectures that cannot use their - toolchain's stdarg.h file, they can use this alternative by defining - ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then - the stdarg.h header file will stay out-of-the-way in include/nuttx/. - -endif - diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index dc16150ba6..6450442e4b 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -9,8 +9,27 @@ config NET ---help--- Enable or disable all network features +config ARCH_HAS_PHY + bool + if NET +choice + prompt "Board PHY Selection" + depends on ARCH_HAS_PHY + default PHY_KS8721 + +config PHY_KS8721 + bool "Micrel KS8721 PHY" + +config PHY_DP83848C + bool "National Semiconduction DP83848C PHY" + +config PHY_LAN8720 + int "SMSC LAN8720 PHY" + +endchoice + config NET_NOINTS bool "Not interrupt driven" default n From ae148ef09e450fbc7acb3c6731c50795918ab1d9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 17:50:53 +0000 Subject: [PATCH 16/95] Add configuration for the LM3S git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5095 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 + nuttx/arch/arm/Kconfig | 38 +++++++++--- nuttx/arch/arm/src/lm3s/Kconfig | 71 ++++++++++++++++++++++ nuttx/arch/arm/src/lpc17xx/Kconfig | 8 --- nuttx/arch/arm/src/lpc43xx/Kconfig | 15 ----- nuttx/arch/arm/src/stm32/Kconfig | 31 +++++----- nuttx/configs/lm3s6965-ek/nsh/defconfig | 1 + nuttx/configs/lm3s6965-ek/nx/defconfig | 1 + nuttx/configs/lm3s6965-ek/ostest/defconfig | 1 + 9 files changed, 122 insertions(+), 46 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 66fc415138..252edd737b 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3262,3 +3262,5 @@ sendfile() (non-standard!) * Kconfig: Refactor serial settings (moved from chip to drivers/serial). AVR "teensy" now builds with Kconfig (contributed by Richard Cochran). + * Kconfig: Add configuration settings for the LPC17xx + * Kconfig: Add configuratino settings for the LM3S (from Richard Cochran). diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index f587cc274c..bc4299c2d1 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -10,61 +10,78 @@ choice config ARCH_CHIP_C5471 bool "TMS320 C5471" + select ARCH_ARM7TDMI ---help--- TI TMS320 C5471, A180, or DA180 (ARM7TDMI) config ARCH_CHIP_CALYPSO bool "Calypso" + select ARCH_ARM7TDMI ---help--- TI Calypso-based cell phones (ARM7TDMI) config ARCH_CHIP_DM320 bool "TMS320 DM320" + select ARCH_ARM926EJS ---help--- TI DMS320 DM320 (ARM926EJS) config ARCH_CHIP_IMX bool "Freescale iMX" + select ARCH_ARM920T ---help--- Freescale iMX architectures (ARM920T) config ARCH_CHIP_KINETIS bool "Freescale Kinetis" + select ARCH_CORTEXM + select ARCH_CORTEXM4 ---help--- Freescale Kinetis Architectures (ARM Cortex-M4) config ARCH_CHIP_LM3S bool "TI Stellaris" + select ARCH_CORTEXM + select ARCH_CORTEXM3 ---help--- TI Stellaris LMS3 architecutres (ARM Cortex-M3) config ARCH_CHIP_LPC17XX bool "NXP LPC17xx" + select ARCH_CORTEXM + select ARCH_CORTEXM3 ---help--- NXP LPC17xx architectures (ARM Cortex-M3) config ARCH_CHIP_LPC214X bool "NXP LPC214x" + select ARCH_ARM7TDMI ---help--- NXP LPC2145x architectures (ARM7TDMI) config ARCH_CHIP_LPC2378 bool "NXP LPC2378" + select ARCH_ARM7TDMI ---help--- NXP LPC2145x architectures (ARM7TDMI) config ARCH_CHIP_LPC31XX bool "NXP LPC31XX" + select ARCH_ARM926EJS ---help--- NPX LPC31XX architectures (ARM926EJS). config ARCH_CHIP_LPC43XX bool "NXP LPC43XX" + select ARCH_CORTEXM + select ARCH_CORTEXM4 ---help--- NPX LPC43XX architectures (ARM Cortex-M4). config ARCH_CHIP_SAM3U bool "Atmel AT91SAM3U" + select ARCH_CORTEXM + select ARCH_CORTEXM3 ---help--- Atmel AT91SAM3U architectures (ARM Cortex-M3) @@ -75,6 +92,7 @@ config ARCH_CHIP_STM32 config ARCH_CHIP_STR71X bool "STMicro STR71x" + select ARCH_ARM7TDMI ---help--- STMicro STR71x architectures (ARM7TDMI). @@ -82,24 +100,30 @@ endchoice config ARCH_ARM7TDMI bool - default y if ARCH_CHIP_C5471 || ARCH_CHIP_CALYPSO || ARCH_CHIP_LPC214X || ARCH_CHIP_LPC2378 || ARCH_CHIP_STR71X config ARCH_ARM926EJS bool - default y if ARCH_CHIP_DM320 || ARCH_CHIP_LPC31XX config ARCH_ARM920T bool - default y if ARCH_CHIP_IMX -config ARCH_CORTEXM +config ARCH_CORTEXM3 bool - default y if ARCH_CHIP_KINETIS || ARCH_CHIP_LM3S || ARCH_CHIP_LPC17XX || ARCH_CHIP_LPC43XX || ARCH_CHIP_SAM3U || ARCH_CHIP_STM32 + +config ARCH_CORTEXM4 + bool + +config ARCH_FPU + bool "FPU support" + default y + depends on ARCH_CORTEXM4 + ---help--- + Build in support for the ARM Cortex-M4 FPU. config ARCH_FAMILY string default "arm" if ARCH_ARM7TDMI || ARCH_ARM926EJS || ARCH_ARM920T - default "armv7-m" if ARCH_CORTEXM + default "armv7-m" if ARCH_CORTEXM3 || ARCH_CORTEXM4 config ARCH_CHIP string @@ -134,7 +158,7 @@ config ARCH_INTERRUPTSTACK config ARCH_IRQPRIO bool "Interrupt priority" - default y if ARCH_CORTEXM + default y if ARCH_CORTEXM3 || ARCH_CORTEXM4 ---help--- Select if your board supports interrupt prioritization. diff --git a/nuttx/arch/arm/src/lm3s/Kconfig b/nuttx/arch/arm/src/lm3s/Kconfig index ae2bf31307..a1b401db77 100644 --- a/nuttx/arch/arm/src/lm3s/Kconfig +++ b/nuttx/arch/arm/src/lm3s/Kconfig @@ -2,3 +2,74 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +choice + prompt "LM3S Chip Selection" + default ARCH_CHIP_LM3S6965 + depends on ARCH_CHIP_LM3S + +config ARCH_CHIP_LM3S6918 + bool "LM3S6918" + +config ARCH_CHIP_LM3S9B96 + bool "LM3S9B96" + +config ARCH_CHIP_LM3S6432 + bool "LM3S6432" + +config ARCH_CHIP_LM3S6965 + bool "LM3S6965" + +config ARCH_CHIP_LM3S8962 + bool "LM3S8962" + +endchoice + +choice + prompt "Toolchain" + default LM3S_BUILDROOT + +config LM3S_CODESOURCERYW + bool "CodeSourcery GNU toolchain under Windows" + +config LM3S_CODESOURCERYL + bool "CodeSourcery GNU toolchain under Linux" + +config LM3S_DEVKITARM + bool "devkitARM GNU toolchain" + +config LM3S_BUILDROOT + bool "Buildroot" + +endchoice + +config LM3S_DFU + bool "DFU" + default y + +config LM3S_DISABLE_GPIOA_IRQS + bool "Disable GPIOA IRQs" + +config LM3S_DISABLE_GPIOB_IRQS + bool "Disable GPIOB IRQs" + +config LM3S_DISABLE_GPIOC_IRQS + bool "Disable GPIOC IRQs" + +config LM3S_DISABLE_GPIOD_IRQS + bool "Disable GPIOD IRQs" + +config LM3S_DISABLE_GPIOE_IRQS + bool "Disable GPIOE IRQs" + +config LM3S_DISABLE_GPIOF_IRQS + bool "Disable GPIOF IRQs" + +config LM3S_DISABLE_GPIOG_IRQS + bool "Disable GPIOG IRQs" + +config LM3S_DISABLE_GPIOH_IRQS + bool "Disable GPIOH IRQs" + +config LM3S_DISABLE_GPIOJ_IRQS + bool "Disable GPIOJ IRQs" diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index 44e34f9f4c..dfa5f5a20a 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -54,14 +54,6 @@ config ARCH_FAMILY_LPC176X bool default y if ARCH_CHIP_LPC1764 || ARCH_CHIP_LPC1765 || ARCH_CHIP_LPC1766 || ARCH_CHIP_LPC1767 || ARCH_CHIP_LPC1768 || ARCH_CHIP_LPC1769 -config ARCH_CORTEXM3 - bool - default y if ARCH_CHIP_LPC17XX - -config ARCH_CORTEXM4 - bool - default n - menu "LPC17xx Peripheral Support" config LPC17_MAINOSC diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 3010046efa..500f8da209 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -85,21 +85,6 @@ config ARCH_FAMILY_LPC4357 bool default y if ARCH_CHIP_LPC4357FET180 || ARCH_CHIP_LPC4357FBD208 || ARCH_CHIP_LPC4357FET256 -config ARCH_CORTEXM3 - bool - default n if !ARCH_CHIP_LPC43XX - -config ARCH_CORTEXM4 - bool - default y if ARCH_CHIP_LPC43XX - -config ARCH_FPU - bool "FPU support" - default y - depends on ARCH_CORTEXM4 - ---help--- - Build in support for the ARM Cortex-M4 FPU. - choice prompt "LPC43XX Boot Configuration" default CONFIG_BOOT_SRAM diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 371d39ed4f..442f7c659f 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -10,48 +10,63 @@ choice config ARCH_CHIP_STM32F103ZET6 bool "STM32F103ZET6" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F103RET6 bool "STM32F103RET6" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F103VCT6 bool "STM32F103VCT6" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F105VBT7 bool "STM32F105VBT7" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F107VC bool "STM32F107VC" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F207IG bool "STM32F207IG" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F405RG bool "STM32F405RG" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F405VG bool "STM32F405VG" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F405ZG bool "STM32F405ZG" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F407VE bool "STM32F407VE" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F407VG bool "STM32F407VG" + select ARCH_CORTEXM3 config ARCH_CHIP_STM32F407ZE bool "STM32F407ZE" + select ARCH_CORTEXM4 config ARCH_CHIP_STM32F407ZG bool "STM32F407ZG" + select ARCH_CORTEXM4 config ARCH_CHIP_STM32F407IE bool "STM32F407IE" + select ARCH_CORTEXM4 config ARCH_CHIP_STM32F407IG bool "STM32F407IG" + select ARCH_CORTEXM4 endchoice @@ -71,14 +86,6 @@ config STM32_STM32F40XX bool default y if ARCH_CHIP_STM32F405RG || ARCH_CHIP_STM32F405VG || ARCH_CHIP_STM32F405ZG || ARCH_CHIP_STM32F407VE || ARCH_CHIP_STM32F407VG || ARCH_CHIP_STM32F407ZE || ARCH_CHIP_STM32F407ZG || ARCH_CHIP_STM32F407IE || ARCH_CHIP_STM32F407IE -config ARCH_CORTEXM3 - bool - default y if !STM32_STM32F40XX - -config ARCH_CORTEXM4 - bool - default y if STM32_STM32F40XX - menu "STM32 Peripheral Support" config STM32_ADC1 @@ -528,14 +535,6 @@ config HEAP2_END ---help--- The end (+1) of the SRAM in the FSMC address space -config ARCH_FPU - bool "FPU support" - default y - depends on ARCH_CORTEXM4 - ---help--- - Build in support for the ARM Cortex-M4 FPU. Only the STM3240xxx supports - a floating point unit (FPU) - config STM32_TIM1_PWM bool "TIM1 PWM" default n diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 845978a48c..9777f7f254 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lm3s" +CONFIG_ARCH_CHIP_LM3S=y CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index 53b54b56c1..5a4da36912 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lm3s" +CONFIG_ARCH_CHIP_LM3S=y CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index c06898463d..92aabca5fd 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lm3s" +CONFIG_ARCH_CHIP_LM3S=y CONFIG_ARCH_CHIP_LM3S6965=y CONFIG_ARCH_BOARD="lm3s6965-ek" CONFIG_ARCH_BOARD_LM3S6965EK=y From 9c0b4cd45ffd1f3de11f2b1de55158221bacf538 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 18:03:37 +0000 Subject: [PATCH 17/95] Add URL/CGI function mapping option to uIP web server git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5096 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 2 ++ apps/netutils/webserver/Kconfig | 27 +++++++++++++++++++++++++++ apps/netutils/webserver/httpd.c | 25 ++++++++++++++++++++++++- apps/netutils/webserver/httpd_cgi.c | 10 +--------- 4 files changed, 54 insertions(+), 10 deletions(-) diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 0713a2eb5b..6d5f605c7c 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -308,3 +308,5 @@ * apps/netutils/webserver: Several inenhancements from Kate including the ability to elide scripting and SERVER headers and the ability to map files into memory before transferring them. + * apps/netutils/webserver: Add ability to map a URL to CGI function. + Contributed by Kate. diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig index ef7171a8ef..c3ebe755d5 100644 --- a/apps/netutils/webserver/Kconfig +++ b/apps/netutils/webserver/Kconfig @@ -19,6 +19,33 @@ config NETUTILS_HTTPD_SCRIPT_DISABLE ---help--- This option, if selected, will elide the %! scripting +config NETUTILS_HTTPD_CGIPATH + bool "URL/CGI function mapping" + default n + ---help--- + This option enables mappings from URLs to call CGI functions. The + effect is that the existing httpd_cgi_register() interface can be + used thus: + + const static struct httpd_cgi_call a[] = { + { NULL, "/abc", cgi_abc }, + { NULL, "/xyz", cgi_xyz } + }; + + for (i = 0; i < sizeof a / sizeof *a; i++) { + httpd_cgi_register(&a[i]); + } + + Where (under CONFIG_NETUTILS_HTTPD_CGIPATH) the "/xyz" is a URL path, + rather than a %! xyz style call in the existing manner. + + This is useful when CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE is defined. + + In other words, this provides a way to get your CGI functions called + without needing the scripting language. I'm using this to provide a + REST style interface over HTTP, where my CGI handlers just return a + HTTP status code with a content length of 0. + config NETUTILS_HTTPD_SERVERHEADER_DISABLE bool "Disabled the SERVER header" default n diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index 0e255416ac..2fd0191573 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -214,7 +214,13 @@ static int handle_script(struct httpd_state *pstate) } else { - httpd_cgi(pstate->ht_scriptptr)(pstate, pstate->ht_scriptptr); + httpd_cgifunction f; + + f = httpd_cgi(pstate->ht_scriptptr); + if (f != NULL) + { + f(pstate, pstate->ht_scriptptr); + } } next_scriptstate(pstate); @@ -392,6 +398,21 @@ static int httpd_sendfile(struct httpd_state *pstate) nvdbg("[%d] sending file '%s'\n", pstate->ht_sockfd, pstate->ht_filename); +#ifdef CONFIG_NETUTILS_HTTPD_CGIPATH + { + httpd_cgifunction f; + + f = httpd_cgi(pstate->ht_filename); + if (f != NULL) + { + f(pstate, pstate->ht_filename); + + ret = OK; + goto done; + } + } +#endif + if (httpd_open(pstate->ht_filename, &pstate->ht_file) != OK) { ndbg("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename); @@ -434,6 +455,8 @@ static int httpd_sendfile(struct httpd_state *pstate) (void)httpd_close(&pstate->ht_file); +done: + /* Send anything remaining in the buffer */ if (ret == OK && pstate->ht_sndlen > 0) diff --git a/apps/netutils/webserver/httpd_cgi.c b/apps/netutils/webserver/httpd_cgi.c index 62df72e4a2..fa11f12ec9 100644 --- a/apps/netutils/webserver/httpd_cgi.c +++ b/apps/netutils/webserver/httpd_cgi.c @@ -58,14 +58,6 @@ struct httpd_cgi_call *cgi_calls = NULL; * Public Functions ****************************************************************************/ -/**************************************************************************** - * Name: nullfunction - ****************************************************************************/ - -static void nullfunction(struct httpd_state *pstate, char *ptr) -{ -} - void httpd_cgi_register(struct httpd_cgi_call *cgi_call) { if (cgi_calls == NULL) @@ -92,5 +84,5 @@ httpd_cgifunction httpd_cgi(char *name) cgi_call = cgi_call->next; } - return nullfunction; + return NULL; } From fa252aa84de87cdb10f9fb3aa3de9114dbf0aec7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 19:11:39 +0000 Subject: [PATCH 18/95] Update LPC17 Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5097 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/Kconfig | 11 +- nuttx/arch/arm/src/lpc17xx/Kconfig | 156 ++++++++++++++++++++++++- nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c | 9 +- 3 files changed, 167 insertions(+), 9 deletions(-) diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index bc4299c2d1..81bf83360b 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -118,7 +118,16 @@ config ARCH_FPU default y depends on ARCH_CORTEXM4 ---help--- - Build in support for the ARM Cortex-M4 FPU. + Build in support for the ARM Cortex-M4 Floating Point Unit (FPU). + Check your chip specifications first; not all Cortex-M4 chips support the FPU. + +config ARMV7M_MPU + bool "MPU support" + default n + depends on ARCH_CORTEXM3 || ARCH_CORTEXM4 + ---help--- + Build in support for the ARM Cortex-M3/4 Memory Protection Unit (MPU). + Check your chip specifications first; not all Cortex-M3/4 chips support the MPU. config ARCH_FAMILY string diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index dfa5f5a20a..e8070b6922 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -138,6 +138,10 @@ config LPC17_I2C1 bool "I2C1" default n +config LPC17_I2C2 + bool "I2C2" + default n + config LPC17_I2S bool "I2S" default n @@ -200,6 +204,8 @@ config LPC17_FLASH endmenu +menu "Serial driver options" + config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on LPC17_UART0 || LPC17_UART1 || LPC17_UART2 || LPC17_UART3 @@ -209,6 +215,62 @@ config SERIAL_TERMIOS If this is not defined, then the terminal settings (baud, parity, etc). are not configurable at runtime; serial streams cannot be flushed, etc.. +config UART0_FLOWCONTROL + bool "UART0 flow control" + depends on LPC17_UART0 + default n + ---help--- + Enable UART0 flow control + +config UART1_FLOWCONTROL + bool "UART1 flow control" + depends on LPC17_UART1 + default n + ---help--- + Enable UART1 flow control + +config UART1_RINGINDICATOR + bool "UART1 ring indicator" + depends on LPC17_UART1 + default n + ---help--- + Enable UART1 ring indicator + +config UART2_FLOWCONTROL + bool "UART0 flow control" + depends on LPC17_UART2 + default n + ---help--- + Enable UART2 flow control + +config UART3_FLOWCONTROL + bool "UART3 flow control" + depends on LPC17_UART3 + default n + ---help--- + Enable UART3 flow control + +endmenu + +menu "ADC driver options" + +config ADC0_AVERAGE + int "ADC0 average" + depends on LPC17_ADC + default 200 + +config ADC0_MASK + int "ADC0 mask" + depends on LPC17_ADC + default 1 + +config ADC0_SPS + int "ADC0 SPS" + depends on LPC17_ADC + default 1000 + +endmenu + menu "CAN driver options" config CAN_EXTID @@ -247,19 +309,65 @@ config CAN2_DIVISOR by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4. config CAN_TSEG1 - bool "TSEG1 quanta" + int "TSEG1 quanta" depends on LPC17_CAN1 || LPC17_CAN2 default 6 ---help--- The number of CAN time quanta in segment 1. Default: 6 config CAN_TSEG2 - bool "TSEG2 quanta" + int "TSEG2 quanta" depends on LPC17_CAN1 || LPC17_CAN2 default 4 ---help--- The number of CAN time quanta in segment 2. Default: 7 +config CAN_SAM + bool "CAN sampling" + depends on LPC17_CAN1 || LPC17_CAN2 + default n + ---help--- + The bus is sampled 3 times (recommended for low to medium speed buses to spikes on the bus-line). + +config CAN_LOOPBACK + bool "CAN looopback mode" + depends on LPC17_CAN1 || LPC17_CAN2 + default n + ---help--- + Enable CAN loopback mode + +config CAN_REGDEBUG + bool "Register level debug" + depends on LPC17_CAN1 || LPC17_CAN2 + default n + ---help--- + Output detailed register-level CAN debug information. Requires also DEBUG and DEBUG_CAN. + +endmenu + +config CONFIG_GPIO_IRQ + bool "GPIO interrupt support" + default n + ---help--- + Enable support for GPIO interrupts + +menu "I2C driver options" + +config I2C0_FREQ + int "I2C0 frequency" + depends on LPC17_I2C0 + default 100000 + +config I2C1_FREQ + int "I2C1 frequency" + depends on LPC17_I2C1 + default 100000 + +config I2C2_FREQ + int "I2C2 frequency" + depends on LPC17_I2C2 + default 100000 + endmenu menu "Ethernet driver options" @@ -351,8 +459,15 @@ endmenu menu "USB device driver options" +config USBDEV_EP0_MAXSIZE + int "EP0 Max packet size" + depends on LPC17_USBDEV + default 64 + ---help--- + Endpoint 0 maximum packet size. Default: 64 + config LPC17_USBDEV_FRAME_INTERRUPT - bool "USB " + bool "USB frame interrupt" depends on LPC17_USBDEV default n ---help--- @@ -395,6 +510,13 @@ config LPC17_USBDEV_NOLED ---help--- Define if the hardware implementation does not support the LED output +config LPC17_USBDEV_REGDEBUG + bool "Register level debug" + depends on LPC17_USBDEV && DEBUG + default n + ---help--- + Output detailed register-level USB device debug information. Requires also DEBUG. + endmenu menu "USB host driver options" @@ -442,4 +564,32 @@ config USBHOST_IOBUFSIZE Size of one end-user I/O buffer. This can be zero if the application can guarantee that all end-user I/O buffers reside in AHB SRAM. +config USBHOST_BULK_DISABLE + bool "Disable bulk EPs" + depends on LPC17_USBHOST + default n + ---help--- + Disable support for bulk endpoints. + +config USBHOST_INT_DISABLE + bool "Disable interupt EPs" + depends on LPC17_USBHOST + default n + ---help--- + Disable support for interrupt endpoints. + +config USBHOST_ISOC_DISABLE + bool "Disable isochronous EPs" + depends on LPC17_USBHOST + default n + ---help--- + Disable support for isochronous endpoints. + +config LPC17_USBHOST_REGDEBUG + bool "Register level debug" + depends on LPC17_USBHOST && DEBUG + default n + ---help--- + Output detailed register-level USB host debug information. Requires also DEBUG. + endmenu diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c index 893a1df997..76c446c7dc 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ssp.c @@ -67,19 +67,18 @@ /* The following enable debug output from this file (needs CONFIG_DEBUG too). * - * CONFIG_SSP_DEBUG - Define to enable basic SSP debug - * CONFIG_SSP_VERBOSE - Define to enable verbose SSP debug + * CONFIG_SPI_DEBUG - Define to enable basic SSP debug + * CONFIG_VERBOSE - Define to enable verbose SSP debug */ -#ifdef CONFIG_SSP_DEBUG +#ifdef CONFIG_SPI_DEBUG # define sspdbg lldbg -# ifdef CONFIG_SSP_VERBOSE +# ifdef CONFIG_VERBOSE # define spivdbg lldbg # else # define spivdbg(x...) # endif #else -# undef CONFIG_SSP_VERBOSE # define sspdbg(x...) # define spivdbg(x...) #endif From d613e32e90d69c9974424d8ae5230166b0fe8377 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 20:27:07 +0000 Subject: [PATCH 19/95] defconfig changes for LPC17xx Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5098 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/lincoln60/nsh/defconfig | 1 + nuttx/configs/lincoln60/ostest/defconfig | 1 + nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig | 5 +++-- nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig | 5 +++-- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 5 +++-- nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig | 5 +++-- nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig | 5 +++-- nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig | 5 +++-- nuttx/configs/mbed/hidkbd/defconfig | 5 +++-- nuttx/configs/mbed/nsh/defconfig | 5 +++-- nuttx/configs/nucleus2g/nsh/defconfig | 5 +++-- nuttx/configs/nucleus2g/ostest/defconfig | 5 +++-- nuttx/configs/nucleus2g/usbserial/defconfig | 5 +++-- nuttx/configs/nucleus2g/usbstorage/defconfig | 5 +++-- nuttx/configs/olimex-lpc1766stk/ftpc/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/nx/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/thttpd/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/usbserial/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig | 1 + nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 1 + nuttx/net/Kconfig | 2 +- 26 files changed, 50 insertions(+), 25 deletions(-) diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index 907a86291a..f3f140bfd1 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1769=y CONFIG_ARCH_BOARD="lincoln60" CONFIG_ARCH_BOARD_LINCOLN60=y diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 6d2ad64b78..04fd254b0b 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1769=y CONFIG_ARCH_BOARD="lincoln60" CONFIG_ARCH_BOARD_LINCOLN60=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 681744b6e0..13aaec8a0b 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/dhcpd/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index 718e071314..bfd545c97a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/nsh/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index 839eb2c9af..f2ad4ba802 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/nx/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index da6da59483..cfe2cb440e 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/ostest/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 8150d89f68..d1740805b6 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/thttpd/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 8d0f34b44f..751ee83e57 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/lpcxpresso-lpc1768/usbstorage/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD_LPCXPRESSO=y diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index 4d0a0b0d59..1b1d5d8407 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/olimex-lpc1766stk/hidkbd/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="mbed" CONFIG_ARCH_BOARD_MBED=y diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index 0d40702939..c6b892c11e 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/mbed/nsh/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="mbed" CONFIG_ARCH_BOARD_MBED=y diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index d846e9a0d7..80e69fe787 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/nucleus2g/nsh/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="nucleus2g" CONFIG_ARCH_BOARD_NUCLEUS2G=y diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 194c5d817b..01c81c1267 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/nucleus2g/ostest/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="nucleus2g" CONFIG_ARCH_BOARD_NUCLEUS2G=y diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index d3c8bc7dc7..562e8abea0 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/nucleus2g/usbserial/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="nucleus2g" CONFIG_ARCH_BOARD_NUCLEUS2G=y diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 2f1f6a3698..023447422e 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -1,8 +1,8 @@ ############################################################################ # configs/nucleus2g/usbstorage/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_BOARD="nucleus2g" CONFIG_ARCH_BOARD_NUCLEUS2G=y diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index c11d40999e..80357f15d9 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index ce40fc25dc..6c99fd4137 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 7c0046b857..7461f7ca02 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 9bc96d1bec..15a608ac90 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 4096713778..2afe412dfc 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index f7b701cc3c..63548173a4 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index 6eb34db144..ce9a8683a0 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index 9690f800f0..76592fd0b3 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index ed41b08d0f..fbdd01ba69 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index b01e79a5d4..972fbcd53d 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index a0e5da662d..176f0ca68f 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM3=y CONFIG_ARCH_CHIP="lpc17xx" +CONFIG_ARCH_CHIP_LPC17XX=y CONFIG_ARCH_CHIP_LPC1766=y CONFIG_ARCH_BOARD="olimex-lpc1766stk" CONFIG_ARCH_BOARD_LPC1766STK=y diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index 6450442e4b..b6e10a2e0f 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -26,7 +26,7 @@ config PHY_DP83848C bool "National Semiconduction DP83848C PHY" config PHY_LAN8720 - int "SMSC LAN8720 PHY" + bool "SMSC LAN8720 PHY" endchoice From 2cdd7e7425f7b8d8bb04e86b375b16c4f8a5c01e Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 21:36:03 +0000 Subject: [PATCH 20/95] LPC17xx Kconfig looks good git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5099 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/ostest/Kconfig | 29 +++++++++++++++++++++++++++++ nuttx/arch/arm/Kconfig | 8 ++++---- nuttx/arch/arm/src/lpc17xx/Kconfig | 29 +++++++++++++++++++++++++++-- nuttx/arch/mips/Kconfig | 6 +++--- nuttx/drivers/Kconfig | 10 +++++----- 5 files changed, 68 insertions(+), 14 deletions(-) diff --git a/apps/examples/ostest/Kconfig b/apps/examples/ostest/Kconfig index ca89579934..0da7e4ce34 100644 --- a/apps/examples/ostest/Kconfig +++ b/apps/examples/ostest/Kconfig @@ -10,4 +10,33 @@ config EXAMPLES_OSTEST Enable the OS test example if EXAMPLES_OSTEST + +config EXAMPLES_OSTEST_BUILTIN + bool "NSH built-in application" + default y if NSH_LIBRARY + default n if !NSH_LIBRARY + ---help--- + Build the OS test example as an NSH built-in application. + +config EXAMPLES_OSTEST_LOOPS + int "OS test loop" + default 1 + ---help--- + Used to control the number of executions of the test. If undefined, the test + executes one time. If defined to be zero, the test runs forever. + +config EXAMPLES_OSTEST_STACKSIZE + int "OS test stack size" + default 8192 + ---help--- + Size of the stack used to create the ostest task. Default is 8192. + +config EXAMPLES_OSTEST_NBARRIER_THREADS + int "Number of barrier threads" + default 8 + ---help--- + Specifies the number of threads to create in the barrier test. The default + is 8 but a smaller number may be needed on systems without sufficient memory + to start so many threads. + endif diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 81bf83360b..e6b195aff6 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -142,7 +142,7 @@ config ARCH_CHIP default "imx" if ARCH_CHIP_IMX default "kinetis" if ARCH_CHIP_KINETIS default "lm3s" if ARCH_CHIP_LM3S - default "lpc17x" if ARCH_CHIP_LPC17XX + default "lpc17xx" if ARCH_CHIP_LPC17XX default "lpc214x" if ARCH_CHIP_LPC214X default "lpc2378" if ARCH_CHIP_LPC2378 default "lpc31xx" if ARCH_CHIP_LPC31XX @@ -171,7 +171,7 @@ config ARCH_IRQPRIO ---help--- Select if your board supports interrupt prioritization. -config ARCH_LOOPSPERMSEC +config BOARD_LOOPSPERMSEC int "Delay loops per millisecond" default 5000 ---help--- @@ -183,8 +183,8 @@ config ARCH_CALIBRATION ---help--- Enables some built in instrumentation that causes a 100 second delay during boot-up. This 100 second delay serves no purpose other than it - allows you to calibratre ARCH_LOOPSPERMSEC. You simply use a stop - watch to measure the 100 second delay then adjust ARCH_LOOPSPERMSEC until + allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop + watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until the delay actually is 100 seconds. if ARCH_CHIP_C5471 diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index e8070b6922..108579b3e1 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -54,6 +54,31 @@ config ARCH_FAMILY_LPC176X bool default y if ARCH_CHIP_LPC1764 || ARCH_CHIP_LPC1765 || ARCH_CHIP_LPC1766 || ARCH_CHIP_LPC1767 || ARCH_CHIP_LPC1768 || ARCH_CHIP_LPC1769 +choice + prompt "Toolchain Selection" + default LPC17_CODESOURCERYW + depends on ARCH_CHIP_LPC17XX + +config LPC17_CODESOURCERYW + bool "CodeSourcery for Windows" + +config LPC17_CODESOURCERYL + bool "CodeSourcery for Linux" + +config LPC17_DEVKITARM + bool "DevkitARM (Windows)" + +config LPC17_BUILDROOT + bool "NuttX buildroot (Cygwin or Linux)" + +config LPC17_CODEREDW + bool "CodeRed for Windows" + +config LPC17_CODEREDL + bool "CodeRed for Windows" + +endchoice + menu "LPC17xx Peripheral Support" config LPC17_MAINOSC @@ -290,7 +315,7 @@ config CAN2_BAUD int "CAN2 BAUD" depends on LPC17_CAN2 ---help--- - CAN2 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. + CAN2 BAUD rate. Required if LPC17_CAN2 is defined. config CAN1_DIVISOR int "CAN1 CCLK divisor" @@ -345,7 +370,7 @@ config CAN_REGDEBUG endmenu -config CONFIG_GPIO_IRQ +config GPIO_IRQ bool "GPIO interrupt support" default n ---help--- diff --git a/nuttx/arch/mips/Kconfig b/nuttx/arch/mips/Kconfig index 001d032285..0d34ac2c8a 100644 --- a/nuttx/arch/mips/Kconfig +++ b/nuttx/arch/mips/Kconfig @@ -47,7 +47,7 @@ config ARCH_IRQPRIO ---help--- Select if your board supports interrupt prioritization. -config ARCH_LOOPSPERMSEC +config BOARD_LOOPSPERMSEC int "Delay loops per millisecond" default 5000 ---help--- @@ -59,8 +59,8 @@ config ARCH_CALIBRATION ---help--- Enables some built in instrumentation that causes a 100 second delay during boot-up. This 100 second delay serves no purpose other than it - allows you to calibratre ARCH_LOOPSPERMSEC. You simply use a stop - watch to measure the 100 second delay then adjust ARCH_LOOPSPERMSEC until + allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop + watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until the delay actually is 100 seconds. source arch/mips/src/common/Kconfig diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig index f898626505..a738bd102d 100644 --- a/nuttx/drivers/Kconfig +++ b/nuttx/drivers/Kconfig @@ -11,7 +11,7 @@ config DEV_NULL config DEV_ZERO bool "Enable /dev/zero" - default y + default n config LOOP bool "Enable loop device" @@ -86,7 +86,7 @@ endif config I2C bool "I2C support" - default y + default n ---help--- This selection enables building of the "upper-half" I2C driver. See include/nuttx/i2c.h for further I2C driver information. @@ -96,7 +96,7 @@ endif config SPI bool "SPI support" - default y + default n ---help--- This selection enables building of the "upper-half" SPI driver. See include/nuttx/spi.h for further SPI driver information. @@ -128,7 +128,7 @@ endif config WATCHDOG bool "Watchdog timer support" - default y + default n ---help--- This selection enables building of the "upper-half" watchdog timer driver. See include/nuttx/watchdog.h for further watchdog timer driver information. @@ -164,7 +164,7 @@ endif menuconfig INPUT bool "Input device support" - default y + default n ---help--- This directory holds implementations of input device drivers. This includes such things as touchscreen and keypad drivers. From 97da506c0c2d8c785235fc88fdfbdeb284f7392d Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 23:02:43 +0000 Subject: [PATCH 21/95] STM32 Kconfig looks good. STM32 external ram configuration changed. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5100 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 6 +- nuttx/arch/Kconfig | 2 + nuttx/arch/arm/Kconfig | 2 + nuttx/arch/arm/src/calypso/calypso_heap.c | 14 +++- nuttx/arch/arm/src/imx/imx_allocateheap.c | 4 +- nuttx/arch/arm/src/stm32/Kconfig | 64 +++++++++++++------ nuttx/arch/arm/src/stm32/stm32_allocateheap.c | 19 +++--- nuttx/arch/z16/src/common/up_allocateheap.c | 2 +- nuttx/arch/z80/src/common/up_allocateheap.c | 2 +- .../compal_e99/nsh_compalram/defconfig | 4 +- .../configs/compal_e99/nsh_highram/defconfig | 4 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 8 --- nuttx/configs/hymini-stm32v/nsh/defconfig | 8 --- nuttx/configs/hymini-stm32v/nsh2/defconfig | 8 --- nuttx/configs/hymini-stm32v/nx/defconfig | 8 --- nuttx/configs/hymini-stm32v/nxlines/defconfig | 8 --- .../configs/hymini-stm32v/usbserial/defconfig | 8 --- .../hymini-stm32v/usbstorage/defconfig | 8 --- nuttx/configs/kwikstik-k40/ostest/defconfig | 8 --- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 8 --- .../olimex-stm32-p107/ostest/defconfig | 8 --- nuttx/configs/stm3210e-eval/README.txt | 2 +- nuttx/configs/stm3210e-eval/RIDE/defconfig | 8 --- nuttx/configs/stm3210e-eval/buttons/defconfig | 8 --- .../configs/stm3210e-eval/composite/defconfig | 8 --- nuttx/configs/stm3210e-eval/nsh/defconfig | 8 --- nuttx/configs/stm3210e-eval/nsh2/defconfig | 8 --- nuttx/configs/stm3210e-eval/nx/defconfig | 8 --- .../configs/stm3210e-eval/nxconsole/defconfig | 8 --- nuttx/configs/stm3210e-eval/nxlines/defconfig | 8 --- nuttx/configs/stm3210e-eval/nxtext/defconfig | 8 --- nuttx/configs/stm3210e-eval/ostest/defconfig | 8 --- nuttx/configs/stm3210e-eval/pm/defconfig | 8 --- .../configs/stm3210e-eval/usbserial/defconfig | 8 --- .../stm3210e-eval/usbstorage/defconfig | 8 --- nuttx/configs/stm3220g-eval/README.txt | 8 +-- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 10 +-- nuttx/configs/stm3220g-eval/nettest/defconfig | 10 +-- nuttx/configs/stm3220g-eval/nsh/defconfig | 10 +-- nuttx/configs/stm3220g-eval/nsh2/defconfig | 10 +-- nuttx/configs/stm3220g-eval/nxwm/defconfig | 10 +-- nuttx/configs/stm3220g-eval/ostest/defconfig | 10 +-- nuttx/configs/stm3220g-eval/telnetd/defconfig | 10 +-- nuttx/configs/stm3240g-eval/README.txt | 8 +-- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 10 +-- nuttx/configs/stm3240g-eval/nettest/defconfig | 10 +-- nuttx/configs/stm3240g-eval/nsh/defconfig | 10 +-- nuttx/configs/stm3240g-eval/nsh2/defconfig | 10 +-- .../configs/stm3240g-eval/nxconsole/defconfig | 10 +-- nuttx/configs/stm3240g-eval/nxwm/defconfig | 10 +-- nuttx/configs/stm3240g-eval/ostest/defconfig | 10 +-- nuttx/configs/stm3240g-eval/telnetd/defconfig | 10 +-- .../configs/stm3240g-eval/webserver/defconfig | 10 +-- nuttx/configs/stm32f4discovery/README.txt | 14 ++-- .../configs/stm32f4discovery/ostest/defconfig | 8 --- nuttx/configs/twr-k60n512/nsh/defconfig | 8 --- nuttx/configs/twr-k60n512/ostest/defconfig | 8 --- nuttx/configs/vsn/nsh/defconfig | 10 +-- nuttx/mm/Kconfig | 36 ++++++++--- 59 files changed, 145 insertions(+), 424 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 252edd737b..66f56401da 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3263,4 +3263,8 @@ * Kconfig: Refactor serial settings (moved from chip to drivers/serial). AVR "teensy" now builds with Kconfig (contributed by Richard Cochran). * Kconfig: Add configuration settings for the LPC17xx - * Kconfig: Add configuratino settings for the LM3S (from Richard Cochran). + * Kconfig: Add configuration settings for the LM3S (from Richard Cochran). + * Kconfig: Verify configuration settings for the STM32. This include + changes in the way that the external SRAM is configured: Define + CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex). + diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index fea56b7392..90bc4da918 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -58,11 +58,13 @@ config ARCH_X86 config ARCH_Z16 bool "ZNEO" + select ARCH_HAVE_HEAP2 ---help--- ZiLOG ZNEO 16-bit architectures (z16f). config ARCH_Z80 bool "z80" + select ARCH_HAVE_HEAP2 ---help--- ZiLOG 8-bit architectures (z80, ez80, z8). diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index e6b195aff6..2b06f354c5 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -17,6 +17,7 @@ config ARCH_CHIP_C5471 config ARCH_CHIP_CALYPSO bool "Calypso" select ARCH_ARM7TDMI + select ARCH_HAVE_HEAP2 ---help--- TI Calypso-based cell phones (ARM7TDMI) @@ -29,6 +30,7 @@ config ARCH_CHIP_DM320 config ARCH_CHIP_IMX bool "Freescale iMX" select ARCH_ARM920T + select ARCH_HAVE_HEAP2 ---help--- Freescale iMX architectures (ARM920T) diff --git a/nuttx/arch/arm/src/calypso/calypso_heap.c b/nuttx/arch/arm/src/calypso/calypso_heap.c index b51596f90a..095fd1a5ad 100644 --- a/nuttx/arch/arm/src/calypso/calypso_heap.c +++ b/nuttx/arch/arm/src/calypso/calypso_heap.c @@ -37,6 +37,10 @@ * ****************************************************************************/ +/**************************************************************************** + * Included Files + ****************************************************************************/ + #include #include @@ -52,6 +56,14 @@ #include "up_arch.h" #include "up_internal.h" +/**************************************************************************** + * Preprocessor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: up_addregion * @@ -84,7 +96,7 @@ void up_addregion(void) /* Configure the RHEA bridge with some sane default values */ calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0); - mm_addregion((FAR void*)CONFIG_HEAP2_START, CONFIG_HEAP2_END-CONFIG_HEAP2_START); + mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); } #endif diff --git a/nuttx/arch/arm/src/imx/imx_allocateheap.c b/nuttx/arch/arm/src/imx/imx_allocateheap.c index 1574cac007..a42b2fb85e 100644 --- a/nuttx/arch/arm/src/imx/imx_allocateheap.c +++ b/nuttx/arch/arm/src/imx/imx_allocateheap.c @@ -111,8 +111,8 @@ void up_addregion(void) /* Check for any additional memory regions */ -#if defined(CONFIG_HEAP2_BASE) && defined(CONFIG_HEAP2_END) - mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE); +#if defined(CONFIG_HEAP2_BASE) && defined(CONFIG_HEAP2_SIZE) + mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); #endif } #endif diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 442f7c659f..db785fd621 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -84,7 +84,42 @@ config STM32_STM32F20XX config STM32_STM32F40XX bool - default y if ARCH_CHIP_STM32F405RG || ARCH_CHIP_STM32F405VG || ARCH_CHIP_STM32F405ZG || ARCH_CHIP_STM32F407VE || ARCH_CHIP_STM32F407VG || ARCH_CHIP_STM32F407ZE || ARCH_CHIP_STM32F407ZG || ARCH_CHIP_STM32F407IE || ARCH_CHIP_STM32F407IE + default y if ARCH_CHIP_STM32F405RG || ARCH_CHIP_STM32F405VG || ARCH_CHIP_STM32F405ZG || ARCH_CHIP_STM32F407VE || ARCH_CHIP_STM32F407VG || ARCH_CHIP_STM32F407ZE || ARCH_CHIP_STM32F407ZG || ARCH_CHIP_STM32F407IE || ARCH_CHIP_STM32F407IG + +choice + prompt "Toolchain Selection" + default STM32_CODESOURCERYW + depends on ARCH_CHIP_STM32 + +config STM32_CODESOURCERYW + bool "CodeSourcery for Windows" + +config STM32_CODESOURCERYL + bool "CodeSourcery for Linux" + +config STM32_ATOLLIC_LITE + bool "Atollic Lite for Windows" + +config STM32_ATOLLIC_PRO + bool "Atollic Pro for Windows" + +config STM32_DEVKITARM + bool "DevkitARM (Windows)" + +config STM32_RAISONANCE + bool "STMicro Raisonance for Windows" + +config STM32_BUILDROOT + bool "NuttX buildroot (Cygwin or Linux)" + +endchoice + +config STM32_DFU + bool "DFU bootloader" + default n + ---help--- + Configure and position code for use with the STMicro DFU bootloader. Do + not select this option if you will load code using JTAG/SWM. menu "STM32 Peripheral Support" @@ -228,7 +263,7 @@ config STM32_SPI4 config STM32_SYSCFG bool "SYSCFG" - default n + default y depends on STM32_STM32F20XX || STM32_STM32F40XX config STM32_TIM1 @@ -517,24 +552,11 @@ config STM32_CCMEXCLUDE config STM32_FSMC_SRAM bool "External SRAM on FSMC" default n - depends on FSMC + depends on STM32_FSMC + select ARCH_HAVE_HEAP2 ---help--- In addition to internal SRAM, SRAM may also be available through the FSMC. -config HEAP2_BASE - hex "FSMC SRAM base address" - default 0x00000000 - depends on STM32_FSMC_SRAM - ---help--- - The base address of the SRAM in the FSMC address space. - -config HEAP2_END - hex "FSMC SRAM end+1 address" - default 0x00000000 - depends on STM32_FSMC_SRAM - ---help--- - The end (+1) of the SRAM in the FSMC address space - config STM32_TIM1_PWM bool "TIM1 PWM" default n @@ -1536,6 +1558,7 @@ config STM32_PHYADDR config STM32_MII bool "Use MII interface" default n + depends on STM32_ETHMAC ---help--- Support Ethernet MII interface. @@ -1549,13 +1572,14 @@ config STM32_MII_MCO2 config STM32_AUTONEG bool "Use autonegtiation" default y + depends on STM32_ETHMAC ---help--- Use PHY autonegotion to determine speed and mode config STM32_ETHFD bool "Full duplex" default n - depends on !STM32_AUTONEG + depends on STM32_ETHMAC && !STM32_AUTONEG ---help--- If STM32_AUTONEG is not defined, then this may be defined to select full duplex mode. Default: half-duplex @@ -1563,7 +1587,7 @@ config STM32_ETHFD config STM32_ETH100MBPS bool "100 Mbps" default n - depends on !STM32_AUTONEG + depends on STM32_ETHMAC && !STM32_AUTONEG ---help--- If STM32_AUTONEG is not defined, then this may be defined to select 100 MBps speed. Default: 10 Mbps @@ -1607,6 +1631,7 @@ config STM32_PHYSR_FULLDUPLEX config STM32_ETH_PTP bool "Precision Time Protocol (PTP)" default n + depends on STM32_ETHMAC ---help--- Precision Time Protocol (PTP). Not supported but some hooks are indicated with this condition. @@ -1616,6 +1641,7 @@ endmenu config STM32_RMII bool default y if !STM32_MII + depends on STM32_ETHMAC config STM32_MII_MCO1 bool diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c index 4c186a852b..8aa5622c8f 100644 --- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c +++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c @@ -73,13 +73,14 @@ * * CONFIG_STM32_FSMC=y : Enables the FSMC * CONFIG_STM32_FSMC_SRAM=y : Indicates that SRAM is available via the - * FSMC (as opposed to an LCD or FLASH). + * FSMC (as opposed to an LCD or FLASH). * CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC - * address space - * CONFIG_HEAP2_END : The end (+1) of the SRAM in the FSMC - * address space + * address space + * CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC + * address space * CONFIG_MM_REGIONS : Must be set to a large enough value to - * include the FSMC SRAM (as determined by the rules provided below) + * include the FSMC SRAM (as determined by + * the rules provided below) */ #ifndef CONFIG_STM32_FSMC @@ -256,12 +257,12 @@ /* If FSMC SRAM is going to be used as heap, then verify that the starting * address and size of the external SRAM region has been provided in the - * configuration (as CONFIG_HEAP2_BASE and CONFIG_HEAP2_END). + * configuration (as CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE). */ #ifdef CONFIG_STM32_FSMC_SRAM -# if !defined(CONFIG_HEAP2_BASE) || !defined(CONFIG_HEAP2_END) -# error "CONFIG_HEAP2_BASE and CONFIG_HEAP2_END must be provided" +# if !defined(CONFIG_HEAP2_BASE) || !defined(CONFIG_HEAP2_SIZE) +# error "CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE must be provided" # undef CONFIG_STM32_FSMC_SRAM # endif #endif @@ -317,7 +318,7 @@ void up_addregion(void) /* Add the external FSMC SRAM heap region. */ #ifdef CONFIG_STM32_FSMC_SRAM - mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE); + mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); #endif } #endif diff --git a/nuttx/arch/z16/src/common/up_allocateheap.c b/nuttx/arch/z16/src/common/up_allocateheap.c index 62d96e0b34..0b6c766d36 100644 --- a/nuttx/arch/z16/src/common/up_allocateheap.c +++ b/nuttx/arch/z16/src/common/up_allocateheap.c @@ -107,6 +107,6 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) #if CONFIG_MM_REGIONS > 1 void up_addregion(void) { - mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE); + mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); } #endif diff --git a/nuttx/arch/z80/src/common/up_allocateheap.c b/nuttx/arch/z80/src/common/up_allocateheap.c index cb2f555938..368785cf2c 100644 --- a/nuttx/arch/z80/src/common/up_allocateheap.c +++ b/nuttx/arch/z80/src/common/up_allocateheap.c @@ -109,6 +109,6 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) #if CONFIG_MM_REGIONS > 1 void up_addregion(void) { - mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE); + mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); } #endif diff --git a/nuttx/configs/compal_e99/nsh_compalram/defconfig b/nuttx/configs/compal_e99/nsh_compalram/defconfig index a52e2aaf06..a60fbf9479 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/defconfig +++ b/nuttx/configs/compal_e99/nsh_compalram/defconfig @@ -45,8 +45,8 @@ CONFIG_ARCH_BOARD_COMPALE99=y CONFIG_BOARD_LOOPSPERMSEC=1250 CONFIG_ROM_VECTORS=n CONFIG_MM_REGIONS=2 -CONFIG_HEAP2_START=0x01000000 -CONFIG_HEAP2_END=0x01200000 +CONFIG_HEAP2_BASE=0x01000000 +CONFIG_HEAP2_SIZE=2097152 CONFIG_ARCH_LEDS=n CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig index e5f997ebf7..4ed6e486bc 100644 --- a/nuttx/configs/compal_e99/nsh_highram/defconfig +++ b/nuttx/configs/compal_e99/nsh_highram/defconfig @@ -45,8 +45,8 @@ CONFIG_ARCH_BOARD_COMPALE99=y CONFIG_BOARD_LOOPSPERMSEC=1250 CONFIG_ROM_VECTORS=n CONFIG_MM_REGIONS=2 -CONFIG_HEAP2_START=0x01000000 -CONFIG_HEAP2_END=0x01200000 +CONFIG_HEAP2_BASE=0x01000000 +CONFIG_HEAP2_SIZE=2097152 CONFIG_ARCH_LEDS=n CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index 5038643192..a5792af4fd 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -155,14 +155,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=y -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index 17aaf9f6cb..89d40eb584 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -153,14 +153,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103V specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index 54574b26c5..8b835ee273 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -158,14 +158,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index 2d3d03832c..7eeff113e4 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -153,14 +153,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103V specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index 1dc04c0134..f2ca2651fd 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -157,14 +157,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103V specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 8f0e1f3d46..2f4b27f96b 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -155,14 +155,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103V specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 85627dfda5..33c8b4db33 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -154,14 +154,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103V specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 3f26570ce8..400ff88762 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -165,14 +165,6 @@ CONFIG_UART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -# -# K40X256VLQ100 specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 781dcd64ca..18858d5df2 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index ad07b7aa1c..5532a921f7 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -185,14 +185,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=y -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt index 0d292565eb..8582e95ff8 100755 --- a/nuttx/configs/stm3210e-eval/README.txt +++ b/nuttx/configs/stm3210e-eval/README.txt @@ -362,7 +362,7 @@ The on-board SRAM can be configured by setting CONFIG_STM32_FSMC=y : Enables the FSMC CONFIG_STM32_FSMC_SRAM=y : Enable external SRAM support CONFIG_HEAP2_BASE=0x68000000 : SRAM will be located at 0x680000000 - CONFIG_HEAP2_END=(0x68000000+(1*1024*1024)) : The size of the SRAM is 1Mbyte + CONFIG_HEAP2_SIZE=1048576 : The size of the SRAM is 1Mbyte CONFIG_MM_REGIONS=2 : There will be two memory regions : in the heap diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index 4d87e2d2c8..942f3e4ba3 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -151,14 +151,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index 08703af7d3..102b091407 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -162,14 +162,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=y -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 16415e793f..e79cdb8c02 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 3aedb6bd55..d5fd9a30c9 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index a9d2790512..20e276a6ab 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -181,14 +181,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 359e70969e..7a7eaf1d9d 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index 4d30ed8eaa..6084a228a5 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index 476f85e5fb..554b15f6f6 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index cef3a62467..4e95c11082 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 18239c9958..cb93364334 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -161,14 +161,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 48b9e83b3b..370399882c 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -191,14 +191,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index da13a876dd..829e551969 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -161,14 +161,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 05b5a288fa..72ef6cc672 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -160,14 +160,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM3210E-EVAL specific LCD settings # diff --git a/nuttx/configs/stm3220g-eval/README.txt b/nuttx/configs/stm3220g-eval/README.txt index bbd42cbc94..04585f69f4 100644 --- a/nuttx/configs/stm3220g-eval/README.txt +++ b/nuttx/configs/stm3220g-eval/README.txt @@ -352,7 +352,7 @@ The on-board SRAM can be configured by setting CONFIG_STM32_FSMC=y CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 - CONFIG_HEAP2_END=(0x64000000+(2*1024*1024)) + CONFIG_HEAP2_SIZE=2097152 CONFIG_MM_REGIONS=2 Configuration Options @@ -368,7 +368,7 @@ NuttX configuration file: FSMC (as opposed to an LCD or FLASH). CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC address space - CONFIG_HEAP2_END : The end (+1) of the SRAM in the FSMC + CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC address space CONFIG_MM_REGIONS : Must be set to a large enough value to include the FSMC SRAM @@ -475,9 +475,9 @@ STM3220G-EVAL-specific Configuration Options CONFIG_STM32_FSMC_SRAM - Indicates that SRAM is available via the FSMC (as opposed to an LCD or FLASH). - CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space + CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex) - CONFIG_HEAP2_END - The end (+1) of the SRAM in the FSMC address space + CONFIG_HEAP2_SIZE - The size of the SRAM in the FSMC address space (decimal) CONFIG_ARCH_IRQPRIO - The STM3220xxx supports interrupt prioritization diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index d8cac6aabf..848121e04c 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index ebd176269c..7e660ad027 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 937ce76861..48912bd8b9 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index 7e4d8127c7..c2ede9c67f 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index cbbdca2e32..6e69333255 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=n CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 1ae110716d..d0ace11bce 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index f39e104bd5..2ff215afcf 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -78,7 +78,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -183,14 +183,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F20xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F20xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index 15e8b9f3d1..151811189a 100755 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -451,7 +451,7 @@ The on-board SRAM can be configured by setting CONFIG_STM32_FSMC=y CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 - CONFIG_HEAP2_END=(0x64000000+(2*1024*1024)) + CONFIG_HEAP2_SIZE=2097152 CONFIG_MM_REGIONS=2 (or =3, see below) Configuration Options @@ -472,7 +472,7 @@ present in the NuttX configuration file: FSMC (as opposed to an LCD or FLASH). CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC address space - CONFIG_HEAP2_END : The end (+1) of the SRAM in the FSMC + CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC address space CONFIG_MM_REGIONS : Must be set to a large enough value to include the FSMC SRAM @@ -591,9 +591,9 @@ STM3240G-EVAL-specific Configuration Options CONFIG_STM32_FSMC_SRAM - Indicates that SRAM is available via the FSMC (as opposed to an LCD or FLASH). - CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space + CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex) - CONFIG_HEAP2_END - The end (+1) of the SRAM in the FSMC address space + CONFIG_HEAP2_END - The size of the SRAM in the FSMC address space (decimal) CONFIG_ARCH_IRQPRIO - The STM3240xxx supports interrupt prioritization diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index a8372456f0..382ce61553 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 500a8ab15b..9eb8f3d5ce 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 4a0246ef43..8b2617ec05 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index e9e0c272f6..00d9dac0a2 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -84,7 +84,7 @@ CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -190,14 +190,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 8413a1b594..172d17b6ff 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index de8ebffaec..07bc408dcc 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=n CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 58b86beea0..1f23047306 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 39cde6b0fb..44a0f27baa 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 5c6e573d54..7bd8e52ceb 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -83,7 +83,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # CONFIG_STM32_FSMC_SRAM=y CONFIG_HEAP2_BASE=0x64000000 -CONFIG_HEAP2_END=0x64200000 +CONFIG_HEAP2_SIZE=2097152 # # Individual subsystems can be enabled: @@ -189,14 +189,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index 93b8fee038..12b30c62c4 100755 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -445,13 +445,13 @@ present in the NuttX configuration file: CONFIG_STM32_FSMC=y : Enables the FSMC CONFIG_STM32_FSMC_SRAM=y : Indicates that SRAM is available via the - FSMC (as opposed to an LCD or FLASH). + FSMC (as opposed to an LCD or FLASH). CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC - address space - CONFIG_HEAP2_END : The end (+1) of the SRAM in the FSMC - address space + address space + CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC + address space CONFIG_MM_REGIONS : Must be set to a large enough value to - include the FSMC SRAM + include the FSMC SRAM SRAM Configurations ------------------- @@ -704,9 +704,9 @@ STM32F4Discovery-specific Configuration Options CONFIG_STM32_FSMC_SRAM - Indicates that SRAM is available via the FSMC (as opposed to an LCD or FLASH). - CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space + CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex) - CONFIG_HEAP2_END - The end (+1) of the SRAM in the FSMC address space + CONFIG_HEAP2_SIZE - The size of the SRAM in the FSMC address space (decimal) CONFIG_ARCH_IRQPRIO - The STM32F4Discovery supports interrupt prioritization diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index c7cee2331f..5c120c6144 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -178,14 +178,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F40xxx specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # STM32F40xxx specific CAN device driver settings # diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index b9670c3984..ca1dbe3350 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -164,14 +164,6 @@ CONFIG_UART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -# -# K40X256VLQ100 specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index 5d5b1245c5..1bb41c3108 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -164,14 +164,6 @@ CONFIG_UART3_PARITY=0 CONFIG_UART4_PARITY=0 CONFIG_UART5_PARITY=0 -# -# K40X256VLQ100 specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=n -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # General build options # diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 348a678448..0ee46dec07 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -3,7 +3,7 @@ # # Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved. # Copyright (c) 2011 Uros Platise. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # Uros Platise # # Redistribution and use in source and binary forms, with or without @@ -181,14 +181,6 @@ CONFIG_USART3_2STOP=0 CONFIG_UART4_2STOP=0 CONFIG_UART5_2STOP=0 -# -# STM32F103Z specific SSI device driver settings -# -CONFIG_SSI0_DISABLE=y -CONFIG_SSI1_DISABLE=y -CONFIG_SSI_POLLWAIT=y -#CONFIG_SSI_TXLIMIT=4 - # # OS support for I2C # diff --git a/nuttx/mm/Kconfig b/nuttx/mm/Kconfig index 000217dc5c..bf3540138f 100644 --- a/nuttx/mm/Kconfig +++ b/nuttx/mm/Kconfig @@ -3,15 +3,6 @@ # see misc/tools/kconfig-language.txt. # -config MM_REGIONS - int "Number of memory regions" - default 1 - ---help--- - If the architecture includes multiple, non-contiguous regions of - memory to allocate from, this specifies the number of memory regions - that the memory manager must handle and enables the API - mm_addregion(start, end); - config MM_SMALL bool "Small memory model" default n @@ -24,3 +15,30 @@ config MM_SMALL have internal SRAM of size less than or equal to 64Kb. In this case, CONFIG_MM_SMALL can be defined so that those MCUs will also benefit from the smaller, 16-bit-based allocation overhead. + +config MM_REGIONS + int "Number of memory regions" + default 1 + ---help--- + If the architecture includes multiple, non-contiguous regions of + memory to allocate from, this specifies the number of memory regions + that the memory manager must handle and enables the API + mm_addregion(start, end); + +config ARCH_HAVE_HEAP2 + bool + +config HEAP2_BASE + hex "Start address of second heap region" + default 0x00000000 + depends on ARCH_HAVE_HEAP2 + ---help--- + The base address of the second heap region. + +config HEAP2_SIZE + int "Size of the second heap region" + default 0 + depends on ARCH_HAVE_HEAP2 + ---help--- + The size of the second heap region. + From 8925923a5d45fdde74b3191f5b90e98494072a44 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Sep 2012 01:19:05 +0000 Subject: [PATCH 22/95] configure.sh: Don't append the apps directory path setting if the correct setting is already in defined in the defconfig file. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5101 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/lm3s/Kconfig | 4 ++-- nuttx/tools/configure.sh | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/nuttx/arch/arm/src/lm3s/Kconfig b/nuttx/arch/arm/src/lm3s/Kconfig index a1b401db77..1fd203f4fc 100644 --- a/nuttx/arch/arm/src/lm3s/Kconfig +++ b/nuttx/arch/arm/src/lm3s/Kconfig @@ -26,8 +26,8 @@ config ARCH_CHIP_LM3S8962 endchoice choice - prompt "Toolchain" - default LM3S_BUILDROOT + prompt "Toolchain" + default LM3S_BUILDROOT config LM3S_CODESOURCERYW bool "CodeSourcery GNU toolchain under Windows" diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh index c0df7035f0..7ac4b8a3cb 100755 --- a/nuttx/tools/configure.sh +++ b/nuttx/tools/configure.sh @@ -123,8 +123,12 @@ fi newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2` +defappdir=y if [ -z "${appdir}" ]; then appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2` + if [ ! -z "${appdir}" ]; then + defappdir=n + fi fi # Check for the apps/ directory in the usual place if appdir was not provided @@ -181,10 +185,13 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \ { echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; } - echo "" >> "${TOPDIR}/.configX" - echo "# Application configuration" >> "${TOPDIR}/.configX" - echo "" >> "${TOPDIR}/.configX" - echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX" + if [ "X${defappdir}" = "Xy" ]; then + sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX" + echo "" >> "${TOPDIR}/.configX" + echo "# Application configuration" >> "${TOPDIR}/.configX" + echo "" >> "${TOPDIR}/.configX" + echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX" + fi fi fi From 7a9e9d3833da9eaa5a10b2f6b29e762eff05c89c Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Sep 2012 14:46:08 +0000 Subject: [PATCH 23/95] Important FAT fix. Bad test would cause many un-necessary writes to FLASH. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5102 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 4 ++++ nuttx/fs/fat/fs_fat32util.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 66f56401da..3608c33c1d 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3267,4 +3267,8 @@ * Kconfig: Verify configuration settings for the STM32. This include changes in the way that the external SRAM is configured: Define CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex). + * tools/configure.sh: Don't append the apps directory path setting + if the correct setting is already in defined in the defconfig file. + * fs/fat/fs_utils.c: Improper constructed bool expression. This + would cause many unnecessary writes to FLASH (Thanks Ronen Vainish). diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c index 397467c417..b88046d796 100644 --- a/nuttx/fs/fat/fs_fat32util.c +++ b/nuttx/fs/fat/fs_fat32util.c @@ -1563,7 +1563,7 @@ int fat_ffcacheflush(struct fat_mountpt_s *fs, struct fat_file_s *ff) */ if (ff->ff_cachesector && - ff->ff_bflags && (FFBUFF_DIRTY|FFBUFF_VALID) == (FFBUFF_DIRTY|FFBUFF_VALID)) + (ff->ff_bflags & (FFBUFF_DIRTY|FFBUFF_VALID)) == (FFBUFF_DIRTY|FFBUFF_VALID)) { /* Write the dirty sector */ From dcd68236b1442bc2138bf2d500bee8faa6e13ed4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Sep 2012 15:38:53 +0000 Subject: [PATCH 24/95] Update LPC43 Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5103 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 5 +++- nuttx/arch/arm/Kconfig | 6 +++- nuttx/arch/arm/src/lpc43xx/Kconfig | 30 ++++++++++++++++++- nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h | 6 ++-- nuttx/configs/lpc4330-xplorer/README.txt | 8 ++--- nuttx/configs/lpc4330-xplorer/nsh/Make.defs | 2 +- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 3 +- .../configs/lpc4330-xplorer/ostest/Make.defs | 2 +- .../configs/lpc4330-xplorer/ostest/defconfig | 3 +- 9 files changed, 51 insertions(+), 14 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 3608c33c1d..c8e53d173c 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3264,11 +3264,14 @@ AVR "teensy" now builds with Kconfig (contributed by Richard Cochran). * Kconfig: Add configuration settings for the LPC17xx * Kconfig: Add configuration settings for the LM3S (from Richard Cochran). - * Kconfig: Verify configuration settings for the STM32. This include + * Kconfig: Verify configuration settings for the STM32. This includes changes in the way that the external SRAM is configured: Define CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex). * tools/configure.sh: Don't append the apps directory path setting if the correct setting is already in defined in the defconfig file. * fs/fat/fs_utils.c: Improper constructed bool expression. This would cause many unnecessary writes to FLASH (Thanks Ronen Vainish). + * Kconfig: Verify configuration settings for the LPC432xx. This includes + some corrections to configuration variable names and defconfig settings. + diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 2b06f354c5..79462b6f51 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -75,8 +75,8 @@ config ARCH_CHIP_LPC31XX config ARCH_CHIP_LPC43XX bool "NXP LPC43XX" - select ARCH_CORTEXM select ARCH_CORTEXM4 + select ARMV7M_CMNVECTOR ---help--- NPX LPC43XX architectures (ARM Cortex-M4). @@ -115,6 +115,10 @@ config ARCH_CORTEXM3 config ARCH_CORTEXM4 bool +config ARMV7M_CMNVECTOR + bool + default n + config ARCH_FPU bool "FPU support" default y diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 500f8da209..b4f19b524f 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -85,9 +85,37 @@ config ARCH_FAMILY_LPC4357 bool default y if ARCH_CHIP_LPC4357FET180 || ARCH_CHIP_LPC4357FBD208 || ARCH_CHIP_LPC4357FET256 +choice + prompt "Toolchain Selection" + default LPC43_CODEREDW + depends on ARCH_CHIP_LPC43XX + +config LPC43_CODEREDW + bool "CodeRed for Windows" + +config LPC43_CODESOURCERYW + bool "CodeSourcery for Windows" + +config LPC43_CODESOURCERYL + bool "CodeSourcery for Linux" + +config LPC43_ATOLLIC_LITE + bool "Atollic Lite for Windows" + +config LPC43_ATOLLIC_PRO + bool "Atollic Pro for Windows" + +config LPC43_DEVKITARM + bool "DevkitARM (Windows)" + +config LPC43_BUILDROOT + bool "NuttX buildroot (Cygwin or Linux)" + +endchoice + choice prompt "LPC43XX Boot Configuration" - default CONFIG_BOOT_SRAM + default BOOT_SRAM depends on ARCH_CHIP_LPC43XX ---help--- The startup code needs to know if the code is running from internal FLASH, diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h index 97076cd802..94a2a64eac 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_ARM_SRC_LPC43XX_LPC32_USB0DEV_H -#define __ARCH_ARM_SRC_LPC43XX_LPC32_USB0DEV_H +#ifndef __ARCH_ARM_SRC_LPC43XX_LPC43_USB0DEV_H +#define __ARCH_ARM_SRC_LPC43XX_LPC43_USB0DEV_H /************************************************************************************ * Included Files @@ -94,5 +94,5 @@ EXTERN void lpc43_usbsuspend(FAR struct usbdev_s *dev, bool resume); #endif #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_LPC43XX_LPC32_USB0DEV_H */ +#endif /* __ARCH_ARM_SRC_LPC43XX_LPC43_USB0DEV_H */ diff --git a/nuttx/configs/lpc4330-xplorer/README.txt b/nuttx/configs/lpc4330-xplorer/README.txt index c9dd08ac5a..cc15746d49 100644 --- a/nuttx/configs/lpc4330-xplorer/README.txt +++ b/nuttx/configs/lpc4330-xplorer/README.txt @@ -146,7 +146,7 @@ GNU Toolchain Options the CodeSourcery or devkitARM toolchain, you simply need add one of the following configuration options to your .config (or defconfig) file: - CONFIG_LPC32_CODEREDW=y : Code Red "RedSuite" under Windows + CONFIG_LPC43_CODEREDW=y : Code Red "RedSuite" under Windows CONFIG_LPC43_CODESOURCERYW=y : CodeSourcery under Windows CONFIG_LPC43_CODESOURCERYL=y : CodeSourcery under Linux CONFIG_LPC43_ATOLLIC_LITE=y : The free, "Lite" version of Atollic toolchain under Windows @@ -431,7 +431,7 @@ Code Red IDE/Tools from SRAM. CONFIG_BOOT_SRAM=y : Executing in SRAM - CONFIG_LPC32_CODEREDW=y : Code Red under Windows + CONFIG_LPC43_CODEREDW=y : Code Red under Windows To execute from SPIFI, you would need to set: @@ -859,7 +859,7 @@ Where is one of the following: executing directly from SRAM. CONFIG_BOOT_SRAM=y : Executing in SRAM - CONFIG_LPC32_CODEREDW=y : Code Red under Windows + CONFIG_LPC43_CODEREDW=y : Code Red under Windows This configuration directory, performs a simple test of the USB host HID keyboard class driver using the test logic in examples/hidkbd. @@ -899,7 +899,7 @@ Where is one of the following: executing directly from SRAM. CONFIG_BOOT_SRAM=y : Executing in SRAM - CONFIG_LPC32_CODEREDW=y : Code Red under Windows + CONFIG_LPC43_CODEREDW=y : Code Red under Windows To execute from SPIFI, you would need to set: diff --git a/nuttx/configs/lpc4330-xplorer/nsh/Make.defs b/nuttx/configs/lpc4330-xplorer/nsh/Make.defs index 22c48c57e9..db7b72815d 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/Make.defs +++ b/nuttx/configs/lpc4330-xplorer/nsh/Make.defs @@ -38,7 +38,7 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC32_CODEREDW),y) +ifeq ($(CONFIG_LPC43_CODEREDW),y) # Code Red RedSuite under Windows CROSSDEV = arm-none-eabi- ARCROSSDEV = arm-none-eabi- diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index db3474a4a6..1396a6b9d6 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM4=y CONFIG_ARCH_CHIP="lpc43xx" +CONFIG_ARCH_CHIP_LPC43XX=y CONFIG_ARCH_CHIP_LPC4330FET100=y CONFIG_ARCH_BOARD="lpc4330-xplorer" CONFIG_ARCH_BOARD_LPC4330_XPLORER=y @@ -71,7 +72,7 @@ CONFIG_BOOT_CS3FLASH=n # # Identify toolchain and linker options # -CONFIG_LPC32_CODEREDW=y +CONFIG_LPC43_CODEREDW=y CONFIG_LPC43_CODESOURCERYW=n CONFIG_LPC43_CODESOURCERYL=n CONFIG_LPC43_ATOLLIC_LITE=n diff --git a/nuttx/configs/lpc4330-xplorer/ostest/Make.defs b/nuttx/configs/lpc4330-xplorer/ostest/Make.defs index 22c48c57e9..db7b72815d 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/Make.defs +++ b/nuttx/configs/lpc4330-xplorer/ostest/Make.defs @@ -38,7 +38,7 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC32_CODEREDW),y) +ifeq ($(CONFIG_LPC43_CODEREDW),y) # Code Red RedSuite under Windows CROSSDEV = arm-none-eabi- ARCROSSDEV = arm-none-eabi- diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 40af52c5a9..5f58cd5447 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_CORTEXM4=y CONFIG_ARCH_CHIP="lpc43xx" +CONFIG_ARCH_CHIP_LPC43XX=y CONFIG_ARCH_CHIP_LPC4330FET100=y CONFIG_ARCH_BOARD="lpc4330-xplorer" CONFIG_ARCH_BOARD_LPC4330_XPLORER=y @@ -71,7 +72,7 @@ CONFIG_BOOT_CS3FLASH=n # # Identify toolchain and linker options # -CONFIG_LPC32_CODEREDW=y +CONFIG_LPC43_CODEREDW=y CONFIG_LPC43_CODESOURCERYW=n CONFIG_LPC43_CODESOURCERYL=n CONFIG_LPC43_ATOLLIC_LITE=n From 941daa511e106c1c50e2b077160c1bc9a2495bc8 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Sep 2012 20:08:25 +0000 Subject: [PATCH 25/95] Add LPC31 Kconfig git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5104 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 6 +- nuttx/arch/Kconfig | 53 +++++- nuttx/arch/arm/Kconfig | 107 ++++++++--- nuttx/arch/arm/src/lpc17xx/Kconfig | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c | 12 +- nuttx/arch/arm/src/lpc31xx/Kconfig | 180 ++++++++++++++++++ nuttx/arch/arm/src/lpc31xx/Make.defs | 2 +- nuttx/arch/arm/src/lpc31xx/chip.h | 5 +- nuttx/arch/arm/src/lpc31xx/lpc31_adc.h | 2 +- .../arch/arm/src/lpc31xx/lpc31_allocateheap.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_dma.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_i2c.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_intc.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_internal.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_irq.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_mci.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_nand.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_otp.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_rng.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_spi.c | 26 ++- nuttx/arch/arm/src/lpc31xx/lpc31_spi.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_timer.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_uart.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c | 18 +- nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h | 2 +- nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h | 2 +- nuttx/configs/ea3131/nsh/defconfig | 54 +++--- nuttx/configs/ea3131/ostest/defconfig | 56 +++--- nuttx/configs/ea3131/pgnsh/defconfig | 56 +++--- nuttx/configs/ea3131/usbserial/defconfig | 56 +++--- nuttx/configs/ea3131/usbstorage/defconfig | 56 +++--- nuttx/configs/ea3152/ostest/defconfig | 56 +++--- nuttx/drivers/usbdev/Kconfig | 7 + nuttx/sched/Kconfig | 14 -- 64 files changed, 555 insertions(+), 303 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c8e53d173c..9e0ca4b68a 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3271,7 +3271,7 @@ if the correct setting is already in defined in the defconfig file. * fs/fat/fs_utils.c: Improper constructed bool expression. This would cause many unnecessary writes to FLASH (Thanks Ronen Vainish). - * Kconfig: Verify configuration settings for the LPC432xx. This includes - some corrections to configuration variable names and defconfig settings. - + * Kconfig: Verify configuration settings for the LPC43xx. This includes + some corrections to configuration variable names and defconfig settings. + * Kconfig: Add and verify configuration settings for the LPC31xx. diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index 90bc4da918..0c124b2423 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -119,11 +119,58 @@ config BOARD_LOOPSPERMSEC is 100 seconds. config DRAM_START - hex "DRAM start address" + hex "DRAM start physical address" help - The physical start address of installed RAM. + The physical start address of installed RAM. Despite the naming, + this may be SDRAM or SRAM or any other RAM technology that support + program execution. + +config DRAM_VSTART + hex "DRAM start virtual address" + depends on ARCH_HAVE_MMU + help + The virtual start address of installed RAM. Despite the naming, + this may be SDRAM or SRAM or any other RAM technology that support + program execution. config DRAM_SIZE int "DRAM size" help - The size in bytes of the installed RAM. + The size in bytes of the installed RAM. Despite the naming, + this may be SDRAM or SRAM or any other RAM technology that support + program execution. + +comment "Boot options" + +choice + prompt "LPC31xx Boot Mode" + default BOOT_RUNFROMFLASH + +config BOOT_RUNFROMEXTSRAM + bool "Run from external SRAM" + ---help--- + Some configuration support booting and running from external SRAM. + +config BOOT_RUNFROMFLASH + bool "Boot and run from flash" + ---help--- + Most configurations support XIP operation from FLASH but must copy + initialized .data sections to RAM. (This is the default). + +config BOOT_RUNFROMISRAM + bool "Boot and run from internal SRAM" + ---help--- + Some configuration support booting and running from internal SRAM. + +config BOOT_RUNFROMSDRAM + bool "Boot and run from external SDRAM" + ---help--- + Some configuration support booting and running from external SDRAM. + +config BOOT_COPYTORAM + bool "Boot from FLASH but copy to ram" + ---help--- + Some configurations boot in FLASH but copy themselves entirely into + RAM for better performance. + +endchoice diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 79462b6f51..3343d7c474 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -11,6 +11,7 @@ choice config ARCH_CHIP_C5471 bool "TMS320 C5471" select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS ---help--- TI TMS320 C5471, A180, or DA180 (ARM7TDMI) @@ -18,12 +19,15 @@ config ARCH_CHIP_CALYPSO bool "Calypso" select ARCH_ARM7TDMI select ARCH_HAVE_HEAP2 + select ARCH_HAVE_LOWVECTORS ---help--- TI Calypso-based cell phones (ARM7TDMI) config ARCH_CHIP_DM320 bool "TMS320 DM320" select ARCH_ARM926EJS + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_MMU ---help--- TI DMS320 DM320 (ARM926EJS) @@ -31,70 +35,81 @@ config ARCH_CHIP_IMX bool "Freescale iMX" select ARCH_ARM920T select ARCH_HAVE_HEAP2 + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_MMU ---help--- Freescale iMX architectures (ARM920T) config ARCH_CHIP_KINETIS bool "Freescale Kinetis" - select ARCH_CORTEXM select ARCH_CORTEXM4 + select ARCH_HAVE_MPU ---help--- Freescale Kinetis Architectures (ARM Cortex-M4) config ARCH_CHIP_LM3S bool "TI Stellaris" - select ARCH_CORTEXM select ARCH_CORTEXM3 + select ARCH_HAVE_MPU ---help--- TI Stellaris LMS3 architecutres (ARM Cortex-M3) config ARCH_CHIP_LPC17XX bool "NXP LPC17xx" - select ARCH_CORTEXM select ARCH_CORTEXM3 + select ARCH_HAVE_MPU ---help--- NXP LPC17xx architectures (ARM Cortex-M3) config ARCH_CHIP_LPC214X bool "NXP LPC214x" select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS ---help--- NXP LPC2145x architectures (ARM7TDMI) config ARCH_CHIP_LPC2378 bool "NXP LPC2378" select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS ---help--- NXP LPC2145x architectures (ARM7TDMI) config ARCH_CHIP_LPC31XX bool "NXP LPC31XX" select ARCH_ARM926EJS + select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_MMU ---help--- NPX LPC31XX architectures (ARM926EJS). config ARCH_CHIP_LPC43XX bool "NXP LPC43XX" select ARCH_CORTEXM4 + select ARCH_HAVE_CMNVECTOR select ARMV7M_CMNVECTOR + select ARCH_HAVE_MPU ---help--- NPX LPC43XX architectures (ARM Cortex-M4). config ARCH_CHIP_SAM3U bool "Atmel AT91SAM3U" - select ARCH_CORTEXM select ARCH_CORTEXM3 + select ARCH_HAVE_MPU ---help--- Atmel AT91SAM3U architectures (ARM Cortex-M3) config ARCH_CHIP_STM32 bool "STMicro STM32" + select ARCH_HAVE_CMNVECTOR + select ARCH_HAVE_MPU ---help--- STMicro STM32 architectures (ARM Cortex-M3/4). config ARCH_CHIP_STR71X bool "STMicro STR71x" select ARCH_ARM7TDMI + select ARCH_HAVE_LOWVECTORS ---help--- STMicro STR71x architectures (ARM7TDMI). @@ -115,26 +130,6 @@ config ARCH_CORTEXM3 config ARCH_CORTEXM4 bool -config ARMV7M_CMNVECTOR - bool - default n - -config ARCH_FPU - bool "FPU support" - default y - depends on ARCH_CORTEXM4 - ---help--- - Build in support for the ARM Cortex-M4 Floating Point Unit (FPU). - Check your chip specifications first; not all Cortex-M4 chips support the FPU. - -config ARMV7M_MPU - bool "MPU support" - default n - depends on ARCH_CORTEXM3 || ARCH_CORTEXM4 - ---help--- - Build in support for the ARM Cortex-M3/4 Memory Protection Unit (MPU). - Check your chip specifications first; not all Cortex-M3/4 chips support the MPU. - config ARCH_FAMILY string default "arm" if ARCH_ARM7TDMI || ARCH_ARM926EJS || ARCH_ARM920T @@ -157,6 +152,70 @@ config ARCH_CHIP default "stm32" if ARCH_CHIP_STM32 default "str71x" if ARCH_CHIP_STR71X +config ARMV7M_CMNVECTOR + bool "Use common ARMv7-M vectors" + default n + depends on ARCH_HAVE_CMNVECTOR + ---help--- + Some architectures use their own, built-in vector logic. Some use only + the common vector logic. Some can use either their own built-in vector + logic or the common vector logic. This applies only to ARMv7-M + architectures. + +config ARCH_FPU + bool "FPU support" + default y + depends on ARCH_CORTEXM4 + ---help--- + Build in support for the ARM Cortex-M4 Floating Point Unit (FPU). + Check your chip specifications first; not all Cortex-M4 chips support the FPU. + +config ARCH_HAVE_MPU + bool + +config ARMV7M_MPU + bool "MPU support" + default n + depends on ARCH_HAVE_MPU + ---help--- + Build in support for the ARM Cortex-M3/4 Memory Protection Unit (MPU). + Check your chip specifications first; not all Cortex-M3/4 chips support the MPU. + +config ARCH_HAVE_LOWVECTORS + bool + +config ARCH_LOWVECTORS + bool "Vectors in low memory" + default n + depends on ARCH_HAVE_LOWVECTORS + ---help--- + Support ARM vectors in low memory. + +config ARCH_HAVE_MMU + bool + +config PGTABLE_VADDR + hex "Page table virtual address" + depends on ARCH_HAVE_MMU + ---help--- + Page table virtual address (might be defined in the board.h file). Not + applicable to all architectures. + +config ARCH_ROMPGTABLE + bool "ROM page table" + default n + depends on ARCH_HAVE_MMU + ---help--- + Support a fixed memory mapping use a (read-only) page table in ROM/FLASH. + +config PAGING + bool "On-demand paging" + default n + depends on ARCH_HAVE_MMU && !ARCH_ROMPGTABLE + ---help--- + If set =y in your configation file, this setting will enable the on-demand + paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html. + config ARCH_LEDS bool "Use board LEDs to show state" default y diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index 108579b3e1..f22f67344d 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -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 diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c index 4d6be083e0..ccaa3528a4 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -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); diff --git a/nuttx/arch/arm/src/lpc31xx/Kconfig b/nuttx/arch/arm/src/lpc31xx/Kconfig index ae2bf31307..51c0879987 100644 --- a/nuttx/arch/arm/src/lpc31xx/Kconfig +++ b/nuttx/arch/arm/src/lpc31xx/Kconfig @@ -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 + diff --git a/nuttx/arch/arm/src/lpc31xx/Make.defs b/nuttx/arch/arm/src/lpc31xx/Make.defs index 69af7726fd..83dadc8c01 100755 --- a/nuttx/arch/arm/src/lpc31xx/Make.defs +++ b/nuttx/arch/arm/src/lpc31xx/Make.defs @@ -2,7 +2,7 @@ # arch/arm/lpc31xx/Make.defs # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/chip.h b/nuttx/arch/arm/src/lpc31xx/chip.h index ba62730f76..4ffcf2fbf3 100755 --- a/nuttx/arch/arm/src/lpc31xx/chip.h +++ b/nuttx/arch/arm/src/lpc31xx/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/chip.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * 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 */ diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h index f0231e2551..c5edeef78e 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_adc.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c index 0f68dcc0c5..df3c897e11 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_allocateheap.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h b/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h index 7a8904deba..9daf5c34f8 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_analogdie.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c index 6da6aa55dc..f2bcf7276e 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_bcrndx.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h b/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h index e6c4befe78..0d1d7b7fb1 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_cgu.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h b/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h index fc589c893b..a408f56b22 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_cgudrvr.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c index 98014bb28e..e07f86e52e 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_clkdomain.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c index 1024c1035b..20bd0c7763 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_exten.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c index 845dc56021..e78b95086c 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_clkfreq.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c index 5e3e8ae4c1..b0e0322815 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_clkinit.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c index 9a417f9eb2..41e1d3e134 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lpc31_decodeirq.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c b/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c index 8e13df20d8..1f0ec194bc 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_defclk.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h b/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h index f88258be04..8bfac39d3c 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_dma.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c index 802b63f330..e29fe937db 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_esrndx.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h b/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h index b35c35a8a1..6ebc46e3b3 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_evntrtr.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c index 546705eecb..7d678b3702 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_fdcndx.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c b/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c index 27a31152db..f8ecb00f32 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_fdivinit.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c b/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c index 7e6bd3b3d4..3540592ac5 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_freqin.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.c b/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.c index 52777dbb6f..3d65c302d5 100644 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.c @@ -4,7 +4,7 @@ * Author: David Hewson * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h b/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h index d2425db3a6..e7574c7027 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_i2c.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h b/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h index 4d07dcc8fc..5ad4413f05 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_i2s.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h index 204ff75556..e6dabded88 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_intc.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h b/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h index d91f3a2e19..f68384b7ed 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_internal.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h b/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h index 491943fd69..2cf5e0c90a 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_ioconfig.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c index 69cddda6e4..4418ebc084 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lpc31_irq.c * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h b/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h index 2f659827a3..34aa6fc6e2 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_lcd.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h b/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h index 2520618260..8314db414d 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_mci.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h b/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h index 4935511819..b5155df89a 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_memorymap.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h index 5e927159d1..5c2b8761a6 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_mpmc.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h b/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h index ec429c0dd7..52f22bdc2b 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_nand.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h b/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h index f66605e5f5..349fe2154e 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_otp.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h b/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h index c3815a8657..0be577aefc 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_pcm.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c b/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c index dba4d25b63..fc6d4dc3b2 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_pllconfig.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h b/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h index 9263c99d37..042cd79d9c 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_pwm.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c b/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c index 0f24957f03..fe32879409 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_resetclks.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h b/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h index 585a4b4979..e0539f96aa 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_rng.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c b/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c index 4ed1d855ad..196118b18f 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_setfdiv.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c b/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c index b247af4039..bbac382409 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_setfreqin.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c b/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c index 8bf9ef12af..fcade115a2 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_softreset.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_spi.c b/nuttx/arch/arm/src/lpc31xx/lpc31_spi.c index 5667ba95d9..6f04af303d 100644 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_spi.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_spi.c @@ -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 + * Gregory Nutt * * 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), diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h b/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h index 819dae5aea..6d63fe65da 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_spi.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h b/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h index 3a031a13c2..c14c7267cf 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_syscreg.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h b/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h index 88deb1756f..b3d580ab67 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_timer.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c b/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c index 1a484477e7..ab9912c191 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h b/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h index f80fe4d92d..d612e0308e 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_uart.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c b/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c index 5584937cc2..0e8fcf17c5 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_usbdev.c * * Authors: David Hewson - * Gregory Nutt + * Gregory Nutt * * 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); diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h b/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h index 5576952800..b98706dfba 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_usbotg.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h b/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h index ac063472d4..2840b67e44 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc31xx/lpc31_wdt.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index a50104ba4b..5c4e3fda22 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3131/nsh/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. +# Copyright (C) 2010,2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=y # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=n -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=y +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=n +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=y # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=n -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=n +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -269,11 +270,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -388,12 +389,7 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # Stack and heap information # CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 2e76bebbd0..4e9a70743b 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3131/ostest/defconfig # -# Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. +# Copyright (C) 2009-2010,2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=y # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=n -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=y +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=n +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=y # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=n -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=n +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -269,11 +270,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -387,13 +388,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # # Stack and heap information # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER +CONFIG_BOOT_RUNFROMISRAM=y CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index a28f1f8273..14c967c78f 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3131/pgnsh/defconfig # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=n # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=n -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=y +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=n +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=y # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=y -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=y +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -312,11 +313,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -430,13 +431,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # # Stack and heap information # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER +CONFIG_BOOT_RUNFROMISRAM=y CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index abd2855dfd..b03e6cd3d2 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3131/usbserial/defconfig # -# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=y # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=y -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=n +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=y +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=n # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=n -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=n +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -272,11 +273,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -402,13 +403,8 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER +CONFIG_BOOT_RUNFROMISRAM=y CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index 1d4c5dfd49..b55eee1c9f 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3131/usbstorage/defconfig # -# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3131=y CONFIG_ARCH_BOARD="ea3131" CONFIG_ARCH_BOARD_EA3131=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=y # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=y -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=n +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=y +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=n # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=n -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=n +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -273,11 +274,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -403,13 +404,8 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER +CONFIG_BOOT_RUNFROMISRAM=y CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index ebb9e637bd..be916b7dc7 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3152/ostest/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,6 +39,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM926EJS=y CONFIG_ARCH_CHIP="lpc31xx" +CONFIG_ARCH_CHIP_LPC31XX=y CONFIG_ARCH_CHIP_LPC3152=y CONFIG_ARCH_BOARD="ea3152" CONFIG_ARCH_BOARD_EA3152=y @@ -63,32 +64,32 @@ CONFIG_ARCH_ROMPGTABLE=y # Identify toolchain and linker options # -CONFIG_LPC31XX_CODESOURCERYW=n -CONFIG_LPC31XX_CODESOURCERYL=n -CONFIG_LPC31XX_DEVKITARM=n -CONFIG_LPC31XX_BUILDROOT=y +CONFIG_LPC31_CODESOURCERYW=n +CONFIG_LPC31_CODESOURCERYL=n +CONFIG_LPC31_DEVKITARM=n +CONFIG_LPC31_BUILDROOT=y # # Individual subsystems can be enabled: # -CONFIG_LPC31XX_MCI=n -CONFIG_LPC31XX_SPI=n -CONFIG_LPC31XX_UART=y +CONFIG_LPC31_MCI=n +CONFIG_LPC31_SPI=n +CONFIG_LPC31_UART=y # # Exernal memory available on the board (see also CONFIG_MM_REGIONS) # -CONFIG_LPC31XX_EXTSRAM0=n -CONFIG_LPC31XX_EXTSRAM0HEAP=n -CONFIG_LPC31XX_EXTSRAM0SIZE=131072 -CONFIG_LPC31XX_EXTSRAM1=n -CONFIG_LPC31XX_EXTSRAM1HEAP=n -CONFIG_LPC31XX_EXTSRAM1SIZE=131072 -CONFIG_LPC31XX_EXTSDRAM=n -CONFIG_LPC31XX_EXTSDRAMHEAP=n -CONFIG_LPC31XX_EXTSDRAMSIZE=67108864 -CONFIG_LPC31XX_EXTNAND=n -CONFIG_LPC31XX_EXTNANDSIZE=67108864 +CONFIG_LPC31_EXTSRAM0=n +CONFIG_LPC31_EXTSRAM0HEAP=n +CONFIG_LPC31_EXTSRAM0SIZE=131072 +CONFIG_LPC31_EXTSRAM1=n +CONFIG_LPC31_EXTSRAM1HEAP=n +CONFIG_LPC31_EXTSRAM1SIZE=131072 +CONFIG_LPC31_EXTSDRAM=n +CONFIG_LPC31_EXTSDRAMHEAP=n +CONFIG_LPC31_EXTSDRAMSIZE=67108864 +CONFIG_LPC31_EXTNAND=n +CONFIG_LPC31_EXTNANDSIZE=67108864 # # LPC31XX specific device driver settings @@ -270,11 +271,11 @@ CONFIG_USBDEV_TRACE_NRECORDS=128 # # LPC31XX USB Configuration # -CONFIG_LPC31XX_GIO_USBATTACH=6 -CONFIG_LPC31XX_GIO_USBDPPULLUP=17 -CONFIG_LPC31XX_VENDORID=0xd320 -CONFIG_LPC31XX_PRODUCTID=0x3211 -CONFIG_LPC31XX_USBDEV_DMA=n +CONFIG_LPC31_GIO_USBATTACH=6 +CONFIG_LPC31_GIO_USBDPPULLUP=17 +CONFIG_LPC31_VENDORID=0xd320 +CONFIG_LPC31_PRODUCTID=0x3211 +CONFIG_LPC31_USBDEV_DMA=n # # USB Serial Device Configuration @@ -388,13 +389,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # # Stack and heap information # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER +CONFIG_BOOT_RUNFROMISRAM=y CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_HEAP_BASE= -CONFIG_HEAP_SIZE= diff --git a/nuttx/drivers/usbdev/Kconfig b/nuttx/drivers/usbdev/Kconfig index 24b13f378b..a742994145 100644 --- a/nuttx/drivers/usbdev/Kconfig +++ b/nuttx/drivers/usbdev/Kconfig @@ -2,12 +2,15 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + menuconfig USBDEV_COMPOSITE bool "USB composite device support" default n ---help--- Enables USB composite device support + if USBDEV_COMPOSITE + #config COMPOSITE_IAD # bool "" # default n @@ -89,7 +92,9 @@ config USBDEV_BUSPOWERED ---help--- Will cause USB features to indicate that the device is self-powered + endchoice + config USBDEV_MAXPOWER int "Maximum power consumption in mA" default 100 @@ -115,6 +120,7 @@ menuconfig PL2303 default n ---help--- This logic emulates the Prolific PL2303 serial/USB converter + if PL2303 config PL2303_EPINTIN int "Logical endpoint numbers" @@ -178,6 +184,7 @@ menuconfig CDCACM default n ---help--- Enables USB Modem (CDC ACM) support + if CDCACM config CDCACM_COMPOSITE bool "CDCACM composite support" diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 02c3ed48ab..6c8737d625 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -381,20 +381,6 @@ config PREALLOC_TIMERS comment "Stack and heap information" -config BOOT_RUNFROMFLASH - bool "boot run from flash" - default n - ---help--- - Some configurations support XIP operation from FLASH but must copy - initialized .data sections to RAM - -config BOOT_COPYTORAM - bool "boot copy to ram" - default n - ---help--- - Some configurations boot in FLASH - but copy themselves entirely into RAM for better performance. - config CUSTOM_STACK bool "Enable custom stack" default n From e74b6c382cd285dbb749c688ec4082570c3b00d3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Sep 2012 22:25:51 +0000 Subject: [PATCH 26/95] Repairs needed after Kconfig changes for LPC31 git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5105 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/lpc31xx/Kconfig | 22 +++- nuttx/configs/ea3131/README.txt | 36 +++--- nuttx/configs/ea3131/locked/mklocked.sh | 6 +- nuttx/configs/ea3131/nsh/Make.defs | 14 +-- nuttx/configs/ea3131/nsh/ld.script | 107 ------------------ nuttx/configs/ea3131/nsh/setenv.sh | 31 ++++- nuttx/configs/ea3131/ostest/Make.defs | 18 +-- nuttx/configs/ea3131/ostest/ld.script | 107 ------------------ nuttx/configs/ea3131/ostest/setenv.sh | 31 ++++- nuttx/configs/ea3131/pgnsh/Make.defs | 18 +-- nuttx/configs/ea3131/pgnsh/setenv.sh | 31 ++++- .../ea3131/{usbserial => scripts}/ld.script | 6 +- .../{pgnsh/ld.script => scripts/pg-ld.script} | 6 +- nuttx/configs/ea3131/src/Makefile | 6 +- nuttx/configs/ea3131/src/ea3131_internal.h | 6 +- nuttx/configs/ea3131/src/up_boot.c | 10 +- nuttx/configs/ea3131/src/up_fillpage.c | 8 +- nuttx/configs/ea3131/src/up_mem.c | 12 +- nuttx/configs/ea3131/src/up_nsh.c | 8 +- nuttx/configs/ea3131/src/up_spi.c | 8 +- nuttx/configs/ea3131/usbserial/Make.defs | 18 +-- nuttx/configs/ea3131/usbserial/setenv.sh | 31 ++++- nuttx/configs/ea3131/usbstorage/Make.defs | 18 +-- nuttx/configs/ea3131/usbstorage/ld.script | 107 ------------------ nuttx/configs/ea3131/usbstorage/setenv.sh | 31 ++++- nuttx/configs/ea3152/README.txt | 34 +++--- nuttx/configs/ea3152/ostest/Make.defs | 16 +-- nuttx/configs/ea3152/ostest/setenv.sh | 31 ++++- .../ea3152/{ostest => scripts}/ld.script | 4 +- nuttx/configs/ea3152/src/Makefile | 4 +- nuttx/configs/ea3152/src/ea3152_internal.h | 2 +- nuttx/configs/ea3152/src/up_boot.c | 6 +- nuttx/configs/ea3152/src/up_fillpage.c | 4 +- nuttx/configs/ea3152/src/up_mem.c | 8 +- nuttx/configs/ea3152/src/up_nsh.c | 4 +- nuttx/configs/ea3152/src/up_spi.c | 4 +- nuttx/configs/stm3240g-eval/nxwm/setenv.sh | 8 -- 37 files changed, 312 insertions(+), 509 deletions(-) delete mode 100644 nuttx/configs/ea3131/nsh/ld.script delete mode 100644 nuttx/configs/ea3131/ostest/ld.script rename nuttx/configs/ea3131/{usbserial => scripts}/ld.script (95%) rename nuttx/configs/ea3131/{pgnsh/ld.script => scripts/pg-ld.script} (97%) delete mode 100644 nuttx/configs/ea3131/usbstorage/ld.script rename nuttx/configs/ea3152/{ostest => scripts}/ld.script (97%) diff --git a/nuttx/arch/arm/src/lpc31xx/Kconfig b/nuttx/arch/arm/src/lpc31xx/Kconfig index 51c0879987..53691f4947 100644 --- a/nuttx/arch/arm/src/lpc31xx/Kconfig +++ b/nuttx/arch/arm/src/lpc31xx/Kconfig @@ -68,6 +68,12 @@ config LPC31_EXTSDRAMSIZE ---help--- Size of the external SDRAM. +config LPC31_SDRAMHCLK + int "External SDRAM HCLK" + depends on LPC31_EXTSDRAM + ---help--- + The SDRAM HCLK may be specified here (if not, it will be calculated). + config LPC31_EXTSRAM0 bool "Map external SRAM0" default n @@ -115,6 +121,18 @@ config LPC31_UART default n select ARCH_HAS_UART +config LPC31_SPI + bool "SPI" + default n + +config LPC31_USB + bool "USB" + default n + +config LPC31_MCI + bool "MCI" + default n + endmenu menu "LPC31xx UART Configuration" @@ -174,8 +192,8 @@ endmenu menu "SPI device driver options" config LPC31_SPI_REGDEBUG - bool "Register level debug" - depends on DEBUG + bool "SPI Register level debug" + depends on LPC31_SPI && DEBUG default n ---help--- Output detailed register-level SPI device debug information. Requires also DEBUG. diff --git a/nuttx/configs/ea3131/README.txt b/nuttx/configs/ea3131/README.txt index 19f848c810..f3239e4763 100644 --- a/nuttx/configs/ea3131/README.txt +++ b/nuttx/configs/ea3131/README.txt @@ -43,12 +43,12 @@ GNU Toolchain Options add one of the following configuration options to your .config (or defconfig) file: - CONFIG_LPC31XX_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_LPC31XX_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_LPC31XX_DEVKITARM=y : devkitARM under Windows - CONFIG_LPC31XX_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_LPC31_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_LPC31_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_LPC31_DEVKITARM=y : devkitARM under Windows + CONFIG_LPC31_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) - If you are not using CONFIG_LPC31XX_BUILDROOT, then you may also have to modify + If you are not using CONFIG_LPC31_BUILDROOT, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are @@ -381,7 +381,7 @@ On-Demand Paging configs/ea3131/locked/Makefile to build the first pass object, locked.r. This first pass object contains all of the code that must be in the locked text region. The Makefile in arch/arm/src/Makefile then includes this 1st - pass in build, positioning it as controlled by configs/ea3131/pgnsh/ld.script. + pass in build, positioning it as controlled by configs/ea3131/scripts/pg-ld.script. Finishing the Example: ---------------------- @@ -549,27 +549,27 @@ ARM/EA3131-specific Configuration Options Individual subsystems can be enabled: - CONFIG_LPC31XX_MCI, CONFIG_LPC31XX_SPI, CONFIG_LPC31XX_UART + CONFIG_LPC31_MCI, CONFIG_LPC31_SPI, CONFIG_LPC31_UART External memory available on the board (see also CONFIG_MM_REGIONS) - CONFIG_LPC31XX_EXTSRAM0 - Select if external SRAM0 is present - CONFIG_LPC31XX_EXTSRAM0HEAP - Select if external SRAM0 should be + CONFIG_LPC31_EXTSRAM0 - Select if external SRAM0 is present + CONFIG_LPC31_EXTSRAM0HEAP - Select if external SRAM0 should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSRAM0SIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSRAM0SIZE - Size (in bytes) of the installed external SRAM0 memory - CONFIG_LPC31XX_EXTSRAM1 - Select if external SRAM1 is present - CONFIG_LPC31XX_EXTSRAM1HEAP - Select if external SRAM1 should be + CONFIG_LPC31_EXTSRAM1 - Select if external SRAM1 is present + CONFIG_LPC31_EXTSRAM1HEAP - Select if external SRAM1 should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSRAM1SIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSRAM1SIZE - Size (in bytes) of the installed external SRAM1 memory - CONFIG_LPC31XX_EXTSDRAM - Select if external SDRAM is present - CONFIG_LPC31XX_EXTSDRAMHEAP - Select if external SDRAM should be + CONFIG_LPC31_EXTSDRAM - Select if external SDRAM is present + CONFIG_LPC31_EXTSDRAMHEAP - Select if external SDRAM should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSDRAMSIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSDRAMSIZE - Size (in bytes) of the installed external SDRAM memory - CONFIG_LPC31XX_EXTNAND - Select if external NAND is present - CONFIG_LPC31XX_EXTSDRAMSIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTNAND - Select if external NAND is present + CONFIG_LPC31_EXTSDRAMSIZE - Size (in bytes) of the installed external NAND memory LPC313X specific device driver settings diff --git a/nuttx/configs/ea3131/locked/mklocked.sh b/nuttx/configs/ea3131/locked/mklocked.sh index ac99f4438b..731accde3d 100755 --- a/nuttx/configs/ea3131/locked/mklocked.sh +++ b/nuttx/configs/ea3131/locked/mklocked.sh @@ -2,8 +2,8 @@ ########################################################################### # configs/ea3131/locked/mklocked.sh # -# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -117,7 +117,7 @@ echo "EXTERN(up_vectoraddrexcptn)" >>ld-locked.inc echo "EXTERN(up_timerinit)" >>ld-locked.inc -answer=$(checkconfig CONFIG_LPC31XX_UART) +answer=$(checkconfig CONFIG_LPC31_UART) if [ $answer = y ]; then echo "EXTERN(up_earlyserialinit)" >>ld-locked.inc fi diff --git a/nuttx/configs/ea3131/nsh/Make.defs b/nuttx/configs/ea3131/nsh/Make.defs index e17d3c674d..bff75e8e01 100644 --- a/nuttx/configs/ea3131/nsh/Make.defs +++ b/nuttx/configs/ea3131/nsh/Make.defs @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3131/nsh/ld.script b/nuttx/configs/ea3131/nsh/ld.script deleted file mode 100644 index 8c3b2db45f..0000000000 --- a/nuttx/configs/ea3131/nsh/ld.script +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - * configs/ea3131/nsh/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC3131 has 192Kb of ISRAM beginning at virtual address 0x1102:8000. - * LPC31xx boot ROM expects the boot image be compiled with entry point at - * 0x1102:9000. A 128b header will appear at this address (applied by - * lpc313xImgCreator) and the executable code must begin at 0x1102:9080. - */ - -MEMORY -{ - isram (rwx) : ORIGIN = 0x11029080, LENGTH = 192K - 4224 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > isram - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > isram - - .ARM.extab : { - *(.ARM.extab*) - } >isram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } > isram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > isram - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/nuttx/configs/ea3131/nsh/setenv.sh b/nuttx/configs/ea3131/nsh/setenv.sh index 816dff18b5..671df47f19 100755 --- a/nuttx/configs/ea3131/nsh/setenv.sh +++ b/nuttx/configs/ea3131/nsh/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3131/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3131/ostest/Make.defs b/nuttx/configs/ea3131/ostest/Make.defs index cb0fcaff4b..0ed68f285f 100644 --- a/nuttx/configs/ea3131/ostest/Make.defs +++ b/nuttx/configs/ea3131/ostest/Make.defs @@ -1,8 +1,8 @@ ############################################################################ # configs/ea3131/ostest/Make.defs # -# Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2009,2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3131/ostest/ld.script b/nuttx/configs/ea3131/ostest/ld.script deleted file mode 100644 index 531e64ce92..0000000000 --- a/nuttx/configs/ea3131/ostest/ld.script +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - * configs/ea3131/ostest/ld.script - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC3131 has 192Kb of ISRAM beginning at virtual address 0x1102:8000. - * LPC31xx boot ROM expects the boot image be compiled with entry point at - * 0x1102:9000. A 128b header will appear at this address (applied by - * lpc313xImgCreator) and the executable code must begin at 0x1102:9080. - */ - -MEMORY -{ - isram (rwx) : ORIGIN = 0x11029080, LENGTH = 192K - 4224 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > isram - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > isram - - .ARM.extab : { - *(.ARM.extab*) - } >isram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } > isram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > isram - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/nuttx/configs/ea3131/ostest/setenv.sh b/nuttx/configs/ea3131/ostest/setenv.sh index 796add80e0..a8155ab79c 100755 --- a/nuttx/configs/ea3131/ostest/setenv.sh +++ b/nuttx/configs/ea3131/ostest/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3131/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3131/pgnsh/Make.defs b/nuttx/configs/ea3131/pgnsh/Make.defs index cf712d2964..d9a6794f5f 100644 --- a/nuttx/configs/ea3131/pgnsh/Make.defs +++ b/nuttx/configs/ea3131/pgnsh/Make.defs @@ -1,8 +1,8 @@ ############################################################################ # configs/ea3131/pgnsh/Make.defs # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010,2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/pgnsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/pg-ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/pgnsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/pg-ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3131/pgnsh/setenv.sh b/nuttx/configs/ea3131/pgnsh/setenv.sh index 97775e8612..82205c4523 100755 --- a/nuttx/configs/ea3131/pgnsh/setenv.sh +++ b/nuttx/configs/ea3131/pgnsh/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3131/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3131/usbserial/ld.script b/nuttx/configs/ea3131/scripts/ld.script similarity index 95% rename from nuttx/configs/ea3131/usbserial/ld.script rename to nuttx/configs/ea3131/scripts/ld.script index 380051e289..333117c198 100644 --- a/nuttx/configs/ea3131/usbserial/ld.script +++ b/nuttx/configs/ea3131/scripts/ld.script @@ -1,8 +1,8 @@ /**************************************************************************** - * configs/ea3131/usbserial/ld.script + * configs/ea3131/scripts/ld.script * - * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/pgnsh/ld.script b/nuttx/configs/ea3131/scripts/pg-ld.script similarity index 97% rename from nuttx/configs/ea3131/pgnsh/ld.script rename to nuttx/configs/ea3131/scripts/pg-ld.script index c4c5975673..90a713c7de 100644 --- a/nuttx/configs/ea3131/pgnsh/ld.script +++ b/nuttx/configs/ea3131/scripts/pg-ld.script @@ -1,8 +1,8 @@ /**************************************************************************** - * configs/ea3131/pgnsh/ld.script + * configs/ea3131/scripts/pg-ld.script * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/src/Makefile b/nuttx/configs/ea3131/src/Makefile index 685bfd9972..c3774db711 100644 --- a/nuttx/configs/ea3131/src/Makefile +++ b/nuttx/configs/ea3131/src/Makefile @@ -2,7 +2,7 @@ # configs/ea3131/src/Makefile # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -44,13 +44,13 @@ CSRCS = up_boot.c up_clkinit.c ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += up_buttons.c endif -ifeq ($(CONFIG_LPC31XX_EXTSDRAM),y) +ifeq ($(CONFIG_LPC31_EXTSDRAM),y) CSRCS += up_mem.c endif ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += up_leds.c endif -ifeq ($(CONFIG_LPC31XX_SPI),y) +ifeq ($(CONFIG_LPC31_SPI),y) CSRCS += up_spi.c endif ifeq ($(CONFIG_NSH_ARCHINIT),y) diff --git a/nuttx/configs/ea3131/src/ea3131_internal.h b/nuttx/configs/ea3131/src/ea3131_internal.h index ca2a5b5702..4a8ae3fa4e 100644 --- a/nuttx/configs/ea3131/src/ea3131_internal.h +++ b/nuttx/configs/ea3131/src/ea3131_internal.h @@ -2,8 +2,8 @@ * configs/ea3131/src/ea3131_internal.h * arch/arm/src/board/ea3131_internal.n * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2009-2010,2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -86,7 +86,7 @@ * ************************************************************************************/ -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM extern void lpc31_meminitialize(void); #endif diff --git a/nuttx/configs/ea3131/src/up_boot.c b/nuttx/configs/ea3131/src/up_boot.c index 94c4d8a9c0..1fd9069f84 100644 --- a/nuttx/configs/ea3131/src/up_boot.c +++ b/nuttx/configs/ea3131/src/up_boot.c @@ -2,8 +2,8 @@ * configs/ea3131/src/up_boot.c * arch/arm/src/board/up_boot.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2009,2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,7 +75,7 @@ void lpc31_boardinitialize(void) { /* Initialize configured, external memory resources */ -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM lpc31_meminitialize(); #endif @@ -83,7 +83,7 @@ void lpc31_boardinitialize(void) * lpc31_spiinitialize() has been brought into the link. */ -#if defined(CONFIG_LPC31XX_SPI) +#if defined(CONFIG_LPC31_SPI) if (lpc31_spiinitialize) { lpc31_spiinitialize(); @@ -95,7 +95,7 @@ void lpc31_boardinitialize(void) * into the build. */ -#if defined(CONFIG_USBDEV) && defined(CONFIG_LPC31XX_USB) +#if defined(CONFIG_USBDEV) && defined(CONFIG_LPC31_USB) if (lpc31_usbinitialize) { lpc31_usbinitialize(); diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c index 356ea599a9..9fdd808641 100644 --- a/nuttx/configs/ea3131/src/up_fillpage.c +++ b/nuttx/configs/ea3131/src/up_fillpage.c @@ -2,8 +2,8 @@ * configs/ea3131/src/up_fillpage.c * arch/arm/src/board/up_fillpage.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2010,2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -122,7 +122,7 @@ * is not enabled. */ -# if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31XX_MCI) +# if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) # ifdef CONFIG_PAGING_SDSLOT # error "Mountpoints and/or MCI disabled" # endif @@ -152,7 +152,7 @@ /* Verify that SPI support is enabld */ -#ifndef CONFIG_LPC31XX_SPI +#ifndef CONFIG_LPC31_SPI # error "SPI support is not enabled" #endif diff --git a/nuttx/configs/ea3131/src/up_mem.c b/nuttx/configs/ea3131/src/up_mem.c index 1559468acb..060f58eecd 100644 --- a/nuttx/configs/ea3131/src/up_mem.c +++ b/nuttx/configs/ea3131/src/up_mem.c @@ -2,8 +2,8 @@ * configs/ea3131/src/up_mem.c * arch/arm/src/board/up_mem.c * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2009-2010,2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * References: * - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 @@ -59,7 +59,7 @@ #include "lpc31_mpmc.h" #include "ea3131_internal.h" -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM /**************************************************************************** * Pre-processor Definitions @@ -164,8 +164,8 @@ static void lpc31_sdraminitialize(void) * replaced with an apriori value. */ -#ifdef CONFIG_LPC31XX_SDRAMHCLK -# define HCLK CONFIG_LPC31XX_SDRAMHCLK +#ifdef CONFIG_LPC31_SDRAMHCLK +# define HCLK CONFIG_LPC31_SDRAMHCLK #else uint32_t hclk = lpc31_clkfreq(CLKID_MPMCCFGCLK2, DOMAINID_SYS); # define HCLK hclk @@ -356,4 +356,4 @@ void lpc31_meminitialize(void) lpc31_sdraminitialize(); } -#endif /* CONFIG_LPC31XX_EXTSDRAM */ +#endif /* CONFIG_LPC31_EXTSDRAM */ diff --git a/nuttx/configs/ea3131/src/up_nsh.c b/nuttx/configs/ea3131/src/up_nsh.c index c8dbf017bb..01b16194bf 100644 --- a/nuttx/configs/ea3131/src/up_nsh.c +++ b/nuttx/configs/ea3131/src/up_nsh.c @@ -2,8 +2,8 @@ * config/ea3131/src/up_nsh.c * arch/arm/src/board/up_nsh.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,7 +45,7 @@ #include #include -#ifdef CONFIG_LPC31XX_MCI +#ifdef CONFIG_LPC31_MCI # include # include #endif @@ -88,7 +88,7 @@ * is not enabled. */ -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31XX_MCI) +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) # undef CONFIG_NSH_HAVEMMCSD #endif diff --git a/nuttx/configs/ea3131/src/up_spi.c b/nuttx/configs/ea3131/src/up_spi.c index 7755e55b47..18000d6b4e 100644 --- a/nuttx/configs/ea3131/src/up_spi.c +++ b/nuttx/configs/ea3131/src/up_spi.c @@ -2,8 +2,8 @@ * configs/ea3131/src/up_spi.c * arch/arm/src/board/up_spi.c * - * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -52,7 +52,7 @@ #include "lpc31_internal.h" #include "ea3131_internal.h" -#ifdef CONFIG_LPC31XX_SPI +#ifdef CONFIG_LPC31_SPI #if 0 /* At present, EA3131 specific logic is hard-coded in the file lpc31_spi.c * in arch/arm/src/lpc31xx */ @@ -138,5 +138,5 @@ uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) } #endif /* 0 */ -#endif /* CONFIG_LPC31XX_SPI */ +#endif /* CONFIG_LPC31_SPI */ diff --git a/nuttx/configs/ea3131/usbserial/Make.defs b/nuttx/configs/ea3131/usbserial/Make.defs index 17c111af29..92a53d1da6 100644 --- a/nuttx/configs/ea3131/usbserial/Make.defs +++ b/nuttx/configs/ea3131/usbserial/Make.defs @@ -1,8 +1,8 @@ ############################################################################ # configs/ea3131/usbserial/Make.defs # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010,2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3131/usbserial/setenv.sh b/nuttx/configs/ea3131/usbserial/setenv.sh index 3adbc484c7..d48e40756d 100755 --- a/nuttx/configs/ea3131/usbserial/setenv.sh +++ b/nuttx/configs/ea3131/usbserial/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3131/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3131/usbstorage/Make.defs b/nuttx/configs/ea3131/usbstorage/Make.defs index 017c9b97fb..e4400e3fc4 100644 --- a/nuttx/configs/ea3131/usbstorage/Make.defs +++ b/nuttx/configs/ea3131/usbstorage/Make.defs @@ -1,8 +1,8 @@ ############################################################################ # configs/ea3131/usbstorage/Make.defs # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2010,2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3131/usbstorage/ld.script b/nuttx/configs/ea3131/usbstorage/ld.script deleted file mode 100644 index 9828e5c97b..0000000000 --- a/nuttx/configs/ea3131/usbstorage/ld.script +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - * configs/ea3131/usbstorage/ld.script - * - * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC3131 has 192Kb of ISRAM beginning at virtual address 0x1102:8000. - * LPC31xx boot ROM expects the boot image be compiled with entry point at - * 0x1102:9000. A 128b header will appear at this address (applied by - * lpc313xImgCreator) and the executable code must begin at 0x1102:9080. - */ - -MEMORY -{ - isram (rwx) : ORIGIN = 0x11029080, LENGTH = 192K - 4224 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > isram - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > isram - - .ARM.extab : { - *(.ARM.extab*) - } >isram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > isram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > isram - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/nuttx/configs/ea3131/usbstorage/setenv.sh b/nuttx/configs/ea3131/usbstorage/setenv.sh index ae08707d70..2a20e7ba9c 100755 --- a/nuttx/configs/ea3131/usbstorage/setenv.sh +++ b/nuttx/configs/ea3131/usbstorage/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3131/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3152/README.txt b/nuttx/configs/ea3152/README.txt index f0450751e3..44f65981ec 100644 --- a/nuttx/configs/ea3152/README.txt +++ b/nuttx/configs/ea3152/README.txt @@ -42,12 +42,12 @@ GNU Toolchain Options add one of the following configuration options to your .config (or defconfig) file: - CONFIG_LPC31XX_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_LPC31XX_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_LPC31XX_DEVKITARM=y : devkitARM under Windows - CONFIG_LPC31XX_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_LPC31_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_LPC31_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_LPC31_DEVKITARM=y : devkitARM under Windows + CONFIG_LPC31_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) - If you are not using CONFIG_LPC31XX_BUILDROOT, then you may also have to modify + If you are not using CONFIG_LPC31_BUILDROOT, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are @@ -355,27 +355,27 @@ ARM/EA3152-specific Configuration Options Individual subsystems can be enabled: - CONFIG_LPC31XX_MCI, CONFIG_LPC31XX_SPI, CONFIG_LPC31XX_UART + CONFIG_LPC31_MCI, CONFIG_LPC31_SPI, CONFIG_LPC31_UART External memory available on the board (see also CONFIG_MM_REGIONS) - CONFIG_LPC31XX_EXTSRAM0 - Select if external SRAM0 is present - CONFIG_LPC31XX_EXTSRAM0HEAP - Select if external SRAM0 should be + CONFIG_LPC31_EXTSRAM0 - Select if external SRAM0 is present + CONFIG_LPC31_EXTSRAM0HEAP - Select if external SRAM0 should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSRAM0SIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSRAM0SIZE - Size (in bytes) of the installed external SRAM0 memory - CONFIG_LPC31XX_EXTSRAM1 - Select if external SRAM1 is present - CONFIG_LPC31XX_EXTSRAM1HEAP - Select if external SRAM1 should be + CONFIG_LPC31_EXTSRAM1 - Select if external SRAM1 is present + CONFIG_LPC31_EXTSRAM1HEAP - Select if external SRAM1 should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSRAM1SIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSRAM1SIZE - Size (in bytes) of the installed external SRAM1 memory - CONFIG_LPC31XX_EXTSDRAM - Select if external SDRAM is present - CONFIG_LPC31XX_EXTSDRAMHEAP - Select if external SDRAM should be + CONFIG_LPC31_EXTSDRAM - Select if external SDRAM is present + CONFIG_LPC31_EXTSDRAMHEAP - Select if external SDRAM should be configured as part of the NuttX heap. - CONFIG_LPC31XX_EXTSDRAMSIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTSDRAMSIZE - Size (in bytes) of the installed external SDRAM memory - CONFIG_LPC31XX_EXTNAND - Select if external NAND is present - CONFIG_LPC31XX_EXTSDRAMSIZE - Size (in bytes) of the installed + CONFIG_LPC31_EXTNAND - Select if external NAND is present + CONFIG_LPC31_EXTSDRAMSIZE - Size (in bytes) of the installed external NAND memory LPC313X specific device driver settings diff --git a/nuttx/configs/ea3152/ostest/Make.defs b/nuttx/configs/ea3152/ostest/Make.defs index 62d7bae6f8..19e213b0ab 100644 --- a/nuttx/configs/ea3152/ostest/Make.defs +++ b/nuttx/configs/ea3152/ostest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ea3152/ostest/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -38,23 +38,23 @@ include ${TOPDIR}/tools/Config.mk # Setup for the selected toolchain -ifeq ($(CONFIG_LPC31XX_CODESOURCERYW),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_CODESOURCERYL),y) +ifeq ($(CONFIG_LPC31_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- MAXOPTIMIZATION = -O2 endif -ifeq ($(CONFIG_LPC31XX_DEVKITARM),y) +ifeq ($(CONFIG_LPC31_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y endif -ifeq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifeq ($(CONFIG_LPC31_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- MAXOPTIMIZATION = -Os @@ -67,13 +67,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc @@ -122,7 +122,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CONFIG_LPC31XX_BUILDROOT),y) +ifneq ($(CONFIG_LPC31_BUILDROOT),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) diff --git a/nuttx/configs/ea3152/ostest/setenv.sh b/nuttx/configs/ea3152/ostest/setenv.sh index 890585f871..418f4701e3 100755 --- a/nuttx/configs/ea3152/ostest/setenv.sh +++ b/nuttx/configs/ea3152/ostest/setenv.sh @@ -32,16 +32,35 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export LPCTOOL_DIR="${WD}/configs/ea3152/tools" -export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools subdirectory + +export LPCTOOL_DIR="${WD}/configs/ea3152/tools" + +# Add the path to the toolchain to the PATH varialble + +export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/ea3152/ostest/ld.script b/nuttx/configs/ea3152/scripts/ld.script similarity index 97% rename from nuttx/configs/ea3152/ostest/ld.script rename to nuttx/configs/ea3152/scripts/ld.script index c52988ebc1..cf5b5d5196 100644 --- a/nuttx/configs/ea3152/ostest/ld.script +++ b/nuttx/configs/ea3152/scripts/ld.script @@ -1,7 +1,7 @@ /**************************************************************************** - * configs/ea3152/ostest/ld.script + * configs/ea3152/scripts/ld.script * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/ea3152/src/Makefile b/nuttx/configs/ea3152/src/Makefile index 6393f30916..91a7fe3792 100644 --- a/nuttx/configs/ea3152/src/Makefile +++ b/nuttx/configs/ea3152/src/Makefile @@ -44,13 +44,13 @@ CSRCS = up_boot.c up_clkinit.c ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += up_buttons.c endif -ifeq ($(CONFIG_LPC31XX_EXTSDRAM),y) +ifeq ($(CONFIG_LPC31_EXTSDRAM),y) CSRCS += up_mem.c endif ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += up_leds.c endif -ifeq ($(CONFIG_LPC31XX_SPI),y) +ifeq ($(CONFIG_LPC31_SPI),y) CSRCS += up_spi.c endif ifeq ($(CONFIG_NSH_ARCHINIT),y) diff --git a/nuttx/configs/ea3152/src/ea3152_internal.h b/nuttx/configs/ea3152/src/ea3152_internal.h index 94a6e5a236..ee93c36a1f 100644 --- a/nuttx/configs/ea3152/src/ea3152_internal.h +++ b/nuttx/configs/ea3152/src/ea3152_internal.h @@ -86,7 +86,7 @@ * ************************************************************************************/ -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM extern void lpc31_meminitialize(void); #endif diff --git a/nuttx/configs/ea3152/src/up_boot.c b/nuttx/configs/ea3152/src/up_boot.c index e85cb51252..c8870cfdf7 100644 --- a/nuttx/configs/ea3152/src/up_boot.c +++ b/nuttx/configs/ea3152/src/up_boot.c @@ -75,7 +75,7 @@ void lpc31_boardinitialize(void) { /* Initialize configured, external memory resources */ -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM lpc31_meminitialize(); #endif @@ -83,7 +83,7 @@ void lpc31_boardinitialize(void) * lpc31_spiinitialize() has been brought into the link. */ -#if defined(CONFIG_LPC31XX_SPI) +#if defined(CONFIG_LPC31_SPI) if (lpc31_spiinitialize) { lpc31_spiinitialize(); @@ -95,7 +95,7 @@ void lpc31_boardinitialize(void) * into the build. */ -#if defined(CONFIG_USBDEV) && defined(CONFIG_LPC31XX_USB) +#if defined(CONFIG_USBDEV) && defined(CONFIG_LPC31_USB) if (lpc31_usbinitialize) { lpc31_usbinitialize(); diff --git a/nuttx/configs/ea3152/src/up_fillpage.c b/nuttx/configs/ea3152/src/up_fillpage.c index 019dd940c6..880f700362 100644 --- a/nuttx/configs/ea3152/src/up_fillpage.c +++ b/nuttx/configs/ea3152/src/up_fillpage.c @@ -122,7 +122,7 @@ * is not enabled. */ -# if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31XX_MCI) +# if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) # ifdef CONFIG_PAGING_SDSLOT # error "Mountpoints and/or MCI disabled" # endif @@ -152,7 +152,7 @@ /* Verify that SPI support is enabld */ -#ifndef CONFIG_LPC31XX_SPI +#ifndef CONFIG_LPC31_SPI # error "SPI support is not enabled" #endif diff --git a/nuttx/configs/ea3152/src/up_mem.c b/nuttx/configs/ea3152/src/up_mem.c index 5eae04e0f2..4f6c71e87e 100644 --- a/nuttx/configs/ea3152/src/up_mem.c +++ b/nuttx/configs/ea3152/src/up_mem.c @@ -59,7 +59,7 @@ #include "lpc31_mpmc.h" #include "ea3152_internal.h" -#ifdef CONFIG_LPC31XX_EXTSDRAM +#ifdef CONFIG_LPC31_EXTSDRAM /**************************************************************************** * Pre-processor Definitions @@ -164,8 +164,8 @@ static void lpc31_sdraminitialize(void) * replaced with an apriori value. */ -#ifdef CONFIG_LPC31XX_SDRAMHCLK -# define HCLK CONFIG_LPC31XX_SDRAMHCLK +#ifdef CONFIG_LPC31_SDRAMHCLK +# define HCLK CONFIG_LPC31_SDRAMHCLK #else uint32_t hclk = lpc31_clkfreq(CLKID_MPMCCFGCLK2, DOMAINID_SYS); # define HCLK hclk @@ -356,4 +356,4 @@ void lpc31_meminitialize(void) lpc31_sdraminitialize(); } -#endif /* CONFIG_LPC31XX_EXTSDRAM */ +#endif /* CONFIG_LPC31_EXTSDRAM */ diff --git a/nuttx/configs/ea3152/src/up_nsh.c b/nuttx/configs/ea3152/src/up_nsh.c index ab8f779f08..ddd0e91951 100644 --- a/nuttx/configs/ea3152/src/up_nsh.c +++ b/nuttx/configs/ea3152/src/up_nsh.c @@ -45,7 +45,7 @@ #include #include -#ifdef CONFIG_LPC31XX_MCI +#ifdef CONFIG_LPC31_MCI # include # include #endif @@ -88,7 +88,7 @@ * is not enabled. */ -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31XX_MCI) +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) # undef CONFIG_NSH_HAVEMMCSD #endif diff --git a/nuttx/configs/ea3152/src/up_spi.c b/nuttx/configs/ea3152/src/up_spi.c index 7f399d9dc9..2dd7b1e23d 100644 --- a/nuttx/configs/ea3152/src/up_spi.c +++ b/nuttx/configs/ea3152/src/up_spi.c @@ -52,7 +52,7 @@ #include "lpc31_internal.h" #include "ea3152_internal.h" -#ifdef CONFIG_LPC31XX_SPI +#ifdef CONFIG_LPC31_SPI #if 0 /* At present, EA3152 specific logic is hard-coded in the file lpc31_spi.c * in arch/arm/src/lpc31xx */ @@ -138,5 +138,5 @@ uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) } #endif /* 0 */ -#endif /* CONFIG_LPC31XX_SPI */ +#endif /* CONFIG_LPC31_SPI */ diff --git a/nuttx/configs/stm3240g-eval/nxwm/setenv.sh b/nuttx/configs/stm3240g-eval/nxwm/setenv.sh index da7f5719ff..a8ff5bb04e 100755 --- a/nuttx/configs/stm3240g-eval/nxwm/setenv.sh +++ b/nuttx/configs/stm3240g-eval/nxwm/setenv.sh @@ -57,14 +57,6 @@ fi # the CodeSourcery toolchain in any other location export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" -# These are the Cygwin paths to the locations where I installed the Atollic -# toolchain under windows. You will also have to edit this if you install -# the Atollic toolchain in any other location. /usr/bin is added before -# the Atollic bin path because there is are binaries named gcc.exe and g++.exe -# at those locations as well. -#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" -#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" - # This the Cygwin path to the location where I build the buildroot # toolchain. #export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" From b53b1fa813857a9c5053e2e54deb9170d3f5809a Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Sep 2012 13:35:58 +0000 Subject: [PATCH 27/95] If serial DMA enabled, re-initialize serial console git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5106 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/stm32/stm32_serial.c | 9 ++++++++- nuttx/arch/arm/src/stm32/stm32_uart.h | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index b90e4ee976..45d6858235 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -1835,7 +1835,14 @@ void up_serialinit(void) #if CONSOLE_UART > 0 (void)uart_register("/dev/console", &uart_devs[CONSOLE_UART - 1]->dev); (void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev); -#endif + + /* If we need to re-initialise the console to enable DMA do that here. */ + +# ifdef SERIAL_HAVE_CONSOLE_DMA + up_dma_setup(&uart_devs[CONSOLE_UART - 1]->dev); +# endif + +#endif /* CONSOLE_UART > 0 */ /* Register all remaining USARTs */ diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h index f51265b18f..7888d63163 100644 --- a/nuttx/arch/arm/src/stm32/stm32_uart.h +++ b/nuttx/arch/arm/src/stm32/stm32_uart.h @@ -189,6 +189,23 @@ # define SERIAL_HAVE_DMA 1 #endif +/* Is DMA used on the console UART? */ + +#undef SERIAL_HAVE_CONSOLE_DMA +#if defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_USART1_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_USART2_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_USART3_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && !efined(CONFIG_UART4_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_UART5_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#elif defined(CONFIG_USART6_SERIAL_CONSOLE) && !efined(CONFIG_USART6_RXDMA) +# define SERIAL_HAVE_CONSOLE_DMA 1 +#endif + /* Is DMA used on all (enabled) USARTs */ #define SERIAL_HAVE_ONLY_DMA 1 From 704679d7b1a8338d656f3ce6565390568ef876b4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Sep 2012 16:51:53 +0000 Subject: [PATCH 28/95] Removed delay after receiving in recvfrom(). This was killing network performance git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5107 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 8 ++- nuttx/Documentation/NuttxPortingGuide.html | 7 ++- nuttx/arch/arm/src/stm32/stm32_uart.h | 4 +- nuttx/configs/README.txt | 5 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3220g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 +- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3240g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh2/defconfig | 2 +- .../configs/stm3240g-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3240g-eval/telnetd/defconfig | 2 +- .../configs/stm3240g-eval/webserver/defconfig | 2 +- nuttx/configs/stm32f4discovery/nsh/defconfig | 2 +- .../stm32f4discovery/nxlines/defconfig | 2 +- .../configs/stm32f4discovery/ostest/defconfig | 2 +- nuttx/configs/stm32f4discovery/pm/defconfig | 2 +- nuttx/include/nuttx/net/uip/uipopt.h | 18 +++++- nuttx/net/Kconfig | 33 +++++++++- nuttx/net/recvfrom.c | 63 +++++++++++++------ 28 files changed, 131 insertions(+), 49 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 9e0ca4b68a..5f27953c96 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3274,4 +3274,10 @@ * Kconfig: Verify configuration settings for the LPC43xx. This includes some corrections to configuration variable names and defconfig settings. * Kconfig: Add and verify configuration settings for the LPC31xx. - + * arch/arm/src/stm32/stm32_uart.h and stm32_serial.c: Add logic to + re-initialize the console UART as needed to enable DMA on the + console UART (contributed by Mike Smith). + * net/recvfrom.c, net/Kconfig, include/nuttx/net/uipopt.h: Remove delay + after receiving data. That has historical reasons to be there (it + was needed before read-ahead buffering was added), but kills performance. + (Noted by Max Holtzberg). diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index a03d9810fc..b5473549ae 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -5037,7 +5037,12 @@ build CONFIG_NET_TCP_READAHEAD_BUFSIZE: Size of TCP read-ahead buffers
  • - CONFIG_NET_NTCP_READAHEAD_BUFFERS: Number of TCP read-ahead buffers (may be zero) + CONFIG_NET_NTCP_READAHEAD_BUFFERS: Number of TCP read-ahead buffers (may be zero to disable TCP/IP read-ahead buffering) +
  • +
  • + CONFIG_NET_TCP_RECVDELAY: Delay (in deciseconds) after a TCP/IP packet is received. + This delay may allow catching of additional packets when TCP/IP read-ahead is disabled. + Default: 0
  • CONFIG_NET_MAX_LISTENPORTS: Maximum number of listening TCP ports (all tasks). diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h index 7888d63163..a70923cbf9 100644 --- a/nuttx/arch/arm/src/stm32/stm32_uart.h +++ b/nuttx/arch/arm/src/stm32/stm32_uart.h @@ -198,11 +198,11 @@ # define SERIAL_HAVE_CONSOLE_DMA 1 #elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_USART3_RXDMA) # define SERIAL_HAVE_CONSOLE_DMA 1 -#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && !efined(CONFIG_UART4_RXDMA) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_UART4_RXDMA) # define SERIAL_HAVE_CONSOLE_DMA 1 #elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_UART5_RXDMA) # define SERIAL_HAVE_CONSOLE_DMA 1 -#elif defined(CONFIG_USART6_SERIAL_CONSOLE) && !efined(CONFIG_USART6_RXDMA) +#elif defined(CONFIG_USART6_SERIAL_CONSOLE) && defined(CONFIG_USART6_RXDMA) # define SERIAL_HAVE_CONSOLE_DMA 1 #endif diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 7ad2825d0c..6cd5eef3f9 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -990,7 +990,10 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks) CONFIG_NET_TCP_READAHEAD_BUFSIZE - Size of TCP read-ahead buffers CONFIG_NET_NTCP_READAHEAD_BUFFERS - Number of TCP read-ahead buffers - (may be zero) + (may be zero to disable TCP/IP read-ahead buffering) + CONFIG_NET_TCP_RECVDELAY - Delay (in deciseconds) after a TCP/IP packet + is received. This delay may allow catching of additional packets + when TCP/IP read-ahead is disabled. Default: 0 CONFIG_NET_TCPBACKLOG - Incoming connections pend in a backlog until accept() is called. The size of the backlog is selected when listen() is called. diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 18858d5df2..c7c71018aa 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -365,7 +365,7 @@ CONFIG_NET_MULTICAST=n # # STM32F107vc Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=n CONFIG_STM32_RMII=y CONFIG_STM32_RMII_MCO=y diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 848121e04c..433fe97d27 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 7e660ad027..ef5c2da964 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 48912bd8b9..591f246163 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index c2ede9c67f..03ee777f4f 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index 6e69333255..bd59f47de9 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index d0ace11bce..30ec69419d 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 2ff215afcf..550f654ba0 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F20xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index 382ce61553..4e22244bb5 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 9eb8f3d5ce..e21c1070bd 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 8b2617ec05..34f84db074 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index 00d9dac0a2..dfb837e8a5 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -204,7 +204,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 172d17b6ff..417201f3ea 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 07bc408dcc..88d3ecb8d3 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 1f23047306..2b95735bb4 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 44a0f27baa..9dc5bfc28f 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 7bd8e52ceb..8f3ea36dc7 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -203,7 +203,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 0a07e84895..12848ddee8 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 52705977ab..f99af0233d 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -197,7 +197,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 5c120c6144..8657d7edfd 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -192,7 +192,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 592ce5701c..4608c16c68 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -198,7 +198,7 @@ CONFIG_CAN2_BAUD=700000 # # STM32F40xxx Ethernet device driver settings # -CONFIG_STM32_PHYADDR=0x01 +CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=y CONFIG_STM32_MII_MCO1=y CONFIG_STM32_MII_MCO2=n diff --git a/nuttx/include/nuttx/net/uip/uipopt.h b/nuttx/include/nuttx/net/uip/uipopt.h index 4eff56fe85..9797e0482b 100644 --- a/nuttx/include/nuttx/net/uip/uipopt.h +++ b/nuttx/include/nuttx/net/uip/uipopt.h @@ -296,7 +296,23 @@ /* The size of the TCP read buffer size */ #ifndef CONFIG_NET_TCP_READAHEAD_BUFSIZE -# define CONFIG_NET_TCP_READAHEAD_BUFSIZE UIP_TCP_MSS +# if CONFIG_NET_NTCP_READAHEAD_BUFFERS < 1 +# define CONFIG_NET_TCP_READAHEAD_BUFSIZE 0 +# else +# define CONFIG_NET_TCP_READAHEAD_BUFSIZE UIP_TCP_MSS +# endif +#endif + +/* Delay after receive to catch a following packet. No delay should be + * required if TCP/IP read-ahead buffering is enabled. + */ + +#ifndef CONFIG_NET_TCP_RECVDELAY +# if CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0 +# define CONFIG_NET_TCP_RECVDELAY 0 +# else +# define CONFIG_NET_TCP_RECVDELAY 5 +# endif #endif /**************************************************************************** diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index b6e10a2e0f..3d39dc1d7b 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -112,16 +112,43 @@ config NET_MAX_LISTENPORTS Maximum number of listening TCP/IP ports (all tasks). Default: 20 config NET_TCP_READAHEAD_BUFSIZE - bool "TCP/IP read-ahead buffer size" + int "TCP/IP read-ahead buffer size" default 562 ---help--- - Size of TCP/IP read-ahead buffers + Read-ahead buffers allows buffering of TCP/IP packets when there is no + receive in place to catch the TCP packet. In that case, the packet + will be retained in the NuttX read-ahead buffers. + + This setting specifies the size of one TCP/IP read-ahead buffer. + This should best be a equal to the maximum packet size (NET_BUFSIZE). config NET_NTCP_READAHEAD_BUFFERS int "Number of TCP/IP read-ahead buffers" default 8 ---help--- - Number of TCP/IP read-ahead buffers (may be zero) + Read-ahead buffers allows buffering of TCP/IP packets when there is no + receive in place to catch the TCP packet. In that case, the packet + will be retained in the NuttX read-ahead buffers. + + This setting specifies the number of TCP/IP read-ahead buffers This + value can be set to zero to disable all TCP/IP read-ahead buffering. + You might want to disable TCP/IP read-ahead buffering on a highly + memory constained system that does not have any TCP/IP packet rate + issues. + +config NET_TCP_RECVDELAY + int "TCP Rx delay" + default 0 + ---help--- + If NET_NTCP_READAHEAD_BUFFERS is zero, then there will be no buffering + of TCP/IP packets: Any TCP/IP packet received will be ACKed, but its contents + will be dropped in the bit-bucket. + + One low-performance option is delay for a short period of time after a + TCP/IP packet is received to see if another comes right behind it. Then + the packet data from both can be combined. This option only makes since + if performance is not an issue and you need to handle short bursts of + small, back-to-back packets. The delay is in units of deciseconds. config NET_TCPBACKLOG bool "TCP/IP backlog support" diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 741cd4c727..6b9eb9a908 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -59,8 +59,6 @@ * Definitions ****************************************************************************/ -#define TCP_TIMEO 10 /* Deciseconds after data received before recv() returns */ - #define UDPBUF ((struct uip_udpip_hdr *)&dev->d_buf[UIP_LLH_LEN]) #define TCPBUF ((struct uip_tcpip_hdr *)&dev->d_buf[UIP_LLH_LEN]) @@ -354,31 +352,39 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) FAR struct socket *psock = 0; socktimeo_t timeo = 0; - /* If this is a TCP socket that has already received some data, - * than we will always use a short timeout. + /* Check for a timeout configured via setsockopts(SO_RCVTIMEO). If none... + * we well let the read hang forever (except for the special case below). */ - if (pstate->rf_recvlen > 0) - { - /* Use the short timeout */ + /* Get the socket reference from the private data */ - timeo = TCP_TIMEO; + psock = pstate->rf_sock; + if (psock) + { + /* Recover the timeout value (zero if no timeout) */ + + timeo = psock->s_rcvtimeo; } - /* No.. check for a timeout configured via setsockopts(SO_RCVTIMEO). - * If none... we well let the read hang forever. + /* Use a fixed, configurable delay under the following circumstances: + * + * 1) This delay function has been enabled with CONFIG_NET_TCP_RECVDELAY > 0 + * 2) Some data has already been received from the socket. Since this can + * only be true for a TCP/IP socket, this logic applies only to TCP/IP + * sockets, and either + * 3) There is no configured receive timeout, or + * 4) The configured receive timeout is greater than than the delay */ - else +#if CONFIG_NET_TCP_RECVDELAY > 0 + if ((timeo == 0 || timeo > CONFIG_NET_TCP_RECVDELAY) && + pstate->rf_recvlen > 0) { - /* Get the socket reference from the private data */ + /* Use the configured timeout */ - psock = pstate->rf_sock; - if (psock) - { - timeo = psock->s_rcvtimeo; - } + timeo = CONFIG_NET_TCP_RECVDELAY; } +#endif /* Is there an effective timeout? */ @@ -389,7 +395,7 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) return net_timeo(pstate->rf_starttime, timeo); } - /* No timeout */ + /* No timeout -- hang forever waiting for data. */ return FALSE; } @@ -489,9 +495,28 @@ static uint16_t recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, flags = (flags & ~UIP_NEWDATA) | UIP_SNDACK; - /* If the user buffer has been filled, then we are finished. */ + /* Check for transfer complete. We will consider the transfer + * complete in own of two different ways, depending on the setting + * of CONFIG_NET_TCP_RECVDELAY. + * + * 1) If CONFIG_NET_TCP_RECVDELAY == 0 then we will consider the + * TCP/IP transfer complete as soon as any data has been received. + * This is safe because if any additional data is received, it + * will be retained inthe TCP/IP read-ahead buffer until the + * next receive is performed. + * 2) CONFIG_NET_TCP_RECVDELAY > 0 may be set to wait a little + * bit to determine if more data will be received. You might + * do this if read-ahead buffereing is disabled and we want to + * minimize the loss of back-to-back packets. In this case, + * the transfer is complete when either a) the entire user buffer + * is full or 2) when the receive timeout occurs (below). + */ +#if CONFIG_NET_TCP_RECVDELAY > 0 if (pstate->rf_buflen == 0) +#else + if (pstate->rf_recvlen > 0) +#endif { nllvdbg("TCP resume\n"); From aee93b655a9c9d4dd898b7b1009b08e7c1ce7e97 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Sep 2012 19:29:21 +0000 Subject: [PATCH 29/95] Add basic directory structure for the Shenzhou STM32107 board (not much there yet) git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5108 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 4 + nuttx/Documentation/NuttX.html | 25 +- nuttx/Documentation/NuttXLinks.html | 1 + nuttx/Documentation/README.html | 2 + nuttx/README.txt | 2 + nuttx/configs/README.txt | 4 + nuttx/configs/shenzhou/README.txt | 1110 +++++++++++++++++++++++++++ nuttx/net/recvfrom.c | 4 +- 8 files changed, 1145 insertions(+), 7 deletions(-) create mode 100755 nuttx/configs/shenzhou/README.txt diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 5f27953c96..19a0bcaae1 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3281,3 +3281,7 @@ after receiving data. That has historical reasons to be there (it was needed before read-ahead buffering was added), but kills performance. (Noted by Max Holtzberg). + * configs/shenzhou: Add beginnings of a board configuration for the + Shenzhou STM32107 board (see www.armjishu.com). Very little is in + place as of this initial check-in. + diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index 8fd164b88a..287c702d26 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -1799,12 +1799,25 @@

    STMicro STM32F107x. - Chip support for the STM32 F1 "Connectivity Line" family has been present in NuttX and users have reported that they have successful brought up NuttX on there proprietary boards using this logic. - Support for the Olimex STM32-P107 was contributed by Max Holtzberg and first appeared in NuttX-6.21. -

      - STATUS: - Configurations for the basic OS test and NSH are available and verified. -
    + Chip support for the STM32 F1 "Connectivity Line" family has been present in NuttX for some time and users have reported that they have successful brought up NuttX on there proprietary boards using this logic. +

    +

    + Olimex STM32-P107 + Support for the Olimex STM32-P107 was contributed by Max Holtzberg and first appeared in NuttX-6.21. That port features the STMicro STM32F107VC MCU. +

      + STATUS: + Configurations for the basic OS test and NSH are available and verified. +
    +

    +

    + Shenzhou + Work is underway as of this writing to port NuttX to the Shenzhou development board (See www.armjishu.com) featuring the STMicro STM32F107VCT MCU. + If all goes according to plan, this port should be verified and avaialble in NuttX-6.22. +

      + STATUS: + In progress. +
    +

    diff --git a/nuttx/Documentation/NuttXLinks.html b/nuttx/Documentation/NuttXLinks.html index 128ee5d2d3..b2206050c6 100644 --- a/nuttx/Documentation/NuttXLinks.html +++ b/nuttx/Documentation/NuttXLinks.html @@ -22,6 +22,7 @@
  • SourceForge
  • FreshMeat
  • Forum
  • +
  • OSChina
  • Downloads
  • Wiki
  • Toolchains
  • diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index abb54ab603..c18dd9ad84 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -166,6 +166,8 @@ | | | |- include/README.txt | | | |- src/README.txt | | | `- README.txt + | | |- shenzhou/ + | | | `- README.txt | | |- skp16c26/ | | | |- include/README.txt | | | |- src/README.txt diff --git a/nuttx/README.txt b/nuttx/README.txt index 28b4fba032..5964511289 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -735,6 +735,8 @@ nuttx | | |- include/README.txt | | |- src/README.txt | | `- README.txt + | |- shenzhou/ + | | `- README.txt | |- skp16c26/ | | |- include/README.txt | | |- src/README.txt diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 6cd5eef3f9..c8b02711a7 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -1709,6 +1709,10 @@ configs/sim This port does not support interrupts or a real timer (and hence no round robin scheduler) Otherwise, it is complete. +configs/shenzhou + This is the port of NuttX to the Shenzhou development board from + www.armjishu.com. This board features the STMicro STM32F107VCT MCU. + configs/skp16c26 Renesas M16C processor on the Renesas SKP16C26 StarterKit. This port uses the GNU m32c toolchain. STATUS: The port is complete but untested diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt new file mode 100755 index 0000000000..bda76a783f --- /dev/null +++ b/nuttx/configs/shenzhou/README.txt @@ -0,0 +1,1110 @@ +README +====== + +This README discusses issues unique to NuttX configurations for the Shenzhou +development board from www.armjishu.com featuring the STMicro STM32F107VCT +MCU. On-board features: + + - STM32F107VCT + - 10/100M PHY (DM9161AEP) + - TFT LCD Connector + - USB OTG + - CAN (CAN1=2) + - USART connectos (USART1-2) + - RS-485 + - SD card slot + - Audio DAC (PCM1770) + - SPI Flash (W25X16) + - (4) LEDs (LED1-4) + - 2.4G Wireless (NRF24L01 SPI module) + - 315MHz Wireless (module) + - (4) Buttons (KEY1-4, USERKEY2, USERKEY, TEMPER, WAKEUP) + - VBUS/external +4V select + - 5V/3.3V power conversion + - Extension connector + - JTAG + +Contents +======== + + - STM32F107VCT Pin Usage + - Development Environment + - GNU Toolchain Options + - IDEs + - NuttX buildroot Toolchain + - Shenzhou-specific Configuration Options + - LEDs + - Shenzhou-specific Configuration Options + - Configurations + +STM32F107VCT Pin Usage +====================== + +23 PA0 WAKEUP Connected to KEY4. Active low: Closing KEY4 pulls WAKEUP to ground. +24 PA1 MII_RX_CLK + RMII_REF_CLK +25 PA2 MII_MDIO +26 PA3 315M_VT +29 PA4 DAC_OUT1 +30 PA5 DAC_OUT2 JP10 + SPI1_SCK +31 PA6 SPI1_MISO +32 PA7 SPI1_MOSI +67 PA8 MCO +68 PA9 USB_VBUS JP3 + USART1_TX +69 PA10 USB_ID JP5 + USART1TX +70 PA11 USB_DM +71 PA12 USB_DP +72 PA13 TMS/SWDIO +76 PA14 TCK/SWCLK +77 PA15 TDI + +35 PB0 ADC_IN1 +36 PB1 ADC_IN2 +37 PB2 DATA_LE + BOOT1 JP13 +89 PB3 TDO/SWO +90 PB4 TRST +91 PB5 CAN2_RX +92 PB6 CAN2_TX JP11 + I2C1_SCL +93 PB7 I2C1_SDA +95 PB8 USB_PWR +96 PB9 F_CS +47 PB10 USERKEY +48 PB11 MII_TX_EN +51 PB12 I2S_WS + MII_TXD0 +52 PB13 I2S_CK + MII_TXD1 +53 PB14 SD_CD +54 PB15 I2S_DIN + +15 PC0 POTENTIO_METER +16 PC1 MII_MDC +17 PC2 WIRELESS_INT +18 PC3 WIRELESS_CE +33 PC4 USERKEY2 +34 PC5 TP_INT JP6 + MII_INT +63 PC6 I2S_MCK Pulled high +64 PC7 LCD_CS Pulled high +65 PC8 LCD_CS Pulled high +66 PC9 TP_CS Pulled hight +78 PC10 SPI3_SCK +79 PC11 SPI3_MISO +80 PC12 SPI3_MOSI +7 PC13 TAMPER +8 PC14 OSC32_IN Y1 32.768Khz XTAL +9 PC15 OSC32_OUT Y1 32.768Khz XTAL + +81 PD0 CAN1_RX +82 PD1 CAN1_TX +83 PD2 LED1 +84 PD3 LED2 +85 PD4 LED3 +86 PD5 485_TX + USART2_TX +87 PD6 485_RX JP4 + USART2_RX +88 PD7 LED4 + 485_DIR +55 PD8 MII_RX_DV + RMII_CRSDV +56 PD9 MII_RXD0 +57 PD10 MII_RXD1 +58 PD11 SD_CS +59 PD12 WIRELESS_CS +60 PD13 LCD_RS +61 PD14 LCD_WR +62 PD15 LCD_RD + +97 PE0 DB00 +98 PE1 DB01 +1 PE2 DB02 +2 PE3 DB03 +3 PE4 DB04 +4 PE5 DB05 +5 PE6 DB06 +38 PE7 DB07 +39 PE8 DB08 +40 PE9 DB09 +41 PE10 DB10 +42 PE11 DB11 +43 PE12 DB12 +44 PE13 DB13 +45 PE14 DB14 +46 PE15 DB15 + +73 N/C + +12 OSC_IN Y2 25Mhz XTAL +13 OSC_OUT Y2 25Mhz XTAL + +94 BOOT0 JP15 (3.3V or GND) +14 RESET S5 +6 VBAT JP14 (3.3V or battery) + +49 VSS_1 GND +74 VSS_2 GND +99 VSS_3 GND +27 VSS_4 GND +10 VSS_5 GND +19 VSSA VSSA +20 VREF- VREF- + + +Development Environment +======================= + + Either Linux or Cygwin on Windows can be used for the development environment. + The source has been built only using the GNU toolchain (see below). Other + toolchains will likely cause problems. Testing was performed using the Cygwin + environment because the development tools that I used only work under Windows. + +GNU Toolchain Options +===================== + + Toolchain Configurations + ------------------------ + The NuttX make system has been modified to support the following different + toolchain options. + + 1. The CodeSourcery GNU toolchain, + 2. The Atollic Toolchain, + 3. The devkitARM GNU toolchain, + 4. Raisonance GNU toolchain, or + 5. The NuttX buildroot Toolchain (see below). + + Most testing has been conducted using the CodeSourcery toolchain for Windows and + that is the default toolchain in most configurations. To use the Atollic, + devkitARM, Raisonance GNU, or NuttX buildroot toolchain, you simply need to + add one of the following configuration options to your .config (or defconfig) + file: + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_STM32_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_STM32_ATOLLIC_LITE=y : The free, "Lite" version of Atollic toolchain under Windows + CONFIG_STM32_ATOLLIC_PRO=y : The paid, "Pro" version of Atollic toolchain under Windows + CONFIG_STM32_DEVKITARM=y : devkitARM under Windows + CONFIG_STM32_RAISONANCE=y : Raisonance RIDE7 under Windows + CONFIG_STM32_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + + If you change the default toolchain, then you may also have to modify the PATH in + the setenv.h file if your make cannot find the tools. + + NOTE: the CodeSourcery (for Windows), Atollic, devkitARM, and Raisonance toolchains are + Windows native toolchains. The CodeSourcery (for Linux) and NuttX buildroot + toolchains are Cygwin and/or Linux native toolchains. There are several limitations + to using a Windows based toolchain in a Cygwin environment. The three biggest are: + + 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are + performed automatically in the Cygwin makefiles using the 'cygpath' utility + but you might easily find some new path problems. If so, check out 'cygpath -w' + + 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links + are used in Nuttx (e.g., include/arch). The make system works around these + problems for the Windows tools by copying directories instead of linking them. + But this can also cause some confusion for you: For example, you may edit + a file in a "linked" directory and find that your changes had no effect. + That is because you are building the copy of the file in the "fake" symbolic + directory. If you use a Windows toolchain, you should get in the habit of + making like this: + + make clean_context all + + An alias in your .bashrc file might make that less painful. + + 3. Dependencies are not made when using Windows versions of the GCC. This is + because the dependencies are generated using Windows pathes which do not + work with the Cygwin make. + + Support has been added for making dependencies with the windows-native toolchains. + That support can be enabled by modifying your Make.defs file as follows: + + - MKDEP = $(TOPDIR)/tools/mknulldeps.sh + + MKDEP = $(TOPDIR)/tools/mkdeps.sh --winpaths "$(TOPDIR)" + + If you have problems with the dependency build (for example, if you are not + building on C:), then you may need to modify tools/mkdeps.sh + + The CodeSourcery Toolchain (2009q1) + ----------------------------------- + The CodeSourcery toolchain (2009q1) does not work with default optimization + level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with + -Os. + + The Atollic "Pro" and "Lite" Toolchain + -------------------------------------- + One problem that I had with the Atollic toolchains is that the provide a gcc.exe + and g++.exe in the same bin/ file as their ARM binaries. If the Atollic bin/ path + appears in your PATH variable before /usr/bin, then you will get the wrong gcc + when you try to build host executables. This will cause to strange, uninterpretable + errors build some host binaries in tools/ when you first make. + + The Atollic "Lite" Toolchain + ---------------------------- + The free, "Lite" version of the Atollic toolchain does not support C++ nor + does it support ar, nm, objdump, or objdcopy. If you use the Atollic "Lite" + toolchain, you will have to set: + + CONFIG_HAVE_CXX=n + + In order to compile successfully. Otherwise, you will get errors like: + + "C++ Compiler only available in TrueSTUDIO Professional" + + The make may then fail in some of the post link processing because of some of + the other missing tools. The Make.defs file replaces the ar and nm with + the default system x86 tool versions and these seem to work okay. Disable all + of the following to avoid using objcopy: + + CONFIG_RRLOAD_BINARY=n + CONFIG_INTELHEX_BINARY=n + CONFIG_MOTOROLA_SREC=n + CONFIG_RAW_BINARY=n + + devkitARM + --------- + The devkitARM toolchain includes a version of MSYS make. Make sure that the + the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM + path or will get the wrong version of make. + +IDEs +==== + + NuttX is built using command-line make. It can be used with an IDE, but some + effort will be required to create the project. + + Makefile Build + -------------- + Under Eclipse, it is pretty easy to set up an "empty makefile project" and + simply use the NuttX makefile to build the system. That is almost for free + under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty + makefile project in order to work with Windows (Google for "Eclipse Cygwin" - + there is a lot of help on the internet). + + Native Build + ------------ + Here are a few tips before you start that effort: + + 1) Select the toolchain that you will be using in your .config file + 2) Start the NuttX build at least one time from the Cygwin command line + before trying to create your project. This is necessary to create + certain auto-generated files and directories that will be needed. + 3) Set up include pathes: You will need include/, arch/arm/src/stm32, + arch/arm/src/common, arch/arm/src/armv7-m, and sched/. + 4) All assembly files need to have the definition option -D __ASSEMBLY__ + on the command line. + + Startup files will probably cause you some headaches. The NuttX startup file + is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX + one time from the Cygwin command line in order to obtain the pre-built + startup object needed by RIDE. + +NuttX buildroot Toolchain +========================= + + A GNU GCC-based toolchain is assumed. The files */setenv.sh should + be modified to point to the correct path to the Cortex-M3 GCC toolchain (if + different from the default in your PATH variable). + + If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX + SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573). + This GNU toolchain builds and executes in the Linux or Cygwin environment. + + 1. You must have already configured Nuttx in /nuttx. + + cd tools + ./configure.sh shenzhou/ + + 2. Download the latest buildroot package into + + 3. unpack the buildroot tarball. The resulting directory may + have versioning information on it like buildroot-x.y.z. If so, + rename /buildroot-x.y.z to /buildroot. + + 4. cd /buildroot + + 5. cp configs/cortexm3-defconfig-4.3.3 .config + + 6. make oldconfig + + 7. make + + 8. Edit setenv.h, if necessary, so that the PATH variable includes + the path to the newly built binaries. + + See the file configs/README.txt in the buildroot source tree. That has more + detailed PLUS some special instructions that you will need to follow if you are + building a Cortex-M3 toolchain for Cygwin under Windows. + +LEDs +==== + +The Shenzhou board has four LEDs labeled LED1, LED2, LED3 and LED4 on the +board. These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is +defined. In that case, the usage by the board port is defined in +include/board.h and src/up_leds.c. The LEDs are used to encode OS-related +events as follows: + + SYMBOL Meaning LED1* LED2 LED3 LED4**** + ------------------- ----------------------- ------- ------- ------- ------ + LED_STARTED NuttX has been started ON OFF OFF OFF + LED_HEAPALLOCATE Heap has been allocated OFF ON OFF OFF + LED_IRQSENABLED Interrupts enabled ON ON OFF OFF + LED_STACKCREATED Idle stack created OFF OFF ON OFF + LED_INIRQ In an interrupt** ON N/C N/C OFF + LED_SIGNAL In a signal handler*** N/C ON N/C OFF + LED_ASSERTION An assertion failed ON ON N/C OFF + LED_PANIC The system has crashed N/C N/C N/C ON + LED_IDLE STM32 is is sleep mode (Optional, not used) + + * If LED1, LED2, LED3 are statically on, then NuttX probably failed to boot + and these LEDs will give you some indication of where the failure was + ** The normal state is LED3 ON and LED1 faintly glowing. This faint glow + is because of timer interupts that result in the LED being illuminated + on a small proportion of the time. + *** LED2 may also flicker normally if signals are processed. +**** LED4 may not be available if RS-485 is also used it will then indicate + the RS-485 direction. + +Shenzhou-specific Configuration Options +============================================ + + CONFIG_ARCH - Identifies the arch/ subdirectory. This should + be set to: + + CONFIG_ARCH=arm + + CONFIG_ARCH_family - For use in C code: + + CONFIG_ARCH_ARM=y + + CONFIG_ARCH_architecture - For use in C code: + + CONFIG_ARCH_CORTEXM3=y + + CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory + + CONFIG_ARCH_CHIP=stm32 + + CONFIG_ARCH_CHIP_name - For use in C code to identify the exact + chip: + + CONFIG_ARCH_CHIP_STM32F107VCT=y + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock + configuration features. + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n + + CONFIG_ARCH_BOARD - Identifies the configs subdirectory and + hence, the board that supports the particular chip or SoC. + + CONFIG_ARCH_BOARD=shenzhou (for the Shenzhou development board) + + CONFIG_ARCH_BOARD_name - For use in C code + + CONFIG_ARCH_BOARD_SHENZHOU=y + + CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation + of delay loops + + CONFIG_ENDIAN_BIG - define if big endian (default is little + endian) + + CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case): + + CONFIG_DRAM_SIZE=0x00010000 (64Kb) + + CONFIG_DRAM_START - The start address of installed DRAM + + CONFIG_DRAM_START=0x20000000 + + CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP + + In addition to internal SRAM, SRAM may also be available through the FSMC. + In order to use FSMC SRAM, the following additional things need to be + present in the NuttX configuration file: + + CONFIG_STM32_FSMC_SRAM - Indicates that SRAM is available via the + FSMC (as opposed to an LCD or FLASH). + + CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex) + + CONFIG_HEAP2_END - The size of the SRAM in the FSMC address space (decimal) + + CONFIG_ARCH_IRQPRIO - The STM32107xxx supports interrupt prioritization + + CONFIG_ARCH_IRQPRIO=y + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that + have LEDs + + CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt + stack. If defined, this symbol is the size of the interrupt + stack in bytes. If not defined, the user task stacks will be + used during interrupt handling. + + CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture. + + CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that + cause a 100 second delay during boot-up. This 100 second delay + serves no purpose other than it allows you to calibratre + CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure + the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until + the delay actually is 100 seconds. + + Individual subsystems can be enabled: + + AHB1 + ---- + CONFIG_STM32_CRC + CONFIG_STM32_BKPSRAM + CONFIG_STM32_CCMDATARAM + CONFIG_STM32_DMA1 + CONFIG_STM32_DMA2 + CONFIG_STM32_ETHMAC + CONFIG_STM32_OTGHS + + AHB2 + ---- + CONFIG_STM32_DCMI + CONFIG_STM32_CRYP + CONFIG_STM32_HASH + CONFIG_STM32_RNG + CONFIG_STM32_OTGFS + + AHB3 + ---- + CONFIG_STM32_FSMC + + APB1 + ---- + CONFIG_STM32_TIM2 + CONFIG_STM32_TIM3 + CONFIG_STM32_TIM4 + CONFIG_STM32_TIM5 + CONFIG_STM32_TIM6 + CONFIG_STM32_TIM7 + CONFIG_STM32_TIM12 + CONFIG_STM32_TIM13 + CONFIG_STM32_TIM14 + CONFIG_STM32_WWDG + CONFIG_STM32_IWDG + CONFIG_STM32_SPI2 + CONFIG_STM32_SPI3 + CONFIG_STM32_USART2 + CONFIG_STM32_USART3 + CONFIG_STM32_UART4 + CONFIG_STM32_UART5 + CONFIG_STM32_I2C1 + CONFIG_STM32_I2C2 + CONFIG_STM32_I2C3 + CONFIG_STM32_CAN1 + CONFIG_STM32_CAN2 + CONFIG_STM32_DAC1 + CONFIG_STM32_DAC2 + CONFIG_STM32_PWR -- Required for RTC + + APB2 + ---- + CONFIG_STM32_TIM1 + CONFIG_STM32_TIM8 + CONFIG_STM32_USART1 + CONFIG_STM32_USART6 + CONFIG_STM32_ADC1 + CONFIG_STM32_ADC2 + CONFIG_STM32_ADC3 + CONFIG_STM32_SDIO + CONFIG_STM32_SPI1 + CONFIG_STM32_SYSCFG + CONFIG_STM32_TIM9 + CONFIG_STM32_TIM10 + CONFIG_STM32_TIM11 + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn + is defined (as above) then the following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation, ADC conversion, + or DAC conversion. Note that ADC/DAC require two definition: Not only do you have + to assign the timer (n) for used by the ADC or DAC, but then you also have to + configure which ADC or DAC (m) it is assigned to. + + CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,14 + CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,14 + CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,14, m=1,..,3 + CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,14 + CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,14, m=1,..,2 + + For each timer that is enabled for PWM usage, we need the following additional + configuration settings: + + CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} + + NOTE: The STM32 timers are each capable of generating different signals on + each of the four channels with different duty cycles. That capability is + not supported by this driver: Only one output channel per timer. + + JTAG Enable settings (by default JTAG-DP and SW-DP are disabled): + + CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + but without JNTRST. + CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled + + STM32107xxx specific device driver settings + + CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART + m (m=4,5) for the console and ttys0 (default is the USART1). + CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. + This specific the size of the receive buffer + CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before + being sent. This specific the size of the transmit buffer + CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be + CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_U[S]ARTn_2STOP - Two stop bits + + CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI + support. Non-interrupt-driven, poll-waiting is recommended if the + interrupt rate would be to high in the interrupt driven case. + CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. + Cannot be used with CONFIG_STM32_SPI_INTERRUPT. + + CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO + and CONFIG_STM32_DMA2. + CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 + CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. + Default: Medium + CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: + 4-bit transfer mode. + + CONFIG_STM32_PHYADDR - The 5-bit address of the PHY on the board + CONFIG_STM32_MII - Support Ethernet MII interface + CONFIG_STM32_MII_MCO1 - Use MCO1 to clock the MII interface + CONFIG_STM32_MII_MCO2 - Use MCO2 to clock the MII interface + CONFIG_STM32_RMII - Support Ethernet RMII interface + CONFIG_STM32_AUTONEG - Use PHY autonegotion to determine speed and mode + CONFIG_STM32_ETHFD - If CONFIG_STM32_AUTONEG is not defined, then this + may be defined to select full duplex mode. Default: half-duplex + CONFIG_STM32_ETH100MBPS - If CONFIG_STM32_AUTONEG is not defined, then this + may be defined to select 100 MBps speed. Default: 10 Mbps + CONFIG_STM32_PHYSR - This must be provided if CONFIG_STM32_AUTONEG is + defined. The PHY status register address may diff from PHY to PHY. This + configuration sets the address of the PHY status register. + CONFIG_STM32_PHYSR_SPEED - This must be provided if CONFIG_STM32_AUTONEG is + defined. This provides bit mask indicating 10 or 100MBps speed. + CONFIG_STM32_PHYSR_100MBPS - This must be provided if CONFIG_STM32_AUTONEG is + defined. This provides the value of the speed bit(s) indicating 100MBps speed. + CONFIG_STM32_PHYSR_MODE - This must be provided if CONFIG_STM32_AUTONEG is + defined. This provide bit mask indicating full or half duplex modes. + CONFIG_STM32_PHYSR_FULLDUPLEX - This must be provided if CONFIG_STM32_AUTONEG is + defined. This provides the value of the mode bits indicating full duplex mode. + CONFIG_STM32_ETH_PTP - Precision Time Protocol (PTP). Not supported + but some hooks are indicated with this condition. + + Shenzhou CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback + mode for testing. The STM32 CAN driver does support loopback mode. + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 + CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 + CONFIG_CAN_REGDEBUG - If CONFIG_DEBUG is set, this will generate an + dump of all CAN registers. + + Shenzhou LCD Hardware Configuration + + The LCD driver supports the following LCDs on the STM324xG_EVAL board: + + AM-240320L8TNQW00H (LCD_ILI9320 or LCD_ILI9321) OR + AM-240320D5TOQW01H (LCD_ILI9325) + + Configuration options. + + CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" + support. Default is this 320x240 "landscape" orientation + For the Shenzhou board, the edge opposite from the row of buttons + is used as the top of the display in this orientation. + CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse + landscape" support. Default is this 320x240 "landscape" + orientation + For the Shenzhou board, the edge next to the row of buttons + is used as the top of the display in this orientation. + CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" + orientation support. In this orientation, the STM3210E-EVAL's + LCD ribbon cable is at the bottom of the display. Default is + 320x240 "landscape" orientation. + In this orientation, the top of the display is to the left + of the buttons (if the board is held so that the buttons are at the + botton of the board). + CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse + portrait" orientation support. In this orientation, the + STM3210E-EVAL's LCD ribbon cable is at the top of the display. + Default is 320x240 "landscape" orientation. + In this orientation, the top of the display is to the right + of the buttons (if the board is held so that the buttons are at the + botton of the board). + CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears + to be a shift in the returned data. This value fixes the offset. + Default 5. + + The LCD driver dynamically selects the LCD based on the reported LCD + ID value. However, code size can be reduced by suppressing support for + individual LCDs using: + + CONFIG_STM32_ILI9320_DISABLE (includes ILI9321) + CONFIG_STM32_ILI9325_DISABLE + + STM32 USB OTG FS Host Driver Support + + Pre-requisites + + CONFIG_USBHOST - Enable USB host support + CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block + CONFIG_STM32_SYSCFG - Needed + CONFIG_SCHED_WORKQUEUE - Worker thread support is required + + Options: + + CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words. + Default 128 (512 bytes) + CONFIG_STM32_OTGFS_NPTXFIFO_SIZE - Size of the non-periodic Tx FIFO + in 32-bit words. Default 96 (384 bytes) + CONFIG_STM32_OTGFS_PTXFIFO_SIZE - Size of the periodic Tx FIFO in 32-bit + words. Default 96 (384 bytes) + CONFIG_STM32_OTGFS_DESCSIZE - Maximum size of a descriptor. Default: 128 + CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever + want to do that? + CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access + debug. Depends on CONFIG_DEBUG. + CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB + packets. Depends on CONFIG_DEBUG. + +Configurations +============== + +Each Shenzhou configuration is maintained in a sudirectory and +can be selected as follow: + + cd tools + ./configure.sh shenzhou/ + cd - + . ./setenv.sh + +Where is one of the following: + + dhcpd: + ----- + + This builds the DCHP server using the apps/examples/dhcpd application + (for execution from FLASH.) See apps/examples/README.txt for information + about the dhcpd example. The server address is 10.0.0.1 and it serves + IP addresses in the range 10.0.0.2 through 10.0.0.17 (all of which, of + course, are configurable). + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + + nettest: + ------- + + This configuration directory may be used to verify networking performance + using the STM32's Ethernet controller. It uses apps/examples/nettest to excercise the + TCP/IP network. + + CONFIG_EXAMPLE_NETTEST_SERVER=n : Target is configured as the client + CONFIG_EXAMPLE_NETTEST_PERFORMANCE=y : Only network performance is verified. + CONFIG_EXAMPLE_NETTEST_IPADDR=(10<<24|0<<16|0<<8|2) : Target side is IP: 10.0.0.2 + CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host side is IP: 10.0.0.1 + CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10<<24|0<<16|0<<8|1) : Server address used by which ever is client. + + nsh: + --- + Configures the NuttShell (nsh) located at apps/examples/nsh. The + Configuration enables both the serial and telnet NSH interfaces. + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_NSH_DHCPC=n : DHCP is disabled + CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2) : Target IP address 10.0.0.2 + CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host IP address 10.0.0.1 + + NOTES: + 1. This example assumes that a network is connected. During its + initialization, it will try to negotiate the link speed. If you have + no network connected when you reset the board, there will be a long + delay (maybe 30 seconds?) before anything happens. That is the timeout + before the networking finally gives up and decides that no network is + available. + + 2. This example supports the ADC test (apps/examples/adc) but this must + be manually enabled by selecting: + + CONFIG_ADC=y : Enable the generic ADC infrastructure + CONFIG_STM32_ADC3=y : Enable ADC3 + CONFIG_STM32_TIM1=y : Enable Timer 1 + CONFIG_STM32_TIM1_ADC=y : Indicate that timer 1 will be used to trigger an ADC + CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling + CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency + + See also apps/examples/README.txt + + General debug for analog devices (ADC/DAC): + + CONFIG_DEBUG_ANALOG + + 3. This example supports the PWM test (apps/examples/pwm) but this must + be manually enabled by selecting eeither + + CONFIG_PWM=y : Enable the generic PWM infrastructure + CONFIG_PWM_PULSECOUNT=n : Disable to support for TIM1/8 pulse counts + CONFIG_STM32_TIM4=y : Enable TIM4 + CONFIG_STM32_TIM4_PWM=y : Use TIM4 to generate PWM output + CONFIG_STM32_TIM4_CHANNEL=2 : Select output on TIM4, channel 2 + + If CONFIG_STM32_FSMC is disabled, output will appear on CN3, pin 32. + Ground is available on CN3, pin1. + + Or.. + + CONFIG_PWM=y : Enable the generic PWM infrastructure + CONFIG_PWM_PULSECOUNT=y : Enable to support for TIM1/8 pulse counts + CONFIG_STM32_TIM8=y : Enable TIM8 + CONFIG_STM32_TIM8_PWM=y : Use TIM8 to generate PWM output + CONFIG_STM32_TIM8_CHANNEL=4 : Select output on TIM8, channel 4 + + If CONFIG_STM32_FSMC is disabled, output will appear on CN3, pin 17 + Ground is available on CN23 pin1. + + See also include/board.h and apps/examples/README.txt + + Special PWM-only debug options: + + CONFIG_DEBUG_PWM + + 4. This example supports the CAN loopback test (apps/examples/can) but this + must be manually enabled by selecting: + + CONFIG_CAN=y : Enable the generic CAN infrastructure + CONFIG_CAN_EXID=y or n : Enable to support extended ID frames + CONFIG_STM32_CAN1=y : Enable CAN1 + CONFIG_CAN_LOOPBACK=y : Enable CAN loopback mode + + See also apps/examples/README.txt + + Special CAN-only debug options: + + CONFIG_DEBUG_CAN + CONFIG_CAN_REGDEBUG + + 5. This example can support an FTP client. In order to build in FTP client + support simply uncomment the following lines in the appconfig file (before + configuring) or in the apps/.config file (after configuring): + + #CONFIGURED_APPS += netutils/ftpc + #CONFIGURED_APPS += examples/ftpc + + 6. This example can support an FTP server. In order to build in FTP server + support simply uncomment the following lines in the appconfig file (before + configuring) or in the apps/.config file (after configuring): + + #CONFIGURED_APPS += netutils/ftpd + #CONFIGURED_APPS += examples/ftpd + + And enable poll() support in the NuttX configuration file: + + CONFIG_DISABLE_POLL=n + + 7. This example supports the watchdog timer test (apps/examples/watchdog) + but this must be manually enabled by selecting: + + CONFIG_WATCHDOG=y : Enables watchdog timer driver support + CONFIG_STM32_WWDG=y : Enables the WWDG timer facility, OR + CONFIG_STM32_IWDG=y : Enables the IWDG timer facility (but not both) + + The WWDG watchdog is driven off the (fast) 42MHz PCLK1 and, as result, + has a maximum timeout value of 49 milliseconds. For WWDG watchdog, you + should also add the fillowing to the configuration file: + + CONFIG_EXAMPLES_WATCHDOG_PINGDELAY=20 + CONFIG_EXAMPLES_WATCHDOG_TIMEOUT=49 + + The IWDG timer has a range of about 35 seconds and should not be an issue. + + 7. Adding LCD and graphics support: + + appconfig (apps/.config): Enable the application configurations that you + want to use. Asexamples: + + CONFIGURED_APPS += examples/nx : Pick one or more + CONFIGURED_APPS += examples/nxhello : + CONFIGURED_APPS += examples/nximage : + CONFIGURED_APPS += examples/nxlines : + + defconfig (nuttx/.config): + + CONFIG_STM32_FSMC=y : FSMC support is required for the LCD + CONFIG_NX=y : Enable graphics suppport + CONFIG_MM_REGIONS=3 : When FSMC is enabled, so is the on-board SRAM memory region + + 8. USB OTG FS Device or Host Support + + CONFIG_USBDEV - Enable USB device support, OR + CONFIG_USBHOST - Enable USB host support + CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block + CONFIG_STM32_SYSCFG - Needed + CONFIG_SCHED_WORKQUEUE - Worker thread support is required + + 9. USB OTG FS Host Support. The following changes will enable support for + a USB host on the STM32F4Discovery, including support for a mass storage + class driver: + + CONFIG_USBDEV=n - Make sure tht USB device support is disabled + CONFIG_USBHOST=y - Enable USB host support + CONFIG_STM32_OTGFS=y - Enable the STM32 USB OTG FS block + CONFIG_STM32_SYSCFG=y - Needed for all USB OTF FS support + CONFIG_SCHED_WORKQUEUE=y - Worker thread support is required for the mass + storage class driver. + CONFIG_NSH_ARCHINIT=y - Architecture specific USB initialization + is needed for NSH + CONFIG_FS_FAT=y - Needed by the USB host mass storage class. + + With those changes, you can use NSH with a FLASH pen driver as shown + belong. Here NSH is started with nothing in the USB host slot: + + NuttShell (NSH) NuttX-x.yy + nsh> ls /dev + /dev: + console + null + ttyS0 + + After inserting the FLASH drive, the /dev/sda appears and can be + mounted like this: + + nsh> ls /dev + /dev: + console + null + sda + ttyS0 + nsh> mount -t vfat /dev/sda /mnt/stuff + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + + And files on the FLASH can be manipulated to standard interfaces: + + nsh> echo "This is a test" >/mnt/stuff/atest.txt + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + -rw-rw-rw- 16 atest.txt + nsh> cat /mnt/stuff/atest.txt + This is a test + nsh> cp /mnt/stuff/filea.c fileb.c + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + -rw-rw-rw- 16 atest.txt + -rw-rw-rw- 16236 fileb.c + + To prevent data loss, don't forget to un-mount the FLASH drive + before removing it: + + nsh> umount /mnt/stuff + + 11. This configuration requires that jumper JP22 be set to enable RS-232 + operation. + + nsh2: + ----- + + This is an alternative NSH configuration. One limitation of the Shenzhou + board is that you cannot have both a UART-based NSH console and SDIO support. + The nsh2 differs from the nsh configuration in the following ways: + + -CONFIG_STM32_USART3=y : USART3 is disabled + +CONFIG_STM32_USART3=n + + -CONFIG_STM32_SDIO=n : SDIO is enabled + +CONFIG_STM32_SDIO=y + + Logically, these are the only differences: This configuration has SDIO (and + the SD card) enabled and the serial console disabled. There is ONLY a + Telnet console!. + + There are some special settings to make life with only a Telnet + + CONFIG_SYSLOG=y - Enables the System Logging feature. + CONFIG_RAMLOG=y - Enable the RAM-based logging feature. + CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console. + This means that any console output from non-Telnet threads will + go into the circular buffer in RAM. + CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the + system logger. This means that (1) in addition to the console + output from other tasks, ALL of the debug output will also to + to the circular buffer in RAM, and (2) NSH will now support a + command called 'dmesg' that can be used to dump the RAM log. + + There are a few other configuration differences as necessary to support + this different device configuration. Just the do the 'diff' if you are + curious. + + NOTES: + 1. See the notes for the nsh configuration. Most also apply to the nsh2 + configuration. Like the nsh configuration, this configuration can + be modified to support a variety of additional tests. + + 2. RS-232 is disabled, but Telnet is still available for use as a console. + Since RS-232 and SDIO use the same pins (one controlled by JP22), RS232 + and SDIO cannot be used concurrently. + + 3. This configuration requires that jumper JP22 be set to enable SDIO + operation. To enable MicroSD Card, which shares same I/Os with RS-232, + JP22 is not fitted. + + 4. In order to use SDIO without overruns, DMA must be used. The STM32 F4 + has 192Kb of SRAM in two banks: 112Kb of "system" SRAM located at + 0x2000:0000 and 64Kb of "CCM" SRAM located at 0x1000:0000. It appears + that you cannot perform DMA from CCM SRAM. The work around that I have now + is simply to omit the 64Kb of CCM SRAM from the heap so that all memory is + allocated from System SRAM. This is done by setting: + + CONFIG_MM_REGIONS=1 + + Then DMA works fine. The downside is, of course, is that we lose 64Kb + of precious SRAM. + + 5. Another SDIO/DMA issue. This one is probably a software bug. This is + the bug as stated in the TODO list: + + "If you use a large I/O buffer to access the file system, then the + MMCSD driver will perform multiple block SD transfers. With DMA + ON, this seems to result in CRC errors detected by the hardware + during the transfer. Workaround: CONFIG_MMCSD_MULTIBLOCK_DISABLE=y" + + For this reason, CONFIG_MMCSD_MULTIBLOCK_DISABLE=y appears in the defconfig + file. + + 6. Another DMA-related concern. I see this statement in the reference + manual: "The burst configuration has to be selected in order to respect + the AHB protocol, where bursts must not cross the 1 KB address boundary + because the minimum address space that can be allocated to a single slave + is 1 KB. This means that the 1 KB address boundary should not be crossed + by a burst block transfer, otherwise an AHB error would be generated, + that is not reported by the DMA registers." + + There is nothing in the DMA driver to prevent this now. + + nxconsole: + ---------- + This is yet another NSH configuration. This NSH configuration differs + from the others, however, in that it uses the NxConsole driver to host + the NSH shell. + + Some of the differences in this configuration and the normal nsh configuration + include these settings in the defconfig file: + + These select NX Multi-User mode: + + CONFG_NX_MULTIUSER=y + CONFIG_DISABLE_MQUEUE=n + + The following definition in the defconfig file to enables the NxConsole + driver: + + CONFIG_NXCONSOLE=y + + The appconfig file selects examples/nxconsole instead of examples/nsh: + + CONFIGURED_APPS += examples/nxconsole + + Other configuration settings: + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_LCD_LANDSCAPE=y : 320x240 landscape + + nxwm + ---- + This is a special configuration setup for the NxWM window manager + UnitTest. The NxWM window manager can be found here: + + trunk/NxWidgets/nxwm + + The NxWM unit test can be found at: + + trunk/NxWidgets/UnitTests/nxwm + + Documentation for installing the NxWM unit test can be found here: + + trunk/NxWidgets/UnitTests/README.txt + + Here is the quick summary of the build steps: + + 1. Intall the nxwm configuration + + $ cd ~/nuttx/trunk/nuttx/tools + $ ./configure.sh shenzhou/nxwm + + 2. Make the build context (only) + + $ cd .. + $ . ./setenv.sh + $ make context + ... + + 3. Install the nxwm unit test + + $ cd ~/nuttx/trunk/NxWidgets + $ tools/install.sh ~/nuttx/trunk/apps nxwm + Creating symbolic link + - To ~/nuttx/trunk/NxWidgets/UnitTests/nxwm + - At ~/nuttx/trunk/apps/external + + 4. Build the NxWidgets library + + $ cd ~/nuttx/trunk/NxWidgets/libnxwidgets + $ make TOPDIR=~/nuttx/trunk/nuttx + ... + + 5. Build the NxWM library + + $ cd ~/nuttx/trunk/NxWidgets/nxwm + $ make TOPDIR=~//nuttx/trunk/nuttx + ... + + 6. Built NuttX with the installed unit test as the application + + $ cd ~/nuttx/trunk/nuttx + $ make + + ostest: + ------ + This configuration directory, performs a simple OS test using + examples/ostest. By default, this project assumes that you are + using the DFU bootloader. + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + + telnetd: + -------- + + A simple test of the Telnet daemon(see apps/netutils/README.txt, + apps/examples/README.txt, and apps/examples/telnetd). This is + the same daemon that is used in the nsh configuration so if you + use NSH, then you don't care about this. This test is good for + testing the Telnet daemon only because it works in a simpler + environment than does the nsh configuration. diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 6b9eb9a908..8bb658f48f 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -371,7 +371,7 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) * 1) This delay function has been enabled with CONFIG_NET_TCP_RECVDELAY > 0 * 2) Some data has already been received from the socket. Since this can * only be true for a TCP/IP socket, this logic applies only to TCP/IP - * sockets, and either + * sockets. And either * 3) There is no configured receive timeout, or * 4) The configured receive timeout is greater than than the delay */ @@ -598,7 +598,9 @@ static uint16_t recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, /* Report an error only if no data has been received */ +#if CONFIG_NET_TCP_RECVDELAY > 0 if (pstate->rf_recvlen == 0) +#endif { /* Report the timeout error */ From e41adbb552f22160d23f175ed9c2b7236d17d8c7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Sep 2012 22:30:35 +0000 Subject: [PATCH 30/95] More info for the Shenzhou board configuration git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5109 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/stm32/Kconfig | 28 +- nuttx/arch/arm/src/stm32/stm32_eth.c | 2 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- nuttx/configs/shenzhou/README.txt | 161 ++++---- nuttx/configs/shenzhou/include/board.h | 354 ++++++++++++++++++ .../configs/shenzhou/src/shenzhou-internal.h | 260 +++++++++++++ 6 files changed, 726 insertions(+), 81 deletions(-) create mode 100644 nuttx/configs/shenzhou/include/board.h create mode 100644 nuttx/configs/shenzhou/src/shenzhou-internal.h diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index db785fd621..661f6d8f43 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -1562,13 +1562,32 @@ config STM32_MII ---help--- Support Ethernet MII interface. +choice + prompt "MII clock configuration" + default STM32_MII_MCO if STM32_STM32F10XX + default STM32_MII_MCO1 if STM32_STM32F20XX || STM32_STM32F40XX + depends on STM32_MII + +config STM32_MII_MCO + bool "Use MC0 as MII clock" + depends on STM32_STM32F10XX + ---help--- + Use MCO to clock the MII interface. Default: Use MC0 + +config STM32_MII_MCO1 + bool "Use MC01 as MII clock" + depends on (STM32_STM32F20XX || STM32_STM32F40XX) + ---help--- + Use MCO1 to clock the MII interface. Default: Use MC01 + config STM32_MII_MCO2 bool "Use MC02 as MII clock" - default n - depends on STM32_MII + depends on (STM32_STM32F20XX || STM32_STM32F40XX) ---help--- Use MCO2 to clock the MII interface. Default: Use MC01 +endchoice + config STM32_AUTONEG bool "Use autonegtiation" default y @@ -1643,11 +1662,6 @@ config STM32_RMII default y if !STM32_MII depends on STM32_ETHMAC -config STM32_MII_MCO1 - bool - default y if !STM32_MII_MCO2 - depends on STM32_MII - menu "USB Host Configuration" config STM32_OTGFS_RXFIFO_SIZE diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c index 57d4cc2d33..fb6dc69fd0 100644 --- a/nuttx/arch/arm/src/stm32/stm32_eth.c +++ b/nuttx/arch/arm/src/stm32/stm32_eth.c @@ -2659,7 +2659,7 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv) /* Setup MCO pin for alternative usage */ -#if defined(CONFIG_STM32_RMII_MCO) +#if defined(CONFIG_STM32_MII_MCO) stm32_configgpio(GPIO_MCO); stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE); #endif diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index c7c71018aa..d8048c4de1 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -368,7 +368,7 @@ CONFIG_NET_MULTICAST=n CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=n CONFIG_STM32_RMII=y -CONFIG_STM32_RMII_MCO=y +CONFIG_STM32_MII_MCO=y CONFIG_STM32_AUTONEG=y #CONFIG_STM32_ETHFD #CONFIG_STM32_ETH100MB diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index bda76a783f..72e4c80080 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -40,30 +40,36 @@ Contents STM32F107VCT Pin Usage ====================== +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- 23 PA0 WAKEUP Connected to KEY4. Active low: Closing KEY4 pulls WAKEUP to ground. 24 PA1 MII_RX_CLK RMII_REF_CLK 25 PA2 MII_MDIO 26 PA3 315M_VT -29 PA4 DAC_OUT1 -30 PA5 DAC_OUT2 JP10 - SPI1_SCK -31 PA6 SPI1_MISO -32 PA7 SPI1_MOSI -67 PA8 MCO -68 PA9 USB_VBUS JP3 - USART1_TX -69 PA10 USB_ID JP5 - USART1TX -70 PA11 USB_DM -71 PA12 USB_DP +29 PA4 DAC_OUT1 To CON5(CN14) +30 PA5 DAC_OUT2 To CON5(CN14). JP10 + SPI1_SCK To the SD card, SPI FLASH +31 PA6 SPI1_MISO To the SD card, SPI FLASH +32 PA7 SPI1_MOSI To the SD card, SPI FLASH +67 PA8 MCO To DM9161AEP PHY +68 PA9 USB_VBUS MINI-USB-AB. JP3 + USART1_TX MAX3232 to CN5 +69 PA10 USB_ID MINI-USB-AB. JP5 + USART1_RX MAX3232 to CN5 +70 PA11 USB_DM MINI-USB-AB +71 PA12 USB_DP MINI-USB-AB 72 PA13 TMS/SWDIO 76 PA14 TCK/SWCLK 77 PA15 TDI -35 PB0 ADC_IN1 -36 PB1 ADC_IN2 -37 PB2 DATA_LE +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- +35 PB0 ADC_IN1 To CON5(CN14) +36 PB1 ADC_IN2 To CON5(CN14) +37 PB2 DATA_LE To TFT LCD (CN13) BOOT1 JP13 89 PB3 TDO/SWO 90 PB4 TRST @@ -71,73 +77,85 @@ STM32F107VCT Pin Usage 92 PB6 CAN2_TX JP11 I2C1_SCL 93 PB7 I2C1_SDA -95 PB8 USB_PWR -96 PB9 F_CS -47 PB10 USERKEY -48 PB11 MII_TX_EN -51 PB12 I2S_WS - MII_TXD0 -52 PB13 I2S_CK - MII_TXD1 +95 PB8 USB_PWR Drives USB VBUS +96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI FLASH +47 PB10 USERKEY Connected to KEY2 +48 PB11 MII_TX_EN Ethernet PHY +51 PB12 I2S_WS Audio DAC + MII_TXD0 Ethernet PHY +52 PB13 I2S_CK Audio DAC + MII_TXD1 Ethernet PHY 53 PB14 SD_CD -54 PB15 I2S_DIN +54 PB15 I2S_DIN Audio DAC +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- 15 PC0 POTENTIO_METER -16 PC1 MII_MDC +16 PC1 MII_MDC Ethernet PHY 17 PC2 WIRELESS_INT -18 PC3 WIRELESS_CE -33 PC4 USERKEY2 -34 PC5 TP_INT JP6 - MII_INT -63 PC6 I2S_MCK Pulled high -64 PC7 LCD_CS Pulled high -65 PC8 LCD_CS Pulled high -66 PC9 TP_CS Pulled hight -78 PC10 SPI3_SCK -79 PC11 SPI3_MISO -80 PC12 SPI3_MOSI -7 PC13 TAMPER +18 PC3 WIRELESS_CE To the NRF24L01 2.4G wireless module +33 PC4 USERKEY2 Connected to KEY1 +34 PC5 TP_INT JP6. To TFT LCD (CN13) module + MII_INT Ethernet PHY +63 PC6 I2S_MCK Audio DAC. Active low: Pulled high +64 PC7 PCM1770_CS Audio DAC. Active low: Pulled high +65 PC8 LCD_CS TFT LCD (CN13). Active low: Pulled high +66 PC9 TP_CS TFT LCD (CN13). Active low: Pulled high +78 PC10 SPI3_SCK To TFT LCD (CN13), the NRF24L01 2.4G wireless module +79 PC11 SPI3_MISO To TFT LCD (CN13), the NRF24L01 2.4G wireless module +80 PC12 SPI3_MOSI To TFT LCD (CN13), the NRF24L01 2.4G wireless module +7 PC13 TAMPER Connected to KEY3 8 PC14 OSC32_IN Y1 32.768Khz XTAL 9 PC15 OSC32_OUT Y1 32.768Khz XTAL +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- 81 PD0 CAN1_RX 82 PD1 CAN1_TX -83 PD2 LED1 -84 PD3 LED2 -85 PD4 LED3 -86 PD5 485_TX - USART2_TX -87 PD6 485_RX JP4 - USART2_RX -88 PD7 LED4 - 485_DIR -55 PD8 MII_RX_DV - RMII_CRSDV -56 PD9 MII_RXD0 -57 PD10 MII_RXD1 -58 PD11 SD_CS -59 PD12 WIRELESS_CS -60 PD13 LCD_RS -61 PD14 LCD_WR -62 PD15 LCD_RD +83 PD2 LED1 Active low: Pulled high +84 PD3 LED2 Active low: Pulled high +85 PD4 LED3 Active low: Pulled high +86 PD5 485_TX Same as USART2_TX but goes to SP3485 + USART2_TX MAX3232 to CN6 +87 PD6 485_RX Save as USART2_RX but goes to SP3485 (see JP4) + USART2_RX MAX3232 to CN6 +88 PD7 LED4 Active low: Pulled high + 485_DIR SP3485 read enable (not) +55 PD8 MII_RX_DV Ethernet PHY + RMII_CRSDV Ethernet PHY +56 PD9 MII_RXD0 Ethernet PHY +57 PD10 MII_RXD1 Ethernet PHY +58 PD11 SD_CS Active low: Pulled high +59 PD12 WIRELESS_CS To the NRF24L01 2.4G wireless module +60 PD13 LCD_RS To TFT LCD (CN13) +61 PD14 LCD_WR To TFT LCD (CN13) +62 PD15 LCD_RD To TFT LCD (CN13) -97 PE0 DB00 -98 PE1 DB01 -1 PE2 DB02 -2 PE3 DB03 -3 PE4 DB04 -4 PE5 DB05 -5 PE6 DB06 -38 PE7 DB07 -39 PE8 DB08 -40 PE9 DB09 -41 PE10 DB10 -42 PE11 DB11 -43 PE12 DB12 -44 PE13 DB13 -45 PE14 DB14 -46 PE15 DB15 +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- +97 PE0 DB00 To TFT LCD (CN13) +98 PE1 DB01 To TFT LCD (CN13) +1 PE2 DB02 To TFT LCD (CN13) +2 PE3 DB03 To TFT LCD (CN13) +3 PE4 DB04 To TFT LCD (CN13) +4 PE5 DB05 To TFT LCD (CN13) +5 PE6 DB06 To TFT LCD (CN13) +38 PE7 DB07 To TFT LCD (CN13) +39 PE8 DB08 To TFT LCD (CN13) +40 PE9 DB09 To TFT LCD (CN13) +41 PE10 DB10 To TFT LCD (CN13) +42 PE11 DB11 To TFT LCD (CN13) +43 PE12 DB12 To TFT LCD (CN13) +44 PE13 DB13 To TFT LCD (CN13) +45 PE14 DB14 To TFT LCD (CN13) +46 PE15 DB15 To TFT LCD (CN13) +-- ---- -------------- ------------------------------------------------------------------- +PN NAME SIGNAL NOTES +-- ---- -------------- ------------------------------------------------------------------- 73 N/C 12 OSC_IN Y2 25Mhz XTAL @@ -155,7 +173,6 @@ STM32F107VCT Pin Usage 19 VSSA VSSA 20 VREF- VREF- - Development Environment ======================= diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h new file mode 100644 index 0000000000..6a71bd89fa --- /dev/null +++ b/nuttx/configs/shenzhou/include/board.h @@ -0,0 +1,354 @@ +/************************************************************************************ + * configs/shenzhou/include/board.h + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#ifndef __ASSEMBLY__ +# include +#endif +#include "stm32_rcc.h" +#include "stm32_sdio.h" +#include "stm32_internal.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#define BOARD_CFGR_MCO_SOURCE RCC_CFGR_PLL3CLK + +/* Clocking *************************************************************************/ + +/* On-board crystal frequency is 25MHz (HSE) */ + +#define STM32_BOARD_XTAL 25000000ul +#define STM32_PLL_FREQUENCY (72000000) +#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY + +#define STM32_HCLK_FREQUENCY STM32_PLL_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */ + +/* APB2 clock (PCLK2) is HCLK (72MHz) */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK +#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY +#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 2-7, 12-14 */ + +/* APB2 timers 1 and 8 will receive PCLK2. */ + +#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) + +/* APB1 clock (PCLK1) is HCLK/2 (36MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +/* APB1 timers 2-4 will be twice PCLK1 (I presume the remaining will receive PCLK1) */ + +#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM5_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (STM32_PCLK1_FREQUENCY) + +/* LED definitions ******************************************************************/ +/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any + * way. The following definitions are used to access individual LEDs. + */ + +/* LED index values for use with stm32_setled() */ + +#define BOARD_LED1 0 +#define BOARD_LED2 1 +#define BOARD_LED3 2 +#define BOARD_LED4 3 +#define BOARD_NLEDS 4 + +/* LED bits for use with stm32_setleds() */ + +#define BOARD_LED1_BIT (1 << BOARD_LED1) +#define BOARD_LED2_BIT (1 << BOARD_LED2) +#define BOARD_LED3_BIT (1 << BOARD_LED3) +#define BOARD_LED4_BIT (1 << BOARD_LED4) + +/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on board the + * STM3240G-EVAL. The following definitions describe how NuttX controls the LEDs: + */ + +#define LED_STARTED 0 /* LED1 */ +#define LED_HEAPALLOCATE 1 /* LED2 */ +#define LED_IRQSENABLED 2 /* LED1 + LED2 */ +#define LED_STACKCREATED 3 /* LED3 */ +#define LED_INIRQ 4 /* LED1 + LED3 */ +#define LED_SIGNAL 5 /* LED2 + LED3 */ +#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */ +#define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */ + +/* Button definitions ***************************************************************/ +/* The STM3240G-EVAL supports three buttons: */ + +#define BUTTON_KEY1 0 /* Name printed on board */ +#define BUTTON_KEY2 1 +#define BUTTON_KEY3 2 +#define BUTTON_KEY4 3 +#define NUM_BUTTONS 4 + +#define BUTTON_USERKEY2 BUTTON_KEY1 /* Names in schematic */ +#define BUTTON_USERKEY BUTTON_KEY2 +#define BUTTON_TAMPER BUTTON_KEY3 +#define BUTTON_WAKEUP BUTTON_KEY4 + +#define BUTTON_KEY1_BIT (1 << BUTTON_KEY1) +#define BUTTON_KEY2_BIT (1 << BUTTON_KEY2) +#define BUTTON_KEY3_BIT (1 << BUTTON_KEY3) +#define BUTTON_KEY4_BIT (1 << BUTTON_KEY4) + +#define BUTTON_USERKEY2_BIT BUTTON_KEY1_BIT +#define BUTTON_USERKEY_BIT BUTTON_KEY2_BIT +#define BUTTON_TAMPER_BIT BUTTON_KEY3_BIT +#define BUTTON_WAKEUP_BIT BUTTON_KEY4_BIT + +/* Pin selections ******************************************************************/ +/* Ethernet + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 24 PA1 MII_RX_CLK Ethernet PHY + * RMII_REF_CLK Ethernet PHY + * 25 PA2 MII_MDIO Ethernet PHY + * 48 PB11 MII_TX_EN Ethernet PHY + * 51 PB12 MII_TXD0 Ethernet PHY + * 52 PB13 MII_TXD1 Ethernet PHY + * 16 PC1 MII_MDC Ethernet PHY + * 34 PC5 MII_INT Ethernet PHY + * 55 PD8 MII_RX_DV Ethernet PHY. Requires CONFIG_STM32_ETH_REMAP + * 55 PD8 RMII_CRSDV Ethernet PHY. Requires CONFIG_STM32_ETH_REMAP + * 56 PD9 MII_RXD0 Ethernet PHY. Requires CONFIG_STM32_ETH_REMAP + * 57 PD10 MII_RXD1 Ethernet PHY. Requires CONFIG_STM32_ETH_REMAP + * + * 67 PA8 MCO DM9161AEP + */ + +#ifdef CONFIG_STM32_ETHMAC +# ifndef CONFIG_STM32_ETH_REMAP +# error "STM32 Ethernet requires CONFIG_STM32_ETH_REMAP" +# endif +# ifndef CONFIG_STM32_MII +# error "STM32 Ethernet requires CONFIG_STM32_MII" +# endif +# ifndef CONFIG_STM32_MII_MCO +# error "STM32 Ethernet requires CONFIG_STM32_MII_MCO" +# endif +#endif + +/* USB + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 68 PA9 USB_VBUS MINI-USB-AB. JP3 + * 69 PA10 USB_ID MINI-USB-AB. JP5 + * 70 PA11 USB_DM MINI-USB-AB + * 71 PA12 USB_DP MINI-USB-AB + * 95 PB8 USB_PWR Drives USB VBUS + */ + +/* UARTS/USARTS + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 68 PA9 USART1_TX MAX3232 to CN5. Requires CONFIG_STM32_USART1_REMAP + * 69 PA10 USART1_RX MAX3232 to CN5. Requires CONFIG_STM32_USART1_REMAP + * 86 PD5 USART2_TX MAX3232 to CN6. Requires CONFIG_STM32_USART2_REMAP + * 87 PD6 USART2_RX MAX3232 to CN6. Requires CONFIG_STM32_USART2_REMAP + * 86 PD5 485_TX Same as USART2_TX but goes to SP3485 + * 87 PD6 485_RX Save as USART2_RX but goes to SP3485 (see JP4) + */ + +#if defined(CONFIG_STM32_USART1) && !defined(CONFIG_STM32_USART1_REMAP) +# error "CONFIG_STM32_USART1 requires CONFIG_STM32_USART1_REMAP" +#endif + +#if defined(CONFIG_STM32_USART2) && !defined(CONFIG_STM32_USART2_REMAP) +# error "CONFIG_STM32_USART2 requires CONFIG_STM32_USART2_REMAP" +#endif + +/* SPI + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 30 PA5 SPI1_SCK To the SD card, SPI FLASH. + * Requires !CONFIG_STM32_SPI1_REMAP + * 31 PA6 SPI1_MISO To the SD card, SPI FLASH. + * Requires !CONFIG_STM32_SPI1_REMAP + * 32 PA7 SPI1_MOSI To the SD card, SPI FLASH. + * Requires !CONFIG_STM32_SPI1_REMAP + * 78 PC10 SPI3_SCK To TFT LCD (CN13), the NRF24L01 2.4G wireless module. + * Requires CONFIG_STM32_SPI3_REMAP. + * 79 PC11 SPI3_MISO To TFT LCD (CN13), the NRF24L01 2.4G wireless module. + * Requires CONFIG_STM32_SPI3_REMAP. + * 80 PC12 SPI3_MOSI To TFT LCD (CN13), the NRF24L01 2.4G wireless module. + * Requires CONFIG_STM32_SPI3_REMAP. + */ + +#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP) +# error "CONFIG_STM32_SPI1 must not have CONFIG_STM32_SPI1_REMAP" +#endif + +#if defined(CONFIG_STM32_SPI3) && !defined(CONFIG_STM32_SPI3_REMAP) +# error "CONFIG_STM32_SPI3 requires CONFIG_STM32_SPI3_REMAP" +#endif + +/* DAC + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 29 PA4 DAC_OUT1 To CON5(CN14) + * 30 PA5 DAC_OUT2 To CON5(CN14). JP10 + */ + +/* ADC + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 35 PB0 ADC_IN1 GPIO_ADC12_IN8. To CON5(CN14) + * 36 PB1 ADC_IN2 GPIO_ADC12_IN9. To CON5(CN14) + * 15 PC0 POTENTIO_METER GPIO_ADC12_IN10 + */ + +/* CAN + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 91 PB5 CAN2_RX Requires CONFIG_STM32_CAN2_REMAP. + * 92 PB6 CAN2_TX Requires CONFIG_STM32_CAN2_REMAP. See also JP11 + * 81 PD0 CAN1_RX Requires CONFIG_STM32_CAN1_REMAP2. + * 82 PD1 CAN1_TX Requires CONFIG_STM32_CAN1_REMAP2. + */ + +#if defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN1_REMAP2) +# error "CONFIG_STM32_CAN1 requires CONFIG_STM32_CAN1_REMAP2" +#endif + +#if defined(CONFIG_STM32_CAN2) && !defined(CONFIG_STM32_CAN2_REMAP) +# error "CONFIG_STM32_CAN2 requires CONFIG_STM32_CAN2_REMAP" +#endif + +/* I2C + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 92 PB6 I2C1_SCL Requires !CONFIG_STM32_I2C1_REMAP + * 93 PB7 I2C1_SDA + */ + +#if defined(CONFIG_STM32_I2C1) && defined(CONFIG_STM32_I2C1_REMAP) +# error "CONFIG_STM32_I2C1 must not have CONFIG_STM32_I2C1_REMAP" +#endif + +/* I2S + * + * -- ---- -------------- ---------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ---------------------------------------------------------- + * 51 PB12 I2S_WS GPIO_I2S2_WS. Audio DAC + * 52 PB13 I2S_CK GPIO_I2S2_CK. Audio DAC + * 54 PB15 I2S_DIN ??? Audio DAC data in. + * 63 PC6 I2S_MCK GPIO_I2S2_MCK. Audio DAC. Active low: Pulled high + */ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void); + +/************************************************************************************ + * Name: stm32_board_clockconfig + * + * Description: + * Any STM32 board may replace the "standard" board clock configuration logic with + * its own, custom clock cofiguration logic. + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG +void stm32_board_clockconfig(void); +#endif + +/************************************************************************************ + * Name: stm32_selectrmii + * + * Description: + * Selects the RMII inteface. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ************************************************************************************/ + +static inline void stm32_selectrmii(void) +{ + uint32_t regval; + + regval = getreg32(STM32_AFIO_MAPR); + regval |= AFIO_MAPR_MII_RMII_SEL; + putreg32(regval, STM32_AFIO_MAPR); +} + diff --git a/nuttx/configs/shenzhou/src/shenzhou-internal.h b/nuttx/configs/shenzhou/src/shenzhou-internal.h new file mode 100644 index 0000000000..1d63df0aee --- /dev/null +++ b/nuttx/configs/shenzhou/src/shenzhou-internal.h @@ -0,0 +1,260 @@ +/**************************************************************************************************** + * configs/shenzhou/src/shenzhou-internal.h + * arch/arm/src/board/shenzhou-internal.n + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************************/ + +#ifndef __CONFIGS_SHENZHOUL_SRC_SHENZHOU_INTERNAL_H +#define __CONFIGS_SHENZHOUL_SRC_SHENZHOU_INTERNAL_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include +#include +#include + +/**************************************************************************************************** + * Definitions + ****************************************************************************************************/ +/* Configuration ************************************************************************************/ +/* How many SPI modules does this chip support? */ + +#if STM32_NSPI < 1 +# undef CONFIG_STM32_SPI1 +# undef CONFIG_STM32_SPI2 +# undef CONFIG_STM32_SPI3 +#elif STM32_NSPI < 2 +# undef CONFIG_STM32_SPI2 +# undef CONFIG_STM32_SPI3 +#elif STM32_NSPI < 3 +# undef CONFIG_STM32_SPI3 +#endif + +/* Shenzhou GPIO Configuration **********************************************************************/ + +/* STM3240G-EVAL GPIOs ******************************************************************************/ +/* Wireless + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 26 PA3 315M_VT + * 17 PC2 WIRELESS_INT + * 18 PC3 WIRELESS_CE To the NRF24L01 2.4G wireless module + * 59 PD12 WIRELESS_CS To the NRF24L01 2.4G wireless module + */ + +/* To be provided */ + +/* Buttons + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 23 PA0 WAKEUP Connected to KEY4. Active low: Closing KEY4 pulls WAKEUP to ground. + * 47 PB10 USERKEY Connected to KEY2 + * 33 PC4 USERKEY2 Connected to KEY1 + * 7 PC13 TAMPER Connected to KEY3 + */ + +/* BUTTONS -- NOTE that all have EXTI interrupts configured */ + +#define MIN_IRQBUTTON BUTTON_KEY1 +#define MAX_IRQBUTTON BUTTON_KEY4 +#define NUM_IRQBUTTONS (BUTTON_KEY4 - BUTTON_KEY1 + 1) + +#define GPIO_BTN_WAKEUP (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0) +#define GPIO_BTN_USERKEY (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10) +#define GPIO_BTN_USERKEY2 (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN4) +#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13) + +/* LEDs + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 83 PD2 LED1 Active low: Pulled high + * 84 PD3 LED2 Active low: Pulled high + * 85 PD4 LED3 Active low: Pulled high + * 88 PD7 LED4 Active low: Pulled high + */ + +#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN2) +#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN3) +#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN4) +#define GPIO_LED4 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN5) + +/* TFT LCD + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 37 PB2 DATA_LE To TFT LCD (CN13) + * 96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI FLASH + * 34 PC5 TP_INT JP6. To TFT LCD (CN13) module + * 65 PC8 LCD_CS Active low: Pulled high + * 66 PC9 TP_CS Active low: Pulled high + * 60 PD13 LCD_RS To TFT LCD (CN13) + * 61 PD14 LCD_WR To TFT LCD (CN13) + * 62 PD15 LCD_RD To TFT LCD (CN13) + * 97 PE0 DB00 To TFT LCD (CN13) + * 98 PE1 DB01 To TFT LCD (CN13) + * 1 PE2 DB02 To TFT LCD (CN13) + * 2 PE3 DB03 To TFT LCD (CN13) + * 3 PE4 DB04 To TFT LCD (CN13) + * 4 PE5 DB05 To TFT LCD (CN13) + * 5 PE6 DB06 To TFT LCD (CN13) + * 38 PE7 DB07 To TFT LCD (CN13) + * 39 PE8 DB08 To TFT LCD (CN13) + * 40 PE9 DB09 To TFT LCD (CN13) + * 41 PE10 DB10 To TFT LCD (CN13) + * 42 PE11 DB11 To TFT LCD (CN13) + * 43 PE12 DB12 To TFT LCD (CN13) + * 44 PE13 DB13 To TFT LCD (CN13) + * 45 PE14 DB14 To TFT LCD (CN13) + * 46 PE15 DB15 To TFT LCD (CN13) + */ + +/* To be provided */ + +/* RS-485 + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 88 PD7 485_DIR SP3485 read enable (not) + */ + +/* To be provided */ + +/* USB + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 95 PB8 USB_PWR Drives USB VBUS + */ + +#define GPIO_USB_PWR (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) + +/* Audio DAC + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + */ + +/* To be provided */ + +/* SPI FLASH + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI FLASH + */ + +#define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) + +/* SD Card + * + * -- ---- -------------- ------------------------------------------------------------------- + * PN NAME SIGNAL NOTES + * -- ---- -------------- ------------------------------------------------------------------- + * 53 PB14 SD_CD Active low: Pulled high + * 58 PD11 SD_CS + */ + +#define GPIO_SD_CD (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN14) +#define GPIO_SD_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN11) + +/**************************************************************************************************** + * Public Types + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public data + ****************************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************************************** + * Public Functions + ****************************************************************************************************/ + +/**************************************************************************************************** + * Name: stm32_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL board. + * + ****************************************************************************************************/ + +void weak_function stm32_spiinitialize(void); + +/**************************************************************************************************** + * Name: stm32_usbinitialize + * + * Description: + * Called from stm32_usbinitialize very early in inialization to setup USB-related GPIO pins for + * the STM3240G-EVAL board. + * + ****************************************************************************************************/ + +#ifdef CONFIG_STM32_OTGFS +void weak_function stm32_usbinitialize(void); +#endif + +/**************************************************************************************************** + * Name: stm32_usbhost_initialize + * + * Description: + * Called at application startup time to initialize the USB host functionality. This function will + * start a thread that will monitor for device connection/disconnection events. + * + ****************************************************************************************************/ + +#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST) +int stm32_usbhost_initialize(void); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_SHENZHOUL_SRC_SHENZHOU_INTERNAL_H */ From 5ac18ce1ae269e22de2515531b63b93b075dea3b Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Sep 2012 23:34:16 +0000 Subject: [PATCH 31/95] More support for the Shenzhou board git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5110 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/shenzhou/README.txt | 14 +- nuttx/configs/shenzhou/include/board.h | 16 + nuttx/configs/shenzhou/scripts/ld.script | 106 +++++ nuttx/configs/shenzhou/scripts/ld.script.dfu | 106 +++++ nuttx/configs/shenzhou/src/Makefile | 122 ++++++ .../configs/shenzhou/src/shenzhou-internal.h | 8 +- nuttx/configs/shenzhou/src/up_autoleds.c | 401 ++++++++++++++++++ nuttx/configs/shenzhou/src/up_boot.c | 102 +++++ nuttx/configs/shenzhou/src/up_buttons.c | 169 ++++++++ nuttx/configs/shenzhou/src/up_can.c | 133 ++++++ nuttx/configs/shenzhou/src/up_composite.c | 163 +++++++ nuttx/configs/shenzhou/src/up_cxxinitialize.c | 155 +++++++ nuttx/configs/shenzhou/src/up_leds.c | 401 ++++++++++++++++++ nuttx/configs/shenzhou/src/up_nsh.c | 218 ++++++++++ nuttx/configs/shenzhou/src/up_spi.c | 204 +++++++++ nuttx/configs/shenzhou/src/up_usb.c | 294 +++++++++++++ nuttx/configs/shenzhou/src/up_usbmsc.c | 159 +++++++ nuttx/configs/shenzhou/src/up_userleds.c | 131 ++++++ nuttx/configs/shenzhou/src/up_watchdog.c | 136 ++++++ nuttx/configs/stm3210e-eval/RIDE/appconfig | 2 +- nuttx/configs/stm3210e-eval/RIDE/setenv.sh | 2 +- .../configs/stm3210e-eval/RIDE/stm32-nuttx.ld | 2 +- nuttx/configs/stm3210e-eval/buttons/appconfig | 2 +- nuttx/configs/stm3210e-eval/buttons/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/nsh/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/nsh2/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/nx/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/nxlines/appconfig | 2 +- nuttx/configs/stm3210e-eval/nxlines/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/nxtext/appconfig | 2 +- nuttx/configs/stm3210e-eval/nxtext/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/ostest/appconfig | 2 +- nuttx/configs/stm3210e-eval/ostest/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/pm/setenv.sh | 2 +- nuttx/configs/stm3210e-eval/src/up_buttons.c | 2 +- .../configs/stm3210e-eval/src/up_composite.c | 2 +- .../stm3210e-eval/src/up_deselectlcd.c | 2 +- .../stm3210e-eval/src/up_deselectnor.c | 2 +- .../stm3210e-eval/src/up_deselectsram.c | 2 +- .../configs/stm3210e-eval/src/up_extcontext.c | 2 +- nuttx/configs/stm3210e-eval/src/up_extmem.c | 2 +- nuttx/configs/stm3210e-eval/src/up_lm75.c | 2 +- nuttx/configs/stm3210e-eval/src/up_nsh.c | 2 +- .../configs/stm3210e-eval/src/up_selectlcd.c | 2 +- .../configs/stm3210e-eval/src/up_selectnor.c | 2 +- .../configs/stm3210e-eval/src/up_selectsram.c | 2 +- nuttx/configs/stm3210e-eval/src/up_spi.c | 2 +- nuttx/configs/stm3210e-eval/src/up_usbdev.c | 2 +- nuttx/configs/stm3210e-eval/src/up_usbmsc.c | 2 +- .../configs/stm3210e-eval/usbserial/appconfig | 2 +- .../configs/stm3210e-eval/usbserial/setenv.sh | 2 +- .../stm3210e-eval/usbstorage/appconfig | 2 +- .../stm3210e-eval/usbstorage/setenv.sh | 2 +- nuttx/configs/stm3220g-eval/dhcpd/appconfig | 2 +- .../configs/stm3220g-eval/src/up_selectlcd.c | 2 +- nuttx/configs/stm3240g-eval/dhcpd/appconfig | 2 +- .../stm3240g-eval/src/up_deselectlcd.c | 2 +- .../configs/stm3240g-eval/src/up_selectlcd.c | 2 +- nuttx/configs/stm3240g-eval/src/up_userleds.c | 4 +- 59 files changed, 3064 insertions(+), 56 deletions(-) create mode 100644 nuttx/configs/shenzhou/scripts/ld.script create mode 100644 nuttx/configs/shenzhou/scripts/ld.script.dfu create mode 100644 nuttx/configs/shenzhou/src/Makefile create mode 100644 nuttx/configs/shenzhou/src/up_autoleds.c create mode 100644 nuttx/configs/shenzhou/src/up_boot.c create mode 100644 nuttx/configs/shenzhou/src/up_buttons.c create mode 100644 nuttx/configs/shenzhou/src/up_can.c create mode 100644 nuttx/configs/shenzhou/src/up_composite.c create mode 100644 nuttx/configs/shenzhou/src/up_cxxinitialize.c create mode 100644 nuttx/configs/shenzhou/src/up_leds.c create mode 100644 nuttx/configs/shenzhou/src/up_nsh.c create mode 100644 nuttx/configs/shenzhou/src/up_spi.c create mode 100644 nuttx/configs/shenzhou/src/up_usb.c create mode 100644 nuttx/configs/shenzhou/src/up_usbmsc.c create mode 100644 nuttx/configs/shenzhou/src/up_userleds.c create mode 100644 nuttx/configs/shenzhou/src/up_watchdog.c diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index 72e4c80080..c87ccb1ca7 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -662,19 +662,9 @@ Shenzhou-specific Configuration Options For the Shenzhou board, the edge next to the row of buttons is used as the top of the display in this orientation. CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" - orientation support. In this orientation, the STM3210E-EVAL's - LCD ribbon cable is at the bottom of the display. Default is - 320x240 "landscape" orientation. - In this orientation, the top of the display is to the left - of the buttons (if the board is held so that the buttons are at the - botton of the board). + orientation support. CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse - portrait" orientation support. In this orientation, the - STM3210E-EVAL's LCD ribbon cable is at the top of the display. - Default is 320x240 "landscape" orientation. - In this orientation, the top of the display is to the right - of the buttons (if the board is held so that the buttons are at the - botton of the board). + portrait" orientation support. CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears to be a shift in the returned data. This value fixes the offset. Default 5. diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h index 6a71bd89fa..026a6adab2 100644 --- a/nuttx/configs/shenzhou/include/board.h +++ b/nuttx/configs/shenzhou/include/board.h @@ -329,6 +329,22 @@ void stm32_boardinitialize(void); void stm32_board_clockconfig(void); #endif +/************************************************************************************ + * Name: stm32_ledinit, stm32_setled, and stm32_setleds + * + * Description: + * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If + * CONFIG_ARCH_LEDS is not defined, then the following interfacesare available to + * control the LEDs from user applications. + * + ************************************************************************************/ + +#ifndef CONFIG_ARCH_LEDS +EXTERN void stm32_ledinit(void); +EXTERN void stm32_setled(int led, bool ledon); +EXTERN void stm32_setleds(uint8_t ledset); +#endif + /************************************************************************************ * Name: stm32_selectrmii * diff --git a/nuttx/configs/shenzhou/scripts/ld.script b/nuttx/configs/shenzhou/scripts/ld.script new file mode 100644 index 0000000000..5630b38df7 --- /dev/null +++ b/nuttx/configs/shenzhou/scripts/ld.script @@ -0,0 +1,106 @@ +/**************************************************************************** + * configs/shenzhou/scripts/ld.script + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 256K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K + +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); + + /* The STM32F107VC has 64Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .ARM.extab : { + *(.ARM.extab*) + } >sram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } >sram + __exidx_end = ABSOLUTE(.); + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/nuttx/configs/shenzhou/scripts/ld.script.dfu b/nuttx/configs/shenzhou/scripts/ld.script.dfu new file mode 100644 index 0000000000..b1d41e0abf --- /dev/null +++ b/nuttx/configs/shenzhou/scripts/ld.script.dfu @@ -0,0 +1,106 @@ +/**************************************************************************** + * configs/shenzhou/scripts/ld.script.dfu + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* Don't know if this is correct. Just 256K-48K (not testet) */ +MEMORY +{ + flash (rx) : ORIGIN = 0x08003000, LENGTH = 208K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); + + /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .ARM.extab : { + *(.ARM.extab*) + } >sram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } >sram + __exidx_end = ABSOLUTE(.); + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/nuttx/configs/shenzhou/src/Makefile b/nuttx/configs/shenzhou/src/Makefile new file mode 100644 index 0000000000..e588cddde7 --- /dev/null +++ b/nuttx/configs/shenzhou/src/Makefile @@ -0,0 +1,122 @@ +############################################################################ +# configs/shenzhou/src/Makefile +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +CFLAGS += -I$(TOPDIR)/sched + +ASRCS = +AOBJS = $(ASRCS:.S=$(OBJEXT)) + +CSRCS = up_boot.c up_spi.c + +ifeq ($(CONFIG_HAVE_CXX),y) +CSRCS += up_cxxinitialize.c +endif + +ifeq ($(CONFIG_ARCH_LEDS),y) +CSRCS += up_autoleds.c +else +CSRCS += up_userleds.c + +ifeq ($(CONFIG_ARCH_BUTTONS),y) +CSRCS += up_buttons.c +endif + +ifeq ($(CONFIG_STM32_OTGFS),y) +CSRCS += up_usb.c +endif + +ifeq ($(CONFIG_NSH_ARCHINIT),y) +CSRCS += up_nsh.c +endif + +ifeq ($(CONFIG_USBMSC),y) +CSRCS += up_usbmsc.c +endif + +ifeq ($(CONFIG_USBDEV_COMPOSITE),y) +CSRCS += up_composite.c +endif + +ifeq ($(CONFIG_CAN),y) +CSRCS += up_can.c +endif + +ifeq ($(CONFIG_WATCHDOG),y) +CSRCS += up_watchdog.c +endif + +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src +ifeq ($(WINTOOL),y) + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}" +else + CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m +endif + +all: libboard$(LIBEXT) + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +libboard$(LIBEXT): $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $@, $${obj}); \ + done ; ) + +.depend: Makefile $(SRCS) + @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/nuttx/configs/shenzhou/src/shenzhou-internal.h b/nuttx/configs/shenzhou/src/shenzhou-internal.h index 1d63df0aee..2b490b1877 100644 --- a/nuttx/configs/shenzhou/src/shenzhou-internal.h +++ b/nuttx/configs/shenzhou/src/shenzhou-internal.h @@ -76,7 +76,8 @@ * 59 PD12 WIRELESS_CS To the NRF24L01 2.4G wireless module */ -/* To be provided */ +#define GPIO_WIRELESS_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN12) /* Buttons * @@ -151,7 +152,8 @@ * 46 PE15 DB15 To TFT LCD (CN13) */ -/* To be provided */ +#define GPIO_LCD_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) /* RS-485 * @@ -171,7 +173,7 @@ * 95 PB8 USB_PWR Drives USB VBUS */ -#define GPIO_USB_PWR (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) /* Audio DAC * diff --git a/nuttx/configs/shenzhou/src/up_autoleds.c b/nuttx/configs/shenzhou/src/up_autoleds.c new file mode 100644 index 0000000000..996836c792 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_autoleds.c @@ -0,0 +1,401 @@ +/**************************************************************************** + * configs/shenzhou/src/up_autoleds.c + * arch/arm/src/board/up_autoleds.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32_internal.h" +#include "shenzhou-internal.h" + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG with + * CONFIG_DEBUG_VERBOSE too) + */ + +#undef LED_DEBUG /* Define to enable debug */ + +#ifdef LED_DEBUG +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/* The following definitions map the encoded LED setting to GPIO settings */ + +#define SHENZHOU_LED1 (1 << 0) +#define SHENZHOU_LED2 (1 << 1) +#define SHENZHOU_LED3 (1 << 2) +#define SHENZHOU_LED4 (1 << 3) + +#define ON_SETBITS_SHIFT (0) +#define ON_CLRBITS_SHIFT (4) +#define OFF_SETBITS_SHIFT (8) +#define OFF_CLRBITS_SHIFT (12) + +#define ON_BITS(v) ((v) & 0xff) +#define OFF_BITS(v) (((v) >> 8) & 0x0ff) +#define SETBITS(b) ((b) & 0x0f) +#define CLRBITS(b) (((b) >> 4) & 0x0f) + +#define ON_SETBITS(v) (SETBITS(ON_BITS(v)) +#define ON_CLRBITS(v) (CLRBITS(ON_BITS(v)) +#define OFF_SETBITS(v) (SETBITS(OFF_BITS(v)) +#define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v)) + +#define LED_STARTED_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) +#define LED_STARTED_ON_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_STARTED_OFF_SETBITS (0 << OFF_SETBITS_SHIFT) +#define LED_STARTED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_HEAPALLOCATE_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_HEAPALLOCATE_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_HEAPALLOCATE_OFF_SETBITS ((SHENZHOU_LED1) << OFF_SETBITS_SHIFT) +#define LED_HEAPALLOCATE_OFF_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_IRQSENABLED_ON_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_IRQSENABLED_ON_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_IRQSENABLED_OFF_SETBITS ((SHENZHOU_LED2) << OFF_SETBITS_SHIFT) +#define LED_IRQSENABLED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_STACKCREATED_ON_SETBITS ((SHENZHOU_LED3) << ON_SETBITS_SHIFT) +#define LED_STACKCREATED_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_STACKCREATED_OFF_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << OFF_SETBITS_SHIFT) +#define LED_STACKCREATED_OFF_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_INIRQ_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) +#define LED_INIRQ_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_INIRQ_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_INIRQ_OFF_CLRBITS ((SHENZHOU_LED1) << OFF_CLRBITS_SHIFT) + +#define LED_SIGNAL_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_SIGNAL_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_SIGNAL_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_SIGNAL_OFF_CLRBITS ((SHENZHOU_LED2) << OFF_CLRBITS_SHIFT) + +#define LED_ASSERTION_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) +#define LED_ASSERTION_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_ASSERTION_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_ASSERTION_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_PANIC_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) +#define LED_PANIC_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_PANIC_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_PANIC_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +/************************************************************************************** + * Private Function Protototypes + **************************************************************************************/ + +/* LED State Controls */ + +static inline void led_clrbits(unsigned int clrbits); +static inline void led_setbits(unsigned int setbits); +static void led_setonoff(unsigned int bits); + +/* LED Power Management */ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const uint16_t g_ledbits[8] = +{ + (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + + (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + + (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + + (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + + (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | + LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), + + (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | + LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), + + (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | + LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), + + (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | + LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) +}; + +#ifdef CONFIG_PM +static struct pm_callback_s g_ledscb = +{ + .notify = led_pm_notify, + .prepare = led_pm_prepare, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: led_clrbits + * + * Description: + * Clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_clrbits(unsigned int clrbits) +{ + if ((clrbits & SHENZHOU_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, false); + } + + if ((clrbits & SHENZHOU_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, false); + } + + if ((clrbits & SHENZHOU_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, false); + } + + if ((clrbits & SHENZHOU_LED4) != 0) + { + stm32_gpiowrite(GPIO_LED4, false); + } +} + +/**************************************************************************** + * Name: led_setbits + * + * Description: + * Set all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_setbits(unsigned int setbits) +{ + if ((setbits & SHENZHOU_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, true); + } + + if ((setbits & SHENZHOU_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, true); + } + + if ((setbits & SHENZHOU_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, true); + } + + if ((setbits & SHENZHOU_LED4) != 0) + { + stm32_gpiowrite(GPIO_LED4, true); + } +} + +/**************************************************************************** + * Name: led_setonoff + * + * Description: + * Set/clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static void led_setonoff(unsigned int bits) +{ + led_clrbits(CLRBITS(bits)); + led_setbits(SETBITS(bits)); +} + +/**************************************************************************** + * Name: led_pm_notify + * + * Description: + * Notify the driver of new power state. This callback is called after + * all drivers have had the opportunity to prepare for the new power state. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + switch (pmstate) + { + case(PM_NORMAL): + { + /* Restore normal LEDs operation */ + + } + break; + + case(PM_IDLE): + { + /* Entering IDLE mode - Turn leds off */ + + } + break; + + case(PM_STANDBY): + { + /* Entering STANDBY mode - Logic for PM_STANDBY goes here */ + + } + break; + + case(PM_SLEEP): + { + /* Entering SLEEP mode - Logic for PM_SLEEP goes here */ + + } + break; + + default: + { + /* Should not get here */ + + } + break; + } +} +#endif + +/**************************************************************************** + * Name: led_pm_prepare + * + * Description: + * Request the driver to prepare for a new power state. This is a warning + * that the system is about to enter into a new power state. The driver + * should begin whatever operations that may be required to enter power + * state. The driver may abort the state change mode by returning a + * non-zero value from the callback function. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + /* No preparation to change power modes is required by the LEDs driver. + * We always accept the state change by returning OK. + */ + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_ledinit + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void up_ledinit(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} + +/**************************************************************************** + * Name: up_ledon + ****************************************************************************/ + +void up_ledon(int led) +{ + led_setonoff(ON_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledoff + ****************************************************************************/ + +void up_ledoff(int led) +{ + led_setonoff(OFF_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledpminitialize + ****************************************************************************/ + +#ifdef CONFIG_PM +void up_ledpminitialize(void) +{ + /* Register to receive power management callbacks */ + + int ret = pm_register(&g_ledscb); + if (ret != OK) + { + up_ledon(LED_ASSERTION); + } +} +#endif /* CONFIG_PM */ + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/shenzhou/src/up_boot.c b/nuttx/configs/shenzhou/src/up_boot.c new file mode 100644 index 0000000000..efc4f26bd8 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_boot.c @@ -0,0 +1,102 @@ +/************************************************************************************ + * configs/shenzhou/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "shenzhou-internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function + * stm32_spiinitialize() has been brought into the link. + */ + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI3) + if (stm32_spiinitialize) + { + stm32_spiinitialize(); + } +#endif + + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) + if (stm32_usbinitialize) + { + stm32_usbinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/shenzhou/src/up_buttons.c b/nuttx/configs/shenzhou/src/up_buttons.c new file mode 100644 index 0000000000..3bd0cd5c15 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_buttons.c @@ -0,0 +1,169 @@ +/**************************************************************************** + * configs/shenzhou/src/up_buttons.c + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include "shenzhou-internal.h" + +#ifdef CONFIG_ARCH_BUTTONS + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ +/* Pin configuration for each Shenzhou button. This array is indexed by + * the BUTTON_* definitions in board.h + */ + +static const uint16_t g_buttons[NUM_BUTTONS] = +{ + GPIO_BTN_USERKEY2, GPIO_BTN_USERKEY, GPIO_BTN_TAMPER, GPIO_BTN_WAKEUP +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_buttoninit + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + ****************************************************************************/ + +void up_buttoninit(void) +{ + int i; + + /* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are + * configured for some pins but NOT used in this file + */ + + for (i = 0; i < NUM_BUTTONS; i++) + { + stm32_configgpio(g_buttons[i]); + } +} + +/**************************************************************************** + * Name: up_buttons + ****************************************************************************/ + +uint8_t up_buttons(void) +{ + uint8_t ret = 0; + int i; + + /* Check that state of each key */ + + for (i = 0; i < NUM_BUTTONS; i++) + { + /* A LOW value means that the key is pressed for most keys. The exception + * is the WAKEUP button. + */ + + bool released = stm32_gpioread(g_buttons[i]); + if (i == BUTTON_WAKEUP) + { + released = !released; + } + + /* Accumulate the set of depressed (not released) keys */ + + if (!released) + { + ret |= (1 << i); + } + } + + return ret; +} + +/************************************************************************************ + * Button support. + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + * After up_buttoninit() has been called, up_buttons() may be called to + * collect the state of all buttons. up_buttons() returns an 8-bit bit set + * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT + * definitions in board.h for the meaning of each bit. + * + * up_irqbutton() may be called to register an interrupt handler that will + * be called when a button is depressed or released. The ID value is a + * button enumeration value that uniquely identifies a button resource. See the + * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration + * value. The previous interrupt handler address is returned (so that it may + * restored, if so desired). + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_IRQBUTTONS +xcpt_t up_irqbutton(int id, xcpt_t irqhandler) +{ + xcpt_t oldhandler = NULL; + + /* The following should be atomic */ + + if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON) + { + oldhandler = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler); + } + return oldhandler; +} +#endif +#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/nuttx/configs/shenzhou/src/up_can.c b/nuttx/configs/shenzhou/src/up_can.c new file mode 100644 index 0000000000..6b09be7ca8 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_can.c @@ -0,0 +1,133 @@ +/************************************************************************************ + * configs/shenzhou/src/up_can.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "chip.h" +#include "up_arch.h" + +#include "stm32.h" +#include "stm32_can.h" +#include "shenzhou-internal.h" + +#if defined(CONFIG_CAN) && (defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2)) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration ********************************************************************/ +/* The STM32F107VC supports CAN1 and CAN2 */ + +#define CAN_PORT 1 + +/* Debug ***************************************************************************/ +/* Non-standard debug that may be enabled just for testing CAN */ + +#ifdef CONFIG_DEBUG_CAN +# define candbg dbg +# define canvdbg vdbg +# define canlldbg lldbg +# define canllvdbg llvdbg +#else +# define candbg(x...) +# define canvdbg(x...) +# define canlldbg(x...) +# define canllvdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: can_devinit + * + * Description: + * All STM32 architectures must provide the following interface to work with + * examples/can. + * + ************************************************************************************/ + +int can_devinit(void) +{ + static bool initialized = false; + struct can_dev_s *can; + int ret; + + /* Check if we have already initialized */ + + if (!initialized) + { + /* Call stm32_caninitialize() to get an instance of the CAN interface */ + + can = stm32_caninitialize(CAN_PORT); + if (can == NULL) + { + candbg("ERROR: Failed to get CAN interface\n"); + return -ENODEV; + } + + /* Register the CAN driver at "/dev/can0" */ + + ret = can_register("/dev/can0", can); + if (ret < 0) + { + candbg("ERROR: can_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ + + initialized = true; + } + + return OK; +} + +#endif /* CONFIG_CAN && CONFIG_STM32_CAN1 */ diff --git a/nuttx/configs/shenzhou/src/up_composite.c b/nuttx/configs/shenzhou/src/up_composite.c new file mode 100644 index 0000000000..58f90797b2 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_composite.c @@ -0,0 +1,163 @@ +/**************************************************************************** + * configs/shenzhou/src/up_composite.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include + +#include "stm32_internal.h" + +/* There is nothing to do here if SDIO support is not selected. */ + +#ifdef CONFIG_STM32_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 +# define CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL +# undef STM32_MMCSDSLOTNO +# define STM32_MMCSDSLOTNO 0 +#else + /* Add configuration for new STM32 boards here */ +# error "Unrecognized STM32 board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: composite_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int composite_archinitialize(void) +{ + /* If examples/composite is built as an NSH command, then SD slot should + * already have been initized in nsh_archinitialize() (see up_nsh.c). In + * this case, there is nothing further to be done here. + * + * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH + * was built. + */ + +#ifndef CONFIG_NSH_BUILTIN_APPS + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("composite_archinitialize: Initializing SDIO slot %d\n", + STM32_MMCSDSLOTNO); + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + message("composite_archinitialize: Failed to initialize SDIO slot %d\n", + STM32_MMCSDSLOTNO); + return -ENODEV; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + message("composite_archinitialize: Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1, sdio); + if (ret != OK) + { + message("composite_archinitialize: Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + message("composite_archinitialize: Successfully bound SDIO to the MMC/SD driver\n"); + + /* Then let's guess and say that there is a card in the slot. I need to check to + * see if the STM3210E-EVAL board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + +#endif /* CONFIG_NSH_BUILTIN_APPS */ + + return OK; +} + +#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/shenzhou/src/up_cxxinitialize.c b/nuttx/configs/shenzhou/src/up_cxxinitialize.c new file mode 100644 index 0000000000..406827dbf8 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_cxxinitialize.c @@ -0,0 +1,155 @@ +/************************************************************************************ + * configs/shenzhou/src/up_cxxinitialize.c + * arch/arm/src/board/up_cxxinitialize.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include +#include "chip.h" + +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Debug ****************************************************************************/ +/* Non-standard debug that may be enabled just for testing the static constructors */ + +#ifndef CONFIG_DEBUG +# undef CONFIG_DEBUG_CXX +#endif + +#ifdef CONFIG_DEBUG_CXX +# define cxxdbg dbg +# define cxxlldbg lldbg +# ifdef CONFIG_DEBUG_VERBOSE +# define cxxvdbg vdbg +# define cxxllvdbg llvdbg +# else +# define cxxvdbg(x...) +# define cxxllvdbg(x...) +# endif +#else +# define cxxdbg(x...) +# define cxxlldbg(x...) +# define cxxvdbg(x...) +# define cxxllvdbg(x...) +#endif + +/************************************************************************************ + * Private Types + ************************************************************************************/ +/* This type defines one entry in initialization array */ + +typedef void (*initializer_t)(void); + +/************************************************************************************ + * External references + ************************************************************************************/ +/* _sinit and _einit are symbols exported by the linker script that mark the + * beginning and the end of the C++ initialization section. + */ + +extern initializer_t _sinit; +extern initializer_t _einit; + +/* _stext and _etext are symbols exported by the linker script that mark the + * beginning and the end of text. + */ + +extern uint32_t _stext; +extern uint32_t _etext; + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/**************************************************************************** + * Name: up_cxxinitialize + * + * Description: + * If C++ and C++ static constructors are supported, then this function + * must be provided by board-specific logic in order to perform + * initialization of the static C++ class instances. + * + * This function should then be called in the application-specific + * user_start logic in order to perform the C++ initialization. NOTE + * that no component of the core NuttX RTOS logic is involved; This + * function defintion only provides the 'contract' between application + * specific C++ code and platform-specific toolchain support + * + ***************************************************************************/ + +void up_cxxinitialize(void) +{ + initializer_t *initp; + + cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); + + /* Visit each entry in the initialzation table */ + + for (initp = &_sinit; initp != &_einit; initp++) + { + initializer_t initializer = *initp; + cxxdbg("initp: %p initializer: %p\n", initp, initializer); + + /* Make sure that the address is non-NULL and lies in the text region + * defined by the linker script. Some toolchains may put NULL values + * or counts in the initialization table + */ + + if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext) + { + cxxdbg("Calling %p\n", initializer); + initializer(); + } + } +} + +#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ + diff --git a/nuttx/configs/shenzhou/src/up_leds.c b/nuttx/configs/shenzhou/src/up_leds.c new file mode 100644 index 0000000000..c7ce0b909c --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_leds.c @@ -0,0 +1,401 @@ +/**************************************************************************** + * configs/shenzhou/src/up_leds.c + * arch/arm/src/board/up_leds.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32_internal.h" +#include "shenzhou-internal.h" + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG with + * CONFIG_DEBUG_VERBOSE too) + */ + +#undef LED_DEBUG /* Define to enable debug */ + +#ifdef LED_DEBUG +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/* The following definitions map the encoded LED setting to GPIO settings */ + +#define SHENZHOU_LED1 (1 << 0) +#define SHENZHOU_LED2 (1 << 1) +#define SHENZHOU_LED3 (1 << 2) +#define SHENZHOU_LED4 (1 << 3) + +#define ON_SETBITS_SHIFT (0) +#define ON_CLRBITS_SHIFT (4) +#define OFF_SETBITS_SHIFT (8) +#define OFF_CLRBITS_SHIFT (12) + +#define ON_BITS(v) ((v) & 0xff) +#define OFF_BITS(v) (((v) >> 8) & 0x0ff) +#define SETBITS(b) ((b) & 0x0f) +#define CLRBITS(b) (((b) >> 4) & 0x0f) + +#define ON_SETBITS(v) (SETBITS(ON_BITS(v)) +#define ON_CLRBITS(v) (CLRBITS(ON_BITS(v)) +#define OFF_SETBITS(v) (SETBITS(OFF_BITS(v)) +#define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v)) + +#define LED_STARTED_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) +#define LED_STARTED_ON_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_STARTED_OFF_SETBITS (0 << OFF_SETBITS_SHIFT) +#define LED_STARTED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_HEAPALLOCATE_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_HEAPALLOCATE_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_HEAPALLOCATE_OFF_SETBITS ((SHENZHOU_LED1) << OFF_SETBITS_SHIFT) +#define LED_HEAPALLOCATE_OFF_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_IRQSENABLED_ON_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_IRQSENABLED_ON_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_IRQSENABLED_OFF_SETBITS ((SHENZHOU_LED2) << OFF_SETBITS_SHIFT) +#define LED_IRQSENABLED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_STACKCREATED_ON_SETBITS ((SHENZHOU_LED3) << ON_SETBITS_SHIFT) +#define LED_STACKCREATED_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) +#define LED_STACKCREATED_OFF_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << OFF_SETBITS_SHIFT) +#define LED_STACKCREATED_OFF_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_INIRQ_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) +#define LED_INIRQ_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_INIRQ_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_INIRQ_OFF_CLRBITS ((SHENZHOU_LED1) << OFF_CLRBITS_SHIFT) + +#define LED_SIGNAL_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) +#define LED_SIGNAL_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_SIGNAL_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_SIGNAL_OFF_CLRBITS ((SHENZHOU_LED2) << OFF_CLRBITS_SHIFT) + +#define LED_ASSERTION_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) +#define LED_ASSERTION_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_ASSERTION_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_ASSERTION_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +#define LED_PANIC_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) +#define LED_PANIC_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_PANIC_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_PANIC_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) + +/************************************************************************************** + * Private Function Protototypes + **************************************************************************************/ + +/* LED State Controls */ + +static inline void led_clrbits(unsigned int clrbits); +static inline void led_setbits(unsigned int setbits); +static void led_setonoff(unsigned int bits); + +/* LED Power Management */ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const uint16_t g_ledbits[8] = +{ + (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + + (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + + (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + + (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + + (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | + LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), + + (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | + LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), + + (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | + LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), + + (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | + LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) +}; + +#ifdef CONFIG_PM +static struct pm_callback_s g_ledscb = +{ + .notify = led_pm_notify, + .prepare = led_pm_prepare, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: led_clrbits + * + * Description: + * Clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_clrbits(unsigned int clrbits) +{ + if ((clrbits & SHENZHOU_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, false); + } + + if ((clrbits & SHENZHOU_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, false); + } + + if ((clrbits & SHENZHOU_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, false); + } + + if ((clrbits & SHENZHOU_LED4) != 0) + { + stm32_gpiowrite(GPIO_LED4, false); + } +} + +/**************************************************************************** + * Name: led_setbits + * + * Description: + * Set all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_setbits(unsigned int setbits) +{ + if ((setbits & SHENZHOU_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, true); + } + + if ((setbits & SHENZHOU_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, true); + } + + if ((setbits & SHENZHOU_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, true); + } + + if ((setbits & SHENZHOU_LED4) != 0) + { + stm32_gpiowrite(GPIO_LED4, true); + } +} + +/**************************************************************************** + * Name: led_setonoff + * + * Description: + * Set/clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static void led_setonoff(unsigned int bits) +{ + led_clrbits(CLRBITS(bits)); + led_setbits(SETBITS(bits)); +} + +/**************************************************************************** + * Name: led_pm_notify + * + * Description: + * Notify the driver of new power state. This callback is called after + * all drivers have had the opportunity to prepare for the new power state. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + switch (pmstate) + { + case(PM_NORMAL): + { + /* Restore normal LEDs operation */ + + } + break; + + case(PM_IDLE): + { + /* Entering IDLE mode - Turn leds off */ + + } + break; + + case(PM_STANDBY): + { + /* Entering STANDBY mode - Logic for PM_STANDBY goes here */ + + } + break; + + case(PM_SLEEP): + { + /* Entering SLEEP mode - Logic for PM_SLEEP goes here */ + + } + break; + + default: + { + /* Should not get here */ + + } + break; + } +} +#endif + +/**************************************************************************** + * Name: led_pm_prepare + * + * Description: + * Request the driver to prepare for a new power state. This is a warning + * that the system is about to enter into a new power state. The driver + * should begin whatever operations that may be required to enter power + * state. The driver may abort the state change mode by returning a + * non-zero value from the callback function. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + /* No preparation to change power modes is required by the LEDs driver. + * We always accept the state change by returning OK. + */ + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_ledinit + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void up_ledinit(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} + +/**************************************************************************** + * Name: up_ledon + ****************************************************************************/ + +void up_ledon(int led) +{ + led_setonoff(ON_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledoff + ****************************************************************************/ + +void up_ledoff(int led) +{ + led_setonoff(OFF_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledpminitialize + ****************************************************************************/ + +#ifdef CONFIG_PM +void up_ledpminitialize(void) +{ + /* Register to receive power management callbacks */ + + int ret = pm_register(&g_ledscb); + if (ret != OK) + { + up_ledon(LED_ASSERTION); + } +} +#endif /* CONFIG_PM */ + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/shenzhou/src/up_nsh.c b/nuttx/configs/shenzhou/src/up_nsh.c new file mode 100644 index 0000000000..3d9ba407fb --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_nsh.c @@ -0,0 +1,218 @@ +/**************************************************************************** + * config/shenzhou/src/up_nsh.c + * arch/arm/src/board/up_nsh.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#ifdef CONFIG_STM32_SPI1 +# include +# include +#endif + +#ifdef CONFIG_STM32_SDIO +# include +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + +#include "stm32_internal.h" +#include "shenzhou-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +/* For now, don't build in any SPI1 support -- NSH is not using it */ + +#undef CONFIG_STM32_SPI1 + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_MMCSD 1 +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support + * is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) +# undef HAVE_MMCSD +#endif + +/* Default MMC/SD minor number */ + +#ifdef HAVE_MMCSD +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif + +/* Default MMC/SD SLOT number */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif + +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#endif + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device is USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# else +# define message(...) printf(__VA_ARGS__) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# else +# define message printf +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nsh_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int nsh_archinitialize(void) +{ +#ifdef CONFIG_STM32_SPI1 + FAR struct spi_dev_s *spi; + FAR struct mtd_dev_s *mtd; +#endif +#ifdef HAVE_MMCSD + FAR struct sdio_dev_s *sdio; +#endif +#if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) + int ret; +#endif + + /* Configure SPI-based devices */ + +#ifdef CONFIG_STM32_SPI1 +# warning "Missing support for the SPI FLASH" +#endif + + /* Mount the SDIO-based MMC/SD block driver */ + +#ifdef HAVE_MMCSD + /* First, get an instance of the SDIO interface */ + + sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + message("nsh_archinitialize: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return -ENODEV; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); + if (ret != OK) + { + message("nsh_archinitialize: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return ret; + } + + /* Then let's guess and say that there is a card in the slot. I need to check to + * see if the STM3240G-EVAL board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. stm32_usbhost_initialize() starts a thread + * will monitor for USB connection and disconnection events. + */ + + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + message("nsh_archinitialize: Failed to initialize USB host: %d\n", ret); + return ret; + } +#endif + + return OK; +} diff --git a/nuttx/configs/shenzhou/src/up_spi.c b/nuttx/configs/shenzhou/src/up_spi.c new file mode 100644 index 0000000000..5a3e691595 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_spi.c @@ -0,0 +1,204 @@ +/************************************************************************************ + * configs/shenzhou/src/up_spi.c + * arch/arm/src/board/up_spi.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "stm32_internal.h" +#include "shenzhou-internal.h" + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI3) + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SPI_DEBUG /* Define to enable debug */ +#undef SPI_VERBOSE /* Define to enable verbose debug */ + +#ifdef SPI_DEBUG +# define spidbg lldbg +# ifdef SPI_VERBOSE +# define spivdbg lldbg +# else +# define spivdbg(x...) +# endif +#else +# undef SPI_VERBOSE +# define spidbg(x...) +# define spivdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Shenzhou board. + * + ************************************************************************************/ + +void weak_function stm32_spiinitialize(void) +{ + /* NOTE: Clocking for SPI1 and/or SPI3 was already provided in stm32_rcc.c. + * Configurations of SPI pins is performed in stm32_spi.c. + * Here, we only initialize chip select pins unique to the board + * architecture. + */ + + /* SPI1 connects to the SD CARD and to the SPI FLASH */ + +#ifdef CONFIG_STM32_SPI1 + stm32_configgpio(GPIO_SD_CS); + stm32_configgpio(GPIO_FLASH_CS); +#endif + + /* SPI3 connects to TFT LCD and the RF24L01 2.4G wireless module */ + +#ifdef CONFIG_STM32_SPI3 + stm32_configgpio(GPIO_LCD_CS); + stm32_configgpio(GPIO_WIRELESS_CS); +#endif +} + +/**************************************************************************** + * Name: stm32_spi1/2/3select and stm32_spi1/2/3status + * + * Description: + * The external functions, stm32_spi1/2/3select and stm32_spi1/2/3status must be + * provided by board-specific logic. They are implementations of the select + * and status methods of the SPI interface defined by struct spi_ops_s (see + * include/nuttx/spi.h). All other methods (including up_spiinitialize()) + * are provided by common STM32 logic. To use this common SPI logic on your + * board: + * + * 1. Provide logic in stm32_boardinitialize() to configure SPI chip select + * pins. + * 2. Provide stm32_spi1/2/3select() and stm32_spi1/2/3status() functions in your + * board-specific logic. These functions will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 3. Add a calls to up_spiinitialize() in your low level application + * initialization logic + * 4. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ****************************************************************************/ + +#ifdef CONFIG_STM32_SPI1 +void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + + /* SPI1 connects to the SD CARD and to the SPI FLASH */ + + if (devid == SPIDEV_MMCSD) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_SD_CS, !selected); + } + elseif (devid == SPIDEV_FLASH) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_FLASH_CS, !selected); + } +} + +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + if (stm32_gpioread(GPIO_SD_CD)) + { + return 0; + } + else + { + return SPI_STATUS_PRESENT; + } +} +#endif + +#ifdef CONFIG_STM32_SPI3 +void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + + /* SPI3 connects to TFT LCD and the RF24L01 2.4G wireless module */ + + if (devid == SPIDEV_TOUCHSCREEN) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_LCD_CS, !selected); + } + elseif (devid == SPIDEV_WIRELESS) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_WIRELESS_CS, !selected); + } +} + +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI3 */ diff --git a/nuttx/configs/shenzhou/src/up_usb.c b/nuttx/configs/shenzhou/src/up_usb.c new file mode 100644 index 0000000000..1cf8a39a7a --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_usb.c @@ -0,0 +1,294 @@ +/************************************************************************************ + * configs/shenzhou/src/up_usbdev.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "up_arch.h" +#include "stm32_internal.h" +#include "shenshou-internal.h" + +#ifdef CONFIG_STM32_OTGFS + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST) +# define HAVE_USB 1 +#else +# warning "CONFIG_STM32_OTGFS is enabled but neither CONFIG_USBDEV nor CONFIG_USBHOST" +# undef HAVE_USB +#endif + +#ifndef CONFIG_USBHOST_DEFPRIO +# define CONFIG_USBHOST_DEFPRIO 50 +#endif + +#ifndef CONFIG_USBHOST_STACKSIZE +# define CONFIG_USBHOST_STACKSIZE 1024 +#endif + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +static struct usbhost_driver_s *g_drvr; +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: usbhost_waiter + * + * Description: + * Wait for USB devices to be connected. + * + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +static int usbhost_waiter(int argc, char *argv[]) +{ + bool connected = false; + int ret; + + uvdbg("Running\n"); + for (;;) + { + /* Wait for the device to change state */ + + ret = DRVR_WAIT(g_drvr, connected); + DEBUGASSERT(ret == OK); + + connected = !connected; + uvdbg("%s\n", connected ? "connected" : "disconnected"); + + /* Did we just become connected? */ + + if (connected) + { + /* Yes.. enumerate the newly connected device */ + + (void)DRVR_ENUMERATE(g_drvr); + } + } + + /* Keep the compiler from complaining */ + + return 0; +} +#endif + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called from stm32_usbinitialize very early in inialization to setup USB-related + * GPIO pins for the STM3240G-EVAL board. + * + ************************************************************************************/ + +void stm32_usbinitialize(void) +{ + /* The OTG FS has an internal soft pull-up. No GPIO configuration is required */ + + /* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */ + +#ifdef CONFIG_STM32_OTGFS + stm32_configgpio(GPIO_OTGFS_VBUS); + stm32_configgpio(GPIO_OTGFS_PWRON); + stm32_configgpio(GPIO_OTGFS_OVER); +#endif +} + +/*********************************************************************************** + * Name: stm32_usbhost_initialize + * + * Description: + * Called at application startup time to initialize the USB host functionality. + * This function will start a thread that will monitor for device + * connection/disconnection events. + * + ***********************************************************************************/ + +#ifdef CONFIG_USBHOST +int stm32_usbhost_initialize(void) +{ + int pid; + int ret; + + /* First, register all of the class drivers needed to support the drivers + * that we care about: + */ + + uvdbg("Register class drivers\n"); + ret = usbhost_storageinit(); + if (ret != OK) + { + udbg("Failed to register the mass storage class\n"); + } + + /* Then get an instance of the USB host interface */ + + uvdbg("Initialize USB host\n"); + g_drvr = usbhost_initialize(0); + if (g_drvr) + { + /* Start a thread to handle device connection. */ + + uvdbg("Start usbhost_waiter\n"); + + pid = TASK_CREATE("usbhost", CONFIG_USBHOST_DEFPRIO, + CONFIG_USBHOST_STACKSIZE, + (main_t)usbhost_waiter, (const char **)NULL); + return pid < 0 ? -ENOEXEC : OK; + } + + return -ENODEV; +} +#endif + +/*********************************************************************************** + * Name: stm32_usbhost_vbusdrive + * + * Description: + * Enable/disable driving of VBUS 5V output. This function must be provided be + * each platform that implements the STM32 OTG FS host interface + * + * "On-chip 5 V VBUS generation is not supported. For this reason, a charge pump + * or, if 5 V are available on the application board, a basic power switch, must + * be added externally to drive the 5 V VBUS line. The external charge pump can + * be driven by any GPIO output. When the application decides to power on VBUS + * using the chosen GPIO, it must also set the port power bit in the host port + * control and status register (PPWR bit in OTG_FS_HPRT). + * + * "The application uses this field to control power to this port, and the core + * clears this bit on an overcurrent condition." + * + * Input Parameters: + * iface - For future growth to handle multiple USB host interface. Should be zero. + * enable - true: enable VBUS power; false: disable VBUS power + * + * Returned Value: + * None + * + ***********************************************************************************/ + +#ifdef CONFIG_USBHOST +void stm32_usbhost_vbusdrive(int iface, bool enable) +{ + DEBUGASSERT(iface == 0); + + if (enable) + { + /* Enable the Power Switch by driving the enable pin low */ + + stm32_gpiowrite(GPIO_OTGFS_PWRON, false); + } + else + { + /* Disable the Power Switch by driving the enable pin high */ + + stm32_gpiowrite(GPIO_OTGFS_PWRON, true); + } +} +#endif + +/************************************************************************************ + * Name: stm32_setup_overcurrent + * + * Description: + * Setup to receive an interrupt-level callback if an overcurrent condition is + * detected. + * + * Input paramter: + * handler - New overcurrent interrupt handler + * + * Returned value: + * Old overcurrent interrupt handler + * + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +xcpt_t stm32_setup_overcurrent(xcpt_t handler) +{ + return NULL; +} +#endif + +/************************************************************************************ + * Name: stm32_usbsuspend + * + * Description: + * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is + * used. This function is called whenever the USB enters or leaves suspend mode. + * This is an opportunity for the board logic to shutdown clocks, power, etc. + * while the USB is suspended. + * + ************************************************************************************/ + +#ifdef CONFIG_USBDEV +void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +{ + ulldbg("resume: %d\n", resume); +} +#endif + +#endif /* CONFIG_STM32_OTGFS */ + + + diff --git a/nuttx/configs/shenzhou/src/up_usbmsc.c b/nuttx/configs/shenzhou/src/up_usbmsc.c new file mode 100644 index 0000000000..8d12f6324c --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_usbmsc.c @@ -0,0 +1,159 @@ +/**************************************************************************** + * configs/shenzhou/src/up_usbmsc.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "stm32_internal.h" + +/* There is nothing to do here if SDIO support is not selected. */ + +#ifdef CONFIG_STM32_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#undef STM32_MMCSDSLOTNO +#define STM32_MMCSDSLOTNO 0 + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* If examples/usbmsc is built as an NSH command, then SD slot should + * already have been initized in nsh_archinitialize() (see up_nsh.c). In + * this case, there is nothing further to be done here. + */ + +#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("usbmsc_archinitialize: " + "Initializing SDIO slot %d\n", + STM32_MMCSDSLOTNO); + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n", + STM32_MMCSDSLOTNO); + return -ENODEV; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + message("usbmsc_archinitialize: " + "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + if (ret != OK) + { + message("usbmsc_archinitialize: " + "Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + message("usbmsc_archinitialize: " + "Successfully bound SDIO to the MMC/SD driver\n"); + + /* Then let's guess and say that there is a card in the slot. I need to check to + * see if the Shenzhou board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + +#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ + + return OK; +} + +#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/shenzhou/src/up_userleds.c b/nuttx/configs/shenzhou/src/up_userleds.c new file mode 100644 index 0000000000..0ba0292283 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_userleds.c @@ -0,0 +1,131 @@ +/**************************************************************************** + * configs/shenzhou/src/up_userleds.c + * arch/arm/src/board/up_userleds.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32_internal.h" +#include "shenzhou-internal.h" + +#ifndef CONFIG_ARCH_LEDS + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG with + * CONFIG_DEBUG_VERBOSE too) + */ + +#undef LED_DEBUG /* Define to enable debug */ + +#ifdef LED_DEBUG +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ +/* This array maps an LED number to GPIO pin configuration */ + +static uint32_t g_ledcfg[BOARD_NLEDS] = +{ + GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_ledinit + ****************************************************************************/ + +void stm32_ledinit(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} + +/**************************************************************************** + * Name: stm32_setled + ****************************************************************************/ + +void stm32_setled(int led, bool ledon) +{ + if ((unsigned)led < BOARD_NLEDS) + { + stm32_gpiowrite(g_ledcfg[led], ledon); + } +} + +/**************************************************************************** + * Name: stm32_setleds + ****************************************************************************/ + +void stm32_setleds(uint8_t ledset) +{ + stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0); + stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0); + stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0); + stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0); +} + +#endif /* !CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/shenzhou/src/up_watchdog.c b/nuttx/configs/shenzhou/src/up_watchdog.c new file mode 100644 index 0000000000..a4be02371d --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_watchdog.c @@ -0,0 +1,136 @@ +/************************************************************************************ + * configs/shenzhou/src/up_watchdog.c + * arch/arm/src/board/up_watchdog.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "stm32_wdg.h" + +#ifdef CONFIG_WATCHDOG + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Configuration *******************************************************************/ +/* Wathdog hardware should be enabled */ + +#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) +# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" +#endif + +/* Select the path to the registered watchdog timer device */ + +#ifndef CONFIG_STM32_WDG_DEVPATH +# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH +# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH +# else +# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" +# endif +#endif + +/* Use the un-calibrated LSI frequency if we have nothing better */ + +#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) +# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY +#endif + +/* Debug ***************************************************************************/ +/* Non-standard debug that may be enabled just for testing the watchdog timer */ + +#ifndef CONFIG_DEBUG +# undef CONFIG_DEBUG_WATCHDOG +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG +# define wdgdbg dbg +# define wdglldbg lldbg +# ifdef CONFIG_DEBUG_VERBOSE +# define wdgvdbg vdbg +# define wdgllvdbg llvdbg +# else +# define wdgvdbg(x...) +# define wdgllvdbg(x...) +# endif +#else +# define wdgdbg(x...) +# define wdglldbg(x...) +# define wdgvdbg(x...) +# define wdgllvdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/**************************************************************************** + * Name: up_wdginitialize() + * + * Description: + * Perform architecuture-specific initialization of the Watchdog hardware. + * This interface must be provided by all configurations using + * apps/examples/watchdog + * + ****************************************************************************/ + +int up_wdginitialize(void) +{ + /* Initialize tha register the watchdog timer device */ + +#if defined(CONFIG_STM32_WWDG) + stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); + return OK; +#elif defined(CONFIG_STM32_IWDG) + stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); + return OK; +#else + return -ENODEV; +#endif +} + +#endif /* CONFIG_WATCHDOG */ diff --git a/nuttx/configs/stm3210e-eval/RIDE/appconfig b/nuttx/configs/stm3210e-eval/RIDE/appconfig index b40f864aa3..138b4e47a4 100644 --- a/nuttx/configs/stm3210e-eval/RIDE/appconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/RIDE/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/RIDE/setenv.sh b/nuttx/configs/stm3210e-eval/RIDE/setenv.sh index 0c600814af..b734111363 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/setenv.sh +++ b/nuttx/configs/stm3210e-eval/RIDE/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/RIDE/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/RIDE/stm32-nuttx.ld b/nuttx/configs/stm3210e-eval/RIDE/stm32-nuttx.ld index 93bd6bca49..704960ad9f 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/stm32-nuttx.ld +++ b/nuttx/configs/stm3210e-eval/RIDE/stm32-nuttx.ld @@ -2,7 +2,7 @@ * configs/stm3210e-eval/RIDE/stm32-nuttx.ld * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/buttons/appconfig b/nuttx/configs/stm3210e-eval/buttons/appconfig index 5e847bd9ef..a747036feb 100644 --- a/nuttx/configs/stm3210e-eval/buttons/appconfig +++ b/nuttx/configs/stm3210e-eval/buttons/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/buttons/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/buttons/setenv.sh b/nuttx/configs/stm3210e-eval/buttons/setenv.sh index fba331e445..2bdf536742 100755 --- a/nuttx/configs/stm3210e-eval/buttons/setenv.sh +++ b/nuttx/configs/stm3210e-eval/buttons/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/buttons/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nsh/setenv.sh b/nuttx/configs/stm3210e-eval/nsh/setenv.sh index d836851921..ee33a8d21d 100755 --- a/nuttx/configs/stm3210e-eval/nsh/setenv.sh +++ b/nuttx/configs/stm3210e-eval/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/dfu/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nsh2/setenv.sh b/nuttx/configs/stm3210e-eval/nsh2/setenv.sh index 09d1c5cea4..425acf89e5 100755 --- a/nuttx/configs/stm3210e-eval/nsh2/setenv.sh +++ b/nuttx/configs/stm3210e-eval/nsh2/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nsh2/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nx/setenv.sh b/nuttx/configs/stm3210e-eval/nx/setenv.sh index 40cbbf0ca7..bf9fad4435 100755 --- a/nuttx/configs/stm3210e-eval/nx/setenv.sh +++ b/nuttx/configs/stm3210e-eval/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nx/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nxlines/appconfig b/nuttx/configs/stm3210e-eval/nxlines/appconfig index fb9c044c59..c2fc508fa8 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/appconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nxlines/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nxlines/setenv.sh b/nuttx/configs/stm3210e-eval/nxlines/setenv.sh index 2c4667fbd1..a9dc78c74d 100755 --- a/nuttx/configs/stm3210e-eval/nxlines/setenv.sh +++ b/nuttx/configs/stm3210e-eval/nxlines/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nxlines/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nxtext/appconfig b/nuttx/configs/stm3210e-eval/nxtext/appconfig index 73e9154eca..acb27582a5 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/appconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nxtext/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/nxtext/setenv.sh b/nuttx/configs/stm3210e-eval/nxtext/setenv.sh index e10ac0096a..a36540cf11 100755 --- a/nuttx/configs/stm3210e-eval/nxtext/setenv.sh +++ b/nuttx/configs/stm3210e-eval/nxtext/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nxtext/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/ostest/appconfig b/nuttx/configs/stm3210e-eval/ostest/appconfig index 68c1f9c0d0..3f36a5c7f6 100644 --- a/nuttx/configs/stm3210e-eval/ostest/appconfig +++ b/nuttx/configs/stm3210e-eval/ostest/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/ostest/setenv.sh b/nuttx/configs/stm3210e-eval/ostest/setenv.sh index fcb428c2ff..046a7f5acf 100755 --- a/nuttx/configs/stm3210e-eval/ostest/setenv.sh +++ b/nuttx/configs/stm3210e-eval/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/pm/setenv.sh b/nuttx/configs/stm3210e-eval/pm/setenv.sh index 9dc5094e6f..5a02de2585 100755 --- a/nuttx/configs/stm3210e-eval/pm/setenv.sh +++ b/nuttx/configs/stm3210e-eval/pm/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/pm/setenv.sh # # Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_buttons.c b/nuttx/configs/stm3210e-eval/src/up_buttons.c index b9c9fb9d41..4f884649c3 100644 --- a/nuttx/configs/stm3210e-eval/src/up_buttons.c +++ b/nuttx/configs/stm3210e-eval/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/stm3210e-eval/src/up_buttons.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_composite.c b/nuttx/configs/stm3210e-eval/src/up_composite.c index 7368c78985..e80e0fcb45 100644 --- a/nuttx/configs/stm3210e-eval/src/up_composite.c +++ b/nuttx/configs/stm3210e-eval/src/up_composite.c @@ -2,7 +2,7 @@ * configs/stm3210e-eval/src/up_composite.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the STM32 MMC/SD SDIO block driver. * diff --git a/nuttx/configs/stm3210e-eval/src/up_deselectlcd.c b/nuttx/configs/stm3210e-eval/src/up_deselectlcd.c index 93e438ed5a..e8642c2e00 100644 --- a/nuttx/configs/stm3210e-eval/src/up_deselectlcd.c +++ b/nuttx/configs/stm3210e-eval/src/up_deselectlcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_deselectlcd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_deselectnor.c b/nuttx/configs/stm3210e-eval/src/up_deselectnor.c index 7450b8c72b..1359770232 100644 --- a/nuttx/configs/stm3210e-eval/src/up_deselectnor.c +++ b/nuttx/configs/stm3210e-eval/src/up_deselectnor.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_deselectnor.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_deselectsram.c b/nuttx/configs/stm3210e-eval/src/up_deselectsram.c index 51329eb154..442524d806 100644 --- a/nuttx/configs/stm3210e-eval/src/up_deselectsram.c +++ b/nuttx/configs/stm3210e-eval/src/up_deselectsram.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_deselectsram.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_extcontext.c b/nuttx/configs/stm3210e-eval/src/up_extcontext.c index 64b1d7ea62..07a202f06d 100644 --- a/nuttx/configs/stm3210e-eval/src/up_extcontext.c +++ b/nuttx/configs/stm3210e-eval/src/up_extcontext.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_extcontext.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_extmem.c b/nuttx/configs/stm3210e-eval/src/up_extmem.c index 848e8fa0db..a47d0fe12a 100644 --- a/nuttx/configs/stm3210e-eval/src/up_extmem.c +++ b/nuttx/configs/stm3210e-eval/src/up_extmem.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_extmem.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_lm75.c b/nuttx/configs/stm3210e-eval/src/up_lm75.c index 18107d9472..d1bb288ffa 100644 --- a/nuttx/configs/stm3210e-eval/src/up_lm75.c +++ b/nuttx/configs/stm3210e-eval/src/up_lm75.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_lm75.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_nsh.c b/nuttx/configs/stm3210e-eval/src/up_nsh.c index 36430a52a6..96e1e5e58c 100644 --- a/nuttx/configs/stm3210e-eval/src/up_nsh.c +++ b/nuttx/configs/stm3210e-eval/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_selectlcd.c b/nuttx/configs/stm3210e-eval/src/up_selectlcd.c index 221834ff58..3afc798354 100644 --- a/nuttx/configs/stm3210e-eval/src/up_selectlcd.c +++ b/nuttx/configs/stm3210e-eval/src/up_selectlcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_selectlcd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_selectnor.c b/nuttx/configs/stm3210e-eval/src/up_selectnor.c index 3448b5e95c..9ee1ad34fc 100644 --- a/nuttx/configs/stm3210e-eval/src/up_selectnor.c +++ b/nuttx/configs/stm3210e-eval/src/up_selectnor.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_selectnor.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_selectsram.c b/nuttx/configs/stm3210e-eval/src/up_selectsram.c index be10a05f5c..3035110c88 100644 --- a/nuttx/configs/stm3210e-eval/src/up_selectsram.c +++ b/nuttx/configs/stm3210e-eval/src/up_selectsram.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_selectsram.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_spi.c b/nuttx/configs/stm3210e-eval/src/up_spi.c index 3fc6567de6..dacc3adf84 100644 --- a/nuttx/configs/stm3210e-eval/src/up_spi.c +++ b/nuttx/configs/stm3210e-eval/src/up_spi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_spi.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_usbdev.c b/nuttx/configs/stm3210e-eval/src/up_usbdev.c index d77c798878..2ac9e50f49 100644 --- a/nuttx/configs/stm3210e-eval/src/up_usbdev.c +++ b/nuttx/configs/stm3210e-eval/src/up_usbdev.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c index 4f788579c8..dce463abce 100644 --- a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c +++ b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/stm3210e-eval/src/up_usbmsc.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the STM32 MMC/SD SDIO block driver. * diff --git a/nuttx/configs/stm3210e-eval/usbserial/appconfig b/nuttx/configs/stm3210e-eval/usbserial/appconfig index 00a928b56c..fecff045ba 100644 --- a/nuttx/configs/stm3210e-eval/usbserial/appconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/usbserial/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/usbserial/setenv.sh b/nuttx/configs/stm3210e-eval/usbserial/setenv.sh index fcb428c2ff..046a7f5acf 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/setenv.sh +++ b/nuttx/configs/stm3210e-eval/usbserial/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/usbstorage/appconfig b/nuttx/configs/stm3210e-eval/usbstorage/appconfig index b487fdfdd5..646e4f4edb 100644 --- a/nuttx/configs/stm3210e-eval/usbstorage/appconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/stm3210e-eval/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3210e-eval/usbstorage/setenv.sh b/nuttx/configs/stm3210e-eval/usbstorage/setenv.sh index d836851921..ee33a8d21d 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/setenv.sh +++ b/nuttx/configs/stm3210e-eval/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/dfu/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3220g-eval/dhcpd/appconfig b/nuttx/configs/stm3220g-eval/dhcpd/appconfig index 2211494bdc..46c59e818e 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/appconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/appconfig @@ -2,7 +2,7 @@ # configs/stm3220g-eval/dhcpd/appconfig # # Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3220g-eval/src/up_selectlcd.c b/nuttx/configs/stm3220g-eval/src/up_selectlcd.c index e8ab375ce7..f6c5312702 100644 --- a/nuttx/configs/stm3220g-eval/src/up_selectlcd.c +++ b/nuttx/configs/stm3220g-eval/src/up_selectlcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_selectlcd.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Diego Sanchez * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/stm3240g-eval/dhcpd/appconfig b/nuttx/configs/stm3240g-eval/dhcpd/appconfig index c586eeb8e1..d6f0fd9200 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/appconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/appconfig @@ -2,7 +2,7 @@ # configs/stm3240g-eval/dhcpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/stm3240g-eval/src/up_deselectlcd.c b/nuttx/configs/stm3240g-eval/src/up_deselectlcd.c index e0bab8c394..93fdd97c46 100644 --- a/nuttx/configs/stm3240g-eval/src/up_deselectlcd.c +++ b/nuttx/configs/stm3240g-eval/src/up_deselectlcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_deselectlcd.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Diego Sanchez * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/stm3240g-eval/src/up_selectlcd.c b/nuttx/configs/stm3240g-eval/src/up_selectlcd.c index 5e49006540..e5781a1ea9 100644 --- a/nuttx/configs/stm3240g-eval/src/up_selectlcd.c +++ b/nuttx/configs/stm3240g-eval/src/up_selectlcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_selectlcd.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Diego Sanchez * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/stm3240g-eval/src/up_userleds.c b/nuttx/configs/stm3240g-eval/src/up_userleds.c index 45e0fdd852..59be38561c 100644 --- a/nuttx/configs/stm3240g-eval/src/up_userleds.c +++ b/nuttx/configs/stm3240g-eval/src/up_userleds.c @@ -1,6 +1,6 @@ /**************************************************************************** - * configs/stm3240g_eval/src/up_leds.c - * arch/arm/src/board/up_leds.c + * configs/stm3240g_eval/src/up_userleds.c + * arch/arm/src/board/up_userleds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt From ddefd95e2889ca329155b3e51b1453dcea2fe85f Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 02:10:56 +0000 Subject: [PATCH 32/95] More Shenzhou board logic git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5111 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/netutils/thttpd/Kconfig | 2 +- apps/nshlib/Kconfig | 9 +- nuttx/configs/Kconfig | 24 +++ nuttx/configs/amber/hello/defconfig | 2 +- nuttx/configs/avr32dev1/nsh/defconfig | 2 +- nuttx/configs/avr32dev1/ostest/defconfig | 2 +- nuttx/configs/demo9s12ne64/ostest/defconfig | 2 +- nuttx/configs/ea3131/nsh/defconfig | 2 +- nuttx/configs/ea3131/ostest/defconfig | 2 +- nuttx/configs/ea3131/pgnsh/defconfig | 2 +- nuttx/configs/ea3131/usbserial/defconfig | 2 +- nuttx/configs/ea3131/usbstorage/defconfig | 2 +- nuttx/configs/ea3152/ostest/defconfig | 2 +- nuttx/configs/eagle100/httpd/defconfig | 2 +- nuttx/configs/eagle100/nettest/defconfig | 2 +- nuttx/configs/eagle100/nsh/defconfig | 2 +- nuttx/configs/eagle100/nxflat/defconfig | 2 +- nuttx/configs/eagle100/ostest/defconfig | 2 +- nuttx/configs/eagle100/thttpd/defconfig | 2 +- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 2 +- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 2 +- .../configs/ez80f910200kitg/ostest/defconfig | 2 +- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 2 +- nuttx/configs/ez80f910200zco/httpd/defconfig | 2 +- .../configs/ez80f910200zco/nettest/defconfig | 2 +- nuttx/configs/ez80f910200zco/nsh/defconfig | 2 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 2 +- nuttx/configs/ez80f910200zco/poll/defconfig | 2 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh2/defconfig | 2 +- nuttx/configs/hymini-stm32v/nx/defconfig | 2 +- nuttx/configs/hymini-stm32v/nxlines/defconfig | 2 +- .../configs/hymini-stm32v/usbserial/defconfig | 2 +- .../hymini-stm32v/usbstorage/defconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 +- nuttx/configs/lincoln60/nsh/defconfig | 2 +- nuttx/configs/lincoln60/ostest/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nx/defconfig | 2 +- nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nx/defconfig | 2 +- nuttx/configs/lm3s8962-ek/ostest/defconfig | 2 +- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 2 +- .../configs/lpc4330-xplorer/ostest/defconfig | 2 +- .../lpcxpresso-lpc1768/dhcpd/defconfig | 2 +- .../configs/lpcxpresso-lpc1768/nsh/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 2 +- .../lpcxpresso-lpc1768/ostest/defconfig | 2 +- .../lpcxpresso-lpc1768/thttpd/defconfig | 2 +- .../lpcxpresso-lpc1768/usbstorage/defconfig | 2 +- nuttx/configs/mbed/hidkbd/defconfig | 2 +- nuttx/configs/mbed/nsh/defconfig | 2 +- .../mcu123-lpc214x/composite/defconfig | 2 +- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 2 +- nuttx/configs/mcu123-lpc214x/ostest/defconfig | 2 +- .../mcu123-lpc214x/usbserial/defconfig | 2 +- .../mcu123-lpc214x/usbstorage/defconfig | 2 +- nuttx/configs/micropendous3/hello/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 2 +- nuttx/configs/mirtoo/nxffs/defconfig | 2 +- nuttx/configs/mirtoo/ostest/defconfig | 2 +- nuttx/configs/ne64badge/ostest/defconfig | 2 +- nuttx/configs/ntosd-dm320/nsh/defconfig | 2 +- nuttx/configs/ntosd-dm320/thttpd/defconfig | 2 +- nuttx/configs/nucleus2g/nsh/defconfig | 2 +- nuttx/configs/nucleus2g/ostest/defconfig | 2 +- nuttx/configs/nucleus2g/usbserial/defconfig | 2 +- nuttx/configs/nucleus2g/usbstorage/defconfig | 2 +- .../configs/olimex-lpc1766stk/ftpc/defconfig | 2 +- .../olimex-lpc1766stk/hidkbd/defconfig | 2 +- .../olimex-lpc1766stk/nettest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 2 +- .../olimex-lpc1766stk/ostest/defconfig | 2 +- .../olimex-lpc1766stk/slip-httpd/defconfig | 2 +- .../olimex-lpc1766stk/thttpd/defconfig | 2 +- .../olimex-lpc1766stk/usbserial/defconfig | 2 +- .../olimex-lpc1766stk/usbstorage/defconfig | 2 +- .../configs/olimex-lpc1766stk/wlan/defconfig | 2 +- nuttx/configs/olimex-lpc2378/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc2378/ostest/defconfig | 2 +- nuttx/configs/olimex-stm32-p107/Kconfig | 19 ++ nuttx/configs/olimex-stm32-p107/nsh/defconfig | 39 ++-- .../olimex-stm32-p107/ostest/defconfig | 5 +- .../configs/olimex-strp711/nettest/defconfig | 2 +- nuttx/configs/olimex-strp711/nsh/defconfig | 2 +- nuttx/configs/olimex-strp711/ostest/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 2 +- .../configs/pcblogic-pic32mx/ostest/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh2/defconfig | 2 +- .../configs/pic32-starterkit/ostest/defconfig | 2 +- nuttx/configs/pic32mx7mmb/nsh/defconfig | 2 +- nuttx/configs/pic32mx7mmb/ostest/defconfig | 2 +- nuttx/configs/qemu-i486/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nx/defconfig | 2 +- nuttx/configs/sam3u-ek/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/touchscreen/defconfig | 2 +- nuttx/configs/shenzhou/Kconfig | 19 ++ nuttx/configs/shenzhou/README.txt | 67 ++---- nuttx/configs/shenzhou/nsh/Make.defs | 190 ++++++++++++++++++ nuttx/configs/shenzhou/nsh/setenv.sh | 75 +++++++ nuttx/configs/sim/nsh/defconfig | 2 +- nuttx/configs/sim/nsh2/defconfig | 2 +- nuttx/configs/sim/nx/defconfig | 2 +- nuttx/configs/sim/nx11/defconfig | 2 +- nuttx/configs/sim/nxwm/defconfig | 2 +- nuttx/configs/sim/touchscreen/defconfig | 2 +- nuttx/configs/stm3210e-eval/RIDE/defconfig | 2 +- nuttx/configs/stm3210e-eval/buttons/defconfig | 2 +- .../configs/stm3210e-eval/composite/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3210e-eval/nx/defconfig | 2 +- .../configs/stm3210e-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxlines/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxtext/defconfig | 2 +- nuttx/configs/stm3210e-eval/ostest/defconfig | 2 +- nuttx/configs/stm3210e-eval/pm/defconfig | 2 +- .../configs/stm3210e-eval/usbserial/defconfig | 2 +- .../stm3210e-eval/usbstorage/defconfig | 2 +- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3220g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 +- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3240g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh2/defconfig | 2 +- .../configs/stm3240g-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3240g-eval/telnetd/defconfig | 2 +- .../configs/stm3240g-eval/webserver/defconfig | 2 +- nuttx/configs/stm32f4discovery/nsh/defconfig | 2 +- .../stm32f4discovery/nxlines/defconfig | 2 +- .../configs/stm32f4discovery/ostest/defconfig | 2 +- nuttx/configs/stm32f4discovery/pm/defconfig | 2 +- nuttx/configs/sure-pic32mx/nsh/defconfig | 2 +- nuttx/configs/sure-pic32mx/ostest/defconfig | 2 +- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 2 +- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/nsh/defconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/ubw32/nsh/defconfig | 2 +- nuttx/configs/ubw32/ostest/defconfig | 2 +- nuttx/configs/us7032evb1/nsh/defconfig | 2 +- nuttx/configs/us7032evb1/ostest/defconfig | 2 +- nuttx/configs/vsn/nsh/defconfig | 2 +- nuttx/configs/xtrs/nsh/defconfig | 2 +- nuttx/configs/z80sim/nsh/defconfig | 2 +- nuttx/drivers/Kconfig | 53 +++++ nuttx/drivers/mmcsd/Kconfig | 2 +- 164 files changed, 580 insertions(+), 228 deletions(-) create mode 100644 nuttx/configs/olimex-stm32-p107/Kconfig create mode 100644 nuttx/configs/shenzhou/Kconfig create mode 100644 nuttx/configs/shenzhou/nsh/Make.defs create mode 100755 nuttx/configs/shenzhou/nsh/setenv.sh diff --git a/apps/netutils/thttpd/Kconfig b/apps/netutils/thttpd/Kconfig index 8c73008abc..aa37518397 100644 --- a/apps/netutils/thttpd/Kconfig +++ b/apps/netutils/thttpd/Kconfig @@ -9,7 +9,7 @@ config NETUTILS_THTTPD ---help--- Enable support for the THTTPD webservert. -if NETUTILS_TFTPC +if NETUTILS_THTTPD config THTTPD_PORT int "THTTPD port number" default 80 diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index b03dcdc907..fd1bb7cc8f 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -242,9 +242,12 @@ config NSH_ROMFSSECTSIZE increased if the ROMFS volume were to be become large. Any value selected must be a power of 2. +endif + config NSH_FATDEVNO int "FAT block device minor number" default 0 + depends on FS_FAT ---help--- When the default rcS file used when NSH_ROMFSETC is selected, it will mount a FAT FS under /tmp. This is the minor number of the FAT @@ -253,6 +256,7 @@ config NSH_FATDEVNO config NSH_FATSECTSIZE int "FAT sector size" default 512 + depends on FS_FAT ---help--- When the default rcS file used when NSH_ROMFSETC is selected, it will mount a FAT FS under /tmp. This is the sector size use with the @@ -261,6 +265,7 @@ config NSH_FATSECTSIZE config NSH_FATNSECTORS int "FAT number of sectors" default 1024 + depends on FS_FAT ---help--- When the default rcS file used when NSH_ROMFSETC is selected, it will mount a FAT FS under /tmp. This is the number of sectors to use @@ -269,12 +274,12 @@ config NSH_FATNSECTORS config NSH_FATMOUNTPT string "FAT mount point" - default 512 + default "/tmp" + depends on FS_FAT ---help--- When the default rcS file used when NSH_ROMFSETC is selected, it will mount a FAT FS under /tmp. This is the location where the FAT FS will be mounted. Default is /tmp. -endif if NSH_LIBRARY config NSH_CONSOLE diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index fc5cf7a0ff..01a34e8a7f 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -277,6 +277,14 @@ config ARCH_BOARD_OLIMEX_STRP711 further information. STATUS: Configurations for the basic OS test and NSH are complete and verified. +config ARCH_BOARD_OLIMEX_STM32P107 + bool "Olimex STM32 P107 board" + depends on ARCH_CHIP_STM32F107VC + ---help--- + This port uses the Olimex STM32 P107 board and a GNU arm-elf toolchain* under + Linux or Cygwin. See the http://www.olimex.com for further information. This + board features the STMicro STM32F107VC MCU + config ARCH_BOARD_PCBLOGICPIC32MX bool "PIC32MX board from PCB Logic Design Co" depends on ARCH_CHIP_PIC32MX460F512L @@ -336,6 +344,14 @@ config ARCH_BOARD_SAM3UEK ---help--- The port of NuttX to the Atmel SAM3U-EK development board. +config ARCH_BOARD_SHENZHOU + bool "Shenzhou STM32F107 board" + depends on ARCH_CHIP_STM32F107VC + ---help--- + This port uses the Shenzhou STM32 F107 board and a GNU arm-elf toolchain* under + Linux or Cygwin. See the http://www.armjishu.com for further information. This + board features the STMicro STM32F107VC MCU + config ARCH_BOARD_SKP16C26 bool "Renesas SKP16C26 StarterKit" depends on ARCH_CHIP_M30262F8 @@ -517,6 +533,7 @@ config ARCH_BOARD default "nucleus2g" if ARCH_BOARD_NUCLEUS2G default "olimex-lpc1766stk" if ARCH_BOARD_LPC1766STK default "olimex-lpc2378" if ARCH_BOARD_OLIMEXLPC2378 + default "olimex-stm32-p107" if ARCH_BOARD_OLIMEX_STM32P107 default "olimex-strp711" if ARCH_BOARD_OLIMEX_STRP711 default "pcblogic-pic32mx" if ARCH_BOARD_PCBLOGICPIC32MX default "pic32-starterkit" if ARCH_BOARD_PIC32_STARTERKIT @@ -525,6 +542,7 @@ config ARCH_BOARD default "qemu-i486" if ARCH_BOARD_QEMU_I486 default "rgmp" if ARCH_BOARD_RGMP default "sam3u-ek" if ARCH_BOARD_SAM3UEK + default "shenzhou" if ARCH_BOARD_SHENZHOU default "skp16c26" if ARCH_BOARD_SKP16C26 default "stm3210e-eval" if ARCH_BOARD_STM3210E_EVAL default "stm3220g-eval" if ARCH_BOARD_STM3220G_EVAL @@ -637,6 +655,9 @@ endif if ARCH_BOARD_OLIMEXLPC2378 source "configs/olimex-lpc2378/Kconfig" endif +if ARCH_BOARD_OLIMEX_STM32P107 +source "configs/olimex-stm32-p107/Kconfig" +endif if ARCH_BOARD_OLIMEX_STRP711 source "configs/olimex-strp711/Kconfig" endif @@ -661,6 +682,9 @@ endif if ARCH_BOARD_SAM3UEK source "configs/sam3u-ek/Kconfig" endif +if ARCH_BOARD_SHENZHOU +source "configs/shenzhou/Kconfig" +endif if ARCH_BOARD_SKP16C26 source "configs/skp16c26/Kconfig" endif diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index a6b5728252..b15e622d88 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -368,7 +368,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index dbb562eaef..6efe2500eb 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -390,7 +390,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 6d5aa4d08c..32203ffcba 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -390,7 +390,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index 3a6faab74c..d45fd3c560 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -360,7 +360,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 5c4e3fda22..b74d9a3a3b 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -362,7 +362,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 4e9a70743b..7548f43bb0 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -362,7 +362,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index 14c967c78f..e461e70104 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -405,7 +405,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index b03e6cd3d2..1085ea424b 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -365,7 +365,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index b55eee1c9f..3a6fd85df8 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -366,7 +366,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index be916b7dc7..4bad278b9d 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -363,7 +363,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index eea8d657b8..e89077d4cd 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -313,7 +313,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index d52986372f..82ab0b470f 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -304,7 +304,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index 36212e59b7..ce93cbfff7 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -306,7 +306,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index 5835fbb4fd..77ff9cea27 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -307,7 +307,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index 0cf7440872..4698f71d86 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -301,7 +301,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index 5493345cee..c10f584c66 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -345,7 +345,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index 7a12fd28b4..368892c2ce 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -320,7 +320,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index 03c6574e2f..121ef87d35 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -317,7 +317,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 5947962bc1..61ffa930a5 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -353,7 +353,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index 64591ad509..76979774ab 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -367,7 +367,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index bc8c3bb65f..b711544de9 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -375,7 +375,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index 0a87a96e24..8a4b5d76c4 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -367,7 +367,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index 4066d0ea7d..1dd70097e3 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -367,7 +367,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 11bba8dcff..fd667dff69 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -362,7 +362,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index 8ac0dde327..471b78fddc 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -367,7 +367,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index a5792af4fd..fcb9b942a4 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -438,7 +438,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index 89d40eb584..f3869534ad 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -423,7 +423,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index 8b835ee273..acea3ae23b 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -462,7 +462,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index 7eeff113e4..a4ee68663e 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -485,7 +485,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index f2ca2651fd..d3f7678b54 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -468,7 +468,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 2f4b27f96b..118ed16404 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -444,7 +444,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 33c8b4db33..4167b83448 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -431,7 +431,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 400ff88762..127d45a194 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -426,7 +426,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index f3f140bfd1..25c55a1788 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -408,7 +408,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 04fd254b0b..d527bc6022 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -435,7 +435,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index ebfa4aa49a..a72a6403f5 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -320,7 +320,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index 84ea31b2c8..5377d0234b 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -317,7 +317,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 9777f7f254..1752015d8d 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -322,7 +322,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index 5a4da36912..e3d36b1f98 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -371,7 +371,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 92aabca5fd..f4022fa99a 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -318,7 +318,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index 8c7ac03c6c..c10a9b835d 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -320,7 +320,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index 5e0366af8a..0b4a32fa50 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -369,7 +369,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index 6c554b8ad5..05ded43137 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -317,7 +317,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index 1396a6b9d6..bed40891c2 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -519,7 +519,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 5f58cd5447..f9c4432510 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -502,7 +502,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 13aaec8a0b..e257267f3f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -433,7 +433,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index bfd545c97a..17364e0985 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -443,7 +443,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index f2ad4ba802..b1d54cec18 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -476,7 +476,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index cfe2cb440e..957e82e480 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -421,7 +421,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index d1740805b6..2b05852a64 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -460,7 +460,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 751ee83e57..22e620c9c8 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -417,7 +417,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index 1b1d5d8407..58aa7e8610 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -437,7 +437,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index c6b892c11e..ed0f984483 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -408,7 +408,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig index 62e75452b8..a2b439f851 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/defconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig @@ -354,7 +354,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index a1e16fe529..87d56ceb8a 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -321,7 +321,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index 3d179beec6..86be60f093 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -315,7 +315,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig index 9cf4e64834..df5eb16a96 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig @@ -316,7 +316,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig index a27fad9d35..89b57043db 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig @@ -317,7 +317,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index a76093424f..03898f611f 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -363,7 +363,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index 0ee9cc34e1..33b2895c8d 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -447,7 +447,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index a9dce182b9..08715f3f68 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -446,7 +446,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Each NSH command can be individually disabled via one of the following diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index e830aefa06..3b0b8312f2 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -423,7 +423,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 020dd5cc08..65103625aa 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -366,7 +366,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index 48de4f76ae..42958372c3 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -317,7 +317,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/mount diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index 5e1d8f1c8d..9a5669579d 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -367,7 +367,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # DM90x0 Driver Settings diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index 80e69fe787..24d94bb09d 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -431,7 +431,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 01c81c1267..72efe44e7c 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -408,7 +408,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index 562e8abea0..7507caccc7 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -409,7 +409,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 023447422e..c000ef8b71 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -410,7 +410,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index 80357f15d9..9ddccb6d79 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -507,7 +507,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # Disable several other NSH commands (this is only for testing FTPC) CONFIG_NSH_DISABLE_WGET=y diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index 6c99fd4137..e3e220de51 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -463,7 +463,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 7461f7ca02..8c8c970dbd 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -442,7 +442,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 15a608ac90..6333ba218d 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -487,7 +487,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 2afe412dfc..0325c18476 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -507,7 +507,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 63548173a4..995b38c376 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -435,7 +435,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index ce9a8683a0..883144b774 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -485,7 +485,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index 76592fd0b3..e7f24b8ee5 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -480,7 +480,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index fbdd01ba69..c5c3b59f40 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -436,7 +436,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index 972fbcd53d..451d3aa789 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -437,7 +437,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 176f0ca68f..8fab944c59 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -449,7 +449,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index 8f0174c9ba..e5882dbcca 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -251,7 +251,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # Stack and heap information diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index 79051c568b..11ebc36163 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -251,7 +251,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # Stack and heap information diff --git a/nuttx/configs/olimex-stm32-p107/Kconfig b/nuttx/configs/olimex-stm32-p107/Kconfig new file mode 100644 index 0000000000..89adc58ffe --- /dev/null +++ b/nuttx/configs/olimex-stm32-p107/Kconfig @@ -0,0 +1,19 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +if ARCH_BOARD_OLIMEX_STM32P107 +config ARCH_LEDS + bool "NuttX LED support" + default n + ---help--- + "Support control of board LEDs by NuttX to indicate system state" + +config ARCH_BUTTONS + bool "Button support" + default n + ---help--- + "Support interfaces to use buttons provided by the board." + +endif diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index d8048c4de1..eb92452698 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -43,9 +43,8 @@ CONFIG_ARCH_CHIP_STM32F107VC=y CONFIG_ARCH_BOARD="olimex-stm32-p107" CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 -CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) +CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_STACKDUMP=y @@ -96,42 +95,46 @@ CONFIG_STM32_JTAG_SW_ENABLE=n # # Individual subsystems can be enabled: -# AHB: +# +# AHB: CONFIG_STM32_DMA1=n CONFIG_STM32_DMA2=n CONFIG_STM32_CRC=n CONFIG_STM32_ETHMAC=y -CONFIG_STM32_SDIO=n -# APB1: +CONFIG_STM32_OTGFS=n +CONFIG_STM32_IWDG=n +CONFIG_STM32_PWR=y + +# APB1 (low speed) + +CONFIG_STM32_RTC=n +CONFIG_STM32_BKP=n CONFIG_STM32_TIM2=n CONFIG_STM32_TIM3=n CONFIG_STM32_TIM4=n CONFIG_STM32_TIM5=n CONFIG_STM32_TIM6=n CONFIG_STM32_TIM7=n -CONFIG_STM32_WWDG=n -CONFIG_STM32_IWDG=n -CONFIG_STM32_SPI2=n -CONFIG_STM32_SPI4=n CONFIG_STM32_USART2=y CONFIG_STM32_USART3=n CONFIG_STM32_UART4=n CONFIG_STM32_UART5=n +CONFIG_STM32_SPI2=n +CONFIG_STM32_SPI3=n CONFIG_STM32_I2C1=n CONFIG_STM32_I2C2=n -CONFIG_STM32_USB=n CONFIG_STM32_CAN1=n -CONFIG_STM32_BKP=n -CONFIG_STM32_PWR=n +CONFIG_STM32_CAN2=n CONFIG_STM32_DAC=n -# APB2: -CONFIG_STM32_ADC1=n -CONFIG_STM32_ADC2=n +CONFIG_STM32_WWDG=n + +# APB2 (high speed) + CONFIG_STM32_TIM1=n CONFIG_STM32_SPI1=n -CONFIG_STM32_TIM8=n CONFIG_STM32_USART1=n -CONFIG_STM32_ADC3=n +CONFIG_STM32_ADC1=n +CONFIG_STM32_ADC2=n # # Timer and I2C devices may need to the following to force power to be applied: @@ -491,7 +494,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y CONFIG_NSH_DISABLE_WGET=y diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index 5532a921f7..2a4951668f 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -43,9 +43,8 @@ CONFIG_ARCH_CHIP_STM32F107VC=y CONFIG_ARCH_BOARD="olimex-stm32-p107" CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 -CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) +CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_STACKDUMP=y @@ -471,7 +470,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 2954c7ca72..933ef41a92 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -377,7 +377,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index 1f4976a487..e3413d579c 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -348,7 +348,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index 579ba769e5..b75da9eca3 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -348,7 +348,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index e79efc67a0..c6bffbdbfe 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -424,7 +424,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index 0fe51f08e2..e5bc9c818e 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -413,7 +413,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index fe18e1dbdf..e578aa952d 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -588,7 +588,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 1879e80da6..471c57a17e 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -587,7 +587,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index bd1c372ed0..96331d95ba 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -585,7 +585,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index 3a89bca7e6..c037a7dc2a 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -635,7 +635,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index bc307e44a3..1d55cd2632 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -585,7 +585,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index d83474c9d7..ed98eb2972 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -296,7 +296,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Stack and heap information diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 2017250006..a17edf151d 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -444,7 +444,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 15b4d8d867..8764c4b40e 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -419,7 +419,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index f124164dc8..adfa3a64f0 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -428,7 +428,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index 1138094ec3..d25b487819 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -419,7 +419,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index eef3c1dc19..45cecde90b 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -461,7 +461,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/shenzhou/Kconfig b/nuttx/configs/shenzhou/Kconfig new file mode 100644 index 0000000000..c6be488702 --- /dev/null +++ b/nuttx/configs/shenzhou/Kconfig @@ -0,0 +1,19 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +if ARCH_BOARD_SHENZHOU +config ARCH_LEDS + bool "NuttX LED support" + default n + ---help--- + "Support control of board LEDs by NuttX to indicate system state" + +config ARCH_BUTTONS + bool "Button support" + default n + ---help--- + "Support interfaces to use buttons provided by the board." + +endif diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index c87ccb1ca7..2479dd1da0 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -411,7 +411,7 @@ Shenzhou-specific Configuration Options CONFIG_ARCH_CHIP_name - For use in C code to identify the exact chip: - CONFIG_ARCH_CHIP_STM32F107VCT=y + CONFIG_ARCH_CHIP_STM32F107VC=y CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock configuration features. @@ -443,17 +443,6 @@ Shenzhou-specific Configuration Options CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP - In addition to internal SRAM, SRAM may also be available through the FSMC. - In order to use FSMC SRAM, the following additional things need to be - present in the NuttX configuration file: - - CONFIG_STM32_FSMC_SRAM - Indicates that SRAM is available via the - FSMC (as opposed to an LCD or FLASH). - - CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex) - - CONFIG_HEAP2_END - The size of the SRAM in the FSMC address space (decimal) - CONFIG_ARCH_IRQPRIO - The STM32107xxx supports interrupt prioritization CONFIG_ARCH_IRQPRIO=y @@ -479,71 +468,47 @@ Shenzhou-specific Configuration Options Individual subsystems can be enabled: - AHB1 - ---- - CONFIG_STM32_CRC - CONFIG_STM32_BKPSRAM - CONFIG_STM32_CCMDATARAM + AHB + --- CONFIG_STM32_DMA1 CONFIG_STM32_DMA2 + CONFIG_STM32_CRC CONFIG_STM32_ETHMAC - CONFIG_STM32_OTGHS - - AHB2 - ---- - CONFIG_STM32_DCMI - CONFIG_STM32_CRYP - CONFIG_STM32_HASH - CONFIG_STM32_RNG CONFIG_STM32_OTGFS + CONFIG_STM32_IWDG + CONFIG_STM32_PWR -- Required for RTC - AHB3 - ---- - CONFIG_STM32_FSMC - - APB1 - ---- + APB1 (low speed) + ---------------- + CONFIG_STM32_RTC + CONFIG_STM32_BKP CONFIG_STM32_TIM2 CONFIG_STM32_TIM3 CONFIG_STM32_TIM4 CONFIG_STM32_TIM5 CONFIG_STM32_TIM6 CONFIG_STM32_TIM7 - CONFIG_STM32_TIM12 - CONFIG_STM32_TIM13 - CONFIG_STM32_TIM14 - CONFIG_STM32_WWDG - CONFIG_STM32_IWDG - CONFIG_STM32_SPI2 - CONFIG_STM32_SPI3 CONFIG_STM32_USART2 CONFIG_STM32_USART3 CONFIG_STM32_UART4 CONFIG_STM32_UART5 + CONFIG_STM32_SPI2 + CONFIG_STM32_SPI3 CONFIG_STM32_I2C1 CONFIG_STM32_I2C2 - CONFIG_STM32_I2C3 CONFIG_STM32_CAN1 CONFIG_STM32_CAN2 CONFIG_STM32_DAC1 CONFIG_STM32_DAC2 - CONFIG_STM32_PWR -- Required for RTC + CONFIG_STM32_WWDG - APB2 - ---- + APB2 (high speed) + ----------------- CONFIG_STM32_TIM1 - CONFIG_STM32_TIM8 + CONFIG_STM32_SPI1 CONFIG_STM32_USART1 - CONFIG_STM32_USART6 CONFIG_STM32_ADC1 CONFIG_STM32_ADC2 - CONFIG_STM32_ADC3 - CONFIG_STM32_SDIO - CONFIG_STM32_SPI1 - CONFIG_STM32_SYSCFG - CONFIG_STM32_TIM9 - CONFIG_STM32_TIM10 - CONFIG_STM32_TIM11 Timer devices may be used for different purposes. One special purpose is to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn diff --git a/nuttx/configs/shenzhou/nsh/Make.defs b/nuttx/configs/shenzhou/nsh/Make.defs new file mode 100644 index 0000000000..dd3db80dea --- /dev/null +++ b/nuttx/configs/shenzhou/nsh/Make.defs @@ -0,0 +1,190 @@ +############################################################################ +# configs/shenzhou/nsh/Make.defs +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk + +# Setup for the selected toolchain + +ifeq ($(CONFIG_STM32_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = arm-atollic-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + ARCROSSDEV = arm-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_RAISONANCE),y) + # Raisonance RIDE7 under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + ARCROSSDEV = arm-elf- + ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + MAXOPTIMIZATION = -Os +endif + +LDSCRIPT = ld.script + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" + MAXOPTIMIZATION = -O2 +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") + ARCHOPTIMIZATION = -g +else + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +define PREPROCESS + @echo "CPP: $1->$2" + @$(CPP) $(CPPFLAGS) $1 -o $2 +endef + +define COMPILE + @echo "CC: $1" + @$(CC) -c $(CFLAGS) $1 -o $2 +endef + +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + +define ASSEMBLE + @echo "AS: $1" + @$(CC) -c $(AFLAGS) $1 -o $2 +endef + +define ARCHIVE + echo "AR: $2"; \ + $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } +endef + +define CLEAN + @rm -f *.o *.a +endef + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe +HOSTLDFLAGS = + diff --git a/nuttx/configs/shenzhou/nsh/setenv.sh b/nuttx/configs/shenzhou/nsh/setenv.sh new file mode 100755 index 0000000000..1ba3363933 --- /dev/null +++ b/nuttx/configs/shenzhou/nsh/setenv.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# configs/shenzhou/nsh/setenv.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the RIDE +# toolchain under windows. You will also have to edit this if you install +# the RIDE toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index bbab5615d5..c1c806a416 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -248,7 +248,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/mount diff --git a/nuttx/configs/sim/nsh2/defconfig b/nuttx/configs/sim/nsh2/defconfig index bf14be9e13..e5066c59dc 100644 --- a/nuttx/configs/sim/nsh2/defconfig +++ b/nuttx/configs/sim/nsh2/defconfig @@ -300,7 +300,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/nx diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig index 13159f00ed..c8ba9cdbb1 100644 --- a/nuttx/configs/sim/nx/defconfig +++ b/nuttx/configs/sim/nx/defconfig @@ -276,7 +276,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/nx diff --git a/nuttx/configs/sim/nx11/defconfig b/nuttx/configs/sim/nx11/defconfig index 58146ce18e..471c3ed038 100644 --- a/nuttx/configs/sim/nx11/defconfig +++ b/nuttx/configs/sim/nx11/defconfig @@ -283,7 +283,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/nx diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig index 4f7586e856..d48ae776c3 100644 --- a/nuttx/configs/sim/nxwm/defconfig +++ b/nuttx/configs/sim/nxwm/defconfig @@ -332,7 +332,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/nx diff --git a/nuttx/configs/sim/touchscreen/defconfig b/nuttx/configs/sim/touchscreen/defconfig index 3ef5553812..be31e95c99 100644 --- a/nuttx/configs/sim/touchscreen/defconfig +++ b/nuttx/configs/sim/touchscreen/defconfig @@ -270,7 +270,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Settings for examples/nx diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index 942f3e4ba3..30fe41a4f8 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -427,7 +427,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index 102b091407..5e7842bcd4 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -454,7 +454,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index e79cdb8c02..1d2793ea0d 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -489,7 +489,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index d5fd9a30c9..e3fb34dc42 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -439,7 +439,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 20e276a6ab..5ae880cf9d 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -589,7 +589,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 7a7eaf1d9d..9a3dd39104 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -512,7 +512,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index 6084a228a5..a4858f38d7 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -514,7 +514,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index 554b15f6f6..e69649cb38 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -511,7 +511,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index 4e95c11082..9fb837789d 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -511,7 +511,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index cb93364334..54d7f88edc 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -447,7 +447,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 370399882c..1c17a6a4cf 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -634,7 +634,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index 829e551969..fb591eac10 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -462,7 +462,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 72ef6cc672..76d79532d6 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -446,7 +446,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 433fe97d27..e8decd4117 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -581,7 +581,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index ef5c2da964..383b209cbb 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -574,7 +574,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 591f246163..61e37c12ec 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -689,7 +689,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index 03ee777f4f..a2181e03b5 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -676,7 +676,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index bd59f47de9..ff2ee370ec 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -710,7 +710,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 30ec69419d..178a09fed8 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -580,7 +580,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 550f654ba0..e6dc096c68 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -586,7 +586,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index 4e22244bb5..b3d39ef9a2 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -594,7 +594,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index e21c1070bd..0d5dd05897 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -587,7 +587,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 34f84db074..2fe2e7d8e7 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -689,7 +689,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index dfb837e8a5..8696db2790 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -636,7 +636,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 417201f3ea..32732d0c81 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -660,7 +660,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 88d3ecb8d3..d9146a8471 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -722,7 +722,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 2b95735bb4..6508ef35a8 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -592,7 +592,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 9dc5bfc28f..4309ddf795 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -599,7 +599,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 8f3ea36dc7..2dcf6be89d 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -690,7 +690,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 12848ddee8..fc957be038 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -638,7 +638,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index f99af0233d..667f8be736 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -641,7 +641,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 8657d7edfd..3cdd9dd00e 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -597,7 +597,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 4608c16c68..3b412fdc12 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -657,7 +657,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index d52bf55090..f6ffa2ae5a 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -460,7 +460,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index ce09306f0c..640597ae2a 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -414,7 +414,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 76704a121a..3f1efe5ab0 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -457,7 +457,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index aa61354717..da53a57625 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -363,7 +363,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index 7108d27fee..d53cb1dce6 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -374,7 +374,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index 87931ee248..8b77122f75 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -382,7 +382,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index ca1dbe3350..b263f26350 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -428,7 +428,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index 1bb41c3108..fa0b764d4d 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -425,7 +425,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index c198067df5..b0a76b4809 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -447,7 +447,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index dcbdc88ba0..33e82487ca 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -446,7 +446,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index 0ad714e67b..883dc46fcf 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -304,7 +304,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index 02633fbf50..a705d4bf1a 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -304,7 +304,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Architecture-specific NSH options diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 0ee46dec07..44900ce92c 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -477,7 +477,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=40 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 748e766e20..4792f02e41 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -205,7 +205,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Stack and heap information diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index a91a7a5783..bb054bc75f 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -201,7 +201,7 @@ CONFIG_NSH_ROMFSSECTSIZE=64 CONFIG_NSH_FATDEVNO=1 CONFIG_NSH_FATSECTSIZE=512 CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT=/tmp +CONFIG_NSH_FATMOUNTPT="/tmp" # # Stack and heap information diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig index a738bd102d..465a62b618 100644 --- a/nuttx/drivers/Kconfig +++ b/nuttx/drivers/Kconfig @@ -126,6 +126,59 @@ config SPI_CMDDATA endif +config RTC + bool "RTC support" + default n + ---help--- + This selection enables configuration of a real time clock (RTCdriver. + See include/nuttx/rtc.h for further watchdog timer driver information. + Most RTC drivers are MCU specific and may require other specific settings. + +config RTC_DATETIME + bool "Date/Time RTC support" + default n + depends on RTC + ---help--- + There are two general types of RTC: (1) A simple battery backed counter + that keeps the time when power is down, and (2) a full date / time RTC the + provides the date and time information, often in BCD format. If + RTC_DATETIME is selected, it specifies this second kind of RTC. In this + case, the RTC is used to "seed" the normal NuttX timer and the NuttX system + timer provides for higher resolution time. + +config RTC_HIRES + bool "Hi-Res RTC support" + default n + depends on RTC && !RTC_DATETIME + ---help--- + If RTC_DATETIME not selected, then the simple, battery backed counter is + used. There are two different implementations of such simple counters + based on the time resolution of the counter: The typical RTC keeps time + to resolution of 1 second, usually supporting a 32-bit time_t value. In + this case, the RTC is used to "seed" the normal NuttX timer and the NuttX + timer provides for higherresoution time. + + If RTC_HIRES is enabled in the NuttX configuration, then the RTC provides + higher resolution time and completely replaces the system timer for purpose + of date and time. + +config RTC_FREQUENCY + int "Hi-Res RTC frequency" + default 1 + depends on RTC && !RTC_DATETIME && RTC_HIRES + ---help--- + If RTC_HIRES is defined, then the frequency of the high resolution RTC + must be provided. If RTC_HIRES is not defined, RTC_FREQUENCY is assumed + to be one Hz. + +config RTC_ALARM + bool "RTC alarm support" + default n + depends on RTC + ---help--- + Enable if the RTC hardware supports setting of an alarm. A callback + function will be executed when the alarm goes off. + config WATCHDOG bool "Watchdog timer support" default n diff --git a/nuttx/drivers/mmcsd/Kconfig b/nuttx/drivers/mmcsd/Kconfig index fc682e7068..c224f220af 100644 --- a/nuttx/drivers/mmcsd/Kconfig +++ b/nuttx/drivers/mmcsd/Kconfig @@ -40,7 +40,7 @@ config MMCSD_HAVECARDDETECT config MMCSD_SPI bool "MMC/SD spi transfer support" default y - + config MMCSD_SPICLOCK int "MMC/SD maximum SPI clock" default 20000000 From 8269f5320b2ddae57c42e44dfeb03ebceebe995b Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 03:31:46 +0000 Subject: [PATCH 33/95] Kconfig: Standardize board LED and button configurations git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5112 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/nshlib/Kconfig | 7 +- nuttx/arch/arm/Kconfig | 6 - nuttx/arch/mips/Kconfig | 6 - nuttx/configs/Kconfig | 114 +++++++ nuttx/configs/avr32dev1/Kconfig | 19 -- nuttx/configs/demo9s12ne64/Kconfig | 12 - nuttx/configs/ea3131/Kconfig | 12 - nuttx/configs/ea3152/Kconfig | 12 - nuttx/configs/hymini-stm32v/Kconfig | 19 -- nuttx/configs/kwikstik-k40/Kconfig | 12 - nuttx/configs/lincoln60/Kconfig | 12 - nuttx/configs/lpc4330-xplorer/Kconfig | 12 - nuttx/configs/ne64badge/Kconfig | 12 - nuttx/configs/olimex-lpc1766stk/Kconfig | 19 -- nuttx/configs/olimex-stm32-p107/Kconfig | 12 - nuttx/configs/olimex-strp711/Kconfig | 12 - nuttx/configs/sam3u-ek/Kconfig | 19 -- nuttx/configs/shenzhou/Kconfig | 12 - nuttx/configs/shenzhou/src/up_leds.c | 401 ------------------------ nuttx/configs/skp16c26/Kconfig | 12 - nuttx/configs/stm3210e-eval/Kconfig | 19 -- nuttx/configs/stm3220g-eval/Kconfig | 18 -- nuttx/configs/stm3240g-eval/Kconfig | 18 -- nuttx/configs/stm32f4discovery/Kconfig | 18 -- nuttx/configs/sure-pic32mx/Kconfig | 19 -- nuttx/configs/twr-k60n512/Kconfig | 19 -- nuttx/configs/ubw32/Kconfig | 19 -- 27 files changed, 118 insertions(+), 754 deletions(-) delete mode 100644 nuttx/configs/shenzhou/src/up_leds.c diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index fd1bb7cc8f..c0f7d6a92f 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -202,6 +202,7 @@ config NSH_MMCSDMINOR config NSH_ROMFSETC bool "Support ROMFS start-up script" default n + depends on FS_ROMFS ---help--- Mount a ROMFS filesystem at /etc and provide a startup script at /etc/init.d/rcS. The default startup script will mount @@ -242,8 +243,6 @@ config NSH_ROMFSSECTSIZE increased if the ROMFS volume were to be become large. Any value selected must be a power of 2. -endif - config NSH_FATDEVNO int "FAT block device minor number" default 0 @@ -279,7 +278,9 @@ config NSH_FATMOUNTPT ---help--- When the default rcS file used when NSH_ROMFSETC is selected, it will mount a FAT FS under /tmp. This is the location where the FAT - FS will be mounted. Default is /tmp. + FS will be mounted. Default is "/tmp". + +endif if NSH_LIBRARY config NSH_CONSOLE diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 3343d7c474..6550950e73 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -216,12 +216,6 @@ config PAGING If set =y in your configation file, this setting will enable the on-demand paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html. -config ARCH_LEDS - bool "Use board LEDs to show state" - default y - ---help--- - Use LEDs to show state. Unique to boards that have LEDs - config ARCH_INTERRUPTSTACK bool "Use interrupt stack" default y diff --git a/nuttx/arch/mips/Kconfig b/nuttx/arch/mips/Kconfig index 0d34ac2c8a..cfa3d589d4 100644 --- a/nuttx/arch/mips/Kconfig +++ b/nuttx/arch/mips/Kconfig @@ -27,12 +27,6 @@ config ARCH_CHIP string default "pic32mx" if ARCH_CHIP_PIC32MX -config ARCH_LEDS - bool "Use board LEDs to show state" - default y - ---help--- - Use LEDs to show state. Unique to boards that have LEDs - config ARCH_INTERRUPTSTACK bool "Use interrupt stack" default y diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 01a34e8a7f..89b742082d 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -23,6 +23,9 @@ config ARCH_BOARD_AMBER config ARCH_BOARD_AVR32DEV1 bool "Atmel AVR32DEV1 board" depends on ARCH_CHIP_AT32UC3B0256 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- This is a port of NuttX to the Atmel AVR32DEV1 board. That board is based on the Atmel AT32UC3B0256 MCU and uses a specially patched @@ -34,6 +37,7 @@ config ARCH_BOARD_AVR32DEV1 config ARCH_BOARD_C5471EVM bool "Spectrum Digital C5471 evaluation board" depends on ARCH_CHIP_C5471 + select ARCH_HAVE_LEDS ---help--- This is a port to the Spectrum Digital C5471 evaluation board. The TMS320C5471 is a dual core processor from TI with an ARM7TDMI general @@ -62,6 +66,8 @@ config ARCH_BOARD_COMPALE99 config ARCH_BOARD_DEMOS92S12NEC64 bool "Freescale DMO9S12NE64 board" depends on ARCH_CHIP_MCS92S12NEC64 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it @@ -70,6 +76,8 @@ config ARCH_BOARD_DEMOS92S12NEC64 config ARCH_BOARD_EA3131 bool "Embedded Artists EA3131 Development board" depends on ARCH_CHIP_LPC3131 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- Embedded Artists EA3131 Development board. This board is based on the an NXP LPC3131 MCU. This OS is built with the arm-elf toolchain*. @@ -78,6 +86,8 @@ config ARCH_BOARD_EA3131 config ARCH_BOARD_EA3152 bool "Embedded Artists EA3152 Development board" depends on ARCH_CHIP_LPC3152 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- Embedded Artists EA3152 Development board. This board is based on the an NXP LPC3152 MCU. This OS is built with the arm-elf toolchain*. @@ -87,6 +97,7 @@ config ARCH_BOARD_EA3152 config ARCH_BOARD_EAGLE100 bool "Micromint Eagle-100 Development board" depends on ARCH_CHIP_LM3S6918 + select ARCH_HAVE_LEDS ---help--- Micromint Eagle-100 Development board. This board is based on the an ARM Cortex-M3 MCU, the Luminary LM3S6918. This OS is built with the @@ -95,6 +106,7 @@ config ARCH_BOARD_EAGLE100 config ARCH_BOARD_EKK_LM3S9B96 bool "TI/Stellaris EKK-LM3S9B96" depends on ARCH_CHIP_LM3S9B96 + select ARCH_HAVE_LEDS ---help--- TI/Stellaris EKK-LM3S9B96 board. This board is based on the an EKK-LM3S9B96 which is a Cortex-M3. @@ -102,6 +114,7 @@ config ARCH_BOARD_EKK_LM3S9B96 config ARCH_BOARD_EZ80F910200KITG bool "ZiLOG ez80f0910200kitg development kit" depends on ARCH_CHIP_EZ80F91 + select ARCH_HAVE_LEDS ---help--- ez80Acclaim! Microcontroller. This port use the ZiLOG ez80f0910200kitg development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line @@ -110,6 +123,8 @@ config ARCH_BOARD_EZ80F910200KITG config ARCH_BOARD_EZ80F910200ZCO bool "ZiLOG ez80f0910200zco development kit" depends on ARCH_CHIP_EZ80F91 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- ez80Acclaim! Microcontroller. This port use the Zilog ez80f0910200zco development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line @@ -118,6 +133,9 @@ config ARCH_BOARD_EZ80F910200ZCO config ARCH_BOARD_HYMINI_STM32V bool "HY-Mini STM32v board" depends on ARCH_CHIP_STM32F103VCT + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- A configuration for the HY-Mini STM32v board. This board is based on the STM32F103VCT chip. @@ -125,12 +143,18 @@ config ARCH_BOARD_HYMINI_STM32V config ARCH_BOARD_LINCOLN60 bool "Micromint Lincoln 60 board" depends on ARCH_CHIP_LPC1769 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- Micromint Lincoln 60 board using the NXP LPC1769 MCU. config ARCH_BOARD_KWIKSTIK_K40 bool "FreeScale KwikStik-K40 development board" depends on ARCH_CHIP_MK40X256VLQ100 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- Kinetis K40 Cortex-M4 MCU. This port uses the FreeScale KwikStik-K40 development board. @@ -138,6 +162,7 @@ config ARCH_BOARD_KWIKSTIK_K40 config ARCH_BOARD_LM3S6432S2E bool "Stellaris RDK-S2E Reference Design Kit" depends on ARCH_CHIP_LM3S6432 + select ARCH_HAVE_LEDS ---help--- Stellaris RDK-S2E Reference Design Kit and the MDL-S2E Ethernet to Serial module. @@ -145,6 +170,7 @@ config ARCH_BOARD_LM3S6432S2E config ARCH_BOARD_LM3S6965EK bool "Stellaris LM3S6965 Evaluation Kit" depends on ARCH_CHIP_LM3S6965 + select ARCH_HAVE_LEDS ---help--- Stellaris LM3S6965 Evaluation Kit. This board is based on the an ARM Cortex-M3 MCU, the Luminary/TI LM3S6965. This OS is built with the @@ -153,6 +179,7 @@ config ARCH_BOARD_LM3S6965EK config ARCH_BOARD_LM3S8962EK bool "Stellaris LMS38962 Evaluation Kit" depends on ARCH_CHIP_LM3S8962 + select ARCH_HAVE_LEDS ---help--- Stellaris LMS38962 Evaluation Kit. @@ -166,6 +193,9 @@ config ARCH_BOARD_LPCXPRESSO config ARCH_BOARD_LPC4330_XPLORER bool "NXG LPC4330-Xplorer" depends on ARCH_CHIP_LPC4330FET100 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- NXG Technologoies LPC4330 Xplorer board. This board is based on the LPC4330FET100. The Code Red toolchain is used by default. @@ -181,6 +211,7 @@ config ARCH_BOARD_M68332EVB config ARCH_BOARD_MBED bool "mbed LCP1768" depends on ARCH_CHIP_LPC1768 + select ARCH_HAVE_LEDS ---help--- The configurations in this directory support the mbed board (http://mbed.org) that features the NXP LPC1768 microcontroller. This OS is also built @@ -189,6 +220,7 @@ config ARCH_BOARD_MBED config ARCH_BOARD_MCU123 bool "mcu123.com LPC2148 Development Board" depends on ARCH_CHIP_LPC2148 + select ARCH_HAVE_LEDS ---help--- This port is for the NXP LPC2148 as provided on the mcu123.com lpc214x development board. This OS is also built with the arm-elf @@ -205,6 +237,7 @@ config ARCH_BOARD_MICROPENDOUS3 config ARCH_BOARD_MX1ADS bool "Motorola MX1ADS development board" depends on ARCH_CHIP_IMX1 + select ARCH_HAVE_LEDS ---help--- This is a port to the Motorola MX1ADS development board. That board is based on the Freescale i.MX1 processor. The i.MX1 is an ARM920T. @@ -214,6 +247,8 @@ config ARCH_BOARD_MX1ADS config ARCH_BOARD_NE64BADGE bool "FEG NE64 /PoE Badge board" depends on ARCH_CHIP_MCS92S12NEC64 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- Future Electronics Group NE64 /PoE Badge board based on the MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain. @@ -223,6 +258,7 @@ config ARCH_BOARD_NE64BADGE config ARCH_BOARD_NTOSD_DM320 bool "Neuros OSD v1.0 Dev Board" depends on ARCH_CHIP_DM320 + select ARCH_HAVE_LEDS ---help--- This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-elf toolchain*: see @@ -241,6 +277,7 @@ config ARCH_BOARD_NTOSD_DM320 config ARCH_BOARD_NUCLEUS2G bool "Nucleus 2G board" depends on ARCH_CHIP_LPC1768 + select ARCH_HAVE_LEDS ---help--- This port uses the Nucleus 2G board (with Babel CAN board). This board features an NXP LPC1768 processor. See the 2G website (http://www.2g-eng.com/) @@ -249,6 +286,9 @@ config ARCH_BOARD_NUCLEUS2G config ARCH_BOARD_LPC1766STK bool "Olimex LPC1766-STK board" depends on ARCH_CHIP_LPC1766 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under Linux or Cygwin. STATUS: Complete and mature. @@ -256,6 +296,7 @@ config ARCH_BOARD_LPC1766STK config ARCH_BOARD_MIRTOO bool "Mirtoo PIC32 Module from Dimitech" depends on ARCH_CHIP_PIC32MX250F128D + select ARCH_HAVE_LEDS ---help--- This is the port to the DTX1-4000L "Mirtoo" module. This module uses MicroChip PIC32MX250F128D. See http://www.dimitech.com/ for further information. @@ -263,6 +304,7 @@ config ARCH_BOARD_MIRTOO config ARCH_BOARD_OLIMEXLPC2378 bool "Olimex-lpc2378 board" depends on ARCH_CHIP_LPC2378 + select ARCH_HAVE_LEDS ---help--- This port uses the Olimex-lpc2378 board and a GNU arm-elf toolchain* under Linux or Cygwin. STATUS: ostest and NSH configurations available. @@ -271,6 +313,8 @@ config ARCH_BOARD_OLIMEXLPC2378 config ARCH_BOARD_OLIMEX_STRP711 bool "Olimex STR-P711 board" depends on ARCH_CHIP_STR71X + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- This port uses the Olimex STR-P711 board and a GNU arm-elf toolchain* under Linux or Cygwin. See the http://www.olimex.com/dev/str-p711.html" for @@ -299,6 +343,7 @@ config ARCH_BOARD_PCBLOGICPIC32MX config ARCH_BOARD_PIC32_STARTERKIT bool "Microchip PIC32 Ethernet Starter Kit (DM320004)" depends on ARCH_CHIP_PIC32MX795F512L + select ARCH_HAVE_LEDS ---help--- This is the port of NuttX to the Microchip PIC32 Ethernet Starter Kit (DM320004) with the Multimedia Expansion Board (MEB, DM320005). @@ -307,6 +352,7 @@ config ARCH_BOARD_PIC32_STARTERKIT config ARCH_BOARD_PIC32_PIC32MX7MMB bool "Mikroelektronika PIC32MX7 MMB" depends on ARCH_CHIP_PIC32MX795F512L + select ARCH_HAVE_LEDS ---help--- This is the port NuttX to the Mikroelektronika PIC32MX7 Multimedia Board (MMB). See http://www.mikroe.com/ for further information. @@ -314,6 +360,7 @@ config ARCH_BOARD_PIC32_PIC32MX7MMB config ARCH_BOARD_PJRC_87C52 bool "PJRC 87C52 development system" depends on ARCH_CHIP_8052 + select ARCH_HAVE_LEDS ---help--- 8051 Microcontroller. This port uses the PJRC 87C52 development system and the SDCC toolchain. This port is not quite ready for prime time. @@ -341,12 +388,18 @@ config ARCH_BOARD_RGMP config ARCH_BOARD_SAM3UEK bool "Atmel SAM3U-EK development board" depends on ARCH_CHIP_AT91SAM3U4E + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- The port of NuttX to the Atmel SAM3U-EK development board. config ARCH_BOARD_SHENZHOU bool "Shenzhou STM32F107 board" depends on ARCH_CHIP_STM32F107VC + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- This port uses the Shenzhou STM32 F107 board and a GNU arm-elf toolchain* under Linux or Cygwin. See the http://www.armjishu.com for further information. This @@ -355,6 +408,8 @@ config ARCH_BOARD_SHENZHOU config ARCH_BOARD_SKP16C26 bool "Renesas SKP16C26 StarterKit" depends on ARCH_CHIP_M30262F8 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- Renesas M16C processor on the Renesas SKP16C26 StarterKit. This port uses the GNU m32c toolchain. STATUS: The port is complete but untested @@ -363,6 +418,9 @@ config ARCH_BOARD_SKP16C26 config ARCH_BOARD_STM3210E_EVAL bool "STMicro STM3210E-EVAL development board" depends on ARCH_CHIP_STM32F103ZET6 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- STMicro STM3210E-EVAL development board based on the STMicro STM32F103ZET6 microcontroller (ARM Cortex-M3). This port uses the GNU Cortex-M3 @@ -371,6 +429,9 @@ config ARCH_BOARD_STM3210E_EVAL config ARCH_BOARD_STM3220G_EVAL bool "STMicro STM3220G-EVAL development board" depends on ARCH_CHIP_STM32F207IG + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- STMicro STM3220G-EVAL development board based on the STMicro STM32F407IG microcontroller (ARM Cortex-M3). @@ -378,6 +439,9 @@ config ARCH_BOARD_STM3220G_EVAL config ARCH_BOARD_STM3240G_EVAL bool "STMicro STM3240G-EVAL development board" depends on ARCH_CHIP_STM32F407IG + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- STMicro STM3240G-EVAL development board based on the STMicro STM32F103ZET6 microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4 @@ -386,12 +450,18 @@ config ARCH_BOARD_STM3240G_EVAL config ARCH_BOARD_STM32F4_DISCOVERY bool "STMicro STM32F4-Discovery board" depends on ARCH_CHIP_STM32F407VG + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- STMicro STM32F4-Discovery board boased on the STMIcro STM32F407VGT6 MCU. config ARCH_BOARD_SUREPIC32MX bool "Sure PIC32MX boards" depends on ARCH_CHIP_PIC32MX440F512H + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure Electronics (http://www.sureelectronics.net/). This board features @@ -402,6 +472,7 @@ config ARCH_BOARD_SUREPIC32MX config ARCH_BOARD_TEENSY bool "PJRC Teensy++ 2.0 board" depends on ARCH_CHIP_AT90USB1286 + select ARCH_HAVE_LEDS ---help--- This is the port of NuttX to the PJRC Teensy++ 2.0 board. This board is developed by http://pjrc.com/teensy/. The Teensy++ 2.0 is based @@ -410,6 +481,9 @@ config ARCH_BOARD_TEENSY config ARCH_BOARD_TWR_K60N512 bool "FreeScale TWR-K60N512d evelopment board" depends on ARCH_CHIP_MK60N512VMD100 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- Kinetis K60 Cortex-M4 MCU. This port uses the FreeScale TWR-K60N512 development board. @@ -417,6 +491,9 @@ config ARCH_BOARD_TWR_K60N512 config ARCH_BOARD_UBW32 bool "UBW32 v2.4 board from Sparkfun" depends on ARCH_CHIP_PIC32MX460F512L + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS ---help--- This is the port to the Sparkfun UBW32 board. This port uses the original v2.4 board which is based on the MicroChip PIC32MX460F512L. See @@ -427,6 +504,7 @@ config ARCH_BOARD_UBW32 config ARCH_BOARD_US7032EVB1 bool "Hitachi SH-1/US7032EVB1 board" depends on ARCH_CHIP_SH7032 + select ARCH_HAVE_LEDS ---help--- This is a port of the Hitachi SH-1 on the Hitachi SH-1/US7032EVB1 board. STATUS: Work has just began on this port. @@ -434,6 +512,8 @@ config ARCH_BOARD_US7032EVB1 config ARCH_BOARD_VSN bool "SOTEL NetClamps VSN sensor network platform" depends on ARCH_CHIP_STM32F103RET6 + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS ---help--- ISOTEL NetClamps VSN V1.2 ready2go sensor network platform based on the STMicro STM32F103RET6. Contributed by Uros Platise. See @@ -450,6 +530,7 @@ config ARCH_BOARD_XTRS config ARCH_BOARD_Z16F2800100ZCOG bool "Zilog Z16F2800100ZCOG Development Kit" depends on ARCH_CHIP_Z16F281 + select ARCH_HAVE_LEDS ---help--- z16f Microcontroller. This port use the ZiLIG z16f2800100zcog development kit and the Zilog ZDS-II Windows command line tools. The @@ -468,6 +549,7 @@ config ARCH_BOARD_Z80SIM config ARCH_BOARD_Z8ENCORE000ZCO bool "ZiLOG z8encore000zco Development Kit" depends on ARCH_CHIP_Z8F6403 + select ARCH_HAVE_LEDS ---help--- z8Encore! Microcontroller. This port use the ZiLOG z8encore000zco development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line @@ -476,6 +558,7 @@ config ARCH_BOARD_Z8ENCORE000ZCO config ARCH_BOARD_Z8F64200100KI bool "ZiLOG Z8F64200100KIT Development Kit" depends on ARCH_CHIP_Z8F642X + select ARCH_HAVE_LEDS ---help--- z8Encore! Microcontroller. This port use the Zilog z8f64200100kit development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line @@ -562,6 +645,37 @@ config ARCH_BOARD default "sim" if ARCH_BOARD_SIM default "" if ARCH_BOARD_CUSTOM +comment "Common Board Options" + +config ARCH_HAVE_LEDS + bool + +config ARCH_LEDS + bool "Board LEDs support" + default y + depends on ARCH_HAVE_LEDS + ---help--- + Use board LEDs to show NuttX execution status state. Unique to boards that have LEDs + +config ARCH_HAVE_BUTTONS + bool + +config ARCH_BUTTONS + bool "Board button support" + default n + depends on ARCH_HAVE_BUTTONS + ---help--- + "Support interfaces to use buttons provided by the board." + +config ARCH_IRQBUTTONS + bool "Button interrupt support" + default n + depends on ARCH_BUTTONS && ARCH_HAVE_IRQBUTTONS + ---help--- + "Support interrupts on button presses and releases." + +comment "Board-Specific Options" + if ARCH_BOARD_AMBER source "configs/amber/Kconfig" endif diff --git a/nuttx/configs/avr32dev1/Kconfig b/nuttx/configs/avr32dev1/Kconfig index 017aaf5124..3312fdfd45 100644 --- a/nuttx/configs/avr32dev1/Kconfig +++ b/nuttx/configs/avr32dev1/Kconfig @@ -4,24 +4,5 @@ # if ARCH_BOARD_AVR32DEV1 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif diff --git a/nuttx/configs/demo9s12ne64/Kconfig b/nuttx/configs/demo9s12ne64/Kconfig index 1dd59710d3..3f685365b3 100644 --- a/nuttx/configs/demo9s12ne64/Kconfig +++ b/nuttx/configs/demo9s12ne64/Kconfig @@ -4,17 +4,5 @@ # if ARCH_BOARD_DEMOS92S12NEC64 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/ea3131/Kconfig b/nuttx/configs/ea3131/Kconfig index 705599f340..ee64802ddf 100644 --- a/nuttx/configs/ea3131/Kconfig +++ b/nuttx/configs/ea3131/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_EA3131 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/ea3152/Kconfig b/nuttx/configs/ea3152/Kconfig index fe027ea91c..c23751a3d2 100644 --- a/nuttx/configs/ea3152/Kconfig +++ b/nuttx/configs/ea3152/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_EA3152 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/hymini-stm32v/Kconfig b/nuttx/configs/hymini-stm32v/Kconfig index f6bc7f233d..860c1d32b3 100644 --- a/nuttx/configs/hymini-stm32v/Kconfig +++ b/nuttx/configs/hymini-stm32v/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_HYMINI_STM32V -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support EXTI interrupts on button presses and releases." - endif diff --git a/nuttx/configs/kwikstik-k40/Kconfig b/nuttx/configs/kwikstik-k40/Kconfig index 3342a978bc..5172da5e7e 100644 --- a/nuttx/configs/kwikstik-k40/Kconfig +++ b/nuttx/configs/kwikstik-k40/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_KWIKSTIK_K40 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/lincoln60/Kconfig b/nuttx/configs/lincoln60/Kconfig index a912484576..113d41d7fd 100644 --- a/nuttx/configs/lincoln60/Kconfig +++ b/nuttx/configs/lincoln60/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_LINCOLN60 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/lpc4330-xplorer/Kconfig b/nuttx/configs/lpc4330-xplorer/Kconfig index b3bdb01d0f..82597636d9 100644 --- a/nuttx/configs/lpc4330-xplorer/Kconfig +++ b/nuttx/configs/lpc4330-xplorer/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_LPC4330_XPLORER -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/ne64badge/Kconfig b/nuttx/configs/ne64badge/Kconfig index e3ac8b4e96..44fb67fdf4 100644 --- a/nuttx/configs/ne64badge/Kconfig +++ b/nuttx/configs/ne64badge/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_NE64BADGE -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/olimex-lpc1766stk/Kconfig b/nuttx/configs/olimex-lpc1766stk/Kconfig index 659e49e41f..b86dd2342a 100644 --- a/nuttx/configs/olimex-lpc1766stk/Kconfig +++ b/nuttx/configs/olimex-lpc1766stk/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_LPC1766STK -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif diff --git a/nuttx/configs/olimex-stm32-p107/Kconfig b/nuttx/configs/olimex-stm32-p107/Kconfig index 89adc58ffe..b0b8a29d6c 100644 --- a/nuttx/configs/olimex-stm32-p107/Kconfig +++ b/nuttx/configs/olimex-stm32-p107/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_OLIMEX_STM32P107 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/olimex-strp711/Kconfig b/nuttx/configs/olimex-strp711/Kconfig index d8ee9b186d..9771aba6df 100644 --- a/nuttx/configs/olimex-strp711/Kconfig +++ b/nuttx/configs/olimex-strp711/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_OLIMEX_STRP711 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/sam3u-ek/Kconfig b/nuttx/configs/sam3u-ek/Kconfig index 79559a3d1e..f4daa81fe3 100644 --- a/nuttx/configs/sam3u-ek/Kconfig +++ b/nuttx/configs/sam3u-ek/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_SAM3UEK -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif diff --git a/nuttx/configs/shenzhou/Kconfig b/nuttx/configs/shenzhou/Kconfig index c6be488702..92d2940995 100644 --- a/nuttx/configs/shenzhou/Kconfig +++ b/nuttx/configs/shenzhou/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_SHENZHOU -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/shenzhou/src/up_leds.c b/nuttx/configs/shenzhou/src/up_leds.c deleted file mode 100644 index c7ce0b909c..0000000000 --- a/nuttx/configs/shenzhou/src/up_leds.c +++ /dev/null @@ -1,401 +0,0 @@ -/**************************************************************************** - * configs/shenzhou/src/up_leds.c - * arch/arm/src/board/up_leds.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "chip.h" -#include "up_arch.h" -#include "up_internal.h" -#include "stm32_internal.h" -#include "shenzhou-internal.h" - -/**************************************************************************** - * Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG with - * CONFIG_DEBUG_VERBOSE too) - */ - -#undef LED_DEBUG /* Define to enable debug */ - -#ifdef LED_DEBUG -# define leddbg lldbg -# define ledvdbg llvdbg -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/* The following definitions map the encoded LED setting to GPIO settings */ - -#define SHENZHOU_LED1 (1 << 0) -#define SHENZHOU_LED2 (1 << 1) -#define SHENZHOU_LED3 (1 << 2) -#define SHENZHOU_LED4 (1 << 3) - -#define ON_SETBITS_SHIFT (0) -#define ON_CLRBITS_SHIFT (4) -#define OFF_SETBITS_SHIFT (8) -#define OFF_CLRBITS_SHIFT (12) - -#define ON_BITS(v) ((v) & 0xff) -#define OFF_BITS(v) (((v) >> 8) & 0x0ff) -#define SETBITS(b) ((b) & 0x0f) -#define CLRBITS(b) (((b) >> 4) & 0x0f) - -#define ON_SETBITS(v) (SETBITS(ON_BITS(v)) -#define ON_CLRBITS(v) (CLRBITS(ON_BITS(v)) -#define OFF_SETBITS(v) (SETBITS(OFF_BITS(v)) -#define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v)) - -#define LED_STARTED_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) -#define LED_STARTED_ON_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) -#define LED_STARTED_OFF_SETBITS (0 << OFF_SETBITS_SHIFT) -#define LED_STARTED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -#define LED_HEAPALLOCATE_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) -#define LED_HEAPALLOCATE_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) -#define LED_HEAPALLOCATE_OFF_SETBITS ((SHENZHOU_LED1) << OFF_SETBITS_SHIFT) -#define LED_HEAPALLOCATE_OFF_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -#define LED_IRQSENABLED_ON_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << ON_SETBITS_SHIFT) -#define LED_IRQSENABLED_ON_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) -#define LED_IRQSENABLED_OFF_SETBITS ((SHENZHOU_LED2) << OFF_SETBITS_SHIFT) -#define LED_IRQSENABLED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -#define LED_STACKCREATED_ON_SETBITS ((SHENZHOU_LED3) << ON_SETBITS_SHIFT) -#define LED_STACKCREATED_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED4) << ON_CLRBITS_SHIFT) -#define LED_STACKCREATED_OFF_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << OFF_SETBITS_SHIFT) -#define LED_STACKCREATED_OFF_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -#define LED_INIRQ_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT) -#define LED_INIRQ_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) -#define LED_INIRQ_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) -#define LED_INIRQ_OFF_CLRBITS ((SHENZHOU_LED1) << OFF_CLRBITS_SHIFT) - -#define LED_SIGNAL_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT) -#define LED_SIGNAL_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) -#define LED_SIGNAL_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) -#define LED_SIGNAL_OFF_CLRBITS ((SHENZHOU_LED2) << OFF_CLRBITS_SHIFT) - -#define LED_ASSERTION_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) -#define LED_ASSERTION_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) -#define LED_ASSERTION_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) -#define LED_ASSERTION_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -#define LED_PANIC_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT) -#define LED_PANIC_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) -#define LED_PANIC_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) -#define LED_PANIC_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT) - -/************************************************************************************** - * Private Function Protototypes - **************************************************************************************/ - -/* LED State Controls */ - -static inline void led_clrbits(unsigned int clrbits); -static inline void led_setbits(unsigned int setbits); -static void led_setonoff(unsigned int bits); - -/* LED Power Management */ - -#ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const uint16_t g_ledbits[8] = -{ - (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), - - (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), - - (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), - - (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), - - (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | - LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), - - (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | - LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), - - (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | - LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), - - (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | - LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) -}; - -#ifdef CONFIG_PM -static struct pm_callback_s g_ledscb = -{ - .notify = led_pm_notify, - .prepare = led_pm_prepare, -}; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: led_clrbits - * - * Description: - * Clear all LEDs to the bit encoded state - * - ****************************************************************************/ - -static inline void led_clrbits(unsigned int clrbits) -{ - if ((clrbits & SHENZHOU_LED1) != 0) - { - stm32_gpiowrite(GPIO_LED1, false); - } - - if ((clrbits & SHENZHOU_LED2) != 0) - { - stm32_gpiowrite(GPIO_LED2, false); - } - - if ((clrbits & SHENZHOU_LED3) != 0) - { - stm32_gpiowrite(GPIO_LED3, false); - } - - if ((clrbits & SHENZHOU_LED4) != 0) - { - stm32_gpiowrite(GPIO_LED4, false); - } -} - -/**************************************************************************** - * Name: led_setbits - * - * Description: - * Set all LEDs to the bit encoded state - * - ****************************************************************************/ - -static inline void led_setbits(unsigned int setbits) -{ - if ((setbits & SHENZHOU_LED1) != 0) - { - stm32_gpiowrite(GPIO_LED1, true); - } - - if ((setbits & SHENZHOU_LED2) != 0) - { - stm32_gpiowrite(GPIO_LED2, true); - } - - if ((setbits & SHENZHOU_LED3) != 0) - { - stm32_gpiowrite(GPIO_LED3, true); - } - - if ((setbits & SHENZHOU_LED4) != 0) - { - stm32_gpiowrite(GPIO_LED4, true); - } -} - -/**************************************************************************** - * Name: led_setonoff - * - * Description: - * Set/clear all LEDs to the bit encoded state - * - ****************************************************************************/ - -static void led_setonoff(unsigned int bits) -{ - led_clrbits(CLRBITS(bits)); - led_setbits(SETBITS(bits)); -} - -/**************************************************************************** - * Name: led_pm_notify - * - * Description: - * Notify the driver of new power state. This callback is called after - * all drivers have had the opportunity to prepare for the new power state. - * - ****************************************************************************/ - -#ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) -{ - switch (pmstate) - { - case(PM_NORMAL): - { - /* Restore normal LEDs operation */ - - } - break; - - case(PM_IDLE): - { - /* Entering IDLE mode - Turn leds off */ - - } - break; - - case(PM_STANDBY): - { - /* Entering STANDBY mode - Logic for PM_STANDBY goes here */ - - } - break; - - case(PM_SLEEP): - { - /* Entering SLEEP mode - Logic for PM_SLEEP goes here */ - - } - break; - - default: - { - /* Should not get here */ - - } - break; - } -} -#endif - -/**************************************************************************** - * Name: led_pm_prepare - * - * Description: - * Request the driver to prepare for a new power state. This is a warning - * that the system is about to enter into a new power state. The driver - * should begin whatever operations that may be required to enter power - * state. The driver may abort the state change mode by returning a - * non-zero value from the callback function. - * - ****************************************************************************/ - -#ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) -{ - /* No preparation to change power modes is required by the LEDs driver. - * We always accept the state change by returning OK. - */ - - return OK; -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_ledinit - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -void up_ledinit(void) -{ - /* Configure LED1-4 GPIOs for output */ - - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); -} - -/**************************************************************************** - * Name: up_ledon - ****************************************************************************/ - -void up_ledon(int led) -{ - led_setonoff(ON_BITS(g_ledbits[led])); -} - -/**************************************************************************** - * Name: up_ledoff - ****************************************************************************/ - -void up_ledoff(int led) -{ - led_setonoff(OFF_BITS(g_ledbits[led])); -} - -/**************************************************************************** - * Name: up_ledpminitialize - ****************************************************************************/ - -#ifdef CONFIG_PM -void up_ledpminitialize(void) -{ - /* Register to receive power management callbacks */ - - int ret = pm_register(&g_ledscb); - if (ret != OK) - { - up_ledon(LED_ASSERTION); - } -} -#endif /* CONFIG_PM */ - -#endif /* CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/skp16c26/Kconfig b/nuttx/configs/skp16c26/Kconfig index 377c251b34..7a1044c5e1 100644 --- a/nuttx/configs/skp16c26/Kconfig +++ b/nuttx/configs/skp16c26/Kconfig @@ -4,16 +4,4 @@ # if ARCH_BOARD_SKP16C26 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - endif diff --git a/nuttx/configs/stm3210e-eval/Kconfig b/nuttx/configs/stm3210e-eval/Kconfig index 1af4dcd35a..95ad5f1084 100644 --- a/nuttx/configs/stm3210e-eval/Kconfig +++ b/nuttx/configs/stm3210e-eval/Kconfig @@ -6,25 +6,6 @@ if ARCH_BOARD_STM3210E_EVAL comment "STM3210E-EVAL LCD Hardware Configuration" -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support EXTI interrupts on button presses and releases." - config STM3210E_LCD bool "Select support for the STM3210E-EVAL LCD" default y diff --git a/nuttx/configs/stm3220g-eval/Kconfig b/nuttx/configs/stm3220g-eval/Kconfig index 3f4ef350c4..33e172cfce 100644 --- a/nuttx/configs/stm3220g-eval/Kconfig +++ b/nuttx/configs/stm3220g-eval/Kconfig @@ -4,24 +4,6 @@ # if ARCH_BOARD_STM3220G_EVAL -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support EXTI interrupts on button presses and releases." config STM3220G_LCD bool "Select support for the STM3210E-EVAL LCD" diff --git a/nuttx/configs/stm3240g-eval/Kconfig b/nuttx/configs/stm3240g-eval/Kconfig index 9c56a5381b..ae73d21e43 100644 --- a/nuttx/configs/stm3240g-eval/Kconfig +++ b/nuttx/configs/stm3240g-eval/Kconfig @@ -4,24 +4,6 @@ # if ARCH_BOARD_STM3240G_EVAL -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support EXTI interrupts on button presses and releases." config STM3240G_LCD bool "Select support for the STM3210E-EVAL LCD" diff --git a/nuttx/configs/stm32f4discovery/Kconfig b/nuttx/configs/stm32f4discovery/Kconfig index 2843352b44..af94245c4c 100644 --- a/nuttx/configs/stm32f4discovery/Kconfig +++ b/nuttx/configs/stm32f4discovery/Kconfig @@ -4,24 +4,6 @@ # if ARCH_BOARD_STM32F4_DISCOVERY -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support EXTI interrupts on button presses and releases." config PM_BUTTONS bool "PM Button support" diff --git a/nuttx/configs/sure-pic32mx/Kconfig b/nuttx/configs/sure-pic32mx/Kconfig index fd2a5e2597..03753893d3 100644 --- a/nuttx/configs/sure-pic32mx/Kconfig +++ b/nuttx/configs/sure-pic32mx/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_SUREPIC32MX -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif diff --git a/nuttx/configs/twr-k60n512/Kconfig b/nuttx/configs/twr-k60n512/Kconfig index e0a0ce5750..94e6b725a4 100644 --- a/nuttx/configs/twr-k60n512/Kconfig +++ b/nuttx/configs/twr-k60n512/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_TWR_K60N512 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif diff --git a/nuttx/configs/ubw32/Kconfig b/nuttx/configs/ubw32/Kconfig index c0213392c2..83ed53225b 100644 --- a/nuttx/configs/ubw32/Kconfig +++ b/nuttx/configs/ubw32/Kconfig @@ -4,23 +4,4 @@ # if ARCH_BOARD_UBW32 -config ARCH_LEDS - bool "NuttX LED support" - default n - ---help--- - "Support control of board LEDs by NuttX to indicate system state" - -config ARCH_BUTTONS - bool "Button support" - default n - ---help--- - "Support interfaces to use buttons provided by the board." - -config ARCH_IRQBUTTONS - bool "Button interrupt support" - default n - depends on ARCH_BUTTONS - ---help--- - "Support interrupts on button presses and releases." - endif From 5119467c0f090b90cdbff4718c407cbd7d2be905 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 04:29:48 +0000 Subject: [PATCH 34/95] Remove several unused configuration values git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5113 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttxPortingGuide.html | 7 ------- nuttx/configs/Kconfig | 3 +++ nuttx/configs/README.txt | 4 ---- nuttx/configs/amber/hello/defconfig | 2 -- nuttx/configs/avr32dev1/nsh/defconfig | 2 -- nuttx/configs/avr32dev1/ostest/defconfig | 2 -- nuttx/configs/c5471evm/httpd/defconfig | 2 -- nuttx/configs/c5471evm/nettest/defconfig | 2 -- nuttx/configs/c5471evm/nsh/defconfig | 2 -- nuttx/configs/c5471evm/ostest/defconfig | 2 -- nuttx/configs/compal_e88/nsh_highram/defconfig | 2 -- nuttx/configs/compal_e99/nsh_compalram/defconfig | 2 -- nuttx/configs/compal_e99/nsh_highram/defconfig | 2 -- nuttx/configs/demo9s12ne64/ostest/defconfig | 2 -- nuttx/configs/ea3131/nsh/defconfig | 1 - nuttx/configs/ea3131/ostest/defconfig | 1 - nuttx/configs/ea3131/pgnsh/defconfig | 1 - nuttx/configs/ea3131/usbserial/defconfig | 1 - nuttx/configs/ea3131/usbstorage/defconfig | 1 - nuttx/configs/ea3152/ostest/defconfig | 1 - nuttx/configs/eagle100/httpd/defconfig | 2 -- nuttx/configs/eagle100/nettest/defconfig | 2 -- nuttx/configs/eagle100/nsh/defconfig | 2 -- nuttx/configs/eagle100/nxflat/defconfig | 2 -- nuttx/configs/eagle100/ostest/defconfig | 2 -- nuttx/configs/eagle100/thttpd/defconfig | 2 -- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 2 -- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 2 -- nuttx/configs/ez80f910200kitg/ostest/defconfig | 2 -- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 2 -- nuttx/configs/ez80f910200zco/httpd/defconfig | 2 -- nuttx/configs/ez80f910200zco/nettest/defconfig | 2 -- nuttx/configs/ez80f910200zco/nsh/defconfig | 2 -- nuttx/configs/ez80f910200zco/ostest/defconfig | 2 -- nuttx/configs/ez80f910200zco/poll/defconfig | 2 -- nuttx/configs/hymini-stm32v/buttons/defconfig | 2 -- nuttx/configs/hymini-stm32v/nsh/defconfig | 2 -- nuttx/configs/hymini-stm32v/nsh2/defconfig | 1 - nuttx/configs/hymini-stm32v/nx/defconfig | 2 -- nuttx/configs/hymini-stm32v/nxlines/defconfig | 2 -- nuttx/configs/hymini-stm32v/usbserial/defconfig | 2 -- nuttx/configs/hymini-stm32v/usbstorage/defconfig | 2 -- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 -- nuttx/configs/lincoln60/nsh/defconfig | 2 -- nuttx/configs/lincoln60/ostest/defconfig | 2 -- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 2 -- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 2 -- nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 -- nuttx/configs/lm3s6965-ek/nx/defconfig | 2 -- nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 -- nuttx/configs/lm3s8962-ek/nsh/defconfig | 2 -- nuttx/configs/lm3s8962-ek/nx/defconfig | 2 -- nuttx/configs/lm3s8962-ek/ostest/defconfig | 2 -- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 2 -- nuttx/configs/lpc4330-xplorer/ostest/defconfig | 2 -- nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig | 2 -- nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig | 2 -- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 2 -- nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig | 2 -- nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig | 2 -- .../lpcxpresso-lpc1768/usbstorage/defconfig | 2 -- nuttx/configs/m68332evb/defconfig | 1 - nuttx/configs/mbed/hidkbd/defconfig | 2 -- nuttx/configs/mbed/nsh/defconfig | 2 -- nuttx/configs/mcu123-lpc214x/composite/defconfig | 2 -- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 2 -- nuttx/configs/mcu123-lpc214x/ostest/defconfig | 2 -- nuttx/configs/mcu123-lpc214x/usbserial/defconfig | 2 -- nuttx/configs/mcu123-lpc214x/usbstorage/defconfig | 2 -- nuttx/configs/micropendous3/hello/defconfig | 2 -- nuttx/configs/mirtoo/nsh/defconfig | 2 -- nuttx/configs/mirtoo/nxffs/defconfig | 2 -- nuttx/configs/mirtoo/ostest/defconfig | 2 -- nuttx/configs/mx1ads/ostest/defconfig | 2 -- nuttx/configs/ne64badge/ostest/defconfig | 2 -- nuttx/configs/ntosd-dm320/nettest/defconfig | 2 -- nuttx/configs/ntosd-dm320/nsh/defconfig | 2 -- nuttx/configs/ntosd-dm320/ostest/defconfig | 2 -- nuttx/configs/ntosd-dm320/poll/defconfig | 2 -- nuttx/configs/ntosd-dm320/thttpd/defconfig | 2 -- nuttx/configs/ntosd-dm320/udp/defconfig | 2 -- nuttx/configs/ntosd-dm320/uip/defconfig | 2 -- nuttx/configs/nucleus2g/nsh/defconfig | 2 -- nuttx/configs/nucleus2g/ostest/defconfig | 2 -- nuttx/configs/nucleus2g/usbserial/defconfig | 2 -- nuttx/configs/nucleus2g/usbstorage/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/ftpc/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 2 -- .../configs/olimex-lpc1766stk/slip-httpd/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/thttpd/defconfig | 2 -- .../configs/olimex-lpc1766stk/usbserial/defconfig | 2 -- .../configs/olimex-lpc1766stk/usbstorage/defconfig | 2 -- nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 2 -- nuttx/configs/olimex-lpc2378/nsh/defconfig | 1 - nuttx/configs/olimex-lpc2378/ostest/defconfig | 1 - nuttx/configs/olimex-stm32-p107/nsh/defconfig | 1 - nuttx/configs/olimex-stm32-p107/ostest/defconfig | 2 -- nuttx/configs/olimex-strp711/nettest/defconfig | 2 -- nuttx/configs/olimex-strp711/nsh/defconfig | 2 -- nuttx/configs/olimex-strp711/ostest/defconfig | 2 -- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 2 -- nuttx/configs/pcblogic-pic32mx/ostest/defconfig | 2 -- nuttx/configs/pic32-starterkit/nsh/defconfig | 2 -- nuttx/configs/pic32-starterkit/nsh2/defconfig | 2 -- nuttx/configs/pic32-starterkit/ostest/defconfig | 2 -- nuttx/configs/pic32mx7mmb/nsh/defconfig | 2 -- nuttx/configs/pic32mx7mmb/ostest/defconfig | 2 -- nuttx/configs/pjrc-8051/defconfig | 1 - nuttx/configs/qemu-i486/nsh/defconfig | 1 - nuttx/configs/qemu-i486/ostest/defconfig | 1 - nuttx/configs/rgmp/arm/default/defconfig | 1 - nuttx/configs/rgmp/arm/nsh/defconfig | 1 - nuttx/configs/rgmp/x86/default/defconfig | 1 - nuttx/configs/rgmp/x86/nsh/defconfig | 1 - nuttx/configs/sam3u-ek/knsh/defconfig | 2 -- nuttx/configs/sam3u-ek/nsh/defconfig | 2 -- nuttx/configs/sam3u-ek/nx/defconfig | 2 -- nuttx/configs/sam3u-ek/ostest/defconfig | 2 -- nuttx/configs/sam3u-ek/touchscreen/defconfig | 2 -- nuttx/configs/sim/mount/defconfig | 1 - nuttx/configs/sim/nettest/defconfig | 1 - nuttx/configs/sim/nsh/defconfig | 1 - nuttx/configs/sim/nsh2/defconfig | 1 - nuttx/configs/sim/nx/defconfig | 1 - nuttx/configs/sim/nx11/defconfig | 1 - nuttx/configs/sim/nxffs/defconfig | 1 - nuttx/configs/sim/nxwm/defconfig | 1 - nuttx/configs/sim/ostest/defconfig | 1 - nuttx/configs/sim/pashello/defconfig | 1 - nuttx/configs/sim/touchscreen/defconfig | 1 - nuttx/configs/skp16c26/ostest/defconfig | 2 -- nuttx/configs/stm3210e-eval/RIDE/defconfig | 2 -- nuttx/configs/stm3210e-eval/buttons/defconfig | 2 -- nuttx/configs/stm3210e-eval/composite/defconfig | 2 -- nuttx/configs/stm3210e-eval/nsh/defconfig | 2 -- nuttx/configs/stm3210e-eval/nsh2/defconfig | 2 -- nuttx/configs/stm3210e-eval/nx/defconfig | 2 -- nuttx/configs/stm3210e-eval/nxconsole/defconfig | 2 -- nuttx/configs/stm3210e-eval/nxlines/defconfig | 2 -- nuttx/configs/stm3210e-eval/nxtext/defconfig | 2 -- nuttx/configs/stm3210e-eval/ostest/defconfig | 2 -- nuttx/configs/stm3210e-eval/pm/defconfig | 2 -- nuttx/configs/stm3210e-eval/usbserial/defconfig | 2 -- nuttx/configs/stm3210e-eval/usbstorage/defconfig | 2 -- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 -- nuttx/configs/stm3220g-eval/nettest/defconfig | 2 -- nuttx/configs/stm3220g-eval/nsh/defconfig | 2 -- nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 -- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 -- nuttx/configs/stm3220g-eval/ostest/defconfig | 2 -- nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 -- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 2 -- nuttx/configs/stm3240g-eval/nettest/defconfig | 2 -- nuttx/configs/stm3240g-eval/nsh/defconfig | 2 -- nuttx/configs/stm3240g-eval/nsh2/defconfig | 2 -- nuttx/configs/stm3240g-eval/nxconsole/defconfig | 2 -- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 -- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 -- nuttx/configs/stm3240g-eval/telnetd/defconfig | 2 -- nuttx/configs/stm3240g-eval/webserver/defconfig | 2 -- nuttx/configs/stm32f4discovery/nsh/defconfig | 2 -- nuttx/configs/stm32f4discovery/nxlines/defconfig | 2 -- nuttx/configs/stm32f4discovery/ostest/defconfig | 2 -- nuttx/configs/stm32f4discovery/pm/defconfig | 2 -- nuttx/configs/sure-pic32mx/nsh/defconfig | 2 -- nuttx/configs/sure-pic32mx/ostest/defconfig | 2 -- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 2 -- nuttx/configs/teensy/hello/defconfig | 2 -- nuttx/configs/teensy/nsh/defconfig | 2 -- nuttx/configs/teensy/usbstorage/defconfig | 2 -- nuttx/configs/twr-k60n512/nsh/defconfig | 2 -- nuttx/configs/twr-k60n512/ostest/defconfig | 2 -- nuttx/configs/ubw32/nsh/defconfig | 2 -- nuttx/configs/ubw32/ostest/defconfig | 2 -- nuttx/configs/us7032evb1/nsh/defconfig | 2 -- nuttx/configs/us7032evb1/ostest/defconfig | 2 -- nuttx/configs/vsn/nsh/defconfig | 2 -- nuttx/configs/xtrs/nsh/defconfig | 1 - nuttx/configs/xtrs/ostest/defconfig | 1 - nuttx/configs/xtrs/pashello/defconfig | 1 - nuttx/configs/z16f2800100zcog/ostest/defconfig | 1 - nuttx/configs/z16f2800100zcog/pashello/defconfig | 1 - nuttx/configs/z80sim/nsh/defconfig | 1 - nuttx/configs/z80sim/ostest/defconfig | 1 - nuttx/configs/z80sim/pashello/defconfig | 1 - nuttx/configs/z8encore000zco/ostest/defconfig | 1 - nuttx/configs/z8f64200100kit/ostest/defconfig | 1 - nuttx/net/Kconfig | 14 +++++++------- nuttx/sched/Kconfig | 5 ----- 193 files changed, 10 insertions(+), 360 deletions(-) diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index b5473549ae..06f2c3e6ff 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -5098,9 +5098,6 @@ build
  • CONFIG_NET_MULTICAST: Outgoing multi-cast address support
  • -
  • - CONFIG_NET_FWCACHE_SIZE: number of packets to remember when looking for duplicates -
  • SLIP

    @@ -5803,10 +5800,6 @@ build CONFIG_BOOT_RAMFUNCS: Other configurations may copy just some functions into RAM, either for better performance or for errata workarounds. -
  • - CONFIG_STACK_POINTER: The initial stack pointer (may not be supported - in all architectures). -
  • CONFIG_STACK_ALIGNMENT: Set if the your application has specific stack alignment requirements (may not be supported in all architectures). diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 89b742082d..8c841e7be8 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -667,6 +667,9 @@ config ARCH_BUTTONS ---help--- "Support interfaces to use buttons provided by the board." +config ARCH_HAVE_IRQBUTTONS + bool + config ARCH_IRQBUTTONS bool "Button interrupt support" default n diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index c8b02711a7..727446d650 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -1019,8 +1019,6 @@ defconfig -- This is a configuration file similar to the Linux from incoming IP packets. CONFIG_NET_BROADCAST - Incoming UDP broadcast support CONFIG_NET_MULTICAST - Outgoing multi-cast address support - CONFIG_NET_FWCACHE_SIZE - number of packets to remember when - looking for duplicates SLIP Driver. SLIP supports point-to-point IP communications over a serial port. The default data link layer for uIP is Ethernet. If CONFIG_NET_SLIP @@ -1457,8 +1455,6 @@ defconfig -- This is a configuration file similar to the Linux but copy themselves entirely into RAM for better performance. CONFIG_BOOT_RAMFUNCS - Other configurations may copy just some functions into RAM, either for better performance or for errata workarounds. - CONFIG_STACK_POINTER - The initial stack pointer (may not be supported - in all architectures). CONFIG_STACK_ALIGNMENT - Set if the your application has specific stack alignment requirements (may not be supported in all architectures). diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index b15e622d88..b148b1e0d7 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -262,7 +262,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -409,7 +408,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index 6efe2500eb..4fc5089e2d 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -281,7 +281,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -419,7 +418,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=y CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 32203ffcba..0c0ffafaab 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -281,7 +281,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -419,7 +418,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=y CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig index adbd97d6d5..386936b721 100644 --- a/nuttx/configs/c5471evm/httpd/defconfig +++ b/nuttx/configs/c5471evm/httpd/defconfig @@ -201,7 +201,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=y -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -254,7 +253,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig index af9266863a..19b865bf27 100644 --- a/nuttx/configs/c5471evm/nettest/defconfig +++ b/nuttx/configs/c5471evm/nettest/defconfig @@ -201,7 +201,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -254,7 +253,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig index a0a2264e4d..2bcb89b115 100644 --- a/nuttx/configs/c5471evm/nsh/defconfig +++ b/nuttx/configs/c5471evm/nsh/defconfig @@ -201,7 +201,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -254,7 +253,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig index 5d3d70a221..ac11ba1a1a 100644 --- a/nuttx/configs/c5471evm/ostest/defconfig +++ b/nuttx/configs/c5471evm/ostest/defconfig @@ -201,7 +201,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -254,7 +253,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/compal_e88/nsh_highram/defconfig b/nuttx/configs/compal_e88/nsh_highram/defconfig index 30287a80d4..bfb3017d2d 100644 --- a/nuttx/configs/compal_e88/nsh_highram/defconfig +++ b/nuttx/configs/compal_e88/nsh_highram/defconfig @@ -214,7 +214,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -273,7 +272,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/compal_e99/nsh_compalram/defconfig b/nuttx/configs/compal_e99/nsh_compalram/defconfig index a60fbf9479..5bd924d7d5 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/defconfig +++ b/nuttx/configs/compal_e99/nsh_compalram/defconfig @@ -216,7 +216,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -275,7 +274,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig index 4ed6e486bc..e3f3dd8164 100644 --- a/nuttx/configs/compal_e99/nsh_highram/defconfig +++ b/nuttx/configs/compal_e99/nsh_highram/defconfig @@ -217,7 +217,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -319,7 +318,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index d45fd3c560..e3b6cac17b 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -255,7 +255,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -389,7 +388,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=256 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index b74d9a3a3b..928fdb2392 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -247,7 +247,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 7548f43bb0..6b6b9b584e 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -247,7 +247,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index e461e70104..8f49d59a85 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -290,7 +290,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 1085ea424b..7dae3c2cfd 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -250,7 +250,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index 3a6fd85df8..6ee7bb40db 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -251,7 +251,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index 4bad278b9d..5af1310f4c 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -248,7 +248,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index e89077d4cd..93565d4aa8 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -244,7 +244,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -336,7 +335,6 @@ CONFIG_EXAMPLE_DHCPD_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index 82ab0b470f..78994b11ea 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -244,7 +244,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -319,7 +318,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index ce93cbfff7..fb2fcf5ffd 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -246,7 +246,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -321,7 +320,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index 77ff9cea27..f917f91a0f 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -248,7 +248,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -322,7 +321,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index 4698f71d86..6bcde74b93 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -242,7 +242,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -316,7 +315,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index c10f584c66..b329609459 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -251,7 +251,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -360,7 +359,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index 368892c2ce..e1422da7fd 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -261,7 +261,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -335,7 +334,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index 121ef87d35..4eebaca3a3 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -258,7 +258,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -332,7 +331,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 61ffa930a5..6eeda0cb8d 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -227,7 +227,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -399,7 +398,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index 76979774ab..650af3f2b0 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -233,7 +233,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=y -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -420,7 +419,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index b711544de9..55cd915ace 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -233,7 +233,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -428,7 +427,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index 8a4b5d76c4..e3b7833079 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -233,7 +233,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -413,7 +412,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index 1dd70097e3..aa62a9b659 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -233,7 +233,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -413,7 +412,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index fd667dff69..11a7fda494 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -229,7 +229,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -408,7 +407,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index 471b78fddc..79a9482027 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -233,7 +233,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -413,7 +412,6 @@ CONFIG_EXAMPLE_WGET_NETMASK=0xffffff00 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index fcb9b942a4..b03997e423 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -312,7 +312,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -474,7 +473,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index f3869534ad..98849c1b83 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -312,7 +312,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -459,7 +458,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index acea3ae23b..95e7f8b953 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -577,7 +577,6 @@ CONFIG_EXAMPLES_BUTTONS_BUILTIN=y CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index a4ee68663e..d4f468d327 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -326,7 +326,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -568,7 +567,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index d3f7678b54..01da0ea84c 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -330,7 +330,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -576,7 +575,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 118ed16404..15f0695cfb 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -312,7 +312,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -491,7 +490,6 @@ CONFIG_EXAMPLES_USBTERM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 4167b83448..8e5cc1b53e 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -319,7 +319,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -481,7 +480,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 127d45a194..2006686b9e 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -321,7 +321,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -456,7 +455,6 @@ CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_BOOT_RAMFUNCS=y CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index 25c55a1788..035c8f0741 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -294,7 +294,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -437,7 +436,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index d527bc6022..90f980a137 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -304,7 +304,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -476,7 +475,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index a72a6403f5..b4c02b5345 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -261,7 +261,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -335,7 +334,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index 5377d0234b..03a3b30eb7 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -258,7 +258,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -332,7 +331,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 1752015d8d..39d6807140 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -263,7 +263,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -337,7 +336,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index e3d36b1f98..713420b385 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -274,7 +274,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -404,7 +403,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index f4022fa99a..667c93b153 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -259,7 +259,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -333,7 +332,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index c10a9b835d..4c51b681ae 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -261,7 +261,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -335,7 +334,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index 0b4a32fa50..d3e0f2ffd2 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -273,7 +273,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -402,7 +401,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index 05ded43137..cea2d5c1e5 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -258,7 +258,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -332,7 +331,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index bed40891c2..b0a1f736f2 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -378,7 +378,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -597,7 +596,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index f9c4432510..267d46af5c 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -362,7 +362,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -574,7 +573,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index e257267f3f..c2d7fc336e 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -308,7 +308,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=y -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -474,7 +473,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index 17364e0985..425c4134e3 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -304,7 +304,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -484,7 +483,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index b1d54cec18..c0289a08f9 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -319,7 +319,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -536,7 +535,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index 957e82e480..0c5104ca74 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -304,7 +304,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -462,7 +461,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 2b05852a64..80ff88e8be 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -308,7 +308,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -501,7 +500,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 22e620c9c8..1b1c97f593 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -300,7 +300,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -458,7 +457,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index b05cf0d7b8..bad7f83420 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -179,7 +179,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index 58aa7e8610..e65a2fd186 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -301,7 +301,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -466,7 +465,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index ed0f984483..a073c8886a 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -294,7 +294,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -437,7 +436,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig index a2b439f851..6a6e5819cf 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/defconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig @@ -222,7 +222,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -410,7 +409,6 @@ CONFIG_EXAMPLES_COMPOSITE_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index 87d56ceb8a..7a514163c3 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -226,7 +226,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -335,7 +334,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index 86be60f093..724459e806 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -220,7 +220,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -329,7 +328,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig index df5eb16a96..c746c5732b 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig @@ -220,7 +220,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -338,7 +337,6 @@ CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig index 89b57043db..d46ab7c3c5 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig @@ -222,7 +222,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -351,7 +350,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index 03898f611f..091e9147ef 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -257,7 +257,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -404,7 +403,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index 33b2895c8d..bcc18dc3c8 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -325,7 +325,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -488,7 +487,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index 08715f3f68..d7454bda60 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -325,7 +325,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -531,7 +530,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index 3b0b8312f2..fdbc4b5612 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -316,7 +316,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -464,7 +463,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index f85910a981..e58fb27018 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -209,7 +209,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -317,7 +316,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 65103625aa..4f480675d1 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -261,7 +261,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -395,7 +394,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=256 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index 466f9e4817..3a5b019009 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -203,7 +203,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -313,7 +312,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index 42958372c3..3cf421f16c 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -208,7 +208,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -344,7 +343,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index fcc5d2f2cc..08ea8be97b 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -201,7 +201,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -309,7 +308,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig index ff2a193ab3..ec845c7ed6 100644 --- a/nuttx/configs/ntosd-dm320/poll/defconfig +++ b/nuttx/configs/ntosd-dm320/poll/defconfig @@ -203,7 +203,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -320,7 +319,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index 9a5669579d..19680b2e9d 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -226,7 +226,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -388,7 +387,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index 9560255c47..bc2bf86511 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -203,7 +203,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -321,7 +320,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig index 046dd64971..88a45f94d5 100644 --- a/nuttx/configs/ntosd-dm320/uip/defconfig +++ b/nuttx/configs/ntosd-dm320/uip/defconfig @@ -203,7 +203,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -321,7 +320,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index 24d94bb09d..6dcef15a7a 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -295,7 +295,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -460,7 +459,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 72efe44e7c..622db2a5fd 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -294,7 +294,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -437,7 +436,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index 7507caccc7..36b1ff47b5 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -295,7 +295,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -450,7 +449,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index c000ef8b71..5dfe474573 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -296,7 +296,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -451,7 +450,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index 9ddccb6d79..c34f0b9996 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -319,7 +319,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -541,7 +540,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index e3e220de51..10dc25101a 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -311,7 +311,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -492,7 +491,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 8c8c970dbd..6ac19b8e74 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -311,7 +311,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -471,7 +470,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 6333ba218d..37e2b9bf08 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -322,7 +322,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -516,7 +515,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 0325c18476..a3a912b2aa 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -322,7 +322,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -566,7 +565,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 995b38c376..a01564222f 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -304,7 +304,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -476,7 +475,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index 883144b774..f2074597c2 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -319,7 +319,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -514,7 +513,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index e7f24b8ee5..f699180255 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -314,7 +314,6 @@ CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -509,7 +508,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index c5c3b59f40..506ef91d76 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -305,7 +305,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -477,7 +476,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index 451d3aa789..eaf51a8f41 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -306,7 +306,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -478,7 +477,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 8fab944c59..4b7b2942db 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -303,7 +303,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 CONFIG_NET_WLAN=y # @@ -478,7 +477,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index e5882dbcca..a9ce391b34 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -258,7 +258,6 @@ CONFIG_NSH_FATMOUNTPT="/tmp" # CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index 11ebc36163..d1a4c83d68 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -258,7 +258,6 @@ CONFIG_NSH_FATMOUNTPT="/tmp" # CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index eb92452698..728256e027 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -552,7 +552,6 @@ CONFIG_EXAMPLES_CAN_NMSGS=4 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index 2a4951668f..0a8d66455d 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -360,7 +360,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -506,7 +505,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 933ef41a92..83bebe2fea 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -271,7 +271,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -391,7 +390,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index e3413d579c..a5eda6d013 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -253,7 +253,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -362,7 +361,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index b75da9eca3..87ce49749a 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -253,7 +253,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -362,7 +361,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index c6bffbdbfe..74242863f0 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -317,7 +317,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -465,7 +464,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index e5bc9c818e..d012b4a248 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -307,7 +307,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -454,7 +453,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index e578aa952d..2f0248f41c 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -407,7 +407,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -669,7 +668,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 471c57a17e..be8ef53a02 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -406,7 +406,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -668,7 +667,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index 96331d95ba..bcd26cce54 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -404,7 +404,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -666,7 +665,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index c037a7dc2a..53ad041da2 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -422,7 +422,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -786,7 +785,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index 1d55cd2632..ac6b9a82da 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -404,7 +404,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -666,7 +665,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig index 109bc22a79..0232376cf2 100644 --- a/nuttx/configs/pjrc-8051/defconfig +++ b/nuttx/configs/pjrc-8051/defconfig @@ -178,7 +178,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index ed98eb2972..e514da1f42 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -240,7 +240,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig index cd59503a1e..52b8ae80cb 100644 --- a/nuttx/configs/qemu-i486/ostest/defconfig +++ b/nuttx/configs/qemu-i486/ostest/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/rgmp/arm/default/defconfig b/nuttx/configs/rgmp/arm/default/defconfig index 017e615002..a44a750562 100644 --- a/nuttx/configs/rgmp/arm/default/defconfig +++ b/nuttx/configs/rgmp/arm/default/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n #CONFIG_NET_LLH_LEN=14 -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/rgmp/arm/nsh/defconfig b/nuttx/configs/rgmp/arm/nsh/defconfig index 302d6fd78f..23d2f43167 100644 --- a/nuttx/configs/rgmp/arm/nsh/defconfig +++ b/nuttx/configs/rgmp/arm/nsh/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_RECEIVE_WINDOW=128 CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n #CONFIG_NET_LLH_LEN=14 -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/rgmp/x86/default/defconfig b/nuttx/configs/rgmp/x86/default/defconfig index 27325c2a00..6ecf662a90 100644 --- a/nuttx/configs/rgmp/x86/default/defconfig +++ b/nuttx/configs/rgmp/x86/default/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n #CONFIG_NET_LLH_LEN=14 -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/rgmp/x86/nsh/defconfig b/nuttx/configs/rgmp/x86/nsh/defconfig index 308915c042..9c10ec9204 100644 --- a/nuttx/configs/rgmp/x86/nsh/defconfig +++ b/nuttx/configs/rgmp/x86/nsh/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_RECEIVE_WINDOW=128 CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n #CONFIG_NET_LLH_LEN=14 -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index a17edf151d..6110732e4d 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -310,7 +310,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -473,7 +472,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 8764c4b40e..ba5b78b48b 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -285,7 +285,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -448,7 +447,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index adfa3a64f0..377d3ce1d9 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -294,7 +294,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -474,7 +473,6 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index d25b487819..a18c10ec23 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -285,7 +285,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -448,7 +447,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index 45cecde90b..e70b710ac5 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -319,7 +319,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -558,7 +557,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig index cbd5a9fefa..3871fe3306 100644 --- a/nuttx/configs/sim/mount/defconfig +++ b/nuttx/configs/sim/mount/defconfig @@ -164,7 +164,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig index 26d4f4388d..5965f02d82 100644 --- a/nuttx/configs/sim/nettest/defconfig +++ b/nuttx/configs/sim/nettest/defconfig @@ -164,7 +164,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index c1c806a416..3f0ceab26a 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -193,7 +193,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nsh2/defconfig b/nuttx/configs/sim/nsh2/defconfig index e5066c59dc..f6f36bf51c 100644 --- a/nuttx/configs/sim/nsh2/defconfig +++ b/nuttx/configs/sim/nsh2/defconfig @@ -203,7 +203,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig index c8ba9cdbb1..34d86f3849 100644 --- a/nuttx/configs/sim/nx/defconfig +++ b/nuttx/configs/sim/nx/defconfig @@ -184,7 +184,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nx11/defconfig b/nuttx/configs/sim/nx11/defconfig index 471c3ed038..8734ebc69c 100644 --- a/nuttx/configs/sim/nx11/defconfig +++ b/nuttx/configs/sim/nx11/defconfig @@ -191,7 +191,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nxffs/defconfig b/nuttx/configs/sim/nxffs/defconfig index 514f4770b2..6b40cf3e4c 100644 --- a/nuttx/configs/sim/nxffs/defconfig +++ b/nuttx/configs/sim/nxffs/defconfig @@ -165,7 +165,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig index d48ae776c3..84c2f713ee 100644 --- a/nuttx/configs/sim/nxwm/defconfig +++ b/nuttx/configs/sim/nxwm/defconfig @@ -204,7 +204,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 3a814ed780..91316af6b9 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -164,7 +164,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig index 448b0a159c..a5c4a6f45d 100644 --- a/nuttx/configs/sim/pashello/defconfig +++ b/nuttx/configs/sim/pashello/defconfig @@ -164,7 +164,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/sim/touchscreen/defconfig b/nuttx/configs/sim/touchscreen/defconfig index be31e95c99..a78bbcc503 100644 --- a/nuttx/configs/sim/touchscreen/defconfig +++ b/nuttx/configs/sim/touchscreen/defconfig @@ -189,7 +189,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig index 0bb6240934..fc7640ef85 100644 --- a/nuttx/configs/skp16c26/ostest/defconfig +++ b/nuttx/configs/skp16c26/ostest/defconfig @@ -205,7 +205,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -313,7 +312,6 @@ CONFIG_DM9X_ETRANS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=256 CONFIG_USERMAIN_STACKSIZE=256 CONFIG_PTHREAD_STACK_MIN=64 diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index 30fe41a4f8..dd0a89ecca 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -317,7 +317,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -463,7 +462,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index 5e7842bcd4..b355f4067c 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -328,7 +328,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -490,7 +489,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 1d2793ea0d..2a76e5caf3 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -334,7 +334,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -555,7 +554,6 @@ CONFIG_EXAMPLES_COMPOSITE_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index e3fb34dc42..886b2aa078 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -328,7 +328,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -475,7 +474,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 5ae880cf9d..3c0fb3d703 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -393,7 +393,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -716,7 +715,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 9a3dd39104..79a3fe7f9a 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -342,7 +342,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -595,7 +594,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index a4858f38d7..243e4ad081 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -343,7 +343,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -622,7 +621,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index e69649cb38..bd2968e679 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -342,7 +342,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -619,7 +618,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index 9fb837789d..5d4b1f061b 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -342,7 +342,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -619,7 +618,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 54d7f88edc..cabd5fa273 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -337,7 +337,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -483,7 +482,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 1c17a6a4cf..73f7ae52ae 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -424,7 +424,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -761,7 +760,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index fb591eac10..b3d182bde6 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -327,7 +327,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -509,7 +508,6 @@ CONFIG_EXAMPLES_USBTERM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 76d79532d6..3a2a2d571d 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -334,7 +334,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -496,7 +495,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index e8decd4117..3abf0bdab0 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -409,7 +409,6 @@ CONFIG_NET_BROADCAST=y #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -628,7 +627,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 383b209cbb..47a560f4fa 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -409,7 +409,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -621,7 +620,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 61e37c12ec..6e019875d5 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -455,7 +455,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -843,7 +842,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index a2181e03b5..980fc1930b 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -454,7 +454,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -830,7 +829,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index ff2ee370ec..a6452094cd 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -456,7 +456,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -864,7 +863,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 178a09fed8..b2d36c9cd9 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -396,7 +396,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -722,7 +721,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index e6dc096c68..024b4d1a5f 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -409,7 +409,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -633,7 +632,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index b3d39ef9a2..83678b12a2 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -415,7 +415,6 @@ CONFIG_NET_BROADCAST=y #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -634,7 +633,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 0d5dd05897..3446e8c351 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -415,7 +415,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -627,7 +626,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 2fe2e7d8e7..03f4d3c0fb 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -460,7 +460,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -836,7 +835,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index 8696db2790..d0e628cc48 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -460,7 +460,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -692,7 +691,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 32732d0c81..dc3ba7ced6 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -459,7 +459,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -799,7 +798,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index d9146a8471..6e891f3421 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -461,7 +461,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -869,7 +868,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 6508ef35a8..449a143a5a 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -401,7 +401,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -727,7 +726,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 4309ddf795..67762012c1 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -415,7 +415,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -639,7 +638,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 2dcf6be89d..07d8cfa7be 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -460,7 +460,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -837,7 +836,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index fc957be038..8e1861d731 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -429,7 +429,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -706,7 +705,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 667f8be736..45d819e8a2 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -429,7 +429,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -724,7 +723,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 3cdd9dd00e..5640cebd11 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -379,7 +379,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -740,7 +739,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 3b412fdc12..fb03c477e7 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -448,7 +448,6 @@ CONFIG_NET_BROADCAST=n #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_ARP_IPIN=n CONFIG_NET_MULTICAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -725,7 +724,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index f6ffa2ae5a..ded591f3ea 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -329,7 +329,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -525,7 +524,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index 640597ae2a..d6e3f894fc 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -308,7 +308,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -455,7 +454,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 3f1efe5ab0..e1873b4c75 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -326,7 +326,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -522,7 +521,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index da53a57625..5441e9005a 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -257,7 +257,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -404,7 +403,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index d53cb1dce6..4f13b93514 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -259,7 +259,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -403,7 +402,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index 8b77122f75..42ec5fd138 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -260,7 +260,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -423,7 +422,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index b263f26350..16e33799d7 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -322,7 +322,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -458,7 +457,6 @@ CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_BOOT_RAMFUNCS=y CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index fa0b764d4d..af92a0c3ec 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -320,7 +320,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -455,7 +454,6 @@ CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_BOOT_RAMFUNCS=y CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index b0a76b4809..174d7c9a8f 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -316,7 +316,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -500,7 +499,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index 33e82487ca..2a51efc25b 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -315,7 +315,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -499,7 +498,6 @@ CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index 883dc46fcf..51c967ce5a 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -219,7 +219,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -318,7 +317,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index a705d4bf1a..da3feb8b16 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -219,7 +219,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -318,7 +317,6 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 44900ce92c..48af2e07cc 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -370,7 +370,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n #CONFIG_NET_LLH_LEN=14 -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities @@ -507,7 +506,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n CONFIG_BOOT_RUNFROMFLASH=n CONFIG_BOOT_COPYTORAM=n CONFIG_CUSTOM_STACK=n -#CONFIG_STACK_POINTER CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 4792f02e41..76f4e7fa97 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig index 97c0aaaedf..9c88c5d8fb 100644 --- a/nuttx/configs/xtrs/ostest/defconfig +++ b/nuttx/configs/xtrs/ostest/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig index 8ac23069f9..d187ccec58 100644 --- a/nuttx/configs/xtrs/pashello/defconfig +++ b/nuttx/configs/xtrs/pashello/defconfig @@ -172,7 +172,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index 24e228a4b7..cf20002530 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -185,7 +185,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index 95cb6f09b3..176d3a3876 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -185,7 +185,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index bb054bc75f..a87e7a9288 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -168,7 +168,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig index a179cacfd8..4fbca2e16a 100644 --- a/nuttx/configs/z80sim/ostest/defconfig +++ b/nuttx/configs/z80sim/ostest/defconfig @@ -168,7 +168,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index d3b961b4af..42ffdb0f3f 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -168,7 +168,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index c193790972..2fb427105f 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -184,7 +184,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index 5108247230..d9c5a51a5b 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -184,7 +184,6 @@ CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= #CONFIG_NET_ARPTAB_SIZE=8 CONFIG_NET_BROADCAST=n -#CONFIG_NET_FWCACHE_SIZE=2 # # UIP Network Utilities diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index 3d39dc1d7b..d8e7e1b044 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -64,9 +64,10 @@ config NSOCKET_DESCRIPTORS config NET_NACTIVESOCKETS int "Max socket operations" + default 16 ---help--- Maximum number of concurrent socket operations (recv, send, etc.). - Default: NET_TCP_CONNS+NET_UCP_CONNS + Default: 16 config NET_SOCKOPTS bool "Socket options" @@ -238,8 +239,12 @@ config NET_STATISTICS config NET_RECEIVE_WINDOW int "Receive window size" + default 562 ---help--- - The size of the advertised receiver's window + The size of the advertised receiver's window. Should be set low + (i.e., to the size of the NET_BUFSIZE) if the application is slow + to process incoming data, or high (32768 bytes) if the application + processes data quickly. config NET_ARPTAB_SIZE int "ARP table size" @@ -260,11 +265,6 @@ config NET_MULTICAST ---help--- Outgoing multi-cast address support -config NET_FWCACHE_SIZE - int "FW cache size" - ---help--- - Number of packets to remember when looking for duplicates - config NET_SLIP bool "SLIP support" default n diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 6c8737d625..4f7149595e 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -389,11 +389,6 @@ config CUSTOM_STACK nuttx model. This is necessary for certain architectures that have have hardware stacks (such as the 8051 family). -config STACK_POINTER - hex "The initial stack pointer" - ---help--- - The initial stack pointer (arm7tdmi only). - config IDLETHREAD_STACKSIZE int "Idle thread stack size" default 1024 From 58686d844f7dc2d098fe853ef6b48df850d0822c Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 13:56:21 +0000 Subject: [PATCH 35/95] Shenzhou board is first to use ONLY Kconfig for configuration git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5114 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 4 + apps/nshlib/nsh_mntcmds.c | 30 +- apps/system/readline/Kconfig | 17 - apps/system/readline/readline.c | 29 +- nuttx/Documentation/NuttxPortingGuide.html | 3 - nuttx/arch/arm/src/lpc17xx/Kconfig | 12 +- nuttx/arch/arm/src/lpc31xx/Kconfig | 2 +- nuttx/arch/arm/src/lpc43xx/Kconfig | 8 +- nuttx/arch/arm/src/stm32/Kconfig | 69 +- nuttx/arch/avr/Kconfig | 4 +- nuttx/arch/mips/src/pic32mx/Kconfig | 14 +- nuttx/configs/Kconfig | 21 + nuttx/configs/README.txt | 1 - nuttx/configs/ea3131/src/up_nsh.c | 14 +- nuttx/configs/ea3152/src/up_nsh.c | 14 +- nuttx/configs/eagle100/src/up_nsh.c | 12 +- nuttx/configs/hymini-stm32v/src/up_nsh.c | 16 +- nuttx/configs/kwikstik-k40/src/up_nsh.c | 22 +- nuttx/configs/lm3s6965-ek/src/up_nsh.c | 12 +- nuttx/configs/lm3s8962-ek/src/up_nsh.c | 12 +- nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c | 18 +- nuttx/configs/mbed/src/up_nsh.c | 6 +- nuttx/configs/mcu123-lpc214x/src/up_nsh.c | 12 +- nuttx/configs/mirtoo/src/up_nsh.c | 6 +- nuttx/configs/nucleus2g/src/up_nsh.c | 12 +- nuttx/configs/olimex-lpc1766stk/src/up_nsh.c | 24 +- nuttx/configs/olimex-lpc2378/src/up_nsh.c | 8 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 1 - nuttx/configs/olimex-strp711/src/up_nsh.c | 16 +- nuttx/configs/pic32-starterkit/src/up_nsh.c | 34 +- nuttx/configs/pic32mx7mmb/src/up_nsh.c | 32 +- nuttx/configs/sam3u-ek/src/up_nsh.c | 14 +- nuttx/configs/shenzhou/README.txt | 1 - nuttx/configs/shenzhou/nsh/defconfig | 883 ++++++++++++++++++ nuttx/configs/stm3210e-eval/src/up_nsh.c | 16 +- nuttx/configs/sure-pic32mx/src/up_nsh.c | 24 +- nuttx/configs/twr-k60n512/src/up_nsh.c | 22 +- nuttx/drivers/serial/Kconfig | 96 +- nuttx/fs/fat/Kconfig | 6 - nuttx/lib/Kconfig | 23 + nuttx/lib/stdio/lib_fgets.c | 29 +- nuttx/net/Kconfig | 4 +- 42 files changed, 1295 insertions(+), 308 deletions(-) create mode 100644 nuttx/configs/shenzhou/nsh/defconfig diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 6d5f605c7c..2ef4b67f92 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -310,3 +310,7 @@ files into memory before transferring them. * apps/netutils/webserver: Add ability to map a URL to CGI function. Contributed by Kate. + * apps/nshlib/nsh_mntcmds.c: The changes of 6.21 introduced holes in the + error handling: Now the number of arguments to mount can be 0 or 4. + Additional parameter checking is required to prevent mysterious errors + (submiteed by Kate). diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c index b5935bdea1..027046c77c 100644 --- a/apps/nshlib/nsh_mntcmds.c +++ b/apps/nshlib/nsh_mntcmds.c @@ -195,9 +195,9 @@ int cmd_df(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT) int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { - char *source; - char *target; - char *filesystem = 0; + FAR char *source; + FAR char *target; + FAR char *filesystem = NULL; bool badarg = false; int ret; @@ -208,7 +208,11 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) return mount_show(vtbl, argv[0]); } - /* Get the mount options */ + /* Get the mount options. NOTE: getopt() is not thread safe nor re-entrant. + * To keep its state proper for the next usage, it is necessary to parse to + * the end of the line even if an error occurs. If an error occurs, this + * logic just sets 'badarg' and continues. + */ int option; while ((option = getopt(argc, argv, ":t:")) != ERROR) @@ -232,14 +236,18 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) } } - /* If a bad argument was encountered, then return without processing the command */ + /* If a bad argument was encountered, then return without processing the + * command. + */ if (badarg) { return ERROR; } - /* There are two required arguments after the options */ + /* There are two required arguments after the options: the source and target + * paths. + */ if (optind + 2 < argc) { @@ -252,6 +260,16 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) return ERROR; } + /* While the above parsing for the -t argument looks nice, the -t argument + * not really optional. + */ + + if (!filesystem) + { + nsh_output(vtbl, g_fmtargrequired, argv[0]); + return ERROR; + } + /* The source and target paths might be relative to the current * working directory. */ diff --git a/apps/system/readline/Kconfig b/apps/system/readline/Kconfig index 2ed9cafd67..6482b12044 100644 --- a/apps/system/readline/Kconfig +++ b/apps/system/readline/Kconfig @@ -19,21 +19,4 @@ config READLINE_ECHO already has local echo support or you need to suppress the back-channel responses for any other reason. -choice - prompt "Newline Options" - default EOL_IS_EITHER_CRLF - -config EOL_IS_CR - bool "EOL is CR" - -config EOL_IS_LF - bool "EOL is LF" - -config EOL_IS_BOTH_CRLF - bool "EOL is CR and LF" - -config EOL_IS_EITHER_CRLF - bool "EOL is CR or LF" - -endchoice endif diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c index bdd39e67be..ec2dc1c0a6 100644 --- a/apps/system/readline/readline.c +++ b/apps/system/readline/readline.c @@ -63,13 +63,32 @@ #define CONFIG_READLINE_ECHO 1 /* Some environments may return CR as end-of-line, others LF, and others - * both. The logic here assumes either but not both. + * both. If not specified, the logic here assumes either (but not both) as + * the default. */ -#undef CONFIG_EOL_IS_CR -#undef CONFIG_EOL_IS_LF -#undef CONFIG_EOL_IS_BOTH_CRLF -#define CONFIG_EOL_IS_EITHER_CRLF 1 +#if defined(CONFIG_EOL_IS_CR) +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_LF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_BOTH_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_EITHER_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +#else +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# define CONFIG_EOL_IS_EITHER_CRLF 1 +#endif /**************************************************************************** * Private Type Declarations diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 06f2c3e6ff..875b78e619 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -4578,9 +4578,6 @@ build
  • CONFIG_FS_FAT: Enable FAT file system support.
  • -
  • - CONFIG_FAT_SECTORSIZE: Max supported sector size. -
  • CONFIG_FAT_LCNAMES: Enable use of the NT-style upper/lower case 8.3 file name support.
  • diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index f22f67344d..dc28f8c100 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -96,7 +96,7 @@ config LPC17_PLL1 config LPC17_ETHERNET bool "Ethernet" select NET - select ARCH_HAS_PHY + select ARCH_HAVE_PHY default n config LPC17_USBHOST @@ -116,27 +116,27 @@ config LPC17_USBOTG config LPC17_UART0 bool "UART0" - select ARCH_HAS_UART0 + select ARCH_HAVE_UART0 default n config LPC17_UART1 bool "UART1" - select ARCH_HAS_UART1 + select ARCH_HAVE_UART1 default n config LPC17_UART2 bool "UART2" - select ARCH_HAS_UART2 + select ARCH_HAVE_UART2 default n config LPC17_UART3 bool "UART3" - select ARCH_HAS_UART3 + select ARCH_HAVE_UART3 default n config LPC17_CAN1 bool "CAN1" - select ARCH_HAS_UART4 + select ARCH_HAVE_UART4 default n config LPC17_CAN2 diff --git a/nuttx/arch/arm/src/lpc31xx/Kconfig b/nuttx/arch/arm/src/lpc31xx/Kconfig index 53691f4947..17daf94b75 100644 --- a/nuttx/arch/arm/src/lpc31xx/Kconfig +++ b/nuttx/arch/arm/src/lpc31xx/Kconfig @@ -119,7 +119,7 @@ menu "LPC31xx Peripheral Support" config LPC31_UART bool "UART" default n - select ARCH_HAS_UART + select ARCH_HAVE_UART config LPC31_SPI bool "SPI" diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index b4f19b524f..0ae9f8ffef 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -269,22 +269,22 @@ config LPC43_TMR3 config LPC43_USART0 bool "USART0" - select ARCH_HAS_USART0 + select ARCH_HAVE_USART0 default n config LPC43_UART1 bool "UART1" - select ARCH_HAS_UART1 + select ARCH_HAVE_UART1 default n config LPC43_USART2 bool "USART2" - select ARCH_HAS_USART2 + select ARCH_HAVE_USART2 default n config LPC43_USART3 bool "USART3" - select ARCH_HAS_USART3 + select ARCH_HAVE_USART3 default n config LPC43_USB0 diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 661f6d8f43..ef1ca63cec 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -11,80 +11,93 @@ choice config ARCH_CHIP_STM32F103ZET6 bool "STM32F103ZET6" select ARCH_CORTEXM3 + select STM32_STM32F10XX config ARCH_CHIP_STM32F103RET6 bool "STM32F103RET6" select ARCH_CORTEXM3 + select STM32_STM32F10XX config ARCH_CHIP_STM32F103VCT6 bool "STM32F103VCT6" select ARCH_CORTEXM3 + select STM32_STM32F10XX config ARCH_CHIP_STM32F105VBT7 bool "STM32F105VBT7" select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_CONNECTIVITYLINE config ARCH_CHIP_STM32F107VC bool "STM32F107VC" select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_CONNECTIVITYLINE config ARCH_CHIP_STM32F207IG bool "STM32F207IG" select ARCH_CORTEXM3 + select STM32_STM32F20XX config ARCH_CHIP_STM32F405RG bool "STM32F405RG" - select ARCH_CORTEXM3 + select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F405VG bool "STM32F405VG" - select ARCH_CORTEXM3 + select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F405ZG bool "STM32F405ZG" - select ARCH_CORTEXM3 + select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407VE bool "STM32F407VE" - select ARCH_CORTEXM3 + select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407VG bool "STM32F407VG" select ARCH_CORTEXM3 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407ZE bool "STM32F407ZE" select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407ZG bool "STM32F407ZG" select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407IE bool "STM32F407IE" select ARCH_CORTEXM4 + select STM32_STM32F40XX config ARCH_CHIP_STM32F407IG bool "STM32F407IG" select ARCH_CORTEXM4 + select STM32_STM32F40XX endchoice config STM32_STM32F10XX bool - default y if ARCH_CHIP_STM32F103ZET6 || ARCH_CHIP_STM32F103RET6 || ARCH_CHIP_STM32F103VCT6 || ARCH_CHIP_STM32F105VBT7 || ARCH_CHIP_STM32F107VC config STM32_CONNECTIVITYLINE bool - default y if ARCH_CHIP_STM32F105VBT7 || ARCH_CHIP_STM32F107VC config STM32_STM32F20XX bool - default y if ARCH_CHIP_STM32F207IG config STM32_STM32F40XX bool - default y if ARCH_CHIP_STM32F405RG || ARCH_CHIP_STM32F405VG || ARCH_CHIP_STM32F405ZG || ARCH_CHIP_STM32F407VE || ARCH_CHIP_STM32F407VG || ARCH_CHIP_STM32F407ZE || ARCH_CHIP_STM32F407ZG || ARCH_CHIP_STM32F407IE || ARCH_CHIP_STM32F407IG choice prompt "Toolchain Selection" @@ -160,11 +173,13 @@ config STM32_BKPSRAM config STM32_CAN1 bool "CAN1" default n + select CAN config STM32_CAN2 bool "CAN2" default n depends on STM32_STM32F20XX || STM32_STM32F40XX + select CAN config STM32_CCMDATARAM bool "CMD/DATA RAM" @@ -192,11 +207,12 @@ config STM32_DCMI config STM32_ETHMAC bool "Ethernet MAC" default n - depends on STM32_STM32F20XX || STM32_STM32F40XX + depends on STM32_CONNECTIVITYLINE || STM32_STM32F20XX || STM32_STM32F40XX config STM32_FSMC bool "FSMC" default n + depends on !STM32_CONNECTIVITYLINE config STM32_HASH bool "HASH" @@ -219,6 +235,7 @@ config STM32_I2C3 config STM32_IWDG bool "IWDG" default n + select WATCHDOG config STM32_OTGFS bool "OTG FS" @@ -242,24 +259,29 @@ config STM32_RNG config STM32_SDIO bool "SDIO" default n + depends on !STM32_CONNECTIVITYLINE config STM32_SPI1 bool "SPI1" default n + select SPI config STM32_SPI2 bool "SPI2" default n + select SPI config STM32_SPI3 bool "SPI3" default n depends on STM32_STM32F20XX || STM32_STM32F40XX + select SPI config STM32_SPI4 bool "SPI4" default n depends on STM32_STM32F10XX + select SPI config STM32_SYSCFG bool "SYSCFG" @@ -330,43 +352,45 @@ config STM32_TIM14 config STM32_USART1 bool "USART1" - select ARCH_HAS_USART1 default n + select ARCH_HAVE_USART1 config STM32_USART2 bool "USART2" - select ARCH_HAS_USART2 default n + select ARCH_HAVE_USART2 config STM32_USART3 bool "USART3" - select ARCH_HAS_USART3 default n + select ARCH_HAVE_USART3 config STM32_UART4 bool "UART4" - select ARCH_HAS_UART4 default n + select ARCH_HAVE_UART4 config STM32_UART5 bool "UART5" - select ARCH_HAS_UART5 default n + select ARCH_HAVE_UART5 config STM32_USART6 bool "USART6" default n - select ARCH_HAS_USART6 depends on STM32_STM32F20XX || STM32_STM32F40XX + select ARCH_HAVE_USART6 config STM32_USB bool "USB Device" default n depends on STM32_STM32F10XX + select USBDEV config STM32_WWDG bool "WWDG" default n + select WATCHDOG endmenu @@ -495,18 +519,23 @@ choice config STM32_CAN1_NO_REMAP bool "No pin remapping" -config STM32_CAN1_FULL_REMAP - bool "Full pin remapping" +config CONFIG_STM32_CAN1_REMAP1 + bool "CAN1 alternate pin remapping #1" -config STM32_CAN1_PARTIAL_REMAP - bool "Partial pin remapping" +config CONFIG_STM32_CAN1_REMAP2 + bool "CAN1 alternate pin remapping #2" endchoice config STM32_CAN2_REMAP bool "CAN2 Alternate Pin Mapping" default n - depends on STM32_STM32F10XX && STM32_CAN2 + depends on STM32_CONNECTIVITYLINE && STM32_CAN2 + +config STM32_ETH_REMAP + bool "Ethernet Alternate Pin Mapping" + default n + depends on STM32_CONNECTIVITYLINE && STM32_ETHMAC choice prompt "JTAG Configuration" diff --git a/nuttx/arch/avr/Kconfig b/nuttx/arch/avr/Kconfig index 0108371425..4ebd26d5f3 100644 --- a/nuttx/arch/avr/Kconfig +++ b/nuttx/arch/avr/Kconfig @@ -118,10 +118,10 @@ source arch/avr/src/at32uc3/Kconfig config AVR_USART0 bool "USART0 specific serial device driver settings" - select ARCH_HAS_USART0 + select ARCH_HAVE_USART0 config AVR_USART1 bool "USART1 specific serial device driver settings" - select ARCH_HAS_USART1 + select ARCH_HAVE_USART1 endif diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 74a093e3f3..222c7e4de9 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -493,32 +493,32 @@ config PIC32MX_SPI4 config PIC32MX_UART1 bool "UART1" default n - select ARCH_HAS_UART1 + select ARCH_HAVE_UART1 config PIC32MX_UART2 bool "UART2" default n - select ARCH_HAS_UART1 + select ARCH_HAVE_UART1 config PIC32MX_UART3 bool "UART3" default n - select ARCH_HAS_UART3 + select ARCH_HAVE_UART3 config PIC32MX_UART4 bool "UART4" default n - select ARCH_HAS_UART4 + select ARCH_HAVE_UART4 config PIC32MX_UART5 bool "UART5" default n - select ARCH_HAS_UART5 + select ARCH_HAVE_UART5 config PIC32MX_UART6 bool "UART6" default n - select ARCH_HAS_UART6 + select ARCH_HAVE_UART6 config PIC32MX_ADC bool "ADC1" @@ -568,7 +568,7 @@ config PIC32MX_ETHERNET bool "Ethernet" default n select NET - select ARCH_HAS_PHY + select ARCH_HAVE_PHY config PIC32MX_CTMU bool "Charge Time Measurement Unit (CMTU)" diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 8c841e7be8..77c691cfca 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -677,6 +677,27 @@ config ARCH_IRQBUTTONS ---help--- "Support interrupts on button presses and releases." +config NSH_MMCSDMINOR + int "MMC/SD minor number" + default 0 + depends on NSH_LIBRARY && MMCSD + ---help--- + If board-specific NSH start-up logic needs to mount an MMC/SD device, then the setting should be provided to identify the MMC/SD minor device number (i.e., the N in /dev/mmcsdN). Default 0 + +config NSH_MMCSDSLOTNO + int "MMC/SD slot number" + default 0 + depends on NSH_LIBRARY && MMCSD + ---help--- + If board-specific NSH start-up supports more than one MMC/SD slot, then this setting should be provided to indicate which slot should be used. Default: 0. + +config NSH_MMCSDSPIPORTNO + int "MMC/SD SPI device number" + default 0 + depends on NSH_LIBRARY && MMCSD && SPI + ---help--- + If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this setting may be needed to tell the board logic which SPI bus to use. Default: 0 (meaning is board-specific). + comment "Board-Specific Options" if ARCH_BOARD_AMBER diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 727446d650..3a059a62a1 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -721,7 +721,6 @@ defconfig -- This is a configuration file similar to the Linux Filesystem configuration CONFIG_FS_FAT - Enable FAT filesystem support - CONFIG_FAT_SECTORSIZE - Max supported sector size CONFIG_FAT_LCNAMES - Enable use of the NT-style upper/lower case 8.3 file name support. CONFIG_FAT_LFN - Enable FAT long file names. NOTE: Microsoft claims diff --git a/nuttx/configs/ea3131/src/up_nsh.c b/nuttx/configs/ea3131/src/up_nsh.c index 01b16194bf..29ee7ed2ce 100644 --- a/nuttx/configs/ea3131/src/up_nsh.c +++ b/nuttx/configs/ea3131/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_EA3131 -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot" # undef CONFIG_NSH_MMCSDSLOTNO @@ -74,14 +74,14 @@ /* Add configuration for new LPC31XX boards here */ # error "Unrecognized LPC31XX board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO support @@ -89,7 +89,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -126,7 +126,7 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; int ret; diff --git a/nuttx/configs/ea3152/src/up_nsh.c b/nuttx/configs/ea3152/src/up_nsh.c index ddd0e91951..2b523b44a5 100644 --- a/nuttx/configs/ea3152/src/up_nsh.c +++ b/nuttx/configs/ea3152/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_EA3152 -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot" # undef CONFIG_NSH_MMCSDSLOTNO @@ -74,14 +74,14 @@ /* Add configuration for new LPC31XX boards here */ # error "Unrecognized LPC31XX board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO support @@ -89,7 +89,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -126,7 +126,7 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; int ret; diff --git a/nuttx/configs/eagle100/src/up_nsh.c b/nuttx/configs/eagle100/src/up_nsh.c index e2e6b42f23..65fd300232 100644 --- a/nuttx/configs/eagle100/src/up_nsh.c +++ b/nuttx/configs/eagle100/src/up_nsh.c @@ -56,8 +56,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_EAGLE100 -# undef CONFIG_NSH_HAVEUSBDEV -# define CONFIG_NSH_HAVEMMCSD 1 +# undef NSH_HAVEUSBDEV +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The Eagle100 MMC/SD is on SSI0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -71,20 +71,20 @@ #else /* Add configuration for new LM3s boards here */ # error "Unrecognized lm3s board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/hymini-stm32v/src/up_nsh.c b/nuttx/configs/hymini-stm32v/src/up_nsh.c index d7c4605ac7..ae1ea03a6b 100644 --- a/nuttx/configs/hymini-stm32v/src/up_nsh.c +++ b/nuttx/configs/hymini-stm32v/src/up_nsh.c @@ -72,8 +72,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_HYMINI_STM32V -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot" # undef CONFIG_NSH_MMCSDSLOTNO @@ -84,14 +84,14 @@ #else /* Add configuration for new STM32 boards here */ # error "Unrecognized STM32 board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO support @@ -99,7 +99,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -136,7 +136,7 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; int ret; @@ -146,7 +146,7 @@ int nsh_archinitialize(void) /* Mount the SDIO-based MMC/SD block driver */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD /* First, get an instance of the SDIO interface */ message("nsh_archinitialize: Initializing SDIO slot %d\n", diff --git a/nuttx/configs/kwikstik-k40/src/up_nsh.c b/nuttx/configs/kwikstik-k40/src/up_nsh.c index c4e027c6bd..fa4cc5fa95 100644 --- a/nuttx/configs/kwikstik-k40/src/up_nsh.c +++ b/nuttx/configs/kwikstik-k40/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40 -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot, slot 0" # undef CONFIG_NSH_MMCSDSLOTNO @@ -73,14 +73,14 @@ #else /* Add configuration for new Kinetis boards here */ # error "Unrecognized Kinetis board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDHC support @@ -88,7 +88,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -129,7 +129,7 @@ * reduces the probability of name collistions. */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD struct kinetis_nsh_s { FAR struct sdio_dev_s *sdhc; /* SDIO driver handle */ @@ -141,7 +141,7 @@ struct kinetis_nsh_s * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static struct kinetis_nsh_s g_nsh; #endif @@ -153,7 +153,7 @@ static struct kinetis_nsh_s g_nsh; * Name: kinetis_mediachange ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static void kinetis_mediachange(void) { bool inserted; @@ -180,7 +180,7 @@ static void kinetis_mediachange(void) * Name: kinetis_cdinterrupt ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int kinetis_cdinterrupt(int irq, FAR void *context) { /* All of the work is done by kinetis_mediachange() */ @@ -204,7 +204,7 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD int ret; /* Configure GPIO pins. diff --git a/nuttx/configs/lm3s6965-ek/src/up_nsh.c b/nuttx/configs/lm3s6965-ek/src/up_nsh.c index 4b06974001..952ee4298d 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_nsh.c +++ b/nuttx/configs/lm3s6965-ek/src/up_nsh.c @@ -56,8 +56,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_LM3S6965EK -# undef CONFIG_NSH_HAVEUSBDEV -# define CONFIG_NSH_HAVEMMCSD 1 +# undef NSH_HAVEUSBDEV +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The LM3S6965 Eval Kit MMC/SD is on SSI0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -71,20 +71,20 @@ #else /* Add configuration for new LM3s boards here */ # error "Unrecognized lm3s board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/lm3s8962-ek/src/up_nsh.c b/nuttx/configs/lm3s8962-ek/src/up_nsh.c index d21edc46b7..c95dce7a93 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_nsh.c +++ b/nuttx/configs/lm3s8962-ek/src/up_nsh.c @@ -56,8 +56,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_LM3S8962EK -# undef CONFIG_NSH_HAVEUSBDEV -# define CONFIG_NSH_HAVEMMCSD 1 +# undef NSH_HAVEUSBDEV +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The LM3S8962 Eval Kit MMC/SD is on SSI0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -71,20 +71,20 @@ #else /* Add configuration for new LM3s boards here */ # error "Unrecognized lm3s board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c index a47181bacd..0b643f2763 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c @@ -56,21 +56,21 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_LPCXPRESSO -# define CONFIG_NSH_HAVEUSBDEV 1 +# define NSH_HAVEUSBDEV 1 # ifdef CONFIG_LPC17_SSP1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEMMCSD 1 # else -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #else # error "Unrecognized board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Do we have SPI support for MMC/SD? */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPCXpresso MMC/SD is on SSP1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -86,13 +86,13 @@ /* Can't support USB device features if USB device is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -137,7 +137,7 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; int ret; diff --git a/nuttx/configs/mbed/src/up_nsh.c b/nuttx/configs/mbed/src/up_nsh.c index f8c46bc810..562b67cd94 100644 --- a/nuttx/configs/mbed/src/up_nsh.c +++ b/nuttx/configs/mbed/src/up_nsh.c @@ -56,16 +56,16 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_MBED -# define CONFIG_NSH_HAVEUSBDEV 1 +# define NSH_HAVEUSBDEV 1 #else # error "Unrecognized board" -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Debug ********************************************************************/ diff --git a/nuttx/configs/mcu123-lpc214x/src/up_nsh.c b/nuttx/configs/mcu123-lpc214x/src/up_nsh.c index 1e1ee3c36b..caef0c3b5e 100644 --- a/nuttx/configs/mcu123-lpc214x/src/up_nsh.c +++ b/nuttx/configs/mcu123-lpc214x/src/up_nsh.c @@ -56,8 +56,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_MCU123 -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPC214x MMC/SD is on SPI1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -71,20 +71,20 @@ #else /* Add configuration for new LPC214x boards here */ # error "Unrecognized LPC214x board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/mirtoo/src/up_nsh.c b/nuttx/configs/mirtoo/src/up_nsh.c index 0209fb79d6..33e0692e66 100644 --- a/nuttx/configs/mirtoo/src/up_nsh.c +++ b/nuttx/configs/mirtoo/src/up_nsh.c @@ -75,8 +75,8 @@ /* Use minor device number 0 is not is provided */ -#ifndef CONFIG_NSH_SST25MINOR -# define CONFIG_NSH_SST25MINOR 0 +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 #endif /* Can't support both FAT and NXFFS */ @@ -125,7 +125,7 @@ int nsh_archinitialize(void) #ifndef CONFIG_FS_NXFFS /* And finally, use the FTL layer to wrap the MTD driver as a block driver */ - ret = ftl_initialize(CONFIG_NSH_SST25MINOR, mtd); + ret = ftl_initialize(CONFIG_NSH_MMCSDMINOR, mtd); if (ret < 0) { fdbg("ERROR: Initialize the FTL layer\n"); diff --git a/nuttx/configs/nucleus2g/src/up_nsh.c b/nuttx/configs/nucleus2g/src/up_nsh.c index faf42bb516..0707eaa357 100644 --- a/nuttx/configs/nucleus2g/src/up_nsh.c +++ b/nuttx/configs/nucleus2g/src/up_nsh.c @@ -56,8 +56,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_NUCLEUS2G -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The Nucleus-2G MMC/SD is on SSP0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -73,20 +73,20 @@ # endif #else # error "Unrecognized board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB device features if USB device is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c b/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c index 57789676cb..036350dede 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_LPC1766STK -# define CONFIG_NSH_HAVEMMCSD 1 -# define CONFIG_NSH_HAVEUSBHOST 1 +# define NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBHOST 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPC1766-STK MMC/SD is on SSP1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -75,18 +75,18 @@ # endif # ifndef CONFIG_LPC17_SSP1 # warning "CONFIG_LPC17_SSP1 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #else # error "Unrecognized board" -# undef CONFIG_NSH_HAVEMMCSD -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEMMCSD +# undef NSH_HAVEUSBHOST #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -108,10 +108,10 @@ #endif #if !defined(CONFIG_USBHOST) || !defined(CONFIG_LPC17_USBHOST) -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST #endif -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST # ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 # endif @@ -140,7 +140,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static struct usbhost_driver_s *g_drvr; #endif @@ -156,7 +156,7 @@ static struct usbhost_driver_s *g_drvr; * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_waiter(int argc, char *argv[]) { bool connected = false; @@ -197,7 +197,7 @@ static int nsh_waiter(int argc, char *argv[]) * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int nsh_sdinitialize(void) { FAR struct spi_dev_s *ssp; @@ -257,7 +257,7 @@ errout: * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_usbhostinitialize(void) { int pid; diff --git a/nuttx/configs/olimex-lpc2378/src/up_nsh.c b/nuttx/configs/olimex-lpc2378/src/up_nsh.c index d6b2445ca7..9e3a0f6951 100644 --- a/nuttx/configs/olimex-lpc2378/src/up_nsh.c +++ b/nuttx/configs/olimex-lpc2378/src/up_nsh.c @@ -61,19 +61,19 @@ /* PORT and SLOT number probably depend on the board configuration */ -#undef CONFIG_NSH_HAVEUSBDEV -#undef CONFIG_NSH_HAVEMMCSD +#undef NSH_HAVEUSBDEV +#undef NSH_HAVEMMCSD /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 728256e027..87c3e829a1 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -107,7 +107,6 @@ CONFIG_STM32_PWR=y # APB1 (low speed) -CONFIG_STM32_RTC=n CONFIG_STM32_BKP=n CONFIG_STM32_TIM2=n CONFIG_STM32_TIM3=n diff --git a/nuttx/configs/olimex-strp711/src/up_nsh.c b/nuttx/configs/olimex-strp711/src/up_nsh.c index e6d2d349ee..249898933b 100644 --- a/nuttx/configs/olimex-strp711/src/up_nsh.c +++ b/nuttx/configs/olimex-strp711/src/up_nsh.c @@ -56,9 +56,9 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_OLIMEX_STRP711 -# define CONFIG_NSH_HAVEUSBDEV 1 +# define NSH_HAVEUSBDEV 1 # ifdef CONFIG_STR71X_BSPI1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The Olimex STR-P711 MMC/SD is on BSPI1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -70,25 +70,25 @@ # define CONFIG_NSH_MMCSDSLOTNO 0 # endif # else -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #else /* Add configuration for new STR71x boards here */ # error "Unrecognized STR71x board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -128,7 +128,7 @@ int nsh_archinitialize(void) FAR struct spi_dev_s *spi; int ret; -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD /* Get the SPI port */ diff --git a/nuttx/configs/pic32-starterkit/src/up_nsh.c b/nuttx/configs/pic32-starterkit/src/up_nsh.c index 830570c6c2..0f0f0dffeb 100644 --- a/nuttx/configs/pic32-starterkit/src/up_nsh.c +++ b/nuttx/configs/pic32-starterkit/src/up_nsh.c @@ -58,8 +58,8 @@ /* Configuration ************************************************************/ /* Assume that we have MMC/SD, USB host (and USB device) */ -#define CONFIG_NSH_HAVEMMCSD 1 -#define CONFIG_NSH_HAVEUSBHOST 1 +#define NSH_HAVEMMCSD 1 +#define NSH_HAVEUSBHOST 1 /* The PIC32 Ethernet Starter Kit does not have an SD slot on board. If one * is added, then it must be specified by defining which SPI bus that it @@ -67,12 +67,12 @@ */ #ifndef CONFIG_PIC32MX_MMCSDSPIPORTNO -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif /* Make sure that the configuration will support the SD card */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD /* Make sure that the NSH configuration uses the correct SPI */ @@ -96,23 +96,23 @@ # if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1) # warning "CONFIG_PIC32MX_SPI1 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2) # warning "CONFIG_PIC32MX_SPI2 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3) # warning "CONFIG_PIC32MX_SPI3 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4) # warning "CONFIG_PIC32MX_SPI4 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif /* Select /dev/mmcsd0 if no other minor number is provided */ @@ -126,22 +126,22 @@ #ifdef CONFIG_USBHOST # ifndef CONFIG_PIC32MX_USBHOST # error "CONFIG_PIC32MX_USBHOST is not selected" -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST # endif #endif #ifdef CONFIG_PIC32MX_USBHOST # ifndef CONFIG_USBHOST # warning "CONFIG_USBHOST is not selected" -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST # endif #endif #if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST #endif -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST # ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 # endif @@ -170,7 +170,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static struct usbhost_driver_s *g_drvr; #endif @@ -186,7 +186,7 @@ static struct usbhost_driver_s *g_drvr; * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_waiter(int argc, char *argv[]) { bool connected = false; @@ -227,7 +227,7 @@ static int nsh_waiter(int argc, char *argv[]) * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int nsh_sdinitialize(void) { FAR struct spi_dev_s *ssp; @@ -280,7 +280,7 @@ errout: * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_usbhostinitialize(void) { int pid; diff --git a/nuttx/configs/pic32mx7mmb/src/up_nsh.c b/nuttx/configs/pic32mx7mmb/src/up_nsh.c index a9d26b6bea..d063450d3d 100644 --- a/nuttx/configs/pic32mx7mmb/src/up_nsh.c +++ b/nuttx/configs/pic32mx7mmb/src/up_nsh.c @@ -58,8 +58,8 @@ /* Configuration ************************************************************/ /* Assume that we have MMC/SD, USB host (and USB device) */ -#define CONFIG_NSH_HAVEMMCSD 1 -#define CONFIG_NSH_HAVEUSBHOST 1 +#define NSH_HAVEMMCSD 1 +#define NSH_HAVEUSBHOST 1 /* The Mikroelektronika PIC32MX7 MMB has one SD slot on board, connected to SPI 1. */ @@ -69,7 +69,7 @@ /* Make sure that the configuration will support the SD card */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD /* Make sure that the NSH configuration uses the correct SPI */ @@ -95,23 +95,23 @@ # if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1) # warning "CONFIG_PIC32MX_SPI1 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2) # warning "CONFIG_PIC32MX_SPI2 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3) # warning "CONFIG_PIC32MX_SPI3 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4) # warning "CONFIG_PIC32MX_SPI4 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif /* Select /dev/mmcsd0 if no other minor number is provided */ @@ -125,22 +125,22 @@ #ifdef CONFIG_USBHOST # ifndef CONFIG_PIC32MX_USBHOST # error "CONFIG_PIC32MX_USBHOST is not selected" -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST # endif #endif #ifdef CONFIG_PIC32MX_USBHOST # ifndef CONFIG_USBHOST # warning "CONFIG_USBHOST is not selected" -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST # endif #endif #if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST #endif -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST # ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 # endif @@ -169,7 +169,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static struct usbhost_driver_s *g_drvr; #endif @@ -185,7 +185,7 @@ static struct usbhost_driver_s *g_drvr; * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_waiter(int argc, char *argv[]) { bool connected = false; @@ -226,7 +226,7 @@ static int nsh_waiter(int argc, char *argv[]) * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int nsh_sdinitialize(void) { FAR struct spi_dev_s *spi; @@ -288,7 +288,7 @@ errout: * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_usbhostinitialize(void) { int pid; diff --git a/nuttx/configs/sam3u-ek/src/up_nsh.c b/nuttx/configs/sam3u-ek/src/up_nsh.c index 842d8b7627..5c8bf022d0 100644 --- a/nuttx/configs/sam3u-ek/src/up_nsh.c +++ b/nuttx/configs/sam3u-ek/src/up_nsh.c @@ -62,8 +62,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_SAM3UEK -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot" # undef CONFIG_NSH_MMCSDSLOTNO @@ -74,14 +74,14 @@ #else /* Add configuration for new SAM3U boards here */ # error "Unrecognized SAM3U board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO support @@ -89,7 +89,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM3U_HSMCI) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -126,7 +126,7 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; int ret; diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index 2479dd1da0..a74cefd689 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -480,7 +480,6 @@ Shenzhou-specific Configuration Options APB1 (low speed) ---------------- - CONFIG_STM32_RTC CONFIG_STM32_BKP CONFIG_STM32_TIM2 CONFIG_STM32_TIM3 diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig new file mode 100644 index 0000000000..6f223c1648 --- /dev/null +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -0,0 +1,883 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_IMX is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_LM3S is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_SAM3U is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STR71X is not set +CONFIG_ARCH_CORTEXM3=y +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARMV7M_MPU is not set +# CONFIG_ARCH_INTERRUPTSTACK is not set +CONFIG_ARCH_IRQPRIO=y +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_NET_MULTICAST is not set +# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set +# CONFIG_ARCH_CHIP_STM32F103RET6 is not set +# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set +# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set +CONFIG_ARCH_CHIP_STM32F107VC=y +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +# CONFIG_ARCH_CHIP_STM32F407IG is not set +CONFIG_STM32_STM32F10XX=y +CONFIG_STM32_CONNECTIVITYLINE=y +CONFIG_STM32_CODESOURCERYW=y +# CONFIG_STM32_CODESOURCERYL is not set +# CONFIG_STM32_ATOLLIC_LITE is not set +# CONFIG_STM32_ATOLLIC_PRO is not set +# CONFIG_STM32_DEVKITARM is not set +# CONFIG_STM32_RAISONANCE is not set +# CONFIG_STM32_BUILDROOT is not set +CONFIG_STM32_DFU=y + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +CONFIG_STM32_BKP=y +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +CONFIG_STM32_ETHMAC=y +# CONFIG_STM32_I2C1 is not set +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_IWDG is not set +CONFIG_STM32_PWR=y +CONFIG_STM32_SPI1=y +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI4 is not set +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +# CONFIG_STM32_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_USB is not set +# CONFIG_STM32_WWDG is not set +CONFIG_STM32_SPI=y +CONFIG_STM32_USART2_REMAP=y +# CONFIG_STM32_SPI1_REMAP is not set +CONFIG_STM32_ETH_REMAP=y +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set + +# +# Ethernet MAC configuration +# +CONFIG_STM32_PHYADDR=1 +CONFIG_STM32_MII=y +CONFIG_STM32_MII_MCO=y +CONFIG_STM32_AUTONEG=y +CONFIG_STM32_PHYSR=16 +CONFIG_STM32_PHYSR_SPEED=0x0002 +CONFIG_STM32_PHYSR_100MBPS=0x0000 +CONFIG_STM32_PHYSR_MODE=0x0004 +CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004 +# CONFIG_STM32_ETH_PTP is not set + +# +# USB Host Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +CONFIG_ARCH_STACKDUMP=y + +# +# Board Settings +# +CONFIG_DRAM_START=0x20000000 +CONFIG_DRAM_SIZE=65536 + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set +CONFIG_ARCH_BOARD_SHENZHOU=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="shenzhou" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +# CONFIG_ARCH_BUTTONS is not set +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Board-Specific Options +# + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2012 +CONFIG_START_MONTH=9 +CONFIG_START_DAY=8 +CONFIG_DEV_CONSOLE=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_WORKPRIORITY=192 +CONFIG_SCHED_WORKPERIOD=50000 +CONFIG_SCHED_WORKSTACKSIZE=2048 +CONFIG_SIG_SIGWORK=4 +# CONFIG_SCHED_LPWORK is not set +CONFIG_SCHED_WAITPID=y +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_DISABLE_ENVIRON is not set +CONFIG_DISABLE_POLL=y + +# +# Sizes of configurable things (0 disables) +# +CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASK_ARGS=4 +CONFIG_NPTHREAD_KEYS=4 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_PREALLOC_TIMERS=4 + +# +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 + +# +# Device Drivers +# + +# +# Device Driver Configuration +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +# CONFIG_I2C is not set +CONFIG_SPI=y +CONFIG_SPI_OWNBUS=y +CONFIG_SPI_EXCHANGE=y +CONFIG_SPI_CMDDATA=y +CONFIG_RTC=y +# CONFIG_RTC_DATETIME is not set +# CONFIG_RTC_HIRES is not set +# CONFIG_RTC_ALARM is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +CONFIG_MMCSD=y +CONFIG_MMCSD_NSLOTS=1 +# CONFIG_MMCSD_READONLY is not set +# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set +CONFIG_MMCSD_MMCSUPPORT=y +CONFIG_MMCSD_HAVECARDDETECT=y +CONFIG_MMCSD_SPI=y +CONFIG_MMCSD_SPICLOCK=12500000 +# CONFIG_MMCSD_SDIO is not set +# CONFIG_MTD is not set +# CONFIG_NETDEVICES is not set +# CONFIG_NET_SLIP is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_USART2=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=128 +CONFIG_USART2_TXBUFSIZE=128 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking support +# +CONFIG_NET=y +# CONFIG_NET_NOINTS is not set +CONFIG_NET_MULTIBUFFER=y +# CONFIG_NET_IPv6 is not set +CONFIG_NSOCKET_DESCRIPTORS=10 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +CONFIG_NET_BUFSIZE=562 +# CONFIG_NET_TCPURGDATA is not set +CONFIG_NET_TCP=y +CONFIG_NET_TCP_CONNS=40 +CONFIG_NET_MAX_LISTENPORTS=40 +CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=16 +CONFIG_NET_TCP_RECVDELAY=0 +CONFIG_NET_TCPBACKLOG=y +CONFIG_NET_UDP=y +CONFIG_NET_UDP_CHECKSUMS=y +CONFIG_NET_UDP_CONNS=8 +# CONFIG_NET_BROADCAST is not set +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y +# CONFIG_NET_PINGADDRCONF is not set +# CONFIG_NET_IGMP is not set +CONFIG_NET_STATISTICS=y +CONFIG_NET_RECEIVE_WINDOW=562 +CONFIG_NET_ARPTAB_SIZE=16 +# CONFIG_NET_ARP_IPIN is not set + +# +# File systems +# + +# +# File system configuration +# +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_NFS is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Memory management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 + +# +# Library routines +# +CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_HAVE_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# Application configuration +# + +# +# Named Applications +# +CONFIG_NAMEDAPP=y + +# +# Examples +# + +# +# ADC example +# +# CONFIG_EXAMPLES_ADC is not set + +# +# Buttons example +# +# CONFIG_EXAMPLES_BUTTONS is not set + +# +# CAN example +# +# CONFIG_EXAMPLES_CAN is not set + +# +# USB CDC/ACM class driver example +# +# CONFIG_EXAMPLES_CDCACM is not set + +# +# USB composite class driver example +# +# CONFIG_EXAMPLES_COMPOSITE is not set + +# +# DHCP server example +# +# CONFIG_EXAMPLES_DHCPD is not set + +# +# FTP client example +# +# CONFIG_EXAMPLES_FTPC is not set + +# +# FTP server example +# +# CONFIG_EXAMPLES_FTPD is not set + +# +# "Hello, World!" example +# +# CONFIG_EXAMPLES_HELLO is not set + +# +# "Hello, World!" C++ example +# +# CONFIG_EXAMPLES_HELLOXX is not set + +# +# USB HID keyboard example +# +# CONFIG_EXAMPLES_HIDKBD is not set + +# +# IGMP example +# +# CONFIG_EXAMPLES_IGMP is not set + +# +# LCD read/write example +# +# CONFIG_EXAMPLES_LCDRW is not set + +# +# Memory management example +# +# CONFIG_EXAMPLES_MM is not set + +# +# File system mount example +# +# CONFIG_EXAMPLES_MOUNT is not set + +# +# FreeModBus example +# +# CONFIG_EXAMPLES_MODBUS is not set + +# +# Network test example +# +# CONFIG_EXAMPLES_NETTEST is not set + +# +# NuttShell (NSH) example +# +CONFIG_EXAMPLES_NSH=y + +# +# NULL example +# +# CONFIG_EXAMPLES_NULL is not set + +# +# NX graphics example +# +# CONFIG_EXAMPLES_NX is not set + +# +# NxConsole example +# +# CONFIG_EXAMPLES_NXCONSOLE is not set + +# +# NXFFS file system example +# +# CONFIG_EXAMPLES_NXFFS is not set + +# +# NXFLAT example +# +# CONFIG_EXAMPLES_NXFLAT is not set + +# +# NX graphics "Hello, World!" example +# +# CONFIG_EXAMPLES_NXHELLO is not set + +# +# NX graphics image example +# +# CONFIG_EXAMPLES_NXIMAGE is not set + +# +# NX graphics lines example +# +# CONFIG_EXAMPLES_NXLINES is not set + +# +# NX graphics text example +# +# CONFIG_EXAMPLES_NXTEXT is not set + +# +# OS test example +# +# CONFIG_EXAMPLES_OSTEST is not set + +# +# Pascal "Hello, World!"example +# +# CONFIG_EXAMPLES_PASHELLO is not set + +# +# Pipe example +# +# CONFIG_EXAMPLES_PIPE is not set + +# +# Poll example +# +# CONFIG_EXAMPLES_POLL is not set + +# +# Pulse width modulation (PWM) example +# + +# +# Quadrature encoder example +# +# CONFIG_EXAMPLES_QENCODER is not set + +# +# RGMP example +# +# CONFIG_EXAMPLES_RGMP is not set + +# +# ROMFS example +# +# CONFIG_EXAMPLES_ROMFS is not set + +# +# sendmail example +# +# CONFIG_EXAMPLES_SENDMAIL is not set + +# +# Serial loopback example +# +# CONFIG_EXAMPLES_SERLOOP is not set + +# +# Telnet daemon example +# +# CONFIG_EXAMPLES_TELNETD is not set + +# +# THTTPD web server example +# +# CONFIG_EXAMPLES_THTTPD is not set + +# +# TIFF generation example +# +# CONFIG_EXAMPLES_TIFF is not set + +# +# Touchscreen example +# +# CONFIG_EXAMPLES_TOUCHSCREEN is not set + +# +# UDP example +# +# CONFIG_EXAMPLES_UDP is not set + +# +# uIP web server example +# +# CONFIG_EXAMPLES_UIP is not set + +# +# USB serial test example +# +# CONFIG_EXAMPLES_USBSERIAL is not set + +# +# USB mass storage class example +# +# CONFIG_EXAMPLES_USBMSC is not set + +# +# USB serial terminal example +# +# CONFIG_EXAMPLES_USBTERM is not set + +# +# Watchdog timer example +# +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# wget example +# +# CONFIG_EXAMPLES_WGET is not set + +# +# WLAN example +# +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_FICL is not set +# CONFIG_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# + +# +# DHCP client +# +# CONFIG_NETUTILS_DHCPC is not set + +# +# DHCP server +# +# CONFIG_NETUTILS_DHCPD is not set + +# +# FTP client +# +# CONFIG_NETUTILS_FTPC is not set + +# +# FTP server +# +# CONFIG_NETUTILS_FTPD is not set + +# +# Name resolution +# +# CONFIG_NETUTILS_RESOLV is not set + +# +# SMTP +# +# CONFIG_NETUTILS_SMTP is not set + +# +# TFTP client +# +CONFIG_NETUTILS_TELNETD=y + +# +# TFTP client +# +CONFIG_NETUTILS_TFTPC=y + +# +# THTTPD web server +# +# CONFIG_NETUTILS_THTTPD is not set + +# +# uIP support library +# +CONFIG_NETUTILS_UIPLIB=y + +# +# uIP web client +# +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# uIP web server +# +# CONFIG_NETUTILS_WEBSERVER is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_NSFMOUNT is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PING is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_CONDEV is not set +# CONFIG_NSH_ARCHINIT is not set +CONFIG_NSH_TELNET=y +CONFIG_NSH_TELNETD_PORT=23 +CONFIG_NSH_TELNETD_DAEMONPRIO=100 +CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 +CONFIG_NSH_TELNETD_CLIENTPRIO=100 +CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 +CONFIG_NSH_IOBUFFER_SIZE=512 +CONFIG_NSH_IPADDR=0x0a000002 +CONFIG_NSH_DRIPADDR=0x0a000001 +CONFIG_NSH_NETMASK=0xffffff00 +CONFIG_NSH_NOMAC=y + +# +# System NSH Add-Ons +# + +# +# Custom free memory command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() support +# +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y + +# +# VSN board Add-Ons +# + +# +# VSN board add-ons +# +# CONFIG_VSN_POWEROFF is not set +# CONFIG_VSN_RAMTRON is not set +# CONFIG_VSN_SDCARD is not set +# CONFIG_VSN_SYSINFO is not set diff --git a/nuttx/configs/stm3210e-eval/src/up_nsh.c b/nuttx/configs/stm3210e-eval/src/up_nsh.c index 96e1e5e58c..3e7c2013c4 100644 --- a/nuttx/configs/stm3210e-eval/src/up_nsh.c +++ b/nuttx/configs/stm3210e-eval/src/up_nsh.c @@ -70,8 +70,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot" # undef CONFIG_NSH_MMCSDSLOTNO @@ -82,14 +82,14 @@ #else /* Add configuration for new STM32 boards here */ # error "Unrecognized STM32 board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO support @@ -97,7 +97,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -138,7 +138,7 @@ int nsh_archinitialize(void) FAR struct spi_dev_s *spi; FAR struct mtd_dev_s *mtd; #endif -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; int ret; #endif @@ -177,7 +177,7 @@ int nsh_archinitialize(void) /* Mount the SDIO-based MMC/SD block driver */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD /* First, get an instance of the SDIO interface */ message("nsh_archinitialize: Initializing SDIO slot %d\n", diff --git a/nuttx/configs/sure-pic32mx/src/up_nsh.c b/nuttx/configs/sure-pic32mx/src/up_nsh.c index 70d482dbe7..4b68350edf 100644 --- a/nuttx/configs/sure-pic32mx/src/up_nsh.c +++ b/nuttx/configs/sure-pic32mx/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_SUREPIC32MX -# define CONFIG_NSH_HAVEMMCSD 1 -# define CONFIG_NSH_HAVEUSBHOST 1 +# define NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBHOST 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2 # error "The Sure PIC32MX MMC/SD is on SPI2" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -75,18 +75,18 @@ # endif # ifndef CONFIG_PIC32MX_SPI2 # warning "CONFIG_PIC32MX_SPI2 is not enabled" -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD # endif #else # error "Unrecognized board" -# undef CONFIG_NSH_HAVEMMCSD -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEMMCSD +# undef NSH_HAVEUSBHOST #endif /* Can't support MMC/SD features if mountpoints are disabled */ #if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -108,10 +108,10 @@ #endif #if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) -# undef CONFIG_NSH_HAVEUSBHOST +# undef NSH_HAVEUSBHOST #endif -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST # ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 # endif @@ -140,7 +140,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static struct usbhost_driver_s *g_drvr; #endif @@ -156,7 +156,7 @@ static struct usbhost_driver_s *g_drvr; * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_waiter(int argc, char *argv[]) { bool connected = false; @@ -197,7 +197,7 @@ static int nsh_waiter(int argc, char *argv[]) * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int nsh_sdinitialize(void) { FAR struct spi_dev_s *spi; @@ -259,7 +259,7 @@ errout: * ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEUSBHOST +#ifdef NSH_HAVEUSBHOST static int nsh_usbhostinitialize(void) { int pid; diff --git a/nuttx/configs/twr-k60n512/src/up_nsh.c b/nuttx/configs/twr-k60n512/src/up_nsh.c index 2079f52a01..e59265f912 100644 --- a/nuttx/configs/twr-k60n512/src/up_nsh.c +++ b/nuttx/configs/twr-k60n512/src/up_nsh.c @@ -61,8 +61,8 @@ /* PORT and SLOT number probably depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_TWR_K60N512 -# define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 # error "Only one MMC/SD slot, slot 0" # undef CONFIG_NSH_MMCSDSLOTNO @@ -73,14 +73,14 @@ #else /* Add configuration for new Kinetis boards here */ # error "Unrecognized Kinetis board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD #endif /* Can't support USB features if USB is not enabled */ #ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV +# undef NSH_HAVEUSBDEV #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDHC support @@ -88,7 +88,7 @@ */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) -# undef CONFIG_NSH_HAVEMMCSD +# undef NSH_HAVEMMCSD #endif #ifndef CONFIG_NSH_MMCSDMINOR @@ -129,7 +129,7 @@ * reduces the probability of name collistions. */ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD struct kinetis_nsh_s { FAR struct sdio_dev_s *sdhc; /* SDIO driver handle */ @@ -141,7 +141,7 @@ struct kinetis_nsh_s * Private Data ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static struct kinetis_nsh_s g_nsh; #endif @@ -153,7 +153,7 @@ static struct kinetis_nsh_s g_nsh; * Name: kinetis_mediachange ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static void kinetis_mediachange(void) { bool inserted; @@ -190,7 +190,7 @@ static void kinetis_mediachange(void) * Name: kinetis_cdinterrupt ****************************************************************************/ -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD static int kinetis_cdinterrupt(int irq, FAR void *context) { /* All of the work is done by kinetis_mediachange() */ @@ -214,7 +214,7 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) int nsh_archinitialize(void) { -#ifdef CONFIG_NSH_HAVEMMCSD +#ifdef NSH_HAVEMMCSD int ret; /* Configure GPIO pins */ diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig index 0448f1268b..43869fdeca 100644 --- a/nuttx/drivers/serial/Kconfig +++ b/nuttx/drivers/serial/Kconfig @@ -271,43 +271,43 @@ endif # MCU serial peripheral driver? # -config ARCH_HAS_UART +config ARCH_HAVE_UART bool -config ARCH_HAS_UART0 +config ARCH_HAVE_UART0 bool -config ARCH_HAS_UART1 +config ARCH_HAVE_UART1 bool -config ARCH_HAS_UART2 +config ARCH_HAVE_UART2 bool -config ARCH_HAS_UART3 +config ARCH_HAVE_UART3 bool -config ARCH_HAS_UART4 +config ARCH_HAVE_UART4 bool -config ARCH_HAS_UART5 +config ARCH_HAVE_UART5 bool -config ARCH_HAS_UART6 +config ARCH_HAVE_UART6 bool -config ARCH_HAS_USART0 +config ARCH_HAVE_USART0 bool -config ARCH_HAS_USART1 +config ARCH_HAVE_USART1 bool -config ARCH_HAS_USART2 +config ARCH_HAVE_USART2 bool -config ARCH_HAS_USART3 +config ARCH_HAVE_USART3 bool -config ARCH_HAS_USART4 +config ARCH_HAVE_USART4 bool -config ARCH_HAS_USART5 +config ARCH_HAVE_USART5 bool -config ARCH_HAS_USART6 +config ARCH_HAVE_USART6 bool config MCU_SERIAL bool - default y if ARCH_HAS_UART || ARCH_HAS_UART0 || ARCH_HAS_USART0 || ARCH_HAS_UART1 || ARCH_HAS_USART1 || \ - ARCH_HAS_UART2 || ARCH_HAS_USART2 || ARCH_HAS_UART3 || ARCH_HAS_USART3 || \ - ARCH_HAS_UART4 || ARCH_HAS_USART4 || ARCH_HAS_UART5 || ARCH_HAS_USART5 || ARCH_HAS_UART6 || ARCH_HAS_USART6 + default y if ARCH_HAVE_UART || ARCH_HAVE_UART0 || ARCH_HAVE_USART0 || ARCH_HAVE_UART1 || ARCH_HAVE_USART1 || \ + ARCH_HAVE_UART2 || ARCH_HAVE_USART2 || ARCH_HAVE_UART3 || ARCH_HAVE_USART3 || \ + ARCH_HAVE_UART4 || ARCH_HAVE_USART4 || ARCH_HAVE_UART5 || ARCH_HAVE_USART5 || ARCH_HAVE_UART6 || ARCH_HAVE_USART6 # # Standard serial driver configuration @@ -340,63 +340,63 @@ choice config UART_SERIAL_CONSOLE bool "UART" - depends on ARCH_HAS_UART + depends on ARCH_HAVE_UART config UART0_SERIAL_CONSOLE bool "UART0" - depends on ARCH_HAS_UART0 + depends on ARCH_HAVE_UART0 config USART0_SERIAL_CONSOLE bool "USART0" - depends on ARCH_HAS_USART0 + depends on ARCH_HAVE_USART0 config UART1_SERIAL_CONSOLE bool "UART1" - depends on ARCH_HAS_UART1 + depends on ARCH_HAVE_UART1 config USART1_SERIAL_CONSOLE bool "USART1" - depends on ARCH_HAS_USART1 + depends on ARCH_HAVE_USART1 config UART2_SERIAL_CONSOLE bool "UART2" - depends on ARCH_HAS_UART2 + depends on ARCH_HAVE_UART2 config USART2_SERIAL_CONSOLE bool "USART2" - depends on ARCH_HAS_USART2 + depends on ARCH_HAVE_USART2 config UART3_SERIAL_CONSOLE bool "UART3" - depends on ARCH_HAS_UART3 + depends on ARCH_HAVE_UART3 config USART3_SERIAL_CONSOLE bool "USART3" - depends on ARCH_HAS_USART3 + depends on ARCH_HAVE_USART3 config UART4_SERIAL_CONSOLE bool "UART4" - depends on ARCH_HAS_UART4 + depends on ARCH_HAVE_UART4 config USART4_SERIAL_CONSOLE bool "USART4" - depends on ARCH_HAS_USART4 + depends on ARCH_HAVE_USART4 config UART5_SERIAL_CONSOLE bool "UART5" - depends on ARCH_HAS_UART5 + depends on ARCH_HAVE_UART5 config USART5_SERIAL_CONSOLE bool "USART5" - depends on ARCH_HAS_USART5 + depends on ARCH_HAVE_USART5 config UART6_SERIAL_CONSOLE bool "UART6" - depends on ARCH_HAS_UART6 + depends on ARCH_HAVE_UART6 config USART6_SERIAL_CONSOLE bool "USART6" - depends on ARCH_HAS_USART6 + depends on ARCH_HAVE_USART6 config NO_SERIAL_CONSOLE bool "No serial console" @@ -404,7 +404,7 @@ config NO_SERIAL_CONSOLE endchoice menu "UART Configuration" - depends on ARCH_HAS_UART + depends on ARCH_HAVE_UART config UART_RXBUFSIZE int "receive buffer size" @@ -447,7 +447,7 @@ config UART_2STOP endmenu menu "UART0 Configuration" - depends on ARCH_HAS_UART0 + depends on ARCH_HAVE_UART0 config UART0_RXBUFSIZE int "receive buffer size" @@ -490,7 +490,7 @@ config UART0_2STOP endmenu menu "USART0 Configuration" - depends on ARCH_HAS_USART0 + depends on ARCH_HAVE_USART0 config USART0_RXBUFSIZE int "receive buffer size" @@ -533,7 +533,7 @@ config USART0_2STOP endmenu menu "UART1 Configuration" - depends on ARCH_HAS_UART1 + depends on ARCH_HAVE_UART1 config UART1_RXBUFSIZE int "receive buffer size" @@ -576,7 +576,7 @@ config UART1_2STOP endmenu menu "USART1 Configuration" - depends on ARCH_HAS_USART1 + depends on ARCH_HAVE_USART1 config USART1_RXBUFSIZE int "receive buffer size" @@ -619,7 +619,7 @@ config USART1_2STOP endmenu menu "UART2 Configuration" - depends on ARCH_HAS_UART2 + depends on ARCH_HAVE_UART2 config UART2_RXBUFSIZE int "receive buffer size" @@ -662,7 +662,7 @@ config UART2_2STOP endmenu menu "USART2 Configuration" - depends on ARCH_HAS_USART2 + depends on ARCH_HAVE_USART2 config USART2_RXBUFSIZE int "receive buffer size" @@ -705,7 +705,7 @@ config USART2_2STOP endmenu menu "UART3 Configuration" - depends on ARCH_HAS_UART3 + depends on ARCH_HAVE_UART3 config UART3_RXBUFSIZE int "receive buffer size" @@ -748,7 +748,7 @@ config UART3_2STOP endmenu menu "USART3 Configuration" - depends on ARCH_HAS_USART3 + depends on ARCH_HAVE_USART3 config USART3_RXBUFSIZE int "receive buffer size" @@ -791,7 +791,7 @@ config USART3_2STOP endmenu menu "UART4 Configuration" - depends on ARCH_HAS_UART4 + depends on ARCH_HAVE_UART4 config UART4_RXBUFSIZE int "receive buffer size" @@ -834,7 +834,7 @@ config UART4_2STOP endmenu menu "USART4 Configuration" - depends on ARCH_HAS_USART4 + depends on ARCH_HAVE_USART4 config USART4_RXBUFSIZE int "receive buffer size" @@ -877,7 +877,7 @@ config USART4_2STOP endmenu menu "UART5 Configuration" - depends on ARCH_HAS_UART5 + depends on ARCH_HAVE_UART5 config UART5_RXBUFSIZE int "receive buffer size" @@ -920,7 +920,7 @@ config UART5_2STOP endmenu menu "USART5 Configuration" - depends on ARCH_HAS_USART5 + depends on ARCH_HAVE_USART5 config USART5_RXBUFSIZE int "receive buffer size" @@ -963,7 +963,7 @@ config USART5_2STOP endmenu menu "USART6 Configuration" - depends on ARCH_HAS_USART6 + depends on ARCH_HAVE_USART6 config USART6_RXBUFSIZE int "receive buffer size" @@ -1006,7 +1006,7 @@ config USART6_2STOP endmenu menu "UART6 Configuration" - depends on ARCH_HAS_UART6 + depends on ARCH_HAVE_UART6 config UART6_RXBUFSIZE int "receive buffer size" diff --git a/nuttx/fs/fat/Kconfig b/nuttx/fs/fat/Kconfig index 30983799d7..fed054b5b3 100644 --- a/nuttx/fs/fat/Kconfig +++ b/nuttx/fs/fat/Kconfig @@ -11,12 +11,6 @@ config FS_FAT Enable FAT filesystem support if FS_FAT -config FAT_SECTORSIZE - int "FAT sector size" - default 512 - ---help--- - Max supported sector size - config FAT_LCNAMES bool "FAT upper/lower names" default n diff --git a/nuttx/lib/Kconfig b/nuttx/lib/Kconfig index a5b62e588f..69a55d09cf 100644 --- a/nuttx/lib/Kconfig +++ b/nuttx/lib/Kconfig @@ -51,6 +51,29 @@ config LIBC_FLOATINGPOINT By default, floating point support in printf, sscanf, etc. is disabled. +choice + prompt "Newline Options" + default EOL_IS_EITHER_CRLF + ---help--- + This selection determines the line terminating character that is used. + Some environments may return CR as end-of-line, others LF, and others + both. If not specified, the default is either CR or LF (but not both) + as the line terminating charactor. + +config EOL_IS_CR + bool "EOL is CR" + +config EOL_IS_LF + bool "EOL is LF" + +config EOL_IS_BOTH_CRLF + bool "EOL is CR and LF" + +config EOL_IS_EITHER_CRLF + bool "EOL is CR or LF" + +endchoice + config LIBC_STRERROR bool "Enable strerror" default n diff --git a/nuttx/lib/stdio/lib_fgets.c b/nuttx/lib/stdio/lib_fgets.c index e84e031f9e..a4f9089ed7 100644 --- a/nuttx/lib/stdio/lib_fgets.c +++ b/nuttx/lib/stdio/lib_fgets.c @@ -50,13 +50,32 @@ * Definitions ****************************************************************************/ /* Some environments may return CR as end-of-line, others LF, and others - * both. The logic here assumes either but not both. + * both. If not specified, the logic here assumes either (but not both) as + * the default. */ -#undef CONFIG_EOL_IS_CR -#undef CONFIG_EOL_IS_LF -#undef CONFIG_EOL_IS_BOTH_CRLF -#define CONFIG_EOL_IS_EITHER_CRLF 1 +#if defined(CONFIG_EOL_IS_CR) +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_LF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_BOTH_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_EITHER_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +#else +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# define CONFIG_EOL_IS_EITHER_CRLF 1 +#endif /**************************************************************************** * Private Type Declarations diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index d8e7e1b044..2670454026 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -9,14 +9,14 @@ config NET ---help--- Enable or disable all network features -config ARCH_HAS_PHY +config ARCH_HAVE_PHY bool if NET choice prompt "Board PHY Selection" - depends on ARCH_HAS_PHY + depends on ARCH_HAVE_PHY default PHY_KS8721 config PHY_KS8721 From ab8c622bed0a3e021afb6bc60e1988584e087bc8 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 16:40:12 +0000 Subject: [PATCH 36/95] Changes to get a clean compile with the Kconfig Shenzhou board. Still some link issues git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5115 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Makefile | 21 +- .../arm/src/stm32/chip/stm32f107vc_pinmap.h | 52 ++--- nuttx/arch/arm/src/stm32/stm32_eth.c | 96 +++++++- nuttx/arch/arm/src/stm32/stm32_syscfg.h | 52 +---- .../configs/olimex-stm32-p107/include/board.h | 24 -- nuttx/configs/shenzhou/README.txt | 212 ------------------ nuttx/configs/shenzhou/include/board.h | 24 -- nuttx/configs/shenzhou/nsh/defconfig | 11 +- nuttx/configs/shenzhou/scripts/ld.script | 5 +- nuttx/configs/shenzhou/scripts/ld.script.dfu | 13 +- nuttx/configs/shenzhou/src/Makefile | 7 +- .../configs/shenzhou/src/shenzhou-internal.h | 24 +- nuttx/configs/shenzhou/src/up_clockconfig.c | 167 ++++++++++++++ nuttx/configs/shenzhou/src/up_composite.c | 69 +----- nuttx/configs/shenzhou/src/up_mmcsd.c | 123 ++++++++++ nuttx/configs/shenzhou/src/up_nsh.c | 105 ++++----- nuttx/configs/shenzhou/src/up_spi.c | 14 +- nuttx/configs/shenzhou/src/up_usbmsc.c | 66 +----- nuttx/tools/configure.sh | 23 +- 19 files changed, 535 insertions(+), 573 deletions(-) create mode 100644 nuttx/configs/shenzhou/src/up_clockconfig.c create mode 100644 nuttx/configs/shenzhou/src/up_mmcsd.c diff --git a/nuttx/Makefile b/nuttx/Makefile index 1a51ca09b5..0f3413cb1e 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -616,9 +616,10 @@ endif # apps_clean: Perform the clean operation only in the user application # directory # apps_distclean: Perform the distclean operation only in the user application -# directory. Note that the apps/.config file is preserved -# so that this is not a "full" distclean but more of a -# configuration "reset." +# directory. Note that the apps/.config file (inf any) is +# preserved so that this is not a "full" distclean but more of a +# configuration "reset." (There willnot be an apps/.config +# file if the configuration was generated via make menuconfig). apps_clean: ifneq ($(APPDIR),) @@ -627,10 +628,16 @@ endif apps_distclean: ifneq ($(APPDIR),) - @cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \ - { echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } + @if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \ + cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \ + { echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \ + else \ + rm -f _SAVED_APPS_config; \ + fi @$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean - @mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \ - { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } + @if [ -r _SAVED_APPS_config ]; then \ + @mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \ + { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \ + fi endif diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h index 82f1fa5e78..a7438a70ee 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h @@ -93,41 +93,41 @@ #define GPIO_ETH_MDC (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN1) #define GPIO_ETH_MDIO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) -#define GPIO_ETH_MIICOL (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) -#define GPIO_ETH_MIICRSWKUP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) -#define GPIO_ETH_MIIRXCLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ETH_MII_COL (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ETH_MII_CRS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ETH_MII_RX_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) #if defined(CONFIG_STM32_ETH_REMAP) -# define GPIO_ETH_MIIRXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9) -# define GPIO_ETH_MIIRXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10) -# define GPIO_ETH_MIIRXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN11) -# define GPIO_ETH_MIIRXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN12) -# define GPIO_ETH_MIIRXDV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8) +# define GPIO_ETH_MII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9) +# define GPIO_ETH_MII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10) +# define GPIO_ETH_MII_RXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN11) +# define GPIO_ETH_MII_RXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN12) +# define GPIO_ETH_MII_RX_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8) #else -# define GPIO_ETH_MIIRXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) -# define GPIO_ETH_MIIRXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) -# define GPIO_ETH_MIIRXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) -# define GPIO_ETH_MIIRXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) -# define GPIO_ETH_MIIRXDV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) +# define GPIO_ETH_MII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) +# define GPIO_ETH_MII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) +# define GPIO_ETH_MII_RXD2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) +# define GPIO_ETH_MII_RXD3 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) +# define GPIO_ETH_MII_RX_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) #endif -#define GPIO_ETH_MIIRXER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) -#define GPIO_ETH_MIITXCLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN3) -#define GPIO_ETH_MIITXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) -#define GPIO_ETH_MIITXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) -#define GPIO_ETH_MIITXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN2) -#define GPIO_ETH_MIITXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) -#define GPIO_ETH_MIITXEN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) +#define GPIO_ETH_MII_RX_ER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) +#define GPIO_ETH_MII_TX_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ETH_MII_TXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) +#define GPIO_ETH_MII_TXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +#define GPIO_ETH_MII_TXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ETH_MII_TXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) +#define GPIO_ETH_MII_TX_EN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) #define GPIO_ETH_PPS_OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) #define GPIO_ETH_RMII_REF_CLK (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) #if defined(CONFIG_STM32_ETH_REMAP) -# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8) -# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9) -# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10) +# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8) +# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9) +# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10) #else -# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) -# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) -# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) +# define GPIO_ETH_RMII_CRS_DV (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) +# define GPIO_ETH_RMII_RXD0 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) +# define GPIO_ETH_RMII_RXD1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) #endif #define GPIO_ETH_RMII_TXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) #define GPIO_ETH_RMII_TXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c index fb6dc69fd0..4493983ade 100644 --- a/nuttx/arch/arm/src/stm32/stm32_eth.c +++ b/nuttx/arch/arm/src/stm32/stm32_eth.c @@ -102,11 +102,17 @@ #endif #ifdef CONFIG_STM32_MII -# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) -# warning "Neither CONFIG_STM32_MII_MCO1 nor CONFIG_STM32_MII_MCO2 defined" -# endif -# if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2) -# error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined" +# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) +# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) +# warning "Neither CONFIG_STM32_MII_MCO1 nor CONFIG_STM32_MII_MCO2 defined" +# endif +# if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2) +# error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined" +# endif +# elif defined(CONFIG_STM32_CONNECTIVITYLINE) +# if !defined(CONFIG_STM32_MII_MCO) +# warning "CONFIG_STM32_MII_MCO not defined" +# endif # endif #endif @@ -608,6 +614,12 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv); /* MAC/DMA Initialization */ +#ifdef CONFIG_STM32_MII +static inline void stm32_selectmii(void); +#endif +#ifdef CONFIG_STM32_RMII +static inline void stm32_selectrmii(void); +#endif static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv); static void stm32_ethreset(FAR struct stm32_ethmac_s *priv); static int stm32_macconfig(FAR struct stm32_ethmac_s *priv); @@ -2570,6 +2582,66 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) return OK; } +/************************************************************************************ + * Name: stm32_selectmii + * + * Description: + * Selects the MII inteface. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ************************************************************************************/ + +#ifdef CONFIG_STM32_MII +static inline void stm32_selectmii(void) +{ + uint32_t regval; + +#ifdef CONFIG_STM32_CONNECTIVITYLINE + regval = getreg32(STM32_AFIO_MAPR); + regval &= ~AFIO_MAPR_MII_RMII_SEL; + putreg32(regval, STM32_AFIO_MAPR); +#else + regval = getreg32(STM32_SYSCFG_PMC); + regval &= ~SYSCFG_PMC_MII_RMII_SEL; + putreg32(regval, STM32_SYSCFG_PMC); +#endif +} +#endif + +/************************************************************************************ + * Name: stm32_selectrmii + * + * Description: + * Selects the RMII inteface. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ************************************************************************************/ + +static inline void stm32_selectrmii(void) +{ + uint32_t regval; + +#ifdef CONFIG_STM32_CONNECTIVITYLINE + regval = getreg32(STM32_AFIO_MAPR); + regval |= AFIO_MAPR_MII_RMII_SEL; + putreg32(regval, STM32_AFIO_MAPR); +#else + regval = getreg32(STM32_SYSCFG_PMC); + regval |= SYSCFG_PMC_MII_RMII_SEL; + putreg32(regval, STM32_SYSCFG_PMC); +#endif +} + /**************************************************************************** * Function: stm32_ethgpioconfig * @@ -2605,7 +2677,7 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv) stm32_selectmii(); - /* Provide clocking via MCO1 or MCO2: + /* Provide clocking via MCO, MCO1 or MCO2: * * "MCO1 (microcontroller clock output), used to output HSI, LSE, HSE or PLL * clock (through a configurable prescaler) on PA8 pin." @@ -2614,7 +2686,7 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv) * PLLI2S clock (through a configurable prescaler) on PC9 pin." */ -# if defined(CONFIG_STM32_MII_MCO1) +# if defined(CONFIG_STM32_MII_MCO1) /* Configure MC01 to drive the PHY. Board logic must provide MC01 clocking * info. */ @@ -2622,14 +2694,20 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv) stm32_configgpio(GPIO_MCO1); stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER); -# elif defined(CONFIG_STM32_MII_MCO2) +# elif defined(CONFIG_STM32_MII_MCO2) /* Configure MC02 to drive the PHY. Board logic must provide MC02 clocking * info. */ stm32_configgpio(GPIO_MCO2); stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER); -# endif + +# elif defined(CONFIG_STM32_MII_MCO) + /* Setup MCO pin for alternative usage */ + + stm32_configgpio(GPIO_MCO); + stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE); +# endif /* MII interface pins (17): * diff --git a/nuttx/arch/arm/src/stm32/stm32_syscfg.h b/nuttx/arch/arm/src/stm32/stm32_syscfg.h index 8a57a2c58f..d1487da409 100644 --- a/nuttx/arch/arm/src/stm32/stm32_syscfg.h +++ b/nuttx/arch/arm/src/stm32/stm32_syscfg.h @@ -45,60 +45,10 @@ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) # include "chip/stm32_syscfg.h" +#endif /* CONFIG_STM32_STM32F20XX || CONFIG_STM32_STM32F40XX */ /**************************************************************************************************** * Pre-processor Definitions ****************************************************************************************************/ -/**************************************************************************************************** - * Inline Functions - ****************************************************************************************************/ - -/************************************************************************************ - * Name: stm32_selectmii - * - * Description: - * Selects the MII inteface. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ************************************************************************************/ - -static inline void stm32_selectmii(void) -{ - uint32_t regval; - - regval = getreg32(STM32_SYSCFG_PMC); - regval &= ~SYSCFG_PMC_MII_RMII_SEL; - putreg32(regval, STM32_SYSCFG_PMC); -} - -/************************************************************************************ - * Name: stm32_selectrmii - * - * Description: - * Selects the RMII inteface. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ************************************************************************************/ - -static inline void stm32_selectrmii(void) -{ - uint32_t regval; - - regval = getreg32(STM32_SYSCFG_PMC); - regval |= SYSCFG_PMC_MII_RMII_SEL; - putreg32(regval, STM32_SYSCFG_PMC); -} - -#endif /* CONFIG_STM32_STM32F20XX || CONFIG_STM32_STM32F40XX */ #endif /* __ARCH_ARM_SRC_STM32_STM32_SYSCFG_H */ diff --git a/nuttx/configs/olimex-stm32-p107/include/board.h b/nuttx/configs/olimex-stm32-p107/include/board.h index 71b7f0a593..2fe6e5aafe 100644 --- a/nuttx/configs/olimex-stm32-p107/include/board.h +++ b/nuttx/configs/olimex-stm32-p107/include/board.h @@ -115,27 +115,3 @@ void stm32_boardinitialize(void); #ifdef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG void stm32_board_clockconfig(void); #endif - -/************************************************************************************ - * Name: stm32_selectrmii - * - * Description: - * Selects the RMII inteface. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ************************************************************************************/ - -static inline void stm32_selectrmii(void) -{ - uint32_t regval; - - regval = getreg32(STM32_AFIO_MAPR); - regval |= AFIO_MAPR_MII_RMII_SEL; - putreg32(regval, STM32_AFIO_MAPR); -} - diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index a74cefd689..3508bbefe1 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -558,14 +558,6 @@ Shenzhou-specific Configuration Options CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. Cannot be used with CONFIG_STM32_SPI_INTERRUPT. - CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO - and CONFIG_STM32_DMA2. - CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 - CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. - Default: Medium - CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: - 4-bit transfer mode. - CONFIG_STM32_PHYADDR - The 5-bit address of the PHY on the board CONFIG_STM32_MII - Support Ethernet MII interface CONFIG_STM32_MII_MCO1 - Use MCO1 to clock the MII interface @@ -678,30 +670,6 @@ can be selected as follow: Where is one of the following: - dhcpd: - ----- - - This builds the DCHP server using the apps/examples/dhcpd application - (for execution from FLASH.) See apps/examples/README.txt for information - about the dhcpd example. The server address is 10.0.0.1 and it serves - IP addresses in the range 10.0.0.2 through 10.0.0.17 (all of which, of - course, are configurable). - - CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows - - nettest: - ------- - - This configuration directory may be used to verify networking performance - using the STM32's Ethernet controller. It uses apps/examples/nettest to excercise the - TCP/IP network. - - CONFIG_EXAMPLE_NETTEST_SERVER=n : Target is configured as the client - CONFIG_EXAMPLE_NETTEST_PERFORMANCE=y : Only network performance is verified. - CONFIG_EXAMPLE_NETTEST_IPADDR=(10<<24|0<<16|0<<8|2) : Target side is IP: 10.0.0.2 - CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host side is IP: 10.0.0.1 - CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10<<24|0<<16|0<<8|1) : Server address used by which ever is client. - nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The @@ -899,183 +867,3 @@ Where is one of the following: 11. This configuration requires that jumper JP22 be set to enable RS-232 operation. - - nsh2: - ----- - - This is an alternative NSH configuration. One limitation of the Shenzhou - board is that you cannot have both a UART-based NSH console and SDIO support. - The nsh2 differs from the nsh configuration in the following ways: - - -CONFIG_STM32_USART3=y : USART3 is disabled - +CONFIG_STM32_USART3=n - - -CONFIG_STM32_SDIO=n : SDIO is enabled - +CONFIG_STM32_SDIO=y - - Logically, these are the only differences: This configuration has SDIO (and - the SD card) enabled and the serial console disabled. There is ONLY a - Telnet console!. - - There are some special settings to make life with only a Telnet - - CONFIG_SYSLOG=y - Enables the System Logging feature. - CONFIG_RAMLOG=y - Enable the RAM-based logging feature. - CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console. - This means that any console output from non-Telnet threads will - go into the circular buffer in RAM. - CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the - system logger. This means that (1) in addition to the console - output from other tasks, ALL of the debug output will also to - to the circular buffer in RAM, and (2) NSH will now support a - command called 'dmesg' that can be used to dump the RAM log. - - There are a few other configuration differences as necessary to support - this different device configuration. Just the do the 'diff' if you are - curious. - - NOTES: - 1. See the notes for the nsh configuration. Most also apply to the nsh2 - configuration. Like the nsh configuration, this configuration can - be modified to support a variety of additional tests. - - 2. RS-232 is disabled, but Telnet is still available for use as a console. - Since RS-232 and SDIO use the same pins (one controlled by JP22), RS232 - and SDIO cannot be used concurrently. - - 3. This configuration requires that jumper JP22 be set to enable SDIO - operation. To enable MicroSD Card, which shares same I/Os with RS-232, - JP22 is not fitted. - - 4. In order to use SDIO without overruns, DMA must be used. The STM32 F4 - has 192Kb of SRAM in two banks: 112Kb of "system" SRAM located at - 0x2000:0000 and 64Kb of "CCM" SRAM located at 0x1000:0000. It appears - that you cannot perform DMA from CCM SRAM. The work around that I have now - is simply to omit the 64Kb of CCM SRAM from the heap so that all memory is - allocated from System SRAM. This is done by setting: - - CONFIG_MM_REGIONS=1 - - Then DMA works fine. The downside is, of course, is that we lose 64Kb - of precious SRAM. - - 5. Another SDIO/DMA issue. This one is probably a software bug. This is - the bug as stated in the TODO list: - - "If you use a large I/O buffer to access the file system, then the - MMCSD driver will perform multiple block SD transfers. With DMA - ON, this seems to result in CRC errors detected by the hardware - during the transfer. Workaround: CONFIG_MMCSD_MULTIBLOCK_DISABLE=y" - - For this reason, CONFIG_MMCSD_MULTIBLOCK_DISABLE=y appears in the defconfig - file. - - 6. Another DMA-related concern. I see this statement in the reference - manual: "The burst configuration has to be selected in order to respect - the AHB protocol, where bursts must not cross the 1 KB address boundary - because the minimum address space that can be allocated to a single slave - is 1 KB. This means that the 1 KB address boundary should not be crossed - by a burst block transfer, otherwise an AHB error would be generated, - that is not reported by the DMA registers." - - There is nothing in the DMA driver to prevent this now. - - nxconsole: - ---------- - This is yet another NSH configuration. This NSH configuration differs - from the others, however, in that it uses the NxConsole driver to host - the NSH shell. - - Some of the differences in this configuration and the normal nsh configuration - include these settings in the defconfig file: - - These select NX Multi-User mode: - - CONFG_NX_MULTIUSER=y - CONFIG_DISABLE_MQUEUE=n - - The following definition in the defconfig file to enables the NxConsole - driver: - - CONFIG_NXCONSOLE=y - - The appconfig file selects examples/nxconsole instead of examples/nsh: - - CONFIGURED_APPS += examples/nxconsole - - Other configuration settings: - - CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_LCD_LANDSCAPE=y : 320x240 landscape - - nxwm - ---- - This is a special configuration setup for the NxWM window manager - UnitTest. The NxWM window manager can be found here: - - trunk/NxWidgets/nxwm - - The NxWM unit test can be found at: - - trunk/NxWidgets/UnitTests/nxwm - - Documentation for installing the NxWM unit test can be found here: - - trunk/NxWidgets/UnitTests/README.txt - - Here is the quick summary of the build steps: - - 1. Intall the nxwm configuration - - $ cd ~/nuttx/trunk/nuttx/tools - $ ./configure.sh shenzhou/nxwm - - 2. Make the build context (only) - - $ cd .. - $ . ./setenv.sh - $ make context - ... - - 3. Install the nxwm unit test - - $ cd ~/nuttx/trunk/NxWidgets - $ tools/install.sh ~/nuttx/trunk/apps nxwm - Creating symbolic link - - To ~/nuttx/trunk/NxWidgets/UnitTests/nxwm - - At ~/nuttx/trunk/apps/external - - 4. Build the NxWidgets library - - $ cd ~/nuttx/trunk/NxWidgets/libnxwidgets - $ make TOPDIR=~/nuttx/trunk/nuttx - ... - - 5. Build the NxWM library - - $ cd ~/nuttx/trunk/NxWidgets/nxwm - $ make TOPDIR=~//nuttx/trunk/nuttx - ... - - 6. Built NuttX with the installed unit test as the application - - $ cd ~/nuttx/trunk/nuttx - $ make - - ostest: - ------ - This configuration directory, performs a simple OS test using - examples/ostest. By default, this project assumes that you are - using the DFU bootloader. - - CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows - - telnetd: - -------- - - A simple test of the Telnet daemon(see apps/netutils/README.txt, - apps/examples/README.txt, and apps/examples/telnetd). This is - the same daemon that is used in the nsh configuration so if you - use NSH, then you don't care about this. This test is good for - testing the Telnet daemon only because it works in a simpler - environment than does the nsh configuration. diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h index 026a6adab2..560fe1e00c 100644 --- a/nuttx/configs/shenzhou/include/board.h +++ b/nuttx/configs/shenzhou/include/board.h @@ -344,27 +344,3 @@ EXTERN void stm32_ledinit(void); EXTERN void stm32_setled(int led, bool ledon); EXTERN void stm32_setleds(uint8_t ledset); #endif - -/************************************************************************************ - * Name: stm32_selectrmii - * - * Description: - * Selects the RMII inteface. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ************************************************************************************/ - -static inline void stm32_selectrmii(void) -{ - uint32_t regval; - - regval = getreg32(STM32_AFIO_MAPR); - regval |= AFIO_MAPR_MII_RMII_SEL; - putreg32(regval, STM32_AFIO_MAPR); -} - diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 6f223c1648..907871104f 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -147,7 +147,7 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set # CONFIG_STM32_JTAG_SW_ENABLE is not set # CONFIG_STM32_FORCEPOWER is not set -# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # SPI Configuration @@ -295,7 +295,7 @@ CONFIG_DEV_NULL=y # CONFIG_PWM is not set # CONFIG_I2C is not set CONFIG_SPI=y -CONFIG_SPI_OWNBUS=y +# CONFIG_SPI_OWNBUS is not set CONFIG_SPI_EXCHANGE=y CONFIG_SPI_CMDDATA=y CONFIG_RTC=y @@ -432,7 +432,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set CONFIG_HAVE_CXX=y -CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_HAVE_CXXINITIALIZE is not set # CONFIG_CXX_NEWLONG is not set # @@ -733,7 +733,8 @@ CONFIG_EXAMPLES_NSH=y # # Name resolution # -# CONFIG_NETUTILS_RESOLV is not set +CONFIG_NETUTILS_RESOLV=y +CONFIG_NET_RESOLV_ENTRIES=8 # # SMTP @@ -763,7 +764,7 @@ CONFIG_NETUTILS_UIPLIB=y # # uIP web client # -# CONFIG_NETUTILS_WEBCLIENT is not set +CONFIG_NETUTILS_WEBCLIENT=y # # uIP web server diff --git a/nuttx/configs/shenzhou/scripts/ld.script b/nuttx/configs/shenzhou/scripts/ld.script index 5630b38df7..fc4dfbd6b7 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script +++ b/nuttx/configs/shenzhou/scripts/ld.script @@ -33,11 +33,14 @@ * ****************************************************************************/ +/* The STM32F107VC has 256Kb of FLASH beginning at address 0x0800:0000 and + * 64Kb of SRAM beginning at address 0x2000:0000. + */ + MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 256K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - } OUTPUT_ARCH(arm) diff --git a/nuttx/configs/shenzhou/scripts/ld.script.dfu b/nuttx/configs/shenzhou/scripts/ld.script.dfu index b1d41e0abf..80494bc7b0 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script.dfu +++ b/nuttx/configs/shenzhou/scripts/ld.script.dfu @@ -33,11 +33,16 @@ * ****************************************************************************/ -/* Don't know if this is correct. Just 256K-48K (not testet) */ +/* The STM32F107VC has 256Kb of FLASH beginning at address 0x0800:0000 and + * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the + * STMicro DFU bootloader is being used. In that case, the corrct load .text + * load address is 0x08003000 (leaving 464Kb). + */ + MEMORY { - flash (rx) : ORIGIN = 0x08003000, LENGTH = 208K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K + flash (rx) : ORIGIN = 0x08003000, LENGTH = 208K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K } OUTPUT_ARCH(arm) @@ -62,7 +67,7 @@ SECTIONS _eronly = ABSOLUTE(.); - /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ + /* The STM32F107VC has 64Kb of SRAM beginning at the following address */ .data : { _sdata = ABSOLUTE(.); diff --git a/nuttx/configs/shenzhou/src/Makefile b/nuttx/configs/shenzhou/src/Makefile index e588cddde7..11e36f136e 100644 --- a/nuttx/configs/shenzhou/src/Makefile +++ b/nuttx/configs/shenzhou/src/Makefile @@ -40,7 +40,11 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_boot.c up_spi.c +CSRCS = up_boot.c up_spi.c up_mmcsd.c + +ifeq ($(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG),y) +CSRCS += up_clockconfig.c +endif ifeq ($(CONFIG_HAVE_CXX),y) CSRCS += up_cxxinitialize.c @@ -50,6 +54,7 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += up_autoleds.c else CSRCS += up_userleds.c +endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += up_buttons.c diff --git a/nuttx/configs/shenzhou/src/shenzhou-internal.h b/nuttx/configs/shenzhou/src/shenzhou-internal.h index 2b490b1877..6f9683a56f 100644 --- a/nuttx/configs/shenzhou/src/shenzhou-internal.h +++ b/nuttx/configs/shenzhou/src/shenzhou-internal.h @@ -96,10 +96,10 @@ #define MAX_IRQBUTTON BUTTON_KEY4 #define NUM_IRQBUTTONS (BUTTON_KEY4 - BUTTON_KEY1 + 1) -#define GPIO_BTN_WAKEUP (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0) -#define GPIO_BTN_USERKEY (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10) -#define GPIO_BTN_USERKEY2 (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN4) -#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13) +#define GPIO_BTN_WAKEUP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0) +#define GPIO_BTN_USERKEY (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10) +#define GPIO_BTN_USERKEY2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN4) +#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13) /* LEDs * @@ -173,7 +173,8 @@ * 95 PB8 USB_PWR Drives USB VBUS */ -#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_SPEED_100MHz|\ + GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) /* Audio DAC * @@ -204,7 +205,7 @@ * 58 PD11 SD_CS */ -#define GPIO_SD_CD (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN14) +#define GPIO_SD_CD (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN14) #define GPIO_SD_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN11) @@ -258,5 +259,16 @@ void weak_function stm32_usbinitialize(void); int stm32_usbhost_initialize(void); #endif +/**************************************************************************** + * Name: stm32_sdinitialize + * + * Description: + * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n + * and CONFIG_STM32_SPI1=y + * + ****************************************************************************/ + +int stm32_sdinitialize(int minor); + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SHENZHOUL_SRC_SHENZHOU_INTERNAL_H */ diff --git a/nuttx/configs/shenzhou/src/up_clockconfig.c b/nuttx/configs/shenzhou/src/up_clockconfig.c new file mode 100644 index 0000000000..6c3bd56e14 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_clockconfig.c @@ -0,0 +1,167 @@ +/************************************************************************************ + * configs/olimex-stm32-p107/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_board_clockconfig + * + * Description: + * Any STM32 board may replace the "standard" board clock configuration logic with + * its own, custom clock cofiguration logic. + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG +void stm32_board_clockconfig(void) +{ + uint32_t regval; + + regval = getreg32(STM32_RCC_CR); + regval &= ~RCC_CR_HSEBYP; /* Disable HSE clock bypass */ + regval |= RCC_CR_HSEON; /* Enable HSE */ + putreg32(regval, STM32_RCC_CR); + + /* Set flash wait states + * Sysclk runs with 72MHz -> 2 waitstates. + * 0WS from 0-24MHz + * 1WS from 24-48MHz + * 2WS from 48-72MHz + */ + + regval = getreg32(STM32_FLASH_ACR); + regval &= ~FLASH_ACR_LATENCY_MASK; + regval |= (FLASH_ACR_LATENCY_2|FLASH_ACR_PRTFBE); + putreg32(regval, STM32_FLASH_ACR); + + regval = getreg32(STM32_RCC_CFGR2); + regval &= ~(RCC_CFGR2_PREDIV2_MASK + | RCC_CFGR2_PLL2MUL_MASK + | RCC_CFGR2_PREDIV1SRC_MASK + | RCC_CFGR2_PREDIV1_MASK); + regval |= RCC_CFGR2_PREDIV2d5; /* 25MHz / 5 */ + regval |= RCC_CFGR2_PLL2MULx8; /* 5MHz * 8 => 40MHz */ + regval |= RCC_CFGR2_PREDIV1SRC_PLL2; /* Use PLL2 as input for PREDIV1 */ + regval |= RCC_CFGR2_PREDIV1d5; /* 40MHz / 5 => 8MHz */ + putreg32(regval, STM32_RCC_CFGR2); + + /* Set the PCLK2 divider */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~(RCC_CFGR_PPRE2_MASK | RCC_CFGR_HPRE_MASK); + regval |= STM32_RCC_CFGR_PPRE2; + regval |= RCC_CFGR_HPRE_SYSCLK; + putreg32(regval, STM32_RCC_CFGR); + + /* Set the PCLK1 divider */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_PPRE1_MASK; + regval |= STM32_RCC_CFGR_PPRE1; + putreg32(regval, STM32_RCC_CFGR); + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLL2ON; + putreg32(regval, STM32_RCC_CR); + + /* Wait for PLL2 ready */ + + while((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0); + + /* Setup PLL3 for RMII clock on MCO */ + + regval = getreg32(STM32_RCC_CFGR2); + regval &= ~(RCC_CFGR2_PLL3MUL_MASK); + regval |= RCC_CFGR2_PLL3MULx10; + putreg32(regval, STM32_RCC_CFGR2); + + /* Switch PLL3 on */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLL3ON; + putreg32(regval, STM32_RCC_CR); + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLL3RDY) == 0); + + /* Set main PLL source 8MHz * 9 => 72MHz*/ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL_MASK); + regval |= (RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL_CLKx9); + putreg32(regval, STM32_RCC_CFGR); + + /* Switch main PLL on */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLLON; + putreg32(regval, STM32_RCC_CR); + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLRDY) == 0); + + /* Select PLL as system clock source */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_SW_MASK; + regval |= RCC_CFGR_SW_PLL; + putreg32(regval, STM32_RCC_CFGR); + + /* Wait until PLL is used as the system clock source */ + + while ((getreg32(STM32_RCC_CFGR) & RCC_CFGR_SWS_PLL) == 0); +} +#endif diff --git a/nuttx/configs/shenzhou/src/up_composite.c b/nuttx/configs/shenzhou/src/up_composite.c index 58f90797b2..cf61aeaad1 100644 --- a/nuttx/configs/shenzhou/src/up_composite.c +++ b/nuttx/configs/shenzhou/src/up_composite.c @@ -4,7 +4,7 @@ * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * - * Configure and register the STM32 MMC/SD SDIO block driver. + * Configure and register the STM32 SPI-based MMC/SD block driver. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,38 +43,19 @@ #include #include -#include -#include -#include -#include - -#include "stm32_internal.h" - -/* There is nothing to do here if SDIO support is not selected. */ - -#ifdef CONFIG_STM32_SDIO +#include "shenzhou_internal.h" /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ - /* Configuration ************************************************************/ +/* Device minor number */ #ifndef CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 # define CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 0 #endif -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL -# undef STM32_MMCSDSLOTNO -# define STM32_MMCSDSLOTNO 0 -#else - /* Add configuration for new STM32 boards here */ -# error "Unrecognized STM32 board" -#endif - /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS @@ -118,46 +99,8 @@ int composite_archinitialize(void) */ #ifndef CONFIG_NSH_BUILTIN_APPS - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("composite_archinitialize: Initializing SDIO slot %d\n", - STM32_MMCSDSLOTNO); - - sdio = sdio_initialize(STM32_MMCSDSLOTNO); - if (!sdio) - { - message("composite_archinitialize: Failed to initialize SDIO slot %d\n", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - message("composite_archinitialize: Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1, sdio); - if (ret != OK) - { - message("composite_archinitialize: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("composite_archinitialize: Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then let's guess and say that there is a card in the slot. I need to check to - * see if the STM3210E-EVAL board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - + return sd_mount(CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1); +#else + return OK; #endif /* CONFIG_NSH_BUILTIN_APPS */ - - return OK; } - -#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/shenzhou/src/up_mmcsd.c b/nuttx/configs/shenzhou/src/up_mmcsd.c new file mode 100644 index 0000000000..3de7f26208 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_mmcsd.c @@ -0,0 +1,123 @@ +/**************************************************************************** + * config/shenzhou/src/up_mmcsd.c + * arch/arm/src/board/up_mmcsd.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ +/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ + +#define HAVE_MMCSD 1 /* Assume that we have SD support */ +#define STM32_MMCSDSPIPORTNO 1 /* Port is SPI1 */ +#define STM32_MMCSDSLOTNO 0 /* There is only one slot */ + +#ifndef CONFIG_STM32_SPI1 +# undef HAVE_MMCSD +#else +# ifdef CONFIG_SPI_OWNBUS +# warning "SPI1 is shared with SD and FLASH but CONFIG_SPI_OWNBUS is defined" +# endif +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifndef CONFIG_DISABLE_MOUNTPOINT +# undef NSH_HAVEMMCSD +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_sdinitialize + * + * Description: + * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n + * and CONFIG_STM32_SPI1=y + * + ****************************************************************************/ + +int stm32_sdinitialize(int minor) +{ +#ifdef HAVE_MMCSD + FAR struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + fvdbg("Initializing SPI port %d\n", STM32_MMCSDSPIPORTNO); + + spi = up_spiinitialize(STM32_MMCSDSPIPORTNO); + if (!spi) + { + fdbg("Failed to initialize SPI port %d\n", STM32_MMCSDSPIPORTNO); + return -ENODEV; + } + + fvdbg("Successfully initialized SPI port %d\n", STM32_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + fvdbg("Binding SPI port %d to MMC/SD slot %d\n", + STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(minor, STM32_MMCSDSLOTNO, spi); + if (ret < 0) + { + fdbg("Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO, ret); + return ret; + } + + fvdbg("Successfuly bound SPI port %d to MMC/SD slot %d\n", + STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO); +#endif + return OK; +} diff --git a/nuttx/configs/shenzhou/src/up_nsh.c b/nuttx/configs/shenzhou/src/up_nsh.c index 3d9ba407fb..6e657706ef 100644 --- a/nuttx/configs/shenzhou/src/up_nsh.c +++ b/nuttx/configs/shenzhou/src/up_nsh.c @@ -45,44 +45,39 @@ #include #include -#ifdef CONFIG_STM32_SPI1 -# include -# include -#endif - -#ifdef CONFIG_STM32_SDIO -# include -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - #include "stm32_internal.h" #include "shenzhou-internal.h" /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ - /* Configuration ************************************************************/ -/* For now, don't build in any SPI1 support -- NSH is not using it */ - -#undef CONFIG_STM32_SPI1 - /* Assume that we support everything until convinced otherwise */ #define HAVE_MMCSD 1 #define HAVE_USBDEV 1 #define HAVE_USBHOST 1 -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support - * is not enabled. - */ +/* Configuration ************************************************************/ +/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) +#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ +#define STM32_MMCSDSLOTNO 0 /* Only one slot */ + +#ifndef CONFIG_STM32_SPI1 +# undef HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifndef CONFIG_DISABLE_MOUNTPOINT +# undef NSH_HAVEMMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled) */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) # undef HAVE_MMCSD #endif @@ -95,13 +90,26 @@ /* Default MMC/SD SLOT number */ -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO +# error "Only one MMC/SD slot: Slot 0" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO # endif # ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO +# endif + +/* Verify configured SPI port number */ + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO +# error "Only one MMC/SD port: SPI1" +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO STM32_MMCSDSPIPORTNO +# endif + +# ifndef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO STM32_MMCSDSPIPORTNO # endif #endif @@ -154,58 +162,27 @@ int nsh_archinitialize(void) { -#ifdef CONFIG_STM32_SPI1 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; -#endif -#ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; -#endif #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) int ret; #endif - /* Configure SPI-based devices */ - -#ifdef CONFIG_STM32_SPI1 -# warning "Missing support for the SPI FLASH" -#endif - - /* Mount the SDIO-based MMC/SD block driver */ + /* Initialize the SPI-based MMC/SD slot */ #ifdef HAVE_MMCSD - /* First, get an instance of the SDIO interface */ - - sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) + ret = stm32_sdinitialze(CONFIG_NSH_MMCSDMINOR); + if (ret < 0) { - message("nsh_archinitialize: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); - if (ret != OK) - { - message("nsh_archinitialize: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + message("nsh_archinitialize: Failed to initialize MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSLOTNO, ret); return ret; } - - /* Then let's guess and say that there is a card in the slot. I need to check to - * see if the STM3240G-EVAL board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); #endif -#ifdef HAVE_USBHOST /* Initialize USB host operation. stm32_usbhost_initialize() starts a thread * will monitor for USB connection and disconnection events. */ +#ifdef HAVE_USBHOST ret = stm32_usbhost_initialize(); if (ret != OK) { diff --git a/nuttx/configs/shenzhou/src/up_spi.c b/nuttx/configs/shenzhou/src/up_spi.c index 5a3e691595..ce6a1f75e9 100644 --- a/nuttx/configs/shenzhou/src/up_spi.c +++ b/nuttx/configs/shenzhou/src/up_spi.c @@ -153,7 +153,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele stm32_gpiowrite(GPIO_SD_CS, !selected); } - elseif (devid == SPIDEV_FLASH) + else if (devid == SPIDEV_FLASH) { /* Set the GPIO low to select and high to de-select */ @@ -163,14 +163,16 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { + /* The card detect pin is pulled up so that we detect the presence of a card + * by see a low value on the input pin. + */ + if (stm32_gpioread(GPIO_SD_CD)) { return 0; } - else - { - return SPI_STATUS_PRESENT; - } + + return SPI_STATUS_PRESENT; } #endif @@ -187,7 +189,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele stm32_gpiowrite(GPIO_LCD_CS, !selected); } - elseif (devid == SPIDEV_WIRELESS) + else if (devid == SPIDEV_WIRELESS) { /* Set the GPIO low to select and high to de-select */ diff --git a/nuttx/configs/shenzhou/src/up_usbmsc.c b/nuttx/configs/shenzhou/src/up_usbmsc.c index 8d12f6324c..8566aedfd8 100644 --- a/nuttx/configs/shenzhou/src/up_usbmsc.c +++ b/nuttx/configs/shenzhou/src/up_usbmsc.c @@ -4,7 +4,7 @@ * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * - * Configure and register the STM32 MMC/SD SDIO block driver. + * Configure and register the STM32 SPI-based MMC/SD block driver. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,30 +45,17 @@ #include #include -#include -#include - #include "stm32_internal.h" -/* There is nothing to do here if SDIO support is not selected. */ - -#ifdef CONFIG_STM32_SDIO - /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ - /* Configuration ************************************************************/ #ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 # define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 #endif -/* SLOT number(s) could depend on the board configuration */ - -#undef STM32_MMCSDSLOTNO -#define STM32_MMCSDSLOTNO 0 - /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS @@ -89,7 +76,6 @@ # endif #endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -110,50 +96,8 @@ int usbmsc_archinitialize(void) */ #ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("usbmsc_archinitialize: " - "Initializing SDIO slot %d\n", - STM32_MMCSDSLOTNO); - - sdio = sdio_initialize(STM32_MMCSDSLOTNO); - if (!sdio) - { - message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - message("usbmsc_archinitialize: " - "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBMSC_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); - if (ret != OK) - { - message("usbmsc_archinitialize: " - "Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("usbmsc_archinitialize: " - "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then let's guess and say that there is a card in the slot. I need to check to - * see if the Shenzhou board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - -#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ - - return OK; + return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1); +#else + return OK; +#endif } - -#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh index 7ac4b8a3cb..3b68fe3f62 100755 --- a/nuttx/tools/configure.sh +++ b/nuttx/tools/configure.sh @@ -125,8 +125,9 @@ newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f defappdir=y if [ -z "${appdir}" ]; then - appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2` + quoted=`grep "^CONFIG_APPS_DIR=" "${configpath}/defconfig" | cut -d'=' -f2` if [ ! -z "${appdir}" ]; then + appdir=`echo ${quoted} | sed -e "s/\"//g"` defappdir=n fi fi @@ -174,6 +175,18 @@ chmod 755 "${TOPDIR}/setenv.sh" install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \ { echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; } +# If we did not use the CONFIG_APPS_DIR that was in the defconfig config file, +# then append the correct application information to the tail of the .config +# file + +if [ "X${defappdir}" = "Xy" ]; then + sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX" + echo "" >> "${TOPDIR}/.configX" + echo "# Application configuration" >> "${TOPDIR}/.configX" + echo "" >> "${TOPDIR}/.configX" + echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX" +fi + # Copy appconfig file. The appconfig file will be copied to ${appdir}/.config # if both (1) ${appdir} is defined and (2) we are not using the new configuration # (which does not require a .config file in the appsdir. @@ -184,14 +197,6 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then else install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \ { echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; } - - if [ "X${defappdir}" = "Xy" ]; then - sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX" - echo "" >> "${TOPDIR}/.configX" - echo "# Application configuration" >> "${TOPDIR}/.configX" - echo "" >> "${TOPDIR}/.configX" - echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX" - fi fi fi From 6f6a2289e8b1efe3fa999c1d8dc561261dbb47ed Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 18:57:57 +0000 Subject: [PATCH 37/95] Kconfig: QEMU fixes git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5116 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/Kconfig | 2 +- nuttx/configs/Kconfig | 2 +- nuttx/configs/qemu-i486/nsh/defconfig | 1 + nuttx/configs/qemu-i486/ostest/defconfig | 1 + nuttx/configs/shenzhou/nsh/Make.defs | 8 +++++++- nuttx/configs/shenzhou/scripts/ld.script | 4 ++-- nuttx/configs/shenzhou/scripts/ld.script.dfu | 6 +++--- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index 0c124b2423..92890be96a 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -143,7 +143,7 @@ config DRAM_SIZE comment "Boot options" choice - prompt "LPC31xx Boot Mode" + prompt "Boot Mode" default BOOT_RUNFROMFLASH config BOOT_RUNFROMEXTSRAM diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 77c691cfca..f8470bc948 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -367,7 +367,7 @@ config ARCH_BOARD_PJRC_87C52 config ARCH_BOARD_QEMU_I486 bool "Qemu i486 Mode" - depends on ARCH_QEMU + depends on ARCH_X86 || ARCH_I486 ---help--- Port of NuttX to QEMU in i486 mode. This port will also run on real i486 hardwared (Google the Bifferboard). diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index e514da1f42..8fb1fff89f 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -43,6 +43,7 @@ CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_BOARD="qemu-i486" CONFIG_ARCH_BOARD_QEMU_I486=y CONFIG_BOARD_LOOPSPERMSEC=999 +CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_DRAM_SIZE=1048576 CONFIG_DRAM_START=0x00100000 CONFIG_ARCH_NOINTC=n diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig index 52b8ae80cb..0fa5f5cb6d 100644 --- a/nuttx/configs/qemu-i486/ostest/defconfig +++ b/nuttx/configs/qemu-i486/ostest/defconfig @@ -43,6 +43,7 @@ CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_BOARD="qemu-i486" CONFIG_ARCH_BOARD_QEMU_I486=y CONFIG_BOARD_LOOPSPERMSEC=999 +CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_DRAM_SIZE=1048576 CONFIG_DRAM_START=0x00100000 CONFIG_ARCH_NOINTC=n diff --git a/nuttx/configs/shenzhou/nsh/Make.defs b/nuttx/configs/shenzhou/nsh/Make.defs index dd3db80dea..130c73f6de 100644 --- a/nuttx/configs/shenzhou/nsh/Make.defs +++ b/nuttx/configs/shenzhou/nsh/Make.defs @@ -88,7 +88,13 @@ ifeq ($(CONFIG_STM32_BUILDROOT),y) MAXOPTIMIZATION = -Os endif -LDSCRIPT = ld.script +# Pick the linker script + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = ld.script.dfu +else + LDSCRIPT = ld.script +endif ifeq ($(WINTOOL),y) # Windows-native toolchains diff --git a/nuttx/configs/shenzhou/scripts/ld.script b/nuttx/configs/shenzhou/scripts/ld.script index fc4dfbd6b7..14f924baec 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script +++ b/nuttx/configs/shenzhou/scripts/ld.script @@ -33,8 +33,8 @@ * ****************************************************************************/ -/* The STM32F107VC has 256Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. +/* The STM32F107VC has 256K of FLASH beginning at address 0x0800:0000 and + * 64K of SRAM beginning at address 0x2000:0000. */ MEMORY diff --git a/nuttx/configs/shenzhou/scripts/ld.script.dfu b/nuttx/configs/shenzhou/scripts/ld.script.dfu index 80494bc7b0..53e3ee4fca 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script.dfu +++ b/nuttx/configs/shenzhou/scripts/ld.script.dfu @@ -33,10 +33,10 @@ * ****************************************************************************/ -/* The STM32F107VC has 256Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the +/* The STM32F107VC has 256K of FLASH beginning at address 0x0800:0000 and + * 64K of SRAM beginning at address 0x2000:0000. Here we assume that the * STMicro DFU bootloader is being used. In that case, the corrct load .text - * load address is 0x08003000 (leaving 464Kb). + * load address is 0x08003000 (leaving 208K). */ MEMORY From b68a4b621c8a3feac6accc97be86a7a6b7b47ab8 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 8 Sep 2012 19:13:29 +0000 Subject: [PATCH 38/95] Remove some old logic in the arm, x86, hc, and sh linker scripts that was kicked off when CONFIG_BOOT_RUNFROMFLASH=y. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5117 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 8 ++++++++ nuttx/arch/arm/src/Makefile | 5 ----- nuttx/arch/hc/src/Makefile | 5 ----- nuttx/arch/sh/src/Makefile | 5 ----- nuttx/arch/x86/src/Makefile | 5 ----- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 19a0bcaae1..ef00bae879 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3284,4 +3284,12 @@ * configs/shenzhou: Add beginnings of a board configuration for the Shenzhou STM32107 board (see www.armjishu.com). Very little is in place as of this initial check-in. + * QEMU: Fixes from Richard Cochran to build QEMU with Kconfig files. + * arch/*/src/Makefile: Remove some old logic that was kicked off + when CONFIG_BOOT_RUNFROMFLASH=y. The old logic used to use + objcopy to move sections. Newer logic changes the load position + of sections in the the linker script. As far as I can tell, there + is nothing in the source tree now that depends on the old way of + doing things (if I am wrong, they will need a change to the linker + script). diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile index ef04153756..74be6c18d1 100644 --- a/nuttx/arch/arm/src/Makefile +++ b/nuttx/arch/arm/src/Makefile @@ -111,11 +111,6 @@ nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ - $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage - @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT) -endif @$(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile index c8d98cf59d..36fc9bf723 100755 --- a/nuttx/arch/hc/src/Makefile +++ b/nuttx/arch/hc/src/Makefile @@ -107,11 +107,6 @@ nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) \ --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ - $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage - @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT) -endif @$(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/sh/src/Makefile b/nuttx/arch/sh/src/Makefile index 1e260d83b9..7ec8c9f80f 100644 --- a/nuttx/arch/sh/src/Makefile +++ b/nuttx/arch/sh/src/Makefile @@ -85,11 +85,6 @@ nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_OBJ) \ --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - @export flashloc=`$(OBJDUMP) --all-headers $(TOPDIR)/$@ | grep _eronly | cut -d' ' -f1`; \ - $(OBJCOPY) --adjust-section-vma=.data=0x$$flashloc $(TOPDIR)/$@ $(TOPDIR)/$@.flashimage - @mv $(TOPDIR)/$@.flashimage $(TOPDIR)/$@ -endif @$(NM) $(TOPDIR)/$@ | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile index c4077b5ccb..9c35e98092 100644 --- a/nuttx/arch/x86/src/Makefile +++ b/nuttx/arch/x86/src/Makefile @@ -113,11 +113,6 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx$(EXEEXT)" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ - $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage - @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT) -endif @$(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map From f57a93eaf61a936608c96bb7533af7f0f60eb897 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Sep 2012 15:43:18 +0000 Subject: [PATCH 39/95] Reconfigured Shenzhou to use JTAG. Misc Kconfig changes git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5118 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/Kconfig | 17 ++++ nuttx/arch/arm/Kconfig | 8 -- nuttx/arch/arm/src/c5471/Kconfig | 2 + nuttx/arch/arm/src/calypso/Kconfig | 2 + nuttx/arch/arm/src/dm320/Kconfig | 2 + nuttx/arch/arm/src/imx/Kconfig | 2 + nuttx/arch/arm/src/kinetis/Kconfig | 2 + nuttx/arch/arm/src/lm3s/Kconfig | 2 + nuttx/arch/arm/src/lpc17xx/Kconfig | 2 + nuttx/arch/arm/src/lpc214x/Kconfig | 2 + nuttx/arch/arm/src/lpc2378/Kconfig | 2 + nuttx/arch/arm/src/lpc31xx/Kconfig | 2 + nuttx/arch/arm/src/lpc43xx/Kconfig | 2 + nuttx/arch/arm/src/sam3u/Kconfig | 2 + nuttx/arch/arm/src/stm32/Kconfig | 6 ++ nuttx/arch/arm/src/str71x/Kconfig | 2 + nuttx/arch/avr/src/at32uc3/Kconfig | 2 + nuttx/arch/avr/src/at90usb/Kconfig | 2 + nuttx/arch/avr/src/atmega/Kconfig | 2 + nuttx/arch/avr/src/avr/Kconfig | 2 + nuttx/arch/avr/src/avr32/Kconfig | 2 + nuttx/arch/hc/src/m9s12/Kconfig | 2 + nuttx/arch/mips/Kconfig | 8 -- nuttx/arch/mips/src/mips32/Kconfig | 2 + nuttx/arch/mips/src/pic32mx/Kconfig | 1 + nuttx/arch/rgmp/Kconfig | 2 + nuttx/arch/sh/src/m16c/Kconfig | 2 + nuttx/arch/sh/src/sh1/Kconfig | 2 + nuttx/arch/sim/Kconfig | 2 + nuttx/arch/x86/Kconfig | 2 + nuttx/arch/x86/src/common/Kconfig | 2 + nuttx/arch/x86/src/i486/Kconfig | 2 + nuttx/arch/x86/src/qemu/Kconfig | 2 + nuttx/arch/z16/Kconfig | 1 + nuttx/arch/z16/src/common/Kconfig | 2 + nuttx/arch/z16/src/z16f/Kconfig | 2 + nuttx/configs/ea3131/tools/usb-driver.txt | 16 ++++ nuttx/configs/ea3152/tools/usb-driver.txt | 16 ++++ nuttx/configs/nucleus2g/tools/usb-driver.txt | 16 ++++ .../olimex-lpc1766stk/tools/usb-driver.txt | 16 ++++ .../olimex-strp711/scripts/usb-driver.txt | 16 ++++ nuttx/configs/shenzhou/nsh/defconfig | 13 ++- nuttx/configs/shenzhou/nsh/setenv.sh | 7 +- .../shenzhou/tools/olimex-arm-usb-ocd.cfg | 13 +++ nuttx/configs/shenzhou/tools/oocd.sh | 92 +++++++++++++++++++ nuttx/configs/shenzhou/tools/stm32.cfg | 69 ++++++++++++++ nuttx/configs/shenzhou/tools/usb-driver.txt | 16 ++++ .../stm3210e-eval/tools/usb-driver.txt | 16 ++++ nuttx/net/recvfrom.c | 5 +- 49 files changed, 391 insertions(+), 21 deletions(-) create mode 100644 nuttx/configs/ea3131/tools/usb-driver.txt create mode 100644 nuttx/configs/ea3152/tools/usb-driver.txt create mode 100644 nuttx/configs/nucleus2g/tools/usb-driver.txt create mode 100644 nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt create mode 100644 nuttx/configs/olimex-strp711/scripts/usb-driver.txt create mode 100644 nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg create mode 100755 nuttx/configs/shenzhou/tools/oocd.sh create mode 100644 nuttx/configs/shenzhou/tools/stm32.cfg create mode 100644 nuttx/configs/shenzhou/tools/usb-driver.txt create mode 100644 nuttx/configs/stm3210e-eval/tools/usb-driver.txt diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index 92890be96a..13335441e5 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -14,23 +14,27 @@ config ARCH_8051 config ARCH_ARM bool "ARM" + select ARCH_HAVE_INTERRUPTSTACK ---help--- The ARM architectures config ARCH_AVR bool "AVR" select ARCH_NOINTC + select ARCH_HAVE_INTERRUPTSTACK ---help--- Atmel 8-bit bit AVR and 32-bit AVR32 architectures config ARCH_HC bool "Freescale HC" select ARCH_NOINTC + select ARCH_HAVE_INTERRUPTSTACK ---help--- Freescale HC architectures (M9S12) config ARCH_MIPS bool "MIPS" + select ARCH_HAVE_INTERRUPTSTACK ---help--- MIPS architectures (PIC32) @@ -43,6 +47,7 @@ config ARCH_RGMP config ARCH_SH bool "Renesas" select ARCH_NOINTC + select ARCH_HAVE_INTERRUPTSTACK ---help--- Renesas architectures (SH and M16C). @@ -140,6 +145,18 @@ config DRAM_SIZE this may be SDRAM or SRAM or any other RAM technology that support program execution. +config ARCH_HAVE_INTERRUPTSTACK + bool + +config ARCH_INTERRUPTSTACK + bool "Use interrupt stack" + depends on ARCH_HAVE_INTERRUPTSTACK + default y + ---help--- + This architecture supports an interrupt stack. If defined, this symbol + is the size of the interrupt stack in bytes. If not defined, the user + task stacks will be used during interrupt handling. + comment "Boot options" choice diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 6550950e73..3bd5312326 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -216,14 +216,6 @@ config PAGING If set =y in your configation file, this setting will enable the on-demand paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html. -config ARCH_INTERRUPTSTACK - bool "Use interrupt stack" - default y - ---help--- - This architecture supports an interrupt stack. If defined, this symbol - is the size of the interrupt stack in bytes. If not defined, the user - task stacks will be used during interrupt handling. - config ARCH_IRQPRIO bool "Interrupt priority" default y if ARCH_CORTEXM3 || ARCH_CORTEXM4 diff --git a/nuttx/arch/arm/src/c5471/Kconfig b/nuttx/arch/arm/src/c5471/Kconfig index ae2bf31307..06363ad7df 100644 --- a/nuttx/arch/arm/src/c5471/Kconfig +++ b/nuttx/arch/arm/src/c5471/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "C5471 Configuration Options" diff --git a/nuttx/arch/arm/src/calypso/Kconfig b/nuttx/arch/arm/src/calypso/Kconfig index ae2bf31307..65726a6096 100644 --- a/nuttx/arch/arm/src/calypso/Kconfig +++ b/nuttx/arch/arm/src/calypso/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "Calypso Configuration Options" diff --git a/nuttx/arch/arm/src/dm320/Kconfig b/nuttx/arch/arm/src/dm320/Kconfig index ae2bf31307..0255c5ff1b 100644 --- a/nuttx/arch/arm/src/dm320/Kconfig +++ b/nuttx/arch/arm/src/dm320/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "DM320 Configuration Options" diff --git a/nuttx/arch/arm/src/imx/Kconfig b/nuttx/arch/arm/src/imx/Kconfig index ae2bf31307..879f50ef7d 100644 --- a/nuttx/arch/arm/src/imx/Kconfig +++ b/nuttx/arch/arm/src/imx/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "i.MX Configuration Options" diff --git a/nuttx/arch/arm/src/kinetis/Kconfig b/nuttx/arch/arm/src/kinetis/Kconfig index ae2bf31307..210683f59f 100644 --- a/nuttx/arch/arm/src/kinetis/Kconfig +++ b/nuttx/arch/arm/src/kinetis/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "Kinetis Configuration Options" diff --git a/nuttx/arch/arm/src/lm3s/Kconfig b/nuttx/arch/arm/src/lm3s/Kconfig index 1fd203f4fc..03da5c458a 100644 --- a/nuttx/arch/arm/src/lm3s/Kconfig +++ b/nuttx/arch/arm/src/lm3s/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "LM3S Configuration Options" + choice prompt "LM3S Chip Selection" default ARCH_CHIP_LM3S6965 diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig index dc28f8c100..2769fc231f 100644 --- a/nuttx/arch/arm/src/lpc17xx/Kconfig +++ b/nuttx/arch/arm/src/lpc17xx/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "LPC17xx Configuration Options" + choice prompt "NXP LPC17XX Chip Selection" default ARCH_CHIP_LPC1768 diff --git a/nuttx/arch/arm/src/lpc214x/Kconfig b/nuttx/arch/arm/src/lpc214x/Kconfig index ae2bf31307..a26483ed9e 100644 --- a/nuttx/arch/arm/src/lpc214x/Kconfig +++ b/nuttx/arch/arm/src/lpc214x/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "LPC214x Configuration Options" diff --git a/nuttx/arch/arm/src/lpc2378/Kconfig b/nuttx/arch/arm/src/lpc2378/Kconfig index ae2bf31307..89a515d6ac 100644 --- a/nuttx/arch/arm/src/lpc2378/Kconfig +++ b/nuttx/arch/arm/src/lpc2378/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "LPC2378 Configuration Options" diff --git a/nuttx/arch/arm/src/lpc31xx/Kconfig b/nuttx/arch/arm/src/lpc31xx/Kconfig index 17daf94b75..39b19b95d5 100644 --- a/nuttx/arch/arm/src/lpc31xx/Kconfig +++ b/nuttx/arch/arm/src/lpc31xx/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "LPC31xx Configuration Options" + choice prompt "LPC31 Chip Selection" default ARCH_CHIP_LPC3131 diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 0ae9f8ffef..4653b2ee35 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "LPC43xx Configuration Options" + choice prompt "LPC43XX Chip Selection" default ARCH_CHIP_LPC4330FET100 diff --git a/nuttx/arch/arm/src/sam3u/Kconfig b/nuttx/arch/arm/src/sam3u/Kconfig index ae2bf31307..b845655474 100644 --- a/nuttx/arch/arm/src/sam3u/Kconfig +++ b/nuttx/arch/arm/src/sam3u/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "AT91SAM3U Configuration Options" diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index ef1ca63cec..80610f271e 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +comment "STM32 Configuration Options" + choice prompt "STM32 Chip Selection" default ARCH_CHIP_STM32F103ZET6 @@ -414,6 +416,8 @@ config STM32_CAN bool default y if STM32_CAN1 || STM32_CAN2 +menu "Alternate Pin Mapping" + choice prompt "TIM1 Alternate Pin Mappings" depends on STM32_STM32F10XX && STM32_TIM1 @@ -537,6 +541,8 @@ config STM32_ETH_REMAP default n depends on STM32_CONNECTIVITYLINE && STM32_ETHMAC +endmenu + choice prompt "JTAG Configuration" default STM32_JTAG_DISABLE diff --git a/nuttx/arch/arm/src/str71x/Kconfig b/nuttx/arch/arm/src/str71x/Kconfig index ae2bf31307..0e9c87d54e 100644 --- a/nuttx/arch/arm/src/str71x/Kconfig +++ b/nuttx/arch/arm/src/str71x/Kconfig @@ -2,3 +2,5 @@ # For a description of the syntax of this configuration file, # see misc/tools/kconfig-language.txt. # + +comment "STR71x Configuration Options" diff --git a/nuttx/arch/avr/src/at32uc3/Kconfig b/nuttx/arch/avr/src/at32uc3/Kconfig index 4c3bd28c66..fcb9f8405e 100644 --- a/nuttx/arch/avr/src/at32uc3/Kconfig +++ b/nuttx/arch/avr/src/at32uc3/Kconfig @@ -4,4 +4,6 @@ # if ARCH_AT32UC3 +comment "AT32U3 Configuration Options" + endif diff --git a/nuttx/arch/avr/src/at90usb/Kconfig b/nuttx/arch/avr/src/at90usb/Kconfig index 78cd6d059b..8f9978a529 100644 --- a/nuttx/arch/avr/src/at90usb/Kconfig +++ b/nuttx/arch/avr/src/at90usb/Kconfig @@ -4,4 +4,6 @@ # if ARCH_AT90USB +comment "AT90USB Configuration Options" + endif diff --git a/nuttx/arch/avr/src/atmega/Kconfig b/nuttx/arch/avr/src/atmega/Kconfig index f0004d7fec..145b525df6 100644 --- a/nuttx/arch/avr/src/atmega/Kconfig +++ b/nuttx/arch/avr/src/atmega/Kconfig @@ -4,5 +4,7 @@ # if ARCH_ATMEGA +comment "ATMega Configuration Options" + endif diff --git a/nuttx/arch/avr/src/avr/Kconfig b/nuttx/arch/avr/src/avr/Kconfig index 1b21ce810c..99228aa2c1 100644 --- a/nuttx/arch/avr/src/avr/Kconfig +++ b/nuttx/arch/avr/src/avr/Kconfig @@ -4,4 +4,6 @@ # if ARCH_FAMILY_AVR +comment "AVR Configuration Options" + endif diff --git a/nuttx/arch/avr/src/avr32/Kconfig b/nuttx/arch/avr/src/avr32/Kconfig index ca1fcd2bf7..12cc033cbc 100644 --- a/nuttx/arch/avr/src/avr32/Kconfig +++ b/nuttx/arch/avr/src/avr32/Kconfig @@ -4,4 +4,6 @@ # if ARCH_FAMILY_AVR32 +comment "AVR32 Configuration Options" + endif diff --git a/nuttx/arch/hc/src/m9s12/Kconfig b/nuttx/arch/hc/src/m9s12/Kconfig index 41c4b9c172..e4addf43f5 100644 --- a/nuttx/arch/hc/src/m9s12/Kconfig +++ b/nuttx/arch/hc/src/m9s12/Kconfig @@ -4,4 +4,6 @@ # if ARCH_HSC12 +comment "M9S12 Configuration Options" + endif diff --git a/nuttx/arch/mips/Kconfig b/nuttx/arch/mips/Kconfig index cfa3d589d4..c642f7152d 100644 --- a/nuttx/arch/mips/Kconfig +++ b/nuttx/arch/mips/Kconfig @@ -27,14 +27,6 @@ config ARCH_CHIP string default "pic32mx" if ARCH_CHIP_PIC32MX -config ARCH_INTERRUPTSTACK - bool "Use interrupt stack" - default y - ---help--- - This architecture supports an interrupt stack. If defined, this symbol - is the size of the interrupt stack in bytes. If not defined, the user - task stacks will be used during interrupt handling. - config ARCH_IRQPRIO bool "Interrupt priority" default y if ARCH_CHIP_PIC32MX diff --git a/nuttx/arch/mips/src/mips32/Kconfig b/nuttx/arch/mips/src/mips32/Kconfig index e02b0258b9..1b44995687 100644 --- a/nuttx/arch/mips/src/mips32/Kconfig +++ b/nuttx/arch/mips/src/mips32/Kconfig @@ -4,4 +4,6 @@ # if ARCH_MIPS32 +comment "MIPS32 Configuration Options" + endif diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 222c7e4de9..ba77cf5d8f 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -4,6 +4,7 @@ # if ARCH_CHIP_PIC32MX +comment "PIC32MX Configuration Options" choice prompt "PIC32MX chip selection" diff --git a/nuttx/arch/rgmp/Kconfig b/nuttx/arch/rgmp/Kconfig index 7cc5fcc97c..24a9c32051 100644 --- a/nuttx/arch/rgmp/Kconfig +++ b/nuttx/arch/rgmp/Kconfig @@ -4,6 +4,8 @@ # if ARCH_RGMP +comment "RGMP Configuration Options" + choice prompt "RGMP Architecture" default RGMP_SUBARCH_X86 diff --git a/nuttx/arch/sh/src/m16c/Kconfig b/nuttx/arch/sh/src/m16c/Kconfig index 9d510e0371..56db601be2 100644 --- a/nuttx/arch/sh/src/m16c/Kconfig +++ b/nuttx/arch/sh/src/m16c/Kconfig @@ -4,4 +4,6 @@ # if ARCH_M16C +comment "M16C Configuration Options" + endif diff --git a/nuttx/arch/sh/src/sh1/Kconfig b/nuttx/arch/sh/src/sh1/Kconfig index b0405f2f52..3fe3ebb7d9 100644 --- a/nuttx/arch/sh/src/sh1/Kconfig +++ b/nuttx/arch/sh/src/sh1/Kconfig @@ -4,4 +4,6 @@ # if ARCH_SH1 +comment "SH-1 Configuration Options" + endif diff --git a/nuttx/arch/sim/Kconfig b/nuttx/arch/sim/Kconfig index 33f25f6a61..331f61c79e 100644 --- a/nuttx/arch/sim/Kconfig +++ b/nuttx/arch/sim/Kconfig @@ -4,6 +4,8 @@ # if ARCH_SIM +comment "Simulation Configuration Options" + config SIM_M32 bool "Build 32-bit simulation on 64-bit machine" default n diff --git a/nuttx/arch/x86/Kconfig b/nuttx/arch/x86/Kconfig index c988c92a4a..10c081fab4 100644 --- a/nuttx/arch/x86/Kconfig +++ b/nuttx/arch/x86/Kconfig @@ -4,6 +4,8 @@ # if ARCH_X86 +comment "x86 Configuration Options" + choice prompt "x86 chip selection" default ARCH_I486 diff --git a/nuttx/arch/x86/src/common/Kconfig b/nuttx/arch/x86/src/common/Kconfig index fff9d7f122..9595e6e8ad 100644 --- a/nuttx/arch/x86/src/common/Kconfig +++ b/nuttx/arch/x86/src/common/Kconfig @@ -4,4 +4,6 @@ # if ARCH_X86 +comment "Common Configuration Options" + endif diff --git a/nuttx/arch/x86/src/i486/Kconfig b/nuttx/arch/x86/src/i486/Kconfig index be9fa2cd0b..1847a4dd4e 100644 --- a/nuttx/arch/x86/src/i486/Kconfig +++ b/nuttx/arch/x86/src/i486/Kconfig @@ -4,4 +4,6 @@ # if ARCH_I486 +comment "i486 Configuration Options" + endif diff --git a/nuttx/arch/x86/src/qemu/Kconfig b/nuttx/arch/x86/src/qemu/Kconfig index ac2e2a5e92..5623ab063f 100644 --- a/nuttx/arch/x86/src/qemu/Kconfig +++ b/nuttx/arch/x86/src/qemu/Kconfig @@ -4,4 +4,6 @@ # if ARCH_CHIP_QEMU +comment "QEMU Configuration Options" + endif diff --git a/nuttx/arch/z16/Kconfig b/nuttx/arch/z16/Kconfig index acf58bcf34..a806e6ed11 100644 --- a/nuttx/arch/z16/Kconfig +++ b/nuttx/arch/z16/Kconfig @@ -4,6 +4,7 @@ # if ARCH_Z16 +comment "Z16 Configuration Options" choice prompt "ZNEO chip selection" diff --git a/nuttx/arch/z16/src/common/Kconfig b/nuttx/arch/z16/src/common/Kconfig index 0f94fb19af..d01f3df2db 100644 --- a/nuttx/arch/z16/src/common/Kconfig +++ b/nuttx/arch/z16/src/common/Kconfig @@ -4,4 +4,6 @@ # if ARCH_Z16 +comment "Common Configuration Options" + endif diff --git a/nuttx/arch/z16/src/z16f/Kconfig b/nuttx/arch/z16/src/z16f/Kconfig index f410f51c4c..826720ee7a 100644 --- a/nuttx/arch/z16/src/z16f/Kconfig +++ b/nuttx/arch/z16/src/z16f/Kconfig @@ -4,4 +4,6 @@ # if ARCH_CHIP_Z16F +comment "Z16F Configuration Options" + endif diff --git a/nuttx/configs/ea3131/tools/usb-driver.txt b/nuttx/configs/ea3131/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/ea3131/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/ea3152/tools/usb-driver.txt b/nuttx/configs/ea3152/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/ea3152/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/nucleus2g/tools/usb-driver.txt b/nuttx/configs/nucleus2g/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/nucleus2g/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt b/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/olimex-strp711/scripts/usb-driver.txt b/nuttx/configs/olimex-strp711/scripts/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/olimex-strp711/scripts/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 907871104f..2030b232be 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -70,12 +70,15 @@ CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_HAVE_MPU=y # CONFIG_ARMV7M_MPU is not set -# CONFIG_ARCH_INTERRUPTSTACK is not set CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=5483 # CONFIG_ARCH_CALIBRATION is not set # CONFIG_SERIAL_TERMIOS is not set # CONFIG_NET_MULTICAST is not set + +# +# STM32 Configuration Options +# # CONFIG_ARCH_CHIP_STM32F103ZET6 is not set # CONFIG_ARCH_CHIP_STM32F103RET6 is not set # CONFIG_ARCH_CHIP_STM32F103VCT6 is not set @@ -100,7 +103,7 @@ CONFIG_STM32_CODESOURCERYW=y # CONFIG_STM32_DEVKITARM is not set # CONFIG_STM32_RAISONANCE is not set # CONFIG_STM32_BUILDROOT is not set -CONFIG_STM32_DFU=y +# CONFIG_STM32_DFU is not set # # STM32 Peripheral Support @@ -139,6 +142,10 @@ CONFIG_STM32_USART2=y # CONFIG_STM32_USB is not set # CONFIG_STM32_WWDG is not set CONFIG_STM32_SPI=y + +# +# Alternate Pin Mapping +# CONFIG_STM32_USART2_REMAP=y # CONFIG_STM32_SPI1_REMAP is not set CONFIG_STM32_ETH_REMAP=y @@ -184,6 +191,8 @@ CONFIG_ARCH_STACKDUMP=y # CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_SIZE=65536 +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +# CONFIG_ARCH_INTERRUPTSTACK is not set # # Boot options diff --git a/nuttx/configs/shenzhou/nsh/setenv.sh b/nuttx/configs/shenzhou/nsh/setenv.sh index 1ba3363933..d57d6f003d 100755 --- a/nuttx/configs/shenzhou/nsh/setenv.sh +++ b/nuttx/configs/shenzhou/nsh/setenv.sh @@ -69,7 +69,10 @@ export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ # toolchain. #export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -# Add the path to the toolchain to the PATH varialble -export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +# This is the path to the tools/ subdirectory +export TOOLS_DIR="${WD}/configs/shenzhou/tools" + +# Add the path to the toolchain to the PATH variable +export PATH="${TOOLCHAIN_BIN}:${TOOLS_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg b/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg new file mode 100644 index 0000000000..9752dd4187 --- /dev/null +++ b/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg @@ -0,0 +1,13 @@ +# +# Olimex ARM-USB-OCD +# +# http://www.olimex.com/dev/arm-usb-ocd.html +# + +interface ft2232 +ft2232_device_desc "Olimex OpenOCD JTAG" +ft2232_layout olimex-jtag +ft2232_vid_pid 0x15ba 0x0003 + +#jtag_khz 600 + diff --git a/nuttx/configs/shenzhou/tools/oocd.sh b/nuttx/configs/shenzhou/tools/oocd.sh new file mode 100755 index 0000000000..259156e319 --- /dev/null +++ b/nuttx/configs/shenzhou/tools/oocd.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +# Get command line parameters + +USAGE="USAGE: $0 [-dh] " +ADVICE="Try '$0 -h' for more information" + +unset DEBUG + +while [ ! -z "$1" ]; do + case $1 in + -d ) + set -x + DEBUG=-d3 + ;; + -h ) + echo "$0 is a tool for generation of proper version files for the NuttX build" + echo "" + echo $USAGE + echo "" + echo "Where:" + echo " -d" + echo " Enable script debug" + echo " -h" + echo " show this help message and exit" + echo " Use the OpenOCD 0.4.0" + echo " " + echo " The full path to the top-level NuttX directory" + exit 0 + ;; + * ) + break; + ;; + esac + shift +done + +TOPDIR=$1 +if [ -z "${TOPDIR}" ]; then + echo "Missing argument" + echo $USAGE + echo $ADVICE + exit 1 +fi + +# This script *probably* only works with the following versions of OpenOCD: + +# Local search directory and configurations + +OPENOCD_SEARCHDIR="${TOPDIR}/configs/shenzhou/tools" +OPENOCD_WSEARCHDIR="`cygpath -w ${OPENOCD_SEARCHDIR}`" + +OPENOCD_PATH="/cygdrive/c/Program Files (x86)/OpenOCD/0.4.0/bin" +OPENOCD_EXE=openocd.exe +OPENOCD_INTERFACE="olimex-arm-usb-ocd.cfg" + + +OPENOCD_TARGET="stm32.cfg" +OPENOCD_ARGS="${DEBUG} -s ${OPENOCD_WSEARCHDIR} -f ${OPENOCD_INTERFACE} -f ${OPENOCD_TARGET}" + +echo "Trying OpenOCD 0.4.0 path: ${OPENOCD_PATH}/${OPENOCD_EXE}" + +# Verify that everything is what it claims it is and is located where it claims it is. + +if [ ! -x "${OPENOCD_PATH}/${OPENOCD_EXE}" ]; then + echo "OpenOCD executable does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}" + exit 1 +fi +if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_TARGET}" ]; then + echo "OpenOCD target config file does not exist: ${OPENOCD_SEARCHDIR}/${OPENOCD_TARGET}" + exit 1 +fi +if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_INTERFACE}" ]; then + echo "OpenOCD interface config file does not exist: ${OPENOCD_SEARCHDIR}/${OPENOCD_INTERFACE}" + exit 1 +fi + +# Enable debug if so requested + +if [ "X$2" = "X-d" ]; then + OPENOCD_ARGS=$OPENOCD_ARGS" -d3" + set -x +fi + +# Okay... do it! + +echo "Starting OpenOCD" +"${OPENOCD_PATH}/${OPENOCD_EXE}" ${OPENOCD_ARGS} & +echo "OpenOCD daemon started" +ps -ef | grep openocd +echo "In GDB: target remote localhost:3333" + diff --git a/nuttx/configs/shenzhou/tools/stm32.cfg b/nuttx/configs/shenzhou/tools/stm32.cfg new file mode 100644 index 0000000000..463a85cfd2 --- /dev/null +++ b/nuttx/configs/shenzhou/tools/stm32.cfg @@ -0,0 +1,69 @@ +# script for stm32 + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME stm32 +} + +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { + set _ENDIAN little +} + +# Work-area is a space in RAM used for flash programming +# By default use 16kB +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x4000 +} + +# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz +jtag_khz 1000 + +jtag_nsrst_delay 100 +jtag_ntrst_delay 100 + +#jtag scan chain +if { [info exists CPUTAPID ] } { + set _CPUTAPID $CPUTAPID +} else { + # See STM Document RM0008 + # Section 26.6.3 + set _CPUTAPID 0x3ba00477 +} +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +if { [info exists BSTAPID ] } { + # FIXME this never gets used to override defaults... + set _BSTAPID $BSTAPID +} else { + # See STM Document RM0008 + # Section 29.6.2 + # Low density devices, Rev A + set _BSTAPID1 0x06412041 + # Medium density devices, Rev A + set _BSTAPID2 0x06410041 + # Medium density devices, Rev B and Rev Z + set _BSTAPID3 0x16410041 + # High density devices, Rev A + set _BSTAPID4 0x06414041 + # Connectivity line devices, Rev A and Rev Z + set _BSTAPID5 0x06418041 +} +jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \ + -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \ + -expected-id $_BSTAPID4 -expected-id $_BSTAPID5 + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME + +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 + +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME stm32x 0 0 0 0 $_TARGETNAME + +# For more information about the configuration files, take a look at: +# openocd.texi diff --git a/nuttx/configs/shenzhou/tools/usb-driver.txt b/nuttx/configs/shenzhou/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/shenzhou/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/configs/stm3210e-eval/tools/usb-driver.txt b/nuttx/configs/stm3210e-eval/tools/usb-driver.txt new file mode 100644 index 0000000000..2a649dfb87 --- /dev/null +++ b/nuttx/configs/stm3210e-eval/tools/usb-driver.txt @@ -0,0 +1,16 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers. +1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe +1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. +1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). + +2. Re-install ARM-USB-OCD driver +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. + diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 8bb658f48f..51027e0f8a 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -596,7 +596,10 @@ static uint16_t recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; - /* Report an error only if no data has been received */ + /* Report an error only if no data has been received. (If + * CONFIG_NET_TCP_RECVDELAY then rf_recvlen should always be + * zero). + */ #if CONFIG_NET_TCP_RECVDELAY > 0 if (pstate->rf_recvlen == 0) From e2498c5e7646b64095fdccad37c2d2e850e97f65 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Sep 2012 16:22:00 +0000 Subject: [PATCH 40/95] Minor update to Shenzhou README files git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5119 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/ea3131/tools/usb-driver.txt | 29 ++- nuttx/configs/ea3152/tools/usb-driver.txt | 29 ++- nuttx/configs/nucleus2g/tools/usb-driver.txt | 29 ++- .../olimex-lpc1766stk/tools/usb-driver.txt | 29 ++- .../olimex-strp711/scripts/usb-driver.txt | 29 ++- nuttx/configs/shenzhou/README.txt | 184 +----------------- .../shenzhou/tools/olimex-arm-usb-ocd.cfg | 6 +- nuttx/configs/shenzhou/tools/usb-driver.txt | 29 ++- .../stm3210e-eval/tools/usb-driver.txt | 29 ++- .../stm3220g-eval/tools/usb-driver.txt | 25 +++ 10 files changed, 162 insertions(+), 256 deletions(-) create mode 100644 nuttx/configs/stm3220g-eval/tools/usb-driver.txt diff --git a/nuttx/configs/ea3131/tools/usb-driver.txt b/nuttx/configs/ea3131/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/ea3131/tools/usb-driver.txt +++ b/nuttx/configs/ea3131/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/ea3152/tools/usb-driver.txt b/nuttx/configs/ea3152/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/ea3152/tools/usb-driver.txt +++ b/nuttx/configs/ea3152/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/nucleus2g/tools/usb-driver.txt b/nuttx/configs/nucleus2g/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/nucleus2g/tools/usb-driver.txt +++ b/nuttx/configs/nucleus2g/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt b/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt +++ b/nuttx/configs/olimex-lpc1766stk/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/olimex-strp711/scripts/usb-driver.txt b/nuttx/configs/olimex-strp711/scripts/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/olimex-strp711/scripts/usb-driver.txt +++ b/nuttx/configs/olimex-strp711/scripts/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index 3508bbefe1..ca9fdafdb3 100755 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -677,8 +677,8 @@ Where is one of the following: CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows CONFIG_NSH_DHCPC=n : DHCP is disabled - CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2) : Target IP address 10.0.0.2 - CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host IP address 10.0.0.1 + CONFIG_NSH_IPADDR=0x0a000002 : Target IP address 10.0.0.2 + CONFIG_NSH_DRIPADDR=0x0a000001 : Host IP address 10.0.0.1 NOTES: 1. This example assumes that a network is connected. During its @@ -687,183 +687,3 @@ Where is one of the following: delay (maybe 30 seconds?) before anything happens. That is the timeout before the networking finally gives up and decides that no network is available. - - 2. This example supports the ADC test (apps/examples/adc) but this must - be manually enabled by selecting: - - CONFIG_ADC=y : Enable the generic ADC infrastructure - CONFIG_STM32_ADC3=y : Enable ADC3 - CONFIG_STM32_TIM1=y : Enable Timer 1 - CONFIG_STM32_TIM1_ADC=y : Indicate that timer 1 will be used to trigger an ADC - CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling - CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency - - See also apps/examples/README.txt - - General debug for analog devices (ADC/DAC): - - CONFIG_DEBUG_ANALOG - - 3. This example supports the PWM test (apps/examples/pwm) but this must - be manually enabled by selecting eeither - - CONFIG_PWM=y : Enable the generic PWM infrastructure - CONFIG_PWM_PULSECOUNT=n : Disable to support for TIM1/8 pulse counts - CONFIG_STM32_TIM4=y : Enable TIM4 - CONFIG_STM32_TIM4_PWM=y : Use TIM4 to generate PWM output - CONFIG_STM32_TIM4_CHANNEL=2 : Select output on TIM4, channel 2 - - If CONFIG_STM32_FSMC is disabled, output will appear on CN3, pin 32. - Ground is available on CN3, pin1. - - Or.. - - CONFIG_PWM=y : Enable the generic PWM infrastructure - CONFIG_PWM_PULSECOUNT=y : Enable to support for TIM1/8 pulse counts - CONFIG_STM32_TIM8=y : Enable TIM8 - CONFIG_STM32_TIM8_PWM=y : Use TIM8 to generate PWM output - CONFIG_STM32_TIM8_CHANNEL=4 : Select output on TIM8, channel 4 - - If CONFIG_STM32_FSMC is disabled, output will appear on CN3, pin 17 - Ground is available on CN23 pin1. - - See also include/board.h and apps/examples/README.txt - - Special PWM-only debug options: - - CONFIG_DEBUG_PWM - - 4. This example supports the CAN loopback test (apps/examples/can) but this - must be manually enabled by selecting: - - CONFIG_CAN=y : Enable the generic CAN infrastructure - CONFIG_CAN_EXID=y or n : Enable to support extended ID frames - CONFIG_STM32_CAN1=y : Enable CAN1 - CONFIG_CAN_LOOPBACK=y : Enable CAN loopback mode - - See also apps/examples/README.txt - - Special CAN-only debug options: - - CONFIG_DEBUG_CAN - CONFIG_CAN_REGDEBUG - - 5. This example can support an FTP client. In order to build in FTP client - support simply uncomment the following lines in the appconfig file (before - configuring) or in the apps/.config file (after configuring): - - #CONFIGURED_APPS += netutils/ftpc - #CONFIGURED_APPS += examples/ftpc - - 6. This example can support an FTP server. In order to build in FTP server - support simply uncomment the following lines in the appconfig file (before - configuring) or in the apps/.config file (after configuring): - - #CONFIGURED_APPS += netutils/ftpd - #CONFIGURED_APPS += examples/ftpd - - And enable poll() support in the NuttX configuration file: - - CONFIG_DISABLE_POLL=n - - 7. This example supports the watchdog timer test (apps/examples/watchdog) - but this must be manually enabled by selecting: - - CONFIG_WATCHDOG=y : Enables watchdog timer driver support - CONFIG_STM32_WWDG=y : Enables the WWDG timer facility, OR - CONFIG_STM32_IWDG=y : Enables the IWDG timer facility (but not both) - - The WWDG watchdog is driven off the (fast) 42MHz PCLK1 and, as result, - has a maximum timeout value of 49 milliseconds. For WWDG watchdog, you - should also add the fillowing to the configuration file: - - CONFIG_EXAMPLES_WATCHDOG_PINGDELAY=20 - CONFIG_EXAMPLES_WATCHDOG_TIMEOUT=49 - - The IWDG timer has a range of about 35 seconds and should not be an issue. - - 7. Adding LCD and graphics support: - - appconfig (apps/.config): Enable the application configurations that you - want to use. Asexamples: - - CONFIGURED_APPS += examples/nx : Pick one or more - CONFIGURED_APPS += examples/nxhello : - CONFIGURED_APPS += examples/nximage : - CONFIGURED_APPS += examples/nxlines : - - defconfig (nuttx/.config): - - CONFIG_STM32_FSMC=y : FSMC support is required for the LCD - CONFIG_NX=y : Enable graphics suppport - CONFIG_MM_REGIONS=3 : When FSMC is enabled, so is the on-board SRAM memory region - - 8. USB OTG FS Device or Host Support - - CONFIG_USBDEV - Enable USB device support, OR - CONFIG_USBHOST - Enable USB host support - CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block - CONFIG_STM32_SYSCFG - Needed - CONFIG_SCHED_WORKQUEUE - Worker thread support is required - - 9. USB OTG FS Host Support. The following changes will enable support for - a USB host on the STM32F4Discovery, including support for a mass storage - class driver: - - CONFIG_USBDEV=n - Make sure tht USB device support is disabled - CONFIG_USBHOST=y - Enable USB host support - CONFIG_STM32_OTGFS=y - Enable the STM32 USB OTG FS block - CONFIG_STM32_SYSCFG=y - Needed for all USB OTF FS support - CONFIG_SCHED_WORKQUEUE=y - Worker thread support is required for the mass - storage class driver. - CONFIG_NSH_ARCHINIT=y - Architecture specific USB initialization - is needed for NSH - CONFIG_FS_FAT=y - Needed by the USB host mass storage class. - - With those changes, you can use NSH with a FLASH pen driver as shown - belong. Here NSH is started with nothing in the USB host slot: - - NuttShell (NSH) NuttX-x.yy - nsh> ls /dev - /dev: - console - null - ttyS0 - - After inserting the FLASH drive, the /dev/sda appears and can be - mounted like this: - - nsh> ls /dev - /dev: - console - null - sda - ttyS0 - nsh> mount -t vfat /dev/sda /mnt/stuff - nsh> ls /mnt/stuff - /mnt/stuff: - -rw-rw-rw- 16236 filea.c - - And files on the FLASH can be manipulated to standard interfaces: - - nsh> echo "This is a test" >/mnt/stuff/atest.txt - nsh> ls /mnt/stuff - /mnt/stuff: - -rw-rw-rw- 16236 filea.c - -rw-rw-rw- 16 atest.txt - nsh> cat /mnt/stuff/atest.txt - This is a test - nsh> cp /mnt/stuff/filea.c fileb.c - nsh> ls /mnt/stuff - /mnt/stuff: - -rw-rw-rw- 16236 filea.c - -rw-rw-rw- 16 atest.txt - -rw-rw-rw- 16236 fileb.c - - To prevent data loss, don't forget to un-mount the FLASH drive - before removing it: - - nsh> umount /mnt/stuff - - 11. This configuration requires that jumper JP22 be set to enable RS-232 - operation. diff --git a/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg b/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg index 9752dd4187..d9ff2e5154 100644 --- a/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg +++ b/nuttx/configs/shenzhou/tools/olimex-arm-usb-ocd.cfg @@ -6,8 +6,6 @@ interface ft2232 ft2232_device_desc "Olimex OpenOCD JTAG" -ft2232_layout olimex-jtag -ft2232_vid_pid 0x15ba 0x0003 - -#jtag_khz 600 +ft2232_layout "olimex-jtag" +ft2232_vid_pid 0x15BA 0x0003 diff --git a/nuttx/configs/shenzhou/tools/usb-driver.txt b/nuttx/configs/shenzhou/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/shenzhou/tools/usb-driver.txt +++ b/nuttx/configs/shenzhou/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/stm3210e-eval/tools/usb-driver.txt b/nuttx/configs/stm3210e-eval/tools/usb-driver.txt index 2a649dfb87..83d7598a55 100644 --- a/nuttx/configs/stm3210e-eval/tools/usb-driver.txt +++ b/nuttx/configs/stm3210e-eval/tools/usb-driver.txt @@ -2,15 +2,24 @@ https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.% Repair procedure for ARM-USB-OCD drivers -1. Uninstalling ARM-USB-OCD drivers. -1.1. Connect your programmer/debugger to your computer, open Device Manager and uninstall the drivers for ARM-USB-OCD. -1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, disconnect the programmer from your computer. -1.3. Now you should download FTClean.exe from here: http://www.ftdichip.com/Support/Utilities/FTClean.zip. -1.4. After download is complete extract the “*.zip” file, open folder FTClean, and run FTClean.exe -1.5. Ror VID (Hex) select “Other”. And after that fill the first box with 15ba and “PID (Hex)” with 0004. -1.6. Press “Clean System” button. Make sure that all FTDI devices are disconnected. (My require administrator privileges). +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). -2. Re-install ARM-USB-OCD driver +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- 2.1 Connect the programmer/debugger to the computer. -2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER directory and install. - +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). diff --git a/nuttx/configs/stm3220g-eval/tools/usb-driver.txt b/nuttx/configs/stm3220g-eval/tools/usb-driver.txt new file mode 100644 index 0000000000..83d7598a55 --- /dev/null +++ b/nuttx/configs/stm3220g-eval/tools/usb-driver.txt @@ -0,0 +1,25 @@ +https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf + +Repair procedure for ARM-USB-OCD drivers + +1. Uninstalling ARM-USB-OCD drivers +------------------------------------- +1.1. Connect your programmer/debugger to your computer, open Device Manager + and uninstall the drivers for ARM-USB-OCD. +1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager, + disconnect the programmer from your computer. +1.3. Now you should download FTClean.exe from here: + http://www.ftdichip.com/Support/Utilities/FTClean.zip. +1.4. After download is complete extract the "*.zip" file, open folder FTClean, + and run FTClean.exe +1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba + and "PID (Hex)" with 0004. +1.6. Press "Clean System" button. Make sure that all FTDI devices are + disconnected. (My require administrator privileges). + +2. Re-installing the ARM-USB-OCD driver +--------------------------------------- +2.1 Connect the programmer/debugger to the computer. +2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER + directory and install. (A different driver is required for OpenOCD + 0.4.0. That driver is available from the olimex.com web site). From 47683c485c76ab2595326d890604e9f54bb7d767 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Sep 2012 19:13:30 +0000 Subject: [PATCH 41/95] Beginning of configuration for M3 Wildfire board git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5120 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 3 + nuttx/Documentation/README.html | 2 + nuttx/README.txt | 2 + nuttx/configs/Kconfig | 14 + nuttx/configs/README.txt | 4 + nuttx/configs/fire-stm32v2/Kconfig | 6 + nuttx/configs/fire-stm32v2/README.txt | 727 ++++++++++++++++++ nuttx/configs/fire-stm32v2/include/board.h | 394 ++++++++++ .../configs/fire-stm32v2/src/fire-internal.h | 229 ++++++ nuttx/configs/shenzhou/include/board.h | 31 + 10 files changed, 1412 insertions(+) create mode 100644 nuttx/configs/fire-stm32v2/Kconfig create mode 100644 nuttx/configs/fire-stm32v2/README.txt create mode 100644 nuttx/configs/fire-stm32v2/include/board.h create mode 100644 nuttx/configs/fire-stm32v2/src/fire-internal.h diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index ef00bae879..614c14415c 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3292,4 +3292,7 @@ is nothing in the source tree now that depends on the old way of doing things (if I am wrong, they will need a change to the linker script). + * configs/fire-stm32v2: Configuration for the M3 Wildfire board. I + don't know very much about this board other than is has an + STM32F103VET chip, LCD, touchscreen, and ENC28J60 network. diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index c18dd9ad84..135c4f359d 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -85,6 +85,8 @@ | | | |- ostest/README.txt | | | |- poll/README.txt | | | `- README.txt + | | |- fire-stm32v2/ + | | | `- README.txt | | |- hymini-stm32v/ | | | |- include/README.txt | | | |- RIDE/README.txt diff --git a/nuttx/README.txt b/nuttx/README.txt index 5964511289..b0aa5384c3 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -654,6 +654,8 @@ nuttx | | |- ostest/README.txt | | |- poll/README.txt | | `- README.txt + | |- fire-stm32v2/ + | | `- README.txt | |- hymini-stm32v/ | | |- include/README.txt | | |- src/README.txt diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index f8470bc948..dabd32842f 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -130,6 +130,16 @@ config ARCH_BOARD_EZ80F910200ZCO development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line tools. The development environment is Cygwin under WinXP. +config ARCH_BOARD_FIRE_STM32V2 + bool "M3 Wildfire STM32v2 board" + depends on ARCH_CHIP_STM32F103VET + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS + ---help--- + A configuration for the M3 Wildfile board. This board is based on the + STM32F103VET chip. + config ARCH_BOARD_HYMINI_STM32V bool "HY-Mini STM32v board" depends on ARCH_CHIP_STM32F103VCT @@ -597,6 +607,7 @@ config ARCH_BOARD default "ekk-lm3s9b96" if ARCH_BOARD_EKK_LM3S9B96 default "ez80f0910200kitg" if ARCH_BOARD_EZ80F910200KITG default "ez80f0910200zco" if ARCH_BOARD_EZ80F910200ZCO + default "fire-stm32v2" if ARCH_BOARD_FIRE_STM32V2 default "hymini-stm32v" if ARCH_BOARD_HYMINI_STM32V default "kwikstik-k40" if ARCH_BOARD_KWIKSTIK_K40 default "lincoln60" if ARCH_BOARD_LINCOLN60 @@ -736,6 +747,9 @@ endif if ARCH_BOARD_EZ80F910200ZCO source "configs/ez80f910200zco/Kconfig" endif +if ARCH_BOARD_FIRE_STM32V2 +source "configs/fire-stm32v2/Kconfig" +endif if ARCH_BOARD_HYMINI_STM32V source "configs/hymini-stm32v/Kconfig" endif diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 3a059a62a1..2f58946725 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -1543,6 +1543,10 @@ configs/ez80f0910200zco development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line tools. The development environment is Cygwin under WinXP. +configs/fire-stm32v2 + A configuration for the M3 Wildfire STM32 board. This board is based on the + STM32F103VET chip. + configs/hymini-stm32v A configuration for the HY-Mini STM32v board. This board is based on the STM32F103VCT chip. diff --git a/nuttx/configs/fire-stm32v2/Kconfig b/nuttx/configs/fire-stm32v2/Kconfig new file mode 100644 index 0000000000..3f4b857dad --- /dev/null +++ b/nuttx/configs/fire-stm32v2/Kconfig @@ -0,0 +1,6 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +comment "M3 Wildfire Configuration" diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt new file mode 100644 index 0000000000..92bc9ecd26 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -0,0 +1,727 @@ +README +====== + +This README discusses issues unique to NuttX configurations for the M3 +Wildfire development board (STM32F103VET). + +Contents +======== + + - Pin Configuration + - Development Environment + - GNU Toolchain Options + - IDEs + - NuttX buildroot Toolchain + - DFU and JTAG + - OpenOCD + - LEDs + - RTC + - M3 Wildfire-specific Configuration Options + - Configurations + +Pin Configuration +================= +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +1 PE2 PE2-C-RCLK Camera (P9) +2 PE3 PE3-USB-M USB2.0 +3 PE4 PE4-BEEP LS1 Bell +4 PE5 +5 PE6 +6 VBAT BT1 Battery (BT1) +7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen +8 PC14 PC14/OSC32-IN Y2 32.768KHz +9 PC15 PC15/OSC32-OUT Y2 32.768KHz +10 VSS_5 DGND +11 VDD_5 3V3 +12 OSC_IN Y1 8MHz +13 OSC_OUT Y1 8MHz +14 NRST REST1 Reset switch +15 PC0 +16 PC1 PC1/ADC123-IN11 Potentiometer (R16) +17 PC2 +18 PC3 PC3-LED1 LED1, Active low (pulled high) +19 VSSA DGND +20 VREF- DGND +21 VREF+ 3V3 +22 VDDA 3V3 +23 PA0 PA0-C-VSYNC Camera (P9) +24 PA1 PC1/ADC123-IN11 +25 PA2 PA2-US2-TX MAX3232, DB9 D7 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +26 PA3 PA3-US2-RX MAX3232, DB9 D7 +27 VSS_4 DGND +28 VDD_4 3V3 +29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH +30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +33 PC4 PC4-LED2 LED2, Active low (pulled high) +34 PC5 PC5-LED3 LED3, Active low (pulled high) +35 PB0 PB0-KEY1 KEY1, Low when closed (pulled high if open) +36 PB1 PB1-KEY2 KEY2, Low when closed (pulled high if open) +37 PB2 BOOT1/DGND +38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen +39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen +40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen +41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen +42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen +43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen +44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen +45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen +46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen +47 PB10 PB10-C-DO_2 Camera (P9) +48 PB11 PB11-MP3-RST MP3 + PB11-C-DO_3 Camera (P9) +49 VSS_1 DGND +50 VDD_1 3V3 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +51 PB12 PB12-SPI2-NSS MP3 + PB12-C-DO_4 Camera (P9) +52 PB13 PB13-SPI2-SCK MP3 + PB13-C-DO_5 Camera (P9) +53 PB14 PB14-SPI2-MISO MP3 + PB14-C-DO_6 Camera (P9) +54 PB15 PB15-SPI2-MOSI MP3 + PB15-C-DO_7 Camera (P9) +55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen +56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen +57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen +58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen +59 PD12 C-LED_EN Camera (P9) +60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen +61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen +62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen +63 PC6 PC6-MP3-XDCS MP3 + PC6-C-SIO_C Camera (P9) +64 PC7 PC7-MP3-DREQ MP3 + PC7-C-SIO_D Camera (P9) +65 PC8 PC8-SDIO-D0 SD card, pulled high +66 PC9 PC9-SDIO-D1 SD card, pulled high +67 PA8 PA8-C-XCLK Camera (P9) +68 PA9 PA9-US1-TX MAX3232, DB9 D8 +69 PA10 PA10-US1-RX MAX3232, DB9 D8 +70 PA11 PA11-USBDM USB2.0 +71 PA12 PA12-USBDP USB2.0 +72 PA13 PA13-JTMS JTAG +73 N/C +74 VSS_2 DGND +75 VDD_2 3V3 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +76 PA14 PA14-JTCK JTAG +77 PA15 PA15-JTDI JTAG +78 PC10 PC10-SDIO-D2 SD card, pulled high +79 PC11 PC10-SDIO-D3 SD card, pulled high +80 PC12 PC12-SDIO-CLK SD card +81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen +82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen +83 PD2 PD2-SDIO-CMD SD card, pulled high +84 PD3 PD3-C-WEN Camera (P9) +85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen +86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen +87 PD6 PD6-C-OE Camera (P9) +88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen +89 PB3 PB3-JTDO JTAG +90 PB4 PB4-NJTRST JTAG +91 PB5 PB5-C-WRST Camera (P9) +92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 +93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 +94 BOOT0 SW3 3V3 or DGND +95 PB8 PB8-CAN-RX CAN tranceiver, Header 2H + PB8-C-DO_0 Camera (P9) +96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H + PB9-C-DO_1 Camera (P9) +97 PE0 PE0-C-RRST Camera (P9) +98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen +99 VSS_3 DGND +100 VDD_3 3V3 + +Development Environment +======================= + + Either Linux or Cygwin on Windows can be used for the development environment. + The source has been built only using the GNU toolchain (see below). Other + toolchains will likely cause problems. Testing was performed using the Cygwin + environment because the CodeSourcery Toolchain. The Raisonance R-Link + emulatator and some RIDE7 development tools were used and those tools works + only under Windows. + +GNU Toolchain Options +===================== + + The NuttX make system has been modified to support the following different + toolchain options. + + 1. The CodeSourcery GNU toolchain, + 2. The devkitARM GNU toolchain, + 3. Raisonance GNU toolchain, or + 4. The NuttX buildroot Toolchain (see below). + + All testing has been conducted using the NuttX buildroot toolchain. However, + the make system is setup to default to use the devkitARM toolchain. To use + the CodeSourcery, devkitARM or Raisonance GNU toolchain, you simply need to + add one of the following configuration options to your .config (or defconfig) + file: + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_STM32_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_STM32_DEVKITARM=y : devkitARM under Windows + CONFIG_STM32_RAISONANCE=y : Raisonance RIDE7 under Windows + CONFIG_STM32_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + + If you are not using CONFIG_STM32_BUILDROOT, then you may also have to modify + the PATH in the setenv.h file if your make cannot find the tools. + + NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are + Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot + toolchains are Cygwin and/or Linux native toolchains. There are several limitations + to using a Windows based toolchain in a Cygwin environment. The three biggest are: + + 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are + performed automatically in the Cygwin makefiles using the 'cygpath' utility + but you might easily find some new path problems. If so, check out 'cygpath -w' + + 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links + are used in Nuttx (e.g., include/arch). The make system works around these + problems for the Windows tools by copying directories instead of linking them. + But this can also cause some confusion for you: For example, you may edit + a file in a "linked" directory and find that your changes had no effect. + That is because you are building the copy of the file in the "fake" symbolic + directory. If you use a Windows toolchain, you should get in the habit of + making like this: + + make clean_context all + + An alias in your .bashrc file might make that less painful. + + 3. Dependencies are not made when using Windows versions of the GCC. This is + because the dependencies are generated using Windows pathes which do not + work with the Cygwin make. + + Support has been added for making dependencies with the windows-native toolchains. + That support can be enabled by modifying your Make.defs file as follows: + + - MKDEP = $(TOPDIR)/tools/mknulldeps.sh + + MKDEP = $(TOPDIR)/tools/mkdeps.sh --winpaths "$(TOPDIR)" + + If you have problems with the dependency build (for example, if you are not + building on C:), then you may need to modify tools/mkdeps.sh + + NOTE 1: The CodeSourcery toolchain (2009q1) does not work with default optimization + level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with + -Os. + + NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that + the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM + path or will get the wrong version of make. + +IDEs +==== + + NuttX is built using command-line make. It can be used with an IDE, but some + effort will be required to create the project (There is a simple RIDE project + in the RIDE subdirectory). + + Makefile Build + -------------- + Under Eclipse, it is pretty easy to set up an "empty makefile project" and + simply use the NuttX makefile to build the system. That is almost for free + under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty + makefile project in order to work with Windows (Google for "Eclipse Cygwin" - + there is a lot of help on the internet). + + Native Build + ------------ + Here are a few tips before you start that effort: + + 1) Select the toolchain that you will be using in your .config file + 2) Start the NuttX build at least one time from the Cygwin command line + before trying to create your project. This is necessary to create + certain auto-generated files and directories that will be needed. + 3) Set up include pathes: You will need include/, arch/arm/src/stm32, + arch/arm/src/common, arch/arm/src/armv7-m, and sched/. + 4) All assembly files need to have the definition option -D __ASSEMBLY__ + on the command line. + + Startup files will probably cause you some headaches. The NuttX startup file + is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX + one time from the Cygwin command line in order to obtain the pre-built + startup object needed by RIDE. + +NuttX buildroot Toolchain +========================= + + A GNU GCC-based toolchain is assumed. The files */setenv.sh should + be modified to point to the correct path to the Cortex-M3 GCC toolchain (if + different from the default in your PATH variable). + + If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX + SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573). + This GNU toolchain builds and executes in the Linux or Cygwin environment. + + 1. You must have already configured Nuttx in /nuttx. + + cd tools + ./configure.sh fire-stm32v2/ + + 2. Download the latest buildroot package into + + 3. unpack the buildroot tarball. The resulting directory may + have versioning information on it like buildroot-x.y.z. If so, + rename /buildroot-x.y.z to /buildroot. + + 4. cd /buildroot + + 5. cp configs/cortexm3-defconfig-4.3.3 .config + + 6. make oldconfig + + 7. make + + 8. Edit setenv.h, if necessary, so that the PATH variable includes + the path to the newly built binaries. + + See the file configs/README.txt in the buildroot source tree. That has more + detailed PLUS some special instructions that you will need to follow if you are + building a Cortex-M3 toolchain for Cygwin under Windows. + +DFU and JTAG +============ + + Enbling Support for the DFU Bootloader + -------------------------------------- + The linker files in these projects can be configured to indicate that you + will be loading code using STMicro built-in USB Device Firmware Upgrade (DFU) + loader or via some JTAG emulator. You can specify the DFU bootloader by + adding the following line: + + CONFIG_STM32_DFU=y + + to your .config file. Most of the configurations in this directory are set + up to use the DFU loader. + + If CONFIG_STM32_DFU is defined, the code will not be positioned at the beginning + of FLASH (0x08000000) but will be offset to 0x08003000. This offset is needed + to make space for the DFU loader and 0x08003000 is where the DFU loader expects + to find new applications at boot time. If you need to change that origin for some + other bootloader, you will need to edit the file(s) ld.script.dfu for the + configuration. + + The DFU SE PC-based software is available from the STMicro website, + http://www.st.com. General usage instructions: + + 1. Convert the NuttX Intel Hex file (nuttx.hex) into a special DFU + file (nuttx.dfu)... see below for details. + 2. Connect the M3 Wildfire board to your computer using a USB + cable. + 3. Start the DFU loader on the M3 Wildfire board. You do this by + resetting the board while holding the "Key" button. Windows should + recognize that the DFU loader has been installed. + 3. Run the DFU SE program to load nuttx.dfu into FLASH. + + What if the DFU loader is not in FLASH? The loader code is available + inside of the Demo dirctory of the USBLib ZIP file that can be downloaded + from the STMicro Website. You can build it using RIDE (or other toolchains); + you will need a JTAG emulator to burn it into FLASH the first time. + + In order to use STMicro's built-in DFU loader, you will have to get + the NuttX binary into a special format with a .dfu extension. The + DFU SE PC_based software installation includes a file "DFU File Manager" + conversion program that a file in Intel Hex format to the special DFU + format. When you successfully build NuttX, you will find a file called + nutt.hex in the top-level directory. That is the file that you should + provide to the DFU File Manager. You will end up with a file called + nuttx.dfu that you can use with the STMicro DFU SE program. + + Enabling JTAG + ------------- + If you are not using the DFU, then you will probably also need to enable + JTAG support. By default, all JTAG support is disabled but there NuttX + configuration options to enable JTAG in various different ways. + + These configurations effect the setting of the SWJ_CFG[2:0] bits in the AFIO + MAPR register. These bits are used to configure the SWJ and trace alternate function I/Os. The SWJ (SerialWire JTAG) supports JTAG or SWD access to the + Cortex debug port. The default state in this port is for all JTAG support + to be disable. + + CONFIG_STM32_JTAG_FULL_ENABLE - sets SWJ_CFG[2:0] to 000 which enables full + SWJ (JTAG-DP + SW-DP) + + CONFIG_STM32_JTAG_NOJNTRST_ENABLE - sets SWJ_CFG[2:0] to 001 which enable + full SWJ (JTAG-DP + SW-DP) but without JNTRST. + + CONFIG_STM32_JTAG_SW_ENABLE - sets SWJ_CFG[2:0] to 010 which would set JTAG-DP + disabled and SW-DP enabled + + The default setting (none of the above defined) is SWJ_CFG[2:0] set to 100 + which disable JTAG-DP and SW-DP. + +OpenOCD +======= + +I have also used OpenOCD with the M3 Wildfire. In this case, I used +the Olimex USB ARM OCD. See the script in configs/fire-stm32v2/tools/oocd.sh +for more information. Using the script: + +1) Start the OpenOCD GDB server + + cd + configs/fire-stm32v2/tools/oocd.sh $PWD + +2) Load Nuttx + + cd + arm-none-eabi-gdb nuttx + gdb> target remote localhost:3333 + gdb> mon reset + gdb> mon halt + gdb> load nuttx + +3) Running NuttX + + gdb> mon reset + gdb> c + +LEDs +==== + +The M3 Wildfire has 3 LEDs labeled LED1, LED2 and LED3. These LEDs are not +used by the NuttX port unless CONFIG_ARCH_LEDS is defined. In that case, the +usage by the board port is defined in include/board.h and src/up_autoleds.c. +The LEDs are used to encode OS-related events as follows: + + /* LED1 LED2 LED3 */ + #define LED_STARTED 0 /* OFF OFF OFF */ + #define LED_HEAPALLOCATE 1 /* ON OFF OFF */ + #define LED_IRQSENABLED 2 /* OFF ON OFF */ + #define LED_STACKCREATED 3 /* OFF OFF OFF */ + + #define LED_INIRQ 4 /* NC NC ON (momentary) */ + #define LED_SIGNAL 5 /* NC NC ON (momentary) */ + #define LED_ASSERTION 6 /* NC NC ON (momentary) */ + #define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ + #undef LED_IDLE /* Sleep mode indication not supported */ + +RTC +=== + + The STM32 RTC may configured using the following settings. + + CONFIG_RTC - Enables general support for a hardware RTC. Specific + architectures may require other specific settings. + CONFIG_RTC_HIRES - The typical RTC keeps time to resolution of 1 + second, usually supporting a 32-bit time_t value. In this case, + the RTC is used to "seed" the normal NuttX timer and the + NuttX timer provides for higher resoution time. If CONFIG_RTC_HIRES + is enabled in the NuttX configuration, then the RTC provides higher + resolution time and completely replaces the system timer for purpose of + date and time. + CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the + frequency of the high resolution RTC must be provided. If CONFIG_RTC_HIRES + is not defined, CONFIG_RTC_FREQUENCY is assumed to be one. + CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an alarm. + A callback function will be executed when the alarm goes off + + In hi-res mode, the STM32 RTC operates only at 16384Hz. Overflow interrupts + are handled when the 32-bit RTC counter overflows every 3 days and 43 minutes. + A BKP register is incremented on each overflow interrupt creating, effectively, + a 48-bit RTC counter. + + In the lo-res mode, the RTC operates at 1Hz. Overflow interrupts are not handled + (because the next overflow is not expected until the year 2106. + + WARNING: Overflow interrupts are lost whenever the STM32 is powered down. The + overflow interrupt may be lost even if the STM32 is powered down only momentarily. + Therefore hi-res solution is only useful in systems where the power is always on. + +M3 Wildfire-specific Configuration Options +============================================ + + CONFIG_ARCH - Identifies the arch/ subdirectory. This should + be set to: + + CONFIG_ARCH=arm + + CONFIG_ARCH_family - For use in C code: + + CONFIG_ARCH_ARM=y + + CONFIG_ARCH_architecture - For use in C code: + + CONFIG_ARCH_CORTEXM3=y + + CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory + + CONFIG_ARCH_CHIP=stm32 + + CONFIG_ARCH_CHIP_name - For use in C code to identify the exact + chip: + + CONFIG_ARCH_CHIP_STM32 + CONFIG_ARCH_CHIP_STM32F103ZET6 + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock + configuration features. + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n + + CONFIG_ARCH_BOARD - Identifies the configs subdirectory and + hence, the board that supports the particular chip or SoC. + + CONFIG_ARCH_BOARD=fire-stm32v2 (for the M3 Wildfire development board) + + CONFIG_ARCH_BOARD_name - For use in C code + + CONFIG_ARCH_BOARD_FIRE_STM32V2=y + + CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation + of delay loops + + CONFIG_ENDIAN_BIG - define if big endian (default is little + endian) + + CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case): + + CONFIG_DRAM_SIZE=0x00010000 (64Kb) + + CONFIG_DRAM_START - The start address of installed DRAM + + CONFIG_DRAM_START=0x20000000 + + CONFIG_ARCH_IRQPRIO - The STM32F103Z supports interrupt prioritization + + CONFIG_ARCH_IRQPRIO=y + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that + have LEDs + + CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt + stack. If defined, this symbol is the size of the interrupt + stack in bytes. If not defined, the user task stacks will be + used during interrupt handling. + + CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture. + + CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that + cause a 100 second delay during boot-up. This 100 second delay + serves no purpose other than it allows you to calibratre + CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure + the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until + the delay actually is 100 seconds. + + Individual subsystems can be enabled: + AHB + --- + CONFIG_STM32_DMA1 + CONFIG_STM32_DMA2 + CONFIG_STM32_CRC + CONFIG_STM32_FSMC + CONFIG_STM32_SDIO + + APB1 + ---- + CONFIG_STM32_TIM2 + CONFIG_STM32_TIM3 + CONFIG_STM32_TIM4 + CONFIG_STM32_TIM5 + CONFIG_STM32_TIM6 + CONFIG_STM32_TIM7 + CONFIG_STM32_WWDG + CONFIG_STM32_IWDG + CONFIG_STM32_SPI2 + CONFIG_STM32_SPI4 + CONFIG_STM32_USART2 + CONFIG_STM32_USART3 + CONFIG_STM32_UART4 + CONFIG_STM32_UART5 + CONFIG_STM32_I2C1 + CONFIG_STM32_I2C2 + CONFIG_STM32_USB + CONFIG_STM32_CAN1 + CONFIG_STM32_BKP + CONFIG_STM32_PWR + CONFIG_STM32_DAC1 + CONFIG_STM32_DAC2 + CONFIG_STM32_USB + + APB2 + ---- + CONFIG_STM32_ADC1 + CONFIG_STM32_ADC2 + CONFIG_STM32_TIM1 + CONFIG_STM32_SPI1 + CONFIG_STM32_TIM8 + CONFIG_STM32_USART1 + CONFIG_STM32_ADC3 + + Timer and I2C devices may need to the following to force power to be applied + unconditionally at power up. (Otherwise, the device is powered when it is + initialized). + + CONFIG_STM32_FORCEPOWER + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn + is defined (as above) then the following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation, ADC conversion, + or DAC conversion. Note that ADC/DAC require two definition: Not only do you have + to assign the timer (n) for used by the ADC or DAC, but then you also have to + configure which ADC or DAC (m) it is assigned to. + + CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,8 + CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,8 + CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,8, m=1,..,3 + CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,8 + CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,8, m=1,..,2 + + For each timer that is enabled for PWM usage, we need the following additional + configuration settings: + + CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} + + NOTE: The STM32 timers are each capable of generating different signals on + each of the four channels with different duty cycles. That capability is + not supported by this driver: Only one output channel per timer. + + Alternate pin mappings. The M3 Wildfire board requires only CAN1 remapping + On the M3 Wildfire board pin PB9 is wired as TX and pin PB8 is wired as RX. + Which then makes the proper connection through the CAN transiver SN65HVD230 + out to the CAN D-type 9-pn male connector where pin 2 is CANL and pin 7 is CANH. + + CONFIG_STM32_TIM1_FULL_REMAP + CONFIG_STM32_TIM1_PARTIAL_REMAP + CONFIG_STM32_TIM2_FULL_REMAP + CONFIG_STM32_TIM2_PARTIAL_REMAP_1 + CONFIG_STM32_TIM2_PARTIAL_REMAP_2 + CONFIG_STM32_TIM3_FULL_REMAP + CONFIG_STM32_TIM3_PARTIAL_REMAP + CONFIG_STM32_TIM4_REMAP + CONFIG_STM32_USART1_REMAP + CONFIG_STM32_USART2_REMAP + CONFIG_STM32_USART3_FULL_REMAP + CONFIG_STM32_USART3_PARTIAL_REMAP + CONFIG_STM32_SPI1_REMAP + CONFIG_STM32_SPI3_REMAP + CONFIG_STM32_I2C1_REMAP + CONFIG_STM32_CAN1_REMAP1 + CONFIG_STM32_CAN1_REMAP2 + CONFIG_STM32_CAN2_REMAP + + JTAG Enable settings (by default JTAG-DP and SW-DP are disabled): + CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + but without JNTRST. + CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled + + STM32F103Z specific device driver settings + + CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART + m (m=4,5) for the console and ttys0 (default is the USART1). + CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. + This specific the size of the receive buffer + CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before + being sent. This specific the size of the transmit buffer + CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be + CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_U[S]ARTn_2STOP - Two stop bits + + CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI + support. Non-interrupt-driven, poll-waiting is recommended if the + interrupt rate would be to high in the interrupt driven case. + CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. + Cannot be used with CONFIG_STM32_SPI_INTERRUPT. + + CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO + and CONFIG_STM32_DMA2. + CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 + CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. + Default: Medium + CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: + 4-bit transfer mode. + + M3 Wildfire CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default + Standard 11-bit IDs. + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback + mode for testing. The STM32 CAN driver does support loopback mode. + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 + CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 + CONFIG_CAN_REGDEBUG - If CONFIG_DEBUG is set, this will generate an + dump of all CAN registers. + + M3 Wildfire LCD Hardware Configuration + + CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" + support. Default is this 320x240 "landscape" orientation + (this setting is informative only... not used). + CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" + orientation support. In this orientation, the M3 Wildfire's + LCD ribbon cable is at the bottom of the display. Default is + 320x240 "landscape" orientation. + CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse + portrait" orientation support. In this orientation, the + M3 Wildfire's LCD ribbon cable is at the top of the display. + Default is 320x240 "landscape" orientation. + CONFIG_LCD_BACKLIGHT - Define to support a backlight. + CONFIG_LCD_PWM - If CONFIG_STM32_TIM1 is also defined, then an + adjustable backlight will be provided using timer 1 to generate + various pulse widthes. The granularity of the settings is + determined by CONFIG_LCD_MAXPOWER. If CONFIG_LCD_PWM (or + CONFIG_STM32_TIM1) is not defined, then a simple on/off backlight + is provided. + CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears + to be a shift in the returned data. This value fixes the offset. + Default 5. + + The LCD driver dynamically selects the LCD based on the reported LCD + ID value. However, code size can be reduced by suppressing support for + individual LCDs using: + + CONFIG_STM32_AM240320_DISABLE + CONFIG_STM32_SPFD5408B_DISABLE + CONFIG_STM32_R61580_DISABLE + +Configurations +============== + +Each M3 Wildfire configuration is maintained in a sudirectory and +can be selected as follow: + + cd tools + ./configure.sh fire-stm32v2/ + cd - + . ./setenv.sh + +Where is one of the following: + + nsh + --- + Configure the NuttShell (nsh) located at examples/nsh. The nsh configuration + contains support for some built-in applications that can be enabled by making + some additional minor change to the configuration file. diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h new file mode 100644 index 0000000000..50a3d2985a --- /dev/null +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -0,0 +1,394 @@ +/************************************************************************************ + * configs/fire-stm32v2/include/board.h + * include/arch/board/board.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_FIRE_STM32V2_INCLUDE_BOARD_H +#define __CONFIGS_FIRE_STM32V2_INCLUDE_BOARD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#ifndef __ASSEMBLY__ +# include +#endif +#include "stm32_rcc.h" +#include "stm32_sdio.h" +#include "stm32_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Clocking *************************************************************************/ + +/* On-board crystal frequency is 8MHz (HSE) */ + +#define STM32_BOARD_XTAL 8000000ul + +/* PLL source is HSE/1, PLL multipler is 9: PLL frequency is 8MHz (XTAL) x 9 = 72MHz */ + +#define STM32_CFGR_PLLSRC RCC_CFGR_PLLSRC +#define STM32_CFGR_PLLXTPRE 0 +#define STM32_CFGR_PLLMUL RCC_CFGR_PLLMUL_CLKx9 +#define STM32_PLL_FREQUENCY (9*STM32_BOARD_XTAL) + +/* Use the PLL and set the SYSCLK source to be the PLL */ + +#define STM32_SYSCLK_SW RCC_CFGR_SW_PLL +#define STM32_SYSCLK_SWS RCC_CFGR_SWS_PLL +#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY + +/* AHB clock (HCLK) is SYSCLK (72MHz) */ + +#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK +#define STM32_HCLK_FREQUENCY STM32_PLL_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */ + +/* APB2 clock (PCLK2) is HCLK (72MHz) */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK +#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY +#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 2-7, 12-14 */ + +/* APB2 timers 1 and 8 will receive PCLK2. */ + +#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) + +/* APB1 clock (PCLK1) is HCLK/2 (36MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +/* APB1 timers 2-4 will be twice PCLK1 (I presume the remaining will receive PCLK1) */ + +#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM5_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (STM32_PCLK1_FREQUENCY) + +/* USB divider -- Divide PLL clock by 1.5 */ + +#define STM32_CFGR_USBPRE 0 + +/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx + * otherwise frequency is 2xAPBx. + * Note: TIM1,8 are on APB2, others on APB1 */ + +#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY +#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY + +/* SDIO dividers. Note that slower clocking is required when DMA is disabled + * in order to avoid RX overrun/TX underrun errors due to delayed responses + * to service FIFOs in interrupt driven mode. These values have not been + * tuned!!! + * + * HCLK=72MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(178+2)=400 KHz + */ + +#define SDIO_INIT_CLKDIV (178 << SDIO_CLKCR_CLKDIV_SHIFT) + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(2+2)=18 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_MMCXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_MMCXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(1+2)=24 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_SDXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* LED definitions ******************************************************************/ +/* The M3 Wildfire has 3 LEDs labeled LED1, LED2 and LED3. These LEDs are not + * used by the NuttX port unless CONFIG_ARCH_LEDS is defined. In that case, the + * usage by the board port is defined in include/board.h and src/up_autoleds.c. + * The LEDs are used to encode OS-related events as follows: + *. + /* LED1 LED2 LED3 */ +#define LED_STARTED 0 /* OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* ON OFF OFF */ +#define LED_IRQSENABLED 2 /* OFF ON OFF */ +#define LED_STACKCREATED 3 /* OFF OFF OFF */ + +#define LED_INIRQ 4 /* NC NC ON (momentary) */ +#define LED_SIGNAL 5 /* NC NC ON (momentary) */ +#define LED_ASSERTION 6 /* NC NC ON (momentary) */ +#define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ +#undef LED_IDLE /* Sleep mode indication not supported */ + +/* The M3 Wildfire supports several two user buttons: KEY1 and KEY2 */ + +#define BUTTON_KEY1 0 +#define BUTTON_KEY2 1 +#define NUM_BUTTONS 2 + +#define BUTTON_KEY1_BIT (1 << BUTTON_KEY1) +#define BUTTON_KEY2_BIT (1 << BUTTON_KEY2) + +/* Pin Remapping ********************************************************************/ +/* USB 2.0 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 70 PA11 PA11-USBDM USB2.0 + * 71 PA12 PA12-USBDP USB2.0 + * 2 PE3 PE3-USB-M USB2.0 + */ + +/* 2.4" TFT + Touchscreen + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 + * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 + * 7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen + * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen + * 82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen + * 85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen + * 86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen + * 88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen + * 55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen + * 56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen + * 57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen + * 58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen + * 60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen + * 61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen + * 62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen + * 38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen + * 39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen + * 40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen + * 41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen + * 42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen + * 43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen + * 44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen + * 45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen + * 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen + */ + +/* AT24C02 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 + * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 + */ + +/* Potentiometer/ADC + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 16 PC1 PC1/ADC123-IN11 Potentiometer (R16) + * 24 PA1 PC1/ADC123-IN11 + */ + +/* USARTs + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 25 PA2 PA2-US2-TX MAX3232, DB9 D7 + * 26 PA3 PA3-US2-RX MAX3232, DB9 D7 + * 68 PA9 PA9-US1-TX MAX3232, DB9 D8 + * 69 PA10 PA10-US1-RX MAX3232, DB9 D8 + */ + +/* ENC28J60 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + */ + +/* MP3 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 48 PB11 PB11-MP3-RST MP3 + * 51 PB12 PB12-SPI2-NSS MP3 + * 52 PB13 PB13-SPI2-SCK MP3 + * 53 PB14 PB14-SPI2-MISO MP3 + * 54 PB15 PB15-SPI2-MOSI MP3 + * 63 PC6 PC6-MP3-XDCS MP3 + * 64 PC7 PC7-MP3-DREQ MP3 + */ + +/* SD Card + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 65 PC8 PC8-SDIO-D0 SD card, pulled high + * 66 PC9 PC9-SDIO-D1 SD card, pulled high + * 78 PC10 PC10-SDIO-D2 SD card, pulled high + * 79 PC11 PC10-SDIO-D3 SD card, pulled high + * 80 PC12 PC12-SDIO-CLK SD card + * 83 PD2 PD2-SDIO-CMD SD card, pulled high + */ + +/* CAN + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 95 PB8 PB8-CAN-RX CAN tranceiver, Header 2H + * 96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H + */ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +EXTERN void stm32_boardinitialize(void); + +/************************************************************************************ + * Button support. + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + * After up_buttoninit() has been called, up_buttons() may be called to + * collect the state of all buttons. up_buttons() returns an 8-bit bit set + * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT + * definitions in board.h for the meaning of each bit. + * + * up_irqbutton() may be called to register an interrupt handler that will + * be called when a button is depressed or released. The ID value is a + * button enumeration value that uniquely identifies a button resource. See the + * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration + * value. The previous interrupt handler address is returned (so that it may + * restored, if so desired). + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_BUTTONS +EXTERN void up_buttoninit(void); +EXTERN uint8_t up_buttons(void); +#ifdef CONFIG_ARCH_IRQBUTTONS +EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); +#endif +#endif + +/************************************************************************************ + * Name: stm32_ledinit, stm32_setled, and stm32_setleds + * + * Description: + * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If + * CONFIG_ARCH_LEDS is not defined, then the following interfacesare available to + * control the LEDs from user applications. + * + ************************************************************************************/ + +#ifndef CONFIG_ARCH_LEDS +EXTERN void stm32_ledinit(void); +EXTERN void stm32_setled(int led, bool ledon); +EXTERN void stm32_setleds(uint8_t ledset); +#endif + +/************************************************************************************ + * Name: fire_lcdclear + * + * Description: + * This is a non-standard LCD interface just for the M3 Wildfire board. Because + * of the various rotations, clearing the display in the normal way by writing a + * sequences of runs that covers the entire display can be very slow. Here the + * dispaly is cleared by simply setting all GRAM memory to the specified color. + * + ************************************************************************************/ + +#ifdef CONFIG_STM32_FSMC +EXTERN void fire_lcdclear(uint16_t color); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_FIRE_STM32V2_INCLUDE_BOARD_H */ diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h new file mode 100644 index 0000000000..b3d6e145b6 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -0,0 +1,229 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/fire-internal.h + * arch/arm/src/board/fire-internal.n + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_FIRE_STM32V2_SRC_FIRE_INTERNAL_H +#define __CONFIGS_FIRE_STM32V2_SRC_FIRE_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include +#include + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* How many SPI modules does this chip support? Most support 2 SPI modules (others + * may support more -- in such case, the following must be expanded). + */ + +#if STM32_NSPI < 1 +# undef CONFIG_STM32_SPI1 +# undef CONFIG_STM32_SPI2 +#elif STM32_NSPI < 2 +# undef CONFIG_STM32_SPI2 +#endif + +/* There is only CAN1 on the M3 Wildfire board */ + +#if defined(CONFIG_STM32_CAN2) +# warning "The M3 Wildfire only supports CAN1" +#endif + +/* M3 Wildfire GPIOs ****************************************************************/ +/* Camera + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 23 PA0 PA0-C-VSYNC Camera (P9) + * 67 PA8 PA8-C-XCLK Camera (P9) + * 91 PB5 PB5-C-WRST Camera (P9) + * 95 PB8 PB8-C-DO_0 Camera (P9) + * 96 PB9 PB9-C-DO_1 Camera (P9) + * 47 PB10 PB10-C-DO_2 Camera (P9) + * 48 PB11 PB11-C-DO_3 Camera (P9) + * 51 PB12 PB12-C-DO_4 Camera (P9) + * 52 PB13 PB13-C-DO_5 Camera (P9) + * 53 PB14 PB14-C-DO_6 Camera (P9) + * 54 PB15 PB15-C-DO_7 Camera (P9) + * 63 PC6 PC6-C-SIO_C Camera (P9) + * 64 PC7 PC7-C-SIO_D Camera (P9) + * 84 PD3 PD3-C-WEN Camera (P9) + * 87 PD6 PD6-C-OE Camera (P9) + * 59 PD12 C-LED_EN Camera (P9) + * 97 PE0 PE0-C-RRST Camera (P9) + * 1 PE2 PE2-C-RCLK Camera (P9) + */ + +/* Bell + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 3 PE4 PE4-BEEP LS1 Bell + */ + +/* 2.4" TFT + Touchscreen + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 + * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 + * 7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen + * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen + * 82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen + * 85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen + * 86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen + * 88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen + * 55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen + * 56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen + * 57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen + * 58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen + * 60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen + * 61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen + * 62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen + * 38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen + * 39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen + * 40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen + * 41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen + * 42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen + * 43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen + * 44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen + * 45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen + * 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen + */ + +#define GPIO_LCD_BACKLIGHT (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13) + +/* LEDs + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 18 PC3 PC3-LED1 LED1, Active low (pulled high) + * 33 PC4 PC4-LED2 LED2, Active low (pulled high) + * 34 PC5 PC5-LED3 LED3, Active low (pulled high) + */ + +#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3) +#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN4) +#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN5) + +/* Buttons + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 35 PB0 PB0-KEY1 KEY1, Low when closed (pulled high if open) + * 36 PB1 PB1-KEY2 KEY2, Low when closed (pulled high if open) + */ + +#define MIN_IRQBUTTON BUTTON_KEY1 +#define MAX_IRQBUTTON BUTTON_KEY2 +#define NUM_IRQBUTTONS (MAX_IRQBUTTON - MIN_IRQBUTTON + 1) + +#define GPIO_BTN_KEY1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ + GPIO_PORTB|GPIO_PIN0) +#define GPIO_BTN_KEY2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ + GPIO_PORTB|GPIO_PIN1) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the M3 Wildfire board. + * + ************************************************************************************/ + +void weak_function stm32_spiinitialize(void); + +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins for the M3 Wildfire board. + * + ************************************************************************************/ + +void weak_function stm32_usbinitialize(void); + +/************************************************************************************ + * Name: stm32_selectlcd + * + * Description: + * Initialize to the LCD + * + ************************************************************************************/ + +#ifdef CONFIG_STM32_FSMC +void stm32_selectlcd(void); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_FIRE_STM32V2_SRC_FIRE_INTERNAL_H */ + diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h index 560fe1e00c..2e82742ec6 100644 --- a/nuttx/configs/shenzhou/include/board.h +++ b/nuttx/configs/shenzhou/include/board.h @@ -329,6 +329,37 @@ void stm32_boardinitialize(void); void stm32_board_clockconfig(void); #endif +/************************************************************************************ + * Button support. + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + * After up_buttoninit() has been called, up_buttons() may be called to + * collect the state of all buttons. up_buttons() returns an 8-bit bit set + * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT + * definitions in board.h for the meaning of each bit. + * + * up_irqbutton() may be called to register an interrupt handler that will + * be called when a button is depressed or released. The ID value is a + * button enumeration value that uniquely identifies a button resource. See the + * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration + * value. The previous interrupt handler address is returned (so that it may + * restored, if so desired). + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_BUTTONS +EXTERN void up_buttoninit(void); +EXTERN uint8_t up_buttons(void); +#ifdef CONFIG_ARCH_IRQBUTTONS +EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); +#endif +#endif + /************************************************************************************ * Name: stm32_ledinit, stm32_setled, and stm32_setleds * From a18319347303bc29500f2e327540ffeac7143724 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Sep 2012 21:48:25 +0000 Subject: [PATCH 42/95] More progress on the Wildfire STM32 port git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5121 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 7 +- nuttx/arch/arm/include/stm32/chip.h | 76 +- nuttx/arch/arm/src/stm32/chip.h | 33 +- nuttx/configs/Kconfig | 4 +- nuttx/configs/README.txt | 2 +- nuttx/configs/fire-stm32v2/README.txt | 1493 +++++++++-------- nuttx/configs/fire-stm32v2/include/board.h | 38 +- nuttx/configs/fire-stm32v2/nsh/Make.defs | 196 +++ nuttx/configs/fire-stm32v2/nsh/setenv.sh | 78 + nuttx/configs/fire-stm32v2/scripts/ld.script | 112 ++ .../fire-stm32v2/scripts/ld.script.dfu | 111 ++ 11 files changed, 1382 insertions(+), 768 deletions(-) create mode 100644 nuttx/configs/fire-stm32v2/nsh/Make.defs create mode 100755 nuttx/configs/fire-stm32v2/nsh/setenv.sh create mode 100644 nuttx/configs/fire-stm32v2/scripts/ld.script create mode 100644 nuttx/configs/fire-stm32v2/scripts/ld.script.dfu diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 614c14415c..6f899a7ab8 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3294,5 +3294,10 @@ script). * configs/fire-stm32v2: Configuration for the M3 Wildfire board. I don't know very much about this board other than is has an - STM32F103VET chip, LCD, touchscreen, and ENC28J60 network. + STM32F103VET6 chip, LCD, touchscreen, and ENC28J60 network. Very + little is in place on the initial check-in. + * configs/shenzhou: Coding for the Shenzhou board port is complete, + but tested has been deferred until I get the right tools. + * arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h: + Add support for the STM32F103VET6. diff --git a/nuttx/arch/arm/include/stm32/chip.h b/nuttx/arch/arm/include/stm32/chip.h index 2bf1d79b45..d01929e1ca 100644 --- a/nuttx/arch/arm/include/stm32/chip.h +++ b/nuttx/arch/arm/include/stm32/chip.h @@ -56,6 +56,8 @@ * the chip datasheet. */ +/* STM32 F100 Value Line ************************************************************/ + #if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \ || defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \ || defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB) @@ -87,34 +89,10 @@ # define STM32_NRNG 0 /* No random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ -#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6) -# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ -# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ -# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ -# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */ -# undef CONFIG_STM32_VALUELINE /* STM32F100x */ -# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ -# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ -# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */ -# define STM32_NFSMC 1 /* FSMC */ -# define STM32_NATIM 1 /* One advanced timer TIM1 */ -# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */ -# define STM32_NBTIM 0 /* No basic timers */ -# define STM32_NDMA 2 /* DMA1-2 */ -# define STM32_NSPI 2 /* SPI1-2 */ -# define STM32_NI2S 0 /* No I2S (?) */ -# define STM32_NUSART 3 /* USART1-3 */ -# define STM32_NI2C 2 /* I2C1-2 */ -# define STM32_NCAN 1 /* CAN1 */ -# define STM32_NSDIO 1 /* SDIO */ -# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */ -# define STM32_NGPIO 112 /* GPIOA-G */ -# define STM32_NADC 1 /* ADC1 */ -# define STM32_NDAC 0 /* No DAC */ -# define STM32_NCRC 0 /* No CRC */ -# define STM32_NETHERNET 0 /* No ethernet */ -# define STM32_NRNG 0 /* No random number generator (RNG) */ -# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ +/* STM32 F103 High Density Family ***************************************************/ +/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ + * only in the available FLASH and SRAM. + */ #elif defined(CONFIG_ARCH_CHIP_STM32F103RET6) # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ @@ -145,7 +123,11 @@ # define STM32_NRNG 0 /* No random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ -#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) +/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ + * only in the available FLASH and SRAM. + */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6) # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ @@ -174,6 +156,40 @@ # define STM32_NRNG 0 /* No random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ +/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ + * only in the available FLASH and SRAM. + */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6) +# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ +# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ +# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ +# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */ +# undef CONFIG_STM32_VALUELINE /* STM32F100x */ +# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ +# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ +# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */ +# define STM32_NFSMC 1 /* FSMC */ +# define STM32_NATIM 1 /* One advanced timer TIM1 */ +# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */ +# define STM32_NBTIM 0 /* No basic timers */ +# define STM32_NDMA 2 /* DMA1-2 */ +# define STM32_NSPI 2 /* SPI1-2 */ +# define STM32_NI2S 0 /* No I2S (?) */ +# define STM32_NUSART 3 /* USART1-3 */ +# define STM32_NI2C 2 /* I2C1-2 */ +# define STM32_NCAN 1 /* CAN1 */ +# define STM32_NSDIO 1 /* SDIO */ +# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */ +# define STM32_NGPIO 112 /* GPIOA-G */ +# define STM32_NADC 1 /* ADC1 */ +# define STM32_NDAC 0 /* No DAC */ +# define STM32_NCRC 0 /* No CRC */ +# define STM32_NETHERNET 0 /* No ethernet */ +# define STM32_NRNG 0 /* No random number generator (RNG) */ +# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ + +/* STM32 F105/F107 Connectivity Line *******************************************************/ #elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7) # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ @@ -232,6 +248,7 @@ # define STM32_NRNG 0 /* No random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ +/* STM32 F2 Family ******************************************************************/ #elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ @@ -263,6 +280,7 @@ # define STM32_NRNG 1 /* Random number generator (RNG) */ # define STM32_NDCMI 1 /* Digital camera interface (DCMI) */ +/* STM23 F4 Family ******************************************************************/ #elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ diff --git a/nuttx/arch/arm/src/stm32/chip.h b/nuttx/arch/arm/src/stm32/chip.h index cc3ee1f96b..3fac597ef2 100644 --- a/nuttx/arch/arm/src/stm32/chip.h +++ b/nuttx/arch/arm/src/stm32/chip.h @@ -48,24 +48,51 @@ /* Include the chip pin configuration file */ +/* STM32 F1 Family ******************************************************************/ #if defined(CONFIG_STM32_STM32F10XX) + +/* STM32F100 Value Line */ + # if defined(CONFIG_STM32_VALUELINE) # include "chip/stm32f100_pinmap.h" -# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6) -# include "chip/stm32f103ze_pinmap.h" + +/* STM32 F103 High Density Family */ +/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ + * only in the available FLASH and SRAM. + */ + # elif defined(CONFIG_ARCH_CHIP_STM32F103RET6) # include "chip/stm32f103re_pinmap.h" -# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) + +/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ + * only in the available FLASH and SRAM. + */ + +# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6) # include "chip/stm32f103vc_pinmap.h" + +/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ + * only in the available FLASH and SRAM. + */ +# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6) +# include "chip/stm32f103ze_pinmap.h" + +/* STM32 F105/F107 Connectivity Line */ + # elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7) # include "chip/stm32f105vb_pinmap.h" + # elif defined(CONFIG_ARCH_CHIP_STM32F107VC) # include "chip/stm32f107vc_pinmap.h" # else # error "Unsupported STM32F10XXX chip" # endif + +/* STM32 F2 Family ******************************************************************/ #elif defined(CONFIG_STM32_STM32F20XX) # include "chip/stm32f20xxx_pinmap.h" + +/* STM32 F4 Family ******************************************************************/ #elif defined(CONFIG_STM32_STM32F40XX) # include "chip/stm32f40xxx_pinmap.h" #else diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index dabd32842f..8de190c73e 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -132,13 +132,13 @@ config ARCH_BOARD_EZ80F910200ZCO config ARCH_BOARD_FIRE_STM32V2 bool "M3 Wildfire STM32v2 board" - depends on ARCH_CHIP_STM32F103VET + depends on ARCH_CHIP_STM32F103VET6 select ARCH_HAVE_LEDS select ARCH_HAVE_BUTTONS select ARCH_HAVE_IRQBUTTONS ---help--- A configuration for the M3 Wildfile board. This board is based on the - STM32F103VET chip. + STM32F103VET6 chip. config ARCH_BOARD_HYMINI_STM32V bool "HY-Mini STM32v board" diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 2f58946725..1b8801605e 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -1545,7 +1545,7 @@ configs/ez80f0910200zco configs/fire-stm32v2 A configuration for the M3 Wildfire STM32 board. This board is based on the - STM32F103VET chip. + STM32F103VET6 chip. configs/hymini-stm32v A configuration for the HY-Mini STM32v board. This board is based on the diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index 92bc9ecd26..c278be4d61 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -1,727 +1,766 @@ -README -====== - -This README discusses issues unique to NuttX configurations for the M3 -Wildfire development board (STM32F103VET). - -Contents -======== - - - Pin Configuration - - Development Environment - - GNU Toolchain Options - - IDEs - - NuttX buildroot Toolchain - - DFU and JTAG - - OpenOCD - - LEDs - - RTC - - M3 Wildfire-specific Configuration Options - - Configurations - -Pin Configuration -================= ---- ------ -------------- ------------------------------------------------------------------- -PIN NAME SIGNAL NOTES ---- ------ -------------- ------------------------------------------------------------------- - -1 PE2 PE2-C-RCLK Camera (P9) -2 PE3 PE3-USB-M USB2.0 -3 PE4 PE4-BEEP LS1 Bell -4 PE5 -5 PE6 -6 VBAT BT1 Battery (BT1) -7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen -8 PC14 PC14/OSC32-IN Y2 32.768KHz -9 PC15 PC15/OSC32-OUT Y2 32.768KHz -10 VSS_5 DGND -11 VDD_5 3V3 -12 OSC_IN Y1 8MHz -13 OSC_OUT Y1 8MHz -14 NRST REST1 Reset switch -15 PC0 -16 PC1 PC1/ADC123-IN11 Potentiometer (R16) -17 PC2 -18 PC3 PC3-LED1 LED1, Active low (pulled high) -19 VSSA DGND -20 VREF- DGND -21 VREF+ 3V3 -22 VDDA 3V3 -23 PA0 PA0-C-VSYNC Camera (P9) -24 PA1 PC1/ADC123-IN11 -25 PA2 PA2-US2-TX MAX3232, DB9 D7 - ---- ------ -------------- ------------------------------------------------------------------- -PIN NAME SIGNAL NOTES ---- ------ -------------- ------------------------------------------------------------------- - -26 PA3 PA3-US2-RX MAX3232, DB9 D7 -27 VSS_4 DGND -28 VDD_4 3V3 -29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH -30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH -31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH -32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH -33 PC4 PC4-LED2 LED2, Active low (pulled high) -34 PC5 PC5-LED3 LED3, Active low (pulled high) -35 PB0 PB0-KEY1 KEY1, Low when closed (pulled high if open) -36 PB1 PB1-KEY2 KEY2, Low when closed (pulled high if open) -37 PB2 BOOT1/DGND -38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen -39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen -40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen -41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen -42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen -43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen -44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen -45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen -46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen -47 PB10 PB10-C-DO_2 Camera (P9) -48 PB11 PB11-MP3-RST MP3 - PB11-C-DO_3 Camera (P9) -49 VSS_1 DGND -50 VDD_1 3V3 - ---- ------ -------------- ------------------------------------------------------------------- -PIN NAME SIGNAL NOTES ---- ------ -------------- ------------------------------------------------------------------- - -51 PB12 PB12-SPI2-NSS MP3 - PB12-C-DO_4 Camera (P9) -52 PB13 PB13-SPI2-SCK MP3 - PB13-C-DO_5 Camera (P9) -53 PB14 PB14-SPI2-MISO MP3 - PB14-C-DO_6 Camera (P9) -54 PB15 PB15-SPI2-MOSI MP3 - PB15-C-DO_7 Camera (P9) -55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen -56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen -57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen -58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen -59 PD12 C-LED_EN Camera (P9) -60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen -61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen -62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen -63 PC6 PC6-MP3-XDCS MP3 - PC6-C-SIO_C Camera (P9) -64 PC7 PC7-MP3-DREQ MP3 - PC7-C-SIO_D Camera (P9) -65 PC8 PC8-SDIO-D0 SD card, pulled high -66 PC9 PC9-SDIO-D1 SD card, pulled high -67 PA8 PA8-C-XCLK Camera (P9) -68 PA9 PA9-US1-TX MAX3232, DB9 D8 -69 PA10 PA10-US1-RX MAX3232, DB9 D8 -70 PA11 PA11-USBDM USB2.0 -71 PA12 PA12-USBDP USB2.0 -72 PA13 PA13-JTMS JTAG -73 N/C -74 VSS_2 DGND -75 VDD_2 3V3 - ---- ------ -------------- ------------------------------------------------------------------- -PIN NAME SIGNAL NOTES ---- ------ -------------- ------------------------------------------------------------------- - -76 PA14 PA14-JTCK JTAG -77 PA15 PA15-JTDI JTAG -78 PC10 PC10-SDIO-D2 SD card, pulled high -79 PC11 PC10-SDIO-D3 SD card, pulled high -80 PC12 PC12-SDIO-CLK SD card -81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen -82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen -83 PD2 PD2-SDIO-CMD SD card, pulled high -84 PD3 PD3-C-WEN Camera (P9) -85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen -86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen -87 PD6 PD6-C-OE Camera (P9) -88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen -89 PB3 PB3-JTDO JTAG -90 PB4 PB4-NJTRST JTAG -91 PB5 PB5-C-WRST Camera (P9) -92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 -93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 -94 BOOT0 SW3 3V3 or DGND -95 PB8 PB8-CAN-RX CAN tranceiver, Header 2H - PB8-C-DO_0 Camera (P9) -96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H - PB9-C-DO_1 Camera (P9) -97 PE0 PE0-C-RRST Camera (P9) -98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen -99 VSS_3 DGND -100 VDD_3 3V3 - -Development Environment -======================= - - Either Linux or Cygwin on Windows can be used for the development environment. - The source has been built only using the GNU toolchain (see below). Other - toolchains will likely cause problems. Testing was performed using the Cygwin - environment because the CodeSourcery Toolchain. The Raisonance R-Link - emulatator and some RIDE7 development tools were used and those tools works - only under Windows. - -GNU Toolchain Options -===================== - - The NuttX make system has been modified to support the following different - toolchain options. - - 1. The CodeSourcery GNU toolchain, - 2. The devkitARM GNU toolchain, - 3. Raisonance GNU toolchain, or - 4. The NuttX buildroot Toolchain (see below). - - All testing has been conducted using the NuttX buildroot toolchain. However, - the make system is setup to default to use the devkitARM toolchain. To use - the CodeSourcery, devkitARM or Raisonance GNU toolchain, you simply need to - add one of the following configuration options to your .config (or defconfig) - file: - - CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_STM32_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_STM32_DEVKITARM=y : devkitARM under Windows - CONFIG_STM32_RAISONANCE=y : Raisonance RIDE7 under Windows - CONFIG_STM32_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) - - If you are not using CONFIG_STM32_BUILDROOT, then you may also have to modify - the PATH in the setenv.h file if your make cannot find the tools. - - NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are - Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot - toolchains are Cygwin and/or Linux native toolchains. There are several limitations - to using a Windows based toolchain in a Cygwin environment. The three biggest are: - - 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are - performed automatically in the Cygwin makefiles using the 'cygpath' utility - but you might easily find some new path problems. If so, check out 'cygpath -w' - - 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links - are used in Nuttx (e.g., include/arch). The make system works around these - problems for the Windows tools by copying directories instead of linking them. - But this can also cause some confusion for you: For example, you may edit - a file in a "linked" directory and find that your changes had no effect. - That is because you are building the copy of the file in the "fake" symbolic - directory. If you use a Windows toolchain, you should get in the habit of - making like this: - - make clean_context all - - An alias in your .bashrc file might make that less painful. - - 3. Dependencies are not made when using Windows versions of the GCC. This is - because the dependencies are generated using Windows pathes which do not - work with the Cygwin make. - - Support has been added for making dependencies with the windows-native toolchains. - That support can be enabled by modifying your Make.defs file as follows: - - - MKDEP = $(TOPDIR)/tools/mknulldeps.sh - + MKDEP = $(TOPDIR)/tools/mkdeps.sh --winpaths "$(TOPDIR)" - - If you have problems with the dependency build (for example, if you are not - building on C:), then you may need to modify tools/mkdeps.sh - - NOTE 1: The CodeSourcery toolchain (2009q1) does not work with default optimization - level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with - -Os. - - NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that - the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM - path or will get the wrong version of make. - -IDEs -==== - - NuttX is built using command-line make. It can be used with an IDE, but some - effort will be required to create the project (There is a simple RIDE project - in the RIDE subdirectory). - - Makefile Build - -------------- - Under Eclipse, it is pretty easy to set up an "empty makefile project" and - simply use the NuttX makefile to build the system. That is almost for free - under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty - makefile project in order to work with Windows (Google for "Eclipse Cygwin" - - there is a lot of help on the internet). - - Native Build - ------------ - Here are a few tips before you start that effort: - - 1) Select the toolchain that you will be using in your .config file - 2) Start the NuttX build at least one time from the Cygwin command line - before trying to create your project. This is necessary to create - certain auto-generated files and directories that will be needed. - 3) Set up include pathes: You will need include/, arch/arm/src/stm32, - arch/arm/src/common, arch/arm/src/armv7-m, and sched/. - 4) All assembly files need to have the definition option -D __ASSEMBLY__ - on the command line. - - Startup files will probably cause you some headaches. The NuttX startup file - is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX - one time from the Cygwin command line in order to obtain the pre-built - startup object needed by RIDE. - -NuttX buildroot Toolchain -========================= - - A GNU GCC-based toolchain is assumed. The files */setenv.sh should - be modified to point to the correct path to the Cortex-M3 GCC toolchain (if - different from the default in your PATH variable). - - If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX - SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573). - This GNU toolchain builds and executes in the Linux or Cygwin environment. - - 1. You must have already configured Nuttx in /nuttx. - - cd tools - ./configure.sh fire-stm32v2/ - - 2. Download the latest buildroot package into - - 3. unpack the buildroot tarball. The resulting directory may - have versioning information on it like buildroot-x.y.z. If so, - rename /buildroot-x.y.z to /buildroot. - - 4. cd /buildroot - - 5. cp configs/cortexm3-defconfig-4.3.3 .config - - 6. make oldconfig - - 7. make - - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly built binaries. - - See the file configs/README.txt in the buildroot source tree. That has more - detailed PLUS some special instructions that you will need to follow if you are - building a Cortex-M3 toolchain for Cygwin under Windows. - -DFU and JTAG -============ - - Enbling Support for the DFU Bootloader - -------------------------------------- - The linker files in these projects can be configured to indicate that you - will be loading code using STMicro built-in USB Device Firmware Upgrade (DFU) - loader or via some JTAG emulator. You can specify the DFU bootloader by - adding the following line: - - CONFIG_STM32_DFU=y - - to your .config file. Most of the configurations in this directory are set - up to use the DFU loader. - - If CONFIG_STM32_DFU is defined, the code will not be positioned at the beginning - of FLASH (0x08000000) but will be offset to 0x08003000. This offset is needed - to make space for the DFU loader and 0x08003000 is where the DFU loader expects - to find new applications at boot time. If you need to change that origin for some - other bootloader, you will need to edit the file(s) ld.script.dfu for the - configuration. - - The DFU SE PC-based software is available from the STMicro website, - http://www.st.com. General usage instructions: - - 1. Convert the NuttX Intel Hex file (nuttx.hex) into a special DFU - file (nuttx.dfu)... see below for details. - 2. Connect the M3 Wildfire board to your computer using a USB - cable. - 3. Start the DFU loader on the M3 Wildfire board. You do this by - resetting the board while holding the "Key" button. Windows should - recognize that the DFU loader has been installed. - 3. Run the DFU SE program to load nuttx.dfu into FLASH. - - What if the DFU loader is not in FLASH? The loader code is available - inside of the Demo dirctory of the USBLib ZIP file that can be downloaded - from the STMicro Website. You can build it using RIDE (or other toolchains); - you will need a JTAG emulator to burn it into FLASH the first time. - - In order to use STMicro's built-in DFU loader, you will have to get - the NuttX binary into a special format with a .dfu extension. The - DFU SE PC_based software installation includes a file "DFU File Manager" - conversion program that a file in Intel Hex format to the special DFU - format. When you successfully build NuttX, you will find a file called - nutt.hex in the top-level directory. That is the file that you should - provide to the DFU File Manager. You will end up with a file called - nuttx.dfu that you can use with the STMicro DFU SE program. - - Enabling JTAG - ------------- - If you are not using the DFU, then you will probably also need to enable - JTAG support. By default, all JTAG support is disabled but there NuttX - configuration options to enable JTAG in various different ways. - - These configurations effect the setting of the SWJ_CFG[2:0] bits in the AFIO - MAPR register. These bits are used to configure the SWJ and trace alternate function I/Os. The SWJ (SerialWire JTAG) supports JTAG or SWD access to the - Cortex debug port. The default state in this port is for all JTAG support - to be disable. - - CONFIG_STM32_JTAG_FULL_ENABLE - sets SWJ_CFG[2:0] to 000 which enables full - SWJ (JTAG-DP + SW-DP) - - CONFIG_STM32_JTAG_NOJNTRST_ENABLE - sets SWJ_CFG[2:0] to 001 which enable - full SWJ (JTAG-DP + SW-DP) but without JNTRST. - - CONFIG_STM32_JTAG_SW_ENABLE - sets SWJ_CFG[2:0] to 010 which would set JTAG-DP - disabled and SW-DP enabled - - The default setting (none of the above defined) is SWJ_CFG[2:0] set to 100 - which disable JTAG-DP and SW-DP. - -OpenOCD -======= - -I have also used OpenOCD with the M3 Wildfire. In this case, I used -the Olimex USB ARM OCD. See the script in configs/fire-stm32v2/tools/oocd.sh -for more information. Using the script: - -1) Start the OpenOCD GDB server - - cd - configs/fire-stm32v2/tools/oocd.sh $PWD - -2) Load Nuttx - - cd - arm-none-eabi-gdb nuttx - gdb> target remote localhost:3333 - gdb> mon reset - gdb> mon halt - gdb> load nuttx - -3) Running NuttX - - gdb> mon reset - gdb> c - -LEDs -==== - -The M3 Wildfire has 3 LEDs labeled LED1, LED2 and LED3. These LEDs are not -used by the NuttX port unless CONFIG_ARCH_LEDS is defined. In that case, the -usage by the board port is defined in include/board.h and src/up_autoleds.c. -The LEDs are used to encode OS-related events as follows: - - /* LED1 LED2 LED3 */ - #define LED_STARTED 0 /* OFF OFF OFF */ - #define LED_HEAPALLOCATE 1 /* ON OFF OFF */ - #define LED_IRQSENABLED 2 /* OFF ON OFF */ - #define LED_STACKCREATED 3 /* OFF OFF OFF */ - - #define LED_INIRQ 4 /* NC NC ON (momentary) */ - #define LED_SIGNAL 5 /* NC NC ON (momentary) */ - #define LED_ASSERTION 6 /* NC NC ON (momentary) */ - #define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ - #undef LED_IDLE /* Sleep mode indication not supported */ - -RTC -=== - - The STM32 RTC may configured using the following settings. - - CONFIG_RTC - Enables general support for a hardware RTC. Specific - architectures may require other specific settings. - CONFIG_RTC_HIRES - The typical RTC keeps time to resolution of 1 - second, usually supporting a 32-bit time_t value. In this case, - the RTC is used to "seed" the normal NuttX timer and the - NuttX timer provides for higher resoution time. If CONFIG_RTC_HIRES - is enabled in the NuttX configuration, then the RTC provides higher - resolution time and completely replaces the system timer for purpose of - date and time. - CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the - frequency of the high resolution RTC must be provided. If CONFIG_RTC_HIRES - is not defined, CONFIG_RTC_FREQUENCY is assumed to be one. - CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an alarm. - A callback function will be executed when the alarm goes off - - In hi-res mode, the STM32 RTC operates only at 16384Hz. Overflow interrupts - are handled when the 32-bit RTC counter overflows every 3 days and 43 minutes. - A BKP register is incremented on each overflow interrupt creating, effectively, - a 48-bit RTC counter. - - In the lo-res mode, the RTC operates at 1Hz. Overflow interrupts are not handled - (because the next overflow is not expected until the year 2106. - - WARNING: Overflow interrupts are lost whenever the STM32 is powered down. The - overflow interrupt may be lost even if the STM32 is powered down only momentarily. - Therefore hi-res solution is only useful in systems where the power is always on. - -M3 Wildfire-specific Configuration Options -============================================ - - CONFIG_ARCH - Identifies the arch/ subdirectory. This should - be set to: - - CONFIG_ARCH=arm - - CONFIG_ARCH_family - For use in C code: - - CONFIG_ARCH_ARM=y - - CONFIG_ARCH_architecture - For use in C code: - - CONFIG_ARCH_CORTEXM3=y - - CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory - - CONFIG_ARCH_CHIP=stm32 - - CONFIG_ARCH_CHIP_name - For use in C code to identify the exact - chip: - - CONFIG_ARCH_CHIP_STM32 - CONFIG_ARCH_CHIP_STM32F103ZET6 - - CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock - configuration features. - - CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n - - CONFIG_ARCH_BOARD - Identifies the configs subdirectory and - hence, the board that supports the particular chip or SoC. - - CONFIG_ARCH_BOARD=fire-stm32v2 (for the M3 Wildfire development board) - - CONFIG_ARCH_BOARD_name - For use in C code - - CONFIG_ARCH_BOARD_FIRE_STM32V2=y - - CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation - of delay loops - - CONFIG_ENDIAN_BIG - define if big endian (default is little - endian) - - CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case): - - CONFIG_DRAM_SIZE=0x00010000 (64Kb) - - CONFIG_DRAM_START - The start address of installed DRAM - - CONFIG_DRAM_START=0x20000000 - - CONFIG_ARCH_IRQPRIO - The STM32F103Z supports interrupt prioritization - - CONFIG_ARCH_IRQPRIO=y - - CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that - have LEDs - - CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt - stack. If defined, this symbol is the size of the interrupt - stack in bytes. If not defined, the user task stacks will be - used during interrupt handling. - - CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions - - CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture. - - CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that - cause a 100 second delay during boot-up. This 100 second delay - serves no purpose other than it allows you to calibratre - CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure - the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until - the delay actually is 100 seconds. - - Individual subsystems can be enabled: - AHB - --- - CONFIG_STM32_DMA1 - CONFIG_STM32_DMA2 - CONFIG_STM32_CRC - CONFIG_STM32_FSMC - CONFIG_STM32_SDIO - - APB1 - ---- - CONFIG_STM32_TIM2 - CONFIG_STM32_TIM3 - CONFIG_STM32_TIM4 - CONFIG_STM32_TIM5 - CONFIG_STM32_TIM6 - CONFIG_STM32_TIM7 - CONFIG_STM32_WWDG - CONFIG_STM32_IWDG - CONFIG_STM32_SPI2 - CONFIG_STM32_SPI4 - CONFIG_STM32_USART2 - CONFIG_STM32_USART3 - CONFIG_STM32_UART4 - CONFIG_STM32_UART5 - CONFIG_STM32_I2C1 - CONFIG_STM32_I2C2 - CONFIG_STM32_USB - CONFIG_STM32_CAN1 - CONFIG_STM32_BKP - CONFIG_STM32_PWR - CONFIG_STM32_DAC1 - CONFIG_STM32_DAC2 - CONFIG_STM32_USB - - APB2 - ---- - CONFIG_STM32_ADC1 - CONFIG_STM32_ADC2 - CONFIG_STM32_TIM1 - CONFIG_STM32_SPI1 - CONFIG_STM32_TIM8 - CONFIG_STM32_USART1 - CONFIG_STM32_ADC3 - - Timer and I2C devices may need to the following to force power to be applied - unconditionally at power up. (Otherwise, the device is powered when it is - initialized). - - CONFIG_STM32_FORCEPOWER - - Timer devices may be used for different purposes. One special purpose is - to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn - is defined (as above) then the following may also be defined to indicate that - the timer is intended to be used for pulsed output modulation, ADC conversion, - or DAC conversion. Note that ADC/DAC require two definition: Not only do you have - to assign the timer (n) for used by the ADC or DAC, but then you also have to - configure which ADC or DAC (m) it is assigned to. - - CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,8 - CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,8 - CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,8, m=1,..,3 - CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,8 - CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,8, m=1,..,2 - - For each timer that is enabled for PWM usage, we need the following additional - configuration settings: - - CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} - - NOTE: The STM32 timers are each capable of generating different signals on - each of the four channels with different duty cycles. That capability is - not supported by this driver: Only one output channel per timer. - - Alternate pin mappings. The M3 Wildfire board requires only CAN1 remapping - On the M3 Wildfire board pin PB9 is wired as TX and pin PB8 is wired as RX. - Which then makes the proper connection through the CAN transiver SN65HVD230 - out to the CAN D-type 9-pn male connector where pin 2 is CANL and pin 7 is CANH. - - CONFIG_STM32_TIM1_FULL_REMAP - CONFIG_STM32_TIM1_PARTIAL_REMAP - CONFIG_STM32_TIM2_FULL_REMAP - CONFIG_STM32_TIM2_PARTIAL_REMAP_1 - CONFIG_STM32_TIM2_PARTIAL_REMAP_2 - CONFIG_STM32_TIM3_FULL_REMAP - CONFIG_STM32_TIM3_PARTIAL_REMAP - CONFIG_STM32_TIM4_REMAP - CONFIG_STM32_USART1_REMAP - CONFIG_STM32_USART2_REMAP - CONFIG_STM32_USART3_FULL_REMAP - CONFIG_STM32_USART3_PARTIAL_REMAP - CONFIG_STM32_SPI1_REMAP - CONFIG_STM32_SPI3_REMAP - CONFIG_STM32_I2C1_REMAP - CONFIG_STM32_CAN1_REMAP1 - CONFIG_STM32_CAN1_REMAP2 - CONFIG_STM32_CAN2_REMAP - - JTAG Enable settings (by default JTAG-DP and SW-DP are disabled): - CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) - CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) - but without JNTRST. - CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled - - STM32F103Z specific device driver settings - - CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART - m (m=4,5) for the console and ttys0 (default is the USART1). - CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. - This specific the size of the receive buffer - CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before - being sent. This specific the size of the transmit buffer - CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be - CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8. - CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity - CONFIG_U[S]ARTn_2STOP - Two stop bits - - CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI - support. Non-interrupt-driven, poll-waiting is recommended if the - interrupt rate would be to high in the interrupt driven case. - CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. - Cannot be used with CONFIG_STM32_SPI_INTERRUPT. - - CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO - and CONFIG_STM32_DMA2. - CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 - CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. - Default: Medium - CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: - 4-bit transfer mode. - - M3 Wildfire CAN Configuration - - CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or - CONFIG_STM32_CAN2 must also be defined) - CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default - Standard 11-bit IDs. - CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. - Default: 8 - CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. - Default: 4 - CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback - mode for testing. The STM32 CAN driver does support loopback mode. - CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. - CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. - CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 - CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 - CONFIG_CAN_REGDEBUG - If CONFIG_DEBUG is set, this will generate an - dump of all CAN registers. - - M3 Wildfire LCD Hardware Configuration - - CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" - support. Default is this 320x240 "landscape" orientation - (this setting is informative only... not used). - CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" - orientation support. In this orientation, the M3 Wildfire's - LCD ribbon cable is at the bottom of the display. Default is - 320x240 "landscape" orientation. - CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse - portrait" orientation support. In this orientation, the - M3 Wildfire's LCD ribbon cable is at the top of the display. - Default is 320x240 "landscape" orientation. - CONFIG_LCD_BACKLIGHT - Define to support a backlight. - CONFIG_LCD_PWM - If CONFIG_STM32_TIM1 is also defined, then an - adjustable backlight will be provided using timer 1 to generate - various pulse widthes. The granularity of the settings is - determined by CONFIG_LCD_MAXPOWER. If CONFIG_LCD_PWM (or - CONFIG_STM32_TIM1) is not defined, then a simple on/off backlight - is provided. - CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears - to be a shift in the returned data. This value fixes the offset. - Default 5. - - The LCD driver dynamically selects the LCD based on the reported LCD - ID value. However, code size can be reduced by suppressing support for - individual LCDs using: - - CONFIG_STM32_AM240320_DISABLE - CONFIG_STM32_SPFD5408B_DISABLE - CONFIG_STM32_R61580_DISABLE - -Configurations -============== - -Each M3 Wildfire configuration is maintained in a sudirectory and -can be selected as follow: - - cd tools - ./configure.sh fire-stm32v2/ - cd - - . ./setenv.sh - -Where is one of the following: - - nsh - --- - Configure the NuttShell (nsh) located at examples/nsh. The nsh configuration - contains support for some built-in applications that can be enabled by making - some additional minor change to the configuration file. +README +====== + +This README discusses issues unique to NuttX configurations for the M3 +Wildfire development board (STM32F103VET6). + +Contents +======== + + - Pin Configuration + - Development Environment + - GNU Toolchain Options + - IDEs + - NuttX buildroot Toolchain + - DFU and JTAG + - OpenOCD + - LEDs + - RTC + - M3 Wildfire-specific Configuration Options + - Configurations + +Pin Configuration +================= +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +1 PE2 PE2-C-RCLK Camera (P9) +2 PE3 PE3-USB-M USB2.0 +3 PE4 PE4-BEEP LS1 Bell +4 PE5 +5 PE6 +6 VBAT BT1 Battery (BT1) +7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen +8 PC14 PC14/OSC32-IN Y2 32.768KHz +9 PC15 PC15/OSC32-OUT Y2 32.768KHz +10 VSS_5 DGND +11 VDD_5 3V3 +12 OSC_IN Y1 8MHz +13 OSC_OUT Y1 8MHz +14 NRST REST1 Reset switch +15 PC0 +16 PC1 PC1/ADC123-IN11 Potentiometer (R16) +17 PC2 +18 PC3 PC3-LED1 LED1, Active low (pulled high) +19 VSSA DGND +20 VREF- DGND +21 VREF+ 3V3 +22 VDDA 3V3 +23 PA0 PA0-C-VSYNC Camera (P9) +24 PA1 PC1/ADC123-IN1 +25 PA2 PA2-US2-TX MAX3232, DB9 D7 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +26 PA3 PA3-US2-RX MAX3232, DB9 D7 +27 VSS_4 DGND +28 VDD_4 3V3 +29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH +30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH +33 PC4 PC4-LED2 LED2, Active low (pulled high) +34 PC5 PC5-LED3 LED3, Active low (pulled high) +35 PB0 PB0-KEY1 KEY1, Low when closed (pulled high if open) +36 PB1 PB1-KEY2 KEY2, Low when closed (pulled high if open) +37 PB2 BOOT1/DGND +38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen +39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen +40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen +41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen +42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen +43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen +44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen +45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen +46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen +47 PB10 PB10-C-DO_2 Camera (P9) +48 PB11 PB11-MP3-RST MP3 + PB11-C-DO_3 Camera (P9) +49 VSS_1 DGND +50 VDD_1 3V3 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +51 PB12 PB12-SPI2-NSS MP3 + PB12-C-DO_4 Camera (P9) +52 PB13 PB13-SPI2-SCK MP3 + PB13-C-DO_5 Camera (P9) +53 PB14 PB14-SPI2-MISO MP3 + PB14-C-DO_6 Camera (P9) +54 PB15 PB15-SPI2-MOSI MP3 + PB15-C-DO_7 Camera (P9) +55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen +56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen +57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen +58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen +59 PD12 C-LED_EN Camera (P9) +60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen +61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen +62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen +63 PC6 PC6-MP3-XDCS MP3 + PC6-C-SIO_C Camera (P9) +64 PC7 PC7-MP3-DREQ MP3 + PC7-C-SIO_D Camera (P9) +65 PC8 PC8-SDIO-D0 SD card, pulled high +66 PC9 PC9-SDIO-D1 SD card, pulled high +67 PA8 PA8-C-XCLK Camera (P9) +68 PA9 PA9-US1-TX MAX3232, DB9 D8 +69 PA10 PA10-US1-RX MAX3232, DB9 D8 +70 PA11 PA11-USBDM USB2.0 +71 PA12 PA12-USBDP USB2.0 +72 PA13 PA13-JTMS JTAG +73 N/C +74 VSS_2 DGND +75 VDD_2 3V3 + +--- ------ -------------- ------------------------------------------------------------------- +PIN NAME SIGNAL NOTES +--- ------ -------------- ------------------------------------------------------------------- + +76 PA14 PA14-JTCK JTAG +77 PA15 PA15-JTDI JTAG +78 PC10 PC10-SDIO-D2 SD card, pulled high +79 PC11 PC10-SDIO-D3 SD card, pulled high +80 PC12 PC12-SDIO-CLK SD card +81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen +82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen +83 PD2 PD2-SDIO-CMD SD card, pulled high +84 PD3 PD3-C-WEN Camera (P9) +85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen +86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen +87 PD6 PD6-C-OE Camera (P9) +88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen +89 PB3 PB3-JTDO JTAG +90 PB4 PB4-NJTRST JTAG +91 PB5 PB5-C-WRST Camera (P9) +92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 +93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 +94 BOOT0 SW3 3V3 or DGND +95 PB8 PB8-CAN-RX CAN tranceiver, Header 2H + PB8-C-DO_0 Camera (P9) +96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H + PB9-C-DO_1 Camera (P9) +97 PE0 PE0-C-RRST Camera (P9) +98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen +99 VSS_3 DGND +100 VDD_3 3V3 + +Development Environment +======================= + + Either Linux or Cygwin on Windows can be used for the development environment. + The source has been built only using the GNU toolchain (see below). Other + toolchains will likely cause problems. Testing was performed using the Cygwin + environment because the CodeSourcery Toolchain. The Raisonance R-Link + emulatator and some RIDE7 development tools were used and those tools works + only under Windows. + +GNU Toolchain Options +===================== + + Toolchain Configurations + ------------------------ + The NuttX make system has been modified to support the following different + toolchain options. + + 1. The CodeSourcery GNU toolchain, + 2. The Atollic Toolchain, + 3. The devkitARM GNU toolchain, + 4. Raisonance GNU toolchain, or + 5. The NuttX buildroot Toolchain (see below). + + Most testing has been conducted using the CodeSourcery toolchain for Windows and + that is the default toolchain in most configurations. To use the Atollic, + devkitARM, Raisonance GNU, or NuttX buildroot toolchain, you simply need to + add one of the following configuration options to your .config (or defconfig) + file: + + CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_STM32_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_STM32_ATOLLIC_LITE=y : The free, "Lite" version of Atollic toolchain under Windows + CONFIG_STM32_ATOLLIC_PRO=y : The paid, "Pro" version of Atollic toolchain under Windows + CONFIG_STM32_DEVKITARM=y : devkitARM under Windows + CONFIG_STM32_RAISONANCE=y : Raisonance RIDE7 under Windows + CONFIG_STM32_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + + If you change the default toolchain, then you may also have to modify the PATH in + the setenv.h file if your make cannot find the tools. + + NOTE: the CodeSourcery (for Windows), Atollic, devkitARM, and Raisonance toolchains are + Windows native toolchains. The CodeSourcery (for Linux) and NuttX buildroot + toolchains are Cygwin and/or Linux native toolchains. There are several limitations + to using a Windows based toolchain in a Cygwin environment. The three biggest are: + + 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are + performed automatically in the Cygwin makefiles using the 'cygpath' utility + but you might easily find some new path problems. If so, check out 'cygpath -w' + + 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links + are used in Nuttx (e.g., include/arch). The make system works around these + problems for the Windows tools by copying directories instead of linking them. + But this can also cause some confusion for you: For example, you may edit + a file in a "linked" directory and find that your changes had no effect. + That is because you are building the copy of the file in the "fake" symbolic + directory. If you use a Windows toolchain, you should get in the habit of + making like this: + + make clean_context all + + An alias in your .bashrc file might make that less painful. + + 3. Dependencies are not made when using Windows versions of the GCC. This is + because the dependencies are generated using Windows pathes which do not + work with the Cygwin make. + + Support has been added for making dependencies with the windows-native toolchains. + That support can be enabled by modifying your Make.defs file as follows: + + - MKDEP = $(TOPDIR)/tools/mknulldeps.sh + + MKDEP = $(TOPDIR)/tools/mkdeps.sh --winpaths "$(TOPDIR)" + + If you have problems with the dependency build (for example, if you are not + building on C:), then you may need to modify tools/mkdeps.sh + + The CodeSourcery Toolchain (2009q1) + ----------------------------------- + The CodeSourcery toolchain (2009q1) does not work with default optimization + level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with + -Os. + + The Atollic "Pro" and "Lite" Toolchain + -------------------------------------- + One problem that I had with the Atollic toolchains is that the provide a gcc.exe + and g++.exe in the same bin/ file as their ARM binaries. If the Atollic bin/ path + appears in your PATH variable before /usr/bin, then you will get the wrong gcc + when you try to build host executables. This will cause to strange, uninterpretable + errors build some host binaries in tools/ when you first make. + + The Atollic "Lite" Toolchain + ---------------------------- + The free, "Lite" version of the Atollic toolchain does not support C++ nor + does it support ar, nm, objdump, or objdcopy. If you use the Atollic "Lite" + toolchain, you will have to set: + + CONFIG_HAVE_CXX=n + + In order to compile successfully. Otherwise, you will get errors like: + + "C++ Compiler only available in TrueSTUDIO Professional" + + The make may then fail in some of the post link processing because of some of + the other missing tools. The Make.defs file replaces the ar and nm with + the default system x86 tool versions and these seem to work okay. Disable all + of the following to avoid using objcopy: + + CONFIG_RRLOAD_BINARY=n + CONFIG_INTELHEX_BINARY=n + CONFIG_MOTOROLA_SREC=n + CONFIG_RAW_BINARY=n + + devkitARM + --------- + The devkitARM toolchain includes a version of MSYS make. Make sure that the + the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM + path or will get the wrong version of make. + +IDEs +==== + + NuttX is built using command-line make. It can be used with an IDE, but some + effort will be required to create the project (There is a simple RIDE project + in the RIDE subdirectory). + + Makefile Build + -------------- + Under Eclipse, it is pretty easy to set up an "empty makefile project" and + simply use the NuttX makefile to build the system. That is almost for free + under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty + makefile project in order to work with Windows (Google for "Eclipse Cygwin" - + there is a lot of help on the internet). + + Native Build + ------------ + Here are a few tips before you start that effort: + + 1) Select the toolchain that you will be using in your .config file + 2) Start the NuttX build at least one time from the Cygwin command line + before trying to create your project. This is necessary to create + certain auto-generated files and directories that will be needed. + 3) Set up include pathes: You will need include/, arch/arm/src/stm32, + arch/arm/src/common, arch/arm/src/armv7-m, and sched/. + 4) All assembly files need to have the definition option -D __ASSEMBLY__ + on the command line. + + Startup files will probably cause you some headaches. The NuttX startup file + is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX + one time from the Cygwin command line in order to obtain the pre-built + startup object needed by RIDE. + +NuttX buildroot Toolchain +========================= + + A GNU GCC-based toolchain is assumed. The files */setenv.sh should + be modified to point to the correct path to the Cortex-M3 GCC toolchain (if + different from the default in your PATH variable). + + If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX + SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573). + This GNU toolchain builds and executes in the Linux or Cygwin environment. + + 1. You must have already configured Nuttx in /nuttx. + + cd tools + ./configure.sh fire-stm32v2/ + + 2. Download the latest buildroot package into + + 3. unpack the buildroot tarball. The resulting directory may + have versioning information on it like buildroot-x.y.z. If so, + rename /buildroot-x.y.z to /buildroot. + + 4. cd /buildroot + + 5. cp configs/cortexm3-defconfig-4.3.3 .config + + 6. make oldconfig + + 7. make + + 8. Edit setenv.h, if necessary, so that the PATH variable includes + the path to the newly built binaries. + + See the file configs/README.txt in the buildroot source tree. That has more + detailed PLUS some special instructions that you will need to follow if you are + building a Cortex-M3 toolchain for Cygwin under Windows. + +DFU and JTAG +============ + + Enbling Support for the DFU Bootloader + -------------------------------------- + The linker files in these projects can be configured to indicate that you + will be loading code using STMicro built-in USB Device Firmware Upgrade (DFU) + loader or via some JTAG emulator. You can specify the DFU bootloader by + adding the following line: + + CONFIG_STM32_DFU=y + + to your .config file. Most of the configurations in this directory are set + up to use the DFU loader. + + If CONFIG_STM32_DFU is defined, the code will not be positioned at the beginning + of FLASH (0x08000000) but will be offset to 0x08003000. This offset is needed + to make space for the DFU loader and 0x08003000 is where the DFU loader expects + to find new applications at boot time. If you need to change that origin for some + other bootloader, you will need to edit the file(s) ld.script.dfu for the + configuration. + + The DFU SE PC-based software is available from the STMicro website, + http://www.st.com. General usage instructions: + + 1. Convert the NuttX Intel Hex file (nuttx.hex) into a special DFU + file (nuttx.dfu)... see below for details. + 2. Connect the M3 Wildfire board to your computer using a USB + cable. + 3. Start the DFU loader on the M3 Wildfire board. You do this by + resetting the board while holding the "Key" button. Windows should + recognize that the DFU loader has been installed. + 3. Run the DFU SE program to load nuttx.dfu into FLASH. + + What if the DFU loader is not in FLASH? The loader code is available + inside of the Demo dirctory of the USBLib ZIP file that can be downloaded + from the STMicro Website. You can build it using RIDE (or other toolchains); + you will need a JTAG emulator to burn it into FLASH the first time. + + In order to use STMicro's built-in DFU loader, you will have to get + the NuttX binary into a special format with a .dfu extension. The + DFU SE PC_based software installation includes a file "DFU File Manager" + conversion program that a file in Intel Hex format to the special DFU + format. When you successfully build NuttX, you will find a file called + nutt.hex in the top-level directory. That is the file that you should + provide to the DFU File Manager. You will end up with a file called + nuttx.dfu that you can use with the STMicro DFU SE program. + + Enabling JTAG + ------------- + If you are not using the DFU, then you will probably also need to enable + JTAG support. By default, all JTAG support is disabled but there NuttX + configuration options to enable JTAG in various different ways. + + These configurations effect the setting of the SWJ_CFG[2:0] bits in the AFIO + MAPR register. These bits are used to configure the SWJ and trace alternate function I/Os. The SWJ (SerialWire JTAG) supports JTAG or SWD access to the + Cortex debug port. The default state in this port is for all JTAG support + to be disable. + + CONFIG_STM32_JTAG_FULL_ENABLE - sets SWJ_CFG[2:0] to 000 which enables full + SWJ (JTAG-DP + SW-DP) + + CONFIG_STM32_JTAG_NOJNTRST_ENABLE - sets SWJ_CFG[2:0] to 001 which enable + full SWJ (JTAG-DP + SW-DP) but without JNTRST. + + CONFIG_STM32_JTAG_SW_ENABLE - sets SWJ_CFG[2:0] to 010 which would set JTAG-DP + disabled and SW-DP enabled + + The default setting (none of the above defined) is SWJ_CFG[2:0] set to 100 + which disable JTAG-DP and SW-DP. + +OpenOCD +======= + +I have also used OpenOCD with the M3 Wildfire. In this case, I used +the Olimex USB ARM OCD. See the script in configs/fire-stm32v2/tools/oocd.sh +for more information. Using the script: + +1) Start the OpenOCD GDB server + + cd + configs/fire-stm32v2/tools/oocd.sh $PWD + +2) Load Nuttx + + cd + arm-none-eabi-gdb nuttx + gdb> target remote localhost:3333 + gdb> mon reset + gdb> mon halt + gdb> load nuttx + +3) Running NuttX + + gdb> mon reset + gdb> c + +LEDs +==== + +The M3 Wildfire has 3 LEDs labeled LED1, LED2 and LED3. These LEDs are not +used by the NuttX port unless CONFIG_ARCH_LEDS is defined. In that case, the +usage by the board port is defined in include/board.h and src/up_autoleds.c. +The LEDs are used to encode OS-related events as follows: + + /* LED1 LED2 LED3 */ + #define LED_STARTED 0 /* OFF OFF OFF */ + #define LED_HEAPALLOCATE 1 /* ON OFF OFF */ + #define LED_IRQSENABLED 2 /* OFF ON OFF */ + #define LED_STACKCREATED 3 /* OFF OFF OFF */ + + #define LED_INIRQ 4 /* NC NC ON (momentary) */ + #define LED_SIGNAL 5 /* NC NC ON (momentary) */ + #define LED_ASSERTION 6 /* NC NC ON (momentary) */ + #define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ + #undef LED_IDLE /* Sleep mode indication not supported */ + +RTC +=== + + The STM32 RTC may configured using the following settings. + + CONFIG_RTC - Enables general support for a hardware RTC. Specific + architectures may require other specific settings. + CONFIG_RTC_HIRES - The typical RTC keeps time to resolution of 1 + second, usually supporting a 32-bit time_t value. In this case, + the RTC is used to "seed" the normal NuttX timer and the + NuttX timer provides for higher resoution time. If CONFIG_RTC_HIRES + is enabled in the NuttX configuration, then the RTC provides higher + resolution time and completely replaces the system timer for purpose of + date and time. + CONFIG_RTC_FREQUENCY - If CONFIG_RTC_HIRES is defined, then the + frequency of the high resolution RTC must be provided. If CONFIG_RTC_HIRES + is not defined, CONFIG_RTC_FREQUENCY is assumed to be one. + CONFIG_RTC_ALARM - Enable if the RTC hardware supports setting of an alarm. + A callback function will be executed when the alarm goes off + + In hi-res mode, the STM32 RTC operates only at 16384Hz. Overflow interrupts + are handled when the 32-bit RTC counter overflows every 3 days and 43 minutes. + A BKP register is incremented on each overflow interrupt creating, effectively, + a 48-bit RTC counter. + + In the lo-res mode, the RTC operates at 1Hz. Overflow interrupts are not handled + (because the next overflow is not expected until the year 2106. + + WARNING: Overflow interrupts are lost whenever the STM32 is powered down. The + overflow interrupt may be lost even if the STM32 is powered down only momentarily. + Therefore hi-res solution is only useful in systems where the power is always on. + +M3 Wildfire-specific Configuration Options +============================================ + + CONFIG_ARCH - Identifies the arch/ subdirectory. This should + be set to: + + CONFIG_ARCH=arm + + CONFIG_ARCH_family - For use in C code: + + CONFIG_ARCH_ARM=y + + CONFIG_ARCH_architecture - For use in C code: + + CONFIG_ARCH_CORTEXM3=y + + CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory + + CONFIG_ARCH_CHIP=stm32 + + CONFIG_ARCH_CHIP_name - For use in C code to identify the exact + chip: + + CONFIG_ARCH_CHIP_STM32 + CONFIG_ARCH_CHIP_STM32F103VET6 + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock + configuration features. + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n + + CONFIG_ARCH_BOARD - Identifies the configs subdirectory and + hence, the board that supports the particular chip or SoC. + + CONFIG_ARCH_BOARD=fire-stm32v2 (for the M3 Wildfire development board) + + CONFIG_ARCH_BOARD_name - For use in C code + + CONFIG_ARCH_BOARD_FIRE_STM32V2=y + + CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation + of delay loops + + CONFIG_ENDIAN_BIG - define if big endian (default is little + endian) + + CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case): + + CONFIG_DRAM_SIZE=0x00010000 (64Kb) + + CONFIG_DRAM_START - The start address of installed DRAM + + CONFIG_DRAM_START=0x20000000 + + CONFIG_ARCH_IRQPRIO - The STM32F103Z supports interrupt prioritization + + CONFIG_ARCH_IRQPRIO=y + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that + have LEDs + + CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt + stack. If defined, this symbol is the size of the interrupt + stack in bytes. If not defined, the user task stacks will be + used during interrupt handling. + + CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture. + + CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that + cause a 100 second delay during boot-up. This 100 second delay + serves no purpose other than it allows you to calibratre + CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure + the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until + the delay actually is 100 seconds. + + Individual subsystems can be enabled: + AHB + --- + CONFIG_STM32_DMA1 + CONFIG_STM32_DMA2 + CONFIG_STM32_CRC + CONFIG_STM32_FSMC + CONFIG_STM32_SDIO + + APB1 + ---- + CONFIG_STM32_TIM2 + CONFIG_STM32_TIM3 + CONFIG_STM32_TIM4 + CONFIG_STM32_TIM5 + CONFIG_STM32_TIM6 + CONFIG_STM32_TIM7 + CONFIG_STM32_WWDG + CONFIG_STM32_IWDG + CONFIG_STM32_SPI2 + CONFIG_STM32_SPI4 + CONFIG_STM32_USART2 + CONFIG_STM32_USART3 + CONFIG_STM32_UART4 + CONFIG_STM32_UART5 + CONFIG_STM32_I2C1 + CONFIG_STM32_I2C2 + CONFIG_STM32_USB + CONFIG_STM32_CAN1 + CONFIG_STM32_BKP + CONFIG_STM32_PWR + CONFIG_STM32_DAC1 + CONFIG_STM32_DAC2 + CONFIG_STM32_USB + + APB2 + ---- + CONFIG_STM32_ADC1 + CONFIG_STM32_ADC2 + CONFIG_STM32_TIM1 + CONFIG_STM32_SPI1 + CONFIG_STM32_TIM8 + CONFIG_STM32_USART1 + CONFIG_STM32_ADC3 + + Timer and I2C devices may need to the following to force power to be applied + unconditionally at power up. (Otherwise, the device is powered when it is + initialized). + + CONFIG_STM32_FORCEPOWER + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn + is defined (as above) then the following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation, ADC conversion, + or DAC conversion. Note that ADC/DAC require two definition: Not only do you have + to assign the timer (n) for used by the ADC or DAC, but then you also have to + configure which ADC or DAC (m) it is assigned to. + + CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,8 + CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,8 + CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,8, m=1,..,3 + CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,8 + CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,8, m=1,..,2 + + For each timer that is enabled for PWM usage, we need the following additional + configuration settings: + + CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} + + NOTE: The STM32 timers are each capable of generating different signals on + each of the four channels with different duty cycles. That capability is + not supported by this driver: Only one output channel per timer. + + Alternate pin mappings. The M3 Wildfire board requires only CAN1 remapping + On the M3 Wildfire board pin PB9 is wired as TX and pin PB8 is wired as RX. + Which then makes the proper connection through the CAN transiver SN65HVD230 + out to the CAN D-type 9-pn male connector where pin 2 is CANL and pin 7 is CANH. + + CONFIG_STM32_TIM1_FULL_REMAP + CONFIG_STM32_TIM1_PARTIAL_REMAP + CONFIG_STM32_TIM2_FULL_REMAP + CONFIG_STM32_TIM2_PARTIAL_REMAP_1 + CONFIG_STM32_TIM2_PARTIAL_REMAP_2 + CONFIG_STM32_TIM3_FULL_REMAP + CONFIG_STM32_TIM3_PARTIAL_REMAP + CONFIG_STM32_TIM4_REMAP + CONFIG_STM32_USART1_REMAP + CONFIG_STM32_USART2_REMAP + CONFIG_STM32_USART3_FULL_REMAP + CONFIG_STM32_USART3_PARTIAL_REMAP + CONFIG_STM32_SPI1_REMAP + CONFIG_STM32_SPI3_REMAP + CONFIG_STM32_I2C1_REMAP + CONFIG_STM32_CAN1_REMAP1 + CONFIG_STM32_CAN1_REMAP2 + CONFIG_STM32_CAN2_REMAP + + JTAG Enable settings (by default JTAG-DP and SW-DP are disabled): + CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) + but without JNTRST. + CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled + + STM32F103Z specific device driver settings + + CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART + m (m=4,5) for the console and ttys0 (default is the USART1). + CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. + This specific the size of the receive buffer + CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before + being sent. This specific the size of the transmit buffer + CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be + CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_U[S]ARTn_2STOP - Two stop bits + + CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI + support. Non-interrupt-driven, poll-waiting is recommended if the + interrupt rate would be to high in the interrupt driven case. + CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. + Cannot be used with CONFIG_STM32_SPI_INTERRUPT. + + CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO + and CONFIG_STM32_DMA2. + CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 + CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. + Default: Medium + CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: + 4-bit transfer mode. + + M3 Wildfire CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default + Standard 11-bit IDs. + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback + mode for testing. The STM32 CAN driver does support loopback mode. + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 + CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 + CONFIG_CAN_REGDEBUG - If CONFIG_DEBUG is set, this will generate an + dump of all CAN registers. + + M3 Wildfire LCD Hardware Configuration + + CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" + support. Default is this 320x240 "landscape" orientation + (this setting is informative only... not used). + CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" + orientation support. In this orientation, the M3 Wildfire's + LCD ribbon cable is at the bottom of the display. Default is + 320x240 "landscape" orientation. + CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse + portrait" orientation support. In this orientation, the + M3 Wildfire's LCD ribbon cable is at the top of the display. + Default is 320x240 "landscape" orientation. + CONFIG_LCD_BACKLIGHT - Define to support a backlight. + CONFIG_LCD_PWM - If CONFIG_STM32_TIM1 is also defined, then an + adjustable backlight will be provided using timer 1 to generate + various pulse widthes. The granularity of the settings is + determined by CONFIG_LCD_MAXPOWER. If CONFIG_LCD_PWM (or + CONFIG_STM32_TIM1) is not defined, then a simple on/off backlight + is provided. + CONFIG_LCD_RDSHIFT - When reading 16-bit gram data, there appears + to be a shift in the returned data. This value fixes the offset. + Default 5. + + The LCD driver dynamically selects the LCD based on the reported LCD + ID value. However, code size can be reduced by suppressing support for + individual LCDs using: + + CONFIG_STM32_AM240320_DISABLE + CONFIG_STM32_SPFD5408B_DISABLE + CONFIG_STM32_R61580_DISABLE + +Configurations +============== + +Each M3 Wildfire configuration is maintained in a sudirectory and +can be selected as follow: + + cd tools + ./configure.sh fire-stm32v2/ + cd - + . ./setenv.sh + +Where is one of the following: + + nsh + --- + Configure the NuttShell (nsh) located at examples/nsh. The nsh configuration + contains support for some built-in applications that can be enabled by making + some additional minor change to the configuration file. diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index 50a3d2985a..441afc5bea 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -219,6 +219,14 @@ * 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen */ +#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP) +# error "SPI1 requires CONFIG_STM32_SPI1_REMAP=n" +#endif + +#if defined(CONFIG_STM32_I2C1) && defined(CONFIG_STM32_I2C1_REMAP) +# error "SPI1 requires CONFIG_STM32_I2C1_REMAP=n" +#endif + /* AT24C02 * * --- ------ -------------- ------------------------------------------------------------------- @@ -229,6 +237,10 @@ * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 */ +#if defined(CONFIG_STM32_I2C1) && defined(CONFIG_STM32_I2C1_REMAP) +# error "SPI1 requires CONFIG_STM32_I2C1_REMAP=n" +#endif + /* Potentiometer/ADC * * --- ------ -------------- ------------------------------------------------------------------- @@ -236,7 +248,7 @@ * --- ------ -------------- ------------------------------------------------------------------- * * 16 PC1 PC1/ADC123-IN11 Potentiometer (R16) - * 24 PA1 PC1/ADC123-IN11 + * 24 PA1 PC1/ADC123-IN1 */ /* USARTs @@ -245,12 +257,20 @@ * PIN NAME SIGNAL NOTES * --- ------ -------------- ------------------------------------------------------------------- * - * 25 PA2 PA2-US2-TX MAX3232, DB9 D7 - * 26 PA3 PA3-US2-RX MAX3232, DB9 D7 - * 68 PA9 PA9-US1-TX MAX3232, DB9 D8 - * 69 PA10 PA10-US1-RX MAX3232, DB9 D8 + * 68 PA9 PA9-US1-TX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP + * 69 PA10 PA10-US1-RX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP + * 25 PA2 PA2-US2-TX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP + * 26 PA3 PA3-US2-RX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP */ +#if defined(CONFIG_STM32_USART1) && !defined(CONFIG_STM32_USART1_REMAP) +# errror "USART1 requires CONFIG_STM32_USART1_REMAP=y" +#endif + +#if defined(CONFIG_STM32_USART2) && defined() +# errror "USART2 requires CONFIG_STM32_USART2_REMAP=n" +#endif + /* ENC28J60 * * --- ------ -------------- ------------------------------------------------------------------- @@ -260,6 +280,10 @@ * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH */ +#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP) +# error "SPI1 requires CONFIG_STM32_SPI1_REMAP=n" +#endif + /* MP3 * * --- ------ -------------- ------------------------------------------------------------------- @@ -299,6 +323,10 @@ * 96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H */ +#if defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN1_REMAP1) +# error "SPI1 requires CONFIG_STM32_CAN1_REMAP1=y" +#endif + /************************************************************************************ * Public Data ************************************************************************************/ diff --git a/nuttx/configs/fire-stm32v2/nsh/Make.defs b/nuttx/configs/fire-stm32v2/nsh/Make.defs new file mode 100644 index 0000000000..cbe3b08c8f --- /dev/null +++ b/nuttx/configs/fire-stm32v2/nsh/Make.defs @@ -0,0 +1,196 @@ +############################################################################ +# configs/fire-stm32v2/nsh/Make.defs +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk + +# Setup for the selected toolchain + +ifeq ($(CONFIG_STM32_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = arm-atollic-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + ARCROSSDEV = arm-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_RAISONANCE),y) + # Raisonance RIDE7 under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + ARCROSSDEV = arm-elf- + ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + MAXOPTIMIZATION = -Os +endif + +# Pick the linker script + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = ld.script.dfu +else + LDSCRIPT = ld.script +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" + MAXOPTIMIZATION = -O2 +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") + ARCHOPTIMIZATION = -g +else + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +define PREPROCESS + @echo "CPP: $1->$2" + @$(CPP) $(CPPFLAGS) $1 -o $2 +endef + +define COMPILE + @echo "CC: $1" + @$(CC) -c $(CFLAGS) $1 -o $2 +endef + +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + +define ASSEMBLE + @echo "AS: $1" + @$(CC) -c $(AFLAGS) $1 -o $2 +endef + +define ARCHIVE + echo "AR: $2"; \ + $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } +endef + +define CLEAN + @rm -f *.o *.a +endef + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe +HOSTLDFLAGS = + diff --git a/nuttx/configs/fire-stm32v2/nsh/setenv.sh b/nuttx/configs/fire-stm32v2/nsh/setenv.sh new file mode 100755 index 0000000000..e6f4ee2e0e --- /dev/null +++ b/nuttx/configs/fire-stm32v2/nsh/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/fire-stm32v2/nsh/setenv.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the RIDE +# toolchain under windows. You will also have to edit this if you install +# the RIDE toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# This is the path to the tools/ subdirectory +export TOOLS_DIR="${WD}/configs/fire-stm32v2/tools" + +# Add the path to the toolchain to the PATH variable +export PATH="${TOOLCHAIN_BIN}:${TOOLS_DIR}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/nuttx/configs/fire-stm32v2/scripts/ld.script b/nuttx/configs/fire-stm32v2/scripts/ld.script new file mode 100644 index 0000000000..443dec50d8 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/scripts/ld.script @@ -0,0 +1,112 @@ +/**************************************************************************** + * configs/fire-stm32v2/scripts/ld.script + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* The STM32F103VET6 has 512Kb of FLASH beginning at address 0x0800:0000 and + * 64Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH, + * FLASH memory is aliased to address 0x0000:0000 where the code expects to + * begin execution by jumping to the entry point in the 0x0800:0000 address + * range. + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); + + /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .ARM.extab : { + *(.ARM.extab*) + } >sram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } >sram + __exidx_end = ABSOLUTE(.); + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/nuttx/configs/fire-stm32v2/scripts/ld.script.dfu b/nuttx/configs/fire-stm32v2/scripts/ld.script.dfu new file mode 100644 index 0000000000..c7add1422c --- /dev/null +++ b/nuttx/configs/fire-stm32v2/scripts/ld.script.dfu @@ -0,0 +1,111 @@ +/**************************************************************************** + * configs/fire-stm32v2/scripts/ld.script.dfu + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* The STM32F103VET6 has 512Kb of FLASH beginning at address 0x0800:0000 and + * 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the + * STM3210E-EVAL's DFU bootloader is being used. In that case, the corrct + * load .text load address is 0x08003000 (leaving 464Kb). + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08003000, LENGTH = 464K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); + + /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .ARM.extab : { + *(.ARM.extab*) + } >sram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } >sram + __exidx_end = ABSOLUTE(.); + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} From 2b424e0424b403fa82f07cc372267645d7701edf Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Sep 2012 22:24:52 +0000 Subject: [PATCH 43/95] Some error handling bugs noted by Ronen Vainish git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5122 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 5 +++++ nuttx/drivers/mmcsd/mmcsd_sdio.c | 4 +++- nuttx/fs/fs_fdopen.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 6f899a7ab8..3ab4302ab6 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3300,4 +3300,9 @@ but tested has been deferred until I get the right tools. * arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h: Add support for the STM32F103VET6. + * fs/fs_fdopen.c: Bad check for failure to allocate memory. (Noted + by Ronen Vainish). + * drivers/mmcsd/mmcsd_sdio.c: If the MMC/SD driver were ever + uninitialized then there would be a double release of memory + (Noted by Ronen Vainish). diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c index 90c73261a2..d0bc6659cb 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.c +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c @@ -3171,7 +3171,9 @@ errout_with_buffers: rwb_uninitialize(&priv->rwbuffer); errout_with_hwinit: #endif - mmcsd_hwuninitialize(priv); + mmcsd_hwuninitialize(priv); /* This will free the private data structure */ + return ret; + errout_with_alloc: kfree(priv); return ret; diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c index ee6440bf5f..fd6aa88a8f 100644 --- a/nuttx/fs/fs_fdopen.c +++ b/nuttx/fs/fs_fdopen.c @@ -220,7 +220,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) /* Allocate the IO buffer */ stream->fs_bufstart = kmalloc(CONFIG_STDIO_BUFFER_SIZE); - if (!stream) + if (!stream->fs_bufstart) { err = ENOMEM; goto errout_with_sem; From 2d556705e5acab152b5028a35558a9aaa1de9e13 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 10 Sep 2012 16:48:45 +0000 Subject: [PATCH 44/95] More logic for the MX3 Wildfire board git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5123 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/fire-stm32v2/README.txt | 12 +- nuttx/configs/fire-stm32v2/include/board.h | 34 +- nuttx/configs/fire-stm32v2/src/Makefile | 127 ++++++ .../configs/fire-stm32v2/src/fire-internal.h | 71 +++- nuttx/configs/fire-stm32v2/src/up_autoleds.c | 386 ++++++++++++++++++ nuttx/configs/fire-stm32v2/src/up_boot.c | 102 +++++ nuttx/configs/fire-stm32v2/src/up_buttons.c | 161 ++++++++ nuttx/configs/fire-stm32v2/src/up_enc28j60.c | 210 ++++++++++ nuttx/configs/fire-stm32v2/src/up_selectlcd.c | 210 ++++++++++ nuttx/configs/fire-stm32v2/src/up_spi.c | 215 ++++++++++ nuttx/configs/fire-stm32v2/src/up_userleds.c | 129 ++++++ .../configs/olimex-strp711/src/up_enc28j60.c | 41 +- nuttx/configs/shenzhou/src/up_buttons.c | 2 +- nuttx/configs/stm3210e-eval/src/up_spi.c | 8 +- nuttx/drivers/net/enc28j60.c | 41 +- nuttx/include/nuttx/net/enc28j60.h | 25 +- 16 files changed, 1726 insertions(+), 48 deletions(-) create mode 100644 nuttx/configs/fire-stm32v2/src/Makefile create mode 100644 nuttx/configs/fire-stm32v2/src/up_autoleds.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_boot.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_buttons.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_enc28j60.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_selectlcd.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_spi.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_userleds.c diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index c278be4d61..f66c0bb739 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -28,10 +28,10 @@ PIN NAME SIGNAL NOTES 1 PE2 PE2-C-RCLK Camera (P9) 2 PE3 PE3-USB-M USB2.0 3 PE4 PE4-BEEP LS1 Bell -4 PE5 +4 PE5 (no name) 10Mbps ENC28J60 Interrupt 5 PE6 6 VBAT BT1 Battery (BT1) -7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen +7 PC13 Header 7X2 8 PC14 PC14/OSC32-IN Y2 32.768KHz 9 PC15 PC15/OSC32-OUT Y2 32.768KHz 10 VSS_5 DGND @@ -449,10 +449,10 @@ The LEDs are used to encode OS-related events as follows: #define LED_IRQSENABLED 2 /* OFF ON OFF */ #define LED_STACKCREATED 3 /* OFF OFF OFF */ - #define LED_INIRQ 4 /* NC NC ON (momentary) */ - #define LED_SIGNAL 5 /* NC NC ON (momentary) */ - #define LED_ASSERTION 6 /* NC NC ON (momentary) */ - #define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ + #define LED_INIRQ 4 /* NC NC ON (momentary) */ + #define LED_SIGNAL 5 /* NC NC ON (momentary) */ + #define LED_ASSERTION 6 /* NC NC ON (momentary) */ + #define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ #undef LED_IDLE /* Sleep mode indication not supported */ RTC diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index 441afc5bea..ea2f93960d 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -149,17 +149,17 @@ * used by the NuttX port unless CONFIG_ARCH_LEDS is defined. In that case, the * usage by the board port is defined in include/board.h and src/up_autoleds.c. * The LEDs are used to encode OS-related events as follows: - *. + */ /* LED1 LED2 LED3 */ #define LED_STARTED 0 /* OFF OFF OFF */ #define LED_HEAPALLOCATE 1 /* ON OFF OFF */ #define LED_IRQSENABLED 2 /* OFF ON OFF */ #define LED_STACKCREATED 3 /* OFF OFF OFF */ -#define LED_INIRQ 4 /* NC NC ON (momentary) */ -#define LED_SIGNAL 5 /* NC NC ON (momentary) */ -#define LED_ASSERTION 6 /* NC NC ON (momentary) */ -#define LED_PANIC 7 /* NC NC ON (2Hz flashing) */ +#define LED_INIRQ 4 /* NC NC ON (momentary) */ +#define LED_SIGNAL 4 /* NC NC ON (momentary) */ +#define LED_ASSERTION 4 /* NC NC ON (momentary) */ +#define LED_PANIC 4 /* NC NC ON (2Hz flashing) */ #undef LED_IDLE /* Sleep mode indication not supported */ /* The M3 Wildfire supports several two user buttons: KEY1 and KEY2 */ @@ -194,7 +194,6 @@ * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 - * 7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen * 82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen * 85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen @@ -207,7 +206,7 @@ * 60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen * 61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen * 62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen - * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen, 10Mbit EN28J60 Reset * 38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen * 39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen * 40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen @@ -271,6 +270,22 @@ # errror "USART2 requires CONFIG_STM32_USART2_REMAP=n" #endif +/* 2MBit SPI FLASH + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + */ + +#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP) +# error "SPI1 requires CONFIG_STM32_SPI1_REMAP=n" +#endif + /* ENC28J60 * * --- ------ -------------- ------------------------------------------------------------------- @@ -278,6 +293,11 @@ * --- ------ -------------- ------------------------------------------------------------------- * * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen, 10Mbit EN28J60 Reset + * 4 PE5 (no name) 10Mbps ENC28J60 Interrupt */ #if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP) diff --git a/nuttx/configs/fire-stm32v2/src/Makefile b/nuttx/configs/fire-stm32v2/src/Makefile new file mode 100644 index 0000000000..46e99d73a6 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/Makefile @@ -0,0 +1,127 @@ +############################################################################ +# configs/fire-stm32v2/src/Makefile +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +CFLAGS += -I$(TOPDIR)/sched + +ASRCS = +AOBJS = $(ASRCS:.S=$(OBJEXT)) + +CSRCS = up_boot.c up_spi.c up_usbdev.c + +ifeq ($(CONFIG_STM32_FSMC),y) +CSRCS += up_lcd.c up_selectlcd.c +endif + +ifeq ($(CONFIG_HAVE_CXX),y) +CSRCS += up_cxxinitialize.c +endif + +ifeq ($(CONFIG_ARCH_LEDS),y) +CSRCS += up_autoleds.c +else +CSRCS += up_userleds.c +endif + +ifeq ($(CONFIG_NET_ENC28J60),y) +CSRCS += up_enc28j60.c +endif + +ifeq ($(CONFIG_ARCH_BUTTONS),y) +CSRCS += up_buttons.c +endif + +ifeq ($(CONFIG_NSH_ARCHINIT),y) +CSRCS += up_nsh.c +endif + +ifeq ($(CONFIG_USBMSC),y) +CSRCS += up_usbmsc.c +endif + +ifeq ($(CONFIG_USBDEV_COMPOSITE),y) +CSRCS += up_composite.c +endif + +ifeq ($(CONFIG_CAN),y) +CSRCS += up_can.c +endif + +ifeq ($(CONFIG_WATCHDOG),y) +CSRCS += up_watchdog.c +endif + +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src +ifeq ($(WINTOOL),y) + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}" +else + CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m +endif + +all: libboard$(LIBEXT) + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +libboard$(LIBEXT): $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $@, $${obj}); \ + done ; ) + +.depend: Makefile $(SRCS) + @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f libboard$(LIBEXT) *~ .*.swp + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index b3d6e145b6..4a844c4efc 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -113,7 +113,6 @@ * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 - * 7 PC13 PD13_LCD_LIGHT 2.4" TFT + Touchscreen * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen * 82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen * 85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen @@ -139,7 +138,9 @@ */ #define GPIO_LCD_BACKLIGHT (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ - GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13) + GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13) + +/* GPIO_LCD_CS - Is there some kind of chip select for SPI1? */ /* LEDs * @@ -174,9 +175,71 @@ #define NUM_IRQBUTTONS (MAX_IRQBUTTON - MIN_IRQBUTTON + 1) #define GPIO_BTN_KEY1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ - GPIO_PORTB|GPIO_PIN0) + GPIO_EXTI|GPIO_PORTB|GPIO_PIN0) #define GPIO_BTN_KEY2 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ - GPIO_PORTB|GPIO_PIN1) + GPIO_EXTI|GPIO_PORTB|GPIO_PIN1) + +/* 2MBit SPI FLASH + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + */ + +#ifndef CONFIG_NET_ENC28J60 +# define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) +#endif + +/* ENC28J60 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen, 10Mbit EN28J60 Reset + * 4 PE5 (no name) 10Mbps ENC28J60 Interrupt + */ + +#if defined(CONFIG_STM32_FSMC) && defined(CONFIG_NET_ENC28J60) +# warning "TFT LCD and ENCJ2860 shared PE1" +#endif + +#ifdef CONFIG_NET_ENC28J60 +# define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) +# define GPIO_ENC28J60_RESET (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN1) +# define GPIO_ENC28J60_INTR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ + GPIO_EXTI|GPIO_PORTE|GPIO_PIN5) +#endif + +/* MP3 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 48 PB11 PB11-MP3-RST MP3 + * 51 PB12 PB12-SPI2-NSS MP3 + * 52 PB13 PB13-SPI2-SCK MP3 + * 53 PB14 PB14-SPI2-MISO MP3 + * 54 PB15 PB15-SPI2-MOSI MP3 + * 63 PC6 PC6-MP3-XDCS MP3 + * 64 PC7 PC7-MP3-DREQ MP3 + */ + +#define GPIO_MP3_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN6) /************************************************************************************ * Public Types diff --git a/nuttx/configs/fire-stm32v2/src/up_autoleds.c b/nuttx/configs/fire-stm32v2/src/up_autoleds.c new file mode 100644 index 0000000000..088d0b14de --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_autoleds.c @@ -0,0 +1,386 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_autoleds.c + * arch/arm/src/board/up_autoleds.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32_internal.h" +#include "fire-internal.h" + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG with + * CONFIG_DEBUG_VERBOSE too) + */ + +#undef LED_DEBUG /* Define to enable debug */ + +#ifdef LED_DEBUG +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/* The following definitions map the encoded LED setting to GPIO settings. + * + * OFFBITS ONBITS + * CLR SET CLR SET + * 210 210 210 210 + */ + +#define FIRE_LED1 (1 << 0) +#define FIRE_LED2 (1 << 1) +#define FIRE_LED3 (1 << 2) + +#define ON_SETBITS_SHIFT (0) +#define ON_CLRBITS_SHIFT (3) +#define OFF_SETBITS_SHIFT (6) +#define OFF_CLRBITS_SHIFT (9) + +#define ON_BITS(v) ((v) & 0x3f) +#define OFF_BITS(v) (((v) >> 6) & 0x03f) +#define SETBITS(b) ((b) & 0x07) +#define CLRBITS(b) (((b) >> 3) & 0x07) + +#define ON_SETBITS(v) (SETBITS(ON_BITS(v)) +#define ON_CLRBITS(v) (CLRBITS(ON_BITS(v)) +#define OFF_SETBITS(v) (SETBITS(OFF_BITS(v)) +#define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v)) + +/* ON OFF + * -------------------------- -- ------------------ ----------------- + * LED1 LED2 LED3 LED1 LED2 LED3 + * -------------------------- -- ------ ----- ----- ----- ----- ----- + * LED_STARTED 0 OFF OFF OFF OFF OFF OFF + * LED_HEAPALLOCATE 1 ON OFF OFF OFF OFF OFF + * LED_IRQSENABLED 2 OFF ON OFF ON OFF OFF + * LED_STACKCREATED 3 OFF OFF OFF OFF ON OFF + * + * LED_INIRQ 4 NC NC ON NC NC OFF + * LED_SIGNAL 4 NC NC ON NC NC OFF + * LED_ASSERTION 4 NC NC ON NC NC OFF + * LED_PANIC 4 NC NC ON NC NC OFF + * -------------------------- -- ------ ----- ----- ----- ----- ----- + */ + +#define LED_STARTED_ON_SETBITS (0) +#define LED_STARTED_ON_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) +#define LED_STARTED_OFF_SETBITS LED_STARTED_ON_SETBITS +#define LED_STARTED_OFF_CLRBITS LED_STARTED_ON_CLRBITS + +#define LED_HEAPALLOCATE_ON_SETBITS ((FIRE_LED1) << ON_SETBITS_SHIFT) +#define LED_HEAPALLOCATE_ON_CLRBITS ((FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) +#define LED_HEAPALLOCATE_OFF_SETBITS LED_STARTED_ON_SETBITS +#define LED_HEAPALLOCATE_OFF_CLRBITS LED_STARTED_ON_CLRBITS + +#define LED_IRQSENABLED_ON_SETBITS ((FIRE_LED2) << ON_SETBITS_SHIFT) +#define LED_IRQSENABLED_ON_CLRBITS ((FIRE_LED1|FIRE_LED3) << ON_CLRBITS_SHIFT) +#define LED_IRQSENABLED_OFF_SETBITS LED_HEAPALLOCATE_ON_SETBITS +#define LED_IRQSENABLED_OFF_CLRBITS LED_HEAPALLOCATE_ON_CLRBITS + +#define LED_STACKCREATED_ON_SETBITS (0) +#define LED_STACKCREATED_ON_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) +#define LED_STACKCREATED_OFF_SETBITS LED_IRQSENABLED_ON_SETBITS +#define LED_STACKCREATED_OFF_CLRBITS LED_IRQSENABLED_ON_CLRBITS + +#define LED_FLASH_ON_SETBITS ((FIRE_LED3) << ON_SETBITS_SHIFT) +#define LED_FLASH_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) +#define LED_FLASH_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) +#define LED_FLASH_OFF_CLRBITS ((FIRE_LED3) << OFF_CLRBITS_SHIFT) + +/************************************************************************************** + * Private Function Protototypes + **************************************************************************************/ + +/* LED State Controls */ + +static inline void led_clrbits(unsigned int clrbits); +static inline void led_setbits(unsigned int setbits); +static void led_setonoff(unsigned int bits); + +/* LED Power Management */ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const uint16_t g_ledbits[8] = +{ + (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + + (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + + (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + + (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + + (LED_FLASH_ON_SETBITS | LED_FLASH_ON_CLRBITS | + LED_FLASH_OFF_SETBITS | LED_FLASH_OFF_CLRBITS) +}; + +#ifdef CONFIG_PM +static struct pm_callback_s g_ledscb = +{ + .notify = led_pm_notify, + .prepare = led_pm_prepare, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: led_clrbits + * + * Description: + * Clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_clrbits(unsigned int clrbits) +{ + if ((clrbits & FIRE_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, false); + } + + if ((clrbits & FIRE_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, false); + } + + if ((clrbits & FIRE_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, false); + } +} + +/**************************************************************************** + * Name: led_setbits + * + * Description: + * Set all LEDs to the bit encoded state + * + ****************************************************************************/ + +static inline void led_setbits(unsigned int setbits) +{ + if ((setbits & FIRE_LED1) != 0) + { + stm32_gpiowrite(GPIO_LED1, true); + } + + if ((setbits & FIRE_LED2) != 0) + { + stm32_gpiowrite(GPIO_LED2, true); + } + + if ((setbits & FIRE_LED3) != 0) + { + stm32_gpiowrite(GPIO_LED3, true); + } +} + +/**************************************************************************** + * Name: led_setonoff + * + * Description: + * Set/clear all LEDs to the bit encoded state + * + ****************************************************************************/ + +static void led_setonoff(unsigned int bits) +{ + led_clrbits(CLRBITS(bits)); + led_setbits(SETBITS(bits)); +} + +/**************************************************************************** + * Name: led_pm_notify + * + * Description: + * Notify the driver of new power state. This callback is called after + * all drivers have had the opportunity to prepare for the new power state. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + switch (pmstate) + { + case(PM_NORMAL): + { + /* Restore normal LEDs operation */ + + } + break; + + case(PM_IDLE): + { + /* Entering IDLE mode - Turn leds off */ + + } + break; + + case(PM_STANDBY): + { + /* Entering STANDBY mode - Logic for PM_STANDBY goes here */ + + } + break; + + case(PM_SLEEP): + { + /* Entering SLEEP mode - Logic for PM_SLEEP goes here */ + + } + break; + + default: + { + /* Should not get here */ + + } + break; + } +} +#endif + +/**************************************************************************** + * Name: led_pm_prepare + * + * Description: + * Request the driver to prepare for a new power state. This is a warning + * that the system is about to enter into a new power state. The driver + * should begin whatever operations that may be required to enter power + * state. The driver may abort the state change mode by returning a + * non-zero value from the callback function. + * + ****************************************************************************/ + +#ifdef CONFIG_PM +static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +{ + /* No preparation to change power modes is required by the LEDs driver. + * We always accept the state change by returning OK. + */ + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_ledinit + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void up_ledinit(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); +} + +/**************************************************************************** + * Name: up_ledon + ****************************************************************************/ + +void up_ledon(int led) +{ + led_setonoff(ON_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledoff + ****************************************************************************/ + +void up_ledoff(int led) +{ + led_setonoff(OFF_BITS(g_ledbits[led])); +} + +/**************************************************************************** + * Name: up_ledpminitialize + ****************************************************************************/ + +#ifdef CONFIG_PM +void up_ledpminitialize(void) +{ + /* Register to receive power management callbacks */ + + int ret = pm_register(&g_ledscb); + if (ret != OK) + { + up_ledon(LED_ASSERTION); + } +} +#endif /* CONFIG_PM */ + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/fire-stm32v2/src/up_boot.c b/nuttx/configs/fire-stm32v2/src/up_boot.c new file mode 100644 index 0000000000..bb87afcdff --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_boot.c @@ -0,0 +1,102 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "fire-internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function + * stm32_spiinitialize() has been brought into the link. + */ + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) + if (stm32_spiinitialize) + { + stm32_spiinitialize(); + } +#endif + + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) + if (stm32_usbinitialize) + { + stm32_usbinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/fire-stm32v2/src/up_buttons.c b/nuttx/configs/fire-stm32v2/src/up_buttons.c new file mode 100644 index 0000000000..e0f500b779 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_buttons.c @@ -0,0 +1,161 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_buttons.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include "fire-internal.h" + +#ifdef CONFIG_ARCH_BUTTONS + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ +/* Pin configuration for each Shenzhou button. This array is indexed by + * the BUTTON_* definitions in board.h + */ + +static const uint16_t g_buttons[NUM_BUTTONS] = +{ + GPIO_BTN_KEY1, GPIO_BTN_KEY1 +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_buttoninit + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + ****************************************************************************/ + +void up_buttoninit(void) +{ + /* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are + * configured for some pins but NOT used in this file + */ + + stm32_configgpio(GPIO_BTN_KEY1); + stm32_configgpio(GPIO_BTN_KEY2); +} + +/**************************************************************************** + * Name: up_buttons + ****************************************************************************/ + +uint8_t up_buttons(void) +{ + uint8_t ret = 0; + + /* Check that state of each key. A LOW value means that the key is pressed, */ + + if (!stm32_gpioread(GPIO_BTN_KEY1)) + { + ret |= BUTTON_KEY1_BIT; + } + + if (!stm32_gpioread(GPIO_BTN_KEY2)) + { + ret |= BUTTON_KEY2_BIT; + } + + return ret; +} + +/************************************************************************************ + * Button support. + * + * Description: + * up_buttoninit() must be called to initialize button resources. After + * that, up_buttons() may be called to collect the current state of all + * buttons or up_irqbutton() may be called to register button interrupt + * handlers. + * + * After up_buttoninit() has been called, up_buttons() may be called to + * collect the state of all buttons. up_buttons() returns an 8-bit bit set + * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT + * definitions in board.h for the meaning of each bit. + * + * up_irqbutton() may be called to register an interrupt handler that will + * be called when a button is depressed or released. The ID value is a + * button enumeration value that uniquely identifies a button resource. See the + * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration + * value. The previous interrupt handler address is returned (so that it may + * restored, if so desired). + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_IRQBUTTONS +xcpt_t up_irqbutton(int id, xcpt_t irqhandler) +{ + uint16_t gpio; + + if (id == BUTTON_KEY1) + { + gpio = GPIO_KEY1; + } + else if (id == BUTTON_KEY2) + { + gpio = GPIO_KEY2; + } + else + { + return NULL; + } + + return stm32_gpiosetevent(gpio, true, true, true, irqhandler); +} +#endif +#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/nuttx/configs/fire-stm32v2/src/up_enc28j60.c b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c new file mode 100644 index 0000000000..8f67496c56 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c @@ -0,0 +1,210 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_enc28j60.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* 2MBit SPI FLASH OR ENC28J60 + * + * --- ------ -------------- ----------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ----------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "fire_internal.h" + +#ifdef CONFIG_NET_ENC28J60 + +/**************************************************************************** + * Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ +/* ENC28J60 + * + * --- ------ -------------- ----------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ----------------------------------------------------- + * + * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen, 10Mbit EN28J60 Reset + * 4 PE5 (no name) 10Mbps ENC28J60 Interrupt + */ + +/* ENC28J60 is on SPI1 */ + +#ifndef CONFIG_STM32_SPI1 +# error "Need CONFIG_STM32_SPI1 in the configuration" +#endif + +/* SPI Assumptions **********************************************************/ + +#define ENC28J60_SPI_PORTNO 1 /* On SPI1 */ +#define ENC28J60_DEVNO 0 /* Only one ENC28J60 */ + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct stm32_lower_s +{ + const struct enc_lower_s lower; /* Low-level MCU interface */ + xcpt_t handler; /* ENC28J60 interrupt handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler); +static void up_enable(FAR struct enc_lower_s *lower); +static void up_disable(FAR struct enc_lower_s *lower); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* The ENC28J60 normal provides interrupts to the MCU via a GPIO pin. The + * following structure provides an MCU-independent mechanixm for controlling + * the ENC28J60 GPIO interrupt. + */ + +static const struct enc_lower_s g_enclower = +{ + { + .attach = up_attach, + .enable = up_enable, + .disable = up_disable + } +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: struct enc_lower_s methods + ****************************************************************************/ + +static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler) +{ + FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + + /* Just save the handler for use when the interrupt is enabled */ + + priv-handler = handler; + return OK; +} + +static void up_enable(FAR struct enc_lower_s *lower) +{ + FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + + DEBUGASSERT(priv->handler); + (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, priv-handler); +} + +static void up_disable(FAR struct enc_lower_s *lower) +{ + (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, NULL); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_netinitialize + ****************************************************************************/ + +void up_netinitialize(void) +{ + FAR struct spi_dev_s *spi; + uint16_t reg16; + int ret; + + /* Assumptions: + * 1) ENC28J60 pins were configured in up_spi.c early in the boot-up phase. + * 2) Clocking for the SPI1 peripheral was also provided earlier in boot-up. + */ + + spi = up_spiinitialize(ENC28J60_SPI_PORTNO); + if (!spi) + { + nlldbg("Failed to initialize SPI port %d\n", ENC28J60_SPI_PORTNO); + return; + } + + /* Take ENC28J60 out of reset (active low)*/ + + stm32_gpiowrite(GPIO_ENC28J60_RESET, true); + + /* Bind the SPI port to the ENC28J60 driver */ + + ret = enc_initialize(spi, ENC28J60_DEVNO, &g_enclower); + if (ret < 0) + { + nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", + ENC28J60_SPI_PORTNO, ENC28J60_DEVNO, ret); + return; + } + + nllvdbg("Bound SPI port %d to ENC28J60 device %d\n", + ENC28J60_SPI_PORTNO, ENC28J60_DEVNO); +} + +#endif /* CONFIG_NET_ENC28J60 */ diff --git a/nuttx/configs/fire-stm32v2/src/up_selectlcd.c b/nuttx/configs/fire-stm32v2/src/up_selectlcd.c new file mode 100644 index 0000000000..99d18cd277 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_selectlcd.c @@ -0,0 +1,210 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/up_selectlcd.c + * arch/arm/src/board/up_selectlcd.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include + +#include "chip.h" +#include "up_arch.h" + +#include "stm32_fsmc.h" +#include "stm32_gpio.h" +#include "stm32_internal.h" +#include "fire-internal.h" + +#ifdef CONFIG_STM32_FSMC + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#ifndef CONFIG_STM32_FSMC +# warning "FSMC is not enabled" +#endif + +#if STM32_NGPIO_PORTS < 6 +# error "Required GPIO ports not enabled" +#endif + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/* 2.4" TFT + Touchscreen. FSMC Bank1 + * + * --- ------ -------------- ------------------------------------------------------------------- + * PIN NAME SIGNAL NOTES + * --- ------ -------------- ------------------------------------------------------------------- + * + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 + * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 + * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen + * 82 PD1 PD1-FSMC_D3 2.4" TFT + Touchscreen + * 85 PD4 PD4-FSMC_NOE 2.4" TFT + Touchscreen + * 86 PD5 PD5-FSMC_NWE 2.4" TFT + Touchscreen + * 88 PD7 PD7-FSMC_NE1 2.4" TFT + Touchscreen + * 55 PD8 PD8-FSMC_D13 2.4" TFT + Touchscreen + * 56 PD9 PD9-FSMC_D14 2.4" TFT + Touchscreen + * 57 PD10 PD10-FSMC_D15 2.4" TFT + Touchscreen + * 58 PD11 PD11-FSMC_A16 2.4" TFT + Touchscreen + * 60 PD13 PD13-LCD/LIGHT 2.4" TFT + Touchscreen + * 61 PD14 PD14-FSMC_D0 2.4" TFT + Touchscreen + * 62 PD15 PD15-FSMC_D1 2.4" TFT + Touchscreen + * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen + * 38 PE7 PE7-FSMC_D4 2.4" TFT + Touchscreen + * 39 PE8 PE8-FSMC_D5 2.4" TFT + Touchscreen + * 40 PE9 PE9-FSMC_D6 2.4" TFT + Touchscreen + * 41 PE10 PE10-FSMC_D7 2.4" TFT + Touchscreen + * 42 PE11 PE11-FSMC_D8 2.4" TFT + Touchscreen + * 43 PE12 PE12-FSMC_D9 2.4" TFT + Touchscreen + * 44 PE13 PE13-FSMC_D10 2.4" TFT + Touchscreen + * 45 PE14 PE14-FSMC_D11 2.4" TFT + Touchscreen + * 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen + * + * NOTE: SPI and I2C pin configuration is controlled in the SPI and I2C drivers, respectively. + */ + +static const uint16_t g_lcdconfig[NCOMMON_CONFIG] = +{ + /* Address Lines: A16 only */ + + GPIO_NPS_A16, + + /* Data Lines: D0... D15 */ + + GPIO_NPS_D0, GPIO_NPS_D1, GPIO_NPS_D2, GPIO_NPS_D3, + GPIO_NPS_D4, GPIO_NPS_D5, GPIO_NPS_D6, GPIO_NPS_D7, + GPIO_NPS_D8, GPIO_NPS_D9, GPIO_NPS_D10, GPIO_NPS_D11, + GPIO_NPS_D12, GPIO_NPS_D13, GPIO_NPS_D14, GPIO_NPS_D15, + + /* NOE, NWE, NE1, NBL1 */ + + GPIO_NPS_NOE, GPIO_NPS_NWE, GPIO_NPS_NE1, GPIO_NPS_NBL1, + + /* Backlight GPIO */ + + GPIO_LCD_BACKLIGHT +}; +#define NLCD_CONFIG (sizeof(g_lcdconfig) / sizeof(uint16_t)) + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_enablefsmc + * + * Description: + * Enable clocking to the FSMC module + * + ************************************************************************************/ + +static inline void stm32_enablefsmc(void) +{ + uint32_t regval; + + /* Enable AHB clocking to the FSMC */ + + regval = getreg32( STM32_RCC_AHBENR); + regval |= RCC_AHBENR_FSMCEN; + putreg32(regval, STM32_RCC_AHBENR); +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_selectlcd + * + * Description: + * Initialize to the LCD pin configuration. + * + ************************************************************************************/ + +void stm32_selectlcd(void) +{ + irqstate_t flags; + int i; + + /* Configure LCD GPIO pis */ + + flags = irqsave(); + for (i = 0; i < NLCD_GPIOS; i++) + { + stm32_configgpio(g_lcdconfig[i]); + } + + /* Enable AHB clocking to the FSMC */ + + stm32_enablefsmc(); + + /* Bank1 NOR/SRAM control register configuration */ + + putreg32(FSMC_BCR_SRAM | FSMC_BCR_MWID16 | FSMC_BCR_WREN, STM32_FSMC_BCR1); + + /* Bank1 NOR/SRAM timing register configuration */ + + putreg32(FSMC_BTR_ADDSET(1)|FSMC_BTR_ADDHLD(0)|FSMC_BTR_DATAST(2)|FSMC_BTR_BUSTRUN(0)| + FSMC_BTR_CLKDIV(0)|FSMC_BTR_DATLAT(0)|FSMC_BTR_ACCMODA, STM32_FSMC_BTR1); + + putreg32(0xffffffff, STM32_FSMC_BWTR4); + + /* Enable the bank by setting the MBKEN bit */ + + putreg32(FSMC_BCR_MBKEN | FSMC_BCR_SRAM | FSMC_BCR_MWID16 | FSMC_BCR_WREN, STM32_FSMC_BCR1); + irqrestore(flags); +} + +#endif /* CONFIG_STM32_FSMC */ + + diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c new file mode 100644 index 0000000000..000b8ad3b2 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -0,0 +1,215 @@ +/************************************************************************************ + * configs/stm3210e_eval/src/up_spi.c + * arch/arm/src/board/up_spi.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "stm32_internal.h" +#include "stm3210e-internal.h" + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SPI_DEBUG /* Define to enable debug */ +#undef SPI_VERBOSE /* Define to enable verbose debug */ + +#ifdef SPI_DEBUG +# define spidbg lldbg +# ifdef SPI_VERBOSE +# define spivdbg lldbg +# else +# define spivdbg(x...) +# endif +#else +# undef SPI_VERBOSE +# define spidbg(x...) +# define spivdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. + * + ************************************************************************************/ + +void weak_function stm32_spiinitialize(void) +{ + /* NOTE: Clocking for SPI1 and/or SPI2 was already provided in stm32_rcc.c. + * Configurations of SPI pins is performed in stm32_spi.c. + * Here, we only initialize chip select pins unique to the board + * architecture. + */ + +#ifdef CONFIG_STM32_SPI1 + /* Configure the TFT/Touchscreen CS GPIO */ + +#if 0 /* Need to study this */ + stm32_configgpio(GPIO_LCD_CS); +#endif + + /* Configure the TFT/Touchscreen and ENC28J60 or SPI-based FLASH PIOs */ + + /* Configure ENC28J60 SPI1 CS (also RESET and interrupt pins) */ + +#ifdef CONFIG_NET_ENC28J60 + stm32_configgpio(GPIO_ENC28J60_CS); + stm32_configgpio(GPIO_ENC28J60_RESET); + stm32_configgpio(GPIO_ENC28J60_INTR); +#else + + /* Configure FLASH SPI1 CS */ + + stm32_configgpio(GPIO_FLASH_CS); +#endif + +#endif /* CONFIG_STM32_SPI1 */ + +#ifdef CONFIG_STM32_SPI2 + /* Configure the MP3 SPI2 CS GPIO */ + + stm32_configgpio(GPIO_MP3_CS); + +#endif /* CONFIG_STM32_SPI2 */ +} + +/**************************************************************************** + * Name: stm32_spi1/2/3select and stm32_spi1/2/3status + * + * Description: + * The external functions, stm32_spi1/2/3select and stm32_spi1/2/3status must be + * provided by board-specific logic. They are implementations of the select + * and status methods of the SPI interface defined by struct spi_ops_s (see + * include/nuttx/spi.h). All other methods (including up_spiinitialize()) + * are provided by common STM32 logic. To use this common SPI logic on your + * board: + * + * 1. Provide logic in stm32_boardinitialize() to configure SPI chip select + * pins. + * 2. Provide stm32_spi1/2/3select() and stm32_spi1/2/3status() functions in your + * board-specific logic. These functions will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 3. Add a calls to up_spiinitialize() in your low level application + * initialization logic + * 4. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ****************************************************************************/ + +#ifdef CONFIG_STM32_SPI1 +void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + +#if 0 /* Need to study this */ + if (devid == SPIDEV_FLASH) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_FLASH_CS, !selected); + } + else +#ifdef CONFIG_NET_ENC28J60 + if (devid == SPIDEV_ETHERNET) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_ENC28J60_CS, !selected); + } +#else + if (devid == SPIDEV_FLASH) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_FLASH_CS, !selected); + } +#endif +} + +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return SPI_STATUS_PRESENT; +} +#endif + +#ifdef CONFIG_STM32_SPI2 +void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + + if (devid == SPIDEV_AUDIO) + { + /* Set the GPIO low to select and high to de-select */ + + stm32_gpiowrite(GPIO_MP3_CS, !selected); + } +} + +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return SPI_STATUS_PRESENT; +} +#endif + +#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */ diff --git a/nuttx/configs/fire-stm32v2/src/up_userleds.c b/nuttx/configs/fire-stm32v2/src/up_userleds.c new file mode 100644 index 0000000000..f7e3dbf9e3 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_userleds.c @@ -0,0 +1,129 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_userleds.c + * arch/arm/src/board/up_userleds.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32_internal.h" +#include "fire-internal.h" + +#ifndef CONFIG_ARCH_LEDS + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG with + * CONFIG_DEBUG_VERBOSE too) + */ + +#undef LED_DEBUG /* Define to enable debug */ + +#ifdef LED_DEBUG +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ +/* This array maps an LED number to GPIO pin configuration */ + +static uint32_t g_ledcfg[BOARD_NLEDS] = +{ + GPIO_LED1, GPIO_LED2, GPIO_LED3 +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_ledinit + ****************************************************************************/ + +void stm32_ledinit(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); +} + +/**************************************************************************** + * Name: stm32_setled + ****************************************************************************/ + +void stm32_setled(int led, bool ledon) +{ + if ((unsigned)led < BOARD_NLEDS) + { + stm32_gpiowrite(g_ledcfg[led], ledon); + } +} + +/**************************************************************************** + * Name: stm32_setleds + ****************************************************************************/ + +void stm32_setleds(uint8_t ledset) +{ + stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0); + stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0); + stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0); +} + +#endif /* !CONFIG_ARCH_LEDS */ diff --git a/nuttx/configs/olimex-strp711/src/up_enc28j60.c b/nuttx/configs/olimex-strp711/src/up_enc28j60.c index c6ffdd3686..2c693b7a83 100644 --- a/nuttx/configs/olimex-strp711/src/up_enc28j60.c +++ b/nuttx/configs/olimex-strp711/src/up_enc28j60.c @@ -150,14 +150,53 @@ # define ENC_GPIO0_NETRST (1 << 4) /* Reset (P0.4) */ # define ENC_GPIO0_NETINT (1 << 6) /* Interrupt (P0.6) */ +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler); +static void up_enable(FAR struct enc_lower_s *lower); +static void up_disable(FAR struct enc_lower_s *lower); + /**************************************************************************** * Private Data ****************************************************************************/ +/* The ENC28J60 normal provides interrupts to the MCU via a GPIO pin. The + * following structure provides an MCU-independent mechanixm for controlling + * the ENC28J60 GPIO interrupt. + */ + +static const struct enc_lower_s g_enclower = +{ + .attach = up_attach, + .enable = up_enable, + .disable = up_disable +}; + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: struct enc_lower_s methods + ****************************************************************************/ + +static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler) +{ + return irq_attach(ENC28J60_IRQ, handler) +} + +static void up_enable(FAR struct enc_lower_s *lower) +{ + up_enable_irq(ENC28J60_IRQ); +} + +static void up_disable(FAR struct enc_lower_s *lower) +{ + up_disable_irq(ENC28J60_IRQ); +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -198,7 +237,7 @@ void up_netinitialize(void) /* Bind the SPI port to the ENC28J60 driver */ - ret = enc_initialize(spi, ENC28J60_DEVNO, ENC28J60_IRQ); + ret = enc_initialize(spi, ENC28J60_DEVNO, &g_enclower); if (ret < 0) { nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", diff --git a/nuttx/configs/shenzhou/src/up_buttons.c b/nuttx/configs/shenzhou/src/up_buttons.c index 3bd0cd5c15..5a8515ca5c 100644 --- a/nuttx/configs/shenzhou/src/up_buttons.c +++ b/nuttx/configs/shenzhou/src/up_buttons.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/shenzhou/src/up_buttons.c * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/stm3210e-eval/src/up_spi.c b/nuttx/configs/stm3210e-eval/src/up_spi.c index dacc3adf84..ea8670b183 100644 --- a/nuttx/configs/stm3210e-eval/src/up_spi.c +++ b/nuttx/configs/stm3210e-eval/src/up_spi.c @@ -138,11 +138,11 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_FLASH) - { - /* Set the GPIO low to select and high to de-select */ + { + /* Set the GPIO low to select and high to de-select */ - stm32_gpiowrite(GPIO_FLASH_CS, !selected); - } + stm32_gpiowrite(GPIO_FLASH_CS, !selected); + } } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 0239406a1c..4862b7b216 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -172,36 +172,36 @@ struct enc_driver_s { /* Device control */ - bool bifup; /* true:ifup false:ifdown */ - uint8_t bank; /* Currently selected bank */ - uint16_t nextpkt; /* Next packet address */ - int irq; /* GPIO IRQ configured for the ENC28J60 */ + bool bifup; /* true:ifup false:ifdown */ + uint8_t bank; /* Currently selected bank */ + uint16_t nextpkt; /* Next packet address */ + FAR struct enc_lower_s *lower; /* Low-level MCU-specific support */ /* Timing */ - WDOG_ID txpoll; /* TX poll timer */ - WDOG_ID txtimeout; /* TX timeout timer */ + WDOG_ID txpoll; /* TX poll timer */ + WDOG_ID txtimeout; /* TX timeout timer */ /* We we don't own the SPI bus, then we cannot do SPI accesses from the * interrupt handler. */ #ifndef CONFIG_SPI_OWNBUS - struct work_s work; /* Work queue support */ + struct work_s work; /* Work queue support */ #endif /* This is the contained SPI driver intstance */ - FAR struct spi_dev_s *spi; + FAR struct spi_dev_s *spi; /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct uip_driver_s dev; /* Interface understood by uIP */ /* Statistics */ #ifdef CONFIG_ENC28J60_STATS - struct enc_stats_s stats; + struct enc_stats_s stats; #endif }; @@ -1491,8 +1491,6 @@ static int enc_interrupt(int irq, FAR void *context) { register FAR struct enc_driver_s *priv = &g_enc28j60[0]; - DEBUGASSERT(priv->irq == irq); - #ifdef CONFIG_SPI_OWNBUS /* In very simple environments, we own the SPI and can do data transfers * from the interrupt handler. That is actually a very bad idea in any @@ -1659,8 +1657,9 @@ static int enc_ifup(struct uip_driver_s *dev) */ priv->bifup = true; - up_enable_irq(priv->irq); + priv->lower->enable(priv->lower); } + return ret; } @@ -1693,7 +1692,7 @@ static int enc_ifdown(struct uip_driver_s *dev) /* Disable the Ethernet interrupt */ flags = irqsave(); - up_disable_irq(priv->irq); + priv->lower->disable(priv->lower); /* Cancel the TX poll timer and TX timeout timers */ @@ -2117,10 +2116,10 @@ static int enc_reset(FAR struct enc_driver_s *priv) * * Parameters: * spi - A reference to the platform's SPI driver for the ENC28J60 + * lower - The MCU-specific interrupt used to control low-level MCU + * functions (i.e., ENC28J60 GPIO interrupts). * devno - If more than one ENC28J60 is supported, then this is the * zero based number that identifies the ENC28J60; - * irq - The fully configured GPIO IRQ that ENC28J60 interrupts will be - * asserted on. This driver will attach and entable this IRQ. * * Returned Value: * OK on success; Negated errno on failure. @@ -2129,7 +2128,8 @@ static int enc_reset(FAR struct enc_driver_s *priv) * ****************************************************************************/ -int enc_initialize(FAR struct spi_dev_s *spi, unsigned int devno, unsigned int irq) +int enc_initialize(FAR struct spi_dev_s *spi, + FAR const struct enc_lower_s *lower, unsigned int devno) { FAR struct enc_driver_s *priv ; int ret; @@ -2154,7 +2154,7 @@ int enc_initialize(FAR struct spi_dev_s *spi, unsigned int devno, unsigned int i priv->txpoll = wd_create(); /* Create periodic poll timer */ priv->txtimeout = wd_create(); /* Create TX timeout timer */ priv->spi = spi; /* Save the SPI instance */ - priv->irq = irq; /* Save the IRQ number */ + priv->lower = lower; /* Save the low-level MCU interface */ /* Make sure that the interface is in the down state. NOTE: The MAC * address will not be set up until ifup. That gives the app time to set @@ -2164,9 +2164,9 @@ int enc_initialize(FAR struct spi_dev_s *spi, unsigned int devno, unsigned int i ret = enc_ifdown(&priv->dev); if (ret == OK) { - /* Attach the IRQ to the driver (but don't enable it yet) */ + /* Attach the interrupt to the driver (but don't enable it yet) */ - if (irq_attach(irq, enc_interrupt)) + if (lower->attach(lower, enc_interrupt)) { /* We could not attach the ISR to the interrupt */ @@ -2177,6 +2177,7 @@ int enc_initialize(FAR struct spi_dev_s *spi, unsigned int devno, unsigned int i (void)netdev_register(&priv->dev); } + return ret; } diff --git a/nuttx/include/nuttx/net/enc28j60.h b/nuttx/include/nuttx/net/enc28j60.h index 2507b1cf60..9a3be10c1e 100644 --- a/nuttx/include/nuttx/net/enc28j60.h +++ b/nuttx/include/nuttx/net/enc28j60.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/net/enc28j60.h * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,8 @@ #include #include +#include + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -80,6 +82,18 @@ struct enc_stats_s }; #endif +/* The ENC28J60 normal provides interrupts to the MCU via a GPIO pin. The + * following structure provides an MCU-independent mechanixm for controlling + * the ENC28J60 GPIO interrupt. + */ + +struct enc_lower_s +{ + int (*attach)(FAR struct enc_lower_s *lower, xcpt_t handler); + void (*enable)(FAR struct enc_lower_s *lower); + void (*disable)(FAR struct enc_lower_s *lower); +}; + /**************************************************************************** * Public Data ****************************************************************************/ @@ -104,10 +118,10 @@ extern "C" { * * Parameters: * spi - A reference to the platform's SPI driver for the ENC28J60 + * lower - The MCU-specific interrupt used to control low-level MCU + * functions (i.e., ENC28J60 GPIO interrupts). * devno - If more than one ENC28J60 is supported, then this is the * zero based number that identifies the ENC28J60; - * irq - The fully configured GPIO IRQ that ENC28J60 interrupts will be - * asserted on. This driver will attach and entable this IRQ. * * Returned Value: * OK on success; Negated errno on failure. @@ -117,8 +131,9 @@ extern "C" { ****************************************************************************/ struct spi_dev_s; /* see nuttx/spi.h */ -EXTERN int enc_initialize(FAR struct spi_dev_s *spi, unsigned int devno, - unsigned int irq); +EXTERN int enc_initialize(FAR struct spi_dev_s *spi, + FAR const struct enc_lower_s *lower, + unsigned int devno); /**************************************************************************** * Function: enc_stats From 835eef47bd2a4e4851c6851e613f70b4010cc5ca Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 10 Sep 2012 20:00:04 +0000 Subject: [PATCH 45/95] More M3 Wildfire logic; mmap-related bug fixes from Kate git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5124 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 3 + apps/netutils/webserver/httpd_mmap.c | 16 +- nuttx/ChangeLog | 2 + nuttx/configs/Kconfig | 2 +- nuttx/configs/README.txt | 2 +- nuttx/configs/fire-stm32v2/README.txt | 2 +- nuttx/configs/fire-stm32v2/src/Makefile | 6 +- .../configs/fire-stm32v2/src/fire-internal.h | 11 ++ nuttx/configs/fire-stm32v2/src/up_buttons.c | 8 - nuttx/configs/fire-stm32v2/src/up_composite.c | 106 ++++++++++++ .../fire-stm32v2/src/up_cxxinitialize.c | 155 ++++++++++++++++++ nuttx/configs/fire-stm32v2/src/up_mmcsd.c | 122 ++++++++++++++ nuttx/configs/fire-stm32v2/src/up_nsh.c | 151 +++++++++++++++++ nuttx/configs/fire-stm32v2/src/up_spi.c | 8 +- nuttx/configs/fire-stm32v2/src/up_usbdev.c | 116 +++++++++++++ nuttx/configs/fire-stm32v2/src/up_usbmsc.c | 103 ++++++++++++ nuttx/configs/fire-stm32v2/src/up_watchdog.c | 136 +++++++++++++++ nuttx/configs/shenzhou/src/up_composite.c | 2 +- nuttx/configs/shenzhou/src/up_mmcsd.c | 5 +- nuttx/configs/shenzhou/src/up_nsh.c | 8 +- nuttx/fs/mmap/fs_rammap.c | 41 +++-- 21 files changed, 956 insertions(+), 49 deletions(-) create mode 100644 nuttx/configs/fire-stm32v2/src/up_composite.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_cxxinitialize.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_mmcsd.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_nsh.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_usbdev.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_usbmsc.c create mode 100644 nuttx/configs/fire-stm32v2/src/up_watchdog.c diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 2ef4b67f92..da56f5f3e0 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -314,3 +314,6 @@ error handling: Now the number of arguments to mount can be 0 or 4. Additional parameter checking is required to prevent mysterious errors (submiteed by Kate). + * apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap() + length is zero (submitted by Kate). + diff --git a/apps/netutils/webserver/httpd_mmap.c b/apps/netutils/webserver/httpd_mmap.c index 301168a092..9777df3b31 100644 --- a/apps/netutils/webserver/httpd_mmap.c +++ b/apps/netutils/webserver/httpd_mmap.c @@ -95,6 +95,15 @@ int httpd_mmap_open(const char *name, struct httpd_fs_file *file) return ERROR; } + file->len = (int) st.st_size; + + /* SUS3: "If len is zero, mmap() shall fail and no mapping shall be established." */ + + if (st.st_size == 0) + { + return OK; + } + file->fd = open(path, O_RDONLY); if (file->fd == -1) { @@ -108,13 +117,16 @@ int httpd_mmap_open(const char *name, struct httpd_fs_file *file) return ERROR; } - file->len = (int) st.st_size; - return OK; } int httpd_mmap_close(struct httpd_fs_file *file) { + if (file->len == 0) + { + return OK; + } + #ifdef CONFIG_FS_RAMMAP if (-1 == munmap(file->data, file->len)) { diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 3ab4302ab6..26e3621291 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3305,4 +3305,6 @@ * drivers/mmcsd/mmcsd_sdio.c: If the MMC/SD driver were ever uninitialized then there would be a double release of memory (Noted by Ronen Vainish). + * fs/mmap/fs_rammap.c: Fix logic error and errno check (contributed + by Kate). diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 8de190c73e..c017192d2b 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -138,7 +138,7 @@ config ARCH_BOARD_FIRE_STM32V2 select ARCH_HAVE_IRQBUTTONS ---help--- A configuration for the M3 Wildfile board. This board is based on the - STM32F103VET6 chip. + STM32F103VET6 chip. See http://firestm32.taobao.com config ARCH_BOARD_HYMINI_STM32V bool "HY-Mini STM32v board" diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 1b8801605e..f225f8818f 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -1545,7 +1545,7 @@ configs/ez80f0910200zco configs/fire-stm32v2 A configuration for the M3 Wildfire STM32 board. This board is based on the - STM32F103VET6 chip. + STM32F103VET6 chip. See http://firestm32.taobao.com configs/hymini-stm32v A configuration for the HY-Mini STM32v board. This board is based on the diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index f66c0bb739..694e319daa 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -2,7 +2,7 @@ README ====== This README discusses issues unique to NuttX configurations for the M3 -Wildfire development board (STM32F103VET6). +Wildfire development board (STM32F103VET6). See http://firestm32.taobao.com Contents ======== diff --git a/nuttx/configs/fire-stm32v2/src/Makefile b/nuttx/configs/fire-stm32v2/src/Makefile index 46e99d73a6..b5466ef1e4 100644 --- a/nuttx/configs/fire-stm32v2/src/Makefile +++ b/nuttx/configs/fire-stm32v2/src/Makefile @@ -40,7 +40,7 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_boot.c up_spi.c up_usbdev.c +CSRCS = up_boot.c up_spi.c up_usbdev.c up_mmcsd.c ifeq ($(CONFIG_STM32_FSMC),y) CSRCS += up_lcd.c up_selectlcd.c @@ -76,10 +76,6 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y) CSRCS += up_composite.c endif -ifeq ($(CONFIG_CAN),y) -CSRCS += up_can.c -endif - ifeq ($(CONFIG_WATCHDOG),y) CSRCS += up_watchdog.c endif diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index 4a844c4efc..125e030b70 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -287,6 +287,17 @@ void weak_function stm32_usbinitialize(void); void stm32_selectlcd(void); #endif +/**************************************************************************** + * Name: stm32_sdinitialize + * + * Description: + * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n + * and CONFIG_STM32_SPI1=y + * + ****************************************************************************/ + +int stm32_sdinitialize(int minor); + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_FIRE_STM32V2_SRC_FIRE_INTERNAL_H */ diff --git a/nuttx/configs/fire-stm32v2/src/up_buttons.c b/nuttx/configs/fire-stm32v2/src/up_buttons.c index e0f500b779..738d65d5f6 100644 --- a/nuttx/configs/fire-stm32v2/src/up_buttons.c +++ b/nuttx/configs/fire-stm32v2/src/up_buttons.c @@ -53,14 +53,6 @@ /**************************************************************************** * Private Data ****************************************************************************/ -/* Pin configuration for each Shenzhou button. This array is indexed by - * the BUTTON_* definitions in board.h - */ - -static const uint16_t g_buttons[NUM_BUTTONS] = -{ - GPIO_BTN_KEY1, GPIO_BTN_KEY1 -}; /**************************************************************************** * Private Functions diff --git a/nuttx/configs/fire-stm32v2/src/up_composite.c b/nuttx/configs/fire-stm32v2/src/up_composite.c new file mode 100644 index 0000000000..6ebc061760 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_composite.c @@ -0,0 +1,106 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_composite.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 SPI-based MMC/SD block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include "fire-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ +/* Device minor number */ + +#ifndef CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 +# define CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1 0 +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: composite_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int composite_archinitialize(void) +{ + /* If examples/composite is built as an NSH command, then SD slot should + * already have been initized in nsh_archinitialize() (see up_nsh.c). In + * this case, there is nothing further to be done here. + * + * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH + * was built. + */ + +#ifndef CONFIG_NSH_BUILTIN_APPS + return sd_mount(CONFIG_EXAMPLES_COMPOSITE_DEVMINOR1); +#else + return OK; +#endif /* CONFIG_NSH_BUILTIN_APPS */ +} diff --git a/nuttx/configs/fire-stm32v2/src/up_cxxinitialize.c b/nuttx/configs/fire-stm32v2/src/up_cxxinitialize.c new file mode 100644 index 0000000000..d4afdd20b6 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_cxxinitialize.c @@ -0,0 +1,155 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/up_cxxinitialize.c + * arch/arm/src/board/up_cxxinitialize.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include +#include "chip.h" + +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Debug ****************************************************************************/ +/* Non-standard debug that may be enabled just for testing the static constructors */ + +#ifndef CONFIG_DEBUG +# undef CONFIG_DEBUG_CXX +#endif + +#ifdef CONFIG_DEBUG_CXX +# define cxxdbg dbg +# define cxxlldbg lldbg +# ifdef CONFIG_DEBUG_VERBOSE +# define cxxvdbg vdbg +# define cxxllvdbg llvdbg +# else +# define cxxvdbg(x...) +# define cxxllvdbg(x...) +# endif +#else +# define cxxdbg(x...) +# define cxxlldbg(x...) +# define cxxvdbg(x...) +# define cxxllvdbg(x...) +#endif + +/************************************************************************************ + * Private Types + ************************************************************************************/ +/* This type defines one entry in initialization array */ + +typedef void (*initializer_t)(void); + +/************************************************************************************ + * External references + ************************************************************************************/ +/* _sinit and _einit are symbols exported by the linker script that mark the + * beginning and the end of the C++ initialization section. + */ + +extern initializer_t _sinit; +extern initializer_t _einit; + +/* _stext and _etext are symbols exported by the linker script that mark the + * beginning and the end of text. + */ + +extern uint32_t _stext; +extern uint32_t _etext; + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/**************************************************************************** + * Name: up_cxxinitialize + * + * Description: + * If C++ and C++ static constructors are supported, then this function + * must be provided by board-specific logic in order to perform + * initialization of the static C++ class instances. + * + * This function should then be called in the application-specific + * user_start logic in order to perform the C++ initialization. NOTE + * that no component of the core NuttX RTOS logic is involved; This + * function defintion only provides the 'contract' between application + * specific C++ code and platform-specific toolchain support + * + ***************************************************************************/ + +void up_cxxinitialize(void) +{ + initializer_t *initp; + + cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); + + /* Visit each entry in the initialzation table */ + + for (initp = &_sinit; initp != &_einit; initp++) + { + initializer_t initializer = *initp; + cxxdbg("initp: %p initializer: %p\n", initp, initializer); + + /* Make sure that the address is non-NULL and lies in the text region + * defined by the linker script. Some toolchains may put NULL values + * or counts in the initialization table + */ + + if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext) + { + cxxdbg("Calling %p\n", initializer); + initializer(); + } + } +} + +#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ + diff --git a/nuttx/configs/fire-stm32v2/src/up_mmcsd.c b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c new file mode 100644 index 0000000000..d3fa611bd7 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c @@ -0,0 +1,122 @@ +/**************************************************************************** + * config/fire-stm32v2/src/up_mmcsd.c + * arch/arm/src/board/up_mmcsd.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "fire-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#define HAVE_MMCSD 1 /* Assume that we have SD support */ +#define STM32_MMCSDSLOTNO 0 /* There is only one slot */ + +/* Can't support MMC/SD features if the SDIO peripheral is disabled */ + +#ifndef CONFIG_STM32_SDIO +# undef HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifndef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_MMCSD +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_sdinitialize + * + * Description: + * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n + * and CONFIG_STM32_SPI1=y + * + ****************************************************************************/ + +int stm32_sdinitialize(int minor) +{ +#ifdef HAVE_MMCSD + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + message("Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); + return -ENODEV; + } + + fvdbg("Initialized SDIO slot %d\n", STM32_MMCSDSLOTNO); + + /* Now bind the SDIO interface to the MMC/SD driver */ + + ret = mmcsd_slotinitialize(minor, sdio); + if (ret != OK) + { + message("Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", + STM32_MMCSDSLOTNO, minor); + } + + fvdbg("Bound SDIO slot %d to the MMC/SD driver, minor=%d\n", + STM32_MMCSDSLOTNO, minor); + + /* Then let's guess and say that there is a card in the slot. I need to check to + * see if the M3 Wildfire board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); +#endif + return OK; +} diff --git a/nuttx/configs/fire-stm32v2/src/up_nsh.c b/nuttx/configs/fire-stm32v2/src/up_nsh.c new file mode 100644 index 0000000000..8aa092df6b --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_nsh.c @@ -0,0 +1,151 @@ +/**************************************************************************** + * config/fire-stm32v2/src/up_nsh.c + * arch/arm/src/board/up_nsh.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include "stm32_internal.h" +#include "fire-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_MMCSD 1 +#define HAVE_USBDEV 1 + +/* Configuration ************************************************************/ +/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ + +#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ +#define STM32_MMCSDSLOTNO 0 /* Only one slot */ + +/* Can't support MMC/SD features if the SDIO peripheral is disabled */ + +#ifndef CONFIG_STM32_SDIO +# undef HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_MMCSD +#endif + +/* Default MMC/SD minor number */ + +#ifdef HAVE_MMCSD +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif + +/* Default MMC/SD SLOT number */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO +# error "Only one MMC/SD slot: Slot 0" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO +# endif + +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO +# endif +#endif + +/* Can't support USB host or device features if the USB peripheral or the USB + * device infrastructure is not enabled + */ + +#if !defined(CONFIG_STM32_USB) || !defined(CONFIG_USBDEV) +# undef HAVE_USBDEV +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# else +# define message(...) printf(__VA_ARGS__) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# else +# define message printf +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nsh_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int nsh_archinitialize(void) +{ +#ifdef HAVE_MMCSD + int ret; + + /* Initialize the SDIO-based MMC/SD slot */ + + ret = stm32_sdinitialze(CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + message("nsh_archinitialize: Failed to initialize MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSLOTNO, ret); + return ret; + } +#endif + return OK; +} diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c index 000b8ad3b2..50fd58bb49 100644 --- a/nuttx/configs/fire-stm32v2/src/up_spi.c +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -1,8 +1,8 @@ /************************************************************************************ - * configs/stm3210e_eval/src/up_spi.c + * configs/fire-stm32v2/src/up_spi.c * arch/arm/src/board/up_spi.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ #include "up_arch.h" #include "chip.h" #include "stm32_internal.h" -#include "stm3210e-internal.h" +#include "fire-internal.h" #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) @@ -88,7 +88,7 @@ * Name: stm32_spiinitialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. + * Called to configure SPI chip select GPIO pins for the M3 Wildfire board. * ************************************************************************************/ diff --git a/nuttx/configs/fire-stm32v2/src/up_usbdev.c b/nuttx/configs/fire-stm32v2/src/up_usbdev.c new file mode 100644 index 0000000000..3222866d33 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_usbdev.c @@ -0,0 +1,116 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/up_usbdev.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "stm32_internal.h" +#include "fire-internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins for the M3 Wildfire board. + * + ************************************************************************************/ + +void stm32_usbinitialize(void) +{ + /* USB Soft Connect Pullup: PB.14 */ + + stm32_configgpio(GPIO_USB_PULLUP); +} + +/************************************************************************************ + * Name: stm32_usbpullup + * + * Description: + * If USB is supported and the board supports a pullup via GPIO (for USB software + * connect and disconnect), then the board software must provide stm32_pullup. + * See include/nuttx/usb/usbdev.h for additional description of this method. + * Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be + * NULL. + * + ************************************************************************************/ + +int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +{ + usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); + stm32_gpiowrite(GPIO_USB_PULLUP, !enable); + return OK; +} + +/************************************************************************************ + * Name: stm32_usbsuspend + * + * Description: + * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is + * used. This function is called whenever the USB enters or leaves suspend mode. + * This is an opportunity for the board logic to shutdown clocks, power, etc. + * while the USB is suspended. + * + ************************************************************************************/ + +void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +{ + ulldbg("resume: %d\n", resume); +} + diff --git a/nuttx/configs/fire-stm32v2/src/up_usbmsc.c b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c new file mode 100644 index 0000000000..8a82695395 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c @@ -0,0 +1,103 @@ +/**************************************************************************** + * configs/fire-stm32v2/src/up_usbmsc.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 SPI-based MMC/SD block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include "stm32_internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* If examples/usbmsc is built as an NSH command, then SD slot should + * already have been initized in nsh_archinitialize() (see up_nsh.c). In + * this case, there is nothing further to be done here. + */ + +#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN + return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1); +#else + return OK; +#endif +} diff --git a/nuttx/configs/fire-stm32v2/src/up_watchdog.c b/nuttx/configs/fire-stm32v2/src/up_watchdog.c new file mode 100644 index 0000000000..5b11ebc170 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_watchdog.c @@ -0,0 +1,136 @@ +/************************************************************************************ + * configs/fire-stm32v2/src/up_watchdog.c + * arch/arm/src/board/up_watchdog.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "stm32_wdg.h" + +#ifdef CONFIG_WATCHDOG + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Configuration *******************************************************************/ +/* Wathdog hardware should be enabled */ + +#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) +# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" +#endif + +/* Select the path to the registered watchdog timer device */ + +#ifndef CONFIG_STM32_WDG_DEVPATH +# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH +# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH +# else +# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" +# endif +#endif + +/* Use the un-calibrated LSI frequency if we have nothing better */ + +#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) +# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY +#endif + +/* Debug ***************************************************************************/ +/* Non-standard debug that may be enabled just for testing the watchdog timer */ + +#ifndef CONFIG_DEBUG +# undef CONFIG_DEBUG_WATCHDOG +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG +# define wdgdbg dbg +# define wdglldbg lldbg +# ifdef CONFIG_DEBUG_VERBOSE +# define wdgvdbg vdbg +# define wdgllvdbg llvdbg +# else +# define wdgvdbg(x...) +# define wdgllvdbg(x...) +# endif +#else +# define wdgdbg(x...) +# define wdglldbg(x...) +# define wdgvdbg(x...) +# define wdgllvdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/**************************************************************************** + * Name: up_wdginitialize() + * + * Description: + * Perform architecuture-specific initialization of the Watchdog hardware. + * This interface must be provided by all configurations using + * apps/examples/watchdog + * + ****************************************************************************/ + +int up_wdginitialize(void) +{ + /* Initialize tha register the watchdog timer device */ + +#if defined(CONFIG_STM32_WWDG) + stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); + return OK; +#elif defined(CONFIG_STM32_IWDG) + stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); + return OK; +#else + return -ENODEV; +#endif +} + +#endif /* CONFIG_WATCHDOG */ diff --git a/nuttx/configs/shenzhou/src/up_composite.c b/nuttx/configs/shenzhou/src/up_composite.c index cf61aeaad1..81c33dcc83 100644 --- a/nuttx/configs/shenzhou/src/up_composite.c +++ b/nuttx/configs/shenzhou/src/up_composite.c @@ -44,7 +44,7 @@ #include #include -#include "shenzhou_internal.h" +#include "shenzhou-internal.h" /**************************************************************************** * Pre-Processor Definitions diff --git a/nuttx/configs/shenzhou/src/up_mmcsd.c b/nuttx/configs/shenzhou/src/up_mmcsd.c index 3de7f26208..daa1498178 100644 --- a/nuttx/configs/shenzhou/src/up_mmcsd.c +++ b/nuttx/configs/shenzhou/src/up_mmcsd.c @@ -53,7 +53,7 @@ /* Configuration ************************************************************/ /* SPI1 connects to the SD CARD (and to the SPI FLASH) */ -#define HAVE_MMCSD 1 /* Assume that we have SD support */ +#define HAVE_MMCSD 1 /* Assume that we have SD support */ #define STM32_MMCSDSPIPORTNO 1 /* Port is SPI1 */ #define STM32_MMCSDSLOTNO 0 /* There is only one slot */ @@ -68,7 +68,7 @@ /* Can't support MMC/SD features if mountpoints are disabled */ #ifndef CONFIG_DISABLE_MOUNTPOINT -# undef NSH_HAVEMMCSD +# undef HAVE_MMCSD #endif /**************************************************************************** @@ -121,3 +121,4 @@ int stm32_sdinitialize(int minor) #endif return OK; } + diff --git a/nuttx/configs/shenzhou/src/up_nsh.c b/nuttx/configs/shenzhou/src/up_nsh.c index 6e657706ef..1324ae0b9f 100644 --- a/nuttx/configs/shenzhou/src/up_nsh.c +++ b/nuttx/configs/shenzhou/src/up_nsh.c @@ -71,13 +71,7 @@ /* Can't support MMC/SD features if mountpoints are disabled */ -#ifndef CONFIG_DISABLE_MOUNTPOINT -# undef NSH_HAVEMMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled) */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) +#ifdef CONFIG_DISABLE_MOUNTPOINT # undef HAVE_MMCSD #endif diff --git a/nuttx/fs/mmap/fs_rammap.c b/nuttx/fs/mmap/fs_rammap.c index 0eaf313b59..d2bda4fb5b 100644 --- a/nuttx/fs/mmap/fs_rammap.c +++ b/nuttx/fs/mmap/fs_rammap.c @@ -165,7 +165,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) */ fdbg("Seek to position %d failed\n", (int)offset); - err = ENOMEM; + err = EINVAL; goto errout_with_region; } @@ -181,28 +181,35 @@ FAR void *rammap(int fd, size_t length, off_t offset) * signal. */ - if (nread != EINTR) + err = get_errno(); + if (err != EINTR) { /* All other read errors are bad. errno is already set. - * (but maybe should be forced to EINVAL?) + * (but maybe should be forced to EINVAL?). NOTE that if + * FS DEBUG is enabled, then the following fdbg() macro will + * destroy the errno value. */ - fdbg("Read failed: %d\n", (int)offset); + fdbg("Read failed: offset=%d errno=%d\n", (int)offset, err); +#ifdef CONFIG_DEBUG_FS + goto errout_with_region; +#else goto errout_with_errno; +#endif } - - /* Check for end of file. */ - - if (nread == 0) - { - break; - } - - /* Increment number of bytes read */ - - rdbuffer += nread; - length -= nread; } + + /* Check for end of file. */ + + if (nread == 0) + { + break; + } + + /* Increment number of bytes read */ + + rdbuffer += nread; + length -= nread; } /* Zero any memory beyond the amount read from the file */ @@ -227,7 +234,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) errout_with_region: kfree(alloc); errout: - errno = err; + set_errno(err); return MAP_FAILED; errout_with_errno: From c7a25442309055fd1032f2027923e0fe01551bb5 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 10 Sep 2012 22:26:37 +0000 Subject: [PATCH 46/95] The M3 Wildfire port is code complete and ready for test git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5125 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/usbstorage/Kconfig | 127 +- nuttx/Kconfig | 10 +- nuttx/arch/Kconfig | 4 + nuttx/arch/arm/src/stm32/Kconfig | 77 +- nuttx/arch/arm/src/stm32/stm32_allocateheap.c | 4 +- nuttx/arch/arm/src/stm32/stm32_pwr.c | 2 +- nuttx/arch/arm/src/stm32/stm32f10xxx_rtc.c | 4 + nuttx/arch/mips/src/pic32mx/Kconfig | 1 + nuttx/configs/fire-stm32v2/include/board.h | 2 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 1045 +++++++++++++++++ nuttx/configs/fire-stm32v2/src/up_nsh.c | 2 +- nuttx/configs/fire-stm32v2/src/up_spi.c | 1 + nuttx/configs/fire-stm32v2/src/up_usbdev.c | 6 +- nuttx/configs/shenzhou/nsh/defconfig | 112 +- nuttx/drivers/Kconfig | 129 +- nuttx/drivers/usbdev/Kconfig | 13 +- 16 files changed, 1466 insertions(+), 73 deletions(-) create mode 100644 nuttx/configs/fire-stm32v2/nsh/defconfig diff --git a/apps/examples/usbstorage/Kconfig b/apps/examples/usbstorage/Kconfig index ce8b7bfe55..96af82b210 100644 --- a/apps/examples/usbstorage/Kconfig +++ b/apps/examples/usbstorage/Kconfig @@ -9,5 +9,128 @@ config EXAMPLES_USBMSC ---help--- Enable the USB mass storage class example -if EXAMPLES_USBMSC -endif +config EXAMPLES_USBMSC_BUILTIN + bool "NSH built-in command" + default y + depends on EXAMPLES_USBMSC && NSH_BUILTIN_APPS + ---help--- + This example can be built as two NSH "built-in" commands if this + option is selected: 'msconn' will connect the USB mass storage + device; 'msdis' will disconnect the USB storage device. + +config EXAMPLES_USBMSC_NLUNS + int "Number of LUNs" + default 1 + depends on EXAMPLES_USBMSC + ---help--- + Defines the number of logical units (LUNs) exported by the USB + storage driver. Each LUN corresponds to one exported block driver + (or partition of a block driver). May be 1, 2, or 3. Default is 1. + +config EXAMPLES_USBMSC_DEVMINOR1 + int "LUN1 Minor Device Number" + default 0 + depends on EXAMPLES_USBMSC + ---help--- + The minor device number of the block driver for the first LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Default is zero. + +config EXAMPLES_USBMSC_DEVPATH1 + string "LUN1 Device Path" + default "/dev/mmcsd0" + depends on EXAMPLES_USBMSC + ---help--- + The full path to the registered block driver. Default is + "/dev/mmcsd0" + +config EXAMPLES_USBMSC_DEVMINOR2 + int "LUN2 Minor Device Number" + default 1 + depends on EXAMPLES_USBMSC + ---help--- + The minor device number of the block driver for the second LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is one. + +config EXAMPLES_USBMSC_DEVPATH2 + string "LUN2 Device Path" + default "/dev/mmcsd1" + depends on EXAMPLES_USBMSC + ---help--- + The full path to the registered block driver. Ignored if + EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd1" + +config EXAMPLES_USBMSC_DEVMINOR3 + int "LUN3 Minor Device Number" + default 2 + depends on EXAMPLES_USBMSC + ---help--- + The minor device number of the block driver for the third LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is two. + +config EXAMPLES_USBMSC_DEVPATH3 + string "LUN3 Device Path" + default "/dev/mmcsd2" + depends on EXAMPLES_USBMSC + ---help--- + The full path to the registered block driver. Ignored if + EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd2" + +config EXAMPLES_USBMSC_DEBUGMM + bool "USB MSC MM Debug" + default n + depends on EXAMPLES_USBMSC + ---help--- + Enables some debug tests to check for memory usage and memory leaks. + +config EXAMPLES_USBMSC_TRACEINIT + bool "USB Trace Initialization" + default n + depends on EXAMPLES_USBMSC + ---help--- + If USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB initialization events + +config EXAMPLES_USBMSC_TRACECLASS + bool "USB Trace Class" + default n + depends on EXAMPLES_USBMSC + ---help--- + If USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB class driver events + +config EXAMPLES_USBMSC_TRACETRANSFERS + bool "USB Trace Transfers" + default n + depends on EXAMPLES_USBMSC + ---help--- + If USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB data transfer events + +config EXAMPLES_USBMSC_TRACECONTROLLER + bool "USB Trace Device Controller Events" + default n + depends on EXAMPLES_USBMSC + ---help--- + If USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller events + +config EXAMPLES_USBMSC_TRACEINTERRUPTS + bool "USB Trace Device Controller Interrupt Events" + default n + depends on EXAMPLES_USBMSC + ---help--- + If USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller interrupt-related events. diff --git a/nuttx/Kconfig b/nuttx/Kconfig index fdd99ead06..f920e4984d 100644 --- a/nuttx/Kconfig +++ b/nuttx/Kconfig @@ -331,24 +331,24 @@ menu "Device Drivers" source drivers/Kconfig endmenu -menu "Networking support" +menu "Networking Support" source net/Kconfig endmenu -menu "File systems" +menu "File Systems" source fs/Kconfig endmenu -menu "Memory management" +menu "Memory Management" source mm/Kconfig endmenu -menu "Library routines" +menu "Library Routines" source lib/Kconfig source libxx/Kconfig endmenu -menu "Application configuration" +menu "Application Configuration" source "$APPSDIR/Kconfig" endmenu diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index 13335441e5..b445e56209 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -107,6 +107,10 @@ config ARCH_NOINTC bool default n +config ARCH_DMA + bool + default n + config ARCH_STACKDUMP bool "Dump stack on assertions" default n diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 80610f271e..6b2ac39d3f 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -10,20 +10,64 @@ choice default ARCH_CHIP_STM32F103ZET6 depends on ARCH_CHIP_STM32 -config ARCH_CHIP_STM32F103ZET6 - bool "STM32F103ZET6" +config ARCH_CHIP_STM32F100C8 + bool "STM32F100C8" select ARCH_CORTEXM3 select STM32_STM32F10XX + select STM32_VALUELINE + +config ARCH_CHIP_STM32F100CB + bool "STM32F100CB" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_VALUELINE + +config ARCH_CHIP_STM32F100R8 + bool "STM32F100R8" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_VALUELINE + +config ARCH_CHIP_STM32F100RB + bool "STM32F100RB" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_VALUELINE + +config ARCH_CHIP_STM32F100V8 + bool "STM32F100V8" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_VALUELINE + +config ARCH_CHIP_STM32F100VB + bool "STM32F100VB" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_VALUELINE config ARCH_CHIP_STM32F103RET6 bool "STM32F103RET6" select ARCH_CORTEXM3 select STM32_STM32F10XX + select STM32_HIGHDENSITY config ARCH_CHIP_STM32F103VCT6 bool "STM32F103VCT6" select ARCH_CORTEXM3 select STM32_STM32F10XX + select STM32_HIGHDENSITY + +config ARCH_CHIP_STM32F103VET6 + bool "STM32F103VET6" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_HIGHDENSITY + +config ARCH_CHIP_STM32F103ZET6 + bool "STM32F103ZET6" + select ARCH_CORTEXM3 + select STM32_STM32F10XX config ARCH_CHIP_STM32F105VBT7 bool "STM32F105VBT7" @@ -92,6 +136,12 @@ endchoice config STM32_STM32F10XX bool +config STM32_VALUELINE + bool + +config STM32_HIGHDENSITY + bool + config STM32_CONNECTIVITYLINE bool @@ -157,10 +207,12 @@ config STM32_CRC config STM32_DMA1 bool "DMA1" default n + select ARCH_DMA config STM32_DMA2 bool "DMA2" default n + select ARCH_DMA config STM32_BKP bool "BKP" @@ -408,10 +460,6 @@ config STM32_SPI bool default y if STM32_SPI1 || STM32_SPI2 || STM32_SPI3 || STM32_SPI4 -config STM32_DMA - bool - default y if STM32_DMA1 || STM32_DMA2 - config STM32_CAN bool default y if STM32_CAN1 || STM32_CAN2 @@ -580,7 +628,7 @@ config ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG config STM32_CCMEXCLUDE bool "Exclude CCM SRAM from the heap" depends on STM32_STM32F20XX || STM32_STM32F40XX - default y if STM32_DMA1 || STM32_DMA2 + default y if ARCH_DMA ---help--- Exclude CCM SRAM from the HEAP because it cannot be used for DMA. @@ -1485,42 +1533,42 @@ endchoice config USART1_RXDMA bool "USART1 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA2 + depends on STM32_STM32F40XX && STM32_DMA2 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors config USART2_RXDMA bool "USART2 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 + depends on STM32_STM32F40XX && STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors config USART3_RXDMA bool "USART3 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 + depends on STM32_STM32F40XX && STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors config UART4_RXDMA bool "UART4 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 + depends on STM32_STM32F40XX && STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors config UART5_RXDMA bool "UART5 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 + depends on STM32_STM32F40XX && STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors config USART6_RXDMA bool "USART6 Rx DMA" default n - depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA2 + depends on STM32_STM32F40XX && STM32_DMA2 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors @@ -1587,8 +1635,9 @@ menu "Ethernet MAC configuration" config STM32_PHYADDR int "PHY address" + default 1 ---help--- - The 5-bit address of the PHY on the board + The 5-bit address of the PHY on the board. Default: 1 config STM32_MII bool "Use MII interface" diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c index 8aa5622c8f..4b8707a2b7 100644 --- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c +++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c @@ -212,7 +212,7 @@ * should be 3. */ -# ifdef CONFIG_STM32_DMA +# ifdef CONFIG_ARCH_DMA # warning "CCM SRAM is included in the heap AND DMA is enabled" # endif # if CONFIG_MM_REGIONS != 3 @@ -238,7 +238,7 @@ * should be disabled and CONFIG_MM_REGIONS should be 2. */ -# ifdef CONFIG_STM32_DMA +# ifdef CONFIG_ARCH_DMA # warning "CCM SRAM is included in the heap AND DMA is enabled" # endif # if CONFIG_MM_REGIONS < 2 diff --git a/nuttx/arch/arm/src/stm32/stm32_pwr.c b/nuttx/arch/arm/src/stm32/stm32_pwr.c index bada048e3e..14149922f9 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pwr.c +++ b/nuttx/arch/arm/src/stm32/stm32_pwr.c @@ -95,4 +95,4 @@ void stm32_pwr_enablebkp(void) stm32_pwr_modifyreg(STM32_PWR_CR_OFFSET, 0, PWR_CR_DBP); } -#endif // defined(CONFIG_STM32_PWR) +#endif /* CONFIG_STM32_PWR */ diff --git a/nuttx/arch/arm/src/stm32/stm32f10xxx_rtc.c b/nuttx/arch/arm/src/stm32/stm32f10xxx_rtc.c index df8ad9dd5a..e1d52ac099 100644 --- a/nuttx/arch/arm/src/stm32/stm32f10xxx_rtc.c +++ b/nuttx/arch/arm/src/stm32/stm32f10xxx_rtc.c @@ -113,6 +113,10 @@ # error "CONFIG_STM32_BKP is required for CONFIG_RTC" #endif +#ifndef CONFIG_STM32_PWR +# error "CONFIG_STM32_PWR is required for CONFIG_RTC" +#endif + /* RTC/BKP Definitions *************************************************************/ /* STM32_RTC_PRESCALAR_VALUE * RTC pre-scalar value. The RTC is driven by a 32,768Hz input clock. This input diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index ba77cf5d8f..bcb99cf6d7 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -544,6 +544,7 @@ config PIC32MX_RTCC config PIC32MX_DMA bool "DMA" default n + select ARCH_DMA config PIC32MX_FLASH bool "FLASH" diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index ea2f93960d..532e4347e1 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -266,7 +266,7 @@ # errror "USART1 requires CONFIG_STM32_USART1_REMAP=y" #endif -#if defined(CONFIG_STM32_USART2) && defined() +#if defined(CONFIG_STM32_USART2) && defined(CONFIG_STM32_USART2_REMAP) # errror "USART2 requires CONFIG_STM32_USART2_REMAP=n" #endif diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig new file mode 100644 index 0000000000..ce22a74c99 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -0,0 +1,1045 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_IMX is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_LM3S is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_SAM3U is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STR71X is not set +CONFIG_ARCH_CORTEXM3=y +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARMV7M_MPU is not set +CONFIG_ARCH_IRQPRIO=y +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_NET_MULTICAST is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F103RET6 is not set +# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set +CONFIG_ARCH_CHIP_STM32F103VET6=y +# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set +# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +# CONFIG_ARCH_CHIP_STM32F407IG is not set +CONFIG_STM32_STM32F10XX=y +CONFIG_STM32_HIGHDENSITY=y +CONFIG_STM32_CODESOURCERYW=y +# CONFIG_STM32_CODESOURCERYL is not set +# CONFIG_STM32_ATOLLIC_LITE is not set +# CONFIG_STM32_ATOLLIC_PRO is not set +# CONFIG_STM32_DEVKITARM is not set +# CONFIG_STM32_RAISONANCE is not set +# CONFIG_STM32_BUILDROOT is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +CONFIG_STM32_DMA2=y +CONFIG_STM32_BKP=y +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_FSMC is not set +CONFIG_STM32_I2C1=y +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_IWDG is not set +CONFIG_STM32_PWR=y +CONFIG_STM32_SDIO=y +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI4 is not set +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +CONFIG_STM32_USART1=y +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +CONFIG_STM32_USB=y +# CONFIG_STM32_WWDG is not set + +# +# Alternate Pin Mapping +# +CONFIG_STM32_USART1_REMAP=y +# CONFIG_STM32_USART2_REMAP is not set +# CONFIG_STM32_I2C1_REMAP is not set +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# SDIO Configuration +# +CONFIG_SDIO_DMA=y +CONFIG_SDIO_PRI=128 +CONFIG_SDIO_DMAPRIO=0x00001000 +# CONFIG_SDIO_WIDTH_D1_ONLY is not set + +# +# Ethernet MAC configuration +# +CONFIG_STM32_PHYADDR=1 + +# +# USB Host Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +CONFIG_ARCH_DMA=y +CONFIG_ARCH_STACKDUMP=y + +# +# Board Settings +# +CONFIG_DRAM_START=0x20000000 +CONFIG_DRAM_SIZE=65536 +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +# CONFIG_ARCH_INTERRUPTSTACK is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_FIRE_STM32V2=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="fire-stm32v2" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +# CONFIG_ARCH_BUTTONS is not set +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Board-Specific Options +# + +# +# M3 Wildfire Configuration +# + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_DEV_CONSOLE=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_WORKPRIORITY=192 +CONFIG_SCHED_WORKPERIOD=50000 +CONFIG_SCHED_WORKSTACKSIZE=1024 +CONFIG_SIG_SIGWORK=4 +# CONFIG_SCHED_LPWORK is not set +CONFIG_SCHED_WAITPID=y +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_DISABLE_ENVIRON is not set +CONFIG_DISABLE_POLL=y + +# +# Sizes of configurable things (0 disables) +# +CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASK_ARGS=4 +CONFIG_NPTHREAD_KEYS=4 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 + +# +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set + +# +# CAN Driver Options +# +# CONFIG_CAN is not set + +# +# PWM Driver Options +# +# CONFIG_PWM is not set + +# +# I2C Driver Options +# +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +CONFIG_I2C_TRANSFER=y +# CONFIG_I2C_WRITEREAD is not set +CONFIG_I2C_POLLED=y +# CONFIG_I2C_TRACE is not set + +# +# SPI Driver Options +# +CONFIG_SPI=y +# CONFIG_SPI_OWNBUS is not set +CONFIG_SPI_EXCHANGE=y +CONFIG_SPI_CMDDATA=y + +# +# RTC Driver Options +# +CONFIG_RTC=y +# CONFIG_RTC_DATETIME is not set +# CONFIG_RTC_HIRES is not set +# CONFIG_RTC_ALARM is not set + +# +# Watchdog Driver Options +# +# CONFIG_WATCHDOG is not set + +# +# Analog Driver Options +# +# CONFIG_ANALOG is not set + +# +# Block-to-Character Driver Support +# +# CONFIG_BCH is not set + +# +# Input device Driver Options +# +# CONFIG_INPUT is not set + +# +# LCD Driver Options +# +# CONFIG_LCD is not set + +# +# MMCSD Driver Options +# +CONFIG_MMCSD=y +CONFIG_MMCSD_NSLOTS=1 +# CONFIG_MMCSD_READONLY is not set +# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set +# CONFIG_MMCSD_MMCSUPPORT is not set +# CONFIG_MMCSD_HAVECARDDETECT is not set +CONFIG_MMCSD_SPI=y +CONFIG_MMCSD_SPICLOCK=20000000 +CONFIG_MMCSD_SDIO=y +# CONFIG_SDIO_MUXBUS is not set + +# +# I2C Driver Options +# +# CONFIG_MTD is not set + +# +# Network Device Driver Options +# +# CONFIG_NETDEVICES is not set +# CONFIG_NET_SLIP is not set + +# +# Pipe Options +# +# CONFIG_PIPES is not set + +# +# Power Management Options +# +# CONFIG_PM is not set +# CONFIG_POWER is not set + +# +# Sensor Driver Options +# +# CONFIG_SENSORS is not set + +# +# Osmocom-bb Sercomm Driver Options +# +# CONFIG_SERCOMM_CONSOLE is not set + +# +# Serial Driver Options +# +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_USART1=y +CONFIG_ARCH_HAVE_USART2=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_USART2_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 + +# +# USB Device Driver Options +# +CONFIG_USBDEV=y +# CONFIG_USBDEV_COMPOSITE is not set +# CONFIG_USBDEV_ISOCHRONOUS is not set +# CONFIG_USBDEV_DUALSPEED is not set +CONFIG_USBDEV_SELFPOWERED=y +# CONFIG_USBDEV_BUSPOWERED is not set +# CONFIG_USBDEV_TRACE is not set +# CONFIG_PL2303 is not set +# CONFIG_CDCACM is not set +CONFIG_USBMSC=y +CONFIG_USBMSC_EP0MAXPACKET=64 +CONFIG_USBMSC_EPBULKOUT=2 +CONFIG_USBMSC_EPBULKIN=5 +CONFIG_USBMSC_NWRREQS=2 +CONFIG_USBMSC_NRDREQS=2 +CONFIG_USBMSC_BULKINREQLEN=256 +CONFIG_USBMSC_BULKOUTREQLEN=256 +CONFIG_USBMSC_VENDORID=0x584e +CONFIG_USBMSC_VENDORSTR="NuttX" +CONFIG_USBMSC_PRODUCTID=0x5342 +CONFIG_USBMSC_PRODUCTSTR="USBdev Storage" +CONFIG_USBMSC_VERSIONNO=0x0399 +CONFIG_USBMSC_REMOVABLE=y + +# +# USB Host Driver Options +# +# CONFIG_USBHOST is not set + +# +# Wireless Device Driver Options +# +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +CONFIG_NET=y +# CONFIG_NET_NOINTS is not set +# CONFIG_NET_MULTIBUFFER is not set +# CONFIG_NET_IPv6 is not set +CONFIG_NSOCKET_DESCRIPTORS=0 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +CONFIG_NET_BUFSIZE=562 +# CONFIG_NET_TCPURGDATA is not set +CONFIG_NET_TCP=y +CONFIG_NET_TCP_CONNS=16 +CONFIG_NET_MAX_LISTENPORTS=16 +CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=8 +CONFIG_NET_TCP_RECVDELAY=0 +# CONFIG_NET_TCPBACKLOG is not set +CONFIG_NET_UDP=y +CONFIG_NET_UDP_CHECKSUMS=y +CONFIG_NET_UDP_CONNS=8 +CONFIG_NET_BROADCAST=y +CONFIG_NET_ICMP=y +# CONFIG_NET_ICMP_PING is not set +# CONFIG_NET_PINGADDRCONF is not set +# CONFIG_NET_IGMP is not set +CONFIG_NET_STATISTICS=y +CONFIG_NET_RECEIVE_WINDOW=562 +CONFIG_NET_ARPTAB_SIZE=16 +# CONFIG_NET_ARP_IPIN is not set + +# +# File Systems +# + +# +# File system configuration +# +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_NFS is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 + +# +# Library Routines +# +CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_HAVE_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +# CONFIG_HAVE_CXX is not set +# CONFIG_HAVE_CXXINITIALIZE is not set +# CONFIG_CXX_NEWLONG is not set + +# +# Application Configuration +# + +# +# Named Applications +# +CONFIG_NAMEDAPP=y + +# +# Examples +# + +# +# ADC example +# +# CONFIG_EXAMPLES_ADC is not set + +# +# Buttons example +# +# CONFIG_EXAMPLES_BUTTONS is not set + +# +# CAN example +# +# CONFIG_EXAMPLES_CAN is not set + +# +# USB CDC/ACM class driver example +# +# CONFIG_EXAMPLES_CDCACM is not set + +# +# USB composite class driver example +# +# CONFIG_EXAMPLES_COMPOSITE is not set + +# +# DHCP server example +# +# CONFIG_EXAMPLES_DHCPD is not set + +# +# FTP client example +# +# CONFIG_EXAMPLES_FTPC is not set + +# +# FTP server example +# +# CONFIG_EXAMPLES_FTPD is not set + +# +# "Hello, World!" example +# +# CONFIG_EXAMPLES_HELLO is not set + +# +# "Hello, World!" C++ example +# +# CONFIG_EXAMPLES_HELLOXX is not set + +# +# USB HID keyboard example +# +# CONFIG_EXAMPLES_HIDKBD is not set + +# +# IGMP example +# +# CONFIG_EXAMPLES_IGMP is not set + +# +# LCD read/write example +# +# CONFIG_EXAMPLES_LCDRW is not set + +# +# Memory management example +# +# CONFIG_EXAMPLES_MM is not set + +# +# File system mount example +# +# CONFIG_EXAMPLES_MOUNT is not set + +# +# FreeModBus example +# +# CONFIG_EXAMPLES_MODBUS is not set + +# +# Network test example +# +# CONFIG_EXAMPLES_NETTEST is not set + +# +# NuttShell (NSH) example +# +CONFIG_EXAMPLES_NSH=y + +# +# NULL example +# +# CONFIG_EXAMPLES_NULL is not set + +# +# NX graphics example +# +# CONFIG_EXAMPLES_NX is not set + +# +# NxConsole example +# +# CONFIG_EXAMPLES_NXCONSOLE is not set + +# +# NXFFS file system example +# +# CONFIG_EXAMPLES_NXFFS is not set + +# +# NXFLAT example +# +# CONFIG_EXAMPLES_NXFLAT is not set + +# +# NX graphics "Hello, World!" example +# +# CONFIG_EXAMPLES_NXHELLO is not set + +# +# NX graphics image example +# +# CONFIG_EXAMPLES_NXIMAGE is not set + +# +# NX graphics lines example +# +# CONFIG_EXAMPLES_NXLINES is not set + +# +# NX graphics text example +# +# CONFIG_EXAMPLES_NXTEXT is not set + +# +# OS test example +# +# CONFIG_EXAMPLES_OSTEST is not set + +# +# Pascal "Hello, World!"example +# +# CONFIG_EXAMPLES_PASHELLO is not set + +# +# Pipe example +# +# CONFIG_EXAMPLES_PIPE is not set + +# +# Poll example +# +# CONFIG_EXAMPLES_POLL is not set + +# +# Pulse width modulation (PWM) example +# + +# +# Quadrature encoder example +# +# CONFIG_EXAMPLES_QENCODER is not set + +# +# RGMP example +# +# CONFIG_EXAMPLES_RGMP is not set + +# +# ROMFS example +# +# CONFIG_EXAMPLES_ROMFS is not set + +# +# sendmail example +# +# CONFIG_EXAMPLES_SENDMAIL is not set + +# +# Serial loopback example +# +# CONFIG_EXAMPLES_SERLOOP is not set + +# +# Telnet daemon example +# +# CONFIG_EXAMPLES_TELNETD is not set + +# +# THTTPD web server example +# +# CONFIG_EXAMPLES_THTTPD is not set + +# +# TIFF generation example +# +# CONFIG_EXAMPLES_TIFF is not set + +# +# Touchscreen example +# +# CONFIG_EXAMPLES_TOUCHSCREEN is not set + +# +# UDP example +# +# CONFIG_EXAMPLES_UDP is not set + +# +# uIP web server example +# +# CONFIG_EXAMPLES_UIP is not set + +# +# USB serial test example +# +# CONFIG_EXAMPLES_USBSERIAL is not set + +# +# USB mass storage class example +# +CONFIG_EXAMPLES_USBMSC=y +CONFIG_EXAMPLES_USBMSC_BUILTIN=y +CONFIG_EXAMPLES_USBMSC_NLUNS=1 +CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 +CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_EXAMPLES_USBMSC_DEVMINOR2=1 +CONFIG_EXAMPLES_USBMSC_DEVPATH2="/dev/mmcsd1" +CONFIG_EXAMPLES_USBMSC_DEVMINOR3=2 +CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" +# CONFIG_EXAMPLES_USBMSC_DEBUGMM is not set +# CONFIG_EXAMPLES_USBMSC_TRACEINIT is not set +# CONFIG_EXAMPLES_USBMSC_TRACECLASS is not set +# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS is not set +# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER is not set +# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS is not set + +# +# USB serial terminal example +# +# CONFIG_EXAMPLES_USBTERM is not set + +# +# Watchdog timer example +# +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# wget example +# +# CONFIG_EXAMPLES_WGET is not set + +# +# WLAN example +# +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_FICL is not set +# CONFIG_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# + +# +# DHCP client +# +# CONFIG_NETUTILS_DHCPC is not set + +# +# DHCP server +# +# CONFIG_NETUTILS_DHCPD is not set + +# +# FTP client +# +# CONFIG_NETUTILS_FTPC is not set + +# +# FTP server +# +# CONFIG_NETUTILS_FTPD is not set + +# +# Name resolution +# +CONFIG_NETUTILS_RESOLV=y +CONFIG_NET_RESOLV_ENTRIES=8 + +# +# SMTP +# +# CONFIG_NETUTILS_SMTP is not set + +# +# TFTP client +# +CONFIG_NETUTILS_TELNETD=y + +# +# TFTP client +# +CONFIG_NETUTILS_TFTPC=y + +# +# THTTPD web server +# +# CONFIG_NETUTILS_THTTPD is not set + +# +# uIP support library +# +CONFIG_NETUTILS_UIPLIB=y + +# +# uIP web client +# +CONFIG_NETUTILS_WEBCLIENT=y + +# +# uIP web server +# +# CONFIG_NETUTILS_WEBSERVER is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_NSFMOUNT is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PING is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_USBCONSOLE is not set +# CONFIG_NSH_CONDEV is not set +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_TELNET=y +CONFIG_NSH_TELNETD_PORT=23 +CONFIG_NSH_TELNETD_DAEMONPRIO=100 +CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 +CONFIG_NSH_TELNETD_CLIENTPRIO=100 +CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 +CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_DHCPC is not set +CONFIG_NSH_IPADDR=0x0a000002 +CONFIG_NSH_DRIPADDR=0x0a000001 +CONFIG_NSH_NETMASK=0xffffff00 +# CONFIG_NSH_NOMAC is not set + +# +# System NSH Add-Ons +# + +# +# Custom free memory command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# +CONFIG_SYSTEM_I2CTOOL=y +CONFIG_I2CTOOL_BUILTIN=y +CONFIG_I2CTOOL_MINBUS=1 +CONFIG_I2CTOOL_MAXBUS=2 +CONFIG_I2CTOOL_MINADDR=0x03 +CONFIG_I2CTOOL_MAXADDR=0x77 +CONFIG_I2CTOOL_MAXREGADDR=0xff +CONFIG_I2CTOOL_DEFFREQ=100000 + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() support +# +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y + +# +# VSN board Add-Ons +# + +# +# VSN board add-ons +# +# CONFIG_VSN_POWEROFF is not set +# CONFIG_VSN_RAMTRON is not set +# CONFIG_VSN_SDCARD is not set +# CONFIG_VSN_SYSINFO is not set diff --git a/nuttx/configs/fire-stm32v2/src/up_nsh.c b/nuttx/configs/fire-stm32v2/src/up_nsh.c index 8aa092df6b..f728a227a0 100644 --- a/nuttx/configs/fire-stm32v2/src/up_nsh.c +++ b/nuttx/configs/fire-stm32v2/src/up_nsh.c @@ -139,7 +139,7 @@ int nsh_archinitialize(void) /* Initialize the SDIO-based MMC/SD slot */ - ret = stm32_sdinitialze(CONFIG_NSH_MMCSDMINOR); + ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); if (ret < 0) { message("nsh_archinitialize: Failed to initialize MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c index 50fd58bb49..085542b130 100644 --- a/nuttx/configs/fire-stm32v2/src/up_spi.c +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -170,6 +170,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele stm32_gpiowrite(GPIO_FLASH_CS, !selected); } else +#endif #ifdef CONFIG_NET_ENC28J60 if (devid == SPIDEV_ETHERNET) { diff --git a/nuttx/configs/fire-stm32v2/src/up_usbdev.c b/nuttx/configs/fire-stm32v2/src/up_usbdev.c index 3222866d33..e335edd432 100644 --- a/nuttx/configs/fire-stm32v2/src/up_usbdev.c +++ b/nuttx/configs/fire-stm32v2/src/up_usbdev.c @@ -74,9 +74,11 @@ void stm32_usbinitialize(void) { - /* USB Soft Connect Pullup: PB.14 */ + /* USB Soft Connect Pullup */ +#if 0 /* REVISIT */ stm32_configgpio(GPIO_USB_PULLUP); +#endif } /************************************************************************************ @@ -94,7 +96,9 @@ void stm32_usbinitialize(void) int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); +#if 0 /* REVISIT */ stm32_gpiowrite(GPIO_USB_PULLUP, !enable); +#endif return OK; } diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 2030b232be..7aa442e12e 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -79,9 +79,16 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 # # STM32 Configuration Options # -# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set # CONFIG_ARCH_CHIP_STM32F103RET6 is not set # CONFIG_ARCH_CHIP_STM32F103VCT6 is not set +# CONFIG_ARCH_CHIP_STM32F103VET6 is not set +# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set # CONFIG_ARCH_CHIP_STM32F105VBT7 is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -184,6 +191,7 @@ CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004 # Architecture Options # # CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set CONFIG_ARCH_STACKDUMP=y # @@ -292,30 +300,70 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # # Device Drivers # - -# -# Device Driver Configuration -# CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set # CONFIG_LOOP is not set # CONFIG_RAMDISK is not set + +# +# CAN Driver Options +# # CONFIG_CAN is not set + +# +# PWM Driver Options +# # CONFIG_PWM is not set + +# +# I2C Driver Options +# # CONFIG_I2C is not set + +# +# SPI Driver Options +# CONFIG_SPI=y # CONFIG_SPI_OWNBUS is not set CONFIG_SPI_EXCHANGE=y CONFIG_SPI_CMDDATA=y + +# +# RTC Driver Options +# CONFIG_RTC=y # CONFIG_RTC_DATETIME is not set # CONFIG_RTC_HIRES is not set # CONFIG_RTC_ALARM is not set + +# +# Watchdog Driver Options +# # CONFIG_WATCHDOG is not set + +# +# Analog Driver Options +# # CONFIG_ANALOG is not set + +# +# Block-to-Character Driver Support +# # CONFIG_BCH is not set + +# +# Input device Driver Options +# # CONFIG_INPUT is not set + +# +# LCD Driver Options +# # CONFIG_LCD is not set + +# +# MMCSD Driver Options +# CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -325,14 +373,42 @@ CONFIG_MMCSD_HAVECARDDETECT=y CONFIG_MMCSD_SPI=y CONFIG_MMCSD_SPICLOCK=12500000 # CONFIG_MMCSD_SDIO is not set + +# +# I2C Driver Options +# # CONFIG_MTD is not set + +# +# Network Device Driver Options +# # CONFIG_NETDEVICES is not set # CONFIG_NET_SLIP is not set + +# +# Pipe Options +# # CONFIG_PIPES is not set + +# +# Power Management Options +# # CONFIG_PM is not set # CONFIG_POWER is not set + +# +# Sensor Driver Options +# # CONFIG_SENSORS is not set + +# +# Osmocom-bb Sercomm Driver Options +# # CONFIG_SERCOMM_CONSOLE is not set + +# +# Serial Driver Options +# CONFIG_SERIAL=y # CONFIG_LOWLEVEL_CONSOLE is not set # CONFIG_16550_UART is not set @@ -351,17 +427,33 @@ CONFIG_USART2_BAUD=115200 CONFIG_USART2_BITS=8 CONFIG_USART2_PARITY=0 CONFIG_USART2_2STOP=0 + +# +# USB Device Driver Options +# # CONFIG_USBDEV is not set + +# +# USB Host Driver Options +# # CONFIG_USBHOST is not set + +# +# Wireless Device Driver Options +# # CONFIG_WIRELESS is not set +# +# System Logging Device Options +# + # # System Logging # # CONFIG_RAMLOG is not set # -# Networking support +# Networking Support # CONFIG_NET=y # CONFIG_NET_NOINTS is not set @@ -393,7 +485,7 @@ CONFIG_NET_ARPTAB_SIZE=16 # CONFIG_NET_ARP_IPIN is not set # -# File systems +# File Systems # # @@ -415,13 +507,13 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_SYSLOG is not set # -# Memory management +# Memory Management # # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=1 # -# Library routines +# Library Routines # CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y @@ -445,7 +537,7 @@ CONFIG_HAVE_CXX=y # CONFIG_CXX_NEWLONG is not set # -# Application configuration +# Application Configuration # # diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig index 465a62b618..9f7fab9fc4 100644 --- a/nuttx/drivers/Kconfig +++ b/nuttx/drivers/Kconfig @@ -3,8 +3,6 @@ # see misc/tools/kconfig-language.txt. # -comment "Device Driver Configuration" - config DEV_NULL bool "Enable /dev/null" default y @@ -22,15 +20,17 @@ config LOOP loteardown() in include/nuttx/fs/fs.h. config RAMDISK - bool "RAM disk support" + bool "RAM Disk Support" default n ---help--- Can be used to set up a block of memory or (read-only) FLASH as a block driver that can be mounted as a files system. See include/nuttx/ramdisk.h. +comment "CAN Driver Options" + config CAN - bool "CAN support" + bool "CAN Support" default n ---help--- This selection enables building of the "upper-half" CAN driver. @@ -65,8 +65,10 @@ config CAN_LOOPBACK endif +comment "PWM Driver Options" + config PWM - bool "PWM support" + bool "PWM Support" default n ---help--- This selection enables building of the "upper-half" PWM driver. @@ -74,7 +76,7 @@ config PWM if PWM config PWM_PULSECOUNT - bool "PWM pulse count support" + bool "PWM Pulse Count Support" default n ---help--- Some hardware will support generation of a fixed number of pulses. This @@ -84,18 +86,49 @@ config PWM_PULSECOUNT endif +comment "I2C Driver Options" + config I2C - bool "I2C support" + bool "I2C Support" default n ---help--- This selection enables building of the "upper-half" I2C driver. See include/nuttx/i2c.h for further I2C driver information. -if I2C -endif +config I2C_SLAVE + bool "I2C Slave" + default n + depends on I2C + +config I2C_TRANSFER + bool "Support the I2C transfer() method" + default n + depends on I2C + +config I2C_WRITEREAD + bool "Support the I2C writeread() method" + default n + depends on I2C + +config I2C_POLLED + bool "Polled I2C (no interrupts)" + default n + depends on I2C + +config I2C_TRACE + bool "Enable I2C trace debug" + default n + depends on I2C + +config I2C_NTRACE + bool "Enable I2C trace debug" + default n + depends on I2C_TRACE + +comment "SPI Driver Options" config SPI - bool "SPI support" + bool "SPI Support" default n ---help--- This selection enables building of the "upper-half" SPI driver. @@ -104,7 +137,7 @@ config SPI if SPI config SPI_OWNBUS bool "SPI single device" - default y + default n ---help--- Set if there is only one active device on the SPI bus. No locking or SPI configuration will be performed. It is not necessary for clients to lock, @@ -126,8 +159,10 @@ config SPI_CMDDATA endif +comment "RTC Driver Options" + config RTC - bool "RTC support" + bool "RTC Support" default n ---help--- This selection enables configuration of a real time clock (RTCdriver. @@ -135,7 +170,7 @@ config RTC Most RTC drivers are MCU specific and may require other specific settings. config RTC_DATETIME - bool "Date/Time RTC support" + bool "Date/Time RTC Support" default n depends on RTC ---help--- @@ -147,7 +182,7 @@ config RTC_DATETIME timer provides for higher resolution time. config RTC_HIRES - bool "Hi-Res RTC support" + bool "Hi-Res RTC Support" default n depends on RTC && !RTC_DATETIME ---help--- @@ -172,15 +207,17 @@ config RTC_FREQUENCY to be one Hz. config RTC_ALARM - bool "RTC alarm support" + bool "RTC Alarm Support" default n depends on RTC ---help--- Enable if the RTC hardware supports setting of an alarm. A callback function will be executed when the alarm goes off. +comment "Watchdog Driver Options" + config WATCHDOG - bool "Watchdog timer support" + bool "Watchdog Timer Support" default n ---help--- This selection enables building of the "upper-half" watchdog timer driver. @@ -189,8 +226,10 @@ config WATCHDOG if WATCHDOG endif +comment "Analog Driver Options" + menuconfig ANALOG - bool "Analog Device(ADC/DAC) support" + bool "Analog Device(ADC/DAC) Support" default n ---help--- This directory holds implementations of analog device drivers. @@ -202,8 +241,10 @@ if ANALOG source drivers/analog/Kconfig endif +comment "Block-to-Character Driver Support" + config BCH - bool "BCH support" + bool "Block-to-Character (BCH) Support" default n ---help--- Contains logic that may be used to convert a block driver into @@ -215,8 +256,10 @@ if BCH source drivers/bch/Kconfig endif +comment "Input device Driver Options" + menuconfig INPUT - bool "Input device support" + bool "Input Device Support" default n ---help--- This directory holds implementations of input device drivers. @@ -227,8 +270,10 @@ if INPUT source drivers/input/Kconfig endif +comment "LCD Driver Options" + menuconfig LCD - bool "LCD support" + bool "LCD Support" default n select NX_LCDDRIVER ---help--- @@ -243,8 +288,10 @@ if LCD source drivers/lcd/Kconfig endif +comment "MMCSD Driver Options" + menuconfig MMCSD - bool "MMC/SD support" + bool "MMC/SD Support" default n ---help--- Support for MMC/SD block drivers. MMC/SD block drivers based on @@ -254,9 +301,11 @@ menuconfig MMCSD if MMCSD source drivers/mmcsd/Kconfig endif - + +comment "I2C Driver Options" + menuconfig MTD - bool "Memory Technology Device (MTD) support" + bool "Memory Technology Device (MTD) Support" default n ---help--- Memory Technology Device (MTD) drivers. Some simple drivers for @@ -272,8 +321,10 @@ if MTD source drivers/mtd/Kconfig endif +comment "Network Device Driver Options" + menuconfig NETDEVICES - bool "Network Device support" + bool "Network Device Support" default n ---help--- Network interface drivers. See also include/nuttx/net/net.h @@ -282,6 +333,8 @@ if NETDEVICES source drivers/net/Kconfig endif +comment "Pipe Options" + menuconfig PIPES bool "FIFO and named pipe drivers" default n @@ -293,6 +346,8 @@ if PIPES source drivers/pipes/Kconfig endif +comment "Power Management Options" + config PM bool "Power management (PM) driver interfaces" default n @@ -303,7 +358,7 @@ config PM drivers are not active. menuconfig POWER - bool "Power management device support" + bool "Power Management Support" default n ---help--- Enable building of power-related devices (battery monitors, chargers, etc). @@ -312,8 +367,10 @@ if POWER source drivers/power/Kconfig endif +comment "Sensor Driver Options" + menuconfig SENSORS - bool "Sensors support" + bool "Sensors Support" default n ---help--- Drivers for various sensors @@ -322,6 +379,8 @@ if SENSORS source drivers/sensors/Kconfig endif +comment "Osmocom-bb Sercomm Driver Options" + menuconfig SERCOMM_CONSOLE bool "Osmocom-bb serial console" default n @@ -339,8 +398,10 @@ if SERCOMM source drivers/sercomm/Kconfig endif +comment "Serial Driver Options" + menuconfig SERIAL - bool "Serial support" + bool "Serial Support" default y ---help--- Front-end character drivers for chip-specific UARTs. This provide @@ -351,8 +412,10 @@ if SERIAL source drivers/serial/Kconfig endif +comment "USB Device Driver Options" + menuconfig USBDEV - bool "USB device support" + bool "USB Device Support" default n ---help--- USB device drivers. See also include/nuttx/usb/usbdev.h @@ -361,8 +424,10 @@ if USBDEV source drivers/usbdev/Kconfig endif +comment "USB Host Driver Options" + menuconfig USBHOST - bool "USB Host support" + bool "USB Host Support" default n ---help--- USB host drivers. See also include/nuttx/usb/usbhost.h @@ -371,8 +436,10 @@ if USBHOST source drivers/usbhost/Kconfig endif +comment "Wireless Device Driver Options" + menuconfig WIRELESS - bool "Wireless support" + bool "Wireless Support" default n ---help--- Drivers for various wireless devices. @@ -381,6 +448,8 @@ if WIRELESS source drivers/wireless/Kconfig endif +comment "System Logging Device Options" + source drivers/syslog/Kconfig diff --git a/nuttx/drivers/usbdev/Kconfig b/nuttx/drivers/usbdev/Kconfig index a742994145..4930b9d21e 100644 --- a/nuttx/drivers/usbdev/Kconfig +++ b/nuttx/drivers/usbdev/Kconfig @@ -75,8 +75,7 @@ config USBDEV_DUALSPEED bool "Enable high and full speed" default n ---help--- - Hardware handles high and full speed - operation (USB 2.0) + Hardware handles high and full speed operation (USB 2.0) choice USBDEV_POWERED prompt "Select USB device powered" @@ -84,14 +83,12 @@ choice USBDEV_POWERED config USBDEV_SELFPOWERED bool "Self powerd" ---help--- - Will cause USB features to indicate - that the device is self-powered + Will cause USB features to indicate that the device is self-powered config USBDEV_BUSPOWERED bool "Bus powerd" ---help--- - Will cause USB features to indicate - that the device is self-powered + Will cause USB features to indicate that the device is self-powered endchoice @@ -450,6 +447,10 @@ config USBMSC_PRODUCTSTR string "Mass stroage product string" default "Mass stroage" +config USBMSC_VERSIONNO + hex "USB MSC Version Number" + default "0x399" + config USBMSC_REMOVABLE bool "Mass stroage remove able" default n From de7764b1d4d19619ea042dd297f6e76c6300db7b Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 13:19:59 +0000 Subject: [PATCH 47/95] AVR corrections from Richard Cochran; uIP webserver enhancements from Kate git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5126 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 4 +- apps/netutils/webserver/Kconfig | 37 ++++++- apps/netutils/webserver/Makefile | 4 +- apps/netutils/webserver/httpd.c | 26 ++++- apps/netutils/webserver/httpd.h | 16 ++- apps/netutils/webserver/httpd_sendfile.c | 128 ++++++++++++++++++++++ nuttx/ChangeLog | 2 + nuttx/arch/avr/src/Makefile | 3 +- nuttx/arch/avr/src/avr32/avr32_internal.h | 2 +- nuttx/arch/avr/src/avr32/up_copystate.c | 2 + 10 files changed, 210 insertions(+), 14 deletions(-) create mode 100644 apps/netutils/webserver/httpd_sendfile.c diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index da56f5f3e0..833a62cd11 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -316,4 +316,6 @@ (submiteed by Kate). * apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap() length is zero (submitted by Kate). - + * apps/netutils/webserver/httpd_sendfile.c: Add and option, + CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX + sendfile() interface. diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig index c3ebe755d5..fd17a6a97e 100644 --- a/apps/netutils/webserver/Kconfig +++ b/apps/netutils/webserver/Kconfig @@ -15,7 +15,8 @@ if NETUTILS_WEBSERVER config NETUTILS_HTTPD_SCRIPT_DISABLE bool "Disable %! scripting" - default n + default y if NETUTILS_HTTPD_SENDFILE + default n if !NETUTILS_HTTPD_SENDFILE ---help--- This option, if selected, will elide the %! scripting @@ -52,10 +53,40 @@ config NETUTILS_HTTPD_SERVERHEADER_DISABLE ---help--- This option, if selected, will elide the Server\: header +choice + prompt "File Transfer Method" + default NETUTILS_HTTPD_CLASSIC + +config NETUTILS_HTTPD_CLASSIC + bool "Pre-processed files" + ---help--- + Traditionally, the uIP-based webserver only sends "files" that have + been prepared as a data structure using nutts/tools/mkfsdata.pl + config NETUTILS_HTTPD_MMAP bool "File mmap-ing" - default n ---help--- - Replaces standard uIP server file open operations with mmap-ing operations. + Traditionally, the uIP-based webserver only sends "files" that have + been prepared as a data structure using nutts/tools/mkfsdata.pl + However, extensions have been contributed. If this option is + selected, then files can be accessed from the NuttX file system + as well. This selection will map the files into memory (using mmap) + so that the logic is still basically compatible with the classic + approach. + +config NETUTILS_HTTPD_MMAP + bool "sendfile()" + select NETUTILS_HTTPD_SCRIPT_DISABLE + ---help--- + Traditionally, the uIP-based webserver only sends "files" that have + been prepared as a data structure using nutts/tools/mkfsdata.pl + However, extensions have been contributed. If this option is + selected, then files can be accessed from the NuttX file system + as well. This selection will use the NuttX sendfile() interface + to send files. NOTE: if this option is selected, then scripting + must be disabled. + +endchoice + endif diff --git a/apps/netutils/webserver/Makefile b/apps/netutils/webserver/Makefile index 6d96c8fc5f..4b1f2f9f3c 100644 --- a/apps/netutils/webserver/Makefile +++ b/apps/netutils/webserver/Makefile @@ -44,7 +44,9 @@ CSRCS = ifeq ($(CONFIG_NET_TCP),y) CSRCS = httpd.c httpd_cgi.c -ifeq ($(CONFIG_NETUTILS_HTTPD_MMAP),y) +ifeq ($(CONFIG_NETUTILS_HTTPD_SENDFILE),y) +CSRCS += httpd_sendfile.c +else ifeq ($(CONFIG_NETUTILS_HTTPD_MMAP),y) CSRCS += httpd_mmap.c else CSRCS += httpd_fs.c diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index 2fd0191573..0c0ee0389d 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -69,6 +69,14 @@ * Pre-processor Definitions ****************************************************************************/ +#if !defined(CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE) && defined(CONFIG_NETUTILS_HTTPD_SENDFILE) +# error "Script support and CONFIG_NETUTILS_HTTPD_SENDFILE are mutually exclusive" +#endif + +#if defined(CONFIG_NETUTILS_HTTPD_SENDFILE) && defined(CONFIG_NETUTILS_HTTPD_MMAP) +# error "CONFIG_NETUTILS_HTTPD_SENDFILE and CONFIG_NETUTILS_HTTPD_MMAP are mutually exclusive" +#endif + #define ISO_nl 0x0a #define ISO_space 0x20 #define ISO_bang 0x21 @@ -131,7 +139,9 @@ static const char g_httpheader404[] = static int httpd_open(const char *name, struct httpd_fs_file *file) { -#ifdef CONFIG_NETUTILS_HTTPD_MMAP +#if defined(CONFIG_NETUTILS_HTTPD_SENDFILE) + return httpd_sendfile_open(name, file); +#elif defined(CONFIG_NETUTILS_HTTPD_MMAP) return httpd_mmap_open(name, file); #else return httpd_fs_open(name, file); @@ -140,7 +150,9 @@ static int httpd_open(const char *name, struct httpd_fs_file *file) static int httpd_close(struct httpd_fs_file *file) { -#ifdef CONFIG_NETUTILS_HTTPD_MMAP +#if defined(CONFIG_NETUTILS_HTTPD_SENDFILE) + return httpd_sendfile_close(file); +#elif defined(CONFIG_NETUTILS_HTTPD_MMAP) return httpd_mmap_close(file); #else return OK; @@ -424,7 +436,11 @@ static int httpd_sendfile(struct httpd_state *pstate) if (send_headers(pstate, g_httpheader404, strlen(g_httpheader404)) == OK) { +#ifdef CONFIG_NETUTILS_HTTPD_SENDFILE + ret = httpd_sendfile_send(pstate->ht_sockfd, &pstate->ht_file); +#else ret = httpd_addchunk(pstate, pstate->ht_file.data, pstate->ht_file.len); +#endif } } else @@ -447,7 +463,11 @@ static int httpd_sendfile(struct httpd_state *pstate) else #endif { +#ifdef CONFIG_NETUTILS_HTTPD_SENDFILE + ret = httpd_sendfile_send(pstate->ht_sockfd, &pstate->ht_file); +#else ret = httpd_addchunk(pstate, pstate->ht_file.data, pstate->ht_file.len); +#endif } } } @@ -603,7 +623,7 @@ int httpd_listen(void) void httpd_init(void) { -#ifndef CONFIG_NETUTILS_HTTPD_MMAP +#if !defined(CONFIG_NETUTILS_HTTPD_MMAP) && !defined(CONFIG_NETUTILS_HTTPD_SENDFILE) httpd_fs_init(); #endif } diff --git a/apps/netutils/webserver/httpd.h b/apps/netutils/webserver/httpd.h index 42a1e13f76..dbe3d0e206 100644 --- a/apps/netutils/webserver/httpd.h +++ b/apps/netutils/webserver/httpd.h @@ -58,12 +58,22 @@ /* 'file' must be allocated by caller and will be filled in by the function. */ +#if defined(CONFIG_NETUTILS_HTTPD_SENDFILE) + +int httpd_sendfile_open(const char *name, struct httpd_fs_file *file); +int httpd_sendfile_close(struct httpd_fs_file *file); +int httpd_sendfile_send(int outfd, struct httpd_fs_file *file); + +#elif defined(CONFIG_NETUTILS_HTTPD_MMAP) + +int httpd_mmap_open(const char *name, struct httpd_fs_file *file); +int httpd_mmap_close(struct httpd_fs_file *file); + +#else + int httpd_fs_open(const char *name, struct httpd_fs_file *file); void httpd_fs_init(void); -#ifdef CONFIG_NETUTILS_HTTPD_MMAP -int httpd_mmap_open(const char *name, struct httpd_fs_file *file); -int httpd_mmap_close(struct httpd_fs_file *file); #endif #endif /* _NETUTILS_WEBSERVER_HTTPD_H */ diff --git a/apps/netutils/webserver/httpd_sendfile.c b/apps/netutils/webserver/httpd_sendfile.c new file mode 100644 index 0000000000..6a6ec24ab3 --- /dev/null +++ b/apps/netutils/webserver/httpd_sendfile.c @@ -0,0 +1,128 @@ +/**************************************************************************** + * netutils/webserver/httpd_mmap.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Header Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "httpd.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +int httpd_sendfile_open(const char *name, struct httpd_fs_file *file) +{ + char path[PATH_MAX]; + struct stat st; + + if (sizeof path < snprintf(path, sizeof path, "%s%s", + CONFIG_NETUTILS_HTTPD_PATH, name)) + { + errno = ENAMETOOLONG; + return ERROR; + } + + /* XXX: awaiting fstat to avoid a race */ + + if (-1 == stat(path, &st)) + { + return ERROR; + } + + if (st.st_size > INT_MAX || st.st_size > SIZE_MAX) + { + errno = EFBIG; + return ERROR; + } + + file->len = (int) st.st_size; + + file->fd = open(path, O_RDONLY); + if (file->fd == -1) + { + return ERROR; + } + + return OK; +} + +int httpd_sendfile_close(struct httpd_fs_file *file) +{ + if (-1 == close(file->fd)) + { + return ERROR; + } + + return OK; +} + +int httpd_sendfile_send(int outfd, struct httpd_fs_file *file) +{ + if (-1 == sendfile(outfd, file->fd, 0, file->len)) + { + return ERROR; + } + + return OK; +} + diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 26e3621291..f1780c3234 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3307,4 +3307,6 @@ (Noted by Ronen Vainish). * fs/mmap/fs_rammap.c: Fix logic error and errno check (contributed by Kate). + * arch/avr/src: Fixes from AVR32 build errors that have crept in + over the time; incorporated Kconfig for AVR3 (Richard Cochran). diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile index 7034ef8f40..b72a6c8a8d 100644 --- a/nuttx/arch/avr/src/Makefile +++ b/nuttx/arch/avr/src/Makefile @@ -40,8 +40,7 @@ ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src ifeq ($(CONFIG_ARCH_AVR32),y) ARCH_SUBDIR = avr32 -endif -ifeq ($(CONFIG_ARCH_AVR),y) +else ifeq ($(CONFIG_ARCH_AVR),y) ARCH_SUBDIR = avr endif diff --git a/nuttx/arch/avr/src/avr32/avr32_internal.h b/nuttx/arch/avr/src/avr32/avr32_internal.h index 56065edceb..332b0918e6 100644 --- a/nuttx/arch/avr/src/avr32/avr32_internal.h +++ b/nuttx/arch/avr/src/avr32/avr32_internal.h @@ -69,7 +69,7 @@ * structure. If is non-NULL only during interrupt processing. */ -extern volatile uint32_ *current_regs; +extern volatile uint32_t *current_regs; /* This is the beginning of heap as provided from up_head.S. This is the first * address in DRAM after the loaded program+bss+idle stack. The end of the diff --git a/nuttx/arch/avr/src/avr32/up_copystate.c b/nuttx/arch/avr/src/avr32/up_copystate.c index e3e4da0544..67640f8cce 100644 --- a/nuttx/arch/avr/src/avr32/up_copystate.c +++ b/nuttx/arch/avr/src/avr32/up_copystate.c @@ -41,6 +41,8 @@ #include +#include + #include "up_internal.h" /**************************************************************************** From 648420e67a546b33400fd2fe5b6a50410276ae3d Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 13:53:44 +0000 Subject: [PATCH 48/95] Add support for DMA memory allocator to FAT file system git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5127 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/netutils/webserver/Kconfig | 10 +++++----- nuttx/ChangeLog | 6 ++++++ nuttx/fs/fat/Kconfig | 19 ++++++++++++++++++- nuttx/fs/fat/fs_fat32.c | 7 ++++--- nuttx/fs/fat/fs_fat32.h | 28 ++++++++++++++++++++++++++++ nuttx/fs/fat/fs_fat32util.c | 4 ++-- nuttx/include/nuttx/fs/fat.h | 30 +++++++++++++++++++++++++++++- 7 files changed, 92 insertions(+), 12 deletions(-) diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig index fd17a6a97e..6afbda4b35 100644 --- a/apps/netutils/webserver/Kconfig +++ b/apps/netutils/webserver/Kconfig @@ -72,7 +72,8 @@ config NETUTILS_HTTPD_MMAP selected, then files can be accessed from the NuttX file system as well. This selection will map the files into memory (using mmap) so that the logic is still basically compatible with the classic - approach. + approach. NOTE, however, that since files are copied into memory, + this limits solution to small files that will fit into available RAM. config NETUTILS_HTTPD_MMAP bool "sendfile()" @@ -83,10 +84,9 @@ config NETUTILS_HTTPD_MMAP However, extensions have been contributed. If this option is selected, then files can be accessed from the NuttX file system as well. This selection will use the NuttX sendfile() interface - to send files. NOTE: if this option is selected, then scripting - must be disabled. + to send files. NOTE: If this option is selected, then scripting + must be disabled since it depends on the classic, in-memory + representation. endchoice - - endif diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index f1780c3234..f56e14c048 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3309,4 +3309,10 @@ by Kate). * arch/avr/src: Fixes from AVR32 build errors that have crept in over the time; incorporated Kconfig for AVR3 (Richard Cochran). + * fs/fat and include/nuttx/fs/fat.h: The FAT file system allocates + memory for sector I/O buffers used to exchange data with the + configured block driver. In some contexts, the block driver may + require DMA-capable memory. If CONFIG_FAT_DMAMEMORY is defined, + then the FAT FS will use platform-provided DMA memory allocators + to allocate the block driver I/O buffers. diff --git a/nuttx/fs/fat/Kconfig b/nuttx/fs/fat/Kconfig index fed054b5b3..1de613ce4b 100644 --- a/nuttx/fs/fat/Kconfig +++ b/nuttx/fs/fat/Kconfig @@ -41,9 +41,26 @@ config FAT_MAXFNAME config FS_FATTIME bool "FAT timestamps" default n - ---help--- + ---help--- Support FAT date and time. NOTE: There is not much sense in supporting FAT date and time unless you have a hardware RTC or other way to get the time and date. +config FAT_DMAMEMORY + bool "DMA memory allocator" + default n + ---help--- + The FAT file system allocates two I/O buffers for data transfer, each + are the size of one device sector. One of the buffers is allocated + once for each FAT volume that is mounted; the other buffers are + allocated each time a FAT file is opened. + + Some hardware, however, may require special DMA-capable memory in + order to perform the the transfers. If FAT_DMAMEMORY is defined + then the architecture-specific hardware must provide the funtions + fat_dma_alloc() and fat_dma_free(): fat_dmalloc() will allocate + DMA-capable memory of the specified size; fat_dmafree() is the + corresponding function that will be called to free the DMA-capable + memory. + endif diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c index 7b7ce1f5f7..60622e2f7b 100644 --- a/nuttx/fs/fat/fs_fat32.c +++ b/nuttx/fs/fat/fs_fat32.c @@ -302,7 +302,7 @@ static int fat_open(FAR struct file *filep, const char *relpath, /* Create a file buffer to support partial sector accesses */ - ff->ff_buffer = (uint8_t*)kmalloc(fs->fs_hwsectorsize); + ff->ff_buffer = (uint8_t*)fat_io_alloc(fs->fs_hwsectorsize); if (!ff->ff_buffer) { ret = -ENOMEM; @@ -405,7 +405,7 @@ static int fat_close(FAR struct file *filep) if (ff->ff_buffer) { - kfree(ff->ff_buffer); + fat_io_free(ff->ff_buffer); } /* Then free the file structure itself. */ @@ -1651,8 +1651,9 @@ static int fat_unbind(void *handle, FAR struct inode **blkdriver) if (fs->fs_buffer) { - kfree(fs->fs_buffer); + fat_io_free(fs->fs_buffer); } + kfree(fs); } diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h index 5b82ff7016..c7fa5219c1 100644 --- a/nuttx/fs/fat/fs_fat32.h +++ b/nuttx/fs/fat/fs_fat32.h @@ -48,6 +48,7 @@ #include #include +#include #include /**************************************************************************** @@ -676,6 +677,33 @@ #endif +/**************************************************************************** + * Name: fat_io_alloc and fat_io_free + * + * Description: + * The FAT file system allocates two I/O buffers for data transfer, each + * are the size of one device sector. One of the buffers is allocated + * once for each FAT volume that is mounted; the other buffers are + * allocated each time a FAT file is opened. + * + * Some hardware, however, may require special DMA-capable memory in + * order to perform the the transfers. If CONFIG_FAT_DMAMEMORY is defined + * then the architecture-specific hardware must provide the funtions + * fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dmalloc() + * will allocate DMA-capable memory of the specified size; fat_dmafree() + * is the corresponding function that will be called to free the DMA- + * capable memory. + * + ****************************************************************************/ + +#ifdef CONFIG_FAT_DMAMEMORY +# define fat_io_alloc(s) fat_dma_alloc(s) +# define fat_io_free(s) fat_dma_free(s) +#else +# define fat_io_alloc(s) kmalloc(s) +# define fat_io_free(s) kfree(s) +#endif + /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c index b88046d796..f8f5ef495e 100644 --- a/nuttx/fs/fat/fs_fat32util.c +++ b/nuttx/fs/fat/fs_fat32util.c @@ -542,7 +542,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) /* Allocate a buffer to hold one hardware sector */ - fs->fs_buffer = (uint8_t*)kmalloc(fs->fs_hwsectorsize); + fs->fs_buffer = (uint8_t*)fat_io_alloc(fs->fs_hwsectorsize); if (!fs->fs_buffer) { ret = -ENOMEM; @@ -668,7 +668,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) return OK; errout_with_buffer: - kfree(fs->fs_buffer); + fat_io_free(fs->fs_buffer); fs->fs_buffer = 0; errout: fs->fs_mounted = false; diff --git a/nuttx/include/nuttx/fs/fat.h b/nuttx/include/nuttx/fs/fat.h index f69bd85713..3ae0fbee2e 100644 --- a/nuttx/include/nuttx/fs/fat.h +++ b/nuttx/include/nuttx/fs/fat.h @@ -75,11 +75,39 @@ extern "C" { #define EXTERN extern #endif -/* Non-standard functions to get and set FAT file/directory attributes */ +/**************************************************************************** + * Name: fat_getattrib and fat_setattrib + * + * Description: + * Non-standard functions to get and set FAT file/directory attributes + * + ****************************************************************************/ EXTERN int fat_getattrib(const char *path, fat_attrib_t *attrib); EXTERN int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t clearbits); +/**************************************************************************** + * Name: fat_dma_alloc and fat_dma_free + * + * Description: + * The FAT file system allocates two I/O buffers for data transfer, each + * are the size of one device sector. One of the buffers is allocated + * once for each FAT volume that is mounted; the other buffers are + * allocated each time a FAT file is opened. + * + * Some hardware, however, may require special DMA-capable memory in + * order to perform the the transfers. If CONFIG_FAT_DMAMEMORY is defined + * then the architecture-specific hardware must provide the funtions + * fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dmalloc() + * will allocate DMA-capable memory of the specified size; fat_dmafree() + * is the corresponding function that will be called to free the DMA- + * capable memory. + * + ****************************************************************************/ + +EXTERN FAR void *fat_dma_alloc(size_t size); +EXTERN void fat_dma_free(FAR void *memory); + #undef EXTERN #ifdef __cplusplus } From 64c8e5c7c3d1c7729bd5c12952b4966fa06ed77a Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 16:50:16 +0000 Subject: [PATCH 49/95] Updates/fixes related to ENC28J60, Kconfigs, and fire-stm32v2 git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5128 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 9 +- nuttx/Documentation/NuttxPortingGuide.html | 2 +- nuttx/configs/README.txt | 2 +- nuttx/configs/fire-stm32v2/include/board.h | 8 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 114 ++++-------------- nuttx/configs/fire-stm32v2/src/Makefile | 2 +- .../configs/fire-stm32v2/src/fire-internal.h | 6 +- nuttx/configs/fire-stm32v2/src/up_autoleds.c | 18 +-- nuttx/configs/fire-stm32v2/src/up_enc28j60.c | 31 ++--- nuttx/configs/fire-stm32v2/src/up_spi.c | 4 +- nuttx/configs/fire-stm32v2/src/up_userleds.c | 12 +- .../configs/olimex-strp711/nettest/defconfig | 4 +- nuttx/configs/olimex-strp711/src/Makefile | 6 +- .../configs/olimex-strp711/src/up_enc28j60.c | 12 +- nuttx/configs/olimex-strp711/src/up_spi.c | 8 +- nuttx/drivers/Kconfig | 82 +++---------- nuttx/drivers/net/Make.defs | 6 +- nuttx/drivers/net/enc28j60.c | 24 ++-- nuttx/include/nuttx/net/enc28j60.h | 8 +- 19 files changed, 135 insertions(+), 223 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index f56e14c048..b49394ba27 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3315,4 +3315,11 @@ require DMA-capable memory. If CONFIG_FAT_DMAMEMORY is defined, then the FAT FS will use platform-provided DMA memory allocators to allocate the block driver I/O buffers. - + * CONFIG_NET_ENC28J60 renamed CONFIG_ENC28J60 to be consistent + in all places. + * drivers/enc28j60.c, include/nuttx/net/enc28j60.h, and + olimex-strp711/src/up_enc28j60.c: No longer passes IRQ number + as a parameters. Instead now passes a call table to manage + ENC28J60 GPIO interrupts. That is because GPIO interrupts are + handled in different ways by different MCUs and some do not + support IRQ numbers for GPIO interrupts. diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 875b78e619..0e169d60d5 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -4963,7 +4963,7 @@ build

    ENC28J60 Ethernet Driver Configuration Settings

    • - CONFIG_NET_ENC28J60: Enabled ENC28J60 support + CONFIG_ENC28J60: Enabled ENC28J60 support
    • CONFIG_ENC28J60_SPIMODE: Controls the SPI mode diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index f225f8818f..b51b87bece 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -950,7 +950,7 @@ defconfig -- This is a configuration file similar to the Linux ENC28J60 Ethernet Driver Configuration Settings: - CONFIG_NET_ENC28J60 - Enabled ENC28J60 support + CONFIG_ENC28J60 - Enabled ENC28J60 support CONFIG_ENC28J60_SPIMODE - Controls the SPI mode CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60 diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index 532e4347e1..36f09e7a89 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -256,14 +256,14 @@ * PIN NAME SIGNAL NOTES * --- ------ -------------- ------------------------------------------------------------------- * - * 68 PA9 PA9-US1-TX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP - * 69 PA10 PA10-US1-RX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP + * 68 PA9 PA9-US1-TX MAX3232, DB9 D8, Requires !CONFIG_STM32_USART1_REMAP + * 69 PA10 PA10-US1-RX MAX3232, DB9 D8, Requires !CONFIG_STM32_USART1_REMAP * 25 PA2 PA2-US2-TX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP * 26 PA3 PA3-US2-RX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP */ -#if defined(CONFIG_STM32_USART1) && !defined(CONFIG_STM32_USART1_REMAP) -# errror "USART1 requires CONFIG_STM32_USART1_REMAP=y" +#if defined(CONFIG_STM32_USART1) && defined(CONFIG_STM32_USART1_REMAP) +# errror "USART1 requires CONFIG_STM32_USART1_REMAP=n" #endif #if defined(CONFIG_STM32_USART2) && defined(CONFIG_STM32_USART2_REMAP) diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index ce22a74c99..ef5fcbf400 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -131,7 +131,7 @@ CONFIG_STM32_I2C1=y # CONFIG_STM32_IWDG is not set CONFIG_STM32_PWR=y CONFIG_STM32_SDIO=y -# CONFIG_STM32_SPI1 is not set +CONFIG_STM32_SPI1=y # CONFIG_STM32_SPI2 is not set # CONFIG_STM32_SPI4 is not set # CONFIG_STM32_TIM1 is not set @@ -149,12 +149,14 @@ CONFIG_STM32_USART2=y # CONFIG_STM32_UART5 is not set CONFIG_STM32_USB=y # CONFIG_STM32_WWDG is not set +CONFIG_STM32_SPI=y # # Alternate Pin Mapping # -CONFIG_STM32_USART1_REMAP=y +# CONFIG_STM32_USART1_REMAP is not set # CONFIG_STM32_USART2_REMAP is not set +# CONFIG_STM32_SPI1_REMAP is not set # CONFIG_STM32_I2C1_REMAP is not set # CONFIG_STM32_JTAG_DISABLE is not set CONFIG_STM32_JTAG_FULL_ENABLE=y @@ -163,6 +165,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set + # # SDIO Configuration # @@ -300,71 +308,27 @@ CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set # CONFIG_LOOP is not set # CONFIG_RAMDISK is not set - -# -# CAN Driver Options -# # CONFIG_CAN is not set - -# -# PWM Driver Options -# # CONFIG_PWM is not set - -# -# I2C Driver Options -# CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set CONFIG_I2C_TRANSFER=y # CONFIG_I2C_WRITEREAD is not set CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set - -# -# SPI Driver Options -# CONFIG_SPI=y # CONFIG_SPI_OWNBUS is not set CONFIG_SPI_EXCHANGE=y -CONFIG_SPI_CMDDATA=y - -# -# RTC Driver Options -# +# CONFIG_SPI_CMDDATA is not set CONFIG_RTC=y # CONFIG_RTC_DATETIME is not set # CONFIG_RTC_HIRES is not set # CONFIG_RTC_ALARM is not set - -# -# Watchdog Driver Options -# # CONFIG_WATCHDOG is not set - -# -# Analog Driver Options -# # CONFIG_ANALOG is not set - -# -# Block-to-Character Driver Support -# # CONFIG_BCH is not set - -# -# Input device Driver Options -# # CONFIG_INPUT is not set - -# -# LCD Driver Options -# # CONFIG_LCD is not set - -# -# MMCSD Driver Options -# CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -375,42 +339,23 @@ CONFIG_MMCSD_SPI=y CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SDIO=y # CONFIG_SDIO_MUXBUS is not set - -# -# I2C Driver Options -# # CONFIG_MTD is not set - -# -# Network Device Driver Options -# -# CONFIG_NETDEVICES is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_DM90x0 is not set +CONFIG_ENC28J60=y +CONFIG_ENC28J60_NINTERFACES=1 +CONFIG_ENC28J60_SPIMODE=2 +CONFIG_ENC28J60_FREQUENCY=20000000 +# CONFIG_ENC28J60_STATS is not set +# CONFIG_ENC28J60_HALFDUPPLEX is not set +# CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set - -# -# Pipe Options -# +# CONFIG_NET_VNET is not set # CONFIG_PIPES is not set - -# -# Power Management Options -# # CONFIG_PM is not set # CONFIG_POWER is not set - -# -# Sensor Driver Options -# # CONFIG_SENSORS is not set - -# -# Osmocom-bb Sercomm Driver Options -# # CONFIG_SERCOMM_CONSOLE is not set - -# -# Serial Driver Options -# CONFIG_SERIAL=y # CONFIG_LOWLEVEL_CONSOLE is not set # CONFIG_16550_UART is not set @@ -441,10 +386,6 @@ CONFIG_USART2_BAUD=115200 CONFIG_USART2_BITS=8 CONFIG_USART2_PARITY=0 CONFIG_USART2_2STOP=0 - -# -# USB Device Driver Options -# CONFIG_USBDEV=y # CONFIG_USBDEV_COMPOSITE is not set # CONFIG_USBDEV_ISOCHRONOUS is not set @@ -468,15 +409,7 @@ CONFIG_USBMSC_PRODUCTID=0x5342 CONFIG_USBMSC_PRODUCTSTR="USBdev Storage" CONFIG_USBMSC_VERSIONNO=0x0399 CONFIG_USBMSC_REMOVABLE=y - -# -# USB Host Driver Options -# # CONFIG_USBHOST is not set - -# -# Wireless Device Driver Options -# # CONFIG_WIRELESS is not set # @@ -495,7 +428,7 @@ CONFIG_NET=y # CONFIG_NET_NOINTS is not set # CONFIG_NET_MULTIBUFFER is not set # CONFIG_NET_IPv6 is not set -CONFIG_NSOCKET_DESCRIPTORS=0 +CONFIG_NSOCKET_DESCRIPTORS=16 CONFIG_NET_NACTIVESOCKETS=16 CONFIG_NET_SOCKOPTS=y CONFIG_NET_BUFSIZE=562 @@ -512,7 +445,7 @@ CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NET_UDP_CONNS=8 CONFIG_NET_BROADCAST=y CONFIG_NET_ICMP=y -# CONFIG_NET_ICMP_PING is not set +CONFIG_NET_ICMP_PING=y # CONFIG_NET_PINGADDRCONF is not set # CONFIG_NET_IGMP is not set CONFIG_NET_STATISTICS=y @@ -532,6 +465,7 @@ CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_FATTIME is not set +# CONFIG_FAT_DMAMEMORY is not set # CONFIG_FS_RAMMAP is not set # CONFIG_NFS is not set # CONFIG_FS_NXFFS is not set diff --git a/nuttx/configs/fire-stm32v2/src/Makefile b/nuttx/configs/fire-stm32v2/src/Makefile index b5466ef1e4..4c4fd1d417 100644 --- a/nuttx/configs/fire-stm32v2/src/Makefile +++ b/nuttx/configs/fire-stm32v2/src/Makefile @@ -56,7 +56,7 @@ else CSRCS += up_userleds.c endif -ifeq ($(CONFIG_NET_ENC28J60),y) +ifeq ($(CONFIG_ENC28J60),y) CSRCS += up_enc28j60.c endif diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index 125e030b70..ee3c3486fe 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -191,7 +191,7 @@ * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH */ -#ifndef CONFIG_NET_ENC28J60 +#ifndef CONFIG_ENC28J60 # define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) #endif @@ -210,11 +210,11 @@ * 4 PE5 (no name) 10Mbps ENC28J60 Interrupt */ -#if defined(CONFIG_STM32_FSMC) && defined(CONFIG_NET_ENC28J60) +#if defined(CONFIG_STM32_FSMC) && defined(CONFIG_ENC28J60) # warning "TFT LCD and ENCJ2860 shared PE1" #endif -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 # define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) # define GPIO_ENC28J60_RESET (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ diff --git a/nuttx/configs/fire-stm32v2/src/up_autoleds.c b/nuttx/configs/fire-stm32v2/src/up_autoleds.c index 088d0b14de..4e70b01dd2 100644 --- a/nuttx/configs/fire-stm32v2/src/up_autoleds.c +++ b/nuttx/configs/fire-stm32v2/src/up_autoleds.c @@ -193,7 +193,8 @@ static struct pm_callback_s g_ledscb = * Name: led_clrbits * * Description: - * Clear all LEDs to the bit encoded state + * Clear all LEDs to the bit encoded state. The LEDs are pulled up and, + * hence, active low. * ****************************************************************************/ @@ -201,17 +202,17 @@ static inline void led_clrbits(unsigned int clrbits) { if ((clrbits & FIRE_LED1) != 0) { - stm32_gpiowrite(GPIO_LED1, false); + stm32_gpiowrite(GPIO_LED1, true); } if ((clrbits & FIRE_LED2) != 0) { - stm32_gpiowrite(GPIO_LED2, false); + stm32_gpiowrite(GPIO_LED2, true); } if ((clrbits & FIRE_LED3) != 0) { - stm32_gpiowrite(GPIO_LED3, false); + stm32_gpiowrite(GPIO_LED3, true); } } @@ -219,7 +220,8 @@ static inline void led_clrbits(unsigned int clrbits) * Name: led_setbits * * Description: - * Set all LEDs to the bit encoded state + * Set all LEDs to the bit encoded state. The LEDs are pulled up and, + * hence, active low. * ****************************************************************************/ @@ -227,17 +229,17 @@ static inline void led_setbits(unsigned int setbits) { if ((setbits & FIRE_LED1) != 0) { - stm32_gpiowrite(GPIO_LED1, true); + stm32_gpiowrite(GPIO_LED1, false); } if ((setbits & FIRE_LED2) != 0) { - stm32_gpiowrite(GPIO_LED2, true); + stm32_gpiowrite(GPIO_LED2, false); } if ((setbits & FIRE_LED3) != 0) { - stm32_gpiowrite(GPIO_LED3, true); + stm32_gpiowrite(GPIO_LED3, false); } } diff --git a/nuttx/configs/fire-stm32v2/src/up_enc28j60.c b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c index 8f67496c56..5247f5886e 100644 --- a/nuttx/configs/fire-stm32v2/src/up_enc28j60.c +++ b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c @@ -63,9 +63,9 @@ #include "chip.h" #include "up_arch.h" #include "up_internal.h" -#include "fire_internal.h" +#include "fire-internal.h" -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 /**************************************************************************** * Definitions @@ -110,9 +110,9 @@ struct stm32_lower_s * Private Function Prototypes ****************************************************************************/ -static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler); -static void up_enable(FAR struct enc_lower_s *lower); -static void up_disable(FAR struct enc_lower_s *lower); +static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler); +static void up_enable(FAR const struct enc_lower_s *lower); +static void up_disable(FAR const struct enc_lower_s *lower); /**************************************************************************** * Private Data @@ -123,13 +123,15 @@ static void up_disable(FAR struct enc_lower_s *lower); * the ENC28J60 GPIO interrupt. */ -static const struct enc_lower_s g_enclower = +static struct stm32_lower_s g_enclower = { + .lower = { .attach = up_attach, .enable = up_enable, .disable = up_disable - } + }, + .handler = NULL, }; /**************************************************************************** @@ -140,25 +142,25 @@ static const struct enc_lower_s g_enclower = * Name: struct enc_lower_s methods ****************************************************************************/ -static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler) +static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler) { FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; /* Just save the handler for use when the interrupt is enabled */ - priv-handler = handler; + priv->handler = handler; return OK; } -static void up_enable(FAR struct enc_lower_s *lower) +static void up_enable(FAR const struct enc_lower_s *lower) { FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler); - (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, priv-handler); + (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, priv->handler); } -static void up_disable(FAR struct enc_lower_s *lower) +static void up_disable(FAR const struct enc_lower_s *lower) { (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, NULL); } @@ -174,7 +176,6 @@ static void up_disable(FAR struct enc_lower_s *lower) void up_netinitialize(void) { FAR struct spi_dev_s *spi; - uint16_t reg16; int ret; /* Assumptions: @@ -195,7 +196,7 @@ void up_netinitialize(void) /* Bind the SPI port to the ENC28J60 driver */ - ret = enc_initialize(spi, ENC28J60_DEVNO, &g_enclower); + ret = enc_initialize(spi, &g_enclower.lower, ENC28J60_DEVNO); if (ret < 0) { nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", @@ -207,4 +208,4 @@ void up_netinitialize(void) ENC28J60_SPI_PORTNO, ENC28J60_DEVNO); } -#endif /* CONFIG_NET_ENC28J60 */ +#endif /* CONFIG_ENC28J60 */ diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c index 085542b130..329274b7fc 100644 --- a/nuttx/configs/fire-stm32v2/src/up_spi.c +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -111,7 +111,7 @@ void weak_function stm32_spiinitialize(void) /* Configure ENC28J60 SPI1 CS (also RESET and interrupt pins) */ -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 stm32_configgpio(GPIO_ENC28J60_CS); stm32_configgpio(GPIO_ENC28J60_RESET); stm32_configgpio(GPIO_ENC28J60_INTR); @@ -171,7 +171,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele } else #endif -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 if (devid == SPIDEV_ETHERNET) { /* Set the GPIO low to select and high to de-select */ diff --git a/nuttx/configs/fire-stm32v2/src/up_userleds.c b/nuttx/configs/fire-stm32v2/src/up_userleds.c index f7e3dbf9e3..da43d03adc 100644 --- a/nuttx/configs/fire-stm32v2/src/up_userleds.c +++ b/nuttx/configs/fire-stm32v2/src/up_userleds.c @@ -105,18 +105,28 @@ void stm32_ledinit(void) /**************************************************************************** * Name: stm32_setled + * + * Description: + * Set one LED to the 'ledon' state. The LEDs are pulled up and, hence, + * active low. + * ****************************************************************************/ void stm32_setled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { - stm32_gpiowrite(g_ledcfg[led], ledon); + stm32_gpiowrite(g_ledcfg[led], !ledon); } } /**************************************************************************** * Name: stm32_setleds + * + * Description: + * Set each LED to the bit encoded state. The LEDs are pulled up and, + * hence, active low. + * ****************************************************************************/ void stm32_setleds(uint8_t ledset) diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 83bebe2fea..f69d3f8cb4 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -2,7 +2,7 @@ # configs/olimes-strp711/nettest/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -235,7 +235,7 @@ CONFIG_FS_ROMFS=n # # ENC28J60 configuration # -CONFIG_NET_ENC28J60=y +CONFIG_ENC28J60=y #CONFIG_ENC28J60_SPIMODE CONFIG_ENC28J60_FREQUENCY=20000000 CONFIG_ENC28J60_NINTERFACES=1 diff --git a/nuttx/configs/olimex-strp711/src/Makefile b/nuttx/configs/olimex-strp711/src/Makefile index 761237d852..95073eca15 100644 --- a/nuttx/configs/olimex-strp711/src/Makefile +++ b/nuttx/configs/olimex-strp711/src/Makefile @@ -1,8 +1,8 @@ ############################################################################ # configs/olimex-strp711/src/Makefile # -# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2007-2008, 2010, 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -51,7 +51,7 @@ CSRCS = up_spi.c up_leds.c up_buttons.c ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_NET_ENC28J60),y) +ifeq ($(CONFIG_ENC28J60),y) CSRCS += up_enc28j60.c endif COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/nuttx/configs/olimex-strp711/src/up_enc28j60.c b/nuttx/configs/olimex-strp711/src/up_enc28j60.c index 2c693b7a83..68ab0e7856 100644 --- a/nuttx/configs/olimex-strp711/src/up_enc28j60.c +++ b/nuttx/configs/olimex-strp711/src/up_enc28j60.c @@ -95,7 +95,7 @@ #include "up_internal.h" #include "str71x_internal.h" -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 /**************************************************************************** * Definitions @@ -182,17 +182,17 @@ static const struct enc_lower_s g_enclower = * Name: struct enc_lower_s methods ****************************************************************************/ -static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler) +static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler) { return irq_attach(ENC28J60_IRQ, handler) } -static void up_enable(FAR struct enc_lower_s *lower) +static void up_enable(FAR const struct enc_lower_s *lower) { up_enable_irq(ENC28J60_IRQ); } -static void up_disable(FAR struct enc_lower_s *lower) +static void up_disable(FAR const struct enc_lower_s *lower) { up_disable_irq(ENC28J60_IRQ); } @@ -237,7 +237,7 @@ void up_netinitialize(void) /* Bind the SPI port to the ENC28J60 driver */ - ret = enc_initialize(spi, ENC28J60_DEVNO, &g_enclower); + ret = enc_initialize(spi, &g_enclower, ENC28J60_DEVNO); if (ret < 0) { nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", @@ -248,4 +248,4 @@ void up_netinitialize(void) nllvdbg("Bound SPI port %d to ENC28J60 device %d\n", ENC28J60_SPI_PORTNO, ENC28J60_DEVNO); } -#endif /* CONFIG_NET_ENC28J60 */ +#endif /* CONFIG_ENC28J60 */ diff --git a/nuttx/configs/olimex-strp711/src/up_spi.c b/nuttx/configs/olimex-strp711/src/up_spi.c index bbd046df70..452a43fb7d 100644 --- a/nuttx/configs/olimex-strp711/src/up_spi.c +++ b/nuttx/configs/olimex-strp711/src/up_spi.c @@ -1,8 +1,8 @@ /**************************************************************************** * config/olimex-strp711/src/up_spi.c * - * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2008-2010,2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -155,7 +155,7 @@ * P0.4/S1.MISO P0.4 output 6 5 NET RST */ -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 /* UART3, I2C cannot be used with SPI0. The GPIOs selected for the ENC28J60 * interrupt conflict with BSPI1 @@ -981,7 +981,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port) * reset (also active low) */ -#ifdef CONFIG_NET_ENC28J60 +#ifdef CONFIG_ENC28J60 reg16 = getreg16(STR71X_GPIO0_PD); reg16 |= (ENC_GPIO0_CS | ENC_GPIO0_NETRST); putreg16(reg16, STR71X_GPIO0_PD); diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig index 9f7fab9fc4..c484e0c248 100644 --- a/nuttx/drivers/Kconfig +++ b/nuttx/drivers/Kconfig @@ -27,10 +27,8 @@ config RAMDISK a block driver that can be mounted as a files system. See include/nuttx/ramdisk.h. -comment "CAN Driver Options" - -config CAN - bool "CAN Support" +menuconfig CAN + bool "CAN Driver Support" default n ---help--- This selection enables building of the "upper-half" CAN driver. @@ -65,10 +63,8 @@ config CAN_LOOPBACK endif -comment "PWM Driver Options" - -config PWM - bool "PWM Support" +menuconfig PWM + bool "PWM Driver Support" default n ---help--- This selection enables building of the "upper-half" PWM driver. @@ -86,10 +82,8 @@ config PWM_PULSECOUNT endif -comment "I2C Driver Options" - -config I2C - bool "I2C Support" +menuconfig I2C + bool "I2C Driver Support" default n ---help--- This selection enables building of the "upper-half" I2C driver. @@ -125,10 +119,8 @@ config I2C_NTRACE default n depends on I2C_TRACE -comment "SPI Driver Options" - -config SPI - bool "SPI Support" +menuconfig SPI + bool "SPI Driver Support" default n ---help--- This selection enables building of the "upper-half" SPI driver. @@ -159,10 +151,8 @@ config SPI_CMDDATA endif -comment "RTC Driver Options" - -config RTC - bool "RTC Support" +menuconfig RTC + bool "RTC Driver Support" default n ---help--- This selection enables configuration of a real time clock (RTCdriver. @@ -214,9 +204,7 @@ config RTC_ALARM Enable if the RTC hardware supports setting of an alarm. A callback function will be executed when the alarm goes off. -comment "Watchdog Driver Options" - -config WATCHDOG +menuconfig WATCHDOG bool "Watchdog Timer Support" default n ---help--- @@ -226,8 +214,6 @@ config WATCHDOG if WATCHDOG endif -comment "Analog Driver Options" - menuconfig ANALOG bool "Analog Device(ADC/DAC) Support" default n @@ -241,9 +227,7 @@ if ANALOG source drivers/analog/Kconfig endif -comment "Block-to-Character Driver Support" - -config BCH +menuconfig BCH bool "Block-to-Character (BCH) Support" default n ---help--- @@ -256,8 +240,6 @@ if BCH source drivers/bch/Kconfig endif -comment "Input device Driver Options" - menuconfig INPUT bool "Input Device Support" default n @@ -270,10 +252,8 @@ if INPUT source drivers/input/Kconfig endif -comment "LCD Driver Options" - menuconfig LCD - bool "LCD Support" + bool "LCD Driver Support" default n select NX_LCDDRIVER ---help--- @@ -288,10 +268,8 @@ if LCD source drivers/lcd/Kconfig endif -comment "MMCSD Driver Options" - menuconfig MMCSD - bool "MMC/SD Support" + bool "MMC/SD Driver Support" default n ---help--- Support for MMC/SD block drivers. MMC/SD block drivers based on @@ -302,8 +280,6 @@ if MMCSD source drivers/mmcsd/Kconfig endif -comment "I2C Driver Options" - menuconfig MTD bool "Memory Technology Device (MTD) Support" default n @@ -321,8 +297,6 @@ if MTD source drivers/mtd/Kconfig endif -comment "Network Device Driver Options" - menuconfig NETDEVICES bool "Network Device Support" default n @@ -333,8 +307,6 @@ if NETDEVICES source drivers/net/Kconfig endif -comment "Pipe Options" - menuconfig PIPES bool "FIFO and named pipe drivers" default n @@ -346,8 +318,6 @@ if PIPES source drivers/pipes/Kconfig endif -comment "Power Management Options" - config PM bool "Power management (PM) driver interfaces" default n @@ -367,10 +337,8 @@ if POWER source drivers/power/Kconfig endif -comment "Sensor Driver Options" - menuconfig SENSORS - bool "Sensors Support" + bool "Sensor Device Support" default n ---help--- Drivers for various sensors @@ -379,10 +347,8 @@ if SENSORS source drivers/sensors/Kconfig endif -comment "Osmocom-bb Sercomm Driver Options" - menuconfig SERCOMM_CONSOLE - bool "Osmocom-bb serial console" + bool "Osmocom-bb Sercomm Driver Support" default n ---help--- Sercomm is the transport used by osmocom-bb that runs on top of serial. @@ -398,10 +364,8 @@ if SERCOMM source drivers/sercomm/Kconfig endif -comment "Serial Driver Options" - menuconfig SERIAL - bool "Serial Support" + bool "Serial Driver Support" default y ---help--- Front-end character drivers for chip-specific UARTs. This provide @@ -412,10 +376,8 @@ if SERIAL source drivers/serial/Kconfig endif -comment "USB Device Driver Options" - menuconfig USBDEV - bool "USB Device Support" + bool "USB Device Driver Support" default n ---help--- USB device drivers. See also include/nuttx/usb/usbdev.h @@ -424,10 +386,8 @@ if USBDEV source drivers/usbdev/Kconfig endif -comment "USB Host Driver Options" - menuconfig USBHOST - bool "USB Host Support" + bool "USB Host Driver Support" default n ---help--- USB host drivers. See also include/nuttx/usb/usbhost.h @@ -436,10 +396,8 @@ if USBHOST source drivers/usbhost/Kconfig endif -comment "Wireless Device Driver Options" - menuconfig WIRELESS - bool "Wireless Support" + bool "Wireless Device Support" default n ---help--- Drivers for various wireless devices. diff --git a/nuttx/drivers/net/Make.defs b/nuttx/drivers/net/Make.defs index ab256cd8ae..bb0d6a7189 100644 --- a/nuttx/drivers/net/Make.defs +++ b/nuttx/drivers/net/Make.defs @@ -1,8 +1,8 @@ ############################################################################ # drivers/net/Make.defs # -# Copyright (C) 2007, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2007, 2010-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -47,7 +47,7 @@ ifeq ($(CONFIG_NET_CS89x0),y) CSRCS += cs89x0.c endif -ifeq ($(CONFIG_NET_ENC28J60),y) +ifeq ($(CONFIG_ENC28J60),y) CSRCS += enc28j60.c endif diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 4862b7b216..eee9ff6f05 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -42,7 +42,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET) && defined(CONFIG_NET_ENC28J60) +#if defined(CONFIG_NET) && defined(CONFIG_ENC28J60) #include #include @@ -74,7 +74,7 @@ /* ENC28J60 Configuration Settings: * - * CONFIG_NET_ENC28J60 - Enabled ENC28J60 support + * CONFIG_ENC28J60 - Enabled ENC28J60 support * CONFIG_ENC28J60_SPIMODE - Controls the SPI mode * CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency * CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60 @@ -172,36 +172,36 @@ struct enc_driver_s { /* Device control */ - bool bifup; /* true:ifup false:ifdown */ - uint8_t bank; /* Currently selected bank */ - uint16_t nextpkt; /* Next packet address */ - FAR struct enc_lower_s *lower; /* Low-level MCU-specific support */ + bool bifup; /* true:ifup false:ifdown */ + uint8_t bank; /* Currently selected bank */ + uint16_t nextpkt; /* Next packet address */ + FAR const struct enc_lower_s *lower; /* Low-level MCU-specific support */ /* Timing */ - WDOG_ID txpoll; /* TX poll timer */ - WDOG_ID txtimeout; /* TX timeout timer */ + WDOG_ID txpoll; /* TX poll timer */ + WDOG_ID txtimeout; /* TX timeout timer */ /* We we don't own the SPI bus, then we cannot do SPI accesses from the * interrupt handler. */ #ifndef CONFIG_SPI_OWNBUS - struct work_s work; /* Work queue support */ + struct work_s work; /* Work queue support */ #endif /* This is the contained SPI driver intstance */ - FAR struct spi_dev_s *spi; + FAR struct spi_dev_s *spi; /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct uip_driver_s dev; /* Interface understood by uIP */ /* Statistics */ #ifdef CONFIG_ENC28J60_STATS - struct enc_stats_s stats; + struct enc_stats_s stats; #endif }; diff --git a/nuttx/include/nuttx/net/enc28j60.h b/nuttx/include/nuttx/net/enc28j60.h index 9a3be10c1e..2e39d88ac2 100644 --- a/nuttx/include/nuttx/net/enc28j60.h +++ b/nuttx/include/nuttx/net/enc28j60.h @@ -51,7 +51,7 @@ /* ENC28J60 Configuration Settings: * - * CONFIG_NET_ENC28J60 - Enabled ENC28J60 support + * CONFIG_ENC28J60 - Enabled ENC28J60 support * CONFIG_ENC28J60_SPIMODE - Controls the SPI mode * CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency * CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60 @@ -89,9 +89,9 @@ struct enc_stats_s struct enc_lower_s { - int (*attach)(FAR struct enc_lower_s *lower, xcpt_t handler); - void (*enable)(FAR struct enc_lower_s *lower); - void (*disable)(FAR struct enc_lower_s *lower); + int (*attach)(FAR const struct enc_lower_s *lower, xcpt_t handler); + void (*enable)(FAR const struct enc_lower_s *lower); + void (*disable)(FAR const struct enc_lower_s *lower); }; /**************************************************************************** From 3ca467c02936aa967daeabc89b80e84f409f049a Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 18:22:27 +0000 Subject: [PATCH 50/95] Add beginning of a simple granule allocator to support DMA IO buffer allocation git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5129 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 5 + nuttx/fs/fat/fs_fat32.c | 4 +- nuttx/fs/fat/fs_fat32.h | 8 +- nuttx/fs/fat/fs_fat32util.c | 2 +- nuttx/include/nuttx/fs/fat.h | 2 +- nuttx/include/nuttx/gran.h | 161 +++++++++++++++++++++++ nuttx/mm/mm_gran.h | 84 ++++++++++++ nuttx/mm/mm_granalloc.c | 241 +++++++++++++++++++++++++++++++++++ nuttx/mm/mm_granfree.c | 134 +++++++++++++++++++ nuttx/mm/mm_graninit.c | 163 +++++++++++++++++++++++ 10 files changed, 796 insertions(+), 8 deletions(-) create mode 100644 nuttx/include/nuttx/gran.h create mode 100644 nuttx/mm/mm_gran.h create mode 100644 nuttx/mm/mm_granalloc.c create mode 100644 nuttx/mm/mm_granfree.c create mode 100644 nuttx/mm/mm_graninit.c diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index b49394ba27..174b1cc522 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3323,3 +3323,8 @@ ENC28J60 GPIO interrupts. That is because GPIO interrupts are handled in different ways by different MCUs and some do not support IRQ numbers for GPIO interrupts. + * mm/mm_gran* and include/nuttx/gran.h: Add a simple granule- + based allocator. The intent of this allocator is to support + simple allocation of DMA I/O buffers. The initiali check-in + is code complete but untested (not event built into the + mm/Makefile yet. diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c index 60622e2f7b..0c28cea678 100644 --- a/nuttx/fs/fat/fs_fat32.c +++ b/nuttx/fs/fat/fs_fat32.c @@ -405,7 +405,7 @@ static int fat_close(FAR struct file *filep) if (ff->ff_buffer) { - fat_io_free(ff->ff_buffer); + fat_io_free(ff->ff_buffer, fs->fs_hwsectorsize); } /* Then free the file structure itself. */ @@ -1651,7 +1651,7 @@ static int fat_unbind(void *handle, FAR struct inode **blkdriver) if (fs->fs_buffer) { - fat_io_free(fs->fs_buffer); + fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize); } kfree(fs); diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h index c7fa5219c1..71a21333ba 100644 --- a/nuttx/fs/fat/fs_fat32.h +++ b/nuttx/fs/fat/fs_fat32.h @@ -697,11 +697,11 @@ ****************************************************************************/ #ifdef CONFIG_FAT_DMAMEMORY -# define fat_io_alloc(s) fat_dma_alloc(s) -# define fat_io_free(s) fat_dma_free(s) +# define fat_io_alloc(s) fat_dma_alloc(s) +# define fat_io_free(m,s) fat_dma_free(m,s) #else -# define fat_io_alloc(s) kmalloc(s) -# define fat_io_free(s) kfree(s) +# define fat_io_alloc(s) kmalloc(s) +# define fat_io_free(m,s) kfree(m) #endif /**************************************************************************** diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c index f8f5ef495e..7231456d74 100644 --- a/nuttx/fs/fat/fs_fat32util.c +++ b/nuttx/fs/fat/fs_fat32util.c @@ -668,7 +668,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) return OK; errout_with_buffer: - fat_io_free(fs->fs_buffer); + fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize); fs->fs_buffer = 0; errout: fs->fs_mounted = false; diff --git a/nuttx/include/nuttx/fs/fat.h b/nuttx/include/nuttx/fs/fat.h index 3ae0fbee2e..680aefbe93 100644 --- a/nuttx/include/nuttx/fs/fat.h +++ b/nuttx/include/nuttx/fs/fat.h @@ -106,7 +106,7 @@ EXTERN int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t cl ****************************************************************************/ EXTERN FAR void *fat_dma_alloc(size_t size); -EXTERN void fat_dma_free(FAR void *memory); +EXTERN void fat_dma_free(FAR void *memory, size_t size); #undef EXTERN #ifdef __cplusplus diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h new file mode 100644 index 0000000000..2036a29a15 --- /dev/null +++ b/nuttx/include/nuttx/gran.h @@ -0,0 +1,161 @@ +/**************************************************************************** + * include/nuttx/gran.h + * General purpose granule memory allocator. + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_GRAN_H +#define __INCLUDE_NUTTX_GRAN_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ +/* CONFIG_GRAN - Enable granual allocator support + * CONFIG_GRAN_SINGLE - Select if there is only one instance of the + * granule allocator (i.e., gran_initialize will be called only once. + * In this case, (1) there are a few optimizations that can can be done + * and (2) the GRAN_HANDLE is not needed. + */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef CONFIG_GRAN_SINGLE +typedef FAR void *GRAN_HANDLE; +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: gran_initialize + * + * Description: + * Set up one granule allocator instance. Allocations will be aligned to + * the granule size; allocations will be in units of the granule size. + * Larger granules will give better performance and less overhead but more + * losses of memory due to alignment and quantization waste. + * + * NOTE: The current implementation also restricts the maximum allocation + * size to 32 granaules. That restriction could be eliminated with some + * additional coding effort. + * + * Input Parameters: + * heapstart - Start of the granule allocation heap + * heapsize - Size of heap in bytes + * log2gran - Log base 2 of the size of one granule. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * + * Returned Value: + * On success, a non-NULL handle is returned that may be used with other + * granual allocator interfaces. + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +EXTERN void gran_initialize(FAR void *heapstart, size_t heapsize, + uint8_t log2gran); +#else +EXTERN GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, + uint8_t log2gran); +#endif + +/**************************************************************************** + * Name: gran_alloc + * + * Description: + * Allocate memory from the granule heap. + * + * NOTE: The current implementation also restricts the maximum allocation + * size to 32 granaules. That restriction could be eliminated with some + * additional coding effort. + * + * Input Parameters: + * handle - The handle previously returned by gran_initialize + * size - The size of the memory region to allocate. + * + * Returned Value: + * On success, either a non-NULL pointer to the allocated memory (if + * CONFIG_GRAN_SINGLE) or zero (if !CONFIG_GRAN_SINGLE) is returned. + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +EXTERN FAR void *gran_alloc(size_t size); +#else +EXTERN FAR void *gran_alloc(GRAN_HANDLE handle, size_t size); +#endif + +/**************************************************************************** + * Name: gran_free + * + * Description: + * Return memory to the granule heap. + * + * Input Parameters: + * handle - The handle previously returned by gran_initialize + * memory - A pointer to memory previoiusly allocated by gran_alloc. + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +EXTERN void gran_free(FAR void *memory, size_t size); +#else +EXTERN void gran_free(GRAN_HANDLE handle, FAR void *memory, size_t size); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_GRAN_H */ diff --git a/nuttx/mm/mm_gran.h b/nuttx/mm/mm_gran.h new file mode 100644 index 0000000000..6f5f890ed5 --- /dev/null +++ b/nuttx/mm/mm_gran.h @@ -0,0 +1,84 @@ +/**************************************************************************** + * mm/mm_gran.h + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __MM_MM_GRAN_H +#define __MM_MM_GRAN_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define SIZEOF_GAT(n) \ + ((n + 31) >> 5) +#define SIZEOF_GRAN_S(n) \ + (sizeof(struct gran_s) + sizeof(uint32_t) * (SIZEOF_GAT(n) - 1)) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* This structure represents the state of on granual allocation */ + +struct gran_s +{ + uint8_t log2gran; /* Log base 2 of the size of one granule */ + uint16_t ngranules; /* The total number of (aligned) granules in the heap */ + uintptr_t heapstart; /* The aligned start of the granule heap */ + uint32_t gat[i]; /* Start of the granule allocation table */ +}; + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* State of the single GRAN allocator */ + +#ifdef CONFIG_GRAN_SINGLE +extern FAR struct gran_s *g_graninfo; +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#endif /* __MM_MM_GRAN_H */ diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c new file mode 100644 index 0000000000..f94f447e31 --- /dev/null +++ b/nuttx/mm/mm_granalloc.c @@ -0,0 +1,241 @@ +/**************************************************************************** + * mm/mm_granalloc.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_common_alloc + * + * Description: + * Allocate memory from the granule heap. + * + * Input Parameters: + * priv - The granule heap state structure. + * alloc - The adress of the allocation. + * ngranules - The number of granules allocated + * + * Returned Value: + * None + * + ****************************************************************************/ + +static inline FAR void *gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, unsigned int ngranules) +{ + unsigned int granno; + unsigned int gatidx; + unsigned int gatbit; + unsigned int avail; + uint32_t mask; + + /* Determine the granule number of the allocation */ + + granno = (alloc - priv->heapstart) >> priv->log2gran; + + /* Determine the GAT table index associated with the allocation */ + + gatidx = granno >> 5; + gatbit = granno & 31; + + /* Mark bits in the first GAT entry */ + + avail = 32 - gatbit; + if (ngranules > avail) + { + priv->gat[gatidx] |= (0xffffffff << gatbit); + ngranules -= avail; + } + + /* Handle the cae where where all of the granules come from one entry */ + + else + { + mask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx] |= (mask << gatbit); + return; + } + + /* Mark bits in the second GAT entry */ + + mask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx+1] |= (mask << gatbit); +} + +/**************************************************************************** + * Name: gran_common_alloc + * + * Description: + * Allocate memory from the granule heap. + * + * Input Parameters: + * priv - The granule heap state structure. + * size - The size of the memory region to allocate. + * + * Returned Value: + * On success, a non-NULL pointer to the allocated memory is returned. + * + ****************************************************************************/ + +static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) +{ + unsigned int ngranules; + size_t tmpmask; + uintptr_t alloc; + uint32_t curr; + uint32_t next; + uint32_t mask; + int i; + int j; + + DEBUGASSERT(priv); + if (priv && size > 0) + { + /* How many contiguous granules we we need to find? */ + + tmpmask = (1 << log2gran) - 1; + ngranules = (size + tmpmask) >> log2gran; + + /* Then create mask for that number of granules */ + + DEBUGASSERT(ngranules <= 32); + mask = 0xffffffff >> (32 - ngranules); + + /* Now search the granule allocation table for that number of contiguous */ + + alloc = priv->heapstart; + + for (i = 0; i < priv->ngranules; i += 32) + { + /* Get the GAT index associated with the granule (i) */ + + j = i >> 5; + curr = priv->gat[j]; + + /* Get the next entry from the GAT to support a 64 bit shift */ + + if (i < priv->ngranules) + { + next = priv->gat[j + 1]; + } + + /* Use all zeroes when are at the last entry in the GAT */ + + else + { + next = 0; + } + + for (j = 0; j < 32; j++) + { + /* Check if we have the allocation at this bit position (0 + * means unallocated). + */ + + if ((curr & mask) == 0) + { + /* Yes.. mark these granules allocated */ + + gran_mark_allocated(priv, alloc, ngranules); + + /* And return the allocation address */ + + return (FAR void *)alloc; + } + + /* Set up for the next time through the loop. Perform a 64 + * bit shift to move to the next gram position. + */ + + curr >>= 1; + if (next & 1) + { + curr |= 0x80000000; + } + next >> 1; + + /* Increment the next candidate allocation address */ + + alloc += (1 << priv->log2gran); + } + } + } + + return NULL; +} + +/**************************************************************************** + * Global Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_alloc + * + * Description: + * Allocate memory from the granule heap. + * + * NOTE: The current implementation also restricts the maximum allocation + * size to 32 granaules. That restriction could be eliminated with some + * additional coding effort. + * + * Input Parameters: + * handle - The handle previously returned by gran_initialize + * size - The size of the memory region to allocate. + * + * Returned Value: + * On success, either a non-NULL pointer to the allocated memory (if + * CONFIG_GRAN_SINGLE) or zero (if !CONFIG_GRAN_SINGLE) is returned. + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +FAR void *gran_alloc(size_t size) +{ + return gran_common_alloc(g_graninfo, size); +} +#else +FAR void *gran_alloc(GRAN_HANDLE handle, size_t size) +{ + return gran_common_alloc((FAR struct gran_s *)handle, size); +} +#endif diff --git a/nuttx/mm/mm_granfree.c b/nuttx/mm/mm_granfree.c new file mode 100644 index 0000000000..4679ae62b4 --- /dev/null +++ b/nuttx/mm/mm_granfree.c @@ -0,0 +1,134 @@ +/**************************************************************************** + * mm/mm_granfree.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_common_free + * + * Description: + * Return memory to the granule heap. + * + * Input Parameters: + * handle - The handle previously returned by gran_initialize + * memory - A pointer to memory previoiusly allocated by gran_alloc. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static inline void gran_common_free(FAR struct gran_s *priv, + FAR void *memory, size_t size) +{ + unsigned int granno; + unsigned int gatidx; + unsigned int gatbit; + unsigned int avail; + uint32_t mask; + + /* Determine the granule number of the allocation */ + + granno = (alloc - priv->heapstart) >> priv->log2gran; + + /* Determine the GAT table index associated with the allocation */ + + gatidx = granno >> 5; + gatbit = granno & 31; + + /* Clear bits in the first GAT entry */ + + avail = 32 - gatbit; + if (ngranules > avail) + { + priv->gat[gatidx] &= ~(0xffffffff << gatbit); + ngranules -= avail; + } + + /* Handle the cae where where all of the granules came from one entry */ + + else + { + mask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx] &= ~(mask << gatbit); + return; + } + + /* Clear bits in the second GAT entry */ + + mask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx+1] &= ~(mask << gatbit); +} + +/**************************************************************************** + * Global Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_free + * + * Description: + * Return memory to the granule heap. + * + * Input Parameters: + * handle - The handle previously returned by gran_initialize + * memory - A pointer to memory previoiusly allocated by gran_alloc. + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +void gran_free(FAR void *memory, size_t size) +{ + return gran_common_free(g_graninfo, memory, size); +} +#else +void gran_free(GRAN_HANDLE handle, FAR void *memory, size_t size) +{ + return gran_common_free((FAR struct gran_s *)handle, memory, size); +} +#endif diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c new file mode 100644 index 0000000000..99b499155f --- /dev/null +++ b/nuttx/mm/mm_graninit.c @@ -0,0 +1,163 @@ +/**************************************************************************** + * mm/mm_graninit.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* State of the single GRAN allocator */ + +#ifdef CONFIG_GRAN_SINGLE +FAR struct gran_s *g_graninfo; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_common_initialize + * + * Description: + * Perfrom common GRAN initialization. + * + * Input Parameters: + * info - Private granule data structure pointer + * heapstart - Start of the granule allocation heap + * heapsize - Size of heap in bytes + * log2gran - Log base 2 of the size of one granule. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * + * Returned Value: + * On success, a non-NULL info structure is returned that may be used with + * other granule allocator interfaces. + * + ****************************************************************************/ + +static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, + size_t heapsize, + uint8_t log2gran) +{ + FAR struct gran_s *priv; + uintptr_t heapend; + uintptr_t alignedstart; + unsigned int mask; + unsigned int alignedsize; + unsigned int ngranules; + + /* Determine the number of granules */ + + mask = (1 << log2gran) - 1; + heapend = (uintptr_t)heapstart + heapsize; + alignedstart = ((uintptr_t)heapstart + mask) & ~mask; + alignedsize = (heapend - alignedstart) & ~mask; + ngranules = alignedsize >> log2gran; + + /* Allocate the information structure with a granule table of the + * correct size. + */ + + priv = ( FAR struct gran_s *)zalloc(SIZEOF_GRAN_S(ngranules)); + if (priv) + { + /* Initialize non-zero elements of the granules heap info structure */ + + priv->log2gran = log2gran; + priv->ngranules = ngranules; + priv->heapstart = alignedstart + } + + return priv; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_initialize + * + * Description: + * Set up one granule allocator instance. Allocations will be aligned to + * the granule size; allocations will be in units of the granule size. + * Larger granules will give better performance and less overhead but more + * losses of memory due to alignment and quantization waste. + * + * NOTE: The current implementation also restricts the maximum allocation + * size to 32 granaules. That restriction could be eliminated with some + * additional coding effort. + * + * Input Parameters: + * heapstart - Start of the granule allocation heap + * heapsize - Size of heap in bytes + * log2gran - Log base 2 of the size of one granule. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * + * Returned Value: + * On success, a non-NULL handle is returned that may be used with other + * granual allocator interfaces. + * + ****************************************************************************/ + +#ifdef CONFIG_GRAN_SINGLE +int gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) +{ + g_graninfo = gran_common_initialize(heapstart, heapsize, log2gran); + if (!g_granifo) + { + return -ENOMEM; + } + + return OK; +} +#else +GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) +{ + return (GRAN_HANDLE)gran_common_initialize(heapstart, heapsize, log2gran); +} +#endif + From 594b34a3564056f8f003ee9a19aa5837bcb1a4d4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 20:33:58 +0000 Subject: [PATCH 51/95] Update to granule allocator; Update to ENC28j60 driver git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5130 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttxPortingGuide.html | 59 +++++++++++---- nuttx/configs/README.txt | 24 +++++- nuttx/configs/fire-stm32v2/nsh/defconfig | 1 + nuttx/configs/shenzhou/nsh/defconfig | 86 +--------------------- nuttx/drivers/net/enc28j60.c | 57 +++++++------- nuttx/include/nuttx/gran.h | 8 ++ nuttx/mm/Kconfig | 30 ++++++++ nuttx/mm/Makefile | 7 +- nuttx/mm/mm_gran.h | 26 ++++++- nuttx/mm/mm_granalloc.c | 20 +++-- nuttx/mm/mm_granfree.c | 35 +++++++-- nuttx/mm/mm_graninit.c | 11 ++- 12 files changed, 222 insertions(+), 142 deletions(-) diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 0e169d60d5..f2c89dcbe9 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -3907,21 +3907,8 @@ build
    -

    General OS setup

    +

    Memory Management

      -
    • - CONFIG_ARCH_LOWPUTC: architecture supports low-level, boot - time console output -
    • -
    • - CONFIG_NUTTX_KERNEL: - With most MCUs, NuttX is built as a flat, single executable image - containing the NuttX RTOS along with all application code. - The RTOS code and the application run in the same address space and at the same kernel-mode privileges. - If this option is selected, NuttX will be built separately as a monolithic, kernel-mode module and the applications - can be added as a separately built, user-mode module. - In this a system call layer will be built to support the user- to kernel-mode interface to the RTOS. -
    • CONFIG_MM_REGIONS: If the architecture includes multiple regions of memory to allocate from, this specifies the @@ -3939,6 +3926,50 @@ build can be defined so that those MCUs will also benefit from the smaller, 16-bit-based allocation overhead.
    • +
    • + CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE: + Some architectures use these settings to specify the size of + a second heap region. +
    • +
    • + CONFIG_GRAN: + Enable granual allocator support. Allocations will be aligned to the + granule size; allocations will be in units of the granule size. + Larger granules will give better performance and less overhead but + more losses of memory due to alignment and quantization waste. + NOTE: The current implementation also restricts the maximum + allocation size to 32 granaules. That restriction could be + eliminated with some additional coding effort. +
    • +
    • + CONFIG_GRAN_SINGLE: + Select if there is only one instance of the granule allocator (i.e., + gran_initialize will be called only once. In this case, (1) there + are a few optimizations that can can be done and (2) the GRAN_HANDLE + is not needed. + +
    • + CONFIG_DEBUG_GRAM: + Just like CONFIG_DEBUG_MM, but only generates ouput from the gran + allocation logic. +
    • +
    + +

    General OS setup

    +
      +
    • + CONFIG_ARCH_LOWPUTC: architecture supports low-level, boot + time console output +
    • +
    • + CONFIG_NUTTX_KERNEL: + With most MCUs, NuttX is built as a flat, single executable image + containing the NuttX RTOS along with all application code. + The RTOS code and the application run in the same address space and at the same kernel-mode privileges. + If this option is selected, NuttX will be built separately as a monolithic, kernel-mode module and the applications + can be added as a separately built, user-mode module. + In this a system call layer will be built to support the user- to kernel-mode interface to the RTOS. +
    • CONFIG_MSEC_PER_TICK: The default system timer is 100Hz or MSEC_PER_TICK=10. This setting may be defined to inform NuttX diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index b51b87bece..b3d0e91f51 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -270,8 +270,6 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_DEBUG_GRAPHICS - enable NX graphics debug output (disabled by default) - CONFIG_ARCH_LOWPUTC - architecture supports low-level, boot - time console output CONFIG_MM_REGIONS - If the architecture includes multiple regions of memory to allocate from, this specifies the number of memory regions that the memory manager must @@ -285,6 +283,28 @@ defconfig -- This is a configuration file similar to the Linux of size less than or equal to 64Kb. In this case, CONFIG_MM_SMALL can be defined so that those MCUs will also benefit from the smaller, 16-bit-based allocation overhead. + CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE + Some architectures use these settings to specify the size of + a second heap region. + CONFIG_GRAN + Enable granual allocator support. Allocations will be aligned to the + granule size; allocations will be in units of the granule size. + Larger granules will give better performance and less overhead but + more losses of memory due to alignment and quantization waste. + NOTE: The current implementation also restricts the maximum + allocation size to 32 granaules. That restriction could be + eliminated with some additional coding effort. + CONFIG_GRAN_SINGLE + Select if there is only one instance of the granule allocator (i.e., + gran_initialize will be called only once. In this case, (1) there + are a few optimizations that can can be done and (2) the GRAN_HANDLE + is not needed. + CONFIG_DEBUG_GRAM + Just like CONFIG_DEBUG_MM, but only generates ouput from the gran + allocation logic. + + CONFIG_ARCH_LOWPUTC - architecture supports low-level, boot + time console output CONFIG_MSEC_PER_TICK - The default system timer is 100Hz or MSEC_PER_TICK=10. This setting may be defined to inform NuttX that the processor hardware is providing diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index ef5fcbf400..fda34debe3 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -481,6 +481,7 @@ CONFIG_FAT_MAXFNAME=32 # # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=1 +# CONFIG_GRAN is not set # # Library Routines diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 7aa442e12e..0c18b129f2 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -304,66 +304,22 @@ CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set # CONFIG_LOOP is not set # CONFIG_RAMDISK is not set - -# -# CAN Driver Options -# # CONFIG_CAN is not set - -# -# PWM Driver Options -# # CONFIG_PWM is not set - -# -# I2C Driver Options -# # CONFIG_I2C is not set - -# -# SPI Driver Options -# CONFIG_SPI=y # CONFIG_SPI_OWNBUS is not set CONFIG_SPI_EXCHANGE=y CONFIG_SPI_CMDDATA=y - -# -# RTC Driver Options -# CONFIG_RTC=y # CONFIG_RTC_DATETIME is not set # CONFIG_RTC_HIRES is not set # CONFIG_RTC_ALARM is not set - -# -# Watchdog Driver Options -# # CONFIG_WATCHDOG is not set - -# -# Analog Driver Options -# # CONFIG_ANALOG is not set - -# -# Block-to-Character Driver Support -# # CONFIG_BCH is not set - -# -# Input device Driver Options -# # CONFIG_INPUT is not set - -# -# LCD Driver Options -# # CONFIG_LCD is not set - -# -# MMCSD Driver Options -# CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -373,42 +329,14 @@ CONFIG_MMCSD_HAVECARDDETECT=y CONFIG_MMCSD_SPI=y CONFIG_MMCSD_SPICLOCK=12500000 # CONFIG_MMCSD_SDIO is not set - -# -# I2C Driver Options -# # CONFIG_MTD is not set - -# -# Network Device Driver Options -# # CONFIG_NETDEVICES is not set # CONFIG_NET_SLIP is not set - -# -# Pipe Options -# # CONFIG_PIPES is not set - -# -# Power Management Options -# # CONFIG_PM is not set # CONFIG_POWER is not set - -# -# Sensor Driver Options -# # CONFIG_SENSORS is not set - -# -# Osmocom-bb Sercomm Driver Options -# # CONFIG_SERCOMM_CONSOLE is not set - -# -# Serial Driver Options -# CONFIG_SERIAL=y # CONFIG_LOWLEVEL_CONSOLE is not set # CONFIG_16550_UART is not set @@ -427,20 +355,8 @@ CONFIG_USART2_BAUD=115200 CONFIG_USART2_BITS=8 CONFIG_USART2_PARITY=0 CONFIG_USART2_2STOP=0 - -# -# USB Device Driver Options -# # CONFIG_USBDEV is not set - -# -# USB Host Driver Options -# # CONFIG_USBHOST is not set - -# -# Wireless Device Driver Options -# # CONFIG_WIRELESS is not set # @@ -496,6 +412,7 @@ CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_FATTIME is not set +# CONFIG_FAT_DMAMEMORY is not set # CONFIG_FS_RAMMAP is not set # CONFIG_NFS is not set # CONFIG_FS_NXFFS is not set @@ -511,6 +428,7 @@ CONFIG_FAT_MAXFNAME=32 # # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=1 +# CONFIG_GRAN is not set # # Library Routines diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index eee9ff6f05..a2f3d58715 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -164,6 +164,15 @@ * Private Types ****************************************************************************/ +/* The state of the interface */ + +enum enc_state_e +{ + ENCSTATE_UNIT = 0, /* The interface is in an unknown state */ + ENCSTATE_DOWN, /* The interface is down */ + ENCSTATE_UP /* The interface is up */ +}; + /* The enc_driver_s encapsulates all state information for a single hardware * interface */ @@ -172,7 +181,7 @@ struct enc_driver_s { /* Device control */ - bool bifup; /* true:ifup false:ifdown */ + uint8_t ifstate; /* Interface state: See ENCSTATE_* */ uint8_t bank; /* Currently selected bank */ uint16_t nextpkt; /* Next packet address */ FAR const struct enc_lower_s *lower; /* Low-level MCU-specific support */ @@ -1656,7 +1665,7 @@ static int enc_ifup(struct uip_driver_s *dev) * controller */ - priv->bifup = true; + priv->ifstate = ENCSTATE_UP; priv->lower->enable(priv->lower); } @@ -1686,8 +1695,8 @@ static int enc_ifdown(struct uip_driver_s *dev) int ret; nlldbg("Taking down: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); /* Disable the Ethernet interrupt */ @@ -1704,7 +1713,7 @@ static int enc_ifdown(struct uip_driver_s *dev) ret = enc_reset(priv); enc_pwrsave(priv); - priv->bifup = false; + priv->ifstate = ENCSTATE_DOWN; irqrestore(flags); return ret; } @@ -1737,7 +1746,7 @@ static int enc_txavail(struct uip_driver_s *dev) /* Ignore the notification if the interface is not yet up */ - if (priv->bifup) + if (priv->ifstate == ENCSTATE_UP) { /* Check if the hardware is ready to send another packet. The driver * starts a transmission process by setting ECON1.TXRTS. When the packet is @@ -2131,8 +2140,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) int enc_initialize(FAR struct spi_dev_s *spi, FAR const struct enc_lower_s *lower, unsigned int devno) { - FAR struct enc_driver_s *priv ; - int ret; + FAR struct enc_driver_s *priv; DEBUGASSERT(devno < CONFIG_ENC28J60_NINTERFACES); priv = &g_enc28j60[devno]; @@ -2156,29 +2164,28 @@ int enc_initialize(FAR struct spi_dev_s *spi, priv->spi = spi; /* Save the SPI instance */ priv->lower = lower; /* Save the low-level MCU interface */ - /* Make sure that the interface is in the down state. NOTE: The MAC - * address will not be set up until ifup. That gives the app time to set - * the MAC address before bringing the interface up. + /* The interface should be in the down state. However, this function is called + * too early in initalization to perform the ENC28J60 reset in enc_ifdown. We + * are depending upon the fact that the application level logic will call enc_ifdown + * later to reset the ENC28J60. NOTE: The MAC address will not be set up until + * enc_ifup() is called. That gives the app time to set the MAC address before + * bringing the interface up. */ - ret = enc_ifdown(&priv->dev); - if (ret == OK) + priv->ifstate = ENCSTATE_UNIT; + + /* Attach the interrupt to the driver (but don't enable it yet) */ + + if (lower->attach(lower, enc_interrupt)) { - /* Attach the interrupt to the driver (but don't enable it yet) */ + /* We could not attach the ISR to the interrupt */ - if (lower->attach(lower, enc_interrupt)) - { - /* We could not attach the ISR to the interrupt */ - - ret = -EAGAIN; - } - - /* Register the device with the OS so that socket IOCTLs can be performed */ - - (void)netdev_register(&priv->dev); + return -EAGAIN; } - return ret; + /* Register the device with the OS so that socket IOCTLs can be performed */ + + return netdev_register(&priv->dev); } /**************************************************************************** diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index 2036a29a15..bb08f9b374 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -43,6 +43,11 @@ #include +#include +#include + +#ifdef CONFIG_GRAN + /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ @@ -52,6 +57,8 @@ * granule allocator (i.e., gran_initialize will be called only once. * In this case, (1) there are a few optimizations that can can be done * and (2) the GRAN_HANDLE is not needed. + * CONFIG_DEBUG_GRAN - Just like CONFIG_DEBUG_MM, but only generates ouput + * from the gran allocation logic. */ /**************************************************************************** @@ -158,4 +165,5 @@ EXTERN void gran_free(GRAN_HANDLE handle, FAR void *memory, size_t size); } #endif +#endif /* CONFIG_GRAN */ #endif /* __INCLUDE_NUTTX_GRAN_H */ diff --git a/nuttx/mm/Kconfig b/nuttx/mm/Kconfig index bf3540138f..2e5bc95db8 100644 --- a/nuttx/mm/Kconfig +++ b/nuttx/mm/Kconfig @@ -42,3 +42,33 @@ config HEAP2_SIZE ---help--- The size of the second heap region. +config GRAN + bool "Enable Granule Allocator" + default n + ---help--- + Enable granual allocator support. Allocations will be aligned to the + granule size; allocations will be in units of the granule size. + Larger granules will give better performance and less overhead but + more losses of memory due to alignment and quantization waste. + + NOTE: The current implementation also restricts the maximum + allocation size to 32 granaules. That restriction could be + eliminated with some additional coding effort. + +config GRAN_SINGLE + bool "Single Granule Allocator" + default n + depends on GRAN + ---help--- + Select if there is only one instance of the granule allocator (i.e., + gran_initialize will be called only once. In this case, (1) there + are a few optimizations that can can be done and (2) the GRAN_HANDLE + is not needed. + +config DEBUG_GRAN + bool "Granule Allocator Debug" + default n + depends on GRAN && DEBUG + ---help--- + Just like CONFIG_DEBUG_MM, but only generates ouput from the gran + allocation logic. diff --git a/nuttx/mm/Makefile b/nuttx/mm/Makefile index 7e6eb68a75..ef168f0db1 100644 --- a/nuttx/mm/Makefile +++ b/nuttx/mm/Makefile @@ -36,10 +36,15 @@ -include $(TOPDIR)/Make.defs ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk.c \ mm_malloc.c mm_zalloc.c mm_calloc.c mm_realloc.c \ mm_memalign.c mm_free.c mm_mallinfo.c + +ifeq ($(CONFIG_GRAN),y) +CSRCS = mm_graninit.c mm_granalloc.c mm_granfree.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) diff --git a/nuttx/mm/mm_gran.h b/nuttx/mm/mm_gran.h index 6f5f890ed5..d8a334e298 100644 --- a/nuttx/mm/mm_gran.h +++ b/nuttx/mm/mm_gran.h @@ -42,17 +42,41 @@ #include +#include + #include /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Sizes of things */ + #define SIZEOF_GAT(n) \ ((n + 31) >> 5) #define SIZEOF_GRAN_S(n) \ (sizeof(struct gran_s) + sizeof(uint32_t) * (SIZEOF_GAT(n) - 1)) +/* Debug */ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG_GRAM +# define gramdbg(format, arg...) dbg(format, ##arg) +# define gramvdbg(format, arg...) vdbg(format, ##arg) +# else +# define gramdbg(format, arg...) mdbg(format, ##arg) +# define gramvdbg(format, arg...) mvdbg(format, ##arg) +# endif +#else +# ifdef CONFIG_DEBUG_GRAM +# define gramdbg dbg +# define gramvdbg vdbg +# else +# define gramdbg (void) +# define gramvdbg (void) +# endif +#endif + /**************************************************************************** * Public Types ****************************************************************************/ @@ -64,7 +88,7 @@ struct gran_s uint8_t log2gran; /* Log base 2 of the size of one granule */ uint16_t ngranules; /* The total number of (aligned) granules in the heap */ uintptr_t heapstart; /* The aligned start of the granule heap */ - uint32_t gat[i]; /* Start of the granule allocation table */ + uint32_t gat[1]; /* Start of the granule allocation table */ }; /**************************************************************************** diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c index f94f447e31..a8802a6c51 100644 --- a/nuttx/mm/mm_granalloc.c +++ b/nuttx/mm/mm_granalloc.c @@ -39,8 +39,14 @@ #include +#include + #include +#include "mm_gran.h" + +#ifdef CONFIG_GRAN + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -61,7 +67,7 @@ * ****************************************************************************/ -static inline FAR void *gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, unsigned int ngranules) +static inline void gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, unsigned int ngranules) { unsigned int granno; unsigned int gatidx; @@ -128,13 +134,13 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) int i; int j; - DEBUGASSERT(priv); + DEBUGASSERT(priv && size <= 32 * (1 << priv->log2gran)); if (priv && size > 0) { /* How many contiguous granules we we need to find? */ - tmpmask = (1 << log2gran) - 1; - ngranules = (size + tmpmask) >> log2gran; + tmpmask = (1 << priv->log2gran) - 1; + ngranules = (size + tmpmask) >> priv->log2gran; /* Then create mask for that number of granules */ @@ -188,11 +194,11 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) */ curr >>= 1; - if (next & 1) + if ((next & 1) != 0) { curr |= 0x80000000; } - next >> 1; + next >>= 1; /* Increment the next candidate allocation address */ @@ -239,3 +245,5 @@ FAR void *gran_alloc(GRAN_HANDLE handle, size_t size) return gran_common_alloc((FAR struct gran_s *)handle, size); } #endif + +#endif /* CONFIG_GRAN */ diff --git a/nuttx/mm/mm_granfree.c b/nuttx/mm/mm_granfree.c index 4679ae62b4..e359cded8c 100644 --- a/nuttx/mm/mm_granfree.c +++ b/nuttx/mm/mm_granfree.c @@ -39,8 +39,14 @@ #include +#include + #include +#include "mm_gran.h" + +#ifdef CONFIG_GRAN + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -66,18 +72,29 @@ static inline void gran_common_free(FAR struct gran_s *priv, unsigned int granno; unsigned int gatidx; unsigned int gatbit; + unsigned int granmask; + unsigned int ngranules; unsigned int avail; - uint32_t mask; + uint32_t gatmask; - /* Determine the granule number of the allocation */ + DEBUGASSERT(priv && memory && size <= 32 * (1 << priv->log2gran)); - granno = (alloc - priv->heapstart) >> priv->log2gran; + /* Determine the granule number of the first granule in the allocation */ - /* Determine the GAT table index associated with the allocation */ + granno = ((uintptr_t)memory - priv->heapstart) >> priv->log2gran; + + /* Determine the GAT table index and bit number associated with the + * allocation. + */ gatidx = granno >> 5; gatbit = granno & 31; + /* Determine the number of granules in the allocation */ + + granmask = (1 << priv->log2gran) - 1; + ngranules = (size + granmask) >> priv->log2gran; + /* Clear bits in the first GAT entry */ avail = 32 - gatbit; @@ -91,15 +108,15 @@ static inline void gran_common_free(FAR struct gran_s *priv, else { - mask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx] &= ~(mask << gatbit); + gatmask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx] &= ~(gatmask << gatbit); return; } /* Clear bits in the second GAT entry */ - mask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx+1] &= ~(mask << gatbit); + gatmask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx+1] &= ~(gatmask << gatbit); } /**************************************************************************** @@ -132,3 +149,5 @@ void gran_free(GRAN_HANDLE handle, FAR void *memory, size_t size) return gran_common_free((FAR struct gran_s *)handle, memory, size); } #endif + +#endif /* CONFIG_GRAN */ diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index 99b499155f..46b5f5ff14 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -39,8 +39,14 @@ #include +#include + #include +#include "mm_gran.h" + +#ifdef CONFIG_GRAN + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -108,7 +114,7 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, priv->log2gran = log2gran; priv->ngranules = ngranules; - priv->heapstart = alignedstart + priv->heapstart = alignedstart; } return priv; @@ -161,3 +167,6 @@ GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gr } #endif +#endif /* CONFIG_GRAN */ + + From 7bb74973bd7a1839c12ddf2b1d9221007f31ebc6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Sep 2012 21:39:39 +0000 Subject: [PATCH 52/95] Fixes for granule allocator git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5131 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/include/nuttx/gran.h | 4 ++-- nuttx/mm/Makefile | 2 +- nuttx/mm/mm_gran.h | 20 +++++++++++++++++++ nuttx/mm/mm_granalloc.c | 9 ++++++++- nuttx/mm/mm_granfree.c | 17 +++++++++++------ nuttx/mm/mm_graninit.c | 39 +++++++++++++++++++++++++++++++++++++- 6 files changed, 80 insertions(+), 11 deletions(-) diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index bb08f9b374..1176735cf1 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -106,8 +106,8 @@ extern "C" { ****************************************************************************/ #ifdef CONFIG_GRAN_SINGLE -EXTERN void gran_initialize(FAR void *heapstart, size_t heapsize, - uint8_t log2gran); +EXTERN int gran_initialize(FAR void *heapstart, size_t heapsize, + uint8_t log2gran); #else EXTERN GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran); diff --git a/nuttx/mm/Makefile b/nuttx/mm/Makefile index ef168f0db1..0cd28b23d1 100644 --- a/nuttx/mm/Makefile +++ b/nuttx/mm/Makefile @@ -41,7 +41,7 @@ CSRCS = mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk mm_memalign.c mm_free.c mm_mallinfo.c ifeq ($(CONFIG_GRAN),y) -CSRCS = mm_graninit.c mm_granalloc.c mm_granfree.c +CSRCS += mm_graninit.c mm_granalloc.c mm_granfree.c endif AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/nuttx/mm/mm_gran.h b/nuttx/mm/mm_gran.h index d8a334e298..4a76397c82 100644 --- a/nuttx/mm/mm_gran.h +++ b/nuttx/mm/mm_gran.h @@ -43,6 +43,7 @@ #include #include +#include #include @@ -87,6 +88,7 @@ struct gran_s { uint8_t log2gran; /* Log base 2 of the size of one granule */ uint16_t ngranules; /* The total number of (aligned) granules in the heap */ + sem_t exclsem; /* For exclusive access to the GAT */ uintptr_t heapstart; /* The aligned start of the granule heap */ uint32_t gat[1]; /* Start of the granule allocation table */ }; @@ -105,4 +107,22 @@ extern FAR struct gran_s *g_graninfo; * Public Function Prototypes ****************************************************************************/ +/**************************************************************************** + * Name: gran_semtake and gran_semgive + * + * Description: + * Managed semaphore for the granule allocator. gran_semgive is + * implemented as a macro. + * + * Input Parameters: + * priv - Pointer to the gran state + * + * Returned Value: + * None + * + ****************************************************************************/ + +void gran_semtake(FAR struct gran_s *priv); +#define gran_semgive(p) sem_post(&(p)->exclsem); + #endif /* __MM_MM_GRAN_H */ diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c index a8802a6c51..0e94d464b0 100644 --- a/nuttx/mm/mm_granalloc.c +++ b/nuttx/mm/mm_granalloc.c @@ -93,7 +93,7 @@ static inline void gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, ngranules -= avail; } - /* Handle the cae where where all of the granules come from one entry */ + /* Handle the case where where all of the granules come from one entry */ else { @@ -135,8 +135,13 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) int j; DEBUGASSERT(priv && size <= 32 * (1 << priv->log2gran)); + if (priv && size > 0) { + /* Get exclusive access to the GAT */ + + gran_semtake(priv); + /* How many contiguous granules we we need to find? */ tmpmask = (1 << priv->log2gran) - 1; @@ -186,6 +191,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) /* And return the allocation address */ + gran_semgive(priv); return (FAR void *)alloc; } @@ -207,6 +213,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) } } + gran_semgive(priv); return NULL; } diff --git a/nuttx/mm/mm_granfree.c b/nuttx/mm/mm_granfree.c index e359cded8c..96fdda87e0 100644 --- a/nuttx/mm/mm_granfree.c +++ b/nuttx/mm/mm_granfree.c @@ -79,6 +79,10 @@ static inline void gran_common_free(FAR struct gran_s *priv, DEBUGASSERT(priv && memory && size <= 32 * (1 << priv->log2gran)); + /* Get exclusive access to the GAT */ + + gran_semtake(priv); + /* Determine the granule number of the first granule in the allocation */ granno = ((uintptr_t)memory - priv->heapstart) >> priv->log2gran; @@ -102,21 +106,22 @@ static inline void gran_common_free(FAR struct gran_s *priv, { priv->gat[gatidx] &= ~(0xffffffff << gatbit); ngranules -= avail; + + /* Clear bits in the second GAT entry */ + + gatmask = 0xffffffff >> (32 - ngranules); + priv->gat[gatidx+1] &= ~(gatmask << gatbit); } - /* Handle the cae where where all of the granules came from one entry */ + /* Handle the case where where all of the granules came from one entry */ else { gatmask = 0xffffffff >> (32 - ngranules); priv->gat[gatidx] &= ~(gatmask << gatbit); - return; } - /* Clear bits in the second GAT entry */ - - gatmask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx+1] &= ~(gatmask << gatbit); + gran_semgive(priv); } /**************************************************************************** diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index 46b5f5ff14..bc2c6f2a1a 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -40,6 +40,8 @@ #include #include +#include +#include #include @@ -95,6 +97,8 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, unsigned int alignedsize; unsigned int ngranules; + DEBUGASSERT(heapstart && heapsize > 0 && log2gran > 0 && log2gran < 32); + /* Determine the number of granules */ mask = (1 << log2gran) - 1; @@ -115,6 +119,7 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, priv->log2gran = log2gran; priv->ngranules = ngranules; priv->heapstart = alignedstart; + sem_init(&priv->exclsem, 0, 1); } return priv; @@ -153,7 +158,7 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, int gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) { g_graninfo = gran_common_initialize(heapstart, heapsize, log2gran); - if (!g_granifo) + if (!g_graninfo) { return -ENOMEM; } @@ -167,6 +172,38 @@ GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gr } #endif +/**************************************************************************** + * Name: gran_semtake and gran_semgive + * + * Description: + * Managed semaphore for the granule allocator. gran_semgive is + * implemented as a macro. + * + * Input Parameters: + * priv - Pointer to the gran state + * + * Returned Value: + * None + * + ****************************************************************************/ + +void gran_semtake(FAR struct gran_s *priv) +{ + int ret; + + /* Continue waiting if we are awakened by a signal */ + + do + { + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + DEBUGASSERT(errno == EINTR); + } + } + while (ret < 0); +} + #endif /* CONFIG_GRAN */ From 675f37494ad7f096e0b4c42189fe224c54e4fdb1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 00:12:18 +0000 Subject: [PATCH 53/95] Misc ENC28J60 fixes git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5132 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttxPortingGuide.html | 4 +- nuttx/drivers/net/enc28j60.c | 212 ++++++++++++++------- nuttx/drivers/net/enc28j60.h | 2 +- nuttx/include/nuttx/gran.h | 4 +- nuttx/mm/mm_granalloc.c | 14 +- nuttx/mm/mm_graninit.c | 2 +- 6 files changed, 157 insertions(+), 81 deletions(-) diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index f2c89dcbe9..d44bae4abd 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -3930,8 +3930,8 @@ build CONFIG_HEAP2_BASE and CONFIG_HEAP2_SIZE: Some architectures use these settings to specify the size of a second heap region. -
    • +
    • CONFIG_GRAN: Enable granual allocator support. Allocations will be aligned to the granule size; allocations will be in units of the granule size. @@ -3940,8 +3940,8 @@ build NOTE: The current implementation also restricts the maximum allocation size to 32 granaules. That restriction could be eliminated with some additional coding effort. -
    • +
    • CONFIG_GRAN_SINGLE: Select if there is only one instance of the granule allocator (i.e., gran_initialize will be called only once. In this case, (1) there diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index a2f3d58715..b9d614cd9d 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -183,6 +183,9 @@ struct enc_driver_s uint8_t ifstate; /* Interface state: See ENCSTATE_* */ uint8_t bank; /* Currently selected bank */ +#ifndef CONFIG_SPI_OWNBUS + uint8_t lockcount; /* Avoid recursive locks */ +#endif uint16_t nextpkt; /* Next packet address */ FAR const struct enc_lower_s *lower; /* Low-level MCU-specific support */ @@ -191,7 +194,7 @@ struct enc_driver_s WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txtimeout; /* TX timeout timer */ - /* We we don't own the SPI bus, then we cannot do SPI accesses from the + /* If we don't own the SPI bus, then we cannot do SPI accesses from the * interrupt handler. */ @@ -228,11 +231,11 @@ static struct enc_driver_s g_enc28j60[CONFIG_ENC28J60_NINTERFACES]; static inline void enc_configspi(FAR struct spi_dev_s *spi); #ifdef CONFIG_SPI_OWNBUS -static inline void enc_select(FAR struct spi_dev_s *spi); -static inline void enc_deselect(FAR struct spi_dev_s *spi); +static inline void enc_select(FAR struct enc_driver_s *priv); +static inline void enc_deselect(FAR struct enc_driver_s *priv); #else -static void enc_select(FAR struct spi_dev_s *spi); -static void enc_deselect(FAR struct spi_dev_s *spi); +static void enc_select(FAR struct enc_driver_s *priv); +static void enc_deselect(FAR struct enc_driver_s *priv); #endif /* SPI control register access */ @@ -240,11 +243,12 @@ static void enc_deselect(FAR struct spi_dev_s *spi); static uint8_t enc_rdgreg2(FAR struct enc_driver_s *priv, uint8_t cmd); static void enc_wrgreg2(FAR struct enc_driver_s *priv, uint8_t cmd, uint8_t wrdata); +static inline void enc_src(FAR struct enc_driver_s *priv); static void enc_setbank(FAR struct enc_driver_s *priv, uint8_t bank); static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg); static void enc_wrbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, uint8_t wrdata); -static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, +static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, uint8_t bits, uint8_t value); /* SPI buffer transfers */ @@ -351,30 +355,47 @@ static inline void enc_configspi(FAR struct spi_dev_s *spi) ****************************************************************************/ #ifdef CONFIG_SPI_OWNBUS -static inline void enc_select(FAR struct spi_dev_s *spi) +static inline void enc_select(FAR struct enc_driver_s *priv) { /* We own the SPI bus, so just select the chip */ - SPI_SELECT(spi, SPIDEV_ETHERNET, true); + SPI_SELECT(priv->spi, SPIDEV_ETHERNET, true); } #else -static void enc_select(FAR struct spi_dev_s *spi) +static void enc_select(FAR struct enc_driver_s *priv) { - /* Select ENC28J60 chip (locking the SPI bus in case there are multiple - * devices competing for the SPI bus + /* Lock the SPI bus in case there are multiple devices competing for the SPI + * bus. First check if we already hold the lock. */ - SPI_LOCK(spi, true); - SPI_SELECT(spi, SPIDEV_ETHERNET, true); + if (priv->lockcount > 0) + { + /* Yes... just increment the lock count */ + + DEBUGASSERT(priv->lockcount < 255); + priv->lockcount++; + } + else + { + /* No... take the lock and set the lock count to 1 */ + + DEBUGASSERT(priv->lockcount == 0); + SPI_LOCK(priv->spi, true); + priv->lockcount = 1; + } + + /* Select ENC28J60 chip. */ + + SPI_SELECT(priv->spi, SPIDEV_ETHERNET, true); /* Now make sure that the SPI bus is configured for the ENC28J60 (it * might have gotten configured for a different device while unlocked) */ - SPI_SETMODE(spi, CONFIG_ENC28J60_SPIMODE); - SPI_SETBITS(spi, 8); + SPI_SETMODE(priv->spi, CONFIG_ENC28J60_SPIMODE); + SPI_SETBITS(priv->spi, 8); #ifdef CONFIG_ENC28J60_FREQUENCY - SPI_SETFREQUENCY(spi, CONFIG_ENC28J60_FREQUENCY); + SPI_SETFREQUENCY(priv->spi, CONFIG_ENC28J60_FREQUENCY); #endif } #endif @@ -396,19 +417,33 @@ static void enc_select(FAR struct spi_dev_s *spi) ****************************************************************************/ #ifdef CONFIG_SPI_OWNBUS -static inline void enc_deselect(FAR struct spi_dev_s *spi) +static inline void enc_deselect(FAR struct enc_driver_s *priv) { /* We own the SPI bus, so just de-select the chip */ - SPI_SELECT(spi, SPIDEV_ETHERNET, false); + SPI_SELECT(priv->spi, SPIDEV_ETHERNET, false); } #else -static void enc_deselect(FAR struct spi_dev_s *spi) +static void enc_deselect(FAR struct enc_driver_s *priv) { - /* De-select ENC28J60 chip and relinquish the SPI bus. */ + /* De-select ENC28J60 chip. */ - SPI_SELECT(spi, SPIDEV_ETHERNET, false); - SPI_LOCK(spi, false); + SPI_SELECT(priv->spi, SPIDEV_ETHERNET, false); + + /* And relinquishthe lock on the bus. If the lock count is > 1 then we + * are in a nested lock and we only need to decrement the lock cound. + */ + + if (priv->lockcount <= 1) + { + DEBUGASSERT(priv->lockcount == 1); + SPI_LOCK(priv->spi, false); + priv->lockcount = 0; + } + else + { + priv->lockcount--; + } } #endif @@ -432,26 +467,24 @@ static void enc_deselect(FAR struct spi_dev_s *spi) static uint8_t enc_rdgreg2(FAR struct enc_driver_s *priv, uint8_t cmd) { - FAR struct spi_dev_s *spi; uint8_t rddata; DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Send the read command and collect the data. The sequence requires * 16-clocks: 8 to clock out the cmd + 8 to clock in the data. */ - (void)SPI_SEND(spi, cmd); /* Clock out the command */ - rddata = SPI_SEND(spi, 0); /* Clock in the data */ + (void)SPI_SEND(priv->spi, cmd); /* Clock out the command */ + rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ /* De-select ENC28J60 chip */ - enc_deselect(spi); + enc_deselect(priv); return rddata; } @@ -477,25 +510,75 @@ static uint8_t enc_rdgreg2(FAR struct enc_driver_s *priv, uint8_t cmd) static void enc_wrgreg2(FAR struct enc_driver_s *priv, uint8_t cmd, uint8_t wrdata) { - FAR struct spi_dev_s *spi; - DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Send the write command and data. The sequence requires 16-clocks: * 8 to clock out the cmd + 8 to clock out the data. */ - (void)SPI_SEND(spi, cmd); /* Clock out the command */ - (void)SPI_SEND(spi, wrdata); /* Clock out the data */ + (void)SPI_SEND(priv->spi, cmd); /* Clock out the command */ + (void)SPI_SEND(priv->spi, wrdata); /* Clock out the data */ /* De-select ENC28J60 chip. */ - enc_deselect(spi); + enc_deselect(priv); +} + +/**************************************************************************** + * Function: enc_src + * + * Description: + * Send the single byte system reset command (SRC). + * + * "The System Reset Command (SRC) allows the host controller to issue a + * System Soft Reset command. Unlike other SPI commands, the SRC is + * only a single byte command and does not operate on any register. The + * command is started by pulling the CS pin low. The SRC opcode is the + * sent, followed by a 5-bit Soft Reset command constant of 1Fh. The + * SRC operation is terminated by raising the CS pin." + * + * Parameters: + * priv - Reference to the driver state structure + * + * Returned Value: + * None + * + * Assumptions: + * + ****************************************************************************/ + +static inline void enc_src(FAR struct enc_driver_s *priv) +{ + DEBUGASSERT(priv && priv->spi); + + /* Select ENC28J60 chip */ + + enc_select(priv); + + /* Send the system reset command. */ + + (void)SPI_SEND(priv->spi, ENC_SRC); + + /* Check CLKRDY bit to see when the reset is complete. There is an errata + * that says the CLKRDY may be invalid. We'll wait a couple of msec to + * workaround this condition. + * + * Also, "After a System Reset, all PHY registers should not be read or + * written to until at least 50 µs have passed since the Reset has ended. + * All registers will revert to their Reset default values. The dual + * port buffer memory will maintain state throughout the System Reset." + */ + + up_mdelay(2); + /* while ((enc_rdgreg(priv, ENC_ESTAT) & ESTAT_CLKRDY) != 0); */ + + /* De-select ENC28J60 chip. */ + + enc_deselect(priv); } /**************************************************************************** @@ -560,15 +643,13 @@ static void enc_setbank(FAR struct enc_driver_s *priv, uint8_t bank) static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) { - FAR struct spi_dev_s *spi; uint8_t rddata; DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Set the bank */ @@ -579,20 +660,21 @@ static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) * 16-clocks: 8 to clock out the cmd and 8 to clock in the data. */ - (void)SPI_SEND(spi, ENC_RCR | GETADDR(ctrlreg)); /* Clock out the command */ + (void)SPI_SEND(priv->spi, ENC_RCR | GETADDR(ctrlreg)); /* Clock out the command */ if (ISPHYMAC(ctrlreg)) { /* The PHY/MAC sequence requires 24-clocks: 8 to clock out the cmd, * 8 dummy bits, and 8 to clock in the PHY/MAC data. */ - (void)SPI_SEND(spi,0); /* Clock in the dummy byte */ + (void)SPI_SEND(priv->spi, 0); /* Clock in the dummy byte */ } - rddata = SPI_SEND(spi, 0); /* Clock in the data */ + + rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ /* De-select ENC28J60 chip */ - enc_deselect(spi); + enc_deselect(priv); return rddata; } @@ -619,14 +701,11 @@ static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) static void enc_wrbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, uint8_t wrdata) { - FAR struct spi_dev_s *spi; - DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Set the bank */ @@ -636,12 +715,12 @@ static void enc_wrbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, * 8 to clock out the cmd + 8 to clock out the data. */ - (void)SPI_SEND(spi, ENC_WCR | GETADDR(ctrlreg)); /* Clock out the command */ - (void)SPI_SEND(spi, wrdata); /* Clock out the data */ + (void)SPI_SEND(priv->spi, ENC_WCR | GETADDR(ctrlreg)); /* Clock out the command */ + (void)SPI_SEND(priv->spi, wrdata); /* Clock out the data */ /* De-select ENC28J60 chip. */ - enc_deselect(spi); + enc_deselect(priv); } /**************************************************************************** @@ -681,6 +760,7 @@ static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, elapsed = clock_systimer() - start; } while ((rddata & bits) != value || elapsed > ENC_POLLTIMEOUT); + return (rddata & bits) == value ? -ETIMEDOUT : OK; } @@ -706,26 +786,23 @@ static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, static void enc_rdbuffer(FAR struct enc_driver_s *priv, FAR uint8_t *buffer, size_t buflen) { - FAR struct spi_dev_s *spi; - DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Send the read buffer memory command (ignoring the response) */ - (void)SPI_SEND(spi, ENC_RBM); + (void)SPI_SEND(priv->spi, ENC_RBM); /* Then read the buffer data */ - SPI_RECVBLOCK(spi, buffer, buflen); + SPI_RECVBLOCK(priv->spi, buffer, buflen); /* De-select ENC28J60 chip. */ - enc_deselect(spi); + enc_deselect(priv); } /**************************************************************************** @@ -750,26 +827,23 @@ static void enc_rdbuffer(FAR struct enc_driver_s *priv, FAR uint8_t *buffer, static void enc_wrbuffer(FAR struct enc_driver_s *priv, FAR const uint8_t *buffer, size_t buflen) { - FAR struct spi_dev_s *spi; - DEBUGASSERT(priv && priv->spi); - spi = priv->spi; /* Select ENC28J60 chip */ - enc_select(spi); + enc_select(priv); /* Send the write buffer memory command (ignoring the response) */ - (void)SPI_SEND(spi, ENC_WBM); + (void)SPI_SEND(priv->spi, ENC_WBM); /* Then send the buffer */ - SPI_SNDBLOCK(spi, buffer, buflen); + SPI_SNDBLOCK(priv->spi, buffer, buflen); /* De-select ENC28J60 chip. */ - enc_deselect(spi); + enc_deselect(priv); } /**************************************************************************** @@ -811,6 +885,7 @@ static uint16_t enc_rdphy(FAR struct enc_driver_s *priv, uint8_t phyaddr) data = (uint16_t)enc_rdbreg(priv, ENC_MIRDL); data |= (uint16_t)enc_rdbreg(priv, ENC_MIRDH) << 8; } + return data; } @@ -1999,15 +2074,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) /* Reset the ENC28J60 */ - enc_wrgreg(priv, ENC_SRC, ENC_SRC); - - /* Check CLKRDY bit to see when the reset is complete. There is an errata - * that says the CLKRDY may be invalid. We'll wait a couple of msec to - * workaround this condition. - */ - - up_mdelay(2); - /* while ((enc_rdgreg(priv, ENC_ESTAT) & ESTAT_CLKRDY) != 0); */ + enc_src(priv); /* Initialize ECON1: Clear ECON1 */ @@ -2053,6 +2120,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) nlldbg("Bad Rev ID: %02x\n", regval); return -ENODEV; } + nllvdbg("Rev ID: %02x\n", regval); /* Set filter mode: unicast OR broadcast AND crc valid */ diff --git a/nuttx/drivers/net/enc28j60.h b/nuttx/drivers/net/enc28j60.h index 408224b22d..6ca1a524d1 100644 --- a/nuttx/drivers/net/enc28j60.h +++ b/nuttx/drivers/net/enc28j60.h @@ -56,7 +56,7 @@ */ #define ENC_RCR (0x00) /* Read Control Register - * 000 | aaaaa | (Registe value returned)) */ + * 000 | aaaaa | (Register value returned)) */ #define ENC_RBM (0x3a) /* Read Buffer Memory * 001 | 11010 | (Read buffer data follows) */ #define ENC_WCR (0x40) /* Write Control Register diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index 1176735cf1..8e009ab810 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -90,7 +90,7 @@ extern "C" { * losses of memory due to alignment and quantization waste. * * NOTE: The current implementation also restricts the maximum allocation - * size to 32 granaules. That restriction could be eliminated with some + * size to 32 granules. That restriction could be eliminated with some * additional coding effort. * * Input Parameters: @@ -120,7 +120,7 @@ EXTERN GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, * Allocate memory from the granule heap. * * NOTE: The current implementation also restricts the maximum allocation - * size to 32 granaules. That restriction could be eliminated with some + * size to 32 granules. That restriction could be eliminated with some * additional coding effort. * * Input Parameters: diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c index 0e94d464b0..62fbc0870a 100644 --- a/nuttx/mm/mm_granalloc.c +++ b/nuttx/mm/mm_granalloc.c @@ -158,10 +158,18 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) for (i = 0; i < priv->ngranules; i += 32) { - /* Get the GAT index associated with the granule (i) */ + /* Get the GAT index associated with the granule table entry [i] */ j = i >> 5; - curr = priv->gat[j]; + curr = priv->gat[j]; + + /* Handle the case where there are no free granules in the entry */ + + if (curr == 0xffffffff) + { + alloc += (32 << priv->log2gran); + continue; + } /* Get the next entry from the GAT to support a 64 bit shift */ @@ -228,7 +236,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) * Allocate memory from the granule heap. * * NOTE: The current implementation also restricts the maximum allocation - * size to 32 granaules. That restriction could be eliminated with some + * size to 32 granules. That restriction could be eliminated with some * additional coding effort. * * Input Parameters: diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index bc2c6f2a1a..d3144b2aa6 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -139,7 +139,7 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, * losses of memory due to alignment and quantization waste. * * NOTE: The current implementation also restricts the maximum allocation - * size to 32 granaules. That restriction could be eliminated with some + * size to 32 granules. That restriction could be eliminated with some * additional coding effort. * * Input Parameters: From 1b7dad5a765bc86ee194f72b7a75d76b93e87943 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 14:07:13 +0000 Subject: [PATCH 54/95] Misc STM32 wildfire and ENC28J60 driver updates git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5133 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 3 ++ nuttx/Documentation/NuttX.html | 21 ++++++++--- nuttx/configs/fire-stm32v2/README.txt | 14 +++++++ nuttx/configs/fire-stm32v2/include/board.h | 2 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 2 +- .../configs/fire-stm32v2/src/fire-internal.h | 8 +++- nuttx/configs/fire-stm32v2/src/up_spi.c | 4 +- nuttx/drivers/Kconfig | 1 + nuttx/drivers/net/Kconfig | 8 +++- nuttx/drivers/net/enc28j60.c | 37 +++++++++++-------- 10 files changed, 71 insertions(+), 29 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 174b1cc522..f69cc8d062 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3328,3 +3328,6 @@ simple allocation of DMA I/O buffers. The initiali check-in is code complete but untested (not event built into the mm/Makefile yet. + * confgs/fire-stm32v2: The board port is basically functional. + Not all features have been verified. The ENC28J60 network + is not yet functional. diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index 287c702d26..e4f2ff6db7 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -1734,8 +1734,9 @@

      STMicro STM32F103x. - Support for four MCUs and three board configurations are available. - MCU support includes: STM32F103ZET6, STM32F103RET6, and STM32F103VCT. + Support for four MCUs and four board configurations are available. + MCU support includes all of the high density and connectivity line families. + Board supported is available specifically for: STM32F103ZET6, STM32F103RET6, STM32F103VCT, and STM32F103VET6. Boards supported include:

        @@ -1751,6 +1752,10 @@ A port for the HY-Mini STM32v board. This board is based on the STM32F103VCT chip. Contributed by Laurent Latil. +
      1. + This M3 Wildfire development board (STM32F103VET6), version 2. + See http://firestm32.taobao.com (the current board is version 3). +

      These ports uses a GNU arm-elf toolchain* under either Linux or Cygwin (with native Windows GNU @@ -1761,7 +1766,7 @@ STATUS:

        -
      • +
      • Basic Support/Drivers. The basic STM32 port was released in NuttX version 0.4.12. The basic port includes boot-up logic, interrupt driven serial console, and system timer interrupts. The 0.4.13 release added support for SPI, serial FLASH, and USB device.; @@ -1769,15 +1774,21 @@ Verified configurations are available for NuttX OS test, the NuttShell (NSH) example, the USB serial device class, and the USB mass storage device class example.
      • -
      • +
      • NetClamps VSN. Support for the NetClamps VSN was included in version 5.18 of NuttX. Uros Platise added support for timers, RTC, I2C, FLASH, extended power management and other features.
      • -
      • +
      • Additional Drivers. Additional drivers and configurations were added in NuttX 6.13 and later releases for the STM32 F1 and F4. F1 compatible drivers include an Ethernet driver, ADC driver, DAC driver, PWM driver, IWDG, WWDG, and CAN drivers.
      • +
      • M3 Wildfire. + Support for the Wildfire board was included in version 6.22 of NuttX. + The board port is basically functional. + Not all features have been verified. + The ENC28J60 network is not yet functional. +

      Development Environments: diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index 694e319daa..02485f812d 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -764,3 +764,17 @@ Where is one of the following: Configure the NuttShell (nsh) located at examples/nsh. The nsh configuration contains support for some built-in applications that can be enabled by making some additional minor change to the configuration file. + + NOTE: This configuration uses to the mconf configuration tool to control + the configuration. See the section entitled "NuttX Configuration Tool" + in the top-level README.txt file. + + STATUS: The board port is basically functional. Not all features have been + verified. The ENC28J60 network is not yet functional. Networking is + enabled by default in this configuration for testing purposes. To use this + configuration, the network must currently be disabled. To do this using + the mconf configuration tool: + + > make menuconfig + + Then de-select "Networking Support" -> "Networking Support" diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index 36f09e7a89..9a5d309ab6 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -2,7 +2,7 @@ * configs/fire-stm32v2/include/board.h * include/arch/board/board.h * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index fda34debe3..1a849ad367 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -344,7 +344,7 @@ CONFIG_NETDEVICES=y # CONFIG_NET_DM90x0 is not set CONFIG_ENC28J60=y CONFIG_ENC28J60_NINTERFACES=1 -CONFIG_ENC28J60_SPIMODE=2 +CONFIG_ENC28J60_SPIMODE=0 CONFIG_ENC28J60_FREQUENCY=20000000 # CONFIG_ENC28J60_STATS is not set # CONFIG_ENC28J60_HALFDUPPLEX is not set diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index ee3c3486fe..f51bd0ef99 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -192,7 +192,7 @@ */ #ifndef CONFIG_ENC28J60 -# define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ +# define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) #endif @@ -214,11 +214,15 @@ # warning "TFT LCD and ENCJ2860 shared PE1" #endif +/* CS and Reset are active low. Initial states are not selected and not in + * reset (driver does a soft reset). + */ + #ifdef CONFIG_ENC28J60 # define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) # define GPIO_ENC28J60_RESET (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ - GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN1) + GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN1) # define GPIO_ENC28J60_INTR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_EXTI|GPIO_PORTE|GPIO_PIN5) #endif diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c index 329274b7fc..b2ef301b67 100644 --- a/nuttx/configs/fire-stm32v2/src/up_spi.c +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -163,11 +163,11 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if 0 /* Need to study this */ - if (devid == SPIDEV_FLASH) + if (devid == SPIDEV_LCD) { /* Set the GPIO low to select and high to de-select */ - stm32_gpiowrite(GPIO_FLASH_CS, !selected); + stm32_gpiowrite(GPIO_LCD_CS, !selected); } else #endif diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig index c484e0c248..294566d013 100644 --- a/nuttx/drivers/Kconfig +++ b/nuttx/drivers/Kconfig @@ -300,6 +300,7 @@ endif menuconfig NETDEVICES bool "Network Device Support" default n + depends on NET ---help--- Network interface drivers. See also include/nuttx/net/net.h diff --git a/nuttx/drivers/net/Kconfig b/nuttx/drivers/net/Kconfig index 988b96c948..b5c09bf018 100644 --- a/nuttx/drivers/net/Kconfig +++ b/nuttx/drivers/net/Kconfig @@ -36,9 +36,13 @@ config ENC28J60_NINTERFACES config ENC28J60_SPIMODE int "SPI mode" - default 2 + default 0 ---help--- - Controls the SPI mode + Controls the SPI mode. The ENC28J60 spec says that it supports SPI + mode 0,0 only: "The implementation used on this device supports SPI + mode 0,0 only. In addition, the SPI port requires that SCK be at Idle + in a low state; selectable clock polarity is not supported." + However, sometimes you need to tinker with these things. config ENC28J60_FREQUENCY int "SPI frequency" diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index b9d614cd9d..d3c735b11e 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -83,12 +83,15 @@ * CONFIG_ENC28J60_HALFDUPPLEX - Default is full duplex */ -/* The ENC28J60 spec says that is supports SPI mode 0,0 only. However, - * somtimes you need to tinker with these things. +/* The ENC28J60 spec says that it supports SPI mode 0,0 only: "The + * implementation used on this device supports SPI mode 0,0 only. In + * addition, the SPI port requires that SCK be at Idle in a low state; + * selectable clock polarity is not supported." However, sometimes you + * need to tinker with these things. */ #ifndef CONFIG_ENC28J60_SPIMODE -# define CONFIG_ENC28J60_SPIMODE SPIDEV_MODE2 +# define CONFIG_ENC28J60_SPIMODE SPIDEV_MODE0 #endif /* CONFIG_ENC28J60_NINTERFACES determines the number of physical interfaces @@ -370,7 +373,9 @@ static void enc_select(FAR struct enc_driver_s *priv) if (priv->lockcount > 0) { - /* Yes... just increment the lock count */ + /* Yes... just increment the lock count. In this case, we know + * that the bus has already been configured for the ENC28J60. + */ DEBUGASSERT(priv->lockcount < 255); priv->lockcount++; @@ -382,21 +387,21 @@ static void enc_select(FAR struct enc_driver_s *priv) DEBUGASSERT(priv->lockcount == 0); SPI_LOCK(priv->spi, true); priv->lockcount = 1; + + /* Now make sure that the SPI bus is configured for the ENC28J60 (it + * might have gotten configured for a different device while unlocked) + */ + + SPI_SETMODE(priv->spi, CONFIG_ENC28J60_SPIMODE); + SPI_SETBITS(priv->spi, 8); +#ifdef CONFIG_ENC28J60_FREQUENCY + SPI_SETFREQUENCY(priv->spi, CONFIG_ENC28J60_FREQUENCY); +#endif } /* Select ENC28J60 chip. */ SPI_SELECT(priv->spi, SPIDEV_ETHERNET, true); - - /* Now make sure that the SPI bus is configured for the ENC28J60 (it - * might have gotten configured for a different device while unlocked) - */ - - SPI_SETMODE(priv->spi, CONFIG_ENC28J60_SPIMODE); - SPI_SETBITS(priv->spi, 8); -#ifdef CONFIG_ENC28J60_FREQUENCY - SPI_SETFREQUENCY(priv->spi, CONFIG_ENC28J60_FREQUENCY); -#endif } #endif @@ -667,10 +672,10 @@ static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) * 8 dummy bits, and 8 to clock in the PHY/MAC data. */ - (void)SPI_SEND(priv->spi, 0); /* Clock in the dummy byte */ + (void)SPI_SEND(priv->spi, 0); /* Clock in the dummy byte */ } - rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ + rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ /* De-select ENC28J60 chip */ From eac15a4720dd9d514ab7d683fb68797c174293cc Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 15:18:56 +0000 Subject: [PATCH 55/95] Fix MMC/SD support for Wildfire board; Granule allocator can now be used from intrrupt handler git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5134 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttxPortingGuide.html | 7 ++++ nuttx/configs/README.txt | 5 +++ .../configs/fire-stm32v2/src/fire-internal.h | 2 +- nuttx/configs/fire-stm32v2/src/up_mmcsd.c | 8 ++-- nuttx/include/nuttx/gran.h | 7 +++- nuttx/mm/Kconfig | 11 ++++++ nuttx/mm/Makefile | 4 +- nuttx/mm/mm_gran.h | 14 ++++--- nuttx/mm/mm_granalloc.c | 18 ++++----- nuttx/mm/mm_granfree.c | 6 +-- nuttx/mm/mm_graninit.c | 39 +++---------------- 11 files changed, 62 insertions(+), 59 deletions(-) diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index d44bae4abd..8b87bbcee9 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -3948,6 +3948,13 @@ build are a few optimizations that can can be done and (2) the GRAN_HANDLE is not needed.

    • +
    • + CONFIG_GRAN_INTR: + Normally mutual exclusive access to granule allocator data is assured using a semaphore. + If this option is set then, instead, mutual exclusion logic will disable interrupts. + While this options is more invasive to system performance, it will also support use of the + granule allocator from interrupt level logic. +
    • CONFIG_DEBUG_GRAM: Just like CONFIG_DEBUG_MM, but only generates ouput from the gran diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index b3d0e91f51..1c14e8388f 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -299,6 +299,11 @@ defconfig -- This is a configuration file similar to the Linux gran_initialize will be called only once. In this case, (1) there are a few optimizations that can can be done and (2) the GRAN_HANDLE is not needed. + CONFIG_GRAN_INTR - Normally mutual exclusive access to granule allocator + data is assured using a semaphore. If this option is set then, instead, + mutual exclusion logic will disable interrupts. While this options is + more invasive to system performance, it will also support use of the + granule allocator from interrupt level logic. CONFIG_DEBUG_GRAM Just like CONFIG_DEBUG_MM, but only generates ouput from the gran allocation logic. diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index f51bd0ef99..801fb127ea 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -296,7 +296,7 @@ void stm32_selectlcd(void); * * Description: * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n - * and CONFIG_STM32_SPI1=y + * and CONFIG_STM32_SDIO=y * ****************************************************************************/ diff --git a/nuttx/configs/fire-stm32v2/src/up_mmcsd.c b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c index d3fa611bd7..c0c6693d34 100644 --- a/nuttx/configs/fire-stm32v2/src/up_mmcsd.c +++ b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c @@ -65,7 +65,7 @@ /* Can't support MMC/SD features if mountpoints are disabled */ -#ifndef CONFIG_DISABLE_MOUNTPOINT +#ifdef CONFIG_DISABLE_MOUNTPOINT # undef HAVE_MMCSD #endif @@ -78,7 +78,7 @@ * * Description: * Initialize the SPI-based SD card. Requires CONFIG_DISABLE_MOUNTPOINT=n - * and CONFIG_STM32_SPI1=y + * and CONFIG_STM32_SDIO=y * ****************************************************************************/ @@ -93,7 +93,7 @@ int stm32_sdinitialize(int minor) sdio = sdio_initialize(STM32_MMCSDSLOTNO); if (!sdio) { - message("Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); + fdbg("Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); return -ENODEV; } @@ -104,7 +104,7 @@ int stm32_sdinitialize(int minor) ret = mmcsd_slotinitialize(minor, sdio); if (ret != OK) { - message("Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", + fdbg("Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", STM32_MMCSDSLOTNO, minor); } diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index 8e009ab810..f3a6d0fe9b 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -2,7 +2,7 @@ * include/nuttx/gran.h * General purpose granule memory allocator. * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,6 +57,11 @@ * granule allocator (i.e., gran_initialize will be called only once. * In this case, (1) there are a few optimizations that can can be done * and (2) the GRAN_HANDLE is not needed. + * CONFIG_GRAN_INTR - Normally mutual exclusive access to granule allocator + * data is assured using a semaphore. If this option is set then, instead, + * mutual exclusion logic will disable interrupts. While this options is + * more invasive to system performance, it will also support use of the + * granule allocator from interrupt level logic. * CONFIG_DEBUG_GRAN - Just like CONFIG_DEBUG_MM, but only generates ouput * from the gran allocation logic. */ diff --git a/nuttx/mm/Kconfig b/nuttx/mm/Kconfig index 2e5bc95db8..5da12b65e9 100644 --- a/nuttx/mm/Kconfig +++ b/nuttx/mm/Kconfig @@ -65,6 +65,17 @@ config GRAN_SINGLE are a few optimizations that can can be done and (2) the GRAN_HANDLE is not needed. +config GRAN_INTR + bool "Interrupt level support" + default n + depends on GRAN + ---help--- + Normally mutual exclusive access to granule allocator data is assured + using a semaphore. If this option is set then, instead, mutual + exclusion logic will disable interrupts. While this options is more + invasive to system performance, it will also support use of the granule + allocator from interrupt level logic. + config DEBUG_GRAN bool "Granule Allocator Debug" default n diff --git a/nuttx/mm/Makefile b/nuttx/mm/Makefile index 0cd28b23d1..0ccf5a09a9 100644 --- a/nuttx/mm/Makefile +++ b/nuttx/mm/Makefile @@ -1,7 +1,7 @@ ############################################################################ # mm/Makefile # -# Copyright (C) 2007 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ CSRCS = mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c mm_shrinkchunk mm_memalign.c mm_free.c mm_mallinfo.c ifeq ($(CONFIG_GRAN),y) -CSRCS += mm_graninit.c mm_granalloc.c mm_granfree.c +CSRCS += mm_graninit.c mm_granalloc.c mm_granfree.c mm_grancritical.c endif AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/nuttx/mm/mm_gran.h b/nuttx/mm/mm_gran.h index 4a76397c82..a4f51490d7 100644 --- a/nuttx/mm/mm_gran.h +++ b/nuttx/mm/mm_gran.h @@ -45,6 +45,7 @@ #include #include +#include #include /**************************************************************************** @@ -88,7 +89,11 @@ struct gran_s { uint8_t log2gran; /* Log base 2 of the size of one granule */ uint16_t ngranules; /* The total number of (aligned) granules in the heap */ +#ifdef CONFIG_GRAN_INTR + irqstate_t irqstate; /* For exclusive access to the GAT */ +#else sem_t exclsem; /* For exclusive access to the GAT */ +#endif uintptr_t heapstart; /* The aligned start of the granule heap */ uint32_t gat[1]; /* Start of the granule allocation table */ }; @@ -108,11 +113,10 @@ extern FAR struct gran_s *g_graninfo; ****************************************************************************/ /**************************************************************************** - * Name: gran_semtake and gran_semgive + * Name: gran_enter_critical and gran_leave_critical * * Description: - * Managed semaphore for the granule allocator. gran_semgive is - * implemented as a macro. + * Critical section management for the granule allocator. * * Input Parameters: * priv - Pointer to the gran state @@ -122,7 +126,7 @@ extern FAR struct gran_s *g_graninfo; * ****************************************************************************/ -void gran_semtake(FAR struct gran_s *priv); -#define gran_semgive(p) sem_post(&(p)->exclsem); +void gran_enter_critical(FAR struct gran_s *priv); +void gran_leave_critical(FAR struct gran_s *priv); #endif /* __MM_MM_GRAN_H */ diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c index 62fbc0870a..e8022bf721 100644 --- a/nuttx/mm/mm_granalloc.c +++ b/nuttx/mm/mm_granalloc.c @@ -127,12 +127,12 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) { unsigned int ngranules; size_t tmpmask; - uintptr_t alloc; - uint32_t curr; - uint32_t next; - uint32_t mask; - int i; - int j; + uintptr_t alloc; + uint32_t curr; + uint32_t next; + uint32_t mask; + int i; + int j; DEBUGASSERT(priv && size <= 32 * (1 << priv->log2gran)); @@ -140,7 +140,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) { /* Get exclusive access to the GAT */ - gran_semtake(priv); + gran_enter_critical(priv); /* How many contiguous granules we we need to find? */ @@ -199,7 +199,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) /* And return the allocation address */ - gran_semgive(priv); + gran_leave_critical(priv); return (FAR void *)alloc; } @@ -221,7 +221,7 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) } } - gran_semgive(priv); + gran_leave_critical(priv); return NULL; } diff --git a/nuttx/mm/mm_granfree.c b/nuttx/mm/mm_granfree.c index 96fdda87e0..aa14207f36 100644 --- a/nuttx/mm/mm_granfree.c +++ b/nuttx/mm/mm_granfree.c @@ -75,13 +75,13 @@ static inline void gran_common_free(FAR struct gran_s *priv, unsigned int granmask; unsigned int ngranules; unsigned int avail; - uint32_t gatmask; + uint32_t gatmask; DEBUGASSERT(priv && memory && size <= 32 * (1 << priv->log2gran)); /* Get exclusive access to the GAT */ - gran_semtake(priv); + gran_enter_critical(priv); /* Determine the granule number of the first granule in the allocation */ @@ -121,7 +121,7 @@ static inline void gran_common_free(FAR struct gran_s *priv, priv->gat[gatidx] &= ~(gatmask << gatbit); } - gran_semgive(priv); + gran_leave_critical(priv); } /**************************************************************************** diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index d3144b2aa6..cde2370d0b 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -119,7 +119,12 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, priv->log2gran = log2gran; priv->ngranules = ngranules; priv->heapstart = alignedstart; + + /* Initialize mutual exclusion support */ + +#ifndef CONFIG_GRAN_INTR sem_init(&priv->exclsem, 0, 1); +#endif } return priv; @@ -172,38 +177,4 @@ GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gr } #endif -/**************************************************************************** - * Name: gran_semtake and gran_semgive - * - * Description: - * Managed semaphore for the granule allocator. gran_semgive is - * implemented as a macro. - * - * Input Parameters: - * priv - Pointer to the gran state - * - * Returned Value: - * None - * - ****************************************************************************/ - -void gran_semtake(FAR struct gran_s *priv) -{ - int ret; - - /* Continue waiting if we are awakened by a signal */ - - do - { - ret = sem_wait(&priv->exclsem); - if (ret < 0) - { - DEBUGASSERT(errno == EINTR); - } - } - while (ret < 0); -} - #endif /* CONFIG_GRAN */ - - From 43069a49aac009d47ee2e86053fde7e877a48cad Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 15:21:26 +0000 Subject: [PATCH 56/95] New file missed in last check-in git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5135 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/mm/mm_grancritical.c | 116 +++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 nuttx/mm/mm_grancritical.c diff --git a/nuttx/mm/mm_grancritical.c b/nuttx/mm/mm_grancritical.c new file mode 100644 index 0000000000..190aa3e7d4 --- /dev/null +++ b/nuttx/mm/mm_grancritical.c @@ -0,0 +1,116 @@ +/**************************************************************************** + * mm/mm_grancritical.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "mm_gran.h" + +#ifdef CONFIG_GRAN + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gran_enter_critical and gran_leave_critical + * + * Description: + * Critical section management for the granule allocator. + * + * Input Parameters: + * priv - Pointer to the gran state + * + * Returned Value: + * None + * + ****************************************************************************/ + +void gran_enter_critical(FAR struct gran_s *priv) +{ +#ifdef CONFIG_GRAN_INTR + priv->irqstate = irqsave(); +#else + int ret; + + /* Continue waiting if we are awakened by a signal */ + + do + { + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + DEBUGASSERT(errno == EINTR); + } + } + while (ret < 0); +#endif +} + +void gran_leave_critical(FAR struct gran_s *priv) +{ +#ifdef CONFIG_GRAN_INTR + irqrestore(priv->irqstate); +#else + sem_post(&priv->exclsem); +#endif +} + + +#endif /* CONFIG_GRAN */ + + From dad6eee444e6b0deaf0ca53ef582ae614f8b433a Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 17:55:03 +0000 Subject: [PATCH 57/95] Misc fixes and optimizations for the granule allocator git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5136 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/mm/mm_granalloc.c | 164 +++++++++++++++++++++++++++++++--------- nuttx/mm/mm_granfree.c | 22 ++++-- 2 files changed, 146 insertions(+), 40 deletions(-) diff --git a/nuttx/mm/mm_granalloc.c b/nuttx/mm/mm_granalloc.c index e8022bf721..e95709b31a 100644 --- a/nuttx/mm/mm_granalloc.c +++ b/nuttx/mm/mm_granalloc.c @@ -67,13 +67,15 @@ * ****************************************************************************/ -static inline void gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, unsigned int ngranules) +static inline void gran_mark_allocated(FAR struct gran_s *priv, + uintptr_t alloc, + unsigned int ngranules) { unsigned int granno; unsigned int gatidx; unsigned int gatbit; unsigned int avail; - uint32_t mask; + uint32_t gatmask; /* Determine the granule number of the allocation */ @@ -84,28 +86,41 @@ static inline void gran_mark_allocated(FAR struct gran_s *priv, uintptr_t alloc, gatidx = granno >> 5; gatbit = granno & 31; - /* Mark bits in the first GAT entry */ + /* Mark bits in the GAT entry or entries */ avail = 32 - gatbit; if (ngranules > avail) { - priv->gat[gatidx] |= (0xffffffff << gatbit); + /* Mark bits in the first GAT entry */ + + gatmask =0xffffffff << gatbit; + DEBUGASSERT((priv->gat[gatidx] & gatmask) == 0); + + priv->gat[gatidx] |= gatmask; ngranules -= avail; + + /* Mark bits in the second GAT entry */ + + gatmask = 0xffffffff >> (32 - ngranules); + DEBUGASSERT((priv->gat[gatidx+1] & gatmask) == 0); + + priv->gat[gatidx+1] |= gatmask; } /* Handle the case where where all of the granules come from one entry */ else { - mask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx] |= (mask << gatbit); + /* Mark bits in a single GAT entry */ + + gatmask = 0xffffffff >> (32 - ngranules); + gatmask <<= gatbit; + DEBUGASSERT((priv->gat[gatidx] & gatmask) == 0); + + priv->gat[gatidx] |= gatmask; return; } - /* Mark bits in the second GAT entry */ - - mask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx+1] |= (mask << gatbit); } /**************************************************************************** @@ -131,8 +146,10 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) uint32_t curr; uint32_t next; uint32_t mask; - int i; - int j; + int granidx; + int gatidx; + int bitidx; + int shift; DEBUGASSERT(priv && size <= 32 * (1 << priv->log2gran)); @@ -156,12 +173,12 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) alloc = priv->heapstart; - for (i = 0; i < priv->ngranules; i += 32) + for (granidx = 0; granidx < priv->ngranules; granidx += 32) { - /* Get the GAT index associated with the granule table entry [i] */ + /* Get the GAT index associated with the granule table entry */ - j = i >> 5; - curr = priv->gat[j]; + gatidx = granidx >> 5; + curr = priv->gat[gatidx]; /* Handle the case where there are no free granules in the entry */ @@ -173,25 +190,100 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) /* Get the next entry from the GAT to support a 64 bit shift */ - if (i < priv->ngranules) + if (granidx < priv->ngranules) { - next = priv->gat[j + 1]; + next = priv->gat[gatidx + 1]; } - /* Use all zeroes when are at the last entry in the GAT */ + /* Use all ones when are at the last entry in the GAT (meaning + * nothing can be allocated. + */ else { - next = 0; + next = 0xffffffff; } - for (j = 0; j < 32; j++) + /* Search through the allocations in the 'curr' GAT entry + * to see if we can satisfy the allocation starting in that + * entry. + * + * This loop continues until either all of the bits have been + * examined (bitidx >= 32), or until there are insufficient + * granules left to satisfy the allocation. + */ + + for (bitidx = 0; + bitidx < 32 && (granidx + bitidx + ngranules) <= priv->ngranules; + ) { - /* Check if we have the allocation at this bit position (0 - * means unallocated). + /* Break out if there are no further free bits in 'curr'. + * All of the zero bits might have gotten shifted out. */ - if ((curr & mask) == 0) + if (curr == 0xffffffff) + { + break; + } + + /* Check for the first zero bit in the lower or upper 16-bits. + * From the test above, we know that at least one of the 32- + * bits in 'curr' is zero. + */ + + else if ((curr & 0x0000ffff) == 0x0000ffff) + { + /* Not in the lower 16 bits. The first free bit must be + * in the upper 16 bits. + */ + + shift = 16; + } + + /* We know that the first free bit is now within the lower 16 + * bits of 'curr'. Is it in the upper or lower byte? + */ + + else if ((curr & 0x0000ff) == 0x000000ff) + { + /* Not in the lower 8 bits. The first free bit must be in + * the upper 8 bits. + */ + + shift = 8; + } + + /* We know that the first free bit is now within the lower 4 + * bits of 'curr'. Is it in the upper or lower nibble? + */ + + else if ((curr & 0x00000f) == 0x0000000f) + { + /* Not in the lower 4 bits. The first free bit must be in + * the upper 4 bits. + */ + + shift = 4; + } + + /* We know that the first free bit is now within the lower 4 bits + * of 'curr'. Is it in the upper or lower pair? + */ + + else if ((curr & 0x000003) == 0x00000003) + { + /* Not in the lower 2 bits. The first free bit must be in + * the upper 2 bits. + */ + + shift = 2; + } + + /* We know that the first free bit is now within the lower 4 bits + * of 'curr'. Check if we have the allocation at this bit position. + */ + + else if ((curr & mask) == 0) { /* Yes.. mark these granules allocated */ @@ -203,20 +295,22 @@ static inline FAR void *gran_common_alloc(FAR struct gran_s *priv, size_t size) return (FAR void *)alloc; } + /* The free allocation does not start at this position */ + + else + { + shift = 1; + } + /* Set up for the next time through the loop. Perform a 64 - * bit shift to move to the next gram position. + * bit shift to move to the next gram position andi ncrement + * to the next candidate allocation address. */ - curr >>= 1; - if ((next & 1) != 0) - { - curr |= 0x80000000; - } - next >>= 1; - - /* Increment the next candidate allocation address */ - - alloc += (1 << priv->log2gran); + alloc += (shift << priv->log2gran); + curr = (curr >> shift) | (next << (32 - shift)); + next >>= shift; + bitidx += shift; } } } diff --git a/nuttx/mm/mm_granfree.c b/nuttx/mm/mm_granfree.c index aa14207f36..fcab11af98 100644 --- a/nuttx/mm/mm_granfree.c +++ b/nuttx/mm/mm_granfree.c @@ -99,26 +99,38 @@ static inline void gran_common_free(FAR struct gran_s *priv, granmask = (1 << priv->log2gran) - 1; ngranules = (size + granmask) >> priv->log2gran; - /* Clear bits in the first GAT entry */ + /* Clear bits in the GAT entry or entries */ avail = 32 - gatbit; if (ngranules > avail) { - priv->gat[gatidx] &= ~(0xffffffff << gatbit); + /* Clear bits in the first GAT entry */ + + gatmask = (0xffffffff << gatbit); + DEBUGASSERT((priv->gat[gatidx] & gatmask) == gatmask); + + priv->gat[gatidx] &= ~gatmask; ngranules -= avail; /* Clear bits in the second GAT entry */ gatmask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx+1] &= ~(gatmask << gatbit); + DEBUGASSERT((priv->gat[gatidx+1] & gatmask) == gatmask); + + priv->gat[gatidx+1] &= ~gatmask; } /* Handle the case where where all of the granules came from one entry */ else { - gatmask = 0xffffffff >> (32 - ngranules); - priv->gat[gatidx] &= ~(gatmask << gatbit); + /* Clear bits in a single GAT entry */ + + gatmask = 0xffffffff >> (32 - ngranules); + gatmask <<= gatbit; + DEBUGASSERT((priv->gat[gatidx] & gatmask) == gatmask); + + priv->gat[gatidx] &= ~gatmask; } gran_leave_critical(priv); From 4e8030a11a0e0b2d38ff07076461ce4bbfd9d7c4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 18:42:07 +0000 Subject: [PATCH 58/95] Network discover utility from Max Holtzberg git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5137 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 4 + apps/examples/README.txt | 22 ++ apps/examples/discover/Kconfig | 42 +++ apps/examples/discover/Makefile | 106 +++++++ apps/examples/discover/main.c | 183 ++++++++++++ apps/include/netutils/discover.h | 58 ++++ apps/netutils/Kconfig | 4 + apps/netutils/Make.defs | 6 +- apps/netutils/Makefile | 3 +- apps/netutils/README.txt | 10 +- apps/netutils/discover/Kconfig | 39 +++ apps/netutils/discover/Makefile | 100 +++++++ apps/netutils/discover/README.txt | 9 + apps/netutils/discover/discover.c | 456 ++++++++++++++++++++++++++++++ nuttx/Documentation/README.html | 1 + nuttx/README.txt | 2 + 16 files changed, 1041 insertions(+), 4 deletions(-) create mode 100644 apps/examples/discover/Kconfig create mode 100644 apps/examples/discover/Makefile create mode 100644 apps/examples/discover/main.c create mode 100644 apps/include/netutils/discover.h create mode 100644 apps/netutils/discover/Kconfig create mode 100644 apps/netutils/discover/Makefile create mode 100644 apps/netutils/discover/README.txt create mode 100644 apps/netutils/discover/discover.c diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 833a62cd11..6df66b95fc 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -319,3 +319,7 @@ * apps/netutils/webserver/httpd_sendfile.c: Add and option, CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX sendfile() interface. + * apps/netutils/discover: A UDP network discovery utility contributed + by Max Holtzberg. + * apps/examples/discover: A test example for the UDP network discovery + utility (also contribed by Max Holtzberg). diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 52d7279dac..0d327ebfbf 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -275,6 +275,28 @@ examples/dhcpd CONFIGURED_APPS += uiplib +examples/discover +^^^^^^^^^^^^^^^^^ + + This example execises netutils/discover utility. This example initializes + and starts the UDP discover daemon. This daemon is useful for discovering + devices in local networks, especially with DHCP configured devices. It + listens for UDP broadcasts which also can include a device class so that + groups of devices can be discovered. It is also possible to address all + classes with a kind of broadcast discover. + + This example will automatically be built as an NSH built-in if + CONFIG_NSH_BUILTIN_APPS is selected. Otherwise, it will be a standalone + program with entry point "discover_main". + + NuttX configuration settings: + + CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client + CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address + CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address + CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address + CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask + examples/ftpc ^^^^^^^^^^^^^ diff --git a/apps/examples/discover/Kconfig b/apps/examples/discover/Kconfig new file mode 100644 index 0000000000..afdb9ff820 --- /dev/null +++ b/apps/examples/discover/Kconfig @@ -0,0 +1,42 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config EXAMPLES_DISCOVER + bool "UDP Discovery Example" + default n + depends on NET_UDP + select NETUTILS_DISCOVER + ---help--- + Enable the netutils/discover utility. This example initializes and + starts the UDP discover daemon. This daemon is useful for + discovering devices in local networks, especially with DHCP + configured devices. It listens for UDP broadcasts which also can + include a device class so that groups of devices can be discovered. + It is also possible to address all classes with a kind of broadcast + discover. + +if EXAMPLES_DISCOVER + +config EXAMPLE_DISCOVER_DHCPC + bool "DHCP Client" + default n + +config EXAMPLE_DISCOVER_NOMAC + bool "Use canned MAC address" + default n + +config EXAMPLE_DISCOVER_IPADDR + hex "Target IP address" + default 0x0a000002 + +config EXAMPLE_DISCOVER_DRIPADDR + hex "Router IP address" + default 0x0a000001 + +config EXAMPLE_DISCOVER_NETMASK + hex "Network Mask" + default 0xffffff00 + +endif diff --git a/apps/examples/discover/Makefile b/apps/examples/discover/Makefile new file mode 100644 index 0000000000..f42f310a11 --- /dev/null +++ b/apps/examples/discover/Makefile @@ -0,0 +1,106 @@ +############################################################################ +# apps/examples/discover/Makefile +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. +# +# Authors: Max Holtzberg +# Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# Discover built-in application info + +APPNAME = discover +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 + +ASRCS = +CSRCS = main.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(WINTOOL),y) + BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}" +else + BIN = "$(APPDIR)/libapps$(LIBEXT)" +endif + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: clean depend distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $(BIN), $${obj}); \ + done ; ) + @touch .built + +.context: +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + @touch $@ +endif + +context: .context + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f *.o *~ .*.swp .built + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/apps/examples/discover/main.c b/apps/examples/discover/main.c new file mode 100644 index 0000000000..b857e4f68f --- /dev/null +++ b/apps/examples/discover/main.c @@ -0,0 +1,183 @@ +/**************************************************************************** + * examples/discover/main.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. + * + * Authors: Max Holtzberg + * Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC +# include +#endif + +/* Here we include the header file for the application(s) we use in + * our project as defined in the config//defconfig file + */ + +/* DHCPC may be used in conjunction with any other feature (or not) */ + +#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC +# include +# include +#endif + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * discover_main + ****************************************************************************/ + +int discover_main(int argc, char *argv[]) +{ +#ifndef CONFIG_NSH_BUILTIN_APPS + struct in_addr addr; +#if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC) + uint8_t mac[IFHWADDRLEN]; +#endif +#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC + void *handle; +#endif + +/* Many embedded network interfaces must have a software assigned MAC */ + +#ifdef CONFIG_EXAMPLE_DISCOVER_NOMAC + mac[0] = 0x00; + mac[1] = 0xe0; + mac[2] = 0xde; + mac[3] = 0xad; + mac[4] = 0xbe; + mac[5] = 0xef; + uip_setmacaddr("eth0", mac); +#endif + + /* Set up our host address */ + +#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC + addr.s_addr = 0; +#else + addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_IPADDR); +#endif + uip_sethostaddr("eth0", &addr); + + /* Set up the default router address */ + + addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_DRIPADDR); + uip_setdraddr("eth0", &addr); + + /* Setup the subnet mask */ + + addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_NETMASK); + uip_setnetmask("eth0", &addr); + +#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC + /* Set up the resolver */ + + resolv_init(); + + /* Get the MAC address of the NIC */ + + uip_getmacaddr("eth0", mac); + + /* Set up the DHCPC modules */ + + handle = dhcpc_open(&mac, IFHWADDRLEN); + + /* Get an IP address. Note: there is no logic here for renewing the address in this + * example. The address should be renewed in ds.lease_time/2 seconds. + */ + + printf("Getting IP address\n"); + if (handle) + { + struct dhcpc_state ds; + (void)dhcpc_request(handle, &ds); + uip_sethostaddr("eth1", &ds.ipaddr); + + if (ds.netmask.s_addr != 0) + { + uip_setnetmask("eth0", &ds.netmask); + } + + if (ds.default_router.s_addr != 0) + { + uip_setdraddr("eth0", &ds.default_router); + } + + if (ds.dnsaddr.s_addr != 0) + { + resolv_conf(&ds.dnsaddr); + } + + dhcpc_close(handle); + printf("IP: %s\n", inet_ntoa(ds.ipaddr)); + } +#endif +#endif /* CONFIG_NSH_BUILTIN_APPS */ + + if (discover_start() < 0) + { + ndbg("Could not start discover daemon.\n"); + return ERROR; + } + + return OK; +} + diff --git a/apps/include/netutils/discover.h b/apps/include/netutils/discover.h new file mode 100644 index 0000000000..c2226918d3 --- /dev/null +++ b/apps/include/netutils/discover.h @@ -0,0 +1,58 @@ +/**************************************************************************** + * apps/include/netutils/discover.h + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __APPS_INCLUDE_NETUTILS_DISCOVER_H +#define __APPS_INCLUDE_NETUTILS_DISCOVER_H + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: discover_start + * + * Description: + * Start the discover daemon. + * + * Return: + * The process ID (pid) of the new discover daemon is returned on + * success; A negated errno is returned if the daemon was not successfully + * started. + * + ****************************************************************************/ + +int discover_start(void); + +#endif /* __APPS_INCLUDE_NETUTILS_DISCOVER_H */ diff --git a/apps/netutils/Kconfig b/apps/netutils/Kconfig index cd0cb84ddb..aa0f14963b 100644 --- a/apps/netutils/Kconfig +++ b/apps/netutils/Kconfig @@ -52,3 +52,7 @@ endmenu menu "uIP web server" source "$APPSDIR/netutils/webserver/Kconfig" endmenu + +menu "UDP Discovery Utility" +source "$APPSDIR/netutils/discover/Kconfig" +endmenu diff --git a/apps/netutils/Make.defs b/apps/netutils/Make.defs index 04accf5d2e..f957009b50 100644 --- a/apps/netutils/Make.defs +++ b/apps/netutils/Make.defs @@ -78,6 +78,10 @@ ifeq ($(CONFIG_NETUTILS_WEBCLIENT),y) CONFIGURED_APPS += netutils/webclient endif -ifeq ($(CONFIGNETUTILS_WEBSERVER),y) +ifeq ($(CONFIG_NETUTILS_WEBSERVER),y) CONFIGURED_APPS += netutils/webserver endif + +ifeq ($(CONFIG_NETUTILS_DISCOVER),y) +CONFIGURED_APPS += netutils/discover +endif diff --git a/apps/netutils/Makefile b/apps/netutils/Makefile index 1313c223da..03261c7a34 100644 --- a/apps/netutils/Makefile +++ b/apps/netutils/Makefile @@ -38,7 +38,8 @@ # Sub-directories ifeq ($(CONFIG_NET),y) -SUBDIRS = uiplib dhcpc dhcpd ftpc ftpd resolv smtp telnetd webclient webserver tftpc thttpd +SUBDIRS = uiplib dhcpc dhcpd discover ftpc ftpd resolv smtp telnetd +SUBDIRS += webclient webserver tftpc thttpd endif all: nothing diff --git a/apps/netutils/README.txt b/apps/netutils/README.txt index 26f11b7ceb..231cf62c18 100644 --- a/apps/netutils/README.txt +++ b/apps/netutils/README.txt @@ -1,5 +1,5 @@ -netutils -^^^^^^^^ +netutils README.txt +^^^^^^^^^^^^^^^^^^^ Contents -------- @@ -39,6 +39,12 @@ highly influenced by uIP) include: dhcpd - Dynamic Host Configuration Protocol (DHCP) server. See apps/include/netutils/dhcpd.h for interface information. + discover - This daemon is useful for discovering devices in local + networks, especially with DHCP configured devices. It + listens for UDP broadcasts which also can include a + device class so that groups of devices can be discovered. + It is also possible to address all classes with a kind of + broadcast discover. (Contributed by Max Holtzberg). tftpc - TFTP client. See apps/include/netutils/tftp.h for interface information. telnetd - TELNET server. This is the Telnet logic adapted from diff --git a/apps/netutils/discover/Kconfig b/apps/netutils/discover/Kconfig new file mode 100644 index 0000000000..3365505117 --- /dev/null +++ b/apps/netutils/discover/Kconfig @@ -0,0 +1,39 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config NETUTILS_DISCOVER + bool "Network Discovery Utility" + default n + depends on NET_UDP + ---help--- + Tool for discovering devices on the local network per UDP broadcast. + +if NETUTILS_DISCOVER + +DISCOVER_STACK_SIZE + int "Discover Daemon Stack Size" + default 1024 + +DISCOVER_PRIORITY + int "Discover Daemon Priority" + default 50 + +DISCOVER_PORT + int "Discover Daemon Port Number" + default 96 + +DISCOVER_INTERFACE + int "Network Interface Name" + default "eth0" + +DISCOVER_DEVICE_CLASS + hex "Network Discovery Class" + default 0xff + +CONFIG_DISCOVER_DESCR + string "Discoverer Description" + default "NuttX" + +endif diff --git a/apps/netutils/discover/Makefile b/apps/netutils/discover/Makefile new file mode 100644 index 0000000000..52099b439a --- /dev/null +++ b/apps/netutils/discover/Makefile @@ -0,0 +1,100 @@ +############################################################################ +# apps/netutils/discover/Makefile +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# +# Authors: Max Holtzberg +# Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# Telnet daemon + +ASRCS = +CSRCS = + +ifeq ($(CONFIG_NET_UDP),y) +CSRCS += discover.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(WINTOOL),y) + BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}" +else + BIN = "$(APPDIR)/libapps$(LIBEXT)" +endif + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: context depend clean distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $(BIN), $${obj}); \ + done ; ) + @touch .built + +context: + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f *.o *~ .*.swp .built + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/apps/netutils/discover/README.txt b/apps/netutils/discover/README.txt new file mode 100644 index 0000000000..11aab8bf31 --- /dev/null +++ b/apps/netutils/discover/README.txt @@ -0,0 +1,9 @@ +apps/netutils/discover README.txt +================================= + +This daemon is useful for discovering devices in local networks, especially +with DHCP configured devices. It listens for UDP broadcasts which also can +include a device class so that groups of devices can be discovered. It is +also possible to address all classes with a kind of broadcast discover. + +See nuttx/tools/discover.py for a client example. diff --git a/apps/netutils/discover/discover.c b/apps/netutils/discover/discover.c new file mode 100644 index 0000000000..67df02b3f7 --- /dev/null +++ b/apps/netutils/discover/discover.c @@ -0,0 +1,456 @@ +/**************************************************************************** + * examples/discover/main.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. + * + * Authors: Max Holtzberg + * Gregory Nutt + * + * This code is derived from the netutils/dhcpd code. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_DISCOVER_STACK_SIZE +# define CONFIG_DISCOVER_STACK_SIZE 1024 +#endif + +#ifndef CONFIG_DISCOVER_PRIORITY +# define CONFIG_DISCOVER_PRIORITY SCHED_PRIORITY_DEFAULT +#endif + +#ifndef CONFIG_DISCOVER_PORT +# define CONFIG_DISCOVER_PORT 96 +#endif + +#ifndef CONFIG_DISCOVER_INTERFACE +# define CONFIG_DISCOVER_INTERFACE "eth0" +#endif + +#ifndef CONFIG_DISCOVER_DEVICE_CLASS +# define CONFIG_DISCOVER_DEVICE_CLASS DISCOVER_ALL +#endif + +#ifndef CONFIG_DISCOVER_DESCR +# define CONFIG_DISCOVER_DESCR CONFIG_ARCH_BOARD +#endif + +/* Internal Definitions *****************************************************/ +/* Discover request packet format: + * Byte Description + * 0 Protocol indentifier (0x99) + * 1 Request command 0x01 + * 2 Destination device class (For querying subsets of available devices) + * 0xff for all devices + * 3 Checksum (Byte 0 - Byte 1 - Byte n) & 0xff + */ + +/* Discover response packet format: + * Byte Description + * 0 Protocol indentifier (0x99) + * 1 Reponse command (0x02) + * 2-33 Device description string with 0 bytes filled + * 34 Checksum (Byte 0 - Byte 1 - Byte n) & 0xff + */ + +#define DISCOVER_PROTO_ID 0x99 +#define DISCOVER_REQUEST 0x01 +#define DISCOVER_RESPONSE 0x02 +#define DISCOVER_ALL 0xff +#define DISCOVER_REQUEST_SIZE 4 +#define DISCOVER_RESPONSE_SIZE 35 + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +typedef uint8_t request_t[DISCOVER_REQUEST_SIZE]; +typedef uint8_t response_t[DISCOVER_RESPONSE_SIZE]; + +struct discover_state_s +{ + in_addr_t serverip; + request_t request; + response_t response; +}; + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +struct discover_state_s g_state; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int discover_daemon(int argc, char *argv[]); +static inline int discover_socket(void); +static inline int discover_openlistener(void); +static inline int discover_openresponder(void); +static inline int discover_parse(request_t packet); +static inline int discover_respond(in_addr_t *ipaddr); +static inline void discover_initresponse(void); + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static inline void discover_initresponse() +{ + int chk = 0; + int i; + + g_state.response[0] = DISCOVER_PROTO_ID; + g_state.response[1] = DISCOVER_RESPONSE; + + strncpy((char*) &g_state.response[2], CONFIG_DISCOVER_DESCR, + DISCOVER_RESPONSE_SIZE-3); + + for (i = 0; i < DISCOVER_RESPONSE_SIZE-1; i++) + { + chk -= g_state.response[i]; + } + + /* Append check sum */ + + g_state.response[DISCOVER_RESPONSE_SIZE-1] = chk & 0xff; +} + +static int discover_daemon(int argc, char *argv[]) +{ + int sockfd = -1; + int nbytes; + int addrlen = sizeof(struct sockaddr_in); + struct sockaddr_in srcaddr; + + memset(&g_state, 0, sizeof(struct discover_state_s)); + discover_initresponse(); + + nvdbg("Started\n"); + + for (;;) + { + /* Create a socket to listen for requests from DHCP clients */ + + if (sockfd < 0) + { + sockfd = discover_openlistener(); + if (sockfd < 0) + { + ndbg("Failed to create socket\n"); + break; + } + } + + /* Read the next packet */ + + nbytes = recvfrom(sockfd, &g_state.request, sizeof(g_state.request), 0, + (struct sockaddr*) &srcaddr, + (socklen_t *) &addrlen); + if (nbytes < 0) + { + /* On errors (other EINTR), close the socket and try again */ + + ndbg("recv failed: %d\n", errno); + if (errno != EINTR) + { + close(sockfd); + sockfd = -1; + } + continue; + } + + if (discover_parse(g_state.request) != OK) + { + continue; + } + + ndbg("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr); + + discover_respond(&srcaddr.sin_addr.s_addr); + } + + return OK; +} + +static inline int discover_parse(request_t packet) +{ + int i; + uint8_t chk = 0; + + if (packet[0] != DISCOVER_PROTO_ID) + { + ndbg("Wrong protocol id: %d\n", packet[0]); + return ERROR; + } + + if (packet[1] != DISCOVER_REQUEST) + { + ndbg("Wrong command: %d\n", packet[1]); + return ERROR; + } + + if (packet[2] == 0xff || packet[2] == CONFIG_DISCOVER_DEVICE_CLASS) + { + for (i = 0; i < DISCOVER_REQUEST_SIZE-1; i++) + chk -= packet[i]; + + if ((chk & 0xff) != packet[3]) + { + ndbg("Checksum does not match: %d\n", packet[3]); + return ERROR; + } + else + { + return OK; + } + } + return ERROR; +} + +static inline int discover_respond(in_addr_t *ipaddr) +{ + struct sockaddr_in addr; + int sockfd; + int ret; + + sockfd = discover_openresponder(); + if (sockfd >= 0) + { + /* Then send the reponse to the DHCP client port at that address */ + + memset(&addr, 0, sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + addr.sin_port = HTONS(CONFIG_DISCOVER_PORT); + addr.sin_addr.s_addr = *ipaddr; + + ret = sendto(sockfd, &g_state.response, sizeof(g_state.response), 0, + (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); + if (ret < 0) + { + ndbg("Could not send discovery response: %d\n", errno); + } + + close(sockfd); + } + + return ret; +} + +static inline int discover_socket() +{ + int sockfd; +#if defined(HAVE_SO_REUSEADDR) || defined(HAVE_SO_BROADCAST) + int optval; + int ret; +#endif + + /* Create a socket to listen for requests from DHCP clients */ + + sockfd = socket(PF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) + { + ndbg("socket failed: %d\n", errno); + return ERROR; + } + + /* Configure the socket */ + +#ifdef HAVE_SO_REUSEADDR + optval = 1; + ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)); + if (ret < 0) + { + ndbg("setsockopt SO_REUSEADDR failed: %d\n", errno); + close(sockfd); + return ERROR; + } +#endif + +#ifdef HAVE_SO_BROADCAST + optval = 1; + ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int)); + if (ret < 0) + { + ndbg("setsockopt SO_BROADCAST failed: %d\n", errno); + close(sockfd); + return ERROR; + } +#endif + + return sockfd; +} + +static inline int discover_openlistener() +{ + struct sockaddr_in addr; + struct ifreq req; + int sockfd; + int ret; + + /* Create a socket to listen for requests from DHCP clients */ + + sockfd = discover_socket(); + if (sockfd < 0) + { + ndbg("socket failed: %d\n", errno); + return ERROR; + } + + /* Get the IP address of the selected device */ + + strncpy(req.ifr_name, CONFIG_DISCOVER_INTERFACE, IFNAMSIZ); + ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req); + if (ret < 0) + { + ndbg("setsockopt SIOCGIFADDR failed: %d\n", errno); + close(sockfd); + return ERROR; + } + g_state.serverip = ((struct sockaddr_in*)&req.ifr_addr)->sin_addr.s_addr; + nvdbg("serverip: %08lx\n", ntohl(g_state.serverip)); + + /* Bind the socket to a local port. We have to bind to INADDRY_ANY to + * receive broadcast messages. + */ + + addr.sin_family = AF_INET; + addr.sin_port = htons(CONFIG_DISCOVER_PORT); + addr.sin_addr.s_addr = INADDR_ANY; + + ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); + if (ret < 0) + { + ndbg("bind failed, port=%d addr=%08lx: %d\n", + addr.sin_port, (long)addr.sin_addr.s_addr, errno); + close(sockfd); + return ERROR; + } + + return sockfd; +} + +static inline int discover_openresponder(void) +{ + struct sockaddr_in addr; + int sockfd; + int ret; + + /* Create a socket for responding to discovery message */ + + sockfd = discover_socket(); + if (sockfd < 0) + { + ndbg("socket failed: %d\n", errno); + return ERROR; + } + + /* Bind the socket to a local port.*/ + + addr.sin_family = AF_INET; + addr.sin_port = 0; + addr.sin_addr.s_addr = g_state.serverip; + + ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); + if (ret < 0) + { + ndbg("bind failed, port=%d addr=%08lx: %d\n", + addr.sin_port, (long)addr.sin_addr.s_addr, errno); + close(sockfd); + return ERROR; + } + + return sockfd; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: discover_start + * + * Description: + * Start the discover daemon. + * + * Return: + * The process ID (pid) of the new discover daemon is returned on + * success; A negated errno is returned if the daemon was not successfully + * started. + * + ****************************************************************************/ + +int discover_start() +{ + pid_t pid; + + /* Then start the new daemon */ + + pid = TASK_CREATE("Discover daemon", CONFIG_DISCOVER_PRIORITY, + CONFIG_DISCOVER_STACK_SIZE, discover_daemon, NULL); + if (pid < 0) + { + int errval = errno; + ndbg("Failed to start the discover daemon: %d\n", errval); + return -errval; + } + + /* Return success */ + + return pid; +} diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index 135c4f359d..5bc3d1d96a 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -254,6 +254,7 @@ |- modbus/ | `- README.txt |- netutils/ + | | |- discover/README.txt | | |- ftpc/README.txt | | |- telnetd/README.txt | `- README diff --git a/nuttx/README.txt b/nuttx/README.txt index b0aa5384c3..ae33a6e9c3 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -824,6 +824,8 @@ apps |- modbus/ | `- README.txt |- netutils/ + | |- discover + | | `- README.txt | |- ftpc | | `- README.txt | |- telnetd From 093ccf2015c89e3695f6e258ea2c61e63ea05e84 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 20:14:46 +0000 Subject: [PATCH 59/95] Add UDP discovery configuration for the STM3240G-EVAL (from Max Holtzberg) git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5138 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/Kconfig | 100 +- apps/examples/Make.defs | 4 + apps/examples/Makefile | 14 +- apps/examples/README.txt | 2 +- apps/examples/discover/Kconfig | 7 +- apps/examples/discover/main.c | 36 +- apps/netutils/discover/Kconfig | 15 +- nuttx/ChangeLog | 2 + nuttx/configs/stm3240g-eval/README.txt | 22 + .../configs/stm3240g-eval/discover/Make.defs | 198 ++++ .../configs/stm3240g-eval/discover/defconfig | 866 ++++++++++++++++++ .../configs/stm3240g-eval/discover/setenv.sh | 75 ++ nuttx/tools/README.txt | 6 + nuttx/tools/discover.py | 98 ++ 14 files changed, 1362 insertions(+), 83 deletions(-) create mode 100644 nuttx/configs/stm3240g-eval/discover/Make.defs create mode 100644 nuttx/configs/stm3240g-eval/discover/defconfig create mode 100755 nuttx/configs/stm3240g-eval/discover/setenv.sh create mode 100755 nuttx/tools/discover.py diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index a20f7c2e77..7860125934 100644 --- a/apps/examples/Kconfig +++ b/apps/examples/Kconfig @@ -3,115 +3,115 @@ # see misc/tools/kconfig-language.txt. # -menu "ADC example" +menu "ADC Example" source "$APPSDIR/examples/adc/Kconfig" endmenu -menu "Buttons example" +menu "Buttons Example" source "$APPSDIR/examples/buttons/Kconfig" endmenu -menu "CAN example" +menu "CAN Example" source "$APPSDIR/examples/can/Kconfig" endmenu -menu "USB CDC/ACM class driver example" +menu "USB CDC/ACM Class Driver Example" source "$APPSDIR/examples/cdcacm/Kconfig" endmenu -menu "USB composite class driver example" +menu "USB composite Class Driver Example" source "$APPSDIR/examples/composite/Kconfig" endmenu -menu "DHCP server example" +menu "DHCP Server Example" source "$APPSDIR/examples/dhcpd/Kconfig" endmenu -menu "FTP client example" +menu "FTP Client Example" source "$APPSDIR/examples/ftpc/Kconfig" endmenu -menu "FTP server example" +menu "FTP Server Example" source "$APPSDIR/examples/ftpd/Kconfig" endmenu -menu "\"Hello, World!\" example" +menu "\"Hello, World!\" Example" source "$APPSDIR/examples/hello/Kconfig" endmenu -menu "\"Hello, World!\" C++ example" +menu "\"Hello, World!\" C++ Example" source "$APPSDIR/examples/helloxx/Kconfig" endmenu -menu "USB HID keyboard example" +menu "USB HID Keyboard Example" source "$APPSDIR/examples/hidkbd/Kconfig" endmenu -menu "IGMP example" +menu "IGMP Example" source "$APPSDIR/examples/igmp/Kconfig" endmenu -menu "LCD read/write example" +menu "LCD Read/Write Example" source "$APPSDIR/examples/lcdrw/Kconfig" endmenu -menu "Memory management example" +menu "Memory Management Example" source "$APPSDIR/examples/mm/Kconfig" endmenu -menu "File system mount example" +menu "File System Mount Example" source "$APPSDIR/examples/mount/Kconfig" endmenu -menu "FreeModBus example" +menu "FreeModBus Example" source "$APPSDIR/examples/modbus/Kconfig" endmenu -menu "Network test example" +menu "Network Test Example" source "$APPSDIR/examples/nettest/Kconfig" endmenu -menu "NuttShell (NSH) example" +menu "NuttShell (NSH) Example" source "$APPSDIR/examples/nsh/Kconfig" endmenu -menu "NULL example" +menu "NULL Example" source "$APPSDIR/examples/null/Kconfig" endmenu -menu "NX graphics example" +menu "NX Graphics Example" source "$APPSDIR/examples/nx/Kconfig" endmenu -menu "NxConsole example" +menu "NxConsole Example" source "$APPSDIR/examples/nxconsole/Kconfig" endmenu -menu "NXFFS file system example" +menu "NXFFS File System Example" source "$APPSDIR/examples/nxffs/Kconfig" endmenu -menu "NXFLAT example" +menu "NXFLAT Example" source "$APPSDIR/examples/nxflat/Kconfig" endmenu -menu "NX graphics \"Hello, World!\" example" +menu "NX Graphics \"Hello, World!\" Example" source "$APPSDIR/examples/nxhello/Kconfig" endmenu -menu "NX graphics image example" +menu "NX Graphics image Example" source "$APPSDIR/examples/nximage/Kconfig" endmenu -menu "NX graphics lines example" +menu "NX Graphics lines Example" source "$APPSDIR/examples/nxlines/Kconfig" endmenu -menu "NX graphics text example" +menu "NX Graphics Text Example" source "$APPSDIR/examples/nxtext/Kconfig" endmenu -menu "OS test example" +menu "OS Test Example" source "$APPSDIR/examples/ostest/Kconfig" endmenu @@ -119,82 +119,86 @@ menu "Pascal \"Hello, World!\"example" source "$APPSDIR/examples/pashello/Kconfig" endmenu -menu "Pipe example" +menu "Pipe Example" source "$APPSDIR/examples/pipe/Kconfig" endmenu -menu "Poll example" +menu "Poll Example" source "$APPSDIR/examples/poll/Kconfig" endmenu -menu "Pulse width modulation (PWM) example" +menu "Pulse Width Modulation (PWM) Example" source "$APPSDIR/examples/pwm/Kconfig" endmenu -menu "Quadrature encoder example" +menu "Quadrature Encoder Example" source "$APPSDIR/examples/qencoder/Kconfig" endmenu -menu "RGMP example" +menu "RGMP Example" source "$APPSDIR/examples/rgmp/Kconfig" endmenu -menu "ROMFS example" +menu "ROMFS Example" source "$APPSDIR/examples/romfs/Kconfig" endmenu -menu "sendmail example" +menu "sendmail Example" source "$APPSDIR/examples/sendmail/Kconfig" endmenu -menu "Serial loopback example" +menu "Serial Loopback Example" source "$APPSDIR/examples/serloop/Kconfig" endmenu -menu "Telnet daemon example" +menu "Telnet Daemon Example" source "$APPSDIR/examples/telnetd/Kconfig" endmenu -menu "THTTPD web server example" +menu "THTTPD Web Server Example" source "$APPSDIR/examples/thttpd/Kconfig" endmenu -menu "TIFF generation example" +menu "TIFF Generation Example" source "$APPSDIR/examples/tiff/Kconfig" endmenu -menu "Touchscreen example" +menu "Touchscreen Example" source "$APPSDIR/examples/touchscreen/Kconfig" endmenu -menu "UDP example" +menu "UDP Example" source "$APPSDIR/examples/udp/Kconfig" endmenu -menu "uIP web server example" +menu "UDP Discovery Daemon Example" +source "$APPSDIR/examples/discover/Kconfig" +endmenu + +menu "uIP Web Server Example" source "$APPSDIR/examples/uip/Kconfig" endmenu -menu "USB serial test example" +menu "USB Serial Test Example" source "$APPSDIR/examples/usbserial/Kconfig" endmenu -menu "USB mass storage class example" +menu "USB Mass Storage Class Example" source "$APPSDIR/examples/usbstorage/Kconfig" endmenu -menu "USB serial terminal example" +menu "USB Serial Terminal Example" source "$APPSDIR/examples/usbterm/Kconfig" endmenu -menu "Watchdog timer example" +menu "Watchdog timer Example" source "$APPSDIR/examples/watchdog/Kconfig" endmenu -menu "wget example" +menu "wget Example" source "$APPSDIR/examples/wget/Kconfig" endmenu -menu "WLAN example" +menu "WLAN Example" source "$APPSDIR/examples/wlan/Kconfig" endmenu diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index aa8d83733b..3bc72b52e6 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -58,6 +58,10 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y) CONFIGURED_APPS += examples/dhcpd endif +ifeq ($(CONFIG_EXAMPLE_DISCOVER),y) +CONFIGURED_APPS += examples/discover +endif + ifeq ($(CONFIG_EXAMPLES_FTPC),y) CONFIGURED_APPS += examples/ftpc endif diff --git a/apps/examples/Makefile b/apps/examples/Makefile index ad5be64978..453f99ce71 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -37,11 +37,12 @@ # Sub-directories -SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \ - hidkbd igmp lcdrw mm modbus mount nettest nsh null nx nxconsole nxffs \ - nxflat nxhello nximage nxlines nxtext ostest pashello pipe poll pwm \ - qencoder rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip \ - usbserial sendmail usbstorage usbterm watchdog wget wlan +SUBDIRS = adc buttons can cdcacm composite dhcpd discover ftpc ftpd hello +SUBDIRS += helloxx hidkbd igmp lcdrw mm modbus mount nettest nsh null nx +SUBDIRS += nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest +SUBDIRS += pashello pipe poll pwm qencoder rgmp romfs serloop telnetd +SUBDIRS += thttpd tiff touchscreen udp uip usbserial sendmail usbstorage +SUBDIRS += usbterm watchdog wget wlan # Sub-directories that might need context setup. Directories may need # context setup for a variety of reasons, but the most common is because @@ -56,7 +57,8 @@ SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \ CNTXTDIRS = pwm ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -CNTXTDIRS += adc can cdcacm composite ftpd dhcpd modbus nettest qencoder telnetd watchdog +CNTXTDIRS += adc can cdcacm composite discover ftpd dhcpd modbus nettest +CNTXTDIRS += qencoder telnetd watchdog endif ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y) diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 0d327ebfbf..8a7a94c3e4 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -278,7 +278,7 @@ examples/dhcpd examples/discover ^^^^^^^^^^^^^^^^^ - This example execises netutils/discover utility. This example initializes + This example exercises netutils/discover utility. This example initializes and starts the UDP discover daemon. This daemon is useful for discovering devices in local networks, especially with DHCP configured devices. It listens for UDP broadcasts which also can include a device class so that diff --git a/apps/examples/discover/Kconfig b/apps/examples/discover/Kconfig index afdb9ff820..c867b56f39 100644 --- a/apps/examples/discover/Kconfig +++ b/apps/examples/discover/Kconfig @@ -3,7 +3,7 @@ # see misc/tools/kconfig-language.txt. # -config EXAMPLES_DISCOVER +config EXAMPLE_DISCOVER bool "UDP Discovery Example" default n depends on NET_UDP @@ -17,11 +17,13 @@ config EXAMPLES_DISCOVER It is also possible to address all classes with a kind of broadcast discover. -if EXAMPLES_DISCOVER +if EXAMPLE_DISCOVER config EXAMPLE_DISCOVER_DHCPC bool "DHCP Client" default n + select NETUTILS_DHCPC + select NETUTILS_RESOLV config EXAMPLE_DISCOVER_NOMAC bool "Use canned MAC address" @@ -30,6 +32,7 @@ config EXAMPLE_DISCOVER_NOMAC config EXAMPLE_DISCOVER_IPADDR hex "Target IP address" default 0x0a000002 + depends on !EXAMPLE_DISCOVER_DHCPC config EXAMPLE_DISCOVER_DRIPADDR hex "Router IP address" diff --git a/apps/examples/discover/main.c b/apps/examples/discover/main.c index b857e4f68f..6199951868 100644 --- a/apps/examples/discover/main.c +++ b/apps/examples/discover/main.c @@ -87,7 +87,6 @@ int discover_main(int argc, char *argv[]) { -#ifndef CONFIG_NSH_BUILTIN_APPS struct in_addr addr; #if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC) uint8_t mac[IFHWADDRLEN]; @@ -147,30 +146,29 @@ int discover_main(int argc, char *argv[]) printf("Getting IP address\n"); if (handle) { - struct dhcpc_state ds; - (void)dhcpc_request(handle, &ds); - uip_sethostaddr("eth1", &ds.ipaddr); + struct dhcpc_state ds; + (void)dhcpc_request(handle, &ds); + uip_sethostaddr("eth1", &ds.ipaddr); - if (ds.netmask.s_addr != 0) - { - uip_setnetmask("eth0", &ds.netmask); - } + if (ds.netmask.s_addr != 0) + { + uip_setnetmask("eth0", &ds.netmask); + } - if (ds.default_router.s_addr != 0) - { - uip_setdraddr("eth0", &ds.default_router); - } + if (ds.default_router.s_addr != 0) + { + uip_setdraddr("eth0", &ds.default_router); + } - if (ds.dnsaddr.s_addr != 0) - { - resolv_conf(&ds.dnsaddr); - } + if (ds.dnsaddr.s_addr != 0) + { + resolv_conf(&ds.dnsaddr); + } - dhcpc_close(handle); - printf("IP: %s\n", inet_ntoa(ds.ipaddr)); + dhcpc_close(handle); + printf("IP: %s\n", inet_ntoa(ds.ipaddr)); } #endif -#endif /* CONFIG_NSH_BUILTIN_APPS */ if (discover_start() < 0) { diff --git a/apps/netutils/discover/Kconfig b/apps/netutils/discover/Kconfig index 3365505117..e1fc0d4e03 100644 --- a/apps/netutils/discover/Kconfig +++ b/apps/netutils/discover/Kconfig @@ -7,32 +7,33 @@ config NETUTILS_DISCOVER bool "Network Discovery Utility" default n depends on NET_UDP + select NETUTILS_UIPLIB ---help--- Tool for discovering devices on the local network per UDP broadcast. if NETUTILS_DISCOVER -DISCOVER_STACK_SIZE +config DISCOVER_STACK_SIZE int "Discover Daemon Stack Size" default 1024 -DISCOVER_PRIORITY +config DISCOVER_PRIORITY int "Discover Daemon Priority" default 50 -DISCOVER_PORT +config DISCOVER_PORT int "Discover Daemon Port Number" default 96 -DISCOVER_INTERFACE - int "Network Interface Name" +config DISCOVER_INTERFACE + string "Network Interface Name" default "eth0" -DISCOVER_DEVICE_CLASS +config DISCOVER_DEVICE_CLASS hex "Network Discovery Class" default 0xff -CONFIG_DISCOVER_DESCR +config CONFIG_DISCOVER_DESCR string "Discoverer Description" default "NuttX" diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index f69cc8d062..68f0933dd5 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3331,3 +3331,5 @@ * confgs/fire-stm32v2: The board port is basically functional. Not all features have been verified. The ENC28J60 network is not yet functional. + * configs/stm3240g-eval/discover: A configuration for testing + the UDP discovery utility. Contributed by Max Holtzberg. \ No newline at end of file diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index 151811189a..e0238f4def 100755 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -880,6 +880,28 @@ Where is one of the following: CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows + discover: + -------- + This configuration exercises netutils/discover utility using + apps/exmaples/discover. This example initializes and starts the UDP + discover daemon. This daemon is useful for discovering devices in + local networks, especially with DHCP configured devices. It listens + for UDP broadcasts which also can include a device class so that + groups of devices can be discovered. It is also possible to address all + classes with a kind of broadcast discover. + + Configuration settings that you may need to change for your + environment: + + CONFIG_STM32_CODESOURCERYL=y - CodeSourcery for Linux + CONFIG_EXAMPLE_DISCOVER_DHCPC=y - DHCP Client + CONFIG_EXAMPLE_DISCOVER_IPADDR - (not defined) + CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address + + NOTE: This configuration uses to the mconf configuration tool to control + the configuration. See the section entitled "NuttX Configuration Tool" + in the top-level README.txt file. + nettest: ------- diff --git a/nuttx/configs/stm3240g-eval/discover/Make.defs b/nuttx/configs/stm3240g-eval/discover/Make.defs new file mode 100644 index 0000000000..5509a14f47 --- /dev/null +++ b/nuttx/configs/stm3240g-eval/discover/Make.defs @@ -0,0 +1,198 @@ +############################################################################ +# configs/stm3240g-eval/discover/Make.defs +# +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk + +# Setup for the selected toolchain + +ifeq ($(CONFIG_STM32_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = + WINTOOL = y +ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard +else + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +endif +ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = arm-atollic-eabi- + WINTOOL = y +ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard +else + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +endif +ifeq ($(CONFIG_STM32_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + ARCROSSDEV = arm-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_RAISONANCE),y) + # Raisonance RIDE7 under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + ARCROSSDEV = arm-elf- + ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + MAXOPTIMIZATION = -Os +endif + +LDSCRIPT = ld.script + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" + MAXOPTIMIZATION = -O2 +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") + ARCHOPTIMIZATION = -g +else + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +define PREPROCESS + @echo "CPP: $1->$2" + @$(CPP) $(CPPFLAGS) $1 -o $2 +endef + +define COMPILE + @echo "CC: $1" + @$(CC) -c $(CFLAGS) $1 -o $2 +endef + +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + +define ASSEMBLE + @echo "AS: $1" + @$(CC) -c $(AFLAGS) $1 -o $2 +endef + +define ARCHIVE + echo "AR: $2"; \ + $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } +endef + +define CLEAN + @rm -f *.o *.a +endef + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe +HOSTLDFLAGS = + diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig new file mode 100644 index 0000000000..81a5b3c910 --- /dev/null +++ b/nuttx/configs/stm3240g-eval/discover/defconfig @@ -0,0 +1,866 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG=y +# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_ENABLE is not set +# CONFIG_DEBUG_SCHED is not set +# CONFIG_DEBUG_MM is not set +CONFIG_DEBUG_NET=y +# CONFIG_DEBUG_USB is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_GRAPHICS is not set +# CONFIG_DEBUG_I2C is not set +# CONFIG_DEBUG_SPI is not set +# CONFIG_DEBUG_WATCHDOG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_IMX is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_LM3S is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_SAM3U is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STR71X is not set +CONFIG_ARCH_CORTEXM4=y +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARCH_FPU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARMV7M_MPU is not set +CONFIG_ARCH_IRQPRIO=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +# CONFIG_ARCH_CALIBRATION is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_NET_MULTICAST is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F103RET6 is not set +# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set +# CONFIG_ARCH_CHIP_STM32F103VET6 is not set +# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set +# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +CONFIG_ARCH_CHIP_STM32F407IG=y +CONFIG_STM32_STM32F40XX=y +# CONFIG_STM32_CODESOURCERYW is not set +CONFIG_STM32_CODESOURCERYL=y +# CONFIG_STM32_ATOLLIC_LITE is not set +# CONFIG_STM32_ATOLLIC_PRO is not set +# CONFIG_STM32_DEVKITARM is not set +# CONFIG_STM32_RAISONANCE is not set +# CONFIG_STM32_BUILDROOT is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_BKPSRAM is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CCMDATARAM is not set +# CONFIG_STM32_CRYP is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_DCMI is not set +CONFIG_STM32_ETHMAC=y +# CONFIG_STM32_FSMC is not set +# CONFIG_STM32_HASH is not set +CONFIG_STM32_I2C1=y +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_I2C3 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_OTGFS is not set +# CONFIG_STM32_OTGHS is not set +CONFIG_STM32_PWR=y +# CONFIG_STM32_RNG is not set +# CONFIG_STM32_SDIO is not set +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +# CONFIG_STM32_TIM9 is not set +# CONFIG_STM32_TIM10 is not set +# CONFIG_STM32_TIM11 is not set +# CONFIG_STM32_TIM12 is not set +# CONFIG_STM32_TIM13 is not set +# CONFIG_STM32_TIM14 is not set +# CONFIG_STM32_USART1 is not set +# CONFIG_STM32_USART2 is not set +CONFIG_STM32_USART3=y +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_USART6 is not set +# CONFIG_STM32_WWDG is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCMEXCLUDE is not set + +# +# Ethernet MAC configuration +# +CONFIG_STM32_PHYADDR=1 +CONFIG_STM32_MII=y +CONFIG_STM32_MII_MCO1=y +# CONFIG_STM32_MII_MCO2 is not set +CONFIG_STM32_AUTONEG=y +CONFIG_STM32_PHYSR=16 +CONFIG_STM32_PHYSR_SPEED=0x0002 +CONFIG_STM32_PHYSR_100MBPS=0x0000 +CONFIG_STM32_PHYSR_MODE=0x0004 +CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004 +# CONFIG_STM32_ETH_PTP is not set + +# +# USB Host Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_STACKDUMP=y + +# +# Board Settings +# +CONFIG_DRAM_START=0x20000000 +CONFIG_DRAM_SIZE=196608 +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +# CONFIG_ARCH_INTERRUPTSTACK is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_STM3240G_EVAL=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm3240g-eval" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +# CONFIG_ARCH_BUTTONS is not set +CONFIG_ARCH_HAVE_IRQBUTTONS=y + +# +# Board-Specific Options +# + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=6 +CONFIG_DEV_CONSOLE=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +CONFIG_SCHED_WAITPID=y +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="discover_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_DISABLE_ENVIRON is not set +CONFIG_DISABLE_POLL=y + +# +# Sizes of configurable things (0 disables) +# +CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASK_ARGS=4 +CONFIG_NPTHREAD_KEYS=4 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_PREALLOC_TIMERS=4 + +# +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 + +# +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +CONFIG_I2C_TRANSFER=y +# CONFIG_I2C_WRITEREAD is not set +CONFIG_I2C_POLLED=y +# CONFIG_I2C_TRACE is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_NETDEVICES is not set +# CONFIG_NET_SLIP is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_USART3=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_USART3_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART3 Configuration +# +CONFIG_USART3_RXBUFSIZE=128 +CONFIG_USART3_TXBUFSIZE=128 +CONFIG_USART3_BAUD=115200 +CONFIG_USART3_BITS=8 +CONFIG_USART3_PARITY=0 +CONFIG_USART3_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +CONFIG_NET=y +# CONFIG_NET_NOINTS is not set +CONFIG_NET_MULTIBUFFER=y +# CONFIG_NET_IPv6 is not set +CONFIG_NSOCKET_DESCRIPTORS=10 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +CONFIG_NET_BUFSIZE=650 +# CONFIG_NET_TCPURGDATA is not set +CONFIG_NET_TCP=y +CONFIG_NET_TCP_CONNS=40 +CONFIG_NET_MAX_LISTENPORTS=40 +CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=16 +CONFIG_NET_TCP_RECVDELAY=0 +CONFIG_NET_TCPBACKLOG=y +CONFIG_NET_UDP=y +CONFIG_NET_UDP_CHECKSUMS=y +CONFIG_NET_UDP_CONNS=8 +CONFIG_NET_BROADCAST=y +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y +# CONFIG_NET_PINGADDRCONF is not set +# CONFIG_NET_IGMP is not set +CONFIG_NET_STATISTICS=y +CONFIG_NET_RECEIVE_WINDOW=562 +CONFIG_NET_ARPTAB_SIZE=16 +CONFIG_NET_ARP_IPIN=y + +# +# File Systems +# + +# +# File system configuration +# +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_NFS is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=2 +# CONFIG_GRAN is not set + +# +# Library Routines +# +CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_HAVE_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# Application Configuration +# + +# +# Named Applications +# +# CONFIG_NAMEDAPP is not set + +# +# Examples +# + +# +# ADC Example +# +# CONFIG_EXAMPLES_ADC is not set + +# +# Buttons Example +# +# CONFIG_EXAMPLES_BUTTONS is not set + +# +# CAN Example +# +# CONFIG_EXAMPLES_CAN is not set + +# +# USB CDC/ACM Class Driver Example +# +# CONFIG_EXAMPLES_CDCACM is not set + +# +# USB composite Class Driver Example +# +# CONFIG_EXAMPLES_COMPOSITE is not set + +# +# DHCP Server Example +# +# CONFIG_EXAMPLES_DHCPD is not set + +# +# FTP Client Example +# +# CONFIG_EXAMPLES_FTPC is not set + +# +# FTP Server Example +# +# CONFIG_EXAMPLES_FTPD is not set + +# +# "Hello, World!" Example +# +# CONFIG_EXAMPLES_HELLO is not set + +# +# "Hello, World!" C++ Example +# +# CONFIG_EXAMPLES_HELLOXX is not set + +# +# USB HID Keyboard Example +# +# CONFIG_EXAMPLES_HIDKBD is not set + +# +# IGMP Example +# +# CONFIG_EXAMPLES_IGMP is not set + +# +# LCD Read/Write Example +# +# CONFIG_EXAMPLES_LCDRW is not set + +# +# Memory Management Example +# +# CONFIG_EXAMPLES_MM is not set + +# +# File System Mount Example +# +# CONFIG_EXAMPLES_MOUNT is not set + +# +# FreeModBus Example +# +# CONFIG_EXAMPLES_MODBUS is not set + +# +# Network Test Example +# +# CONFIG_EXAMPLES_NETTEST is not set + +# +# NuttShell (NSH) Example +# +# CONFIG_EXAMPLES_NSH is not set + +# +# NULL Example +# +# CONFIG_EXAMPLES_NULL is not set + +# +# NX Graphics Example +# +# CONFIG_EXAMPLES_NX is not set + +# +# NxConsole Example +# +# CONFIG_EXAMPLES_NXCONSOLE is not set + +# +# NXFFS File System Example +# +# CONFIG_EXAMPLES_NXFFS is not set + +# +# NXFLAT Example +# +# CONFIG_EXAMPLES_NXFLAT is not set + +# +# NX Graphics "Hello, World!" Example +# +# CONFIG_EXAMPLES_NXHELLO is not set + +# +# NX Graphics image Example +# +# CONFIG_EXAMPLES_NXIMAGE is not set + +# +# NX Graphics lines Example +# +# CONFIG_EXAMPLES_NXLINES is not set + +# +# NX Graphics Text Example +# +# CONFIG_EXAMPLES_NXTEXT is not set + +# +# OS Test Example +# +# CONFIG_EXAMPLES_OSTEST is not set + +# +# Pascal "Hello, World!"example +# +# CONFIG_EXAMPLES_PASHELLO is not set + +# +# Pipe Example +# +# CONFIG_EXAMPLES_PIPE is not set + +# +# Poll Example +# +# CONFIG_EXAMPLES_POLL is not set + +# +# Pulse Width Modulation (PWM) Example +# + +# +# Quadrature Encoder Example +# +# CONFIG_EXAMPLES_QENCODER is not set + +# +# RGMP Example +# +# CONFIG_EXAMPLES_RGMP is not set + +# +# ROMFS Example +# +# CONFIG_EXAMPLES_ROMFS is not set + +# +# sendmail Example +# +# CONFIG_EXAMPLES_SENDMAIL is not set + +# +# Serial Loopback Example +# +# CONFIG_EXAMPLES_SERLOOP is not set + +# +# Telnet Daemon Example +# +# CONFIG_EXAMPLES_TELNETD is not set + +# +# THTTPD Web Server Example +# +# CONFIG_EXAMPLES_THTTPD is not set + +# +# TIFF Generation Example +# +# CONFIG_EXAMPLES_TIFF is not set + +# +# Touchscreen Example +# +# CONFIG_EXAMPLES_TOUCHSCREEN is not set + +# +# UDP Example +# +# CONFIG_EXAMPLES_UDP is not set + +# +# UDP Discovery Daemon Example +# +CONFIG_EXAMPLE_DISCOVER=y +CONFIG_EXAMPLE_DISCOVER_DHCPC=y +CONFIG_EXAMPLE_DISCOVER_NOMAC=y +CONFIG_EXAMPLE_DISCOVER_DRIPADDR=0xc0a80201 +CONFIG_EXAMPLE_DISCOVER_NETMASK=0xffffff00 + +# +# uIP Web Server Example +# +# CONFIG_EXAMPLES_UIP is not set + +# +# USB Serial Test Example +# +# CONFIG_EXAMPLES_USBSERIAL is not set + +# +# USB Mass Storage Class Example +# +# CONFIG_EXAMPLES_USBMSC is not set + +# +# USB Serial Terminal Example +# +# CONFIG_EXAMPLES_USBTERM is not set + +# +# Watchdog timer Example +# +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# wget Example +# +# CONFIG_EXAMPLES_WGET is not set + +# +# WLAN Example +# +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_FICL is not set +# CONFIG_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# + +# +# DHCP client +# +CONFIG_NETUTILS_DHCPC=y + +# +# DHCP server +# +# CONFIG_NETUTILS_DHCPD is not set + +# +# FTP client +# +# CONFIG_NETUTILS_FTPC is not set + +# +# FTP server +# +# CONFIG_NETUTILS_FTPD is not set + +# +# Name resolution +# +CONFIG_NETUTILS_RESOLV=y +CONFIG_NET_RESOLV_ENTRIES=4 + +# +# SMTP +# +# CONFIG_NETUTILS_SMTP is not set + +# +# TFTP client +# +# CONFIG_NETUTILS_TELNETD is not set + +# +# TFTP client +# +# CONFIG_NETUTILS_TFTPC is not set + +# +# THTTPD web server +# +# CONFIG_NETUTILS_THTTPD is not set + +# +# uIP support library +# +CONFIG_NETUTILS_UIPLIB=y + +# +# uIP web client +# +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# uIP web server +# +# CONFIG_NETUTILS_WEBSERVER is not set + +# +# UDP Discovery Utility +# +CONFIG_NETUTILS_DISCOVER=y +CONFIG_DISCOVER_STACK_SIZE=1024 +CONFIG_DISCOVER_PRIORITY=50 +CONFIG_DISCOVER_PORT=96 +CONFIG_DISCOVER_INTERFACE="eth0" +CONFIG_DISCOVER_DEVICE_CLASS=0xff +CONFIG_CONFIG_DISCOVER_DESCR="STM3240G-EVAL" + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +# CONFIG_NSH_LIBRARY is not set + +# +# System NSH Add-Ons +# + +# +# Custom free memory command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# +# CONFIG_SYSTEM_I2CTOOL is not set + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() support +# +# CONFIG_SYSTEM_READLINE is not set + +# +# VSN board Add-Ons +# + +# +# VSN board add-ons +# +# CONFIG_VSN_POWEROFF is not set +# CONFIG_VSN_RAMTRON is not set +# CONFIG_VSN_SDCARD is not set +# CONFIG_VSN_SYSINFO is not set diff --git a/nuttx/configs/stm3240g-eval/discover/setenv.sh b/nuttx/configs/stm3240g-eval/discover/setenv.sh new file mode 100755 index 0000000000..ce5f031b1c --- /dev/null +++ b/nuttx/configs/stm3240g-eval/discover/setenv.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# configs/stm3240g-eval/discover/setenv.sh +# +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the RIDE +# toolchain under windows. You will also have to edit this if you install +# the RIDE toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt index ae19be2738..5d52eaefff 100755 --- a/nuttx/tools/README.txt +++ b/nuttx/tools/README.txt @@ -17,6 +17,12 @@ configure.sh target board. See configs/README.txt or Documentation/NuttxPortingGuide.html for a description of how to configure NuttX with this script. +discover.py + + Example script for discovering devices in the local network. + It is the counter part to apps/netutils/discover + + mkconfig.c, cfgparser.c, and cfgparser.h These are Cs file that are used to build mkconfig program. The mkconfig diff --git a/nuttx/tools/discover.py b/nuttx/tools/discover.py new file mode 100755 index 0000000000..3279fe8715 --- /dev/null +++ b/nuttx/tools/discover.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +############################################################################ +# tools/indent.sh +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Author: Max Holtzberg +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +import array +import time +from socket import * + +PORT = 96 + +DISCOVER_PROTO_ID = 0x99 +DISCOVER_ALL = 0xff # 0xff means all devices +DISCOVER_REQUEST = 0x01 +DISCOVER_RESPONSE = 0x02 +DISCOVER_REQUEST_SIZE = 4 +DISCOVER_RESPONSE_SIZE = 35 + +def check_sum(data): + chksum = 0 + for c in data[:-1]: + chksum -= c + return (chksum & 0xff) == data[-1] + +def send_discover(socket): + cmd = array.array('B', [0] * DISCOVER_REQUEST_SIZE) + cmd[0] = DISCOVER_PROTO_ID # Tag for identification of the protocol + cmd[1] = DISCOVER_REQUEST # Request command + cmd[2] = DISCOVER_ALL + chksum = 0 + for c in cmd[:3]: + chksum -= c; + cmd[3] = chksum & 0xff + + socket.sendto(cmd, ('', PORT)) + +def read_responses(socket): + res = [] + response = array.array('B', [0] * DISCOVER_RESPONSE_SIZE) + try: + while 1: + size, src = socket.recvfrom_into(response) + if (size == DISCOVER_RESPONSE_SIZE + and response[0] == DISCOVER_PROTO_ID + and response[1] == DISCOVER_RESPONSE + and check_sum(response)): + + dev = {} + dev['addr'] = src[0] + dev['descr'] = response[2:-1].tostring().rstrip('\0') + res.append(dev) + + except timeout: + return res + +if __name__ == '__main__': + print 'Sending discover...' + + s = socket(AF_INET, SOCK_DGRAM) + s.bind(('0.0.0.0', PORT)) + s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) + s.settimeout(1.0); + send_discover(s) + devices = read_responses(s) + socket.close(s) + + print devices From a444b0ebc40aab070bb8b25ebc0ddb023a69c01d Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 12 Sep 2012 21:42:36 +0000 Subject: [PATCH 60/95] Suppress network configuration in discover example if it is an NSH built-in functin git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5139 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/discover/Kconfig | 14 +++++++------- apps/examples/discover/main.c | 9 ++++++++- nuttx/COPYING | 7 ++++++- nuttx/tools/discover.py | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/apps/examples/discover/Kconfig b/apps/examples/discover/Kconfig index c867b56f39..0a756d91d9 100644 --- a/apps/examples/discover/Kconfig +++ b/apps/examples/discover/Kconfig @@ -17,29 +17,29 @@ config EXAMPLE_DISCOVER It is also possible to address all classes with a kind of broadcast discover. -if EXAMPLE_DISCOVER - config EXAMPLE_DISCOVER_DHCPC bool "DHCP Client" default n + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS select NETUTILS_DHCPC select NETUTILS_RESOLV config EXAMPLE_DISCOVER_NOMAC - bool "Use canned MAC address" + bool "Use Canned MAC Address" default n + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS config EXAMPLE_DISCOVER_IPADDR hex "Target IP address" default 0x0a000002 - depends on !EXAMPLE_DISCOVER_DHCPC + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLE_DISCOVER_DHCPC config EXAMPLE_DISCOVER_DRIPADDR - hex "Router IP address" + hex "Default Router IP address (Gateway)" default 0x0a000001 + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS config EXAMPLE_DISCOVER_NETMASK hex "Network Mask" default 0xffffff00 - -endif + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS diff --git a/apps/examples/discover/main.c b/apps/examples/discover/main.c index 6199951868..d076deb11f 100644 --- a/apps/examples/discover/main.c +++ b/apps/examples/discover/main.c @@ -87,6 +87,11 @@ int discover_main(int argc, char *argv[]) { + /* If this task is excecutated as an NSH built-in function, then the + * network has already been configured by NSH's start-up logic. + */ + +#ifndef CONFIG_NSH_BUILTIN_APPS struct in_addr addr; #if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC) uint8_t mac[IFHWADDRLEN]; @@ -168,7 +173,9 @@ int discover_main(int argc, char *argv[]) dhcpc_close(handle); printf("IP: %s\n", inet_ntoa(ds.ipaddr)); } -#endif + +#endif /* CONFIG_EXAMPLE_DISCOVER_DHCPC */ +#endif /* CONFIG_NSH_BUILTIN_APPS */ if (discover_start() < 0) { diff --git a/nuttx/COPYING b/nuttx/COPYING index 82d3a8a58a..863b81a2fc 100644 --- a/nuttx/COPYING +++ b/nuttx/COPYING @@ -71,7 +71,12 @@ FAT Long File Names FAT implementations that include support for long filenames, and that removable solid state media and consumer devices only using short names would be unaffected. ..." - + + This Wikipedia entry has been updated with recent legal decisions in favor + of Microsoft. Refer to: + + http://en.wikipedia.org/wiki/File_Allocation_Table#Legal_issues + So you have been forewarned: Use the long filename at your own risk! uIP diff --git a/nuttx/tools/discover.py b/nuttx/tools/discover.py index 3279fe8715..cc82a0cad5 100755 --- a/nuttx/tools/discover.py +++ b/nuttx/tools/discover.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ############################################################################ -# tools/indent.sh +# tools/discover.py # # Copyright (C) 2012 Max Holtzberg. All rights reserved. # Author: Max Holtzberg From 024e115d095da0d645d276a8c1c32c3c08364b19 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 00:34:43 +0000 Subject: [PATCH 61/95] Add mm/README.txt git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5140 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 4 +- nuttx/Documentation/README.html | 4 +- nuttx/README.txt | 2 + nuttx/mm/README.txt | 71 +++++++++++++++++++++++++++++++++ nuttx/mm/mm_environment.h | 6 ++- 5 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 nuttx/mm/README.txt diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 68f0933dd5..eec1c96695 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3332,4 +3332,6 @@ Not all features have been verified. The ENC28J60 network is not yet functional. * configs/stm3240g-eval/discover: A configuration for testing - the UDP discovery utility. Contributed by Max Holtzberg. \ No newline at end of file + the UDP discovery utility. Contributed by Max Holtzberg. + * mm/README.txt: Add a new README file. + diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index 5bc3d1d96a..a92b99269f 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -8,7 +8,7 @@

      NuttX README Files

      -

      Last Updated: August 1, 2012

      +

      Last Updated: September 12, 2012

      @@ -237,6 +237,8 @@ | | `- README.txt | |- libxx/ | | `- README.txt + | |- mm/ + | | `- README.txt | |- syscall/ | | `- README.txt | `- tools/ diff --git a/nuttx/README.txt b/nuttx/README.txt index ae33a6e9c3..afea4d2e3f 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -806,6 +806,8 @@ nuttx | `- README.txt |- libxx/ | `- README.txt + |- mm/ + | `- README.txt |- syscall/ | `- README.txt `- tools/ diff --git a/nuttx/mm/README.txt b/nuttx/mm/README.txt new file mode 100644 index 0000000000..b0b80deae2 --- /dev/null +++ b/nuttx/mm/README.txt @@ -0,0 +1,71 @@ +mm/README.txt +============= + +This directory contains the NuttX memory management logic. This include: + +1) The standard memory management functions as prototyped in stdlib.h as + specified in the Base definitions volume of IEEE Std 1003.1-2001. This + include the files: + + o Standard Interfaces: mm_malloc.c, mm_calloc.c, mm_realloc.c, + mm_memalign.c, mm_free.c + o Less-Standard Interfaces: mm_zalloc.c, mm_mallinfo.c + o Internal Implementation: mm_initialize.c mm_sem.c mm_addfreechunk.c + mm_size2ndx.c mm_shrinkchunk.c, mm_internal.h + o Build and Configuration files: Kconfig, Makefile + + Memory Models: + + o Small Memory Model. If the MCU supports only 16-bit data addressing + then the small memory model is automatically used. The maximum size + of the heap is then 64K. The small memory model can also be forced + MCUs with wider addressing by defining CONFIG_SMALL_MEMORY in the + NuttX configuration file. + o Large Memory Model. Otherwise, the allocator uses a model that + supports a heap of up to 4G. + + This implementation uses a variable length allocator with the following + properties: + + o Overhead: Either 8- or 4-bytes per allocation for large and small + models, respectively. + o Alignment: All allocations are aligned to 8- or 4-bytes for large + and small models, respectively. + +2) Test Program. There is also a host-best test program that can be + used to verify the memory manager. These are the file: + + Makefile.test, mm_test.c, and mm_environment.h. + + Build instructions: + + make -f Makefile.test + + The executable will be built in the top-level directory as nuttx/mm_text + (or mm_test.exe under Cygwin). + +3) Granule Allocator. A non-standard granule allocator is also available + in this directory The granule allocator allocates memory in units + of a fixed sized block ("granule"). All memory is aligned to the size + of one granule. + + The granule allocator interfaces are defined in nuttx/include/nuttx/gran.h. + The granule allocator consists of these files in this directory: + + mm_gran.h, mm_granalloc.c, mm_grancritical.c, mm_granfree.c + mm_graninit.c + + The granule allocator is not used anywhere within the base NuttX code + as of this writing. The intent of the granule allocator is to provide + a tool to support platform-specific management of aligned DMA memory. + + NOTE: Because each granule is aligned to the granule size and each + allocations is in units of the granule size, selection of the granule + size is important: Larger granules will give better performance and + less overhead but more losses of memory due to alignment and quantization + waste. + + The current implementation also restricts the maximum allocation size + to 32 granules. That restriction could be eliminated with some + additional coding effort, but currently requires larger granule + sizes for larger allocations. diff --git a/nuttx/mm/mm_environment.h b/nuttx/mm/mm_environment.h index 70e611116a..d28fbf1d77 100644 --- a/nuttx/mm/mm_environment.h +++ b/nuttx/mm/mm_environment.h @@ -105,12 +105,16 @@ extern void mm_addregion(FAR void *heapstart, size_t heapsize); /* Debug macros are always on */ -# define CONFIG_DEBUG +# define CONFIG_DEBUG 1 # undef mdbg # define mdbg(format, arg...) printf(format, ##arg) # undef mvdg # define mvdbg(format, arg...) printf(format, ##arg) +# undef mlldbg +# define mlldbg(format, arg...) printf(format, ##arg) +# undef mllvdg +# define mllvdbg(format, arg...) printf(format, ##arg) #else # define mm_errno get_errno() From a033a25dbf92d2a6048c76b245d9ea6da7498c20 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 12:36:32 +0000 Subject: [PATCH 62/95] Rename all apps/examples/-/main.c to something unique git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5141 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 3 +++ apps/examples/README.txt | 2 +- apps/examples/buttons/Makefile | 2 +- apps/examples/buttons/{main.c => buttons_main.c} | 2 +- apps/examples/discover/Makefile | 2 +- apps/examples/discover/{main.c => discover_main.c} | 2 +- apps/examples/hello/Makefile | 2 +- apps/examples/hello/{main.c => hello_main.c} | 2 +- apps/examples/helloxx/Makefile | 2 +- apps/examples/helloxx/{main.cxx => helloxx_main.cxx} | 2 +- apps/examples/ostest/Makefile | 2 +- apps/examples/ostest/{main.c => ostest_main.c} | 2 +- apps/examples/rgmp/Makefile | 2 +- apps/examples/rgmp/{main.c => rgmp_main.c} | 2 +- apps/examples/serloop/Makefile | 2 +- apps/examples/serloop/{main.c => serloop_main.c} | 2 +- apps/examples/thttpd/Makefile | 2 +- apps/examples/thttpd/{main.c => thttpd_main.c} | 2 +- apps/examples/uip/Makefile | 2 +- apps/examples/uip/{main.c => uip_main.c} | 4 ++-- apps/examples/usbserial/Makefile | 2 +- apps/examples/usbserial/{main.c => usbserial_main.c} | 2 +- apps/netutils/discover/discover.c | 2 +- apps/system/i2c/README.txt | 2 +- 24 files changed, 27 insertions(+), 24 deletions(-) rename apps/examples/buttons/{main.c => buttons_main.c} (99%) rename apps/examples/discover/{main.c => discover_main.c} (99%) rename apps/examples/hello/{main.c => hello_main.c} (98%) rename apps/examples/helloxx/{main.cxx => helloxx_main.cxx} (99%) rename apps/examples/ostest/{main.c => ostest_main.c} (99%) rename apps/examples/rgmp/{main.c => rgmp_main.c} (98%) rename apps/examples/serloop/{main.c => serloop_main.c} (98%) rename apps/examples/thttpd/{main.c => thttpd_main.c} (99%) rename apps/examples/uip/{main.c => uip_main.c} (98%) rename apps/examples/usbserial/{main.c => usbserial_main.c} (99%) diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 6df66b95fc..b7b71862ec 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -323,3 +323,6 @@ by Max Holtzberg. * apps/examples/discover: A test example for the UDP network discovery utility (also contribed by Max Holtzberg). + * apps/examples/*/main.c: Too many files called main.c. Each renamed + to something unique so that they will not collide in the archive. + diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 8a7a94c3e4..934eded4d8 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -1133,7 +1133,7 @@ examples/rgmp See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further - At present, the RGMP example folder contains only an empty main.c file. + At present, the RGMP example folder contains only an empty rgmp_main.c file. examples/romfs ^^^^^^^^^^^^^^ diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile index 9c05871998..a9d7bf5835 100644 --- a/apps/examples/buttons/Makefile +++ b/apps/examples/buttons/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # Hello, World! Example ASRCS = -CSRCS = main.c +CSRCS = buttons_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/buttons/main.c b/apps/examples/buttons/buttons_main.c similarity index 99% rename from apps/examples/buttons/main.c rename to apps/examples/buttons/buttons_main.c index 50124512cd..a3f6449d4f 100644 --- a/apps/examples/buttons/main.c +++ b/apps/examples/buttons/buttons_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/buttons/main.c + * examples/buttons/buttons_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/discover/Makefile b/apps/examples/discover/Makefile index f42f310a11..3bb6b939eb 100644 --- a/apps/examples/discover/Makefile +++ b/apps/examples/discover/Makefile @@ -47,7 +47,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = 2048 ASRCS = -CSRCS = main.c +CSRCS = discover_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/discover/main.c b/apps/examples/discover/discover_main.c similarity index 99% rename from apps/examples/discover/main.c rename to apps/examples/discover/discover_main.c index d076deb11f..c3acb56df3 100644 --- a/apps/examples/discover/main.c +++ b/apps/examples/discover/discover_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/discover/main.c + * examples/discover/discover_main.c * * Copyright (C) 2012 Max Holtzberg. All rights reserved. * Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile index 9c3cda894b..1d78d723ed 100644 --- a/apps/examples/hello/Makefile +++ b/apps/examples/hello/Makefile @@ -46,7 +46,7 @@ STACKSIZE = 2048 # Hello, World! Example ASRCS = -CSRCS = main.c +CSRCS = hello_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/hello/main.c b/apps/examples/hello/hello_main.c similarity index 98% rename from apps/examples/hello/main.c rename to apps/examples/hello/hello_main.c index 7e07cffd13..229027c36b 100644 --- a/apps/examples/hello/main.c +++ b/apps/examples/hello/hello_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/hello/main.c + * examples/hello/hello_main.c * * Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile index c34378d249..c9557d124b 100644 --- a/apps/examples/helloxx/Makefile +++ b/apps/examples/helloxx/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs ASRCS = CSRCS = -CXXSRCS = main.cxx +CXXSRCS = helloxx_main.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/helloxx/main.cxx b/apps/examples/helloxx/helloxx_main.cxx similarity index 99% rename from apps/examples/helloxx/main.cxx rename to apps/examples/helloxx/helloxx_main.cxx index fcec7c761a..60fd0487b5 100644 --- a/apps/examples/helloxx/main.cxx +++ b/apps/examples/helloxx/helloxx_main.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// examples/helloxx/main.cxx +// examples/helloxx/helloxx_main.cxx // // Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile index eab1db8b39..374964b396 100644 --- a/apps/examples/ostest/Makefile +++ b/apps/examples/ostest/Makefile @@ -46,7 +46,7 @@ STACKSIZE = 2048 # NuttX OS Test ASRCS = -CSRCS = main.c dev_null.c +CSRCS = ostest_main.c dev_null.c ifeq ($(CONFIG_ARCH_FPU),y) CSRCS += fpu.c diff --git a/apps/examples/ostest/main.c b/apps/examples/ostest/ostest_main.c similarity index 99% rename from apps/examples/ostest/main.c rename to apps/examples/ostest/ostest_main.c index 61a2af19a6..46726d515d 100644 --- a/apps/examples/ostest/main.c +++ b/apps/examples/ostest/ostest_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/examples/ostest/main.c + * apps/examples/ostest/ostest_main.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/rgmp/Makefile b/apps/examples/rgmp/Makefile index cefe63d54b..60fbf7c682 100644 --- a/apps/examples/rgmp/Makefile +++ b/apps/examples/rgmp/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # The smallest thing you can build -- the NULL example. ASRCS = -CSRCS = main.c +CSRCS = rgmp_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/rgmp/main.c b/apps/examples/rgmp/rgmp_main.c similarity index 98% rename from apps/examples/rgmp/main.c rename to apps/examples/rgmp/rgmp_main.c index a1fa6cdc39..3ef70edc8c 100644 --- a/apps/examples/rgmp/main.c +++ b/apps/examples/rgmp/rgmp_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/rgmp/main.c + * examples/rgmp/rgmp_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile index 67c805d46c..7594779ce9 100644 --- a/apps/examples/serloop/Makefile +++ b/apps/examples/serloop/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # Mindlessly simple console loopack test ASRCS = -CSRCS = main.c +CSRCS = serloop_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/serloop/main.c b/apps/examples/serloop/serloop_main.c similarity index 98% rename from apps/examples/serloop/main.c rename to apps/examples/serloop/serloop_main.c index f0e3ac2387..6fba577a4c 100644 --- a/apps/examples/serloop/main.c +++ b/apps/examples/serloop/serloop_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/serloop/main.c + * examples/serloop/serloop_main.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/thttpd/Makefile b/apps/examples/thttpd/Makefile index 9df26af359..606e717dc4 100644 --- a/apps/examples/thttpd/Makefile +++ b/apps/examples/thttpd/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # THTTPD Web Server Example ASRCS = -CSRCS = main.c +CSRCS = thttpd_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/thttpd/main.c b/apps/examples/thttpd/thttpd_main.c similarity index 99% rename from apps/examples/thttpd/main.c rename to apps/examples/thttpd/thttpd_main.c index 4f8315d959..f4d5d58db4 100644 --- a/apps/examples/thttpd/main.c +++ b/apps/examples/thttpd/thttpd_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/thttpd/main.c + * examples/thttpd/thttpd_main.c * * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/examples/uip/Makefile b/apps/examples/uip/Makefile index 4407998fc7..218f6f3c60 100644 --- a/apps/examples/uip/Makefile +++ b/apps/examples/uip/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # uIP very tiny web server example ASRCS = -CSRCS = main.c cgi.c httpd_fsdata.c +CSRCS = uip_main.c cgi.c httpd_fsdata.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/uip/main.c b/apps/examples/uip/uip_main.c similarity index 98% rename from apps/examples/uip/main.c rename to apps/examples/uip/uip_main.c index dcad63eaa5..b552aed75a 100644 --- a/apps/examples/uip/main.c +++ b/apps/examples/uip/uip_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/uip/main.c + * examples/uip/uip_main.c * * Copyright (C) 2007, 2009-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -201,7 +201,7 @@ int uip_main(int argc, char *argv[]) while(1) { sleep(3); - printf("main: Still running\n"); + printf("uip_main: Still running\n"); #if CONFIG_NFILE_DESCRIPTORS > 0 fflush(stdout); #endif diff --git a/apps/examples/usbserial/Makefile b/apps/examples/usbserial/Makefile index 35c76ba896..cf790dbe9d 100644 --- a/apps/examples/usbserial/Makefile +++ b/apps/examples/usbserial/Makefile @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # USB serial device example ASRCS = -CSRCS = main.c +CSRCS = usbserial_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/usbserial/main.c b/apps/examples/usbserial/usbserial_main.c similarity index 99% rename from apps/examples/usbserial/main.c rename to apps/examples/usbserial/usbserial_main.c index c73881a44d..016c8b292c 100644 --- a/apps/examples/usbserial/main.c +++ b/apps/examples/usbserial/usbserial_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/usbserial/main.c + * examples/usbserial/usbserial_main.c * * Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/apps/netutils/discover/discover.c b/apps/netutils/discover/discover.c index 67df02b3f7..8e2612dbb6 100644 --- a/apps/netutils/discover/discover.c +++ b/apps/netutils/discover/discover.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/discover/main.c + * netutils/discover/discover.c * * Copyright (C) 2012 Max Holtzberg. All rights reserved. * Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. diff --git a/apps/system/i2c/README.txt b/apps/system/i2c/README.txt index 97801bcaaa..7b432533be 100755 --- a/apps/system/i2c/README.txt +++ b/apps/system/i2c/README.txt @@ -211,7 +211,7 @@ COMMAND SUMMARY =============== We have already seen the I2C help (or ?) commands above. This section will -discusse the remaining commands. +discuss the remaining commands. List buses: bus [OPTIONS] -------------------------- From f6ca2227e38d4b076cf44ce50b0fefeed22d4fab Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 14:14:18 +0000 Subject: [PATCH 63/95] USB device drivers: Add hooks to to use common, external DMA buffer allocation implementation.. git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5142 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/buttons/Makefile | 2 +- apps/examples/can/can_main.c | 2 +- apps/examples/dhcpd/Makefile.host | 2 +- apps/examples/ftpc/Makefile | 2 +- apps/examples/ftpc/ftpc.h | 2 +- apps/examples/ftpc/ftpc_cmds.c | 2 +- apps/examples/helloxx/Makefile | 2 +- apps/examples/hidkbd/Makefile | 2 +- apps/examples/hidkbd/hidkbd_main.c | 2 +- apps/examples/igmp/Makefile | 2 +- apps/examples/igmp/igmp.h | 2 +- apps/examples/lcdrw/Makefile | 2 +- apps/examples/lcdrw/lcdrw_main.c | 2 +- apps/examples/mm/Makefile | 2 +- apps/examples/mm/mm_main.c | 2 +- apps/examples/mount/Makefile | 2 +- apps/examples/mount/mount.h | 2 +- apps/examples/mount/mount_main.c | 2 +- apps/examples/mount/ramdisk.c | 2 +- apps/examples/nettest/nettest.h | 2 +- apps/examples/nsh/Makefile | 2 +- apps/examples/null/Makefile | 2 +- apps/examples/null/null_main.c | 2 +- apps/examples/nx/Makefile | 2 +- apps/examples/nx/nx_events.c | 2 +- apps/examples/nx/nx_internal.h | 2 +- apps/examples/nx/nx_kbdin.c | 2 +- apps/examples/nx/nx_main.c | 2 +- apps/examples/nx/nx_server.c | 2 +- apps/examples/nxconsole/Makefile | 2 +- apps/examples/nxffs/Makefile | 2 +- apps/examples/nxflat/Makefile | 2 +- apps/examples/nxflat/nxflat_main.c | 2 +- apps/examples/nxflat/tests/Makefile | 2 +- apps/examples/nxflat/tests/errno/Makefile | 2 +- apps/examples/nxflat/tests/errno/errno.c | 2 +- apps/examples/nxflat/tests/hello++/Makefile | 2 +- .../nxflat/tests/hello++/hello++1.cpp | 2 +- .../nxflat/tests/hello++/hello++2.cpp | 2 +- .../nxflat/tests/hello++/hello++3.cpp | 2 +- .../nxflat/tests/hello++/hello++4.cpp | 2 +- apps/examples/nxflat/tests/hello/Makefile | 2 +- apps/examples/nxflat/tests/hello/hello.c | 2 +- apps/examples/nxflat/tests/longjmp/Makefile | 2 +- apps/examples/nxflat/tests/longjmp/longjmp.c | 2 +- apps/examples/nxflat/tests/mutex/Makefile | 2 +- apps/examples/nxflat/tests/mutex/mutex.c | 2 +- apps/examples/nxflat/tests/pthread/Makefile | 2 +- apps/examples/nxflat/tests/pthread/pthread.c | 2 +- apps/examples/nxflat/tests/signal/Makefile | 2 +- apps/examples/nxflat/tests/signal/signal.c | 2 +- apps/examples/nxflat/tests/struct/Makefile | 2 +- apps/examples/nxflat/tests/struct/struct.h | 2 +- .../nxflat/tests/struct/struct_dummy.c | 2 +- .../nxflat/tests/struct/struct_main.c | 2 +- apps/examples/nxflat/tests/task/Makefile | 2 +- apps/examples/nxflat/tests/task/task.c | 2 +- apps/examples/nxhello/Makefile | 2 +- apps/examples/nxhello/nxhello.h | 2 +- apps/examples/nxhello/nxhello_bkgd.c | 2 +- apps/examples/nxhello/nxhello_main.c | 2 +- apps/examples/nximage/Makefile | 2 +- apps/examples/nximage/nximage.h | 2 +- apps/examples/nximage/nximage_bkgd.c | 2 +- apps/examples/nximage/nximage_main.c | 2 +- apps/examples/nxlines/Makefile | 2 +- apps/examples/nxtext/Makefile | 2 +- apps/examples/ostest/barrier.c | 2 +- apps/examples/ostest/cancel.c | 2 +- apps/examples/ostest/cond.c | 2 +- apps/examples/ostest/dev_null.c | 2 +- apps/examples/ostest/mutex.c | 2 +- apps/examples/ostest/posixtimer.c | 2 +- apps/examples/ostest/prioinherit.c | 2 +- apps/examples/ostest/rmutex.c | 2 +- apps/examples/ostest/roundrobin.c | 2 +- apps/examples/ostest/sem.c | 2 +- apps/examples/ostest/sighand.c | 2 +- apps/examples/ostest/timedmqueue.c | 2 +- apps/examples/ostest/timedwait.c | 2 +- apps/examples/pashello/Makefile | 2 +- apps/examples/pashello/mkhello.sh | 2 +- apps/examples/pashello/pashello.c | 2 +- apps/examples/pashello/pashello.h | 2 +- apps/examples/pipe/Makefile | 2 +- apps/examples/pipe/interlock_test.c | 2 +- apps/examples/pipe/pipe.h | 2 +- apps/examples/pipe/pipe_main.c | 2 +- apps/examples/pipe/redirect_test.c | 2 +- apps/examples/pipe/transfer_test.c | 2 +- apps/examples/poll/Makefile | 2 +- apps/examples/poll/Makefile.host | 2 +- apps/examples/poll/poll_internal.h | 2 +- apps/examples/poll/poll_listener.c | 2 +- apps/examples/poll/poll_main.c | 2 +- apps/examples/poll/select_listener.c | 2 +- apps/examples/rgmp/Makefile | 2 +- apps/examples/rgmp/rgmp_main.c | 2 +- apps/examples/romfs/Makefile | 2 +- apps/examples/romfs/romfs_main.c | 2 +- apps/examples/sendmail/Makefile | 2 +- apps/examples/sendmail/Makefile.host | 2 +- apps/examples/sendmail/host.c | 2 +- apps/examples/sendmail/hostdefs.h | 138 +++++++++--------- apps/examples/serloop/Makefile | 2 +- apps/examples/serloop/serloop_main.c | 2 +- apps/examples/telnetd/Makefile | 2 +- apps/examples/thttpd/Makefile | 2 +- apps/examples/thttpd/content/Makefile | 2 +- apps/examples/thttpd/content/hello/Makefile | 2 +- apps/examples/thttpd/content/hello/hello.c | 2 +- apps/examples/thttpd/content/netstat/Makefile | 2 +- .../examples/thttpd/content/netstat/netstat.c | 2 +- apps/examples/thttpd/content/tasks/Makefile | 2 +- apps/examples/thttpd/content/tasks/tasks.c | 2 +- apps/examples/tiff/Makefile | 2 +- apps/examples/tiff/tiff_main.c | 2 +- apps/examples/touchscreen/Makefile | 2 +- apps/examples/touchscreen/tc.h | 2 +- apps/examples/touchscreen/tc_main.c | 2 +- apps/examples/udp/Makefile | 2 +- apps/examples/udp/host.c | 2 +- apps/examples/udp/target.c | 2 +- apps/examples/udp/udp-client.c | 2 +- apps/examples/udp/udp-internal.h | 2 +- apps/examples/usbserial/Makefile | 2 +- apps/examples/usbserial/Makefile.host | 2 +- apps/examples/usbserial/host.c | 2 +- apps/examples/wget/Makefile | 2 +- apps/examples/wget/Makefile.host | 2 +- apps/examples/wget/host.c | 2 +- apps/examples/wget/hostdefs.h | 138 +++++++++--------- apps/examples/wlan/Makefile | 2 +- nuttx/ChangeLog | 3 + nuttx/arch/arm/src/dm320/dm320_usbdev.c | 20 ++- nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c | 40 ++++- nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c | 38 ++++- nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c | 20 ++- nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c | 20 ++- nuttx/arch/arm/src/stm32/stm32_otgfsdev.c | 20 ++- nuttx/arch/avr/src/at90usb/at90usb_usbdev.c | 21 ++- nuttx/drivers/usbdev/Kconfig | 129 ++++++++++------ nuttx/include/nuttx/fs/fat.h | 10 +- nuttx/include/nuttx/usb/usbdev.h | 35 ++++- 144 files changed, 538 insertions(+), 356 deletions(-) diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile index a9d7bf5835..25d1ef2c2d 100644 --- a/apps/examples/buttons/Makefile +++ b/apps/examples/buttons/Makefile @@ -2,7 +2,7 @@ # apps/examples/buttons/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/can/can_main.c b/apps/examples/can/can_main.c index d3ca241192..482d3f4383 100644 --- a/apps/examples/can/can_main.c +++ b/apps/examples/can/can_main.c @@ -2,7 +2,7 @@ * examples/can/can_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/dhcpd/Makefile.host b/apps/examples/dhcpd/Makefile.host index 19af5f42fb..9c074f42b0 100644 --- a/apps/examples/dhcpd/Makefile.host +++ b/apps/examples/dhcpd/Makefile.host @@ -2,7 +2,7 @@ # apps/examples/dhcpd/Makefile.host # # Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile index ff2ec543b9..cf32be0f0d 100644 --- a/apps/examples/ftpc/Makefile +++ b/apps/examples/ftpc/Makefile @@ -2,7 +2,7 @@ # apps/examples/ftpc/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/ftpc/ftpc.h b/apps/examples/ftpc/ftpc.h index b6fe35aed1..429976ad03 100644 --- a/apps/examples/ftpc/ftpc.h +++ b/apps/examples/ftpc/ftpc.h @@ -2,7 +2,7 @@ * apps/examples/ftpc/ftpc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ftpc/ftpc_cmds.c b/apps/examples/ftpc/ftpc_cmds.c index f95f643cbd..df05f45d2d 100644 --- a/apps/examples/ftpc/ftpc_cmds.c +++ b/apps/examples/ftpc/ftpc_cmds.c @@ -2,7 +2,7 @@ * examples/ftpc/ftpc_cmds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile index c9557d124b..8e85eab23e 100644 --- a/apps/examples/helloxx/Makefile +++ b/apps/examples/helloxx/Makefile @@ -2,7 +2,7 @@ # apps/examples/helloxx/Makefile # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/hidkbd/Makefile b/apps/examples/hidkbd/Makefile index e32e628c7d..8dccb0475e 100644 --- a/apps/examples/hidkbd/Makefile +++ b/apps/examples/hidkbd/Makefile @@ -2,7 +2,7 @@ # apps/examples/hidkbd/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c index 51e927008b..e744a495c7 100644 --- a/apps/examples/hidkbd/hidkbd_main.c +++ b/apps/examples/hidkbd/hidkbd_main.c @@ -2,7 +2,7 @@ * examples/hidkbd/null_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/igmp/Makefile b/apps/examples/igmp/Makefile index 1e8e962239..1bab2c62ea 100755 --- a/apps/examples/igmp/Makefile +++ b/apps/examples/igmp/Makefile @@ -2,7 +2,7 @@ # apps/examples/igmp/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/igmp/igmp.h b/apps/examples/igmp/igmp.h index e241467c6f..093f58c1f0 100644 --- a/apps/examples/igmp/igmp.h +++ b/apps/examples/igmp/igmp.h @@ -2,7 +2,7 @@ * examples/igmp/igmp.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile index 053c626703..cc23d3fe1c 100644 --- a/apps/examples/lcdrw/Makefile +++ b/apps/examples/lcdrw/Makefile @@ -2,7 +2,7 @@ # apps/examples/lcdrw/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/lcdrw/lcdrw_main.c b/apps/examples/lcdrw/lcdrw_main.c index f39e1849da..0852502f39 100644 --- a/apps/examples/lcdrw/lcdrw_main.c +++ b/apps/examples/lcdrw/lcdrw_main.c @@ -2,7 +2,7 @@ * examples/lcdrw/lcdrw_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile index e5d9ffb4cf..24ed4926f7 100644 --- a/apps/examples/mm/Makefile +++ b/apps/examples/mm/Makefile @@ -2,7 +2,7 @@ # apps/examples/mm/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/mm/mm_main.c b/apps/examples/mm/mm_main.c index 5d45efdc59..149550418c 100644 --- a/apps/examples/mm/mm_main.c +++ b/apps/examples/mm/mm_main.c @@ -2,7 +2,7 @@ * examples/mm/mm_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile index 7e48ea44a9..69cf970cf0 100644 --- a/apps/examples/mount/Makefile +++ b/apps/examples/mount/Makefile @@ -2,7 +2,7 @@ # apps/Makefile # # Copyright (C) 2007-2008, 2010-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/mount/mount.h b/apps/examples/mount/mount.h index 68a03674da..c756860860 100644 --- a/apps/examples/mount/mount.h +++ b/apps/examples/mount/mount.h @@ -2,7 +2,7 @@ * examples/mount/mount.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/mount/mount_main.c b/apps/examples/mount/mount_main.c index 5f881e40ca..e0eb8a6150 100644 --- a/apps/examples/mount/mount_main.c +++ b/apps/examples/mount/mount_main.c @@ -2,7 +2,7 @@ * examples/mount/mount_main.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/mount/ramdisk.c b/apps/examples/mount/ramdisk.c index 9688580c06..83ef74e423 100644 --- a/apps/examples/mount/ramdisk.c +++ b/apps/examples/mount/ramdisk.c @@ -2,7 +2,7 @@ * examples/mount/ramdisk.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nettest/nettest.h b/apps/examples/nettest/nettest.h index b5b6191758..be33215cf3 100644 --- a/apps/examples/nettest/nettest.h +++ b/apps/examples/nettest/nettest.h @@ -2,7 +2,7 @@ * examples/nettest/nettest.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile index b5844f9edc..bad40fb2e2 100644 --- a/apps/examples/nsh/Makefile +++ b/apps/examples/nsh/Makefile @@ -2,7 +2,7 @@ # apps/examples/nsh/Makefile # # Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile index 3938eb1711..6341206007 100644 --- a/apps/examples/null/Makefile +++ b/apps/examples/null/Makefile @@ -2,7 +2,7 @@ # examples/null/Makefile # # Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/null/null_main.c b/apps/examples/null/null_main.c index 63a14fcaca..c4624bd1d5 100644 --- a/apps/examples/null/null_main.c +++ b/apps/examples/null/null_main.c @@ -2,7 +2,7 @@ * examples/null/null_main.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile index bdeb57e22e..748d67210b 100644 --- a/apps/examples/nx/Makefile +++ b/apps/examples/nx/Makefile @@ -2,7 +2,7 @@ # apps/examples/nx/Makefile # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/nx_events.c b/apps/examples/nx/nx_events.c index 29fe5fb8a9..329e5c5336 100644 --- a/apps/examples/nx/nx_events.c +++ b/apps/examples/nx/nx_events.c @@ -2,7 +2,7 @@ * examples/nx/nx_events.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/nx_internal.h b/apps/examples/nx/nx_internal.h index a0fae77a97..d9a6a2ade5 100644 --- a/apps/examples/nx/nx_internal.h +++ b/apps/examples/nx/nx_internal.h @@ -2,7 +2,7 @@ * examples/nx/nx_internal.h * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/nx_kbdin.c b/apps/examples/nx/nx_kbdin.c index ebb1ef7917..df4a0faa16 100644 --- a/apps/examples/nx/nx_kbdin.c +++ b/apps/examples/nx/nx_kbdin.c @@ -2,7 +2,7 @@ * examples/nx/nx_kbdin.c * * Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/nx_main.c b/apps/examples/nx/nx_main.c index bcc4a9bbff..04fc10e28f 100644 --- a/apps/examples/nx/nx_main.c +++ b/apps/examples/nx/nx_main.c @@ -2,7 +2,7 @@ * examples/nx/nx_main.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nx/nx_server.c b/apps/examples/nx/nx_server.c index a7a305d634..7f3ee5dfcd 100644 --- a/apps/examples/nx/nx_server.c +++ b/apps/examples/nx/nx_server.c @@ -2,7 +2,7 @@ * examples/nx/nx_server.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxconsole/Makefile b/apps/examples/nxconsole/Makefile index cfd7329a5d..78a96a25d0 100644 --- a/apps/examples/nxconsole/Makefile +++ b/apps/examples/nxconsole/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxconsole/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxffs/Makefile b/apps/examples/nxffs/Makefile index 1021bfc6d1..b3d36e1634 100644 --- a/apps/examples/nxffs/Makefile +++ b/apps/examples/nxffs/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxffs/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/Makefile b/apps/examples/nxflat/Makefile index d2b99eb133..a49177a332 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxflat/Makefile # # Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/nxflat_main.c b/apps/examples/nxflat/nxflat_main.c index 68c2979da6..4cd2cd5375 100644 --- a/apps/examples/nxflat/nxflat_main.c +++ b/apps/examples/nxflat/nxflat_main.c @@ -2,7 +2,7 @@ * examples/nxflat/nxflat_main.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/Makefile b/apps/examples/nxflat/tests/Makefile index b5ecc041a6..36bb0e88eb 100644 --- a/apps/examples/nxflat/tests/Makefile +++ b/apps/examples/nxflat/tests/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxflat/tests/Makefile # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/errno/Makefile b/apps/examples/nxflat/tests/errno/Makefile index 158768b852..df3ea1e3eb 100644 --- a/apps/examples/nxflat/tests/errno/Makefile +++ b/apps/examples/nxflat/tests/errno/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/hello/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/errno/errno.c b/apps/examples/nxflat/tests/errno/errno.c index b066791650..08a15808a3 100644 --- a/apps/examples/nxflat/tests/errno/errno.c +++ b/apps/examples/nxflat/tests/errno/errno.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/errno/errno.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello++/Makefile b/apps/examples/nxflat/tests/hello++/Makefile index 113520da5d..3433145dc3 100644 --- a/apps/examples/nxflat/tests/hello++/Makefile +++ b/apps/examples/nxflat/tests/hello++/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/hello/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello++/hello++1.cpp b/apps/examples/nxflat/tests/hello++/hello++1.cpp index 779f3307a7..850c2fd4d1 100644 --- a/apps/examples/nxflat/tests/hello++/hello++1.cpp +++ b/apps/examples/nxflat/tests/hello++/hello++1.cpp @@ -2,7 +2,7 @@ // examples/nxflat/tests/hello++/hello++1.c // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello++/hello++2.cpp b/apps/examples/nxflat/tests/hello++/hello++2.cpp index 87166f3ab2..3a1798a705 100644 --- a/apps/examples/nxflat/tests/hello++/hello++2.cpp +++ b/apps/examples/nxflat/tests/hello++/hello++2.cpp @@ -2,7 +2,7 @@ // examples/nxflat/tests/hello++/hello++2.c // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello++/hello++3.cpp b/apps/examples/nxflat/tests/hello++/hello++3.cpp index ed7302fa65..b115010cf7 100644 --- a/apps/examples/nxflat/tests/hello++/hello++3.cpp +++ b/apps/examples/nxflat/tests/hello++/hello++3.cpp @@ -2,7 +2,7 @@ // examples/nxflat/tests/hello++/hello++3.c // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello++/hello++4.cpp b/apps/examples/nxflat/tests/hello++/hello++4.cpp index 97d0260937..ac718386b7 100644 --- a/apps/examples/nxflat/tests/hello++/hello++4.cpp +++ b/apps/examples/nxflat/tests/hello++/hello++4.cpp @@ -2,7 +2,7 @@ // examples/nxflat/tests/hello++/hello++4.c // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello/Makefile b/apps/examples/nxflat/tests/hello/Makefile index ccde7a98f2..e7e66c628c 100644 --- a/apps/examples/nxflat/tests/hello/Makefile +++ b/apps/examples/nxflat/tests/hello/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/hello/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/hello/hello.c b/apps/examples/nxflat/tests/hello/hello.c index 028bdfe007..8ec4e019a5 100644 --- a/apps/examples/nxflat/tests/hello/hello.c +++ b/apps/examples/nxflat/tests/hello/hello.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/hello/hello.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/longjmp/Makefile b/apps/examples/nxflat/tests/longjmp/Makefile index d0c93ebbda..47a1c4905c 100644 --- a/apps/examples/nxflat/tests/longjmp/Makefile +++ b/apps/examples/nxflat/tests/longjmp/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/longjmp/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/longjmp/longjmp.c b/apps/examples/nxflat/tests/longjmp/longjmp.c index b5b317d996..85571261c7 100644 --- a/apps/examples/nxflat/tests/longjmp/longjmp.c +++ b/apps/examples/nxflat/tests/longjmp/longjmp.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/longjmp/longjmp.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/mutex/Makefile b/apps/examples/nxflat/tests/mutex/Makefile index 8c9fbb4a31..fe66848568 100644 --- a/apps/examples/nxflat/tests/mutex/Makefile +++ b/apps/examples/nxflat/tests/mutex/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/mutex/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/mutex/mutex.c b/apps/examples/nxflat/tests/mutex/mutex.c index 78a63306db..9a2d5f1201 100644 --- a/apps/examples/nxflat/tests/mutex/mutex.c +++ b/apps/examples/nxflat/tests/mutex/mutex.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/mutex/mutex.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/pthread/Makefile b/apps/examples/nxflat/tests/pthread/Makefile index 27da42e7cd..f645441ade 100644 --- a/apps/examples/nxflat/tests/pthread/Makefile +++ b/apps/examples/nxflat/tests/pthread/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/pthread/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/pthread/pthread.c b/apps/examples/nxflat/tests/pthread/pthread.c index 019ec453e1..f6e89e2296 100644 --- a/apps/examples/nxflat/tests/pthread/pthread.c +++ b/apps/examples/nxflat/tests/pthread/pthread.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/pthread/pthread.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/signal/Makefile b/apps/examples/nxflat/tests/signal/Makefile index d967fbf09a..222c57dbe4 100644 --- a/apps/examples/nxflat/tests/signal/Makefile +++ b/apps/examples/nxflat/tests/signal/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/signal/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/signal/signal.c b/apps/examples/nxflat/tests/signal/signal.c index ff1c58305e..95415fc871 100644 --- a/apps/examples/nxflat/tests/signal/signal.c +++ b/apps/examples/nxflat/tests/signal/signal.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/signal/signal.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/struct/Makefile b/apps/examples/nxflat/tests/struct/Makefile index 7a5f3fb821..69f9dd2f3e 100644 --- a/apps/examples/nxflat/tests/struct/Makefile +++ b/apps/examples/nxflat/tests/struct/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/hello/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/struct/struct.h b/apps/examples/nxflat/tests/struct/struct.h index 0b1747d8c3..bb31d8f717 100644 --- a/apps/examples/nxflat/tests/struct/struct.h +++ b/apps/examples/nxflat/tests/struct/struct.h @@ -2,7 +2,7 @@ * examples/nxflat/tests/struct/struct.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/struct/struct_dummy.c b/apps/examples/nxflat/tests/struct/struct_dummy.c index 7f0be6a1f2..80364b46b6 100644 --- a/apps/examples/nxflat/tests/struct/struct_dummy.c +++ b/apps/examples/nxflat/tests/struct/struct_dummy.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/struct/struct_dummy.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/struct/struct_main.c b/apps/examples/nxflat/tests/struct/struct_main.c index d82cdd7069..2d8b51a2cb 100644 --- a/apps/examples/nxflat/tests/struct/struct_main.c +++ b/apps/examples/nxflat/tests/struct/struct_main.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/struct/struct_main.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/task/Makefile b/apps/examples/nxflat/tests/task/Makefile index 0881d4717a..8b17ec822e 100644 --- a/apps/examples/nxflat/tests/task/Makefile +++ b/apps/examples/nxflat/tests/task/Makefile @@ -2,7 +2,7 @@ # examples/nxflat/tests/task/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxflat/tests/task/task.c b/apps/examples/nxflat/tests/task/task.c index 63e8188ed5..192aa49b38 100644 --- a/apps/examples/nxflat/tests/task/task.c +++ b/apps/examples/nxflat/tests/task/task.c @@ -2,7 +2,7 @@ * examples/nxflat/tests/task/parent.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxhello/Makefile b/apps/examples/nxhello/Makefile index 84fb417756..16e80e15e0 100644 --- a/apps/examples/nxhello/Makefile +++ b/apps/examples/nxhello/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxhello/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxhello/nxhello.h b/apps/examples/nxhello/nxhello.h index b4bff6c430..2dce7bf6ce 100644 --- a/apps/examples/nxhello/nxhello.h +++ b/apps/examples/nxhello/nxhello.h @@ -2,7 +2,7 @@ * examples/nxhello/nxhello.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxhello/nxhello_bkgd.c b/apps/examples/nxhello/nxhello_bkgd.c index 5c3ba68ae9..ad1b99d24b 100644 --- a/apps/examples/nxhello/nxhello_bkgd.c +++ b/apps/examples/nxhello/nxhello_bkgd.c @@ -2,7 +2,7 @@ * examples/nxhello/nxhello_bkgd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxhello/nxhello_main.c b/apps/examples/nxhello/nxhello_main.c index 02344a45e2..6ee6c69b29 100644 --- a/apps/examples/nxhello/nxhello_main.c +++ b/apps/examples/nxhello/nxhello_main.c @@ -2,7 +2,7 @@ * examples/nxhello/nxhello_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile index 4e0822687c..a59f05a798 100755 --- a/apps/examples/nximage/Makefile +++ b/apps/examples/nximage/Makefile @@ -2,7 +2,7 @@ # apps/examples/nximage/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nximage/nximage.h b/apps/examples/nximage/nximage.h index a614ddc65a..eac0f5dc20 100644 --- a/apps/examples/nximage/nximage.h +++ b/apps/examples/nximage/nximage.h @@ -2,7 +2,7 @@ * examples/nximage/nximage.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nximage/nximage_bkgd.c b/apps/examples/nximage/nximage_bkgd.c index 9199b573d2..4a028f720b 100644 --- a/apps/examples/nximage/nximage_bkgd.c +++ b/apps/examples/nximage/nximage_bkgd.c @@ -2,7 +2,7 @@ * examples/nximage/nximage_bkgd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nximage/nximage_main.c b/apps/examples/nximage/nximage_main.c index 5b0249605a..729fcc53f4 100644 --- a/apps/examples/nximage/nximage_main.c +++ b/apps/examples/nximage/nximage_main.c @@ -2,7 +2,7 @@ * examples/nximage/nximage_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/nxlines/Makefile b/apps/examples/nxlines/Makefile index 0c865c42d0..d6ddcf0b18 100644 --- a/apps/examples/nxlines/Makefile +++ b/apps/examples/nxlines/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxlines/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile index 75e4899438..8a9f349f44 100644 --- a/apps/examples/nxtext/Makefile +++ b/apps/examples/nxtext/Makefile @@ -2,7 +2,7 @@ # apps/examples/nxtext/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/barrier.c b/apps/examples/ostest/barrier.c index da1301dc3c..e66496f7b8 100644 --- a/apps/examples/ostest/barrier.c +++ b/apps/examples/ostest/barrier.c @@ -2,7 +2,7 @@ * examples/ostest/barrier.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/cancel.c b/apps/examples/ostest/cancel.c index bf2d03615f..11981d8194 100644 --- a/apps/examples/ostest/cancel.c +++ b/apps/examples/ostest/cancel.c @@ -2,7 +2,7 @@ * examples/ostest/cancel.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/cond.c b/apps/examples/ostest/cond.c index 11191b7d52..96468c3e4e 100644 --- a/apps/examples/ostest/cond.c +++ b/apps/examples/ostest/cond.c @@ -2,7 +2,7 @@ * cond.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/dev_null.c b/apps/examples/ostest/dev_null.c index e8fc6cf3f9..34508d05e6 100644 --- a/apps/examples/ostest/dev_null.c +++ b/apps/examples/ostest/dev_null.c @@ -2,7 +2,7 @@ * examples/ostest/dev_null.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/mutex.c b/apps/examples/ostest/mutex.c index 752f833f25..0b7f70daa1 100644 --- a/apps/examples/ostest/mutex.c +++ b/apps/examples/ostest/mutex.c @@ -2,7 +2,7 @@ * mutex.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/posixtimer.c b/apps/examples/ostest/posixtimer.c index 3560c712be..ebb1ab79e1 100644 --- a/apps/examples/ostest/posixtimer.c +++ b/apps/examples/ostest/posixtimer.c @@ -2,7 +2,7 @@ * examples/ostest/posixtimer.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/prioinherit.c b/apps/examples/ostest/prioinherit.c index eea5a818ff..cd04df7e60 100644 --- a/apps/examples/ostest/prioinherit.c +++ b/apps/examples/ostest/prioinherit.c @@ -2,7 +2,7 @@ * examples/ostest/prioinherit.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/rmutex.c b/apps/examples/ostest/rmutex.c index 44eb4bb3b5..ffd99c2dfc 100644 --- a/apps/examples/ostest/rmutex.c +++ b/apps/examples/ostest/rmutex.c @@ -2,7 +2,7 @@ * rmutex.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/roundrobin.c b/apps/examples/ostest/roundrobin.c index 061d51f3da..5167a857ed 100644 --- a/apps/examples/ostest/roundrobin.c +++ b/apps/examples/ostest/roundrobin.c @@ -2,7 +2,7 @@ * examples/ostest/roundrobin.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/sem.c b/apps/examples/ostest/sem.c index 850cf8040b..48be57a855 100644 --- a/apps/examples/ostest/sem.c +++ b/apps/examples/ostest/sem.c @@ -2,7 +2,7 @@ * sem.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/sighand.c b/apps/examples/ostest/sighand.c index 6815316395..eabfe56464 100644 --- a/apps/examples/ostest/sighand.c +++ b/apps/examples/ostest/sighand.c @@ -2,7 +2,7 @@ * apps/examples/ostest/sighand.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/timedmqueue.c b/apps/examples/ostest/timedmqueue.c index 807d8537bf..6c3269e844 100644 --- a/apps/examples/ostest/timedmqueue.c +++ b/apps/examples/ostest/timedmqueue.c @@ -2,7 +2,7 @@ * apps/examples/ostest/mqueue.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/ostest/timedwait.c b/apps/examples/ostest/timedwait.c index fc381ddda4..7cf875fb67 100644 --- a/apps/examples/ostest/timedwait.c +++ b/apps/examples/ostest/timedwait.c @@ -2,7 +2,7 @@ * examples/ostest/timedwait.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pashello/Makefile b/apps/examples/pashello/Makefile index 44830eee21..f090a68eaf 100644 --- a/apps/examples/pashello/Makefile +++ b/apps/examples/pashello/Makefile @@ -2,7 +2,7 @@ # apps/examples/pashello/Makefile # # Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/pashello/mkhello.sh b/apps/examples/pashello/mkhello.sh index 716a7e96df..e8f1964987 100755 --- a/apps/examples/pashello/mkhello.sh +++ b/apps/examples/pashello/mkhello.sh @@ -3,7 +3,7 @@ # examples/pashello/mkhello.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/pashello/pashello.c b/apps/examples/pashello/pashello.c index 5e2fe8bf33..b8c19b6a43 100644 --- a/apps/examples/pashello/pashello.c +++ b/apps/examples/pashello/pashello.c @@ -2,7 +2,7 @@ * examples/pashello/pashello.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pashello/pashello.h b/apps/examples/pashello/pashello.h index ad206261e2..ac5f99fbee 100644 --- a/apps/examples/pashello/pashello.h +++ b/apps/examples/pashello/pashello.h @@ -2,7 +2,7 @@ * examples/pashello/pashello.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile index 3bcc9b5f78..956c911b34 100644 --- a/apps/examples/pipe/Makefile +++ b/apps/examples/pipe/Makefile @@ -2,7 +2,7 @@ # apps/examples/pipe/Makefile # # Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/interlock_test.c b/apps/examples/pipe/interlock_test.c index e049a65f60..20d4113eb5 100644 --- a/apps/examples/pipe/interlock_test.c +++ b/apps/examples/pipe/interlock_test.c @@ -2,7 +2,7 @@ * examples/pipe/interlock_test.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/pipe.h b/apps/examples/pipe/pipe.h index 2c18fd868b..38143e4920 100644 --- a/apps/examples/pipe/pipe.h +++ b/apps/examples/pipe/pipe.h @@ -2,7 +2,7 @@ * examples/pipe/pipe.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/pipe_main.c b/apps/examples/pipe/pipe_main.c index 406832a98a..63a4f283fb 100644 --- a/apps/examples/pipe/pipe_main.c +++ b/apps/examples/pipe/pipe_main.c @@ -2,7 +2,7 @@ * examples/pipe/pipe_main.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/redirect_test.c b/apps/examples/pipe/redirect_test.c index db7c0b99a3..26fe9bcaa2 100644 --- a/apps/examples/pipe/redirect_test.c +++ b/apps/examples/pipe/redirect_test.c @@ -2,7 +2,7 @@ * examples/pipe/redirect_test.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/pipe/transfer_test.c b/apps/examples/pipe/transfer_test.c index cb8cad04a4..f7c612881a 100644 --- a/apps/examples/pipe/transfer_test.c +++ b/apps/examples/pipe/transfer_test.c @@ -2,7 +2,7 @@ * examples/pipe/transfer_test.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile index 1c85d6f36d..aef61d199c 100644 --- a/apps/examples/poll/Makefile +++ b/apps/examples/poll/Makefile @@ -2,7 +2,7 @@ # apps/examples/poll/Makefile # # Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/Makefile.host b/apps/examples/poll/Makefile.host index 9d9daee27b..1e6a72089e 100644 --- a/apps/examples/poll/Makefile.host +++ b/apps/examples/poll/Makefile.host @@ -2,7 +2,7 @@ # apps/examples/poll/Makefile.host # # Copyright (C) 2008, 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/poll_internal.h b/apps/examples/poll/poll_internal.h index cbf42ac566..b2400932ed 100644 --- a/apps/examples/poll/poll_internal.h +++ b/apps/examples/poll/poll_internal.h @@ -2,7 +2,7 @@ * examples/poll/poll_internal.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/poll_listener.c b/apps/examples/poll/poll_listener.c index 816647e340..fe1c95089b 100644 --- a/apps/examples/poll/poll_listener.c +++ b/apps/examples/poll/poll_listener.c @@ -2,7 +2,7 @@ * examples/poll/poll_listener.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/poll_main.c b/apps/examples/poll/poll_main.c index 9c3a096cba..0c475fa7aa 100644 --- a/apps/examples/poll/poll_main.c +++ b/apps/examples/poll/poll_main.c @@ -2,7 +2,7 @@ * examples/poll/poll_main.c * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c index 80039ada34..5cb7e78056 100644 --- a/apps/examples/poll/select_listener.c +++ b/apps/examples/poll/select_listener.c @@ -2,7 +2,7 @@ * examples/poll/select_listener.c * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/rgmp/Makefile b/apps/examples/rgmp/Makefile index 60fbf7c682..3590bb0f08 100644 --- a/apps/examples/rgmp/Makefile +++ b/apps/examples/rgmp/Makefile @@ -2,7 +2,7 @@ # examples/rgmp/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/rgmp/rgmp_main.c b/apps/examples/rgmp/rgmp_main.c index 3ef70edc8c..e026852b87 100644 --- a/apps/examples/rgmp/rgmp_main.c +++ b/apps/examples/rgmp/rgmp_main.c @@ -2,7 +2,7 @@ * examples/rgmp/rgmp_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile index 1db45765a7..ba930b77d0 100644 --- a/apps/examples/romfs/Makefile +++ b/apps/examples/romfs/Makefile @@ -2,7 +2,7 @@ # apps/examples/romfs/Makefile # # Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/romfs/romfs_main.c b/apps/examples/romfs/romfs_main.c index 4870ff4f81..3437cb8ace 100644 --- a/apps/examples/romfs/romfs_main.c +++ b/apps/examples/romfs/romfs_main.c @@ -2,7 +2,7 @@ * examples/romfs/romfs_main.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/sendmail/Makefile b/apps/examples/sendmail/Makefile index 2c8883c280..6ee29d935e 100644 --- a/apps/examples/sendmail/Makefile +++ b/apps/examples/sendmail/Makefile @@ -2,7 +2,7 @@ # apps/examples/sendmail/Makefile # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/sendmail/Makefile.host b/apps/examples/sendmail/Makefile.host index 3b99432e3e..bef7eebbfc 100644 --- a/apps/examples/sendmail/Makefile.host +++ b/apps/examples/sendmail/Makefile.host @@ -2,7 +2,7 @@ # apps/examples/sendmail/Makefile.host # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/sendmail/host.c b/apps/examples/sendmail/host.c index 67a541b0c0..a175d2e9a3 100644 --- a/apps/examples/sendmail/host.c +++ b/apps/examples/sendmail/host.c @@ -2,7 +2,7 @@ * examples/sendmail/host.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/sendmail/hostdefs.h b/apps/examples/sendmail/hostdefs.h index da072d560a..e9860c22d5 100644 --- a/apps/examples/sendmail/hostdefs.h +++ b/apps/examples/sendmail/hostdefs.h @@ -1,69 +1,69 @@ -/**************************************************************************** - * examples/wget/hostdefs.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -#ifndef __HOSTDEFS_H -#define __HOSTDEFS_H - -/**************************************************************************** - * Included Files - *****************************************************************************/ - -#include -#include -#include - -/**************************************************************************** - * Preprocessor Defintiions - *****************************************************************************/ - -#define HTONS(a) htons(a) -#define HTONL(a) htonl(a) -#define CONFIG_CPP_HAVE_WARNING 1 -#define CONFIG_HAVE_GETHOSTBYNAME 1 -#define FAR - -#define ndbg(...) printf(__VA_ARGS__) -#define nvdbg(...) printf(__VA_ARGS__) - -#define ERROR (-1) -#define OK (0) - -/**************************************************************************** - * Type Definitions - *****************************************************************************/ - -typedef void *(*pthread_startroutine_t)(void *); - -#endif /* __HOSTDEFS_H */ +/**************************************************************************** + * examples/wget/hostdefs.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#ifndef __HOSTDEFS_H +#define __HOSTDEFS_H + +/**************************************************************************** + * Included Files + *****************************************************************************/ + +#include +#include +#include + +/**************************************************************************** + * Preprocessor Defintiions + *****************************************************************************/ + +#define HTONS(a) htons(a) +#define HTONL(a) htonl(a) +#define CONFIG_CPP_HAVE_WARNING 1 +#define CONFIG_HAVE_GETHOSTBYNAME 1 +#define FAR + +#define ndbg(...) printf(__VA_ARGS__) +#define nvdbg(...) printf(__VA_ARGS__) + +#define ERROR (-1) +#define OK (0) + +/**************************************************************************** + * Type Definitions + *****************************************************************************/ + +typedef void *(*pthread_startroutine_t)(void *); + +#endif /* __HOSTDEFS_H */ diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile index 7594779ce9..e1c415cdd8 100644 --- a/apps/examples/serloop/Makefile +++ b/apps/examples/serloop/Makefile @@ -2,7 +2,7 @@ # apps/examples/serloop/Makefile # # Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/serloop/serloop_main.c b/apps/examples/serloop/serloop_main.c index 6fba577a4c..af171fef3f 100644 --- a/apps/examples/serloop/serloop_main.c +++ b/apps/examples/serloop/serloop_main.c @@ -2,7 +2,7 @@ * examples/serloop/serloop_main.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/telnetd/Makefile b/apps/examples/telnetd/Makefile index b4ed50c33e..fe892670e1 100644 --- a/apps/examples/telnetd/Makefile +++ b/apps/examples/telnetd/Makefile @@ -2,7 +2,7 @@ # apps/examples/telnetd/Makefile # # Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/Makefile b/apps/examples/thttpd/Makefile index 606e717dc4..897f15b334 100644 --- a/apps/examples/thttpd/Makefile +++ b/apps/examples/thttpd/Makefile @@ -2,7 +2,7 @@ # apps/examples/thttpd/Makefile # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/Makefile b/apps/examples/thttpd/content/Makefile index 8c213a9d5c..1f5ce42469 100644 --- a/apps/examples/thttpd/content/Makefile +++ b/apps/examples/thttpd/content/Makefile @@ -2,7 +2,7 @@ # apps/examples/thttpd/content/Makefile # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/hello/Makefile b/apps/examples/thttpd/content/hello/Makefile index e980f1c341..76d4e67c89 100644 --- a/apps/examples/thttpd/content/hello/Makefile +++ b/apps/examples/thttpd/content/hello/Makefile @@ -2,7 +2,7 @@ # examples/thttpd/content/hello/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/hello/hello.c b/apps/examples/thttpd/content/hello/hello.c index 40f31a4548..386759fc2e 100644 --- a/apps/examples/thttpd/content/hello/hello.c +++ b/apps/examples/thttpd/content/hello/hello.c @@ -3,7 +3,7 @@ * Manatory "Hello, World!" Example * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/netstat/Makefile b/apps/examples/thttpd/content/netstat/Makefile index b12cbabc82..9769c92070 100644 --- a/apps/examples/thttpd/content/netstat/Makefile +++ b/apps/examples/thttpd/content/netstat/Makefile @@ -2,7 +2,7 @@ # examples/thttpd/content/netstat/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/netstat/netstat.c b/apps/examples/thttpd/content/netstat/netstat.c index 61590ab292..9aec0c81c5 100755 --- a/apps/examples/thttpd/content/netstat/netstat.c +++ b/apps/examples/thttpd/content/netstat/netstat.c @@ -2,7 +2,7 @@ * examples/thttpd/netstat/netstat.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/tasks/Makefile b/apps/examples/thttpd/content/tasks/Makefile index 2666e0b69f..b76c3f22a0 100755 --- a/apps/examples/thttpd/content/tasks/Makefile +++ b/apps/examples/thttpd/content/tasks/Makefile @@ -2,7 +2,7 @@ # examples/thttpd/content/tasks/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/thttpd/content/tasks/tasks.c b/apps/examples/thttpd/content/tasks/tasks.c index 7805690903..e2eedf781f 100755 --- a/apps/examples/thttpd/content/tasks/tasks.c +++ b/apps/examples/thttpd/content/tasks/tasks.c @@ -2,7 +2,7 @@ * examples/thttpd/tasks/tasks.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile index 045508d146..22611a400f 100644 --- a/apps/examples/tiff/Makefile +++ b/apps/examples/tiff/Makefile @@ -2,7 +2,7 @@ # apps/examples/tiff/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/tiff/tiff_main.c b/apps/examples/tiff/tiff_main.c index 1be2b09c5e..1bf931a436 100644 --- a/apps/examples/tiff/tiff_main.c +++ b/apps/examples/tiff/tiff_main.c @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/touchscreen/Makefile b/apps/examples/touchscreen/Makefile index e53a52cf95..bd32f9f607 100644 --- a/apps/examples/touchscreen/Makefile +++ b/apps/examples/touchscreen/Makefile @@ -2,7 +2,7 @@ # apps/examples/touchscreen/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/touchscreen/tc.h b/apps/examples/touchscreen/tc.h index f3e6ea6342..654b1d8744 100644 --- a/apps/examples/touchscreen/tc.h +++ b/apps/examples/touchscreen/tc.h @@ -2,7 +2,7 @@ * examples/touchscreen/tc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/touchscreen/tc_main.c b/apps/examples/touchscreen/tc_main.c index 76653bb8f7..79b6b65a3f 100644 --- a/apps/examples/touchscreen/tc_main.c +++ b/apps/examples/touchscreen/tc_main.c @@ -2,7 +2,7 @@ * examples/touchscreen/tc_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/udp/Makefile b/apps/examples/udp/Makefile index a9361ba6e9..337d323e88 100644 --- a/apps/examples/udp/Makefile +++ b/apps/examples/udp/Makefile @@ -2,7 +2,7 @@ # apps/examples/udp/Makefile # # Copyright (C) 2007-2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/udp/host.c b/apps/examples/udp/host.c index 34fd967655..9d2aa73d97 100644 --- a/apps/examples/udp/host.c +++ b/apps/examples/udp/host.c @@ -2,7 +2,7 @@ * examples/udp/host.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/udp/target.c b/apps/examples/udp/target.c index ac3dc6ce85..e43ff2a0be 100644 --- a/apps/examples/udp/target.c +++ b/apps/examples/udp/target.c @@ -2,7 +2,7 @@ * examples/udp/nettest.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/udp/udp-client.c b/apps/examples/udp/udp-client.c index 545a3a6c34..fb98ab3420 100644 --- a/apps/examples/udp/udp-client.c +++ b/apps/examples/udp/udp-client.c @@ -2,7 +2,7 @@ * examples/udp/udp-client.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/udp/udp-internal.h b/apps/examples/udp/udp-internal.h index 94fe1e4825..04a685d17a 100644 --- a/apps/examples/udp/udp-internal.h +++ b/apps/examples/udp/udp-internal.h @@ -2,7 +2,7 @@ * examples/udp/udp-internal.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/usbserial/Makefile b/apps/examples/usbserial/Makefile index cf790dbe9d..4b6bd89483 100644 --- a/apps/examples/usbserial/Makefile +++ b/apps/examples/usbserial/Makefile @@ -2,7 +2,7 @@ # apps/examples/usbserial/Makefile # # Copyright (C) 2008, 2010-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/usbserial/Makefile.host b/apps/examples/usbserial/Makefile.host index cd9319ab37..628304cd4e 100644 --- a/apps/examples/usbserial/Makefile.host +++ b/apps/examples/usbserial/Makefile.host @@ -2,7 +2,7 @@ # apps/examples/usbserial/Makefile.host # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/usbserial/host.c b/apps/examples/usbserial/host.c index dfa288f44c..366b622239 100644 --- a/apps/examples/usbserial/host.c +++ b/apps/examples/usbserial/host.c @@ -2,7 +2,7 @@ * examples/usbserial/host.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/wget/Makefile b/apps/examples/wget/Makefile index 4141cc8328..7771619a5b 100644 --- a/apps/examples/wget/Makefile +++ b/apps/examples/wget/Makefile @@ -2,7 +2,7 @@ # apps/examples/wget/Makefile # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/wget/Makefile.host b/apps/examples/wget/Makefile.host index fd891afec5..5d746441a8 100644 --- a/apps/examples/wget/Makefile.host +++ b/apps/examples/wget/Makefile.host @@ -2,7 +2,7 @@ # apps/examples/wget/Makefile.host # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/examples/wget/host.c b/apps/examples/wget/host.c index a7b416db5a..b0e65b505c 100644 --- a/apps/examples/wget/host.c +++ b/apps/examples/wget/host.c @@ -2,7 +2,7 @@ * examples/wget/host.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/wget/hostdefs.h b/apps/examples/wget/hostdefs.h index da072d560a..e9860c22d5 100644 --- a/apps/examples/wget/hostdefs.h +++ b/apps/examples/wget/hostdefs.h @@ -1,69 +1,69 @@ -/**************************************************************************** - * examples/wget/hostdefs.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -#ifndef __HOSTDEFS_H -#define __HOSTDEFS_H - -/**************************************************************************** - * Included Files - *****************************************************************************/ - -#include -#include -#include - -/**************************************************************************** - * Preprocessor Defintiions - *****************************************************************************/ - -#define HTONS(a) htons(a) -#define HTONL(a) htonl(a) -#define CONFIG_CPP_HAVE_WARNING 1 -#define CONFIG_HAVE_GETHOSTBYNAME 1 -#define FAR - -#define ndbg(...) printf(__VA_ARGS__) -#define nvdbg(...) printf(__VA_ARGS__) - -#define ERROR (-1) -#define OK (0) - -/**************************************************************************** - * Type Definitions - *****************************************************************************/ - -typedef void *(*pthread_startroutine_t)(void *); - -#endif /* __HOSTDEFS_H */ +/**************************************************************************** + * examples/wget/hostdefs.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#ifndef __HOSTDEFS_H +#define __HOSTDEFS_H + +/**************************************************************************** + * Included Files + *****************************************************************************/ + +#include +#include +#include + +/**************************************************************************** + * Preprocessor Defintiions + *****************************************************************************/ + +#define HTONS(a) htons(a) +#define HTONL(a) htonl(a) +#define CONFIG_CPP_HAVE_WARNING 1 +#define CONFIG_HAVE_GETHOSTBYNAME 1 +#define FAR + +#define ndbg(...) printf(__VA_ARGS__) +#define nvdbg(...) printf(__VA_ARGS__) + +#define ERROR (-1) +#define OK (0) + +/**************************************************************************** + * Type Definitions + *****************************************************************************/ + +typedef void *(*pthread_startroutine_t)(void *); + +#endif /* __HOSTDEFS_H */ diff --git a/apps/examples/wlan/Makefile b/apps/examples/wlan/Makefile index 621d9a0aa0..88b1e3e2a1 100755 --- a/apps/examples/wlan/Makefile +++ b/apps/examples/wlan/Makefile @@ -2,7 +2,7 @@ # apps/examples/wlan/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Authors: Gregory Nutt +# Authors: Gregory Nutt # Rafael Noronha # # Redistribution and use in source and binary forms, with or without diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index eec1c96695..5728e117f6 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3334,4 +3334,7 @@ * configs/stm3240g-eval/discover: A configuration for testing the UDP discovery utility. Contributed by Max Holtzberg. * mm/README.txt: Add a new README file. + * include/nuttx/usb/usb.h, arch/*/src/*usb.c, and arch/*/src/*otg*.c: + Add hooks to to use common, external DMA buffer allocation + implementation. diff --git a/nuttx/arch/arm/src/dm320/dm320_usbdev.c b/nuttx/arch/arm/src/dm320/dm320_usbdev.c index abc89e31d9..c924db1976 100644 --- a/nuttx/arch/arm/src/dm320/dm320_usbdev.c +++ b/nuttx/arch/arm/src/dm320/dm320_usbdev.c @@ -324,7 +324,7 @@ static int dm320_epconfigure(FAR struct usbdev_ep_s *ep, static int dm320_epdisable(FAR struct usbdev_ep_s *ep); static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep); static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req); -#ifdef CONFIG_DM320_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static FAR void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes); static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, void *buf); #endif @@ -353,7 +353,7 @@ static const struct usbdev_epops_s g_epops = .disable = dm320_epdisable, .allocreq = dm320_epallocreq, .freereq = dm320_epfreereq, -#ifdef CONFIG_DM320_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = dm320_epallocbuffer, .freebuffer = dm320_epfreebuffer, #endif @@ -1979,11 +1979,16 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * *******************************************************************************/ -#ifdef CONFIG_DM320_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) { usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return malloc(bytes) + +#ifdef CONFIG_USBDEV_DMAMEMORY + return usbdev_dma_alloc(bytes); +#else + return malloc(bytes); +#endif } #endif @@ -1995,11 +2000,16 @@ static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) * *******************************************************************************/ -#ifdef CONFIG_DM320_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + +#ifdef CONFIG_USBDEV_DMAMEMORY + usbdev_dma_free(buf); +#else free(buf); +#endif } #endif diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c index ccaa3528a4..a5cb443e4b 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -434,7 +434,7 @@ static int lpc17_epdisable(FAR struct usbdev_ep_s *ep); static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep); static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *); -#ifdef CONFIG_LPC17_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes); static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, void *buf); @@ -471,7 +471,7 @@ static const struct usbdev_epops_s g_epops = .disable = lpc17_epdisable, .allocreq = lpc17_epallocreq, .freereq = lpc17_epfreereq, -#ifdef CONFIG_LPC17_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = lpc17_epallocbuffer, .freebuffer = lpc17_epfreebuffer, #endif @@ -2684,9 +2684,11 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * *******************************************************************************/ -#ifdef CONFIG_LPC17_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes) { +#if defined(CONFIG_LPC17_USBDEV_DMA) + FAR struct lpc17_ep_s *privep = (FAR struct lpc17_ep_s *)ep; int descndx; @@ -2699,7 +2701,19 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes /* Set UDCA to the allocated DMA descriptor for this endpoint */ g_udca[privep->epphy] = &g_usbddesc[descndx]; - return &g_usbddesc[descndx] + return &g_usbddesc[descndx] + +#elif defined(CONFIG_USBDEV_DMAMEMORY) + + usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); + return usbdev_dma_alloc(bytes); + +#else + + usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); + return malloc(bytes); + +#endif } #endif @@ -2711,9 +2725,11 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes * *******************************************************************************/ -#ifdef CONFIG_LPC17_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { +#if defined(CONFIG_LPC17_USBDEV_DMA) + FAR struct lpc17_ep_s *privep = (FAR struct lpc17_ep_s *)ep; usbtrace(TRACE_EPFREEBUFFER, privep->epphy); @@ -2724,7 +2740,19 @@ static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) /* Mark the DMA descriptor as free for re-allocation */ -#error "LOGIC INCOMPLETE" +# error "LOGIC INCOMPLETE" + +#elif defined(CONFIG_USBDEV_DMAMEMORY) + + usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + usbdev_dma_free(buf); + +#else + + usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + free(buf); + +#endif } #endif diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c index 1d4cd54743..78a5fe1c37 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -445,7 +445,7 @@ static int lpc214x_epdisable(FAR struct usbdev_ep_s *ep); static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep); static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *); -#ifdef CONFIG_LPC214X_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes); static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, void *buf); @@ -482,7 +482,7 @@ static const struct usbdev_epops_s g_epops = .disable = lpc214x_epdisable, .allocreq = lpc214x_epallocreq, .freereq = lpc214x_epfreereq, -#ifdef CONFIG_LPC214X_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = lpc214x_epallocbuffer, .freebuffer = lpc214x_epfreebuffer, #endif @@ -2652,6 +2652,8 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_ #ifdef CONFIG_LPC214X_USBDEV_DMA static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes) { +#ifdef CONFIG_USBDEV_DMA + FAR struct lpc214x_ep_s *privep = (FAR struct lpc214x_ep_s *)ep; int descndx; @@ -2664,7 +2666,19 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt /* Set UDCA to the allocated DMA descriptor for this endpoint */ USB_UDCA[privep->epphy] = &USB_DDESC[descndx]; - return &USB_DDESC[descndx] + return &USB_DDESC[descndx] + +#elif defined(CONFIG_USBDEV_DMAMEMORY) + + usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); + return usbdev_dma_alloc(bytes); + +#else + + usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); + return malloc(bytes); + +#endif } #endif @@ -2676,9 +2690,11 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt * *******************************************************************************/ -#ifdef CONFIG_LPC214X_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA + static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { +#ifdef CONFIG_LPC214X_USBDEV_DMA FAR struct lpc214x_ep_s *privep = (FAR struct lpc214x_ep_s *)ep; usbtrace(TRACE_EPFREEBUFFER, privep->epphy); @@ -2689,7 +2705,19 @@ static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) /* Mark the DMA descriptor as free for re-allocation */ -#error "LOGIC INCOMPLETE" +# error "LOGIC INCOMPLETE" + +#elif defined(CONFIG_USBDEV_DMAMEMORY) + + usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + usbdev_dma_free(buf); + +#else + + usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + free(buf); + +#endif } #endif diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c b/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c index 0e8fcf17c5..255f28da14 100755 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c @@ -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_LPC31_USBDEV_DMA +#ifdef CONFIG_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_LPC31_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = lpc31_epallocbuffer, .freebuffer = lpc31_epfreebuffer, #endif @@ -1955,11 +1955,16 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * *******************************************************************************/ -#ifdef CONFIG_LPC31_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) { usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return malloc(bytes) + +#ifdef CONFIG_USBDEV_DMAMEMORY + return usbdev_dma_alloc(bytes); +#else + return malloc(bytes); +#endif } #endif @@ -1971,11 +1976,16 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) * *******************************************************************************/ -#ifdef CONFIG_LPC31_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + +#ifdef CONFIG_USBDEV_DMAMEMORY + usbdev_dma_free(buf); +#else free(buf); +#endif } #endif diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c index 2ce19a3250..b4ca554204 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c @@ -404,7 +404,7 @@ static int lpc43_epdisable(FAR struct usbdev_ep_s *ep); static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep); static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *); -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes); static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf); #endif @@ -441,7 +441,7 @@ static const struct usbdev_epops_s g_epops = .disable = lpc43_epdisable, .allocreq = lpc43_epallocreq, .freereq = lpc43_epfreereq, -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = lpc43_epallocbuffer, .freebuffer = lpc43_epfreebuffer, #endif @@ -1958,11 +1958,16 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * *******************************************************************************/ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) { usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return malloc(bytes) + +#ifdef CONFIG_USBDEV_DMAMEMORY + return usbdev_dma_alloc(bytes); +#else + return malloc(bytes); +#endif } #endif @@ -1974,11 +1979,16 @@ static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) * *******************************************************************************/ -#ifdef CONFIG_LPC433x_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + +#ifdef CONFIG_USBDEV_DMAMEMORY + usbdev_dma_free(buf); +#else free(buf); +#endif } #endif diff --git a/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c b/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c index 81c919cdfd..461d500ad1 100644 --- a/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c @@ -607,7 +607,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, /* Endpoint buffer management */ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes); static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf); #endif @@ -669,7 +669,7 @@ static const struct usbdev_epops_s g_epops = .disable = stm32_ep_disable, .allocreq = stm32_ep_allocreq, .freereq = stm32_ep_freereq, -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = stm32_ep_allocbuffer, .freebuffer = stm32_ep_freebuffer, #endif @@ -4070,11 +4070,16 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * *******************************************************************************/ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) { usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return malloc(bytes) + +#ifdef CONFIG_USBDEV_DMAMEMORY + return usbdev_dma_alloc(bytes); +#else + return malloc(bytes); +#endif } #endif @@ -4086,11 +4091,16 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) * *******************************************************************************/ -#ifdef CONFIG_STM32_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { usbtrace(TRACE_EPFREEBUFFER, privep->epphy); + +#ifdef CONFIG_USBDEV_DMAMEMORY + usbdev_dma_free(buf); +#else free(buf); +#endif } #endif diff --git a/nuttx/arch/avr/src/at90usb/at90usb_usbdev.c b/nuttx/arch/avr/src/at90usb/at90usb_usbdev.c index dcda5d6d09..89949e662b 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/nuttx/arch/avr/src/at90usb/at90usb_usbdev.c @@ -313,7 +313,7 @@ static int avr_epdisable(FAR struct usbdev_ep_s *ep); static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep); static void avr_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *); -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes); static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf); #endif @@ -346,7 +346,7 @@ static const struct usbdev_epops_s g_epops = .disable = avr_epdisable, .allocreq = avr_epallocreq, .freereq = avr_epfreereq, -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA .allocbuffer = avr_epallocbuffer, .freebuffer = avr_epfreebuffer, #endif @@ -2314,11 +2314,17 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep, * *******************************************************************************/ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) { usbtrace(TRACE_EPALLOCBUFFER, privep->ep.eplog); - return malloc(bytes)} + +#ifdef CONFIG_USBDEV_DMAMEMORY + return usbdev_dma_alloc(bytes); +#else + return malloc(bytes); +#endif +} #endif /******************************************************************************* @@ -2329,11 +2335,16 @@ static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) * *******************************************************************************/ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) { usbtrace(TRACE_EPFREEBUFFER, privep->ep.eplog); + +#ifdef CONFIG_USBDEV_DMAMEMORY + usbdev_dma_free(buf); +#else free(buf); +#endif } #endif diff --git a/nuttx/drivers/usbdev/Kconfig b/nuttx/drivers/usbdev/Kconfig index 4930b9d21e..70c7a04f05 100644 --- a/nuttx/drivers/usbdev/Kconfig +++ b/nuttx/drivers/usbdev/Kconfig @@ -3,6 +3,88 @@ # see misc/tools/kconfig-language.txt. # +menu "Device Controller Driver Options" + +config USBDEV_ISOCHRONOUS + bool "Enable isochronous" + default n + ---help--- + Build in extra support for isochronous endpoints + +config USBDEV_DUALSPEED + bool "Enable high and full speed" + default n + ---help--- + Hardware handles high and full speed operation (USB 2.0) + +choice USBDEV_POWERED + prompt "Select USB device powered" + default USBDEV_SELFPOWERED + +config USBDEV_SELFPOWERED + bool "Self powered" + ---help--- + Will cause USB features to indicate that the device is self-powered + +config USBDEV_BUSPOWERED + bool "Bus powered" + ---help--- + Will cause USB features to indicate that the device is self-powered + +endchoice + +config USBDEV_MAXPOWER + int "Maximum power consumption in mA" + default 100 + depends on USBDEV_BUSPOWERED + ---help--- + Maximum power consumption in mA + +config USBDEV_DMA + bool "Enable DMA methods" + default n + ---help--- + Select this enable DMA-related methods in USB device controller driver + interface. These methods include the DMA buffer allocation methods: + allobuffer() and freebuffer(). + + The USB class driver allocates packet I/O buffers for data transfer by + calling the driver allocbuffer() and freebuffer() methods. Those methods + are only available if USBDEV_DMA is defined in the system configuration. + +config USBDEV_DMAMEMORY +bool "Board DMA Allocation Hooks" + default n + depends on USBDEV_DMA + ---help--- + The USB class driver allocates packet I/O buffers for data transfer by + calling the driver allocbuffer() and freebuffer() methods. Those methods + are only available if USBDEV_DMA is defined in the system configuration. + + If USBDEV_DMAMEMORY is also defined in the NuttX configuration, then + the driver implementations of the allocbuffer() and freebuffer() + methods may use board-specific usbdev_dma_alloc() and usbdev_dma_free(). + If USBDEV_DMA and USBDEV_DMAMEMORY are both defined, then the board- + specific logic must provide the functions usbdev_dma_alloc() and + usbdev_dma_free(): usbdev_dma_alloc() will allocate DMA-capable + memory of the specified size; usbdev_dma_free() is the corresponding + function that will be called to free the DMA-capable memory. + +config USBDEV_TRACE + bool "Enable USB tracing for debug" + default n + ---help--- + Enables USB tracing for debug + +config USBDEV_TRACE_NRECORDS + int "Number of trace entries to remember" + default 32 + depends on USBDEV_TRACE + ---help--- + Number of trace entries to remember + +endmenu + menuconfig USBDEV_COMPOSITE bool "USB composite device support" default n @@ -65,53 +147,6 @@ config COMPOSITE_VERSIONNO Interface version number. endif -config USBDEV_ISOCHRONOUS - bool "Enable isochronous" - default n - ---help--- - Build in extra support for isochronous endpoints - -config USBDEV_DUALSPEED - bool "Enable high and full speed" - default n - ---help--- - Hardware handles high and full speed operation (USB 2.0) - -choice USBDEV_POWERED - prompt "Select USB device powered" - default USBDEV_SELFPOWERED -config USBDEV_SELFPOWERED - bool "Self powerd" - ---help--- - Will cause USB features to indicate that the device is self-powered - -config USBDEV_BUSPOWERED - bool "Bus powerd" - ---help--- - Will cause USB features to indicate that the device is self-powered - -endchoice - -config USBDEV_MAXPOWER - int "Maximum power consumption in mA" - default 100 - depends on USBDEV_BUSPOWERED - ---help--- - Maximum power consumption in mA - -config USBDEV_TRACE - bool "Enable USB tracing for debug" - default n - ---help--- - Enables USB tracing for debug - -config USBDEV_TRACE_NRECORDS - int "Number of trace entries to remember" - default 32 - depends on USBDEV_TRACE - ---help--- - Number of trace entries to remember - menuconfig PL2303 bool "Emulates the Prolific PL2303 serial/USB converter" default n diff --git a/nuttx/include/nuttx/fs/fat.h b/nuttx/include/nuttx/fs/fat.h index 680aefbe93..ac85c502f4 100644 --- a/nuttx/include/nuttx/fs/fat.h +++ b/nuttx/include/nuttx/fs/fat.h @@ -40,6 +40,7 @@ * Included Files ****************************************************************************/ +#include #include /**************************************************************************** @@ -98,15 +99,20 @@ EXTERN int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t cl * Some hardware, however, may require special DMA-capable memory in * order to perform the the transfers. If CONFIG_FAT_DMAMEMORY is defined * then the architecture-specific hardware must provide the funtions - * fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dmalloc() - * will allocate DMA-capable memory of the specified size; fat_dmafree() + * fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dma_alloc() + * will allocate DMA-capable memory of the specified size; fat_dma_free() * is the corresponding function that will be called to free the DMA- * capable memory. * + * This functions may be simple wrappers around gran_alloc() and gran_free() + * (See nuttx/gran.h). + * ****************************************************************************/ +#ifdef CONFIG_FAT_DMAMEMORY EXTERN FAR void *fat_dma_alloc(size_t size); EXTERN void fat_dma_free(FAR void *memory, size_t size); +#endif #undef EXTERN #ifdef __cplusplus diff --git a/nuttx/include/nuttx/usb/usbdev.h b/nuttx/include/nuttx/usb/usbdev.h index 89813cac96..1270fe13ad 100644 --- a/nuttx/include/nuttx/usb/usbdev.h +++ b/nuttx/include/nuttx/usb/usbdev.h @@ -85,7 +85,7 @@ /* Allocate/free an I/O buffer. Should not be called from interrupt processing! */ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA # define EP_ALLOCBUFFER(ep,nb) (ep)->ops->alloc(ep,nb) # define EP_FREEBUFFER(ep,buff) (ep)->ops->free(ep,buf) #else @@ -234,7 +234,7 @@ struct usbdev_epops_s /* Allocate and free I/O buffers */ -#ifdef CONFIG_ARCH_USBDEV_DMA +#ifdef CONFIG_USBDEV_DMA FAR void *(*allocbuffer)(FAR struct usbdev_ep_s *ep, uint16_t nbytes); void (*freebuffer)(FAR struct usbdev_ep_s *ep, FAR void *buf); #endif @@ -354,6 +354,37 @@ EXTERN int usbdev_register(FAR struct usbdevclass_driver_s *driver); EXTERN int usbdev_unregister(FAR struct usbdevclass_driver_s *driver); +/**************************************************************************** + * Name: usbdev_dma_alloc and usbdev_dma_free + * + * Description: + * The USB class driver allocates packet I/O buffers for data transfer by + * calling the driver allocbuffer() and freebuffer() methods. Those + * methods are only available if CONFIG_USBDEV_DMA is defined in the + * system configuration. + * + * If CONFIG_USBDEV_DMAMEMORY is also defined in the NuttX configuration, + * then the driver implementations of the allocbuffer() and freebuffer() + * methods may use board-specific usbdev_dma_alloc() and usbdev_dma_free(). + * If CONFIG_USBDEV_DMA and CONFIG_USBDEV_DMAMEMORY are both defined, + * then the board-specific logic must provide the functions + * usbdev_dma_alloc() and usbdev_dma_free() as prototyped below: + * usbdev_dma_alloc() will allocate DMA-capable memory of the specified + * size; usbdev_dma_free() is the corresponding function that will be + * called to free the DMA-capable memory. + * + * This functions may be simple wrappers around gran_alloc() and + * gran_free() (See nuttx/gran.h). Note that the gran_free() function + * does require the size of the allocation to be freed; that would need + * to be managed in the board-specific logic. + * + ****************************************************************************/ + +#if defined(CONFIG_USBDEV_DMA) && defined(CONFIG_USBDEV_DMAMEMORY) +EXTERN FAR void *usbdev_dma_alloc(size_t size); +EXTERN void usbdev_dma_free(FAR void *memory); +#endif + #undef EXTERN #if defined(__cplusplus) } From 77888ea156e88f45e1d7bf716b627ddc44701698 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 16:58:49 +0000 Subject: [PATCH 64/95] Email address change in apps/ git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5143 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/Make.defs | 2 +- apps/graphics/Makefile | 2 +- apps/graphics/tiff/Makefile | 2 +- apps/graphics/tiff/tiff_addstrip.c | 2 +- apps/graphics/tiff/tiff_finalize.c | 2 +- apps/graphics/tiff/tiff_initialize.c | 2 +- apps/graphics/tiff/tiff_internal.h | 2 +- apps/graphics/tiff/tiff_utils.c | 2 +- apps/interpreters/Makefile | 2 +- apps/interpreters/ficl/Makefile | 2 +- apps/namedapp/Makefile | 2 +- apps/namedapp/namedapp.c | 2 +- apps/netutils/dhcpc/Makefile | 2 +- apps/netutils/ftpc/Makefile | 2 +- apps/netutils/ftpc/ftpc_cdup.c | 2 +- apps/netutils/ftpc/ftpc_chdir.c | 2 +- apps/netutils/ftpc/ftpc_chmod.c | 2 +- apps/netutils/ftpc/ftpc_cmd.c | 2 +- apps/netutils/ftpc/ftpc_config.h | 2 +- apps/netutils/ftpc/ftpc_connect.c | 2 +- apps/netutils/ftpc/ftpc_disconnect.c | 2 +- apps/netutils/ftpc/ftpc_filesize.c | 2 +- apps/netutils/ftpc/ftpc_filetime.c | 2 +- apps/netutils/ftpc/ftpc_getfile.c | 2 +- apps/netutils/ftpc/ftpc_getreply.c | 2 +- apps/netutils/ftpc/ftpc_help.c | 2 +- apps/netutils/ftpc/ftpc_idle.c | 2 +- apps/netutils/ftpc/ftpc_internal.h | 2 +- apps/netutils/ftpc/ftpc_listdir.c | 2 +- apps/netutils/ftpc/ftpc_mkdir.c | 2 +- apps/netutils/ftpc/ftpc_noop.c | 2 +- apps/netutils/ftpc/ftpc_putfile.c | 2 +- apps/netutils/ftpc/ftpc_quit.c | 2 +- apps/netutils/ftpc/ftpc_rename.c | 2 +- apps/netutils/ftpc/ftpc_response.c | 2 +- apps/netutils/ftpc/ftpc_rmdir.c | 2 +- apps/netutils/ftpc/ftpc_rpwd.c | 2 +- apps/netutils/ftpc/ftpc_socket.c | 2 +- apps/netutils/ftpc/ftpc_transfer.c | 2 +- apps/netutils/ftpc/ftpc_unlink.c | 2 +- apps/netutils/ftpc/ftpc_utils.c | 2 +- apps/netutils/ftpd/ftpd.h | 2 +- apps/netutils/resolv/Makefile | 2 +- apps/netutils/smtp/Makefile | 2 +- apps/netutils/smtp/smtp.c | 2 +- apps/netutils/telnetd/telnetd_daemon.c | 2 +- apps/netutils/tftpc/Makefile | 2 +- apps/netutils/tftpc/tftpc_get.c | 2 +- apps/netutils/tftpc/tftpc_internal.h | 2 +- apps/netutils/tftpc/tftpc_put.c | 2 +- apps/netutils/thttpd/Makefile | 2 +- apps/netutils/thttpd/cgi-src/Makefile | 2 +- apps/netutils/thttpd/cgi-src/phf.c | 2 +- apps/netutils/thttpd/cgi-src/redirect.c | 2 +- apps/netutils/thttpd/cgi-src/ssi.c | 2 +- apps/netutils/thttpd/config.h | 2 +- apps/netutils/thttpd/fdwatch.c | 2 +- apps/netutils/thttpd/fdwatch.h | 2 +- apps/netutils/thttpd/libhttpd.c | 2 +- apps/netutils/thttpd/libhttpd.h | 2 +- apps/netutils/thttpd/mime_types.h | 2 +- apps/netutils/thttpd/tdate_parse.c | 2 +- apps/netutils/thttpd/tdate_parse.h | 2 +- apps/netutils/thttpd/thttpd.c | 2 +- apps/netutils/thttpd/thttpd_alloc.c | 2 +- apps/netutils/thttpd/thttpd_alloc.h | 2 +- apps/netutils/thttpd/thttpd_cgi.c | 2 +- apps/netutils/thttpd/thttpd_cgi.h | 122 ++++---- apps/netutils/thttpd/thttpd_strings.c | 358 ++++++++++++------------ apps/netutils/thttpd/thttpd_strings.h | 246 ++++++++-------- apps/netutils/thttpd/timers.c | 2 +- apps/netutils/thttpd/timers.h | 2 +- apps/netutils/uiplib/Makefile | 2 +- apps/netutils/uiplib/uip_gethostaddr.c | 2 +- apps/netutils/uiplib/uip_getmacaddr.c | 2 +- apps/netutils/uiplib/uip_ipmsfilter.c | 2 +- apps/netutils/uiplib/uip_parsehttpurl.c | 2 +- apps/netutils/uiplib/uip_server.c | 2 +- apps/netutils/uiplib/uip_setdraddr.c | 2 +- apps/netutils/uiplib/uip_sethostaddr.c | 2 +- apps/netutils/uiplib/uip_setnetmask.c | 2 +- apps/netutils/uiplib/uiplib.c | 2 +- apps/netutils/webclient/Makefile | 2 +- apps/nshlib/nsh_console.h | 2 +- apps/system/free/Makefile | 2 +- apps/system/free/README.txt | 2 +- apps/system/free/free.c | 2 +- apps/system/i2c/i2c_bus.c | 2 +- apps/system/i2c/i2c_common.c | 2 +- apps/system/i2c/i2c_dev.c | 2 +- apps/system/i2c/i2c_get.c | 2 +- apps/system/i2c/i2c_main.c | 2 +- apps/system/i2c/i2c_set.c | 2 +- apps/system/i2c/i2c_verf.c | 2 +- apps/system/i2c/i2ctool.h | 2 +- apps/system/install/Makefile | 2 +- apps/vsn/poweroff/Makefile | 2 +- apps/vsn/ramtron/Makefile | 2 +- apps/vsn/ramtron/ramtron.c | 2 +- apps/vsn/sdcard/Makefile | 2 +- apps/vsn/sdcard/sdcard.c | 2 +- apps/vsn/sysinfo/Makefile | 2 +- nuttx/configs/fire-stm32v2/README.txt | 6 + nuttx/net/send.c | 2 +- 104 files changed, 469 insertions(+), 463 deletions(-) diff --git a/apps/Make.defs b/apps/Make.defs index f37a654c47..53ac7f8be5 100644 --- a/apps/Make.defs +++ b/apps/Make.defs @@ -3,7 +3,7 @@ # Common make definitions provided to all applications # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/graphics/Makefile b/apps/graphics/Makefile index 01775a2e3b..ddd26e5367 100644 --- a/apps/graphics/Makefile +++ b/apps/graphics/Makefile @@ -2,7 +2,7 @@ # apps/graphics/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/Makefile b/apps/graphics/tiff/Makefile index 617717c65c..af487c1a9c 100644 --- a/apps/graphics/tiff/Makefile +++ b/apps/graphics/tiff/Makefile @@ -2,7 +2,7 @@ # apps/graphics/tiff/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/tiff_addstrip.c b/apps/graphics/tiff/tiff_addstrip.c index fa2a50e72a..7b5c4fb8f7 100644 --- a/apps/graphics/tiff/tiff_addstrip.c +++ b/apps/graphics/tiff/tiff_addstrip.c @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_addstrip.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/tiff_finalize.c b/apps/graphics/tiff/tiff_finalize.c index 0d7a222a56..abae79b638 100644 --- a/apps/graphics/tiff/tiff_finalize.c +++ b/apps/graphics/tiff/tiff_finalize.c @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_finalize.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/tiff_initialize.c b/apps/graphics/tiff/tiff_initialize.c index 3e1328eb2c..ddd5fc29d3 100644 --- a/apps/graphics/tiff/tiff_initialize.c +++ b/apps/graphics/tiff/tiff_initialize.c @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_initialize.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/tiff_internal.h b/apps/graphics/tiff/tiff_internal.h index 5596122fa3..c7226e04d6 100644 --- a/apps/graphics/tiff/tiff_internal.h +++ b/apps/graphics/tiff/tiff_internal.h @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/graphics/tiff/tiff_utils.c b/apps/graphics/tiff/tiff_utils.c index c326d0274b..33886d7965 100644 --- a/apps/graphics/tiff/tiff_utils.c +++ b/apps/graphics/tiff/tiff_utils.c @@ -2,7 +2,7 @@ * apps/graphics/tiff/tiff_utils.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile index 1ef9c7439c..5901fc8309 100644 --- a/apps/interpreters/Makefile +++ b/apps/interpreters/Makefile @@ -2,7 +2,7 @@ # apps/interpreters/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile index 183246b67a..fb953964e1 100644 --- a/apps/interpreters/ficl/Makefile +++ b/apps/interpreters/ficl/Makefile @@ -2,7 +2,7 @@ # apps/interpreters/ficl/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/namedapp/Makefile b/apps/namedapp/Makefile index fba8fb1ff9..6b0fd6a053 100644 --- a/apps/namedapp/Makefile +++ b/apps/namedapp/Makefile @@ -2,7 +2,7 @@ # apps/nshlib/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/namedapp/namedapp.c b/apps/namedapp/namedapp.c index a5c2bee0e2..d59ce6e3b7 100644 --- a/apps/namedapp/namedapp.c +++ b/apps/namedapp/namedapp.c @@ -4,7 +4,7 @@ * Copyright (C) 2011 Uros Platise. All rights reserved. * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Authors: Uros Platise - * Gregory Nutt + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/dhcpc/Makefile b/apps/netutils/dhcpc/Makefile index d5f1f90c54..29e5bd4f2b 100644 --- a/apps/netutils/dhcpc/Makefile +++ b/apps/netutils/dhcpc/Makefile @@ -2,7 +2,7 @@ # apps/netutils/dhcpc/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/Makefile b/apps/netutils/ftpc/Makefile index 59121e3b75..723179131d 100644 --- a/apps/netutils/ftpc/Makefile +++ b/apps/netutils/ftpc/Makefile @@ -2,7 +2,7 @@ # apps/netutils/ftpc/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_cdup.c b/apps/netutils/ftpc/ftpc_cdup.c index 2b4aa0973e..d65b5789f0 100644 --- a/apps/netutils/ftpc/ftpc_cdup.c +++ b/apps/netutils/ftpc/ftpc_cdup.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_cdup.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_chdir.c b/apps/netutils/ftpc/ftpc_chdir.c index 9b512a1f38..1b95ddad4d 100644 --- a/apps/netutils/ftpc/ftpc_chdir.c +++ b/apps/netutils/ftpc/ftpc_chdir.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_chdir.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_chmod.c b/apps/netutils/ftpc/ftpc_chmod.c index 13d06f4033..e5cd48b467 100644 --- a/apps/netutils/ftpc/ftpc_chmod.c +++ b/apps/netutils/ftpc/ftpc_chmod.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_chmod.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_cmd.c b/apps/netutils/ftpc/ftpc_cmd.c index dc031790dc..cb1f9e4963 100644 --- a/apps/netutils/ftpc/ftpc_cmd.c +++ b/apps/netutils/ftpc/ftpc_cmd.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_cmd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_config.h b/apps/netutils/ftpc/ftpc_config.h index 9dc90085ce..8e8fbd2d9a 100644 --- a/apps/netutils/ftpc/ftpc_config.h +++ b/apps/netutils/ftpc/ftpc_config.h @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_config.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_connect.c b/apps/netutils/ftpc/ftpc_connect.c index f36fa08e13..4fa8178a72 100644 --- a/apps/netutils/ftpc/ftpc_connect.c +++ b/apps/netutils/ftpc/ftpc_connect.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_connect.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_disconnect.c b/apps/netutils/ftpc/ftpc_disconnect.c index b2855ea377..ce345a890b 100644 --- a/apps/netutils/ftpc/ftpc_disconnect.c +++ b/apps/netutils/ftpc/ftpc_disconnect.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_disconnect.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_filesize.c b/apps/netutils/ftpc/ftpc_filesize.c index d827f736e5..69578d66cb 100644 --- a/apps/netutils/ftpc/ftpc_filesize.c +++ b/apps/netutils/ftpc/ftpc_filesize.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_filesize.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_filetime.c b/apps/netutils/ftpc/ftpc_filetime.c index 6b3a1d6db0..14ce81a615 100644 --- a/apps/netutils/ftpc/ftpc_filetime.c +++ b/apps/netutils/ftpc/ftpc_filetime.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_filetime.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_getfile.c b/apps/netutils/ftpc/ftpc_getfile.c index 06532c22c7..add07125f5 100644 --- a/apps/netutils/ftpc/ftpc_getfile.c +++ b/apps/netutils/ftpc/ftpc_getfile.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_getfile.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_getreply.c b/apps/netutils/ftpc/ftpc_getreply.c index 058eaf213e..3a9952dafd 100644 --- a/apps/netutils/ftpc/ftpc_getreply.c +++ b/apps/netutils/ftpc/ftpc_getreply.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_getreply.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_help.c b/apps/netutils/ftpc/ftpc_help.c index 19041bc241..4c630b441b 100644 --- a/apps/netutils/ftpc/ftpc_help.c +++ b/apps/netutils/ftpc/ftpc_help.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_help.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_idle.c b/apps/netutils/ftpc/ftpc_idle.c index 95a94d2330..7334f195d1 100644 --- a/apps/netutils/ftpc/ftpc_idle.c +++ b/apps/netutils/ftpc/ftpc_idle.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_idle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_internal.h b/apps/netutils/ftpc/ftpc_internal.h index 5c9d88951a..4370f8dab1 100644 --- a/apps/netutils/ftpc/ftpc_internal.h +++ b/apps/netutils/ftpc/ftpc_internal.h @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_listdir.c b/apps/netutils/ftpc/ftpc_listdir.c index 1bfda82343..5d6c6d1560 100644 --- a/apps/netutils/ftpc/ftpc_listdir.c +++ b/apps/netutils/ftpc/ftpc_listdir.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_listdir.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_mkdir.c b/apps/netutils/ftpc/ftpc_mkdir.c index 59684f07df..32c782396c 100644 --- a/apps/netutils/ftpc/ftpc_mkdir.c +++ b/apps/netutils/ftpc/ftpc_mkdir.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_mkdir.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_noop.c b/apps/netutils/ftpc/ftpc_noop.c index 48d9ccafdb..6932b1489c 100644 --- a/apps/netutils/ftpc/ftpc_noop.c +++ b/apps/netutils/ftpc/ftpc_noop.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_noop.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_putfile.c b/apps/netutils/ftpc/ftpc_putfile.c index 517a988b18..d59c4c99eb 100644 --- a/apps/netutils/ftpc/ftpc_putfile.c +++ b/apps/netutils/ftpc/ftpc_putfile.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_putfile.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_quit.c b/apps/netutils/ftpc/ftpc_quit.c index 25ec8b16ff..7a4c2533df 100644 --- a/apps/netutils/ftpc/ftpc_quit.c +++ b/apps/netutils/ftpc/ftpc_quit.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_quit.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_rename.c b/apps/netutils/ftpc/ftpc_rename.c index f2355fdd50..abda046573 100644 --- a/apps/netutils/ftpc/ftpc_rename.c +++ b/apps/netutils/ftpc/ftpc_rename.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_rename.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_response.c b/apps/netutils/ftpc/ftpc_response.c index 275b481236..b2dcb9ae1c 100644 --- a/apps/netutils/ftpc/ftpc_response.c +++ b/apps/netutils/ftpc/ftpc_response.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_response.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_rmdir.c b/apps/netutils/ftpc/ftpc_rmdir.c index 4a2c27f48e..b83946878f 100644 --- a/apps/netutils/ftpc/ftpc_rmdir.c +++ b/apps/netutils/ftpc/ftpc_rmdir.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_rmdir.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_rpwd.c b/apps/netutils/ftpc/ftpc_rpwd.c index 091a129441..ed60cfeb0b 100644 --- a/apps/netutils/ftpc/ftpc_rpwd.c +++ b/apps/netutils/ftpc/ftpc_rpwd.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_rpwd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_socket.c b/apps/netutils/ftpc/ftpc_socket.c index 4ec022bd03..f904688fd6 100644 --- a/apps/netutils/ftpc/ftpc_socket.c +++ b/apps/netutils/ftpc/ftpc_socket.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_socket.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_transfer.c b/apps/netutils/ftpc/ftpc_transfer.c index 464cd2a607..0eb9130f3c 100644 --- a/apps/netutils/ftpc/ftpc_transfer.c +++ b/apps/netutils/ftpc/ftpc_transfer.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_transfer.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_unlink.c b/apps/netutils/ftpc/ftpc_unlink.c index cf6733ecae..17401c280e 100644 --- a/apps/netutils/ftpc/ftpc_unlink.c +++ b/apps/netutils/ftpc/ftpc_unlink.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_unlink.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpc/ftpc_utils.c b/apps/netutils/ftpc/ftpc_utils.c index 21a466c009..50b1a6e4ef 100644 --- a/apps/netutils/ftpc/ftpc_utils.c +++ b/apps/netutils/ftpc/ftpc_utils.c @@ -2,7 +2,7 @@ * apps/netutils/ftpc/ftpc_utils.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/ftpd/ftpd.h b/apps/netutils/ftpd/ftpd.h index 6c10d35ad2..003f8d2bf4 100755 --- a/apps/netutils/ftpd/ftpd.h +++ b/apps/netutils/ftpd/ftpd.h @@ -2,7 +2,7 @@ * apps/include/ftpd.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/resolv/Makefile b/apps/netutils/resolv/Makefile index 32d0896e24..89744e3233 100644 --- a/apps/netutils/resolv/Makefile +++ b/apps/netutils/resolv/Makefile @@ -2,7 +2,7 @@ # apps/netutils/resolv/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/smtp/Makefile b/apps/netutils/smtp/Makefile index 758e436f33..5a43d1c9d6 100644 --- a/apps/netutils/smtp/Makefile +++ b/apps/netutils/smtp/Makefile @@ -2,7 +2,7 @@ # apps/netutils/smtp/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/smtp/smtp.c b/apps/netutils/smtp/smtp.c index 4e66a41cb2..08ff295ef0 100644 --- a/apps/netutils/smtp/smtp.c +++ b/apps/netutils/smtp/smtp.c @@ -3,7 +3,7 @@ * smtp SMTP E-mail sender * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Heavily leveraged from uIP 1.0 which also has a BSD-like license: * diff --git a/apps/netutils/telnetd/telnetd_daemon.c b/apps/netutils/telnetd/telnetd_daemon.c index d43a45e86f..aea9eb483c 100644 --- a/apps/netutils/telnetd/telnetd_daemon.c +++ b/apps/netutils/telnetd/telnetd_daemon.c @@ -2,7 +2,7 @@ * netutils/telnetd/telnetd_daemon.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/tftpc/Makefile b/apps/netutils/tftpc/Makefile index 1ec7b2b90e..910046c11e 100644 --- a/apps/netutils/tftpc/Makefile +++ b/apps/netutils/tftpc/Makefile @@ -2,7 +2,7 @@ # apps/netutils/tftpc/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/tftpc/tftpc_get.c b/apps/netutils/tftpc/tftpc_get.c index 4f391806cc..697021d95d 100644 --- a/apps/netutils/tftpc/tftpc_get.c +++ b/apps/netutils/tftpc/tftpc_get.c @@ -2,7 +2,7 @@ * netuils/tftp/tftpc_get.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/tftpc/tftpc_internal.h b/apps/netutils/tftpc/tftpc_internal.h index bed25a6a5c..f689ce176e 100644 --- a/apps/netutils/tftpc/tftpc_internal.h +++ b/apps/netutils/tftpc/tftpc_internal.h @@ -2,7 +2,7 @@ * netutils/tftoc/tftpc_internal.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/tftpc/tftpc_put.c b/apps/netutils/tftpc/tftpc_put.c index 7124bb9816..76ef18a8c5 100644 --- a/apps/netutils/tftpc/tftpc_put.c +++ b/apps/netutils/tftpc/tftpc_put.c @@ -2,7 +2,7 @@ * netuils/tftp/tftpc_put.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/Makefile b/apps/netutils/thttpd/Makefile index 4978c7c791..f505125da7 100644 --- a/apps/netutils/thttpd/Makefile +++ b/apps/netutils/thttpd/Makefile @@ -2,7 +2,7 @@ # apps/netutils/thttpd/Makefile # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/cgi-src/Makefile b/apps/netutils/thttpd/cgi-src/Makefile index 46b41fd625..60efb08e7b 100644 --- a/apps/netutils/thttpd/cgi-src/Makefile +++ b/apps/netutils/thttpd/cgi-src/Makefile @@ -2,7 +2,7 @@ # apps/netutils/cgi-src/Makefile # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/cgi-src/phf.c b/apps/netutils/thttpd/cgi-src/phf.c index 2541481c4c..575bf85ba9 100644 --- a/apps/netutils/thttpd/cgi-src/phf.c +++ b/apps/netutils/thttpd/cgi-src/phf.c @@ -3,7 +3,7 @@ * Cracker trap * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/cgi-src/redirect.c b/apps/netutils/thttpd/cgi-src/redirect.c index 84f3b8712a..d91a715da1 100644 --- a/apps/netutils/thttpd/cgi-src/redirect.c +++ b/apps/netutils/thttpd/cgi-src/redirect.c @@ -3,7 +3,7 @@ * Simple redirection CGI program * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/cgi-src/ssi.c b/apps/netutils/thttpd/cgi-src/ssi.c index 4afb141f92..c8bdab4ed8 100644 --- a/apps/netutils/thttpd/cgi-src/ssi.c +++ b/apps/netutils/thttpd/cgi-src/ssi.c @@ -3,7 +3,7 @@ * Server-side-includes CGI program * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/config.h b/apps/netutils/thttpd/config.h index f1b4c2d4cf..d238fabd87 100644 --- a/apps/netutils/thttpd/config.h +++ b/apps/netutils/thttpd/config.h @@ -2,7 +2,7 @@ * netutils/thttpd/config.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/fdwatch.c b/apps/netutils/thttpd/fdwatch.c index 24ea7a1e08..50ea65e78d 100644 --- a/apps/netutils/thttpd/fdwatch.c +++ b/apps/netutils/thttpd/fdwatch.c @@ -3,7 +3,7 @@ * FD watcher routines for poll() * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/fdwatch.h b/apps/netutils/thttpd/fdwatch.h index e60727db17..38a5ecbc08 100644 --- a/apps/netutils/thttpd/fdwatch.h +++ b/apps/netutils/thttpd/fdwatch.h @@ -2,7 +2,7 @@ * netutils/thttpd/fdwatch.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in THTTPD: * diff --git a/apps/netutils/thttpd/libhttpd.c b/apps/netutils/thttpd/libhttpd.c index 05831b3353..ee0ac999ce 100644 --- a/apps/netutils/thttpd/libhttpd.c +++ b/apps/netutils/thttpd/libhttpd.c @@ -3,7 +3,7 @@ * HTTP Protocol Library * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/libhttpd.h b/apps/netutils/thttpd/libhttpd.h index f2e39e04d2..b245a6edf1 100644 --- a/apps/netutils/thttpd/libhttpd.h +++ b/apps/netutils/thttpd/libhttpd.h @@ -3,7 +3,7 @@ * HTTP Protocol Library Definitions * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/mime_types.h b/apps/netutils/thttpd/mime_types.h index cd0c514a83..9581927588 100644 --- a/apps/netutils/thttpd/mime_types.h +++ b/apps/netutils/thttpd/mime_types.h @@ -6,7 +6,7 @@ * contained no copyright information. * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/tdate_parse.c b/apps/netutils/thttpd/tdate_parse.c index d9ace1b414..e91ab5ebba 100644 --- a/apps/netutils/thttpd/tdate_parse.c +++ b/apps/netutils/thttpd/tdate_parse.c @@ -3,7 +3,7 @@ * Parse string dates into internal form, stripped-down version * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/tdate_parse.h b/apps/netutils/thttpd/tdate_parse.h index 301d5467ab..eea82d7cbd 100644 --- a/apps/netutils/thttpd/tdate_parse.h +++ b/apps/netutils/thttpd/tdate_parse.h @@ -2,7 +2,7 @@ * netutils/thttpd/fdwatch.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in THTTPD: * diff --git a/apps/netutils/thttpd/thttpd.c b/apps/netutils/thttpd/thttpd.c index 3b49c0141c..1b074902de 100644 --- a/apps/netutils/thttpd/thttpd.c +++ b/apps/netutils/thttpd/thttpd.c @@ -3,7 +3,7 @@ * Tiny HTTP Server * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/thttpd_alloc.c b/apps/netutils/thttpd/thttpd_alloc.c index 71c71397b4..12872f192e 100755 --- a/apps/netutils/thttpd/thttpd_alloc.c +++ b/apps/netutils/thttpd/thttpd_alloc.c @@ -2,7 +2,7 @@ * netutils/thttpd/thttpd_alloc.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/thttpd_alloc.h b/apps/netutils/thttpd/thttpd_alloc.h index 1f24bc2e95..e8c8f80c3a 100755 --- a/apps/netutils/thttpd/thttpd_alloc.h +++ b/apps/netutils/thttpd/thttpd_alloc.h @@ -2,7 +2,7 @@ * netutils/thttpd/thttpd_alloc.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/thttpd/thttpd_cgi.c b/apps/netutils/thttpd/thttpd_cgi.c index 0c23a2587f..9c0de509bd 100755 --- a/apps/netutils/thttpd/thttpd_cgi.c +++ b/apps/netutils/thttpd/thttpd_cgi.c @@ -3,7 +3,7 @@ * CGI support * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file libhttpd.c in the original THTTPD package: * diff --git a/apps/netutils/thttpd/thttpd_cgi.h b/apps/netutils/thttpd/thttpd_cgi.h index 2d98e25ecd..47923223cb 100755 --- a/apps/netutils/thttpd/thttpd_cgi.h +++ b/apps/netutils/thttpd/thttpd_cgi.h @@ -1,61 +1,61 @@ -/**************************************************************************** - * netutils/thttpd/thttpd_cgi.h - * CGI support - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Derived from the file libhttpd.c in the original THTTPD package: - * - * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __HTTPD_CGI_H -#define __HTTPD_CGI_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "config.h" -#include "libhttpd.h" - -#if defined(CONFIG_THTTPD) && defined(CONFIG_THTTPD_CGI_PATTERN) - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -extern int cgi(httpd_conn *hc); -#if CONFIG_THTTPD_CGI_TIMELIMIT > 0 -static void cgi_kill(ClientData client_data, struct timeval *now); -#endif - -#endif /* CONFIG_THTTPD && CONFIG_THTTPD_CGI_PATTERN */ -#endif /* __HTTPD_CGI_H */ +/**************************************************************************** + * netutils/thttpd/thttpd_cgi.h + * CGI support + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Derived from the file libhttpd.c in the original THTTPD package: + * + * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __HTTPD_CGI_H +#define __HTTPD_CGI_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "config.h" +#include "libhttpd.h" + +#if defined(CONFIG_THTTPD) && defined(CONFIG_THTTPD_CGI_PATTERN) + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +extern int cgi(httpd_conn *hc); +#if CONFIG_THTTPD_CGI_TIMELIMIT > 0 +static void cgi_kill(ClientData client_data, struct timeval *now); +#endif + +#endif /* CONFIG_THTTPD && CONFIG_THTTPD_CGI_PATTERN */ +#endif /* __HTTPD_CGI_H */ diff --git a/apps/netutils/thttpd/thttpd_strings.c b/apps/netutils/thttpd/thttpd_strings.c index 82836ee999..5795e3754c 100755 --- a/apps/netutils/thttpd/thttpd_strings.c +++ b/apps/netutils/thttpd/thttpd_strings.c @@ -1,179 +1,179 @@ -/**************************************************************************** - * netutils/thttpd/thttpd_strings.c - * HTTP strings - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Derived from the file of the same name in the original THTTPD package: - * - * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include "config.h" -#include "thttpd_strings.h" - -#ifdef CONFIG_THTTPD - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This is the 'root' of the Filesystem as seen by the HTTP client */ - -const char httpd_root[] = CONFIG_THTTPD_PATH; - -/* HTPP status */ - -const char ok200title[] = "OK"; -const char ok206title[] = "Partial Content"; - -const char err302title[] = "Found"; -const char err302form[] = "The actual URL is '%s'.\n"; - -const char err304title[] = "Not Modified"; - -const char httpd_err400title[] = "Bad Request"; -const char httpd_err400form[] = "Your request has bad syntax or is inherently impossible to satisfy.\n"; - -#ifdef CONFIG_THTTPD_AUTH_FILE -const char err401title[] = "Unauthorized"; -const char err401form[] = "Authorization required for the URL '%s'.\n"; -#endif - -const char err403title[] = "Forbidden"; -#ifndef EXPLICIT_ERROR_PAGES -const char err403form[] = "You do not have permission to get URL '%s' from this server.\n"; -#endif - -const char err404title[] = "Not Found"; -const char err404form[] = "The requested URL '%s' was not found on this server.\n"; - -const char httpd_err408title[] = "Request Timeout"; -const char httpd_err408form[] = "No request appeared within a reasonable time period.\n"; - -const char err500title[] = "Internal Error"; -const char err500form[] = "There was an unusual problem serving the requested URL '%s'.\n"; - -const char err501title[] = "Not Implemented"; -const char err501form[] = "The requested method '%s' is not implemented by this server.\n"; - -const char httpd_err503title[] = "Service Temporarily Overloaded"; -const char httpd_err503form[] = "The requested URL '%s' is temporarily overloaded. Please try again later.\n"; - -/* HTML strings */ - -const char html_crlf[] = "\r\n"; -const char html_html[] = "\r\n"; -const char html_endhtml[] = "\r\n"; -const char html_hdtitle[] = ""; -const char html_titlehd[] = "\r\n"; -const char html_body[] = "\r\n"; -const char html_endbody[] = "\r\n"; -const char html_hdr2[] = "

      "; -const char html_endhdr2[] = "

      "; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static int hexit(char nibble) -{ - if (nibble >= '0' && nibble <= '9') - { - return nibble - '0'; - } - else if (nibble >= 'a' && nibble <= 'f') - { - return nibble - 'a' + 10; - } - else if (nibble >= 'A' && nibble <= 'F') - { - return nibble - 'A' + 10; - } - return 0; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/* Copies and decodes a string. It's ok for from and to to be the same string. */ - -void httpd_strdecode(char *to, char *from) -{ - for (; *from != '\0'; ++to, ++from) - { - if (from[0] == '%' && isxdigit(from[1]) && isxdigit(from[2])) - { - *to = hexit(from[1]) * 16 + hexit(from[2]); - from += 2; - } - else - { - *to = *from; - } - } - *to = '\0'; -} - -/* Copies and encodes a string. */ - -#ifdef CONFIG_THTTPD_GENERATE_INDICES -static void httpd_strencode(char *to, int tosize, char *from) -{ - int tolen; - - for (tolen = 0; *from != '\0' && tolen + 4 < tosize; ++from) - { - if (isalnum(*from) || strchr("/_.-~", *from) != NULL) - { - *to = *from; - ++to; - ++tolen; - } - else - { - (void)sprintf(to, "%%%02x", (int)*from & 0xff); - to += 3; - tolen += 3; - } - } - *to = '\0'; -} -#endif /* CONFIG_THTTPD_GENERATE_INDICES */ -#endif /* CONFIG_THTTPD */ +/**************************************************************************** + * netutils/thttpd/thttpd_strings.c + * HTTP strings + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Derived from the file of the same name in the original THTTPD package: + * + * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include "config.h" +#include "thttpd_strings.h" + +#ifdef CONFIG_THTTPD + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* This is the 'root' of the Filesystem as seen by the HTTP client */ + +const char httpd_root[] = CONFIG_THTTPD_PATH; + +/* HTPP status */ + +const char ok200title[] = "OK"; +const char ok206title[] = "Partial Content"; + +const char err302title[] = "Found"; +const char err302form[] = "The actual URL is '%s'.\n"; + +const char err304title[] = "Not Modified"; + +const char httpd_err400title[] = "Bad Request"; +const char httpd_err400form[] = "Your request has bad syntax or is inherently impossible to satisfy.\n"; + +#ifdef CONFIG_THTTPD_AUTH_FILE +const char err401title[] = "Unauthorized"; +const char err401form[] = "Authorization required for the URL '%s'.\n"; +#endif + +const char err403title[] = "Forbidden"; +#ifndef EXPLICIT_ERROR_PAGES +const char err403form[] = "You do not have permission to get URL '%s' from this server.\n"; +#endif + +const char err404title[] = "Not Found"; +const char err404form[] = "The requested URL '%s' was not found on this server.\n"; + +const char httpd_err408title[] = "Request Timeout"; +const char httpd_err408form[] = "No request appeared within a reasonable time period.\n"; + +const char err500title[] = "Internal Error"; +const char err500form[] = "There was an unusual problem serving the requested URL '%s'.\n"; + +const char err501title[] = "Not Implemented"; +const char err501form[] = "The requested method '%s' is not implemented by this server.\n"; + +const char httpd_err503title[] = "Service Temporarily Overloaded"; +const char httpd_err503form[] = "The requested URL '%s' is temporarily overloaded. Please try again later.\n"; + +/* HTML strings */ + +const char html_crlf[] = "\r\n"; +const char html_html[] = "\r\n"; +const char html_endhtml[] = "\r\n"; +const char html_hdtitle[] = ""; +const char html_titlehd[] = "\r\n"; +const char html_body[] = "\r\n"; +const char html_endbody[] = "\r\n"; +const char html_hdr2[] = "

      "; +const char html_endhdr2[] = "

      "; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int hexit(char nibble) +{ + if (nibble >= '0' && nibble <= '9') + { + return nibble - '0'; + } + else if (nibble >= 'a' && nibble <= 'f') + { + return nibble - 'a' + 10; + } + else if (nibble >= 'A' && nibble <= 'F') + { + return nibble - 'A' + 10; + } + return 0; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/* Copies and decodes a string. It's ok for from and to to be the same string. */ + +void httpd_strdecode(char *to, char *from) +{ + for (; *from != '\0'; ++to, ++from) + { + if (from[0] == '%' && isxdigit(from[1]) && isxdigit(from[2])) + { + *to = hexit(from[1]) * 16 + hexit(from[2]); + from += 2; + } + else + { + *to = *from; + } + } + *to = '\0'; +} + +/* Copies and encodes a string. */ + +#ifdef CONFIG_THTTPD_GENERATE_INDICES +static void httpd_strencode(char *to, int tosize, char *from) +{ + int tolen; + + for (tolen = 0; *from != '\0' && tolen + 4 < tosize; ++from) + { + if (isalnum(*from) || strchr("/_.-~", *from) != NULL) + { + *to = *from; + ++to; + ++tolen; + } + else + { + (void)sprintf(to, "%%%02x", (int)*from & 0xff); + to += 3; + tolen += 3; + } + } + *to = '\0'; +} +#endif /* CONFIG_THTTPD_GENERATE_INDICES */ +#endif /* CONFIG_THTTPD */ diff --git a/apps/netutils/thttpd/thttpd_strings.h b/apps/netutils/thttpd/thttpd_strings.h index 5bbaf7948f..dc05f62953 100755 --- a/apps/netutils/thttpd/thttpd_strings.h +++ b/apps/netutils/thttpd/thttpd_strings.h @@ -1,123 +1,123 @@ -/**************************************************************************** - * netutils/thttpd/thttpd_strings.h - * HTTP strings - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Derived from the file of the same name in the original THTTPD package: - * - * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NETUTILS_THTTPD_THTTPD_STRINGS_H -#define __NETUTILS_THTTPD_THTTPD_STRINGS_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "config.h" - -#ifdef CONFIG_THTTPD - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* This is the 'root' of the Filesystem as seen by the HTTP client */ - -extern const char httpd_root[]; - -/* HTPP status */ - -extern const char ok200title[]; -extern const char ok206title[]; - -extern const char err302title[]; -extern const char err302form[]; - -extern const char err304title[]; - -extern const char httpd_err400title[]; -extern const char httpd_err400form[]; - -#ifdef CONFIG_THTTPD_AUTH_FILE -extern const char err401title[]; -extern const char err401form[]; -#endif - -extern const char err403title[]; -#ifndef EXPLICIT_ERROR_PAGES -extern const char err403form[]; -#endif - -extern const char err404title[]; -extern const char err404form[]; - -extern const char httpd_err408title[]; -extern const char httpd_err408form[]; - -extern const char err500title[]; -extern const char err500form[]; - -extern const char err501title[]; -extern const char err501form[]; - -extern const char httpd_err503title[]; -extern const char httpd_err503form[]; - -/* HTML strings */ - -extern const char html_crlf[]; -extern const char html_html[]; -extern const char html_endhtml[]; -extern const char html_hdtitle[]; -extern const char html_titlehd[]; -extern const char html_body[]; -extern const char html_endbody[]; -extern const char html_hdr2[]; -extern const char html_endhdr2[]; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/* Copies and decodes a string. It's ok for from and to to be the same string. */ - -extern void httpd_strdecode(char *to, char *from); - -/* Copies and encodes a string. */ - -#ifdef CONFIG_THTTPD_GENERATE_INDICES -extern void httpd_strencode(char *to, int tosize, char *from); -#endif - -#endif /* CONFIG_THTTPD */ -#endif /* __NETUTILS_THTTPD_THTTPD_STRINGS_H */ +/**************************************************************************** + * netutils/thttpd/thttpd_strings.h + * HTTP strings + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Derived from the file of the same name in the original THTTPD package: + * + * Copyright © 1995,1998,1999,2000,2001 by Jef Poskanzer . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __NETUTILS_THTTPD_THTTPD_STRINGS_H +#define __NETUTILS_THTTPD_THTTPD_STRINGS_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "config.h" + +#ifdef CONFIG_THTTPD + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* This is the 'root' of the Filesystem as seen by the HTTP client */ + +extern const char httpd_root[]; + +/* HTPP status */ + +extern const char ok200title[]; +extern const char ok206title[]; + +extern const char err302title[]; +extern const char err302form[]; + +extern const char err304title[]; + +extern const char httpd_err400title[]; +extern const char httpd_err400form[]; + +#ifdef CONFIG_THTTPD_AUTH_FILE +extern const char err401title[]; +extern const char err401form[]; +#endif + +extern const char err403title[]; +#ifndef EXPLICIT_ERROR_PAGES +extern const char err403form[]; +#endif + +extern const char err404title[]; +extern const char err404form[]; + +extern const char httpd_err408title[]; +extern const char httpd_err408form[]; + +extern const char err500title[]; +extern const char err500form[]; + +extern const char err501title[]; +extern const char err501form[]; + +extern const char httpd_err503title[]; +extern const char httpd_err503form[]; + +/* HTML strings */ + +extern const char html_crlf[]; +extern const char html_html[]; +extern const char html_endhtml[]; +extern const char html_hdtitle[]; +extern const char html_titlehd[]; +extern const char html_body[]; +extern const char html_endbody[]; +extern const char html_hdr2[]; +extern const char html_endhdr2[]; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/* Copies and decodes a string. It's ok for from and to to be the same string. */ + +extern void httpd_strdecode(char *to, char *from); + +/* Copies and encodes a string. */ + +#ifdef CONFIG_THTTPD_GENERATE_INDICES +extern void httpd_strencode(char *to, int tosize, char *from); +#endif + +#endif /* CONFIG_THTTPD */ +#endif /* __NETUTILS_THTTPD_THTTPD_STRINGS_H */ diff --git a/apps/netutils/thttpd/timers.c b/apps/netutils/thttpd/timers.c index 8edd7b21be..dc94306b0b 100644 --- a/apps/netutils/thttpd/timers.c +++ b/apps/netutils/thttpd/timers.c @@ -3,7 +3,7 @@ * Simple Timer Routines * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: * diff --git a/apps/netutils/thttpd/timers.h b/apps/netutils/thttpd/timers.h index 2d28d35580..7c8f9f2011 100644 --- a/apps/netutils/thttpd/timers.h +++ b/apps/netutils/thttpd/timers.h @@ -3,7 +3,7 @@ * Header file for THTTPD timers package * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from the file of the same name in THTTPD: * diff --git a/apps/netutils/uiplib/Makefile b/apps/netutils/uiplib/Makefile index 52b5fe6693..e935857a08 100644 --- a/apps/netutils/uiplib/Makefile +++ b/apps/netutils/uiplib/Makefile @@ -2,7 +2,7 @@ # apps/netutils/uiplib/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_gethostaddr.c b/apps/netutils/uiplib/uip_gethostaddr.c index 7fe26e6b97..c5c70b1be5 100644 --- a/apps/netutils/uiplib/uip_gethostaddr.c +++ b/apps/netutils/uiplib/uip_gethostaddr.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_gethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_getmacaddr.c b/apps/netutils/uiplib/uip_getmacaddr.c index c99bc7a7d8..f4f01a7f30 100644 --- a/apps/netutils/uiplib/uip_getmacaddr.c +++ b/apps/netutils/uiplib/uip_getmacaddr.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_getmacaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_ipmsfilter.c b/apps/netutils/uiplib/uip_ipmsfilter.c index ccae4a6805..8b8b8e77a1 100755 --- a/apps/netutils/uiplib/uip_ipmsfilter.c +++ b/apps/netutils/uiplib/uip_ipmsfilter.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_setmultiaddr.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_parsehttpurl.c b/apps/netutils/uiplib/uip_parsehttpurl.c index bda5502b79..da973b46f3 100644 --- a/apps/netutils/uiplib/uip_parsehttpurl.c +++ b/apps/netutils/uiplib/uip_parsehttpurl.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_parsehttpurl.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_server.c b/apps/netutils/uiplib/uip_server.c index f58f063de5..bb8efe5e6c 100644 --- a/apps/netutils/uiplib/uip_server.c +++ b/apps/netutils/uiplib/uip_server.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_server.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_setdraddr.c b/apps/netutils/uiplib/uip_setdraddr.c index 6ab516afae..5b7a2183ea 100644 --- a/apps/netutils/uiplib/uip_setdraddr.c +++ b/apps/netutils/uiplib/uip_setdraddr.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_setdraddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_sethostaddr.c b/apps/netutils/uiplib/uip_sethostaddr.c index 4db268783c..3cc73faed9 100644 --- a/apps/netutils/uiplib/uip_sethostaddr.c +++ b/apps/netutils/uiplib/uip_sethostaddr.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_sethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uip_setnetmask.c b/apps/netutils/uiplib/uip_setnetmask.c index edce31a2a0..7ebe83f85c 100644 --- a/apps/netutils/uiplib/uip_setnetmask.c +++ b/apps/netutils/uiplib/uip_setnetmask.c @@ -2,7 +2,7 @@ * netutils/uiplib/uip_setnetmask.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/netutils/uiplib/uiplib.c b/apps/netutils/uiplib/uiplib.c index 5e4fc4e186..f863b7343f 100644 --- a/apps/netutils/uiplib/uiplib.c +++ b/apps/netutils/uiplib/uiplib.c @@ -3,7 +3,7 @@ * Various uIP library functions. * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: * diff --git a/apps/netutils/webclient/Makefile b/apps/netutils/webclient/Makefile index e6616e8c8a..d999d47af0 100644 --- a/apps/netutils/webclient/Makefile +++ b/apps/netutils/webclient/Makefile @@ -2,7 +2,7 @@ # apps/netutils/webclient/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h index 8abf9154b0..53e8c78976 100644 --- a/apps/nshlib/nsh_console.h +++ b/apps/nshlib/nsh_console.h @@ -2,7 +2,7 @@ * apps/nshlib/nsh_console.h * * Copyright (C) 2007-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile index 974c989133..7f911d81cc 100644 --- a/apps/system/free/Makefile +++ b/apps/system/free/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/system/free/README.txt b/apps/system/free/README.txt index dd92a94ae2..1c2d380d4e 100644 --- a/apps/system/free/README.txt +++ b/apps/system/free/README.txt @@ -2,5 +2,5 @@ This application provides UNIX style memory free information. Source: NuttX - Author: Gregory Nutt + Author: Gregory Nutt Date: 17. March 2011 diff --git a/apps/system/free/free.c b/apps/system/free/free.c index 2f61a1dae3..3d9698ecbe 100644 --- a/apps/system/free/free.c +++ b/apps/system/free/free.c @@ -2,7 +2,7 @@ * apps/system/free/free.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_bus.c b/apps/system/i2c/i2c_bus.c index 07e6d2da38..a684166ff7 100644 --- a/apps/system/i2c/i2c_bus.c +++ b/apps/system/i2c/i2c_bus.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_bus.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_common.c b/apps/system/i2c/i2c_common.c index e7b27693ad..4af648c7d5 100644 --- a/apps/system/i2c/i2c_common.c +++ b/apps/system/i2c/i2c_common.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_common.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_dev.c b/apps/system/i2c/i2c_dev.c index f2b5a0e212..3d0480a15c 100644 --- a/apps/system/i2c/i2c_dev.c +++ b/apps/system/i2c/i2c_dev.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_dev.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_get.c b/apps/system/i2c/i2c_get.c index 773f2c9637..08510af4b6 100644 --- a/apps/system/i2c/i2c_get.c +++ b/apps/system/i2c/i2c_get.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_get.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_main.c b/apps/system/i2c/i2c_main.c index fbaf677aa6..0cf6786cbc 100644 --- a/apps/system/i2c/i2c_main.c +++ b/apps/system/i2c/i2c_main.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_main.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_set.c b/apps/system/i2c/i2c_set.c index 66fd8c85a0..5baf7f8354 100644 --- a/apps/system/i2c/i2c_set.c +++ b/apps/system/i2c/i2c_set.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_set.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2c_verf.c b/apps/system/i2c/i2c_verf.c index 0fa34b96e1..109e9c4ce6 100644 --- a/apps/system/i2c/i2c_verf.c +++ b/apps/system/i2c/i2c_verf.c @@ -2,7 +2,7 @@ * apps/system/i2c/i2c_verf.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/i2c/i2ctool.h b/apps/system/i2c/i2ctool.h index 9726f0083f..4ff26d03ed 100644 --- a/apps/system/i2c/i2ctool.h +++ b/apps/system/i2c/i2ctool.h @@ -2,7 +2,7 @@ * apps/system/i2c/i2ctool.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile index 4528ad44ef..71d82f34ce 100755 --- a/apps/system/install/Makefile +++ b/apps/system/install/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/vsn/poweroff/Makefile b/apps/vsn/poweroff/Makefile index 6136810103..e58ecfa860 100644 --- a/apps/vsn/poweroff/Makefile +++ b/apps/vsn/poweroff/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/vsn/ramtron/Makefile b/apps/vsn/ramtron/Makefile index d91a6ca1b3..d930aa92cf 100644 --- a/apps/vsn/ramtron/Makefile +++ b/apps/vsn/ramtron/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/vsn/ramtron/ramtron.c b/apps/vsn/ramtron/ramtron.c index 0a648cc305..f1e8db100c 100644 --- a/apps/vsn/ramtron/ramtron.c +++ b/apps/vsn/ramtron/ramtron.c @@ -5,7 +5,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * * Authors: Uros Platise - * Gregory Nutt + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/vsn/sdcard/Makefile b/apps/vsn/sdcard/Makefile index d943b909d1..213021b257 100644 --- a/apps/vsn/sdcard/Makefile +++ b/apps/vsn/sdcard/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/apps/vsn/sdcard/sdcard.c b/apps/vsn/sdcard/sdcard.c index 47f6c728cf..a81e8432af 100644 --- a/apps/vsn/sdcard/sdcard.c +++ b/apps/vsn/sdcard/sdcard.c @@ -5,7 +5,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * * Authors: Uros Platise - * Gregory Nutt + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/vsn/sysinfo/Makefile b/apps/vsn/sysinfo/Makefile index f0aac6df20..b4afc8a97f 100644 --- a/apps/vsn/sysinfo/Makefile +++ b/apps/vsn/sysinfo/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011 Uros Platise. All rights reserved. # Author: Uros Platise -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index 02485f812d..d01ba3219a 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -778,3 +778,9 @@ Where is one of the following: > make menuconfig Then de-select "Networking Support" -> "Networking Support" + + UPDATE: The primary problem with the ENC29J60 is a v2 board issue: The + SPI FLASH and the ENC28J60 shared the same SPI chip select signal (PA4-SPI1-NSS). + In order to finish the debug of the ENC28J60, it may be necessary to lift + the SPI FLASH chip select pin from the board. + diff --git a/nuttx/net/send.c b/nuttx/net/send.c index 950b3fc0bc..8a5154191e 100644 --- a/nuttx/net/send.c +++ b/nuttx/net/send.c @@ -268,7 +268,7 @@ static uint16_t send_interrupt(struct uip_driver_s *dev, void *pvconn, * then the send won't actually make it out... it will be replaced with * an ARP request. * - * NOTE 1: This could an expensive check if there are a lot of entries + * NOTE 1: This could be an expensive check if there are a lot of entries * in the ARP table. Hence, we only check on the first packet -- when * snd_sent is zero. * From 2cb5c82c18a3954cd39ce37e513718074cace461 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 17:32:42 +0000 Subject: [PATCH 65/95] Email address change in misc/ git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5144 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- NxWidgets/libnxwidgets/COPYING | 4 +- misc/buildroot/ChangeLog | 22 +- misc/buildroot/toolchain/nxflat/Makefile | 2 +- misc/buildroot/toolchain/nxflat/arm/Makefile | 2 +- misc/buildroot/toolchain/nxflat/arm/arch.h | 2 +- misc/buildroot/toolchain/nxflat/arm/disarm.c | 4 +- .../toolchain/nxflat/arm/dyncall_skeleton.def | 2 +- misc/buildroot/toolchain/nxflat/ldnxflat.c | 4 +- misc/buildroot/toolchain/nxflat/mknxflat.c | 4 +- misc/buildroot/toolchain/nxflat/nxflat.h | 2 +- misc/buildroot/toolchain/nxflat/nxflat.mk | 2 +- misc/buildroot/toolchain/nxflat/readnxflat.c | 4 +- .../buildroot/toolchain/nxflat/reloc-macros.h | 2 +- .../toolchain/nxflat/thumb2/Makefile | 2 +- misc/buildroot/toolchain/nxflat/thumb2/arch.h | 2 +- .../toolchain/nxflat/thumb2/disthumb2.c | 2 +- .../nxflat/thumb2/dyncall_skeleton.def | 2 +- misc/drivers/INSTALL.sh | 2 +- misc/drivers/rtl8187x/INSTALL.sh | 2 +- misc/drivers/rtl8187x/rtl8187x.h | 2 +- misc/pascal/ChangeLog | 10 +- misc/pascal/Configure | 2 +- misc/pascal/Make.config.h | 2 +- misc/pascal/Make.defs | 2 +- misc/pascal/Reconfigure | 2 +- misc/pascal/config.info | 2 +- misc/pascal/include/keywords.h | 164 ++-- misc/pascal/include/paslib.h | 2 +- misc/pascal/include/pdefs.h | 2 +- misc/pascal/include/pedefs.h | 2 +- misc/pascal/include/perr.h | 2 +- misc/pascal/include/pfdefs.h | 186 ++-- misc/pascal/include/pinsn.h | 2 +- misc/pascal/include/podefs.h | 2 +- misc/pascal/include/poff.h | 2 +- misc/pascal/include/pofflib.h | 2 +- misc/pascal/include/pxdefs.h | 464 ++++----- misc/pascal/insn16/Makefile | 2 +- misc/pascal/insn16/include/pdbg.h | 104 +- misc/pascal/insn16/include/pexec.h | 2 +- misc/pascal/insn16/include/pinsn16.h | 2 +- misc/pascal/insn16/libinsn/Makefile | 2 +- misc/pascal/insn16/libinsn/paddopcode.c | 200 ++-- misc/pascal/insn16/libinsn/paddtmpopcode.c | 200 ++-- misc/pascal/insn16/libinsn/pdasm.c | 2 +- misc/pascal/insn16/libinsn/pgen.c | 2 +- misc/pascal/insn16/libinsn/pgetopcode.c | 2 +- misc/pascal/insn16/libinsn/preloc.c | 2 +- misc/pascal/insn16/plist/Makefile | 2 +- misc/pascal/insn16/plist/plist.c | 2 +- misc/pascal/insn16/popt/Makefile | 2 +- misc/pascal/insn16/popt/pcopt.c | 2 +- misc/pascal/insn16/popt/pcopt.h | 2 +- misc/pascal/insn16/popt/pfopt.c | 2 +- misc/pascal/insn16/popt/pfopt.h | 108 +-- misc/pascal/insn16/popt/pjopt.c | 2 +- misc/pascal/insn16/popt/pjopt.h | 2 +- misc/pascal/insn16/popt/plopt.c | 2 +- misc/pascal/insn16/popt/plopt.h | 2 +- misc/pascal/insn16/popt/polocal.c | 2 +- misc/pascal/insn16/popt/polocal.h | 2 +- misc/pascal/insn16/popt/popt.c | 2 +- misc/pascal/insn16/popt/popt.h | 104 +- misc/pascal/insn16/popt/psopt.c | 2 +- misc/pascal/insn16/popt/psopt.h | 108 +-- misc/pascal/insn16/prun/Make.defs | 2 +- misc/pascal/insn16/prun/Makefile | 2 +- misc/pascal/insn16/prun/pdbg.c | 2 +- misc/pascal/insn16/prun/pexec.c | 2 +- misc/pascal/insn16/prun/pload.c | 2 +- misc/pascal/insn16/prun/prun.c | 2 +- misc/pascal/insn32/Makefile | 2 +- misc/pascal/insn32/include/builtins.h | 2 +- misc/pascal/insn32/include/pexec.h | 2 +- misc/pascal/insn32/include/pinsn32.h | 2 +- misc/pascal/insn32/include/rinsn32.h | 2 +- misc/pascal/insn32/libinsn/Makefile | 2 +- misc/pascal/insn32/libinsn/paddopcode.c | 2 +- misc/pascal/insn32/libinsn/paddtmpopcode.c | 2 +- misc/pascal/insn32/libinsn/pdasm.c | 2 +- misc/pascal/insn32/libinsn/pgen.c | 2 +- misc/pascal/insn32/libinsn/pgetopcode.c | 2 +- misc/pascal/insn32/libinsn/preloc.c | 2 +- .../insn32/libinsn/presettmpopcodewrite.c | 2 +- misc/pascal/insn32/plist/Makefile | 2 +- misc/pascal/insn32/plist/plist.c | 2 +- misc/pascal/insn32/popt/Makefile | 2 +- misc/pascal/insn32/popt/pcopt.c | 2 +- misc/pascal/insn32/popt/pcopt.h | 94 +- misc/pascal/insn32/popt/pfopt.c | 2 +- misc/pascal/insn32/popt/pfopt.h | 108 +-- misc/pascal/insn32/popt/pjopt.c | 898 +++++++++--------- misc/pascal/insn32/popt/pjopt.h | 88 +- misc/pascal/insn32/popt/plopt.c | 2 +- misc/pascal/insn32/popt/plopt.h | 86 +- misc/pascal/insn32/popt/polocal.c | 542 +++++------ misc/pascal/insn32/popt/polocal.h | 146 +-- misc/pascal/insn32/popt/popt.c | 654 ++++++------- misc/pascal/insn32/popt/popt.h | 104 +- misc/pascal/insn32/popt/psopt.c | 2 +- misc/pascal/insn32/popt/psopt.h | 108 +-- misc/pascal/insn32/regm/Makefile | 2 +- misc/pascal/insn32/regm/regm.c | 2 +- misc/pascal/insn32/regm/regm.h | 2 +- misc/pascal/insn32/regm/regm_pass1.c | 2 +- misc/pascal/insn32/regm/regm_pass1.h | 116 +-- misc/pascal/insn32/regm/regm_pass2.c | 2 +- misc/pascal/insn32/regm/regm_pass2.h | 2 +- misc/pascal/insn32/regm/regm_registers2.c | 2 +- misc/pascal/insn32/regm/regm_registers2.h | 2 +- misc/pascal/insn32/regm/regm_tree.c | 2 +- misc/pascal/insn32/regm/regm_tree.h | 2 +- misc/pascal/libpas/Make.defs | 2 +- misc/pascal/libpas/Makefile | 2 +- misc/pascal/libpas/pextension.c | 2 +- misc/pascal/libpas/psignextend16.c | 2 +- misc/pascal/libpas/pswap.c | 2 +- misc/pascal/libpoff/Make.defs | 2 +- misc/pascal/libpoff/pfdbgcontainer.c | 2 +- misc/pascal/libpoff/pfdbgdiscard.c | 188 ++-- misc/pascal/libpoff/pfdbginfo.c | 2 +- misc/pascal/libpoff/pfdhdr.c | 364 +++---- misc/pascal/libpoff/pfdreloc.c | 2 +- misc/pascal/libpoff/pfdsymbol.c | 2 +- misc/pascal/libpoff/pfhandle.c | 390 ++++---- misc/pascal/libpoff/pfiprog.c | 2 +- misc/pascal/libpoff/pfirodata.c | 2 +- misc/pascal/libpoff/pflabel.c | 2 +- misc/pascal/libpoff/pflineno.c | 2 +- misc/pascal/libpoff/pfprivate.h | 2 +- misc/pascal/libpoff/pfproghandle.c | 254 ++--- misc/pascal/libpoff/pfrdbgfunc.c | 2 +- misc/pascal/libpoff/pfread.c | 2 +- misc/pascal/libpoff/pfrelease.c | 188 ++-- misc/pascal/libpoff/pfrfname.c | 2 +- misc/pascal/libpoff/pfrhdr.c | 2 +- misc/pascal/libpoff/pfrlineno.c | 2 +- misc/pascal/libpoff/pfrprog.c | 182 ++-- misc/pascal/libpoff/pfrrawlineno.c | 2 +- misc/pascal/libpoff/pfrrawreloc.c | 2 +- misc/pascal/libpoff/pfrseek.c | 2 +- misc/pascal/libpoff/pfrstring.c | 2 +- misc/pascal/libpoff/pfrsymbol.c | 2 +- misc/pascal/libpoff/pfswap.c | 2 +- misc/pascal/libpoff/pfsymhandle.c | 254 ++--- misc/pascal/libpoff/pftprog.c | 2 +- misc/pascal/libpoff/pftsymbol.c | 2 +- misc/pascal/libpoff/pfwdbgfunc.c | 2 +- misc/pascal/libpoff/pfwfname.c | 2 +- misc/pascal/libpoff/pfwhdr.c | 2 +- misc/pascal/libpoff/pfwlineno.c | 2 +- misc/pascal/libpoff/pfwprog.c | 2 +- misc/pascal/libpoff/pfwreloc.c | 2 +- misc/pascal/libpoff/pfwrite.c | 2 +- misc/pascal/libpoff/pfwrodata.c | 2 +- misc/pascal/libpoff/pfwstring.c | 2 +- misc/pascal/libpoff/pfwsymbol.c | 2 +- misc/pascal/libpoff/pfxprog.c | 2 +- misc/pascal/libpoff/pfxrodata.c | 2 +- misc/pascal/libpoff/pofferr.c | 2 +- misc/pascal/nuttx/INSTALL.sh | 2 +- misc/pascal/nuttx/keywords.h | 134 +-- misc/pascal/pascal/Makefile | 2 +- misc/pascal/pascal/pas.c | 2 +- misc/pascal/pascal/pas.h | 2 +- misc/pascal/pascal/pasdefs.h | 2 +- misc/pascal/pascal/pblck.c | 2 +- misc/pascal/pascal/pblck.h | 2 +- misc/pascal/pascal/pcexpr.c | 2 +- misc/pascal/pascal/pcfunc.c | 2 +- misc/pascal/pascal/perr.c | 2 +- misc/pascal/pascal/pexpr.c | 2 +- misc/pascal/pascal/pexpr.h | 2 +- misc/pascal/pascal/pffunc.c | 2 +- misc/pascal/pascal/pfunc.h | 114 +-- misc/pascal/pascal/pgen.c | 2 +- misc/pascal/pascal/pgen.h | 2 +- misc/pascal/pascal/pprgm.c | 2 +- misc/pascal/pascal/pprgm.h | 94 +- misc/pascal/pascal/pproc.c | 2 +- misc/pascal/pascal/pproc.h | 98 +- misc/pascal/pascal/pstm.c | 2 +- misc/pascal/pascal/pstm.h | 94 +- misc/pascal/pascal/ptbl.c | 2 +- misc/pascal/pascal/ptbl.h | 2 +- misc/pascal/pascal/ptdefs.h | 418 ++++---- misc/pascal/pascal/ptkn.c | 2 +- misc/pascal/pascal/ptkn.h | 2 +- misc/pascal/pascal/punit.c | 2 +- misc/pascal/pascal/punit.h | 102 +- misc/pascal/plink/Makefile | 2 +- misc/pascal/plink/plink.c | 2 +- misc/pascal/plink/plink.h | 104 +- misc/pascal/plink/plreloc.c | 2 +- misc/pascal/plink/plreloc.h | 2 +- misc/pascal/plink/plsym.c | 2 +- misc/pascal/plink/plsym.h | 2 +- misc/pascal/tests/501-uses.sh | 2 +- misc/pascal/tests/debug.sh | 2 +- misc/pascal/tests/list.sh | 2 +- misc/pascal/tests/testall.sh | 2 +- misc/pascal/tests/testone.sh | 2 +- 202 files changed, 3966 insertions(+), 3966 deletions(-) diff --git a/NxWidgets/libnxwidgets/COPYING b/NxWidgets/libnxwidgets/COPYING index 5e78c2ac26..f12e7b82e0 100644 --- a/NxWidgets/libnxwidgets/COPYING +++ b/NxWidgets/libnxwidgets/COPYING @@ -3,7 +3,7 @@ * Graphical Widgets for the NuttX RTOS * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,4 +67,4 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ********************************************************************************/ - \ No newline at end of file + diff --git a/misc/buildroot/ChangeLog b/misc/buildroot/ChangeLog index 58ee44e5a1..9c22edf036 100644 --- a/misc/buildroot/ChangeLog +++ b/misc/buildroot/ChangeLog @@ -1,16 +1,16 @@ -buildroot-0.1.0 2007-03-09 +buildroot-0.1.0 2007-03-09 Support for arm-elf toolchain buildroot-0.1.1 (revision number not used) -buildroot-0.1.2 2008-11-06 +buildroot-0.1.2 2008-11-06 * Add support for m68k-elf and m68hc11 toolchain * Add patch to build older binutils with newer Texinfo version * Add support for SH-1 toolchain -buildroot-0.1.3 2009-02-28 +buildroot-0.1.3 2009-02-28 * Add support for H8/300 toolchain * Add support for GCC 4.2.4 and binutils 2.19 @@ -18,7 +18,7 @@ buildroot-0.1.3 2009-02-28 * New ARM configuration using GCC 4.2.4 and binutils 2.19 * Add Renesas R8C/M16C/M32C configuration using GCC 4.2.4 and binutils 2.19 -buildroot-0.1.4 2009-04-19 +buildroot-0.1.4 2009-04-19 * Add support for a blackfin toolchain using GCC 4.2.4 and binutils 2.19 * GCC 4.2.4 no longer attempts to build libstdc++. Now we can build g++! @@ -27,7 +27,7 @@ buildroot-0.1.4 2009-04-19 we do not build a libc. Now it builds almost twice as fast. * Removed logic to build the target GCC. That is never used. -buildroot-0.1.5 2009-04-25 +buildroot-0.1.5 2009-04-25 * Replaced config/arm-defconfig-4.2.4 with config/arm920t-defconfig-4.2.4 and config/arm926t-defconfig-4.2.4 because of differences in the @@ -36,7 +36,7 @@ buildroot-0.1.5 2009-04-25 * Add support for gcc-4.3.3 and the ARM Cortex-M3 processor (thumb2) * Add support for binutils 2.19.1 -buildroot-0.1.6 2009-05-19 +buildroot-0.1.6 2009-05-19 * Added config/arm7tdmi-defconfig-4.2.4 * Added config/arm920t-defconfig-4.3.3 @@ -45,14 +45,14 @@ buildroot-0.1.6 2009-05-19 * Correct error in gcc-3.4.6/gcc/collect.c. Calls open with O_CREAT but does not specify mode. Newer host compilers can error out on this. -buildroot-0.1.7 2009-06-26 +buildroot-0.1.7 2009-06-26 * configs/avr-defconfig-4.3.3: Added support for AVR to support a NuttX port of the ATmega128. * toolchain/nxflat: Added logic to build NuttX NXFLAT binding support tools * toolchain/genromfs: Added support for the genromfs tool -buildroot-1.8 2009-12-21 +buildroot-1.8 2009-12-21 * configs/cortexm3-defconfig-4.3.3: Added support for NuttX NXFLAT tools. @@ -64,7 +64,7 @@ buildroot-1.8 2009-12-21 * configs/m32c-defconfig-4.2.4: Added genromfs * configs/m32c-defconfig-4.3.3: Update to m32c-defconfig-4.2.4 -buildroot-1.9 2011-02-10 +buildroot-1.9 2011-02-10 * configs/arm926t-defconfig-4.3.3: update arm926t-defconfig-4.2.4 * configs/arm926t-defconfig-nxflat: NXFLAT-only configuration for @@ -77,7 +77,7 @@ buildroot-1.9 2011-02-10 patches available from http://www.msextra.com/tools courtesy of James Cortina. Add configs/m9x12x-defconfig-3.3.6. -buildroot-1.10 2011-05-06 +buildroot-1.10 2011-05-06 * Add patch submitted by Dimiter Georgiev to work around problems in building GDB 6.8 with versions of Cygwin > 1.7. @@ -101,7 +101,7 @@ buildroot-1.10 2011-05-06 * configs/arm920t-eabi-defconfig-4.5.2 - Add a configuration to build a GCC 4.5.2 EABI ARM toolchain for the ARM920t. -buildroot-1.11 2011-xx-xx +buildroot-1.11 2011-xx-xx * configs/avr-defconfig-4.3.3 - Added --enable-long-long as a GCC option. diff --git a/misc/buildroot/toolchain/nxflat/Makefile b/misc/buildroot/toolchain/nxflat/Makefile index b2a465827d..892362708d 100644 --- a/misc/buildroot/toolchain/nxflat/Makefile +++ b/misc/buildroot/toolchain/nxflat/Makefile @@ -2,7 +2,7 @@ # toolchain/nxflat/Makefile # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/arm/Makefile b/misc/buildroot/toolchain/nxflat/arm/Makefile index 68abf2afd6..967fe80540 100644 --- a/misc/buildroot/toolchain/nxflat/arm/Makefile +++ b/misc/buildroot/toolchain/nxflat/arm/Makefile @@ -2,7 +2,7 @@ # toolchain/nxflat/arm/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/arm/arch.h b/misc/buildroot/toolchain/nxflat/arm/arch.h index 83f25655a6..7839d97f88 100644 --- a/misc/buildroot/toolchain/nxflat/arm/arch.h +++ b/misc/buildroot/toolchain/nxflat/arm/arch.h @@ -3,7 +3,7 @@ * ARM thumb2 ELF support for BFD. * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Simply lifted with minimal change from the BFD, binutils 2.19.1: * diff --git a/misc/buildroot/toolchain/nxflat/arm/disarm.c b/misc/buildroot/toolchain/nxflat/arm/disarm.c index 5826df3b49..c1d8257de3 100644 --- a/misc/buildroot/toolchain/nxflat/arm/disarm.c +++ b/misc/buildroot/toolchain/nxflat/arm/disarm.c @@ -3,13 +3,13 @@ * ARM Disassembler * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Derived from XFLAT: * * Copyright (c) 2006, Cadenux, LLC. All rights reserved. * Copyright (c) 2006, Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Which simply lifted it from the BFD: * diff --git a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def index fbe8b5081e..8a42e64864 100644 --- a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def +++ b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def @@ -2,7 +2,7 @@ * toolchain/nxflat/arm/dyncall_skeleton.def * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/ldnxflat.c b/misc/buildroot/toolchain/nxflat/ldnxflat.c index 847e843b30..69cb195290 100644 --- a/misc/buildroot/toolchain/nxflat/ldnxflat.c +++ b/misc/buildroot/toolchain/nxflat/ldnxflat.c @@ -9,14 +9,14 @@ * will and GOT relocations as well). * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * * Modified from ldelf2xflat (see http://xflat.org): * * Copyright (c) 2002, 2006, Cadenux, LLC. All rights reserved. * Copyright (c) 2002, 2006, Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Extended from the FLAT ldnxflat.c (original copyright below ) * diff --git a/misc/buildroot/toolchain/nxflat/mknxflat.c b/misc/buildroot/toolchain/nxflat/mknxflat.c index d2f44e284a..3e73d62877 100644 --- a/misc/buildroot/toolchain/nxflat/mknxflat.c +++ b/misc/buildroot/toolchain/nxflat/mknxflat.c @@ -2,13 +2,13 @@ * xflat/tools/mknxflat.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Modified from ldelflib (see http://xflat.org): * * Copyright (c) 2002, 2006, Cadenux, LLC. All rights reserved. * Copyright (c) 2002, 2006, Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/nxflat.h b/misc/buildroot/toolchain/nxflat/nxflat.h index f8d28deb40..ff41a733d9 100644 --- a/misc/buildroot/toolchain/nxflat/nxflat.h +++ b/misc/buildroot/toolchain/nxflat/nxflat.h @@ -2,7 +2,7 @@ * toolchain/nxflat/nxflat.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/nxflat.mk b/misc/buildroot/toolchain/nxflat/nxflat.mk index 307a96fca7..3a7a03c0ed 100644 --- a/misc/buildroot/toolchain/nxflat/nxflat.mk +++ b/misc/buildroot/toolchain/nxflat/nxflat.mk @@ -2,7 +2,7 @@ # toolchain/nxflat/nxflat.mk # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/readnxflat.c b/misc/buildroot/toolchain/nxflat/readnxflat.c index c5d5a63668..e19e2d6991 100644 --- a/misc/buildroot/toolchain/nxflat/readnxflat.c +++ b/misc/buildroot/toolchain/nxflat/readnxflat.c @@ -2,13 +2,13 @@ * toolchain/nxflat/readnxflat.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Modified from readxflat (see http://xflat.org): * * Copyright (c) 2002, 2006, Cadenux, LLC. All rights reserved. * Copyright (c) 2002, 2006, Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/reloc-macros.h b/misc/buildroot/toolchain/nxflat/reloc-macros.h index c3f88ba7ae..91b9fd1ea2 100644 --- a/misc/buildroot/toolchain/nxflat/reloc-macros.h +++ b/misc/buildroot/toolchain/nxflat/reloc-macros.h @@ -3,7 +3,7 @@ * Generic relocation support for BFD. * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Simply lifted with minimal change from the BFD, binutils 2.19.1: * diff --git a/misc/buildroot/toolchain/nxflat/thumb2/Makefile b/misc/buildroot/toolchain/nxflat/thumb2/Makefile index dc00867e05..ad87449fa5 100644 --- a/misc/buildroot/toolchain/nxflat/thumb2/Makefile +++ b/misc/buildroot/toolchain/nxflat/thumb2/Makefile @@ -2,7 +2,7 @@ # toolchain/nxflat/thumb2/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/buildroot/toolchain/nxflat/thumb2/arch.h b/misc/buildroot/toolchain/nxflat/thumb2/arch.h index bacc63892d..c07c4f62e7 100644 --- a/misc/buildroot/toolchain/nxflat/thumb2/arch.h +++ b/misc/buildroot/toolchain/nxflat/thumb2/arch.h @@ -3,7 +3,7 @@ * ARM thumb2 ELF support for BFD. * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Simply lifted with minimal change from the BFD, binutils 2.19.1: * diff --git a/misc/buildroot/toolchain/nxflat/thumb2/disthumb2.c b/misc/buildroot/toolchain/nxflat/thumb2/disthumb2.c index 79352ce8b5..811c3a8671 100644 --- a/misc/buildroot/toolchain/nxflat/thumb2/disthumb2.c +++ b/misc/buildroot/toolchain/nxflat/thumb2/disthumb2.c @@ -3,7 +3,7 @@ * ARM Thumb2 Disassembler * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * ***********************************************************************/ diff --git a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def index e0d0144905..865536c502 100644 --- a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def +++ b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def @@ -2,7 +2,7 @@ * toolchain/nxflat/thumb2/dyncall_skeleton.def * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/drivers/INSTALL.sh b/misc/drivers/INSTALL.sh index 66205af9fd..d918c0dd4c 100755 --- a/misc/drivers/INSTALL.sh +++ b/misc/drivers/INSTALL.sh @@ -3,7 +3,7 @@ # Install ALL optional drivers into the NuttX source tree # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/drivers/rtl8187x/INSTALL.sh b/misc/drivers/rtl8187x/INSTALL.sh index fadb5b98c4..839fb7768b 100755 --- a/misc/drivers/rtl8187x/INSTALL.sh +++ b/misc/drivers/rtl8187x/INSTALL.sh @@ -3,7 +3,7 @@ # Install the GPLv2 RTL8187x driver into the NuttX source tree # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/drivers/rtl8187x/rtl8187x.h b/misc/drivers/rtl8187x/rtl8187x.h index f668276476..8783f1e92e 100755 --- a/misc/drivers/rtl8187x/rtl8187x.h +++ b/misc/drivers/rtl8187x/rtl8187x.h @@ -5,7 +5,7 @@ * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Rafael Noronha. All rights reserved. - * Authors: Gregoyr Nutt + * Authors: Gregoyr Nutt * Rafael Noronha * * Portions of the logic in this file derives from the KisMAC RTL8187x driver diff --git a/misc/pascal/ChangeLog b/misc/pascal/ChangeLog index cb064a3269..39d9c413ca 100644 --- a/misc/pascal/ChangeLog +++ b/misc/pascal/ChangeLog @@ -1,12 +1,12 @@ -pascal-0.1.0 2008-01-07 Gregory Nutt +pascal-0.1.0 2008-01-07 Gregory Nutt * Initial release -pascal-0.1.1 2008-02-01 Gregory Nutt +pascal-0.1.1 2008-02-01 Gregory Nutt * Correct some errors in the NuttX installation logic -pascal-0.1.2 2008-02-10 Gregory Nutt +pascal-0.1.2 2008-02-10 Gregory Nutt * Add logic to build and link with the ZDS-II toolchain use with the z16f. @@ -16,13 +16,13 @@ pascal-0.1.2 2008-02-10 Gregory Nutt and eliminate a compiler bug * Changes so that runtime compiles with SDCC. -pascal-2.0 2009-12-21 Gregory Nutt +pascal-2.0 2009-12-21 Gregory Nutt * Updated to use standard C99 types in stdint.h and stdbool.h. This change was necessary for compatibility with NuttX-5.0 (any beyond). -pascal-3.0 2010-05-15 Gregory Nutt +pascal-3.0 2010-05-15 Gregory Nutt * nuttx/: The Pascal add-on module now installs and builds under the apps/interpreters directory. This means that the pascal-3.0 module is diff --git a/misc/pascal/Configure b/misc/pascal/Configure index d6c16d0fe3..569ded2cf1 100755 --- a/misc/pascal/Configure +++ b/misc/pascal/Configure @@ -3,7 +3,7 @@ # Configure # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/Make.config.h b/misc/pascal/Make.config.h index ab34b4fd35..282b253ced 100644 --- a/misc/pascal/Make.config.h +++ b/misc/pascal/Make.config.h @@ -2,7 +2,7 @@ # Make.config.h # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/Make.defs b/misc/pascal/Make.defs index cb0afc924c..0348bf4d31 100644 --- a/misc/pascal/Make.defs +++ b/misc/pascal/Make.defs @@ -2,7 +2,7 @@ # Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/Reconfigure b/misc/pascal/Reconfigure index 98c5e5e74d..38b64b8b3f 100755 --- a/misc/pascal/Reconfigure +++ b/misc/pascal/Reconfigure @@ -3,7 +3,7 @@ # Reconfigure # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/config.info b/misc/pascal/config.info index b7ae3a05c8..8147eba65f 100755 --- a/misc/pascal/config.info +++ b/misc/pascal/config.info @@ -3,7 +3,7 @@ # config.info # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/keywords.h b/misc/pascal/include/keywords.h index 6025524d94..7784d8df9e 100644 --- a/misc/pascal/include/keywords.h +++ b/misc/pascal/include/keywords.h @@ -1,82 +1,82 @@ -/************************************************************* - * keywords.h - * This file defines the pascal compilation environment - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - *************************************************************/ - -#ifndef __KEYWORDS_H -#define __KEYWORDS_H - -/************************************************************* - * Included Files - *************************************************************/ - -#include "config.h" - -/************************************************************* - *Pre-processor Definitions - *************************************************************/ - -#ifndef NULL -# define NULL ((void*)0) -#endif - -#ifndef CONFIG_DEBUG -# define CONFIG_DEBUG 0 -#endif - -#if CONFIG_DEBUG -# define DEBUG(stream, format, arg...) fprintf(stream, format, ##arg) -#else -# define DEBUG(x...) -#endif - -#ifndef CONFIG_TRACE -# define CONFIG_TRACE 0 -#endif - -#if CONFIG_TRACE -# define TRACE(stream, format, arg...) fprintf(stream, format, ##arg) -#else -# define TRACE(x...) -#endif - -#define FAR - -#define dbg(...) fprintf(stderr, __VA_ARGS__) -#define vdbg(...) DEBUG(__VA_ARGS__) - -#endif /* __KEYWORDS_H */ - - - +/************************************************************* + * keywords.h + * This file defines the pascal compilation environment + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + *************************************************************/ + +#ifndef __KEYWORDS_H +#define __KEYWORDS_H + +/************************************************************* + * Included Files + *************************************************************/ + +#include "config.h" + +/************************************************************* + *Pre-processor Definitions + *************************************************************/ + +#ifndef NULL +# define NULL ((void*)0) +#endif + +#ifndef CONFIG_DEBUG +# define CONFIG_DEBUG 0 +#endif + +#if CONFIG_DEBUG +# define DEBUG(stream, format, arg...) fprintf(stream, format, ##arg) +#else +# define DEBUG(x...) +#endif + +#ifndef CONFIG_TRACE +# define CONFIG_TRACE 0 +#endif + +#if CONFIG_TRACE +# define TRACE(stream, format, arg...) fprintf(stream, format, ##arg) +#else +# define TRACE(x...) +#endif + +#define FAR + +#define dbg(...) fprintf(stderr, __VA_ARGS__) +#define vdbg(...) DEBUG(__VA_ARGS__) + +#endif /* __KEYWORDS_H */ + + + diff --git a/misc/pascal/include/paslib.h b/misc/pascal/include/paslib.h index 7b2016401e..55f965c102 100644 --- a/misc/pascal/include/paslib.h +++ b/misc/pascal/include/paslib.h @@ -3,7 +3,7 @@ * External Declarations associated with paslib * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/pdefs.h b/misc/pascal/include/pdefs.h index 692dd2817b..3f794a9819 100644 --- a/misc/pascal/include/pdefs.h +++ b/misc/pascal/include/pdefs.h @@ -3,7 +3,7 @@ * Common definitions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/pedefs.h b/misc/pascal/include/pedefs.h index 56adebe9a1..4957a9d2b6 100644 --- a/misc/pascal/include/pedefs.h +++ b/misc/pascal/include/pedefs.h @@ -3,7 +3,7 @@ * Definitions of error codes * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/perr.h b/misc/pascal/include/perr.h index daf5a4639b..a272ce89c3 100644 --- a/misc/pascal/include/perr.h +++ b/misc/pascal/include/perr.h @@ -3,7 +3,7 @@ * External Declarations associated with perr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/pfdefs.h b/misc/pascal/include/pfdefs.h index 76072ed2c4..ac861a641a 100644 --- a/misc/pascal/include/pfdefs.h +++ b/misc/pascal/include/pfdefs.h @@ -1,93 +1,93 @@ -/*********************************************************************** - * pfdefs.h - * Floating point operation codes - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***********************************************************************/ - -#ifndef __PFDEFS_H -#define __PFDEFS_H - -/*********************************************************************** - * FLOATING POINT SUB-OPCODES - ***********************************************************************/ - -/* This bit may be set in the opcode to indicate that the arguments - * is(are) type integer and require(s) conversion. */ - -#define fpARG1 (0x40) -#define fpARG2 (0x80) -#define fpMASK (0x3f) -#define fpSHIFT 6 - -/* The "INVALID" floating point operation */ - -#define fpINVLD (0x00) - -/* Floating Pointer Conversions (On 16-bit stack argument: FP or Integer) */ - -#define fpFLOAT (0x01) -#define fpTRUNC (0x02) -#define fpROUND (0x03) - -/* Floating Point arithmetic instructions (Two FP 16-bit stack arguments) */ - -#define fpADD (0x04) -#define fpSUB (0x05) -#define fpMUL (0x06) -#define fpDIV (0x07) -#define fpMOD (0x08) - -/* Floating Point Comparisons (Two FP 16-bit stack arguments) */ - -#define fpEQU (0x0a) -#define fpNEQ (0x0b) -#define fpLT (0x0c) -#define fpGTE (0x0d) -#define fpGT (0x0e) -#define fpLTE (0x0f) - -/* Floating Point arithmetic instructions (One FP 16-bit stack arguments) */ - -#define fpNEG (0x10) -#define fpABS (0x11) -#define fpSQR (0x12) -#define fpSQRT (0x13) -#define fpSIN (0x14) -#define fpCOS (0x15) -#define fpATAN (0x16) -#define fpLN (0x17) -#define fpEXP (0x18) - -#define MAX_FOP (0x19) /* Number of floating point operations */ - -#endif /* __PFDEFS_H */ +/*********************************************************************** + * pfdefs.h + * Floating point operation codes + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PFDEFS_H +#define __PFDEFS_H + +/*********************************************************************** + * FLOATING POINT SUB-OPCODES + ***********************************************************************/ + +/* This bit may be set in the opcode to indicate that the arguments + * is(are) type integer and require(s) conversion. */ + +#define fpARG1 (0x40) +#define fpARG2 (0x80) +#define fpMASK (0x3f) +#define fpSHIFT 6 + +/* The "INVALID" floating point operation */ + +#define fpINVLD (0x00) + +/* Floating Pointer Conversions (On 16-bit stack argument: FP or Integer) */ + +#define fpFLOAT (0x01) +#define fpTRUNC (0x02) +#define fpROUND (0x03) + +/* Floating Point arithmetic instructions (Two FP 16-bit stack arguments) */ + +#define fpADD (0x04) +#define fpSUB (0x05) +#define fpMUL (0x06) +#define fpDIV (0x07) +#define fpMOD (0x08) + +/* Floating Point Comparisons (Two FP 16-bit stack arguments) */ + +#define fpEQU (0x0a) +#define fpNEQ (0x0b) +#define fpLT (0x0c) +#define fpGTE (0x0d) +#define fpGT (0x0e) +#define fpLTE (0x0f) + +/* Floating Point arithmetic instructions (One FP 16-bit stack arguments) */ + +#define fpNEG (0x10) +#define fpABS (0x11) +#define fpSQR (0x12) +#define fpSQRT (0x13) +#define fpSIN (0x14) +#define fpCOS (0x15) +#define fpATAN (0x16) +#define fpLN (0x17) +#define fpEXP (0x18) + +#define MAX_FOP (0x19) /* Number of floating point operations */ + +#endif /* __PFDEFS_H */ diff --git a/misc/pascal/include/pinsn.h b/misc/pascal/include/pinsn.h index de4f571dd7..b2276b099f 100644 --- a/misc/pascal/include/pinsn.h +++ b/misc/pascal/include/pinsn.h @@ -3,7 +3,7 @@ * External Declarations associated libinsn.a * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/podefs.h b/misc/pascal/include/podefs.h index 9d372b4029..fc25d62a48 100644 --- a/misc/pascal/include/podefs.h +++ b/misc/pascal/include/podefs.h @@ -3,7 +3,7 @@ * Logical P-code operation code definitions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/poff.h b/misc/pascal/include/poff.h index e0516f9ee4..7cc33b2901 100644 --- a/misc/pascal/include/poff.h +++ b/misc/pascal/include/poff.h @@ -3,7 +3,7 @@ * Definitions for the PCode Object File Format (POFF) * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/pofflib.h b/misc/pascal/include/pofflib.h index 44013623c5..3547fca60b 100644 --- a/misc/pascal/include/pofflib.h +++ b/misc/pascal/include/pofflib.h @@ -3,7 +3,7 @@ * Interfaces to the POFF library * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/include/pxdefs.h b/misc/pascal/include/pxdefs.h index 202ccfe5f4..8c9ab834dc 100644 --- a/misc/pascal/include/pxdefs.h +++ b/misc/pascal/include/pxdefs.h @@ -1,232 +1,232 @@ -/*********************************************************************** - * pxdefs.h - * Definitions of the arguments of the oSYSIO opcode - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***********************************************************************/ - -#ifndef __PXDEFS_H -#define __PXDEFS_H - -/***********************************************************************/ -/* Codes for system IO calls associated with standard Pascal procedure - * and function calls. These must be confined to the range 0x0000 - * through 0xffff. - */ - -#define xEOF (0x0001) -#define xEOLN (0x0002) -#define xRESET (0x0003) -#define xREWRITE (0x0004) - -#define xREADLN (0x0010) -#define xREAD_PAGE (0x0011) -#define xREAD_BINARY (0x0012) -#define xREAD_INT (0x0013) -#define xREAD_CHAR (0x0014) -#define xREAD_STRING (0x0015) -#define xREAD_REAL (0x0016) - -#define xWRITELN (0x0020) -#define xWRITE_PAGE (0x0021) -#define xWRITE_BINARY (0x0022) -#define xWRITE_INT (0x0023) -#define xWRITE_CHAR (0x0024) -#define xWRITE_STRING (0x0025) -#define xWRITE_REAL (0x0026) - -#define MAX_XOP (0x0027) - -/***********************************************************************/ -/* Codes for runtime library interfaces. These must be confined to the - * range 0x0000 through 0xffff. - */ - -/* Get an environment string. - * function getent(name : string) : cstring; - * ON INPUT: - * TOS(0)=length of string - * TOS(1)=pointer to string - * ON RETURN: actual parameters released - * TOS(0,1)=32-bit absolute address of string - */ - -#define lbGETENV (0x0000) - -/* Copy pascal string to a pascal string - * procedure str2str(src : string; var dest : string) - * ON INPUT: - * TOS(0)=address of dest string - * TOS(1)=length of source string - * TOS(2)=pointer to source string - * ON RETURN: actual parameters released. - */ - -#define lbSTR2STR (0x0001) - -/* Copy C string to a pascal string - * procedure cstr2str(src : cstring; var dest : string) - * ON INPUT: - * TOS(0)=address of dest string - * TOS(1,2)=32-bit absolute address of C string - * ON RETURN: actual parameters released - */ - -#define lbCSTR2STR (0x0002) - -/* Copy pascal string to a pascal string reference - * procedure str2rstr(src : string; var dest : rstring) - * ON INPUT: - * TOS(0)=address of dest string reference - * TOS(1)=length of source string - * TOS(2)=pointer to source string - * ON RETURN: actual parameters released. - */ - -#define lbSTR2RSTR (0x0003) - -/* Copy C string to a pascal string reference - * procedure cstr2str(src : cstring; var dest : string) - * ON INPUT: - * TOS(0)=address of dest string reference - * TOS(0)=MS 16-bits of 32-bit C source string pointer - * TOS(1)=LS 16-bits of 32-bit C source string pointer - * ON RETURN: actual parameters released - */ - -#define lbCSTR2RSTR (0x0004) - -/* Convert a string to a numeric value - * procedure val(const s : string; var v; var code : word); - * - * Description: - * val() converts the value represented in the string S to a numerical - * value, and stores this value in the variable V, which can be of type - * Longint, Real and Byte. If the conversion isn¡Çt succesfull, then the - * parameter Code contains the index of the character in S which - * prevented the conversion. The string S is allowed to contain spaces - * in the beginning. - * - * The string S can contain a number in decimal, hexadecimal, binary or - * octal format, as described in the language reference. - * - * Errors: - * If the conversion doesn¡Çt succeed, the value of Code indicates the - * position where the conversion went wrong. - * - * ON INPUT - * TOS(0)=address of Code - * TOS(1)=address of v - * TOS(2)=length of source string - * TOS(3)=pointer to source string - * ON RETURN: actual parameters released - */ - -#define lbVAL (0x0005) - -/* Create an empty string - * function mkstk : string; - * ON INPUT - * ON RETURN - * TOS(0)=length of new string - * TOS(1)=pointer to new string - */ - -#define lbMKSTK (0x0006) - -/* Replace a string with a duplicate string residing in allocated - * string stack. - * function mkstkstr(name : string) : string; - * ON INPUT - * TOS(0)=length of original string - * TOS(1)=pointer to original string - * ON RETURN - * TOS(0)=length of new string - * TOS(1)=pointer to new string - */ - -#define lbMKSTKSTR (0x0007) - -/* Replace a character with a string residing in allocated string stack. - * function mkstkc(c : char) : string; - * ON INPUT - * TOS(0)=Character value - * ON RETURN - * TOS(0)=length of new string - * TOS(1)=pointer to new string - */ - -#define lbMKSTKC (0x0008) - -/* Concatenate a string to the end of a string. - * function strcat(name : string, c : char) : string; - * ON INPUT - * TOS(0)=length of string - * TOS(1)=pointer to string - * TOS(2)=length of string - * TOS(3)=pointer to string - * ON OUTPUT - * TOS(1)=new length of string - * TOS(2)=pointer to string - */ - -#define lbSTRCAT (0x0009) - -/* Concatenate a character to the end of a string. - * function strcatc(name : string, c : char) : string; - * ON INPUT - * TOS(0)=character to concatenate - * TOS(1)=length of string - * TOS(2)=pointer to string - * ON OUTPUT - * TOS(1)=new length of string - * TOS(2)=pointer to string - */ - -#define lbSTRCATC (0x000a) - -/* Compare two pascal strings - * function strcmp(name1 : string, name2 : string) : integer; - * ON INPUT - * TOS(1)=length of string2 - * TOS(2)=address of string2 data - * TOS(3)=length of string1 - * TOS(4)=address of string1 data - * ON OUTPUT - * TOS(0)=(-1=less than, 0=equal, 1=greater than} - */ - -#define lbSTRCMP (0x000b) - -#define MAX_LBOP (0x000c) - -#endif /* __PXDEFS_H */ +/*********************************************************************** + * pxdefs.h + * Definitions of the arguments of the oSYSIO opcode + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PXDEFS_H +#define __PXDEFS_H + +/***********************************************************************/ +/* Codes for system IO calls associated with standard Pascal procedure + * and function calls. These must be confined to the range 0x0000 + * through 0xffff. + */ + +#define xEOF (0x0001) +#define xEOLN (0x0002) +#define xRESET (0x0003) +#define xREWRITE (0x0004) + +#define xREADLN (0x0010) +#define xREAD_PAGE (0x0011) +#define xREAD_BINARY (0x0012) +#define xREAD_INT (0x0013) +#define xREAD_CHAR (0x0014) +#define xREAD_STRING (0x0015) +#define xREAD_REAL (0x0016) + +#define xWRITELN (0x0020) +#define xWRITE_PAGE (0x0021) +#define xWRITE_BINARY (0x0022) +#define xWRITE_INT (0x0023) +#define xWRITE_CHAR (0x0024) +#define xWRITE_STRING (0x0025) +#define xWRITE_REAL (0x0026) + +#define MAX_XOP (0x0027) + +/***********************************************************************/ +/* Codes for runtime library interfaces. These must be confined to the + * range 0x0000 through 0xffff. + */ + +/* Get an environment string. + * function getent(name : string) : cstring; + * ON INPUT: + * TOS(0)=length of string + * TOS(1)=pointer to string + * ON RETURN: actual parameters released + * TOS(0,1)=32-bit absolute address of string + */ + +#define lbGETENV (0x0000) + +/* Copy pascal string to a pascal string + * procedure str2str(src : string; var dest : string) + * ON INPUT: + * TOS(0)=address of dest string + * TOS(1)=length of source string + * TOS(2)=pointer to source string + * ON RETURN: actual parameters released. + */ + +#define lbSTR2STR (0x0001) + +/* Copy C string to a pascal string + * procedure cstr2str(src : cstring; var dest : string) + * ON INPUT: + * TOS(0)=address of dest string + * TOS(1,2)=32-bit absolute address of C string + * ON RETURN: actual parameters released + */ + +#define lbCSTR2STR (0x0002) + +/* Copy pascal string to a pascal string reference + * procedure str2rstr(src : string; var dest : rstring) + * ON INPUT: + * TOS(0)=address of dest string reference + * TOS(1)=length of source string + * TOS(2)=pointer to source string + * ON RETURN: actual parameters released. + */ + +#define lbSTR2RSTR (0x0003) + +/* Copy C string to a pascal string reference + * procedure cstr2str(src : cstring; var dest : string) + * ON INPUT: + * TOS(0)=address of dest string reference + * TOS(0)=MS 16-bits of 32-bit C source string pointer + * TOS(1)=LS 16-bits of 32-bit C source string pointer + * ON RETURN: actual parameters released + */ + +#define lbCSTR2RSTR (0x0004) + +/* Convert a string to a numeric value + * procedure val(const s : string; var v; var code : word); + * + * Description: + * val() converts the value represented in the string S to a numerical + * value, and stores this value in the variable V, which can be of type + * Longint, Real and Byte. If the conversion isn¡Çt succesfull, then the + * parameter Code contains the index of the character in S which + * prevented the conversion. The string S is allowed to contain spaces + * in the beginning. + * + * The string S can contain a number in decimal, hexadecimal, binary or + * octal format, as described in the language reference. + * + * Errors: + * If the conversion doesn¡Çt succeed, the value of Code indicates the + * position where the conversion went wrong. + * + * ON INPUT + * TOS(0)=address of Code + * TOS(1)=address of v + * TOS(2)=length of source string + * TOS(3)=pointer to source string + * ON RETURN: actual parameters released + */ + +#define lbVAL (0x0005) + +/* Create an empty string + * function mkstk : string; + * ON INPUT + * ON RETURN + * TOS(0)=length of new string + * TOS(1)=pointer to new string + */ + +#define lbMKSTK (0x0006) + +/* Replace a string with a duplicate string residing in allocated + * string stack. + * function mkstkstr(name : string) : string; + * ON INPUT + * TOS(0)=length of original string + * TOS(1)=pointer to original string + * ON RETURN + * TOS(0)=length of new string + * TOS(1)=pointer to new string + */ + +#define lbMKSTKSTR (0x0007) + +/* Replace a character with a string residing in allocated string stack. + * function mkstkc(c : char) : string; + * ON INPUT + * TOS(0)=Character value + * ON RETURN + * TOS(0)=length of new string + * TOS(1)=pointer to new string + */ + +#define lbMKSTKC (0x0008) + +/* Concatenate a string to the end of a string. + * function strcat(name : string, c : char) : string; + * ON INPUT + * TOS(0)=length of string + * TOS(1)=pointer to string + * TOS(2)=length of string + * TOS(3)=pointer to string + * ON OUTPUT + * TOS(1)=new length of string + * TOS(2)=pointer to string + */ + +#define lbSTRCAT (0x0009) + +/* Concatenate a character to the end of a string. + * function strcatc(name : string, c : char) : string; + * ON INPUT + * TOS(0)=character to concatenate + * TOS(1)=length of string + * TOS(2)=pointer to string + * ON OUTPUT + * TOS(1)=new length of string + * TOS(2)=pointer to string + */ + +#define lbSTRCATC (0x000a) + +/* Compare two pascal strings + * function strcmp(name1 : string, name2 : string) : integer; + * ON INPUT + * TOS(1)=length of string2 + * TOS(2)=address of string2 data + * TOS(3)=length of string1 + * TOS(4)=address of string1 data + * ON OUTPUT + * TOS(0)=(-1=less than, 0=equal, 1=greater than} + */ + +#define lbSTRCMP (0x000b) + +#define MAX_LBOP (0x000c) + +#endif /* __PXDEFS_H */ diff --git a/misc/pascal/insn16/Makefile b/misc/pascal/insn16/Makefile index 4cd99082e6..0af4ae13e0 100644 --- a/misc/pascal/insn16/Makefile +++ b/misc/pascal/insn16/Makefile @@ -2,7 +2,7 @@ # insn16/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/include/pdbg.h b/misc/pascal/insn16/include/pdbg.h index 1a0e148d27..78c6cb190c 100644 --- a/misc/pascal/insn16/include/pdbg.h +++ b/misc/pascal/insn16/include/pdbg.h @@ -1,52 +1,52 @@ -/*************************************************************************** - * pdbg.h - * External Declarations associated with the P-Code debugger - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PDBG_H -#define __PDBG_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pexec.h" - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void dbg_run(struct pexec_s *st); - -#endif /* __PDBG_H */ +/*************************************************************************** + * pdbg.h + * External Declarations associated with the P-Code debugger + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PDBG_H +#define __PDBG_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pexec.h" + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void dbg_run(struct pexec_s *st); + +#endif /* __PDBG_H */ diff --git a/misc/pascal/insn16/include/pexec.h b/misc/pascal/insn16/include/pexec.h index d593232c33..356757d539 100644 --- a/misc/pascal/insn16/include/pexec.h +++ b/misc/pascal/insn16/include/pexec.h @@ -2,7 +2,7 @@ * pexec.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/include/pinsn16.h b/misc/pascal/insn16/include/pinsn16.h index 92f3354004..383ba64372 100644 --- a/misc/pascal/insn16/include/pinsn16.h +++ b/misc/pascal/insn16/include/pinsn16.h @@ -3,7 +3,7 @@ * 16-bit P-code operation code definitions * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/libinsn/Makefile b/misc/pascal/insn16/libinsn/Makefile index b0aa003e03..ce05f02739 100644 --- a/misc/pascal/insn16/libinsn/Makefile +++ b/misc/pascal/insn16/libinsn/Makefile @@ -2,7 +2,7 @@ # insn16/libinsn/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/libinsn/paddopcode.c b/misc/pascal/insn16/libinsn/paddopcode.c index 2f4a7bc0af..1384577a97 100644 --- a/misc/pascal/insn16/libinsn/paddopcode.c +++ b/misc/pascal/insn16/libinsn/paddopcode.c @@ -1,100 +1,100 @@ -/********************************************************************** - * paddopcode - * P-Code access utilities - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include "keywords.h" -#include "podefs.h" -#include "pinsn16.h" - -#include "paslib.h" -#include "pofflib.h" -#include "pinsn.h" - -/********************************************************************** - * Private Function Prototypes - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/********************************************************************** - * Private Functions - **********************************************************************/ - -/********************************************************************** - * Global Functions - **********************************************************************/ - -/**********************************************************************/ - -void insn_AddOpCode(poffHandle_t handle, OPTYPE *ptr) -{ - /* Write the opcode which is always present */ - - (void)poffAddProgByte(handle, ptr->op); - - /* Write the 8-bit argument if present */ - - if (ptr->op & o8) - { - (void)poffAddProgByte(handle, ptr->arg1); - } - - /* Write the 16-bit argument if present */ - - if (ptr->op & o16) - { - (void)poffAddProgByte(handle, (ptr->arg2 >> 8)); - (void)poffAddProgByte(handle, (ptr->arg2 & 0xff)); - } -} - -/**********************************************************************/ - -void insn_ResetOpCodeWrite(poffHandle_t handle) -{ - poffResetAccess(handle); -} - -/***********************************************************************/ +/********************************************************************** + * paddopcode + * P-Code access utilities + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include "keywords.h" +#include "podefs.h" +#include "pinsn16.h" + +#include "paslib.h" +#include "pofflib.h" +#include "pinsn.h" + +/********************************************************************** + * Private Function Prototypes + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/********************************************************************** + * Private Functions + **********************************************************************/ + +/********************************************************************** + * Global Functions + **********************************************************************/ + +/**********************************************************************/ + +void insn_AddOpCode(poffHandle_t handle, OPTYPE *ptr) +{ + /* Write the opcode which is always present */ + + (void)poffAddProgByte(handle, ptr->op); + + /* Write the 8-bit argument if present */ + + if (ptr->op & o8) + { + (void)poffAddProgByte(handle, ptr->arg1); + } + + /* Write the 16-bit argument if present */ + + if (ptr->op & o16) + { + (void)poffAddProgByte(handle, (ptr->arg2 >> 8)); + (void)poffAddProgByte(handle, (ptr->arg2 & 0xff)); + } +} + +/**********************************************************************/ + +void insn_ResetOpCodeWrite(poffHandle_t handle) +{ + poffResetAccess(handle); +} + +/***********************************************************************/ diff --git a/misc/pascal/insn16/libinsn/paddtmpopcode.c b/misc/pascal/insn16/libinsn/paddtmpopcode.c index 426f69d7e1..a04878d85b 100644 --- a/misc/pascal/insn16/libinsn/paddtmpopcode.c +++ b/misc/pascal/insn16/libinsn/paddtmpopcode.c @@ -1,100 +1,100 @@ -/********************************************************************** - * paddtmpopcode - * P-Code access utilities - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include "keywords.h" -#include "podefs.h" -#include "pinsn16.h" - -#include "paslib.h" -#include "pofflib.h" -#include "pinsn.h" - -/********************************************************************** - * Private Function Prototypes - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/********************************************************************** - * Private Functions - **********************************************************************/ - -/********************************************************************** - * Global Functions - **********************************************************************/ - -/**********************************************************************/ - -void insn_AddTmpOpCode(poffProgHandle_t progHandle, OPTYPE *ptr) -{ - /* Write the opcode which is always present */ - - (void)poffAddTmpProgByte(progHandle, ptr->op); - - /* Write the 8-bit argument if present */ - - if (ptr->op & o8) - { - (void)poffAddTmpProgByte(progHandle, ptr->arg1); - } - - /* Write the 16-bit argument if present */ - - if (ptr->op & o16) - { - (void)poffAddTmpProgByte(progHandle, (ptr->arg2 >> 8)); - (void)poffAddTmpProgByte(progHandle, (ptr->arg2 & 0xff)); - } -} - -/**********************************************************************/ - -void insn_ResetTmpOpCodeWrite(poffProgHandle_t progHandle) -{ - poffResetProgHandle(progHandle); -} - -/***********************************************************************/ +/********************************************************************** + * paddtmpopcode + * P-Code access utilities + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include "keywords.h" +#include "podefs.h" +#include "pinsn16.h" + +#include "paslib.h" +#include "pofflib.h" +#include "pinsn.h" + +/********************************************************************** + * Private Function Prototypes + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/********************************************************************** + * Private Functions + **********************************************************************/ + +/********************************************************************** + * Global Functions + **********************************************************************/ + +/**********************************************************************/ + +void insn_AddTmpOpCode(poffProgHandle_t progHandle, OPTYPE *ptr) +{ + /* Write the opcode which is always present */ + + (void)poffAddTmpProgByte(progHandle, ptr->op); + + /* Write the 8-bit argument if present */ + + if (ptr->op & o8) + { + (void)poffAddTmpProgByte(progHandle, ptr->arg1); + } + + /* Write the 16-bit argument if present */ + + if (ptr->op & o16) + { + (void)poffAddTmpProgByte(progHandle, (ptr->arg2 >> 8)); + (void)poffAddTmpProgByte(progHandle, (ptr->arg2 & 0xff)); + } +} + +/**********************************************************************/ + +void insn_ResetTmpOpCodeWrite(poffProgHandle_t progHandle) +{ + poffResetProgHandle(progHandle); +} + +/***********************************************************************/ diff --git a/misc/pascal/insn16/libinsn/pdasm.c b/misc/pascal/insn16/libinsn/pdasm.c index 4da71869ac..6f37d1a2e5 100644 --- a/misc/pascal/insn16/libinsn/pdasm.c +++ b/misc/pascal/insn16/libinsn/pdasm.c @@ -3,7 +3,7 @@ * P-Code Disassembler * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/libinsn/pgen.c b/misc/pascal/insn16/libinsn/pgen.c index 818bc907f1..0ac3b8b1c9 100644 --- a/misc/pascal/insn16/libinsn/pgen.c +++ b/misc/pascal/insn16/libinsn/pgen.c @@ -3,7 +3,7 @@ * P-Code generation logic * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/libinsn/pgetopcode.c b/misc/pascal/insn16/libinsn/pgetopcode.c index cc6f930772..c7a7f0a28e 100644 --- a/misc/pascal/insn16/libinsn/pgetopcode.c +++ b/misc/pascal/insn16/libinsn/pgetopcode.c @@ -3,7 +3,7 @@ * P-Code access utilities * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/libinsn/preloc.c b/misc/pascal/insn16/libinsn/preloc.c index 0ecb53cb48..7c4701c896 100644 --- a/misc/pascal/insn16/libinsn/preloc.c +++ b/misc/pascal/insn16/libinsn/preloc.c @@ -3,7 +3,7 @@ * Perform P-Code relocations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/plist/Makefile b/misc/pascal/insn16/plist/Makefile index 55ed430b7a..cd579f0400 100644 --- a/misc/pascal/insn16/plist/Makefile +++ b/misc/pascal/insn16/plist/Makefile @@ -2,7 +2,7 @@ # insn16/plist/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/plist/plist.c b/misc/pascal/insn16/plist/plist.c index 538a17bc18..18b119e315 100644 --- a/misc/pascal/insn16/plist/plist.c +++ b/misc/pascal/insn16/plist/plist.c @@ -3,7 +3,7 @@ * POFF file lister * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/Makefile b/misc/pascal/insn16/popt/Makefile index 606ebe2c20..cff0ec7fb4 100644 --- a/misc/pascal/insn16/popt/Makefile +++ b/misc/pascal/insn16/popt/Makefile @@ -3,7 +3,7 @@ # Host system makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/pcopt.c b/misc/pascal/insn16/popt/pcopt.c index 5f8deed801..e37a2d3678 100644 --- a/misc/pascal/insn16/popt/pcopt.c +++ b/misc/pascal/insn16/popt/pcopt.c @@ -3,7 +3,7 @@ * Constant Expression Optimizations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/pcopt.h b/misc/pascal/insn16/popt/pcopt.h index 02dbae334e..53ea9c040e 100644 --- a/misc/pascal/insn16/popt/pcopt.h +++ b/misc/pascal/insn16/popt/pcopt.h @@ -3,7 +3,7 @@ * External Declarations associated with PCOPT.C * * Copyright (C) 200-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/pfopt.c b/misc/pascal/insn16/popt/pfopt.c index 0236b525ca..612ceb8f49 100644 --- a/misc/pascal/insn16/popt/pfopt.c +++ b/misc/pascal/insn16/popt/pfopt.c @@ -3,7 +3,7 @@ * Finalization of optimized image * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/pfopt.h b/misc/pascal/insn16/popt/pfopt.h index d792d11bff..07ce738b1d 100644 --- a/misc/pascal/insn16/popt/pfopt.h +++ b/misc/pascal/insn16/popt/pfopt.h @@ -1,54 +1,54 @@ -/*************************************************************************** - * pfopt.h - * External Declarations associated with pfopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PFOPT_H -#define __PFOPT_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pofflib.h" - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void optFinalize(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle); - -#endif /* __PFOPT_H */ - +/*************************************************************************** + * pfopt.h + * External Declarations associated with pfopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PFOPT_H +#define __PFOPT_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pofflib.h" + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void optFinalize(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle); + +#endif /* __PFOPT_H */ + diff --git a/misc/pascal/insn16/popt/pjopt.c b/misc/pascal/insn16/popt/pjopt.c index e504a1dcef..16244b5e1e 100644 --- a/misc/pascal/insn16/popt/pjopt.c +++ b/misc/pascal/insn16/popt/pjopt.c @@ -3,7 +3,7 @@ * Branch Optimizations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/pjopt.h b/misc/pascal/insn16/popt/pjopt.h index 892ac3385e..a05082477d 100644 --- a/misc/pascal/insn16/popt/pjopt.h +++ b/misc/pascal/insn16/popt/pjopt.h @@ -3,7 +3,7 @@ * External Declarations associated with pjopt.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/plopt.c b/misc/pascal/insn16/popt/plopt.c index 2f8ff39f07..b01449f645 100644 --- a/misc/pascal/insn16/popt/plopt.c +++ b/misc/pascal/insn16/popt/plopt.c @@ -3,7 +3,7 @@ * Load/Store Optimizations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/plopt.h b/misc/pascal/insn16/popt/plopt.h index e38a726e7c..43e66af161 100644 --- a/misc/pascal/insn16/popt/plopt.h +++ b/misc/pascal/insn16/popt/plopt.h @@ -3,7 +3,7 @@ * External Declarations associated with plopt.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/polocal.c b/misc/pascal/insn16/popt/polocal.c index 39260b1dda..9ef98c1cef 100644 --- a/misc/pascal/insn16/popt/polocal.c +++ b/misc/pascal/insn16/popt/polocal.c @@ -3,7 +3,7 @@ * P-Code Local Optimizer * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/polocal.h b/misc/pascal/insn16/popt/polocal.h index 9e6010dcaf..31bade3af4 100644 --- a/misc/pascal/insn16/popt/polocal.h +++ b/misc/pascal/insn16/popt/polocal.h @@ -3,7 +3,7 @@ * External Declarations associated with polocal.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/popt.c b/misc/pascal/insn16/popt/popt.c index 9e8e033dcd..2c47984f1a 100644 --- a/misc/pascal/insn16/popt/popt.c +++ b/misc/pascal/insn16/popt/popt.c @@ -3,7 +3,7 @@ * P-Code Optimizer Main Logic * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/popt.h b/misc/pascal/insn16/popt/popt.h index e5825466ab..a3530f75dd 100644 --- a/misc/pascal/insn16/popt/popt.h +++ b/misc/pascal/insn16/popt/popt.h @@ -1,52 +1,52 @@ -/*************************************************************************** - * popt.h - * External Declarations associated with popt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __POPT_H -#define __POPT_H - -/*************************************************************************** -* Included Files -****************************************************************************/ - -/*************************************************************************** -* Global Function Prototypes -****************************************************************************/ - -/*************************************************************************** - * Global Variables - ****************************************************************************/ - -#endif /* __POPT_H */ +/*************************************************************************** + * popt.h + * External Declarations associated with popt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __POPT_H +#define __POPT_H + +/*************************************************************************** +* Included Files +****************************************************************************/ + +/*************************************************************************** +* Global Function Prototypes +****************************************************************************/ + +/*************************************************************************** + * Global Variables + ****************************************************************************/ + +#endif /* __POPT_H */ diff --git a/misc/pascal/insn16/popt/psopt.c b/misc/pascal/insn16/popt/psopt.c index 0881204c31..0f6a4952e0 100644 --- a/misc/pascal/insn16/popt/psopt.c +++ b/misc/pascal/insn16/popt/psopt.c @@ -3,7 +3,7 @@ * String Stack Optimizaitons * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/popt/psopt.h b/misc/pascal/insn16/popt/psopt.h index c174aac8ea..3ea1ee2277 100644 --- a/misc/pascal/insn16/popt/psopt.h +++ b/misc/pascal/insn16/popt/psopt.h @@ -1,54 +1,54 @@ -/*************************************************************************** - * psopt.h - * External Declarations associated with psopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PSOPT_H -#define __PSOPT_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pofflib.h" - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void stringStackOptimize(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle); - -#endif /* __PSOPT_H */ - +/*************************************************************************** + * psopt.h + * External Declarations associated with psopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PSOPT_H +#define __PSOPT_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pofflib.h" + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void stringStackOptimize(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle); + +#endif /* __PSOPT_H */ + diff --git a/misc/pascal/insn16/prun/Make.defs b/misc/pascal/insn16/prun/Make.defs index 69fdc2c564..1e965e1f79 100644 --- a/misc/pascal/insn16/prun/Make.defs +++ b/misc/pascal/insn16/prun/Make.defs @@ -3,7 +3,7 @@ # NuttX runtime makefile fragment # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/prun/Makefile b/misc/pascal/insn16/prun/Makefile index f660b4a2a6..b8fb4d98bc 100644 --- a/misc/pascal/insn16/prun/Makefile +++ b/misc/pascal/insn16/prun/Makefile @@ -3,7 +3,7 @@ # Host system makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/prun/pdbg.c b/misc/pascal/insn16/prun/pdbg.c index 4f9dc35d3b..d941ebb6f2 100644 --- a/misc/pascal/insn16/prun/pdbg.c +++ b/misc/pascal/insn16/prun/pdbg.c @@ -3,7 +3,7 @@ * P-Code Debugger * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/prun/pexec.c b/misc/pascal/insn16/prun/pexec.c index 46df53c2c3..b22e52835e 100644 --- a/misc/pascal/insn16/prun/pexec.c +++ b/misc/pascal/insn16/prun/pexec.c @@ -2,7 +2,7 @@ * pexec.c * * Copyright (C) 200-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/prun/pload.c b/misc/pascal/insn16/prun/pload.c index 0ffd633d48..744d998760 100644 --- a/misc/pascal/insn16/prun/pload.c +++ b/misc/pascal/insn16/prun/pload.c @@ -2,7 +2,7 @@ * pload.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn16/prun/prun.c b/misc/pascal/insn16/prun/prun.c index a9fa92778f..4dd33b2c34 100644 --- a/misc/pascal/insn16/prun/prun.c +++ b/misc/pascal/insn16/prun/prun.c @@ -2,7 +2,7 @@ * prun.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/Makefile b/misc/pascal/insn32/Makefile index a456dc25ba..d02de859b4 100644 --- a/misc/pascal/insn32/Makefile +++ b/misc/pascal/insn32/Makefile @@ -2,7 +2,7 @@ # insn32/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/include/builtins.h b/misc/pascal/insn32/include/builtins.h index 04aacfde9f..6fe3dc9199 100644 --- a/misc/pascal/insn32/include/builtins.h +++ b/misc/pascal/insn32/include/builtins.h @@ -3,7 +3,7 @@ * Definitions of built-in function calls. * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/include/pexec.h b/misc/pascal/insn32/include/pexec.h index 6a52ff95d7..647a1d88c0 100644 --- a/misc/pascal/insn32/include/pexec.h +++ b/misc/pascal/insn32/include/pexec.h @@ -2,7 +2,7 @@ * pexec.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/include/pinsn32.h b/misc/pascal/insn32/include/pinsn32.h index 29cf363e78..eaceeba7e7 100644 --- a/misc/pascal/insn32/include/pinsn32.h +++ b/misc/pascal/insn32/include/pinsn32.h @@ -3,7 +3,7 @@ * 32-bit P-code operation code definitions * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/include/rinsn32.h b/misc/pascal/insn32/include/rinsn32.h index 8894023ff1..8826eefb1f 100644 --- a/misc/pascal/insn32/include/rinsn32.h +++ b/misc/pascal/insn32/include/rinsn32.h @@ -3,7 +3,7 @@ * 32-bit register module instruction definitions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/Makefile b/misc/pascal/insn32/libinsn/Makefile index 04ea4cee8a..4814bdf9dc 100644 --- a/misc/pascal/insn32/libinsn/Makefile +++ b/misc/pascal/insn32/libinsn/Makefile @@ -2,7 +2,7 @@ # insn32/libinsn/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/paddopcode.c b/misc/pascal/insn32/libinsn/paddopcode.c index 2f873eb7f6..6799fdbc64 100644 --- a/misc/pascal/insn32/libinsn/paddopcode.c +++ b/misc/pascal/insn32/libinsn/paddopcode.c @@ -3,7 +3,7 @@ * P-Code access utilities * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/paddtmpopcode.c b/misc/pascal/insn32/libinsn/paddtmpopcode.c index e4e10b458b..e08cccc510 100644 --- a/misc/pascal/insn32/libinsn/paddtmpopcode.c +++ b/misc/pascal/insn32/libinsn/paddtmpopcode.c @@ -3,7 +3,7 @@ * P-Code access utilities * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/pdasm.c b/misc/pascal/insn32/libinsn/pdasm.c index 31d45088fc..e0968b43bf 100644 --- a/misc/pascal/insn32/libinsn/pdasm.c +++ b/misc/pascal/insn32/libinsn/pdasm.c @@ -3,7 +3,7 @@ * P-Code Disassembler * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/pgen.c b/misc/pascal/insn32/libinsn/pgen.c index a3219d388b..e92cc98f41 100644 --- a/misc/pascal/insn32/libinsn/pgen.c +++ b/misc/pascal/insn32/libinsn/pgen.c @@ -3,7 +3,7 @@ * P-Code generation logic * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/pgetopcode.c b/misc/pascal/insn32/libinsn/pgetopcode.c index bbcc011e91..a6f9507b2e 100644 --- a/misc/pascal/insn32/libinsn/pgetopcode.c +++ b/misc/pascal/insn32/libinsn/pgetopcode.c @@ -3,7 +3,7 @@ * P-Code access utilities * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/preloc.c b/misc/pascal/insn32/libinsn/preloc.c index b752abba5d..7c09992199 100644 --- a/misc/pascal/insn32/libinsn/preloc.c +++ b/misc/pascal/insn32/libinsn/preloc.c @@ -3,7 +3,7 @@ * Perform P-Code relocations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/libinsn/presettmpopcodewrite.c b/misc/pascal/insn32/libinsn/presettmpopcodewrite.c index e4e10b458b..e08cccc510 100644 --- a/misc/pascal/insn32/libinsn/presettmpopcodewrite.c +++ b/misc/pascal/insn32/libinsn/presettmpopcodewrite.c @@ -3,7 +3,7 @@ * P-Code access utilities * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/plist/Makefile b/misc/pascal/insn32/plist/Makefile index 506cdfee27..d74839878d 100644 --- a/misc/pascal/insn32/plist/Makefile +++ b/misc/pascal/insn32/plist/Makefile @@ -2,7 +2,7 @@ # insn32/plist/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/plist/plist.c b/misc/pascal/insn32/plist/plist.c index d57e7deb79..a1667c7c27 100644 --- a/misc/pascal/insn32/plist/plist.c +++ b/misc/pascal/insn32/plist/plist.c @@ -3,7 +3,7 @@ * POFF file lister * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/Makefile b/misc/pascal/insn32/popt/Makefile index 6073ff1655..760c18fca3 100644 --- a/misc/pascal/insn32/popt/Makefile +++ b/misc/pascal/insn32/popt/Makefile @@ -2,7 +2,7 @@ # insn32/popt/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/pcopt.c b/misc/pascal/insn32/popt/pcopt.c index 2c4c1fa014..a0c0a02265 100644 --- a/misc/pascal/insn32/popt/pcopt.c +++ b/misc/pascal/insn32/popt/pcopt.c @@ -3,7 +3,7 @@ * Constant Expression Optimizations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/pcopt.h b/misc/pascal/insn32/popt/pcopt.h index f638fcf281..0c3d453b97 100644 --- a/misc/pascal/insn32/popt/pcopt.h +++ b/misc/pascal/insn32/popt/pcopt.h @@ -1,47 +1,47 @@ -/*************************************************************************** - * pcopt.h - * External Declarations associated with PCOPT.C - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PCOPT_H -#define __PCOPT_H - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern int unaryOptimize ( void ); -extern int binaryOptimize ( void ); - -#endif /* __PCOPT_H */ +/*************************************************************************** + * pcopt.h + * External Declarations associated with PCOPT.C + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PCOPT_H +#define __PCOPT_H + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern int unaryOptimize ( void ); +extern int binaryOptimize ( void ); + +#endif /* __PCOPT_H */ diff --git a/misc/pascal/insn32/popt/pfopt.c b/misc/pascal/insn32/popt/pfopt.c index cf71fe005c..a9f1659c64 100644 --- a/misc/pascal/insn32/popt/pfopt.c +++ b/misc/pascal/insn32/popt/pfopt.c @@ -3,7 +3,7 @@ * Finalization of optimized image * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/pfopt.h b/misc/pascal/insn32/popt/pfopt.h index d792d11bff..07ce738b1d 100644 --- a/misc/pascal/insn32/popt/pfopt.h +++ b/misc/pascal/insn32/popt/pfopt.h @@ -1,54 +1,54 @@ -/*************************************************************************** - * pfopt.h - * External Declarations associated with pfopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PFOPT_H -#define __PFOPT_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pofflib.h" - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void optFinalize(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle); - -#endif /* __PFOPT_H */ - +/*************************************************************************** + * pfopt.h + * External Declarations associated with pfopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PFOPT_H +#define __PFOPT_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pofflib.h" + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void optFinalize(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle); + +#endif /* __PFOPT_H */ + diff --git a/misc/pascal/insn32/popt/pjopt.c b/misc/pascal/insn32/popt/pjopt.c index c10962d3c3..17b77c4efc 100644 --- a/misc/pascal/insn32/popt/pjopt.c +++ b/misc/pascal/insn32/popt/pjopt.c @@ -1,449 +1,449 @@ -/********************************************************************** - * pjopt.c - * Branch Optimizations - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include - -#include "keywords.h" -#include "pdefs.h" -#include "pinsn32.h" - -#include "popt.h" -#include "polocal.h" -#include "pjopt.h" - -/**********************************************************************/ - -int BranchOptimize (void) -{ - int nchanges = 0; - register int i; - - TRACE(stderr, "[BranchOptimize]"); - - /* At least two pcodes are need to perform branch optimizations */ - - i = 0; - while (i < nops-1) - { - switch (pptr[i]->op) - { - case oNOT : - switch (pptr[i+1]->op) - { - case oJEQUZ : - pptr[i+1]->op = oJNEQZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJEQUZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oNEG : - switch (pptr[i+1]->op) - { - case oJLTZ : - pptr[i+1]->op = oJGTZ; - deletePcode(i); - nchanges++; - break; - - case oJGTEZ : - pptr[i+1]->op = oJLTEZ; - deletePcode(i); - nchanges++; - break; - - case oJGTZ : - pptr[i+1]->op = oJLTZ; - deletePcode(i); - nchanges++; - break; - - case oJLTEZ : - pptr[i+1]->op = oJGTEZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oEQU : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oNEQ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJNEQ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJEQU; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oNEQ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oEQU; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJEQU; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJNEQ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oLT : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oGTE; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJGTE; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJLT; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oGTE : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oLT; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJLT; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJGTE; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oGT : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oLTE; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJLTE; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJGT; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oLTE : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oGT; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJGT; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJLTE; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oEQUZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oNEQZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJNEQZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJEQUZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oNEQZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oEQUZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - case oJNEQZ : - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oLTZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oGTEZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJGTEZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJLTZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oGTEZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oLTZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJLTZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJGTEZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oGTZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oLTEZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJLTEZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJGTZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - case oLTEZ : - switch (pptr[i+1]->op) - { - case oNOT : - pptr[i]->op = oGTZ; - deletePcode(i+1); - nchanges++; - break; - - case oJEQUZ : - pptr[i+1]->op = oJGTZ; - deletePcode(i); - nchanges++; - break; - - case oJNEQZ : - pptr[i+1]->op = oJLTEZ; - deletePcode(i); - nchanges++; - break; - - default : - i++; - break; - } /* end switch */ - break; - - default : - i++; - break; - } /* end switch */ - } /* end while */ - return (nchanges); - -} /* end BranchOptimize */ - -/**********************************************************************/ - +/********************************************************************** + * pjopt.c + * Branch Optimizations + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include + +#include "keywords.h" +#include "pdefs.h" +#include "pinsn32.h" + +#include "popt.h" +#include "polocal.h" +#include "pjopt.h" + +/**********************************************************************/ + +int BranchOptimize (void) +{ + int nchanges = 0; + register int i; + + TRACE(stderr, "[BranchOptimize]"); + + /* At least two pcodes are need to perform branch optimizations */ + + i = 0; + while (i < nops-1) + { + switch (pptr[i]->op) + { + case oNOT : + switch (pptr[i+1]->op) + { + case oJEQUZ : + pptr[i+1]->op = oJNEQZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJEQUZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oNEG : + switch (pptr[i+1]->op) + { + case oJLTZ : + pptr[i+1]->op = oJGTZ; + deletePcode(i); + nchanges++; + break; + + case oJGTEZ : + pptr[i+1]->op = oJLTEZ; + deletePcode(i); + nchanges++; + break; + + case oJGTZ : + pptr[i+1]->op = oJLTZ; + deletePcode(i); + nchanges++; + break; + + case oJLTEZ : + pptr[i+1]->op = oJGTEZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oEQU : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oNEQ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJNEQ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJEQU; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oNEQ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oEQU; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJEQU; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJNEQ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oLT : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oGTE; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJGTE; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJLT; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oGTE : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oLT; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJLT; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJGTE; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oGT : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oLTE; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJLTE; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJGT; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oLTE : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oGT; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJGT; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJLTE; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oEQUZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oNEQZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJNEQZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJEQUZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oNEQZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oEQUZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + case oJNEQZ : + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oLTZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oGTEZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJGTEZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJLTZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oGTEZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oLTZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJLTZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJGTEZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oGTZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oLTEZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJLTEZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJGTZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + case oLTEZ : + switch (pptr[i+1]->op) + { + case oNOT : + pptr[i]->op = oGTZ; + deletePcode(i+1); + nchanges++; + break; + + case oJEQUZ : + pptr[i+1]->op = oJGTZ; + deletePcode(i); + nchanges++; + break; + + case oJNEQZ : + pptr[i+1]->op = oJLTEZ; + deletePcode(i); + nchanges++; + break; + + default : + i++; + break; + } /* end switch */ + break; + + default : + i++; + break; + } /* end switch */ + } /* end while */ + return (nchanges); + +} /* end BranchOptimize */ + +/**********************************************************************/ + diff --git a/misc/pascal/insn32/popt/pjopt.h b/misc/pascal/insn32/popt/pjopt.h index 4564ec6c6c..75a0b64f23 100644 --- a/misc/pascal/insn32/popt/pjopt.h +++ b/misc/pascal/insn32/popt/pjopt.h @@ -1,44 +1,44 @@ -/*************************************************************************** - * pjopt.h - * External Declarations associated with pjopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PJOPT_H -#define __PJOPT_H - -extern int BranchOptimize ( void ); - -#endif __PJOPT_H - - +/*************************************************************************** + * pjopt.h + * External Declarations associated with pjopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PJOPT_H +#define __PJOPT_H + +extern int BranchOptimize ( void ); + +#endif __PJOPT_H + + diff --git a/misc/pascal/insn32/popt/plopt.c b/misc/pascal/insn32/popt/plopt.c index b0a4695330..05e8559eff 100644 --- a/misc/pascal/insn32/popt/plopt.c +++ b/misc/pascal/insn32/popt/plopt.c @@ -3,7 +3,7 @@ * Load/Store Optimizations * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/plopt.h b/misc/pascal/insn32/popt/plopt.h index 05596cd45f..3783cf4007 100644 --- a/misc/pascal/insn32/popt/plopt.h +++ b/misc/pascal/insn32/popt/plopt.h @@ -1,43 +1,43 @@ -/*************************************************************************** - * plopt.h - * External Declarations associated with plopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PLOPT_H -#define __PLOPT_H - -extern int LoadOptimize ( void ); -extern int StoreOptimize ( void ); - -#endif /* __PLOPT_H */ +/*************************************************************************** + * plopt.h + * External Declarations associated with plopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PLOPT_H +#define __PLOPT_H + +extern int LoadOptimize ( void ); +extern int StoreOptimize ( void ); + +#endif /* __PLOPT_H */ diff --git a/misc/pascal/insn32/popt/polocal.c b/misc/pascal/insn32/popt/polocal.c index 551913a490..036182372e 100644 --- a/misc/pascal/insn32/popt/polocal.c +++ b/misc/pascal/insn32/popt/polocal.c @@ -1,271 +1,271 @@ -/********************************************************************** - * polocal.c - * P-Code Local Optimizer - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include - -#include "keywords.h" -#include "podefs.h" -#include "pinsn32.h" - -#include "pofflib.h" -#include "paslib.h" -#include "pinsn.h" -#include "pcopt.h" -#include "plopt.h" -#include "pjopt.h" -#include "polocal.h" - -/********************************************************************** - * Private Function Prototypes - **********************************************************************/ - -static void initPTable (void); -static void putPCodeFromTable (void); -static void setupPointer (void); - -/********************************************************************** - * Global Variables - **********************************************************************/ - -OPTYPE ptable [WINDOW]; /* Pcode Table */ -OPTYPE *pptr [WINDOW]; /* Valid Pcode Pointers */ - -int nops = 0; /* No. Valid Pcode Pointers */ -int end_out = 0; /* 1 = oEND pcode has been output */ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -static poffHandle_t myPoffHandle; /* Handle to POFF object */ -static poffProgHandle_t myPoffProgHandle;/* Handle to temporary POFF object */ - -/********************************************************************** - * Global Functions - **********************************************************************/ - -/***********************************************************************/ - -void localOptimization(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle) -{ - int nchanges; - - TRACE(stderr, "[pass2]"); - - /* Save the handles for use by other, private functions */ - - myPoffHandle = poffHandle; - myPoffProgHandle = poffProgHandle; - - /* Initialization */ - - initPTable(); - - /* Outer loop traverse the file op-code by op-code until the oEND P-Code - * has been output. NOTE: it is assumed throughout that oEND is the - * final P-Code in the program data section. - */ - - while (!(end_out)) - { - /* The inner loop optimizes the buffered P-Codes until no further - * changes can be made. Then the outer loop will advance the buffer - * by one P-Code - */ - - do - { - nchanges = unaryOptimize (); - nchanges += binaryOptimize(); - nchanges += BranchOptimize(); - nchanges += LoadOptimize(); - nchanges += StoreOptimize(); - } while (nchanges); - - putPCodeFromTable(); - } -} - -/***********************************************************************/ - -void deletePcode(int delIndex) -{ - TRACE(stderr, "[deletePcode]"); - - PUTOP(pptr[delIndex], oNOP); - PUTARG(pptr[delIndex], 0); - setupPointer(); -} - -/**********************************************************************/ - -void deletePcodePair(int delIndex1, int delIndex2) -{ - TRACE(stderr, "[deletePcodePair]"); - - PUTOP(pptr[delIndex1], oNOP); - PUTARG(pptr[delIndex1], 0); - PUTOP(pptr[delIndex2], oNOP); - PUTARG(pptr[delIndex2], 0); - setupPointer(); -} - -/********************************************************************** - * Private Functions - **********************************************************************/ - -/***********************************************************************/ - -static void putPCodeFromTable(void) -{ - register int i; - - TRACE(stderr, "[putPCodeFromTable]"); - - /* Transfer all buffered P-Codes (except NOPs) to the optimized file */ - do - { - if ((GETOP(&ptable[0]) != oNOP) && !(end_out)) - { - insn_AddTmpOpCode(myPoffProgHandle, &ptable[0]); - end_out = (GETOP(&ptable[0]) == oEND); - } - - /* Move all P-Codes down one slot */ - - for (i = 1; i < WINDOW; i++) - { - ptable[i-1] = ptable[i]; - } - - /* Then fill the end slot with a new P-Code from the input file */ - - insn_GetOpCode(myPoffHandle, &ptable[WINDOW-1]); - - } while (GETOP(&ptable[0]) == oNOP); - setupPointer(); -} - -/**********************************************************************/ - -static void setupPointer(void) -{ - register int pindex; - - TRACE(stderr, "[setupPointer]"); - - for (pindex = 0; pindex < WINDOW; pindex++) - pptr[pindex] = (OPTYPE *) NULL; - - nops = 0; - for (pindex = 0; pindex < WINDOW; pindex++) - { - switch (GETOP(&ptable[pindex])) - { - /* Terminate list when a break from sequential logic is - * encountered - */ - - case oRET : - case oEND : - case oJMP : - case oLABEL : - case oPCAL : - return; - - /* Terminate list when a condition break from sequential logic is - * encountered but include the conditional branch in the list - */ - - case oJEQUZ : - case oJNEQZ : - case oJLTZ : - case oJGTEZ : - case oJGTZ : - case oJLTEZ : - pptr[nops] = &ptable[pindex]; - nops++; - return; - - /* Skip over NOPs and comment class pcodes */ - - case oNOP : - case oLINE : - break; - - /* Include all other pcodes in the optimization list and continue */ - - default : - pptr[nops] = &ptable[pindex]; - nops++; - } - } -} - -/**********************************************************************/ - -static void initPTable(void) -{ - register int i; - - TRACE(stderr, "[intPTable]"); - - /* Skip over leading pcodes. NOTE: assumes executable begins after - * the first oLABEL pcode - */ - - do - { - insn_GetOpCode(myPoffHandle, &ptable[0]); - insn_AddTmpOpCode(myPoffProgHandle, &ptable[0]); - } - while ((GETOP(&ptable[0]) != oLABEL) && (GETOP(&ptable[0]) != oEND)); - - /* Fill the pcode window and setup pointers to working section */ - - for (i = 0; i < WINDOW; i++) - { - insn_GetOpCode(myPoffHandle, &ptable[i]); - } - setupPointer(); -} - -/***********************************************************************/ +/********************************************************************** + * polocal.c + * P-Code Local Optimizer + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include + +#include "keywords.h" +#include "podefs.h" +#include "pinsn32.h" + +#include "pofflib.h" +#include "paslib.h" +#include "pinsn.h" +#include "pcopt.h" +#include "plopt.h" +#include "pjopt.h" +#include "polocal.h" + +/********************************************************************** + * Private Function Prototypes + **********************************************************************/ + +static void initPTable (void); +static void putPCodeFromTable (void); +static void setupPointer (void); + +/********************************************************************** + * Global Variables + **********************************************************************/ + +OPTYPE ptable [WINDOW]; /* Pcode Table */ +OPTYPE *pptr [WINDOW]; /* Valid Pcode Pointers */ + +int nops = 0; /* No. Valid Pcode Pointers */ +int end_out = 0; /* 1 = oEND pcode has been output */ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +static poffHandle_t myPoffHandle; /* Handle to POFF object */ +static poffProgHandle_t myPoffProgHandle;/* Handle to temporary POFF object */ + +/********************************************************************** + * Global Functions + **********************************************************************/ + +/***********************************************************************/ + +void localOptimization(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle) +{ + int nchanges; + + TRACE(stderr, "[pass2]"); + + /* Save the handles for use by other, private functions */ + + myPoffHandle = poffHandle; + myPoffProgHandle = poffProgHandle; + + /* Initialization */ + + initPTable(); + + /* Outer loop traverse the file op-code by op-code until the oEND P-Code + * has been output. NOTE: it is assumed throughout that oEND is the + * final P-Code in the program data section. + */ + + while (!(end_out)) + { + /* The inner loop optimizes the buffered P-Codes until no further + * changes can be made. Then the outer loop will advance the buffer + * by one P-Code + */ + + do + { + nchanges = unaryOptimize (); + nchanges += binaryOptimize(); + nchanges += BranchOptimize(); + nchanges += LoadOptimize(); + nchanges += StoreOptimize(); + } while (nchanges); + + putPCodeFromTable(); + } +} + +/***********************************************************************/ + +void deletePcode(int delIndex) +{ + TRACE(stderr, "[deletePcode]"); + + PUTOP(pptr[delIndex], oNOP); + PUTARG(pptr[delIndex], 0); + setupPointer(); +} + +/**********************************************************************/ + +void deletePcodePair(int delIndex1, int delIndex2) +{ + TRACE(stderr, "[deletePcodePair]"); + + PUTOP(pptr[delIndex1], oNOP); + PUTARG(pptr[delIndex1], 0); + PUTOP(pptr[delIndex2], oNOP); + PUTARG(pptr[delIndex2], 0); + setupPointer(); +} + +/********************************************************************** + * Private Functions + **********************************************************************/ + +/***********************************************************************/ + +static void putPCodeFromTable(void) +{ + register int i; + + TRACE(stderr, "[putPCodeFromTable]"); + + /* Transfer all buffered P-Codes (except NOPs) to the optimized file */ + do + { + if ((GETOP(&ptable[0]) != oNOP) && !(end_out)) + { + insn_AddTmpOpCode(myPoffProgHandle, &ptable[0]); + end_out = (GETOP(&ptable[0]) == oEND); + } + + /* Move all P-Codes down one slot */ + + for (i = 1; i < WINDOW; i++) + { + ptable[i-1] = ptable[i]; + } + + /* Then fill the end slot with a new P-Code from the input file */ + + insn_GetOpCode(myPoffHandle, &ptable[WINDOW-1]); + + } while (GETOP(&ptable[0]) == oNOP); + setupPointer(); +} + +/**********************************************************************/ + +static void setupPointer(void) +{ + register int pindex; + + TRACE(stderr, "[setupPointer]"); + + for (pindex = 0; pindex < WINDOW; pindex++) + pptr[pindex] = (OPTYPE *) NULL; + + nops = 0; + for (pindex = 0; pindex < WINDOW; pindex++) + { + switch (GETOP(&ptable[pindex])) + { + /* Terminate list when a break from sequential logic is + * encountered + */ + + case oRET : + case oEND : + case oJMP : + case oLABEL : + case oPCAL : + return; + + /* Terminate list when a condition break from sequential logic is + * encountered but include the conditional branch in the list + */ + + case oJEQUZ : + case oJNEQZ : + case oJLTZ : + case oJGTEZ : + case oJGTZ : + case oJLTEZ : + pptr[nops] = &ptable[pindex]; + nops++; + return; + + /* Skip over NOPs and comment class pcodes */ + + case oNOP : + case oLINE : + break; + + /* Include all other pcodes in the optimization list and continue */ + + default : + pptr[nops] = &ptable[pindex]; + nops++; + } + } +} + +/**********************************************************************/ + +static void initPTable(void) +{ + register int i; + + TRACE(stderr, "[intPTable]"); + + /* Skip over leading pcodes. NOTE: assumes executable begins after + * the first oLABEL pcode + */ + + do + { + insn_GetOpCode(myPoffHandle, &ptable[0]); + insn_AddTmpOpCode(myPoffProgHandle, &ptable[0]); + } + while ((GETOP(&ptable[0]) != oLABEL) && (GETOP(&ptable[0]) != oEND)); + + /* Fill the pcode window and setup pointers to working section */ + + for (i = 0; i < WINDOW; i++) + { + insn_GetOpCode(myPoffHandle, &ptable[i]); + } + setupPointer(); +} + +/***********************************************************************/ diff --git a/misc/pascal/insn32/popt/polocal.h b/misc/pascal/insn32/popt/polocal.h index a46e4dc9c5..fc97cb8199 100644 --- a/misc/pascal/insn32/popt/polocal.h +++ b/misc/pascal/insn32/popt/polocal.h @@ -1,73 +1,73 @@ -/*************************************************************************** - * polocal.h - * External Declarations associated with polocal.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __POLOCAL_H -#define __POLOCAL_H - -/*************************************************************************** -* Included Files -****************************************************************************/ - -#include "keywords.h" -#include "pdefs.h" -#include "pofflib.h" - -/*************************************************************************** -* Definitions -****************************************************************************/ - -#define WINDOW 10 /* size of optimization window */ - -/*************************************************************************** -* Global Function Prototypes -****************************************************************************/ - -extern void localOptimization(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle); -extern void deletePcode (int delIndex); -extern void deletePcodePair (int delIndex1, int delIndex2); - -/*************************************************************************** - * Global Variables - ****************************************************************************/ - -extern OPTYPE ptable [WINDOW]; /* Pcode Table */ -extern OPTYPE *pptr [WINDOW]; /* Valid Pcode Pointers */ - -extern int nops; /* No. Valid Pcode Pointers */ -extern int end_out; /* 1 = oEND pcode has been output */ - -#endif /* __PLOCAL_H */ +/*************************************************************************** + * polocal.h + * External Declarations associated with polocal.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __POLOCAL_H +#define __POLOCAL_H + +/*************************************************************************** +* Included Files +****************************************************************************/ + +#include "keywords.h" +#include "pdefs.h" +#include "pofflib.h" + +/*************************************************************************** +* Definitions +****************************************************************************/ + +#define WINDOW 10 /* size of optimization window */ + +/*************************************************************************** +* Global Function Prototypes +****************************************************************************/ + +extern void localOptimization(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle); +extern void deletePcode (int delIndex); +extern void deletePcodePair (int delIndex1, int delIndex2); + +/*************************************************************************** + * Global Variables + ****************************************************************************/ + +extern OPTYPE ptable [WINDOW]; /* Pcode Table */ +extern OPTYPE *pptr [WINDOW]; /* Valid Pcode Pointers */ + +extern int nops; /* No. Valid Pcode Pointers */ +extern int end_out; /* 1 = oEND pcode has been output */ + +#endif /* __PLOCAL_H */ diff --git a/misc/pascal/insn32/popt/popt.c b/misc/pascal/insn32/popt/popt.c index cf8c76ce34..5cf039a169 100644 --- a/misc/pascal/insn32/popt/popt.c +++ b/misc/pascal/insn32/popt/popt.c @@ -1,327 +1,327 @@ -/********************************************************************** - * popt.c - * P-Code Optimizer Main Logic - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include - -#include "keywords.h" -#include "podefs.h" -#include "paslib.h" -#include "pofflib.h" - -#include "pinsn.h" -#include "popt.h" -#include "psopt.h" -#include "polocal.h" -#include "pfopt.h" - -/********************************************************************** - * Private Function Prototypes - **********************************************************************/ - -static void showUsage (const char *progname, int errcode); -static void readPoffFile (const char *filename); -static void pass1 (void); -static void pass2 (void); -static void pass3 (void); -static void writePoffFile (const char *filename); - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -static poffHandle_t poffHandle; /* Handle to POFF object */ -static int no_resolve = 0; - -/********************************************************************** - * Global Functions - **********************************************************************/ - -/***********************************************************************/ - -int main(int argc, char *argv[], char *envp[]) -{ - const char *outfilename; - TRACE(stderr, "[main]"); - int option; - - /* Process command line argruments */ - - while ((option = getopt(argc, argv, "rh")) > 0) - { - switch (option) - { - case 'r' : - no_resolve++; - break; - case 'h' : - showUsage(argv[0], 0); - default: - fprintf(stderr, "Unrecognized option\n"); - showUsage(argv[0], -1); - } - } - - /* Check for existence of filename argument */ - - if (optind != argc - 1) - { - printf("Filename required at end of command line.\n"); - showUsage(argv[0], -1); - } /* end if */ - - /* Read the POFF file into memory */ - - outfilename = argv[optind]; - readPoffFile(outfilename); - - /* Performs pass1 optimization */ - - pass1(); - - /* Performs pass2 optimization */ - - insn_ResetOpCodeRead(poffHandle); - pass2(); - - if (!no_resolve) - { - /* Create final section offsets and relocation entries */ - - insn_ResetOpCodeRead(poffHandle); - pass3(); - } - - /* Write the POFF file */ - - writePoffFile(outfilename); - return 0; - -} /* End main */ - -/********************************************************************** - * Private Functions - **********************************************************************/ - -/***********************************************************************/ - -static void showUsage(const char *progname, int errcode) -{ - fprintf(stderr, "USAGE:\n"); - fprintf(stderr, " %s -h\n", progname); - fprintf(stderr, " %s [-r] \n", progname); - fprintf(stderr, "WHERE:\n"); - fprintf(stderr, " -r: Disables label resolution (default: labels resolved)\n"); - fprintf(stderr, " -h: Shows this message\n"); - exit(errcode); -} - -/***********************************************************************/ - -static void readPoffFile(const char *filename) -{ - char objname [FNAME_SIZE+1]; - FILE *objFile; - int errcode; - - TRACE(stderr, "[readPoffFile]"); - - /* Open the pass1 POFF object file -- Use .o1 extension */ - - (void)extension(filename, "o1", objname, 1); - if (!(objFile = fopen(objname, "rb"))) - { - printf("Error Opening %s\n", objname); - exit(1); - } /* end if */ - - /* Get a handle to a POFF input object */ - - poffHandle = poffCreateHandle(); - if (!poffHandle) - { - printf("Could not get POFF handle\n"); - exit(1); - } /* end if */ - - /* Read the POFF file into memory */ - - errcode = poffReadFile(poffHandle, objFile); - if (errcode != 0) - { - printf("Could not read POFF file, errcode=0x%02x\n", errcode); - exit(1); - } - - /* Close the input file */ - - fclose(objFile); -} /* end pass1 */ - -/***********************************************************************/ - -static void pass1(void) -{ - poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ - - TRACE(stderr, "[pass1]"); - - /* Create a handle to a temporary object to store new POFF program - * data. - */ - - poffProgHandle = poffCreateProgHandle(); - if (!poffProgHandle) - { - printf("Could not get POFF handle\n"); - exit(1); - } /* end if */ - - /* Clean up garbage left from the wasteful string stack logic */ - - stringStackOptimize(poffHandle, poffProgHandle); - - /* Replace the original program data with the new program data */ - - poffReplaceProgData(poffHandle, poffProgHandle); - - /* Release the temporary POFF object */ - - poffDestroyProgHandle(poffProgHandle); -} /* end pass1 */ - -/***********************************************************************/ - -static void pass2(void) -{ - poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ - - TRACE(stderr, "[pass2]"); - - /* Create a handle to a temporary object to store new POFF program - * data. - */ - - poffProgHandle = poffCreateProgHandle(); - if (!poffProgHandle) - { - printf("Could not get POFF handle\n"); - exit(1); - } /* end if */ - - /* Perform Local Optimizatin Initialization */ - - localOptimization(poffHandle, poffProgHandle); - - /* Replace the original program data with the new program data */ - - poffReplaceProgData(poffHandle, poffProgHandle); - - /* Release the temporary POFF object */ - - poffDestroyProgHandle(poffProgHandle); -} /* end pass2 */ - -/***********************************************************************/ - -static void pass3 (void) -{ - poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ - TRACE(stderr, "[pass3]"); - - /* Create a handle to a temporary object to store new POFF program - * data. - */ - - poffProgHandle = poffCreateProgHandle(); - if (!poffProgHandle) - { - printf("Could not get POFF handle\n"); - exit(1); - } /* end if */ - - /* Finalize program section, create relocation and line number - * sections. - */ - - optFinalize(poffHandle, poffProgHandle); - - /* Release the temporary POFF object */ - - poffDestroyProgHandle(poffProgHandle); -} - -/***********************************************************************/ - -static void writePoffFile(const char *filename) -{ - char optname [FNAME_SIZE+1]; - FILE *optFile; - - TRACE(stderr, "[writePoffFile]"); - - /* Open optimized p-code file -- Use .o extension */ - - (void)extension(filename, "o", optname, 1); - if (!(optFile = fopen(optname, "wb"))) - { - printf("Error Opening %s\n", optname); - exit(1); - } /* end if */ - - /* Then write the new POFF file */ - - poffWriteFile(poffHandle, optFile); - - /* Destroy the POFF object */ - - poffDestroyHandle(poffHandle); - - /* Close the files used on writePoffFile */ - - (void)fclose(optFile); -} /* end writePoffFile */ - -/***********************************************************************/ +/********************************************************************** + * popt.c + * P-Code Optimizer Main Logic + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include + +#include "keywords.h" +#include "podefs.h" +#include "paslib.h" +#include "pofflib.h" + +#include "pinsn.h" +#include "popt.h" +#include "psopt.h" +#include "polocal.h" +#include "pfopt.h" + +/********************************************************************** + * Private Function Prototypes + **********************************************************************/ + +static void showUsage (const char *progname, int errcode); +static void readPoffFile (const char *filename); +static void pass1 (void); +static void pass2 (void); +static void pass3 (void); +static void writePoffFile (const char *filename); + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +static poffHandle_t poffHandle; /* Handle to POFF object */ +static int no_resolve = 0; + +/********************************************************************** + * Global Functions + **********************************************************************/ + +/***********************************************************************/ + +int main(int argc, char *argv[], char *envp[]) +{ + const char *outfilename; + TRACE(stderr, "[main]"); + int option; + + /* Process command line argruments */ + + while ((option = getopt(argc, argv, "rh")) > 0) + { + switch (option) + { + case 'r' : + no_resolve++; + break; + case 'h' : + showUsage(argv[0], 0); + default: + fprintf(stderr, "Unrecognized option\n"); + showUsage(argv[0], -1); + } + } + + /* Check for existence of filename argument */ + + if (optind != argc - 1) + { + printf("Filename required at end of command line.\n"); + showUsage(argv[0], -1); + } /* end if */ + + /* Read the POFF file into memory */ + + outfilename = argv[optind]; + readPoffFile(outfilename); + + /* Performs pass1 optimization */ + + pass1(); + + /* Performs pass2 optimization */ + + insn_ResetOpCodeRead(poffHandle); + pass2(); + + if (!no_resolve) + { + /* Create final section offsets and relocation entries */ + + insn_ResetOpCodeRead(poffHandle); + pass3(); + } + + /* Write the POFF file */ + + writePoffFile(outfilename); + return 0; + +} /* End main */ + +/********************************************************************** + * Private Functions + **********************************************************************/ + +/***********************************************************************/ + +static void showUsage(const char *progname, int errcode) +{ + fprintf(stderr, "USAGE:\n"); + fprintf(stderr, " %s -h\n", progname); + fprintf(stderr, " %s [-r] \n", progname); + fprintf(stderr, "WHERE:\n"); + fprintf(stderr, " -r: Disables label resolution (default: labels resolved)\n"); + fprintf(stderr, " -h: Shows this message\n"); + exit(errcode); +} + +/***********************************************************************/ + +static void readPoffFile(const char *filename) +{ + char objname [FNAME_SIZE+1]; + FILE *objFile; + int errcode; + + TRACE(stderr, "[readPoffFile]"); + + /* Open the pass1 POFF object file -- Use .o1 extension */ + + (void)extension(filename, "o1", objname, 1); + if (!(objFile = fopen(objname, "rb"))) + { + printf("Error Opening %s\n", objname); + exit(1); + } /* end if */ + + /* Get a handle to a POFF input object */ + + poffHandle = poffCreateHandle(); + if (!poffHandle) + { + printf("Could not get POFF handle\n"); + exit(1); + } /* end if */ + + /* Read the POFF file into memory */ + + errcode = poffReadFile(poffHandle, objFile); + if (errcode != 0) + { + printf("Could not read POFF file, errcode=0x%02x\n", errcode); + exit(1); + } + + /* Close the input file */ + + fclose(objFile); +} /* end pass1 */ + +/***********************************************************************/ + +static void pass1(void) +{ + poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ + + TRACE(stderr, "[pass1]"); + + /* Create a handle to a temporary object to store new POFF program + * data. + */ + + poffProgHandle = poffCreateProgHandle(); + if (!poffProgHandle) + { + printf("Could not get POFF handle\n"); + exit(1); + } /* end if */ + + /* Clean up garbage left from the wasteful string stack logic */ + + stringStackOptimize(poffHandle, poffProgHandle); + + /* Replace the original program data with the new program data */ + + poffReplaceProgData(poffHandle, poffProgHandle); + + /* Release the temporary POFF object */ + + poffDestroyProgHandle(poffProgHandle); +} /* end pass1 */ + +/***********************************************************************/ + +static void pass2(void) +{ + poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ + + TRACE(stderr, "[pass2]"); + + /* Create a handle to a temporary object to store new POFF program + * data. + */ + + poffProgHandle = poffCreateProgHandle(); + if (!poffProgHandle) + { + printf("Could not get POFF handle\n"); + exit(1); + } /* end if */ + + /* Perform Local Optimizatin Initialization */ + + localOptimization(poffHandle, poffProgHandle); + + /* Replace the original program data with the new program data */ + + poffReplaceProgData(poffHandle, poffProgHandle); + + /* Release the temporary POFF object */ + + poffDestroyProgHandle(poffProgHandle); +} /* end pass2 */ + +/***********************************************************************/ + +static void pass3 (void) +{ + poffProgHandle_t poffProgHandle; /* Handle to temporary POFF object */ + TRACE(stderr, "[pass3]"); + + /* Create a handle to a temporary object to store new POFF program + * data. + */ + + poffProgHandle = poffCreateProgHandle(); + if (!poffProgHandle) + { + printf("Could not get POFF handle\n"); + exit(1); + } /* end if */ + + /* Finalize program section, create relocation and line number + * sections. + */ + + optFinalize(poffHandle, poffProgHandle); + + /* Release the temporary POFF object */ + + poffDestroyProgHandle(poffProgHandle); +} + +/***********************************************************************/ + +static void writePoffFile(const char *filename) +{ + char optname [FNAME_SIZE+1]; + FILE *optFile; + + TRACE(stderr, "[writePoffFile]"); + + /* Open optimized p-code file -- Use .o extension */ + + (void)extension(filename, "o", optname, 1); + if (!(optFile = fopen(optname, "wb"))) + { + printf("Error Opening %s\n", optname); + exit(1); + } /* end if */ + + /* Then write the new POFF file */ + + poffWriteFile(poffHandle, optFile); + + /* Destroy the POFF object */ + + poffDestroyHandle(poffHandle); + + /* Close the files used on writePoffFile */ + + (void)fclose(optFile); +} /* end writePoffFile */ + +/***********************************************************************/ diff --git a/misc/pascal/insn32/popt/popt.h b/misc/pascal/insn32/popt/popt.h index 9cd151a89d..c7645be9e7 100644 --- a/misc/pascal/insn32/popt/popt.h +++ b/misc/pascal/insn32/popt/popt.h @@ -1,52 +1,52 @@ -/*************************************************************************** - * popt.h - * External Declarations associated with popt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __POPT_H -#define __POPT_H - -/*************************************************************************** -* Included Files -****************************************************************************/ - -/*************************************************************************** - * Global Variables - ****************************************************************************/ - -/*************************************************************************** -* Global Function Prototypes -****************************************************************************/ - -#endif /* __POPT_H */ +/*************************************************************************** + * popt.h + * External Declarations associated with popt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __POPT_H +#define __POPT_H + +/*************************************************************************** +* Included Files +****************************************************************************/ + +/*************************************************************************** + * Global Variables + ****************************************************************************/ + +/*************************************************************************** +* Global Function Prototypes +****************************************************************************/ + +#endif /* __POPT_H */ diff --git a/misc/pascal/insn32/popt/psopt.c b/misc/pascal/insn32/popt/psopt.c index 16824106ee..7ecd3b6a95 100644 --- a/misc/pascal/insn32/popt/psopt.c +++ b/misc/pascal/insn32/popt/psopt.c @@ -3,7 +3,7 @@ * String Stack Optimizaitons * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/popt/psopt.h b/misc/pascal/insn32/popt/psopt.h index c174aac8ea..3ea1ee2277 100644 --- a/misc/pascal/insn32/popt/psopt.h +++ b/misc/pascal/insn32/popt/psopt.h @@ -1,54 +1,54 @@ -/*************************************************************************** - * psopt.h - * External Declarations associated with psopt.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PSOPT_H -#define __PSOPT_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pofflib.h" - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void stringStackOptimize(poffHandle_t poffHandle, - poffProgHandle_t poffProgHandle); - -#endif /* __PSOPT_H */ - +/*************************************************************************** + * psopt.h + * External Declarations associated with psopt.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PSOPT_H +#define __PSOPT_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pofflib.h" + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void stringStackOptimize(poffHandle_t poffHandle, + poffProgHandle_t poffProgHandle); + +#endif /* __PSOPT_H */ + diff --git a/misc/pascal/insn32/regm/Makefile b/misc/pascal/insn32/regm/Makefile index 2fa4a34249..0dca7196d0 100644 --- a/misc/pascal/insn32/regm/Makefile +++ b/misc/pascal/insn32/regm/Makefile @@ -2,7 +2,7 @@ # insn32/regm/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm.c b/misc/pascal/insn32/regm/regm.c index b037e87b2f..1b8c22fced 100644 --- a/misc/pascal/insn32/regm/regm.c +++ b/misc/pascal/insn32/regm/regm.c @@ -3,7 +3,7 @@ * Convert 32-bit pcode defintions to a register model * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm.h b/misc/pascal/insn32/regm/regm.h index 4ab5999b19..dbce7e8762 100644 --- a/misc/pascal/insn32/regm/regm.h +++ b/misc/pascal/insn32/regm/regm.h @@ -3,7 +3,7 @@ * External Declarations associated with regm.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_pass1.c b/misc/pascal/insn32/regm/regm_pass1.c index c3f5b30ef6..dcc7c572cf 100644 --- a/misc/pascal/insn32/regm/regm_pass1.c +++ b/misc/pascal/insn32/regm/regm_pass1.c @@ -3,7 +3,7 @@ * Break the pcode data into sections * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_pass1.h b/misc/pascal/insn32/regm/regm_pass1.h index f1998b1cbd..98fafcb870 100644 --- a/misc/pascal/insn32/regm/regm_pass1.h +++ b/misc/pascal/insn32/regm/regm_pass1.h @@ -1,58 +1,58 @@ -/*************************************************************************** - * regm_pass1.h - * External Declarations associated with regm_pass1.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __REGM_PASS1_H -#define __REGM_PASS1_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -/*************************************************************************** - * Definitions - ***************************************************************************/ - -/*************************************************************************** - * Global Variables - ***************************************************************************/ - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void regm_Pass1(poffHandle_t hPoff); - -#endif /* __REGM_PASS1_H */ +/*************************************************************************** + * regm_pass1.h + * External Declarations associated with regm_pass1.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __REGM_PASS1_H +#define __REGM_PASS1_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +/*************************************************************************** + * Definitions + ***************************************************************************/ + +/*************************************************************************** + * Global Variables + ***************************************************************************/ + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void regm_Pass1(poffHandle_t hPoff); + +#endif /* __REGM_PASS1_H */ diff --git a/misc/pascal/insn32/regm/regm_pass2.c b/misc/pascal/insn32/regm/regm_pass2.c index 86380984d7..619d065019 100644 --- a/misc/pascal/insn32/regm/regm_pass2.c +++ b/misc/pascal/insn32/regm/regm_pass2.c @@ -5,7 +5,7 @@ * registers) and with 32-bit immediate size. * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_pass2.h b/misc/pascal/insn32/regm/regm_pass2.h index 8d3ba91db1..22d958c275 100644 --- a/misc/pascal/insn32/regm/regm_pass2.h +++ b/misc/pascal/insn32/regm/regm_pass2.h @@ -3,7 +3,7 @@ * External Declarations associated with regm_pass2.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_registers2.c b/misc/pascal/insn32/regm/regm_registers2.c index 25aaddfaf4..e4c4212b92 100644 --- a/misc/pascal/insn32/regm/regm_registers2.c +++ b/misc/pascal/insn32/regm/regm_registers2.c @@ -3,7 +3,7 @@ * Pass 2 register management functions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_registers2.h b/misc/pascal/insn32/regm/regm_registers2.h index eabe76f5b3..24209082f2 100644 --- a/misc/pascal/insn32/regm/regm_registers2.h +++ b/misc/pascal/insn32/regm/regm_registers2.h @@ -3,7 +3,7 @@ * Definitions for management of registers * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_tree.c b/misc/pascal/insn32/regm/regm_tree.c index 0a59bbdbd0..9e2abdaff2 100644 --- a/misc/pascal/insn32/regm/regm_tree.c +++ b/misc/pascal/insn32/regm/regm_tree.c @@ -3,7 +3,7 @@ * Tree managmenet * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/insn32/regm/regm_tree.h b/misc/pascal/insn32/regm/regm_tree.h index 0d6336d746..9d1bcc0f50 100644 --- a/misc/pascal/insn32/regm/regm_tree.h +++ b/misc/pascal/insn32/regm/regm_tree.h @@ -3,7 +3,7 @@ * External Declarations associated with regm_tree.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpas/Make.defs b/misc/pascal/libpas/Make.defs index 558f6b5074..2a0fbed8c7 100644 --- a/misc/pascal/libpas/Make.defs +++ b/misc/pascal/libpas/Make.defs @@ -3,7 +3,7 @@ # NuttX runtime makefile fragment # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpas/Makefile b/misc/pascal/libpas/Makefile index b686daa89c..82ac36ab83 100644 --- a/misc/pascal/libpas/Makefile +++ b/misc/pascal/libpas/Makefile @@ -2,7 +2,7 @@ # libpas/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpas/pextension.c b/misc/pascal/libpas/pextension.c index ae883a0971..bdb2a9accf 100644 --- a/misc/pascal/libpas/pextension.c +++ b/misc/pascal/libpas/pextension.c @@ -3,7 +3,7 @@ * Manage file extensions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpas/psignextend16.c b/misc/pascal/libpas/psignextend16.c index c30bba1931..e05d20fc2d 100644 --- a/misc/pascal/libpas/psignextend16.c +++ b/misc/pascal/libpas/psignextend16.c @@ -3,7 +3,7 @@ * 16-bit sign extension * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpas/pswap.c b/misc/pascal/libpas/pswap.c index 7724259934..035988ff90 100644 --- a/misc/pascal/libpas/pswap.c +++ b/misc/pascal/libpas/pswap.c @@ -3,7 +3,7 @@ * Byte swapping to handling endian-ness conversions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/Make.defs b/misc/pascal/libpoff/Make.defs index 7de36ec5a9..41f0a63f0d 100644 --- a/misc/pascal/libpoff/Make.defs +++ b/misc/pascal/libpoff/Make.defs @@ -3,7 +3,7 @@ # NuttX runtime makefile fragment # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfdbgcontainer.c b/misc/pascal/libpoff/pfdbgcontainer.c index 572f1c2e6d..8387fa15b7 100644 --- a/misc/pascal/libpoff/pfdbgcontainer.c +++ b/misc/pascal/libpoff/pfdbgcontainer.c @@ -3,7 +3,7 @@ * Create/destroy debug info container. * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfdbgdiscard.c b/misc/pascal/libpoff/pfdbgdiscard.c index 0b80e9f453..2574644db6 100644 --- a/misc/pascal/libpoff/pfdbgdiscard.c +++ b/misc/pascal/libpoff/pfdbgdiscard.c @@ -1,94 +1,94 @@ -/********************************************************************** - * pfdbgdiscard.c - * Discard debug function information - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include - -#include "keywords.h" /* Standard types */ - -#include "pofflib.h" /* POFF library interface */ -#include "pfprivate.h" /* POFF private definitions */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ - -void poffDiscardDebugFuncInfo(poffHandle_t handle) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - /* Deallocate any buffered data */ - - if (poffInfo->debugFuncTable) - { - free(poffInfo->debugFuncTable); - } - - /* And erase any knowledge of the debug info */ - - poffInfo->debugFuncSection.sh_size = 0; - poffInfo->debugFuncTable = NULL; - poffInfo->debugFuncTableAlloc = 0; - poffInfo->debugFuncIndex = 0; -} - -/***********************************************************************/ +/********************************************************************** + * pfdbgdiscard.c + * Discard debug function information + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include + +#include "keywords.h" /* Standard types */ + +#include "pofflib.h" /* POFF library interface */ +#include "pfprivate.h" /* POFF private definitions */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ + +void poffDiscardDebugFuncInfo(poffHandle_t handle) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + /* Deallocate any buffered data */ + + if (poffInfo->debugFuncTable) + { + free(poffInfo->debugFuncTable); + } + + /* And erase any knowledge of the debug info */ + + poffInfo->debugFuncSection.sh_size = 0; + poffInfo->debugFuncTable = NULL; + poffInfo->debugFuncTableAlloc = 0; + poffInfo->debugFuncIndex = 0; +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pfdbginfo.c b/misc/pascal/libpoff/pfdbginfo.c index 41ea995cdb..1a743f091f 100644 --- a/misc/pascal/libpoff/pfdbginfo.c +++ b/misc/pascal/libpoff/pfdbginfo.c @@ -3,7 +3,7 @@ * Manage debug information * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfdhdr.c b/misc/pascal/libpoff/pfdhdr.c index 4e674a6a57..5ac627e104 100644 --- a/misc/pascal/libpoff/pfdhdr.c +++ b/misc/pascal/libpoff/pfdhdr.c @@ -1,182 +1,182 @@ -/********************************************************************** - * pfdhdr.c - * Dump the contents of POFF file and section headers - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include - -#include "keywords.h" /* Standard types */ -#include "pfprivate.h" /* POFF private definitions */ -#include "pofflib.h" /* Public interfaces */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/********************************************************************** - * Private Constant Data - **********************************************************************/ - -static const char *poffFhTypes[FHT_NTYPES] = -{ - "NONE ", /* Shouldn't happen */ - "EXEC ", /* Pascal program executable */ - "SHLIB ", /* Pascal shared library */ - "PROGRAM ", /* Pascal program object */ - "UNIT " /* Pascal unit object */ -}; - -static const char *poffShTypes[SHT_NTYPES] = -{ - "NULL ", /* Shouldn't happen */ - "PROGDATA", /* Program data */ - "SYMTAB ", /* Symbol table */ - "STRTAB ", /* String table */ - "REL ", /* Relocation data */ - "FILETAB ", /* File table */ - "LINENO ", /* Line number data */ - "DEBUG " /* Func/Proc debug data */ -}; - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -static void poffDumpSectionHeader(poffHandle_t handle, - poffSectionHeader_t *shdr, - FILE *outFile) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - fprintf(outFile, "%-10s %8s 0x%02x 0x%04x 0x%08lx 0x%08lx %ld\n", - poffGetString(poffInfo, shdr->sh_name), - poffShTypes[shdr->sh_type], shdr->sh_flags, - shdr->sh_entsize, shdr->sh_addr, shdr->sh_offset, - shdr->sh_size); -} - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ - -void poffDumpFileHeader(poffHandle_t handle, FILE *outFile) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - fprintf(outFile, "\nPOFF File Header:\n"); - fprintf(outFile, " fh_ident: %c%c%c%c\n", - poffInfo->fileHeader.fh_ident[0], poffInfo->fileHeader.fh_ident[1], - poffInfo->fileHeader.fh_ident[2], poffInfo->fileHeader.fh_ident[3]); - fprintf(outFile, " fh_version: %d\n", poffInfo->fileHeader.fh_version); - fprintf(outFile, " fh_type: %s\n", - poffFhTypes[poffInfo->fileHeader.fh_type]); - fprintf(outFile, " fh_shsize: %d\n", poffInfo->fileHeader.fh_shsize); - fprintf(outFile, " fh_shnum: %d\n", poffInfo->fileHeader.fh_shnum); - fprintf(outFile, " fh_name: %s\n", - poffGetString(poffInfo, poffInfo->fileHeader.fh_name)); - fprintf(outFile, " fh_entry: 0x%08lx\n", poffInfo->fileHeader.fh_entry); - fprintf(outFile, " fh_shoff: 0x%08lx\n", poffInfo->fileHeader.fh_shoff); -} - -/***********************************************************************/ - -void poffDumpSectionHeaders(poffHandle_t handle, FILE *outFile) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - fprintf(outFile, "\nPOFF Section Headers:\n"); - fprintf(outFile, "NAME TYPE FLAG ENTSZE ADDRESS OFFSET SIZE\n"); - - if (poffInfo->progSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->progSection, outFile); - } - - if (poffInfo->roDataSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->roDataSection, outFile); - } - - if (poffInfo->symbolTableSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->symbolTableSection, outFile); - } - - if (poffInfo->stringTableSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->stringTableSection, outFile); - } - - if (poffInfo->relocSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->relocSection, outFile); - } - - if (poffInfo->fileNameTableSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->fileNameTableSection, outFile); - } - - if (poffInfo->lineNumberSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->lineNumberSection, outFile); - } - - if (poffInfo->debugFuncSection.sh_size > 0) - { - poffDumpSectionHeader(handle, &poffInfo->debugFuncSection, outFile); - } -} - -/***********************************************************************/ +/********************************************************************** + * pfdhdr.c + * Dump the contents of POFF file and section headers + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include + +#include "keywords.h" /* Standard types */ +#include "pfprivate.h" /* POFF private definitions */ +#include "pofflib.h" /* Public interfaces */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/********************************************************************** + * Private Constant Data + **********************************************************************/ + +static const char *poffFhTypes[FHT_NTYPES] = +{ + "NONE ", /* Shouldn't happen */ + "EXEC ", /* Pascal program executable */ + "SHLIB ", /* Pascal shared library */ + "PROGRAM ", /* Pascal program object */ + "UNIT " /* Pascal unit object */ +}; + +static const char *poffShTypes[SHT_NTYPES] = +{ + "NULL ", /* Shouldn't happen */ + "PROGDATA", /* Program data */ + "SYMTAB ", /* Symbol table */ + "STRTAB ", /* String table */ + "REL ", /* Relocation data */ + "FILETAB ", /* File table */ + "LINENO ", /* Line number data */ + "DEBUG " /* Func/Proc debug data */ +}; + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +static void poffDumpSectionHeader(poffHandle_t handle, + poffSectionHeader_t *shdr, + FILE *outFile) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + fprintf(outFile, "%-10s %8s 0x%02x 0x%04x 0x%08lx 0x%08lx %ld\n", + poffGetString(poffInfo, shdr->sh_name), + poffShTypes[shdr->sh_type], shdr->sh_flags, + shdr->sh_entsize, shdr->sh_addr, shdr->sh_offset, + shdr->sh_size); +} + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ + +void poffDumpFileHeader(poffHandle_t handle, FILE *outFile) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + fprintf(outFile, "\nPOFF File Header:\n"); + fprintf(outFile, " fh_ident: %c%c%c%c\n", + poffInfo->fileHeader.fh_ident[0], poffInfo->fileHeader.fh_ident[1], + poffInfo->fileHeader.fh_ident[2], poffInfo->fileHeader.fh_ident[3]); + fprintf(outFile, " fh_version: %d\n", poffInfo->fileHeader.fh_version); + fprintf(outFile, " fh_type: %s\n", + poffFhTypes[poffInfo->fileHeader.fh_type]); + fprintf(outFile, " fh_shsize: %d\n", poffInfo->fileHeader.fh_shsize); + fprintf(outFile, " fh_shnum: %d\n", poffInfo->fileHeader.fh_shnum); + fprintf(outFile, " fh_name: %s\n", + poffGetString(poffInfo, poffInfo->fileHeader.fh_name)); + fprintf(outFile, " fh_entry: 0x%08lx\n", poffInfo->fileHeader.fh_entry); + fprintf(outFile, " fh_shoff: 0x%08lx\n", poffInfo->fileHeader.fh_shoff); +} + +/***********************************************************************/ + +void poffDumpSectionHeaders(poffHandle_t handle, FILE *outFile) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + fprintf(outFile, "\nPOFF Section Headers:\n"); + fprintf(outFile, "NAME TYPE FLAG ENTSZE ADDRESS OFFSET SIZE\n"); + + if (poffInfo->progSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->progSection, outFile); + } + + if (poffInfo->roDataSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->roDataSection, outFile); + } + + if (poffInfo->symbolTableSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->symbolTableSection, outFile); + } + + if (poffInfo->stringTableSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->stringTableSection, outFile); + } + + if (poffInfo->relocSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->relocSection, outFile); + } + + if (poffInfo->fileNameTableSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->fileNameTableSection, outFile); + } + + if (poffInfo->lineNumberSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->lineNumberSection, outFile); + } + + if (poffInfo->debugFuncSection.sh_size > 0) + { + poffDumpSectionHeader(handle, &poffInfo->debugFuncSection, outFile); + } +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pfdreloc.c b/misc/pascal/libpoff/pfdreloc.c index 5e9f5bcfee..06726e1a19 100644 --- a/misc/pascal/libpoff/pfdreloc.c +++ b/misc/pascal/libpoff/pfdreloc.c @@ -3,7 +3,7 @@ * Dump contents of a POFF file reloc table * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfdsymbol.c b/misc/pascal/libpoff/pfdsymbol.c index cce272616f..c65fa7267d 100644 --- a/misc/pascal/libpoff/pfdsymbol.c +++ b/misc/pascal/libpoff/pfdsymbol.c @@ -3,7 +3,7 @@ * Dump contents of a POFF file symbol table * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfhandle.c b/misc/pascal/libpoff/pfhandle.c index 458d631829..96d0723222 100644 --- a/misc/pascal/libpoff/pfhandle.c +++ b/misc/pascal/libpoff/pfhandle.c @@ -1,195 +1,195 @@ -/********************************************************************** - * pfhandle.c - * POFF library global variables - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include - -#include "keywords.h" /* Standard types */ -#include "pfprivate.h" /* POFF private definitions */ -#include "pofflib.h" /* Public interfaces */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ -/* Set all global data structures to a known state */ - -poffHandle_t poffCreateHandle(void) -{ - poffInfo_t *poffInfo; - - /* Create a new POFF handle */ - - poffInfo = (poffInfo_t*)malloc(sizeof(poffInfo_t)); - if (poffInfo != NULL) - { - /* Set everthing to zero */ - - memset(poffInfo, 0, sizeof(poffInfo_t)); - - /* Initialize POFF file header */ - - poffInfo->fileHeader.fh_ident[FHI_MAG0] = FHI_POFF_MAG0; - poffInfo->fileHeader.fh_ident[FHI_MAG1] = FHI_POFF_MAG1; - poffInfo->fileHeader.fh_ident[FHI_MAG2] = FHI_POFF_MAG2; - poffInfo->fileHeader.fh_ident[FHI_MAG3] = FHI_POFF_MAG3; - poffInfo->fileHeader.fh_version = FHV_CURRENT; - poffInfo->fileHeader.fh_shsize = sizeof(poffSectionHeader_t); - poffInfo->fileHeader.fh_shoff = sizeof(poffFileHeader_t); - - /* Initialize the program section header */ - - poffInfo->progSection.sh_type = SHT_PROGDATA; - poffInfo->progSection.sh_flags = SHF_ALLOC | SHF_EXEC; - - /* Initialize the initialized data section header */ - - poffInfo->roDataSection.sh_type = SHT_PROGDATA; - poffInfo->roDataSection.sh_flags = SHF_WRITE | SHF_ALLOC; - - /* Initialize the symbol table section header */ - - poffInfo->symbolTableSection.sh_type = SHT_SYMTAB; - poffInfo->symbolTableSection.sh_entsize = sizeof(poffSymbol_t); - - /* Initialize the string table section header */ - - poffInfo->stringTableSection.sh_type = SHT_STRTAB; - - /* Initialize the relocation table section header */ - - poffInfo->relocSection.sh_type = SHT_REL; - poffInfo->relocSection.sh_entsize = sizeof(poffRelocation_t); - - /* Initialize the file table section header */ - - poffInfo->fileNameTableSection.sh_type = SHT_FILETAB; - poffInfo->fileNameTableSection.sh_entsize = sizeof(poffFileTab_t); - - /* Initialize the line number section header */ - - poffInfo->lineNumberSection.sh_type = SHT_LINENO; - poffInfo->lineNumberSection.sh_entsize = sizeof(poffLineNumber_t); - - /* Initialize the debug function info section header */ - - poffInfo->debugFuncSection.sh_type = SHT_DEBUG; - poffInfo->debugFuncSection.sh_entsize = sizeof(poffDebugFuncInfo_t); - } - return poffInfo; -} - -/***********************************************************************/ - -void poffDestroyHandle(poffHandle_t handle) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - /* Free all of the allocated, in-memory data */ - - if (poffInfo->progSectionData) - free(poffInfo->progSectionData); - - if (poffInfo->roDataSectionData) - free(poffInfo->roDataSectionData); - - if (poffInfo->symbolTable) - free(poffInfo->symbolTable); - - if (poffInfo->stringTable) - free(poffInfo->stringTable); - - if (poffInfo->relocTable) - free(poffInfo->relocTable); - - if (poffInfo->fileNameTable) - free(poffInfo->fileNameTable); - - if (poffInfo->lineNumberTable) - free(poffInfo->lineNumberTable); - - if (poffInfo->debugFuncTable) - free(poffInfo->debugFuncTable); - - /* Free the container */ - - free(handle); -} - -/***********************************************************************/ - -void poffResetAccess(poffHandle_t handle) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - /* Reset read/write indices */ - - poffInfo->symbolIndex = 0; - poffInfo->progSectionIndex = 0; - poffInfo->relocIndex = 0; - poffInfo->fileNameIndex = 0; - poffInfo->lineNumberIndex = 0; - poffInfo->debugFuncIndex = 0; -} - -/***********************************************************************/ - +/********************************************************************** + * pfhandle.c + * POFF library global variables + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include + +#include "keywords.h" /* Standard types */ +#include "pfprivate.h" /* POFF private definitions */ +#include "pofflib.h" /* Public interfaces */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ +/* Set all global data structures to a known state */ + +poffHandle_t poffCreateHandle(void) +{ + poffInfo_t *poffInfo; + + /* Create a new POFF handle */ + + poffInfo = (poffInfo_t*)malloc(sizeof(poffInfo_t)); + if (poffInfo != NULL) + { + /* Set everthing to zero */ + + memset(poffInfo, 0, sizeof(poffInfo_t)); + + /* Initialize POFF file header */ + + poffInfo->fileHeader.fh_ident[FHI_MAG0] = FHI_POFF_MAG0; + poffInfo->fileHeader.fh_ident[FHI_MAG1] = FHI_POFF_MAG1; + poffInfo->fileHeader.fh_ident[FHI_MAG2] = FHI_POFF_MAG2; + poffInfo->fileHeader.fh_ident[FHI_MAG3] = FHI_POFF_MAG3; + poffInfo->fileHeader.fh_version = FHV_CURRENT; + poffInfo->fileHeader.fh_shsize = sizeof(poffSectionHeader_t); + poffInfo->fileHeader.fh_shoff = sizeof(poffFileHeader_t); + + /* Initialize the program section header */ + + poffInfo->progSection.sh_type = SHT_PROGDATA; + poffInfo->progSection.sh_flags = SHF_ALLOC | SHF_EXEC; + + /* Initialize the initialized data section header */ + + poffInfo->roDataSection.sh_type = SHT_PROGDATA; + poffInfo->roDataSection.sh_flags = SHF_WRITE | SHF_ALLOC; + + /* Initialize the symbol table section header */ + + poffInfo->symbolTableSection.sh_type = SHT_SYMTAB; + poffInfo->symbolTableSection.sh_entsize = sizeof(poffSymbol_t); + + /* Initialize the string table section header */ + + poffInfo->stringTableSection.sh_type = SHT_STRTAB; + + /* Initialize the relocation table section header */ + + poffInfo->relocSection.sh_type = SHT_REL; + poffInfo->relocSection.sh_entsize = sizeof(poffRelocation_t); + + /* Initialize the file table section header */ + + poffInfo->fileNameTableSection.sh_type = SHT_FILETAB; + poffInfo->fileNameTableSection.sh_entsize = sizeof(poffFileTab_t); + + /* Initialize the line number section header */ + + poffInfo->lineNumberSection.sh_type = SHT_LINENO; + poffInfo->lineNumberSection.sh_entsize = sizeof(poffLineNumber_t); + + /* Initialize the debug function info section header */ + + poffInfo->debugFuncSection.sh_type = SHT_DEBUG; + poffInfo->debugFuncSection.sh_entsize = sizeof(poffDebugFuncInfo_t); + } + return poffInfo; +} + +/***********************************************************************/ + +void poffDestroyHandle(poffHandle_t handle) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + /* Free all of the allocated, in-memory data */ + + if (poffInfo->progSectionData) + free(poffInfo->progSectionData); + + if (poffInfo->roDataSectionData) + free(poffInfo->roDataSectionData); + + if (poffInfo->symbolTable) + free(poffInfo->symbolTable); + + if (poffInfo->stringTable) + free(poffInfo->stringTable); + + if (poffInfo->relocTable) + free(poffInfo->relocTable); + + if (poffInfo->fileNameTable) + free(poffInfo->fileNameTable); + + if (poffInfo->lineNumberTable) + free(poffInfo->lineNumberTable); + + if (poffInfo->debugFuncTable) + free(poffInfo->debugFuncTable); + + /* Free the container */ + + free(handle); +} + +/***********************************************************************/ + +void poffResetAccess(poffHandle_t handle) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + /* Reset read/write indices */ + + poffInfo->symbolIndex = 0; + poffInfo->progSectionIndex = 0; + poffInfo->relocIndex = 0; + poffInfo->fileNameIndex = 0; + poffInfo->lineNumberIndex = 0; + poffInfo->debugFuncIndex = 0; +} + +/***********************************************************************/ + diff --git a/misc/pascal/libpoff/pfiprog.c b/misc/pascal/libpoff/pfiprog.c index c768cb0753..c2c241f588 100644 --- a/misc/pascal/libpoff/pfiprog.c +++ b/misc/pascal/libpoff/pfiprog.c @@ -3,7 +3,7 @@ * Insert program data int a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfirodata.c b/misc/pascal/libpoff/pfirodata.c index baaed6f7f9..61600a6ce6 100644 --- a/misc/pascal/libpoff/pfirodata.c +++ b/misc/pascal/libpoff/pfirodata.c @@ -3,7 +3,7 @@ * Append program read-only data to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pflabel.c b/misc/pascal/libpoff/pflabel.c index 088ad77cac..9733664660 100644 --- a/misc/pascal/libpoff/pflabel.c +++ b/misc/pascal/libpoff/pflabel.c @@ -3,7 +3,7 @@ * Label resolution logic * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pflineno.c b/misc/pascal/libpoff/pflineno.c index 3cd26c6ebe..983a74554d 100644 --- a/misc/pascal/libpoff/pflineno.c +++ b/misc/pascal/libpoff/pflineno.c @@ -3,7 +3,7 @@ * Manage line number information * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfprivate.h b/misc/pascal/libpoff/pfprivate.h index 76fdc867ea..5603422151 100644 --- a/misc/pascal/libpoff/pfprivate.h +++ b/misc/pascal/libpoff/pfprivate.h @@ -4,7 +4,7 @@ * the POFF library. These were not intended for exportation. * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfproghandle.c b/misc/pascal/libpoff/pfproghandle.c index fe5aa7fb29..6dc64c4d89 100644 --- a/misc/pascal/libpoff/pfproghandle.c +++ b/misc/pascal/libpoff/pfproghandle.c @@ -1,127 +1,127 @@ -/********************************************************************** - * pfproghandle.c - * POFF temporary progdata support - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include - -#include "keywords.h" /* Standard types */ -#include "pedefs.h" /* Pascal error codes */ - -#include "pfprivate.h" /* POFF private definitions */ -#include "pofflib.h" /* Public interfaces */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ -/* Set all global data structures to a known state */ - -poffProgHandle_t poffCreateProgHandle(void) -{ - poffProgInfo_t *poffProgInfo; - - /* Create a new POFF handle */ - - poffProgInfo = (poffProgInfo_t*)malloc(sizeof(poffProgInfo_t)); - if (poffProgInfo != NULL) - { - /* Set everthing to zero */ - - memset(poffProgInfo, 0, sizeof(poffProgInfo_t)); - } - return poffProgInfo; -} - -/***********************************************************************/ - -void poffDestroyProgHandle(poffProgHandle_t handle) -{ - /* Free all of the allocated, in-memory data */ - - poffResetProgHandle(handle); - - /* Free the container */ - - free(handle); -} - -/***********************************************************************/ - -void poffResetProgHandle(poffProgHandle_t handle) -{ - poffProgInfo_t *poffProgInfo = (poffProgInfo_t*)handle; - - /* Free all of the allocated, in-memory data */ - - if (poffProgInfo->progSectionData) - { - free(poffProgInfo->progSectionData); - } - - /* Reset everything to the initial state */ - - poffProgInfo->progSectionData = NULL; - poffProgInfo->progSectionSize = 0; - poffProgInfo->progSectionAlloc = 0; -} - -/***********************************************************************/ +/********************************************************************** + * pfproghandle.c + * POFF temporary progdata support + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include + +#include "keywords.h" /* Standard types */ +#include "pedefs.h" /* Pascal error codes */ + +#include "pfprivate.h" /* POFF private definitions */ +#include "pofflib.h" /* Public interfaces */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ +/* Set all global data structures to a known state */ + +poffProgHandle_t poffCreateProgHandle(void) +{ + poffProgInfo_t *poffProgInfo; + + /* Create a new POFF handle */ + + poffProgInfo = (poffProgInfo_t*)malloc(sizeof(poffProgInfo_t)); + if (poffProgInfo != NULL) + { + /* Set everthing to zero */ + + memset(poffProgInfo, 0, sizeof(poffProgInfo_t)); + } + return poffProgInfo; +} + +/***********************************************************************/ + +void poffDestroyProgHandle(poffProgHandle_t handle) +{ + /* Free all of the allocated, in-memory data */ + + poffResetProgHandle(handle); + + /* Free the container */ + + free(handle); +} + +/***********************************************************************/ + +void poffResetProgHandle(poffProgHandle_t handle) +{ + poffProgInfo_t *poffProgInfo = (poffProgInfo_t*)handle; + + /* Free all of the allocated, in-memory data */ + + if (poffProgInfo->progSectionData) + { + free(poffProgInfo->progSectionData); + } + + /* Reset everything to the initial state */ + + poffProgInfo->progSectionData = NULL; + poffProgInfo->progSectionSize = 0; + poffProgInfo->progSectionAlloc = 0; +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pfrdbgfunc.c b/misc/pascal/libpoff/pfrdbgfunc.c index 0efce43800..5e21aa3284 100644 --- a/misc/pascal/libpoff/pfrdbgfunc.c +++ b/misc/pascal/libpoff/pfrdbgfunc.c @@ -3,7 +3,7 @@ * Read debug function information from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfread.c b/misc/pascal/libpoff/pfread.c index f10dd8c9a6..8509657495 100644 --- a/misc/pascal/libpoff/pfread.c +++ b/misc/pascal/libpoff/pfread.c @@ -3,7 +3,7 @@ * POFF library global variables * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrelease.c b/misc/pascal/libpoff/pfrelease.c index 8b8b3d1232..72bdf0d109 100644 --- a/misc/pascal/libpoff/pfrelease.c +++ b/misc/pascal/libpoff/pfrelease.c @@ -1,94 +1,94 @@ -/********************************************************************** - * pfrelease.c - * Program data manipulations on POFF temporary object - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include - -#include "keywords.h" /* Standard types */ - -#include "pfprivate.h" /* POFF private definitions */ -#include "pofflib.h" /* Public interfaces */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ - -void poffReleaseProgData(poffHandle_t handle) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - - /* Discard any existing program section data */ - - if (poffInfo->progSectionData) - { - free(poffInfo->progSectionData); - poffInfo->progSectionData = NULL; - } - - /* Indicate that there is no program data */ - - poffInfo->progSection.sh_size = 0; - poffInfo->progSectionAlloc = 0; - poffInfo->progSectionIndex = 0; -} - -/***********************************************************************/ +/********************************************************************** + * pfrelease.c + * Program data manipulations on POFF temporary object + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include + +#include "keywords.h" /* Standard types */ + +#include "pfprivate.h" /* POFF private definitions */ +#include "pofflib.h" /* Public interfaces */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ + +void poffReleaseProgData(poffHandle_t handle) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + + /* Discard any existing program section data */ + + if (poffInfo->progSectionData) + { + free(poffInfo->progSectionData); + poffInfo->progSectionData = NULL; + } + + /* Indicate that there is no program data */ + + poffInfo->progSection.sh_size = 0; + poffInfo->progSectionAlloc = 0; + poffInfo->progSectionIndex = 0; +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pfrfname.c b/misc/pascal/libpoff/pfrfname.c index 20d964a9e2..48a4f10ae7 100644 --- a/misc/pascal/libpoff/pfrfname.c +++ b/misc/pascal/libpoff/pfrfname.c @@ -3,7 +3,7 @@ * Read file name data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrhdr.c b/misc/pascal/libpoff/pfrhdr.c index 1605511a87..a1a65a1517 100644 --- a/misc/pascal/libpoff/pfrhdr.c +++ b/misc/pascal/libpoff/pfrhdr.c @@ -3,7 +3,7 @@ * Read info from a POFF file header * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrlineno.c b/misc/pascal/libpoff/pfrlineno.c index 8ca13c5266..64bb411577 100644 --- a/misc/pascal/libpoff/pfrlineno.c +++ b/misc/pascal/libpoff/pfrlineno.c @@ -3,7 +3,7 @@ * Read line number data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrprog.c b/misc/pascal/libpoff/pfrprog.c index d1df10d5ec..2de3da049a 100644 --- a/misc/pascal/libpoff/pfrprog.c +++ b/misc/pascal/libpoff/pfrprog.c @@ -1,91 +1,91 @@ -/********************************************************************** - * pfrprog.c - * Read program data from a POFF file - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include -#include - -#include "keywords.h" /* Standard types */ -#include "pedefs.h" /* error code definitions */ - -#include "perr.h" /* error() */ -#include "pofflib.h" /* POFF library interface */ -#include "pfprivate.h" /* POFF private definitions */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/***********************************************************************/ - -int poffGetProgByte(poffHandle_t handle) -{ - poffInfo_t *poffInfo = (poffInfo_t*)handle; - int retval = EOF; - - /* Check if there is more data that has not yet been read */ - - if ((poffInfo->progSectionIndex < poffInfo->progSection.sh_size) && - (poffInfo->progSectionData != NULL)) - { - retval = (int)poffInfo->progSectionData[poffInfo->progSectionIndex]; - poffInfo->progSectionIndex++; - } - return retval; -} - -/***********************************************************************/ +/********************************************************************** + * pfrprog.c + * Read program data from a POFF file + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include +#include + +#include "keywords.h" /* Standard types */ +#include "pedefs.h" /* error code definitions */ + +#include "perr.h" /* error() */ +#include "pofflib.h" /* POFF library interface */ +#include "pfprivate.h" /* POFF private definitions */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/***********************************************************************/ + +int poffGetProgByte(poffHandle_t handle) +{ + poffInfo_t *poffInfo = (poffInfo_t*)handle; + int retval = EOF; + + /* Check if there is more data that has not yet been read */ + + if ((poffInfo->progSectionIndex < poffInfo->progSection.sh_size) && + (poffInfo->progSectionData != NULL)) + { + retval = (int)poffInfo->progSectionData[poffInfo->progSectionIndex]; + poffInfo->progSectionIndex++; + } + return retval; +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pfrrawlineno.c b/misc/pascal/libpoff/pfrrawlineno.c index ec2e950c06..3268b7fddf 100644 --- a/misc/pascal/libpoff/pfrrawlineno.c +++ b/misc/pascal/libpoff/pfrrawlineno.c @@ -3,7 +3,7 @@ * Read raw line number data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrrawreloc.c b/misc/pascal/libpoff/pfrrawreloc.c index a9f44a89ee..af49595174 100644 --- a/misc/pascal/libpoff/pfrrawreloc.c +++ b/misc/pascal/libpoff/pfrrawreloc.c @@ -3,7 +3,7 @@ * Read raw relocation data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrseek.c b/misc/pascal/libpoff/pfrseek.c index e3dc1bcc2c..7c98323e65 100644 --- a/misc/pascal/libpoff/pfrseek.c +++ b/misc/pascal/libpoff/pfrseek.c @@ -3,7 +3,7 @@ * Seek to a position in buffered program data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrstring.c b/misc/pascal/libpoff/pfrstring.c index 2f8c7ae49b..de7e0e2c14 100644 --- a/misc/pascal/libpoff/pfrstring.c +++ b/misc/pascal/libpoff/pfrstring.c @@ -3,7 +3,7 @@ * Read a string from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfrsymbol.c b/misc/pascal/libpoff/pfrsymbol.c index fe22de2706..592038071d 100644 --- a/misc/pascal/libpoff/pfrsymbol.c +++ b/misc/pascal/libpoff/pfrsymbol.c @@ -3,7 +3,7 @@ * Read symbols from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfswap.c b/misc/pascal/libpoff/pfswap.c index a33e633c35..69174af37c 100644 --- a/misc/pascal/libpoff/pfswap.c +++ b/misc/pascal/libpoff/pfswap.c @@ -3,7 +3,7 @@ * Handle POFF Endian-ness * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfsymhandle.c b/misc/pascal/libpoff/pfsymhandle.c index 819fb2a17f..4d38b286cf 100644 --- a/misc/pascal/libpoff/pfsymhandle.c +++ b/misc/pascal/libpoff/pfsymhandle.c @@ -1,127 +1,127 @@ -/********************************************************************** - * pfsymhandle.c - * POFF temporary symdata support - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **********************************************************************/ - -/********************************************************************** - * Included Files - **********************************************************************/ - -#include -#include -#include - -#include "keywords.h" /* Standard types */ -#include "pedefs.h" /* Pascal error codes */ - -#include "pfprivate.h" /* POFF private definitions */ -#include "pofflib.h" /* Public interfaces */ - -/********************************************************************** - * Definitions - **********************************************************************/ - -/********************************************************************** - * Global Variables - **********************************************************************/ - -/********************************************************************** - * Private Variables - **********************************************************************/ - -/*********************************************************************** - * Private Function Prototypes - ***********************************************************************/ - -/*********************************************************************** - * Private Functions - ***********************************************************************/ - -/*********************************************************************** - * Public Functions - ***********************************************************************/ - -/***********************************************************************/ -/* Set all global data structures to a known state */ - -poffSymHandle_t poffCreateSymHandle(void) -{ - poffSymInfo_t *poffSymInfo; - - /* Create a new POFF handle */ - - poffSymInfo = (poffSymInfo_t*)malloc(sizeof(poffSymInfo_t)); - if (poffSymInfo != NULL) - { - /* Set everthing to zero */ - - memset(poffSymInfo, 0, sizeof(poffSymInfo_t)); - } - return poffSymInfo; -} - -/***********************************************************************/ - -void poffDestroySymHandle(poffSymHandle_t handle) -{ - /* Free all of the allocated, in-memory data */ - - poffResetSymHandle(handle); - - /* Free the container */ - - free(handle); -} - -/***********************************************************************/ - -void poffResetSymHandle(poffSymHandle_t handle) -{ - poffSymInfo_t *poffSymInfo = (poffSymInfo_t*)handle; - - /* Free all of the allocated, in-memory data */ - - if (poffSymInfo->symbolTable) - { - free(poffSymInfo->symbolTable); - } - - /* Reset everything to the initial state */ - - poffSymInfo->symbolTable = NULL; - poffSymInfo->symbolTableSize = 0; - poffSymInfo->symbolTableAlloc = 0; -} - -/***********************************************************************/ +/********************************************************************** + * pfsymhandle.c + * POFF temporary symdata support + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/********************************************************************** + * Included Files + **********************************************************************/ + +#include +#include +#include + +#include "keywords.h" /* Standard types */ +#include "pedefs.h" /* Pascal error codes */ + +#include "pfprivate.h" /* POFF private definitions */ +#include "pofflib.h" /* Public interfaces */ + +/********************************************************************** + * Definitions + **********************************************************************/ + +/********************************************************************** + * Global Variables + **********************************************************************/ + +/********************************************************************** + * Private Variables + **********************************************************************/ + +/*********************************************************************** + * Private Function Prototypes + ***********************************************************************/ + +/*********************************************************************** + * Private Functions + ***********************************************************************/ + +/*********************************************************************** + * Public Functions + ***********************************************************************/ + +/***********************************************************************/ +/* Set all global data structures to a known state */ + +poffSymHandle_t poffCreateSymHandle(void) +{ + poffSymInfo_t *poffSymInfo; + + /* Create a new POFF handle */ + + poffSymInfo = (poffSymInfo_t*)malloc(sizeof(poffSymInfo_t)); + if (poffSymInfo != NULL) + { + /* Set everthing to zero */ + + memset(poffSymInfo, 0, sizeof(poffSymInfo_t)); + } + return poffSymInfo; +} + +/***********************************************************************/ + +void poffDestroySymHandle(poffSymHandle_t handle) +{ + /* Free all of the allocated, in-memory data */ + + poffResetSymHandle(handle); + + /* Free the container */ + + free(handle); +} + +/***********************************************************************/ + +void poffResetSymHandle(poffSymHandle_t handle) +{ + poffSymInfo_t *poffSymInfo = (poffSymInfo_t*)handle; + + /* Free all of the allocated, in-memory data */ + + if (poffSymInfo->symbolTable) + { + free(poffSymInfo->symbolTable); + } + + /* Reset everything to the initial state */ + + poffSymInfo->symbolTable = NULL; + poffSymInfo->symbolTableSize = 0; + poffSymInfo->symbolTableAlloc = 0; +} + +/***********************************************************************/ diff --git a/misc/pascal/libpoff/pftprog.c b/misc/pascal/libpoff/pftprog.c index a2a16aa3da..9e7f2818fa 100644 --- a/misc/pascal/libpoff/pftprog.c +++ b/misc/pascal/libpoff/pftprog.c @@ -3,7 +3,7 @@ * Program data manipulations on POFF temporary object * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pftsymbol.c b/misc/pascal/libpoff/pftsymbol.c index a8d9aed8bb..f7298d8f54 100644 --- a/misc/pascal/libpoff/pftsymbol.c +++ b/misc/pascal/libpoff/pftsymbol.c @@ -3,7 +3,7 @@ * Write symbol information to a temporary container * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwdbgfunc.c b/misc/pascal/libpoff/pfwdbgfunc.c index f6879c0882..8f80ff12ce 100644 --- a/misc/pascal/libpoff/pfwdbgfunc.c +++ b/misc/pascal/libpoff/pfwdbgfunc.c @@ -2,7 +2,7 @@ * pfwdbgfunc.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwfname.c b/misc/pascal/libpoff/pfwfname.c index 3d2bea32dc..9f6687aae8 100644 --- a/misc/pascal/libpoff/pfwfname.c +++ b/misc/pascal/libpoff/pfwfname.c @@ -3,7 +3,7 @@ * Write filename data to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwhdr.c b/misc/pascal/libpoff/pfwhdr.c index 710721c273..2c8a2feb45 100644 --- a/misc/pascal/libpoff/pfwhdr.c +++ b/misc/pascal/libpoff/pfwhdr.c @@ -3,7 +3,7 @@ * Write to POFF file file and section headers * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwlineno.c b/misc/pascal/libpoff/pfwlineno.c index 1b7cdab15d..4765391b9f 100644 --- a/misc/pascal/libpoff/pfwlineno.c +++ b/misc/pascal/libpoff/pfwlineno.c @@ -3,7 +3,7 @@ * Write line number data to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwprog.c b/misc/pascal/libpoff/pfwprog.c index 22d47d49b1..1ecf706885 100644 --- a/misc/pascal/libpoff/pfwprog.c +++ b/misc/pascal/libpoff/pfwprog.c @@ -3,7 +3,7 @@ * Write program data to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwreloc.c b/misc/pascal/libpoff/pfwreloc.c index db2a2febaf..e7b4def246 100644 --- a/misc/pascal/libpoff/pfwreloc.c +++ b/misc/pascal/libpoff/pfwreloc.c @@ -3,7 +3,7 @@ * Write relocation data to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwrite.c b/misc/pascal/libpoff/pfwrite.c index 916f25dc54..984b3511bd 100644 --- a/misc/pascal/libpoff/pfwrite.c +++ b/misc/pascal/libpoff/pfwrite.c @@ -3,7 +3,7 @@ * Write a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwrodata.c b/misc/pascal/libpoff/pfwrodata.c index 7d059a547e..c6128b9aa5 100644 --- a/misc/pascal/libpoff/pfwrodata.c +++ b/misc/pascal/libpoff/pfwrodata.c @@ -3,7 +3,7 @@ * Write to the RODATA section of a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwstring.c b/misc/pascal/libpoff/pfwstring.c index 9c3d854d75..45669576dd 100644 --- a/misc/pascal/libpoff/pfwstring.c +++ b/misc/pascal/libpoff/pfwstring.c @@ -3,7 +3,7 @@ * Write string table data a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfwsymbol.c b/misc/pascal/libpoff/pfwsymbol.c index 534e7651a4..0a0beb2be4 100644 --- a/misc/pascal/libpoff/pfwsymbol.c +++ b/misc/pascal/libpoff/pfwsymbol.c @@ -3,7 +3,7 @@ * Write symbol information to a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfxprog.c b/misc/pascal/libpoff/pfxprog.c index caa1d4864c..238e109be7 100644 --- a/misc/pascal/libpoff/pfxprog.c +++ b/misc/pascal/libpoff/pfxprog.c @@ -3,7 +3,7 @@ * Extract program data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pfxrodata.c b/misc/pascal/libpoff/pfxrodata.c index f778ab42b3..87ae3c4c67 100644 --- a/misc/pascal/libpoff/pfxrodata.c +++ b/misc/pascal/libpoff/pfxrodata.c @@ -3,7 +3,7 @@ * Extract program read-only data from a POFF file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/libpoff/pofferr.c b/misc/pascal/libpoff/pofferr.c index f32db04752..3253acdfde 100644 --- a/misc/pascal/libpoff/pofferr.c +++ b/misc/pascal/libpoff/pofferr.c @@ -3,7 +3,7 @@ * Simple error handlers * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/nuttx/INSTALL.sh b/misc/pascal/nuttx/INSTALL.sh index f513967d3e..4167186320 100755 --- a/misc/pascal/nuttx/INSTALL.sh +++ b/misc/pascal/nuttx/INSTALL.sh @@ -3,7 +3,7 @@ # Install the pascaldirl runtime into the NuttX source tree # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/nuttx/keywords.h b/misc/pascal/nuttx/keywords.h index 762fa594ed..af84b57073 100644 --- a/misc/pascal/nuttx/keywords.h +++ b/misc/pascal/nuttx/keywords.h @@ -1,67 +1,67 @@ -/************************************************************* - * keywords.h - * This file defines the pascal compilation environment - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *************************************************************/ - -#ifndef __KEYWORDS_H -#define __KEYWORDS_H - -/************************************************************* - * Included Files - *************************************************************/ - -#include -#include -#include - -/************************************************************* - * Definitions - *************************************************************/ - -#ifndef CONFIG_DEBUG -# define CONFIG_DEBUG 0 -#endif - -#ifndef CONFIG_TRACE -# define CONFIG_TRACE 0 -#endif - -#ifdef CONFIG_CPP_HAVE_VARARGS -# define DEBUG(stream, format, arg...) dbg(format, ##arg) -# define TRACE(stream, format, arg...) dbg(format, ##arg) -#else -# define DEBUG dbg -# define TRACE dbg -#endif - -#endif /* __KEYWORDS_H */ +/************************************************************* + * keywords.h + * This file defines the pascal compilation environment + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *************************************************************/ + +#ifndef __KEYWORDS_H +#define __KEYWORDS_H + +/************************************************************* + * Included Files + *************************************************************/ + +#include +#include +#include + +/************************************************************* + * Definitions + *************************************************************/ + +#ifndef CONFIG_DEBUG +# define CONFIG_DEBUG 0 +#endif + +#ifndef CONFIG_TRACE +# define CONFIG_TRACE 0 +#endif + +#ifdef CONFIG_CPP_HAVE_VARARGS +# define DEBUG(stream, format, arg...) dbg(format, ##arg) +# define TRACE(stream, format, arg...) dbg(format, ##arg) +#else +# define DEBUG dbg +# define TRACE dbg +#endif + +#endif /* __KEYWORDS_H */ diff --git a/misc/pascal/pascal/Makefile b/misc/pascal/pascal/Makefile index 9171700fdf..3a758f6489 100644 --- a/misc/pascal/pascal/Makefile +++ b/misc/pascal/pascal/Makefile @@ -2,7 +2,7 @@ # pascal/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pas.c b/misc/pascal/pascal/pas.c index 23cc12b924..b0975c42f3 100644 --- a/misc/pascal/pascal/pas.c +++ b/misc/pascal/pascal/pas.c @@ -3,7 +3,7 @@ * Main process * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pas.h b/misc/pascal/pascal/pas.h index 5c9037ed0a..e86676ba18 100644 --- a/misc/pascal/pascal/pas.h +++ b/misc/pascal/pascal/pas.h @@ -3,7 +3,7 @@ * External Declarations associated with pas.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pasdefs.h b/misc/pascal/pascal/pasdefs.h index 7fc05bf769..ade1b7ed01 100644 --- a/misc/pascal/pascal/pasdefs.h +++ b/misc/pascal/pascal/pasdefs.h @@ -3,7 +3,7 @@ * General definitions for the Pascal Compiler/Optimizer * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pblck.c b/misc/pascal/pascal/pblck.c index 19b8150385..b32701cc70 100644 --- a/misc/pascal/pascal/pblck.c +++ b/misc/pascal/pascal/pblck.c @@ -3,7 +3,7 @@ * Process a Pascal Block * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pblck.h b/misc/pascal/pascal/pblck.h index c44da54526..4ff002ff53 100644 --- a/misc/pascal/pascal/pblck.h +++ b/misc/pascal/pascal/pblck.h @@ -3,7 +3,7 @@ * External Declarations associated with pblck.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pcexpr.c b/misc/pascal/pascal/pcexpr.c index 52ef49e1aa..c14b6b1ee7 100644 --- a/misc/pascal/pascal/pcexpr.c +++ b/misc/pascal/pascal/pcexpr.c @@ -3,7 +3,7 @@ * Constant expression evaluation * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pcfunc.c b/misc/pascal/pascal/pcfunc.c index 733e85bdd7..c4188ca2b2 100644 --- a/misc/pascal/pascal/pcfunc.c +++ b/misc/pascal/pascal/pcfunc.c @@ -3,7 +3,7 @@ * Standard Function operating on constant values * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/perr.c b/misc/pascal/pascal/perr.c index 3737b25887..3e11537392 100644 --- a/misc/pascal/pascal/perr.c +++ b/misc/pascal/pascal/perr.c @@ -3,7 +3,7 @@ * Error Handlers * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pexpr.c b/misc/pascal/pascal/pexpr.c index faa179b903..855e519f35 100644 --- a/misc/pascal/pascal/pexpr.c +++ b/misc/pascal/pascal/pexpr.c @@ -3,7 +3,7 @@ * Integer Expression * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pexpr.h b/misc/pascal/pascal/pexpr.h index 9375101025..cca0595cd4 100644 --- a/misc/pascal/pascal/pexpr.h +++ b/misc/pascal/pascal/pexpr.h @@ -3,7 +3,7 @@ * External Declarations associated with pexpr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pffunc.c b/misc/pascal/pascal/pffunc.c index f296af0dea..0820272ae4 100644 --- a/misc/pascal/pascal/pffunc.c +++ b/misc/pascal/pascal/pffunc.c @@ -3,7 +3,7 @@ * Standard Functions * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pfunc.h b/misc/pascal/pascal/pfunc.h index e6d3303e44..a317fb440e 100644 --- a/misc/pascal/pascal/pfunc.h +++ b/misc/pascal/pascal/pfunc.h @@ -1,57 +1,57 @@ -/*************************************************************************** - * pfunc.h - * External Declarations associated with pfunc.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PFUNC_H -#define __PFUNC_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include "pexpr.h" /* For exprType */ - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void primeBuiltInFunctions(void); -extern exprType builtInFunction(void); -extern void builtInFunctionOfConstant(void); - -extern void checkLParen(void); -extern void checkRParen(void); - -#endif /* __PFUNC_H */ +/*************************************************************************** + * pfunc.h + * External Declarations associated with pfunc.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PFUNC_H +#define __PFUNC_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include "pexpr.h" /* For exprType */ + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void primeBuiltInFunctions(void); +extern exprType builtInFunction(void); +extern void builtInFunctionOfConstant(void); + +extern void checkLParen(void); +extern void checkRParen(void); + +#endif /* __PFUNC_H */ diff --git a/misc/pascal/pascal/pgen.c b/misc/pascal/pascal/pgen.c index 25d4d956b4..e77582ad9a 100644 --- a/misc/pascal/pascal/pgen.c +++ b/misc/pascal/pascal/pgen.c @@ -3,7 +3,7 @@ * P-Code generation logic * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pgen.h b/misc/pascal/pascal/pgen.h index 3a6412452e..aac6f8e58a 100644 --- a/misc/pascal/pascal/pgen.h +++ b/misc/pascal/pascal/pgen.h @@ -3,7 +3,7 @@ * External Declarations associated with pgen.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pprgm.c b/misc/pascal/pascal/pprgm.c index e822e18a17..f1aa5528b2 100644 --- a/misc/pascal/pascal/pprgm.c +++ b/misc/pascal/pascal/pprgm.c @@ -3,7 +3,7 @@ * main - process PROGRAM * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pprgm.h b/misc/pascal/pascal/pprgm.h index 7c4ef2ca02..226a879fd1 100644 --- a/misc/pascal/pascal/pprgm.h +++ b/misc/pascal/pascal/pprgm.h @@ -1,47 +1,47 @@ -/*************************************************************************** - * pprgm.h - * External Declarations associated with pprgm.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PPRGM_H -#define __PPRGM_H - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void program(void); -extern void usesSection(void); - -#endif /* __PPRGM_H */ +/*************************************************************************** + * pprgm.h + * External Declarations associated with pprgm.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PPRGM_H +#define __PPRGM_H + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void program(void); +extern void usesSection(void); + +#endif /* __PPRGM_H */ diff --git a/misc/pascal/pascal/pproc.c b/misc/pascal/pascal/pproc.c index e4e0e02725..df02e11a1e 100644 --- a/misc/pascal/pascal/pproc.c +++ b/misc/pascal/pascal/pproc.c @@ -3,7 +3,7 @@ * Standard procedures (all called in pstm.c) * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pproc.h b/misc/pascal/pascal/pproc.h index 5ede20a57c..946611e86d 100644 --- a/misc/pascal/pascal/pproc.h +++ b/misc/pascal/pascal/pproc.h @@ -1,49 +1,49 @@ -/*************************************************************************** - * pproc.h - * External Declarations associated with PPROC.C - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PPROC_H -#define __PPROC_H - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void primeBuiltInProcedures(void); -extern void builtInProcedure(void); -extern int actualParameterSize(STYPE *procPtr, int parmNo); -extern int actualParameterList(STYPE *procPtr); - -#endif /* __PPROC_H */ +/*************************************************************************** + * pproc.h + * External Declarations associated with PPROC.C + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PPROC_H +#define __PPROC_H + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void primeBuiltInProcedures(void); +extern void builtInProcedure(void); +extern int actualParameterSize(STYPE *procPtr, int parmNo); +extern int actualParameterList(STYPE *procPtr); + +#endif /* __PPROC_H */ diff --git a/misc/pascal/pascal/pstm.c b/misc/pascal/pascal/pstm.c index 3d6e49fa55..ee37308003 100644 --- a/misc/pascal/pascal/pstm.c +++ b/misc/pascal/pascal/pstm.c @@ -3,7 +3,7 @@ * Pascal Statements * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/pstm.h b/misc/pascal/pascal/pstm.h index 6508db68a2..5215b7a10b 100644 --- a/misc/pascal/pascal/pstm.h +++ b/misc/pascal/pascal/pstm.h @@ -1,47 +1,47 @@ -/*************************************************************************** - * pstm.h - * External Declarations associated with pstm.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PSTM_H -#define __PSTM_H - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void statement (void); /* Process Statement */ -extern void compoundStatement (void); /* Compound statement */ - -#endif /* __PSTM_H */ +/*************************************************************************** + * pstm.h + * External Declarations associated with pstm.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PSTM_H +#define __PSTM_H + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void statement (void); /* Process Statement */ +extern void compoundStatement (void); /* Compound statement */ + +#endif /* __PSTM_H */ diff --git a/misc/pascal/pascal/ptbl.c b/misc/pascal/pascal/ptbl.c index dea2bcfd38..e77652aecf 100644 --- a/misc/pascal/pascal/ptbl.c +++ b/misc/pascal/pascal/ptbl.c @@ -3,7 +3,7 @@ * Table Management Package * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/ptbl.h b/misc/pascal/pascal/ptbl.h index 14e368e1bc..906a3d9ee8 100644 --- a/misc/pascal/pascal/ptbl.h +++ b/misc/pascal/pascal/ptbl.h @@ -3,7 +3,7 @@ * External Declarations associated with ptbl.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/ptdefs.h b/misc/pascal/pascal/ptdefs.h index d7a079e13a..7d3ce55c1b 100644 --- a/misc/pascal/pascal/ptdefs.h +++ b/misc/pascal/pascal/ptdefs.h @@ -1,209 +1,209 @@ -/*********************************************************************** - * ptdefs.h - * Token and Symbol Table Definitions - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***********************************************************************/ - -#ifndef __PTDEFS_H -#define __PTDEFS_H - -/***********************************************************************/ -/* Token Values 0-0x20 reserved for get_token identification */ - -#define tIDENT 0x01 -#define tINT_CONST 0x02 -#define tCHAR_CONST 0x03 -#define tBOOLEAN_CONST 0x04 -#define tREAL_CONST 0x05 -#define tSTRING_CONST 0x06 - -#define tLE 0x07 -#define tGE 0x08 -#define tASSIGN 0x09 -#define tSUBRANGE 0x0A - -/* Token Values 0x21-0x2F (except 0x24) are for ASCII character tokens */ - -#define tNE ('#') -#define SQUOTE 0x27 -#define tMUL ('*') -#define tFDIV ('/') - -/* Token Values 0x30-0x39 are spare */ -/* Token Values 0x3A-0x40 are for ASCII character tokens */ - -#define tLT ('<') -#define tEQ ('=') -#define tGT ('>') - -/* Token Values 0x41-0x5A are SYMBOL TABLE definitions */ - -#define sPROC 0x41 -#define sFUNC 0x42 -#define sLABEL 0x43 -#define sTYPE 0x44 -#define sFILE 0x45 -#define sINT 0x46 -#define sBOOLEAN 0x47 -#define sCHAR 0x48 -#define sREAL 0x49 -#define sTEXT 0x4a -#define sSTRING 0x4b /* String storage type */ -#define sRSTRING 0x4c /* String reference type */ -#define sSTRING_CONST 0x4d -#define sPOINTER 0x4e -#define sSCALAR 0x4f -#define sSCALAR_OBJECT 0x50 -#define sSUBRANGE 0x51 -#define sSET_OF 0x52 -#define sARRAY 0x53 -#define sRECORD 0x54 -#define sRECORD_OBJECT 0x55 -#define sFILE_OF 0x56 -#define sVAR_PARM 0x57 - -/* Token Values 0x5B-0x60 (except 0x5F) are for ASCII character tokens */ -/* Token Values 0x61-0x7a are SYMBOL TABLE definitions */ - -/* Token Values 0x7b-0x7f are for ASCII character tokens */ -/* Token Value 0x7f is spare */ - -/* Token Values 0x80-0xef are for RESERVED WORDS */ - -/* Standard constants (TRUE, FALSE, MAXINT) and standard files (INPUT, OUTPUT) - * are hard initialized into the constant/symbol table and are transparent - * to the compiler */ - -/* Reserved Words 0x80-0xaf*/ - -#define tAND 0x80 -#define tARRAY 0x81 -#define tBEGIN 0x82 -#define tCASE 0x83 -#define tCONST 0x84 -#define tDIV 0x85 -#define tDO 0x86 -#define tDOWNTO 0x87 -#define tELSE 0x88 -#define tEND 0x89 -#define tFILE 0x8a -#define tFOR 0x8b -#define tFUNCTION 0x8c -#define tGOTO 0x8d -#define tIF 0x8e -#define tIMPLEMENTATION 0x08f /* Extended pascal */ -#define tIN 0x90 -#define tINTERFACE 0x91 /* Extended pascal */ -#define tLABEL 0x92 -#define tMOD 0x93 -#define tNIL 0x94 -#define tNOT 0x95 -#define tOF 0x96 -#define tOR 0x97 -#define tPACKED 0x98 -#define tPROCEDURE 0x99 -#define tPROGRAM 0x9a -#define tRECORD 0x9b -#define tREPEAT 0x9c -#define tSET 0x9d -#define tSHL 0x9e -#define tSHR 0x9f -#define tTHEN 0xa0 -#define tTO 0xa1 -#define tTYPE 0xa2 -#define tUNIT 0xa3 /* Extended pascal */ -#define tUNTIL 0xa4 -#define tUSES 0xa5 /* Extended pascal */ -#define tVAR 0xa6 -#define tWHILE 0xa7 -#define tWITH 0xa8 - -/* The following codes indicate that the token is a built-in procedure - * or function recognized by the compiler. An additional code will be - * place in tknSubType by the tokenizer to indicate which built-in - * procedure or function applies. - */ - -#define tFUNC 0xb0 -#define tPROC 0xb1 - -/***********************************************************************/ -/* Codes to indentify built-in functions and procedures */ - -#define txNONE 0x00 - -/* Standard Functions 0x01-0x1f*/ - -#define txABS 0x01 -#define txARCTAN 0x02 -#define txCHR 0x03 -#define txCOS 0x04 -#define txEOF 0x05 -#define txEOLN 0x06 -#define txEXP 0x07 -#define txLN 0x08 -#define txODD 0x09 -#define txORD 0x0a -#define txPRED 0x0b -#define txROUND 0x0c -#define txSIN 0x0d -#define txSQR 0x0e -#define txSQRT 0x0f -#define txSUCC 0x10 -#define txTRUNC 0x11 - -/* "Less than standard" Functions 0x20-0x7f */ - -#define txGETENV 0x20 - -/* Standard Procedures 0x81-0xbf */ - -#define txGET 0x80 -#define txNEW 0x81 -#define txPACK 0x82 -#define txPAGE 0x83 -#define txPUT 0x84 -#define txREAD 0x85 -#define txREADLN 0x86 -#define txRESET 0x87 -#define txREWRITE 0x88 -#define txUNPACK 0x89 -#define txWRITE 0x8a -#define txWRITELN 0x8b - -/* "Less than standard" Procedures 0xc0-0xff */ - -#define txVAL 0xc0 - -#endif /* __PTDEFS_H */ - +/*********************************************************************** + * ptdefs.h + * Token and Symbol Table Definitions + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PTDEFS_H +#define __PTDEFS_H + +/***********************************************************************/ +/* Token Values 0-0x20 reserved for get_token identification */ + +#define tIDENT 0x01 +#define tINT_CONST 0x02 +#define tCHAR_CONST 0x03 +#define tBOOLEAN_CONST 0x04 +#define tREAL_CONST 0x05 +#define tSTRING_CONST 0x06 + +#define tLE 0x07 +#define tGE 0x08 +#define tASSIGN 0x09 +#define tSUBRANGE 0x0A + +/* Token Values 0x21-0x2F (except 0x24) are for ASCII character tokens */ + +#define tNE ('#') +#define SQUOTE 0x27 +#define tMUL ('*') +#define tFDIV ('/') + +/* Token Values 0x30-0x39 are spare */ +/* Token Values 0x3A-0x40 are for ASCII character tokens */ + +#define tLT ('<') +#define tEQ ('=') +#define tGT ('>') + +/* Token Values 0x41-0x5A are SYMBOL TABLE definitions */ + +#define sPROC 0x41 +#define sFUNC 0x42 +#define sLABEL 0x43 +#define sTYPE 0x44 +#define sFILE 0x45 +#define sINT 0x46 +#define sBOOLEAN 0x47 +#define sCHAR 0x48 +#define sREAL 0x49 +#define sTEXT 0x4a +#define sSTRING 0x4b /* String storage type */ +#define sRSTRING 0x4c /* String reference type */ +#define sSTRING_CONST 0x4d +#define sPOINTER 0x4e +#define sSCALAR 0x4f +#define sSCALAR_OBJECT 0x50 +#define sSUBRANGE 0x51 +#define sSET_OF 0x52 +#define sARRAY 0x53 +#define sRECORD 0x54 +#define sRECORD_OBJECT 0x55 +#define sFILE_OF 0x56 +#define sVAR_PARM 0x57 + +/* Token Values 0x5B-0x60 (except 0x5F) are for ASCII character tokens */ +/* Token Values 0x61-0x7a are SYMBOL TABLE definitions */ + +/* Token Values 0x7b-0x7f are for ASCII character tokens */ +/* Token Value 0x7f is spare */ + +/* Token Values 0x80-0xef are for RESERVED WORDS */ + +/* Standard constants (TRUE, FALSE, MAXINT) and standard files (INPUT, OUTPUT) + * are hard initialized into the constant/symbol table and are transparent + * to the compiler */ + +/* Reserved Words 0x80-0xaf*/ + +#define tAND 0x80 +#define tARRAY 0x81 +#define tBEGIN 0x82 +#define tCASE 0x83 +#define tCONST 0x84 +#define tDIV 0x85 +#define tDO 0x86 +#define tDOWNTO 0x87 +#define tELSE 0x88 +#define tEND 0x89 +#define tFILE 0x8a +#define tFOR 0x8b +#define tFUNCTION 0x8c +#define tGOTO 0x8d +#define tIF 0x8e +#define tIMPLEMENTATION 0x08f /* Extended pascal */ +#define tIN 0x90 +#define tINTERFACE 0x91 /* Extended pascal */ +#define tLABEL 0x92 +#define tMOD 0x93 +#define tNIL 0x94 +#define tNOT 0x95 +#define tOF 0x96 +#define tOR 0x97 +#define tPACKED 0x98 +#define tPROCEDURE 0x99 +#define tPROGRAM 0x9a +#define tRECORD 0x9b +#define tREPEAT 0x9c +#define tSET 0x9d +#define tSHL 0x9e +#define tSHR 0x9f +#define tTHEN 0xa0 +#define tTO 0xa1 +#define tTYPE 0xa2 +#define tUNIT 0xa3 /* Extended pascal */ +#define tUNTIL 0xa4 +#define tUSES 0xa5 /* Extended pascal */ +#define tVAR 0xa6 +#define tWHILE 0xa7 +#define tWITH 0xa8 + +/* The following codes indicate that the token is a built-in procedure + * or function recognized by the compiler. An additional code will be + * place in tknSubType by the tokenizer to indicate which built-in + * procedure or function applies. + */ + +#define tFUNC 0xb0 +#define tPROC 0xb1 + +/***********************************************************************/ +/* Codes to indentify built-in functions and procedures */ + +#define txNONE 0x00 + +/* Standard Functions 0x01-0x1f*/ + +#define txABS 0x01 +#define txARCTAN 0x02 +#define txCHR 0x03 +#define txCOS 0x04 +#define txEOF 0x05 +#define txEOLN 0x06 +#define txEXP 0x07 +#define txLN 0x08 +#define txODD 0x09 +#define txORD 0x0a +#define txPRED 0x0b +#define txROUND 0x0c +#define txSIN 0x0d +#define txSQR 0x0e +#define txSQRT 0x0f +#define txSUCC 0x10 +#define txTRUNC 0x11 + +/* "Less than standard" Functions 0x20-0x7f */ + +#define txGETENV 0x20 + +/* Standard Procedures 0x81-0xbf */ + +#define txGET 0x80 +#define txNEW 0x81 +#define txPACK 0x82 +#define txPAGE 0x83 +#define txPUT 0x84 +#define txREAD 0x85 +#define txREADLN 0x86 +#define txRESET 0x87 +#define txREWRITE 0x88 +#define txUNPACK 0x89 +#define txWRITE 0x8a +#define txWRITELN 0x8b + +/* "Less than standard" Procedures 0xc0-0xff */ + +#define txVAL 0xc0 + +#endif /* __PTDEFS_H */ + diff --git a/misc/pascal/pascal/ptkn.c b/misc/pascal/pascal/ptkn.c index 615fcc3a9e..192f5f8177 100644 --- a/misc/pascal/pascal/ptkn.c +++ b/misc/pascal/pascal/ptkn.c @@ -3,7 +3,7 @@ * Tokenization Package * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/ptkn.h b/misc/pascal/pascal/ptkn.h index 4348af5a1b..b68533f1fc 100644 --- a/misc/pascal/pascal/ptkn.h +++ b/misc/pascal/pascal/ptkn.h @@ -3,7 +3,7 @@ * External Declarations associated with ptkn.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/punit.c b/misc/pascal/pascal/punit.c index 00a21d9ea2..00b74e18b7 100644 --- a/misc/pascal/pascal/punit.c +++ b/misc/pascal/pascal/punit.c @@ -3,7 +3,7 @@ * Parse a pascal unit file * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/pascal/punit.h b/misc/pascal/pascal/punit.h index 128ec71982..9a29dd19dd 100644 --- a/misc/pascal/pascal/punit.h +++ b/misc/pascal/pascal/punit.h @@ -1,51 +1,51 @@ -/*************************************************************************** - * punit.h - * External Declarations associated with punit.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PUNIT_H -#define __PUNIT_H - -/*************************************************************************** - * Public Types - ***************************************************************************/ - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -extern void unitImplementation(void); -extern void unitInterface(void); - -#endif /* __PUNIT_H */ +/*************************************************************************** + * punit.h + * External Declarations associated with punit.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PUNIT_H +#define __PUNIT_H + +/*************************************************************************** + * Public Types + ***************************************************************************/ + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +extern void unitImplementation(void); +extern void unitInterface(void); + +#endif /* __PUNIT_H */ diff --git a/misc/pascal/plink/Makefile b/misc/pascal/plink/Makefile index 7a5d188f5d..d469df5594 100644 --- a/misc/pascal/plink/Makefile +++ b/misc/pascal/plink/Makefile @@ -2,7 +2,7 @@ # plink/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/plink/plink.c b/misc/pascal/plink/plink.c index d304c49ad9..0e9c15078b 100644 --- a/misc/pascal/plink/plink.c +++ b/misc/pascal/plink/plink.c @@ -3,7 +3,7 @@ * P-Code Linker * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/plink/plink.h b/misc/pascal/plink/plink.h index 350bce4618..d4e88a1f6e 100644 --- a/misc/pascal/plink/plink.h +++ b/misc/pascal/plink/plink.h @@ -1,52 +1,52 @@ -/*************************************************************************** - * plink.h - * External Declarations associated with plink.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef __PLINK_H -#define __PLINK_H - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -/*************************************************************************** - * Global Variables - ***************************************************************************/ - -/*************************************************************************** - * Global Function Prototypes - ***************************************************************************/ - -#endif /* __PLINK_H */ +/*************************************************************************** + * plink.h + * External Declarations associated with plink.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PLINK_H +#define __PLINK_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +/*************************************************************************** + * Global Variables + ***************************************************************************/ + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +#endif /* __PLINK_H */ diff --git a/misc/pascal/plink/plreloc.c b/misc/pascal/plink/plreloc.c index 0faf0715c8..4b9e7e032b 100644 --- a/misc/pascal/plink/plreloc.c +++ b/misc/pascal/plink/plreloc.c @@ -3,7 +3,7 @@ * Relocation management for the P-Code Linker * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/plink/plreloc.h b/misc/pascal/plink/plreloc.h index d8dd894761..abdb393b10 100644 --- a/misc/pascal/plink/plreloc.h +++ b/misc/pascal/plink/plreloc.h @@ -3,7 +3,7 @@ * External Declarations associated with plreloc.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/plink/plsym.c b/misc/pascal/plink/plsym.c index ceeb0c4f7e..3f27f512bb 100644 --- a/misc/pascal/plink/plsym.c +++ b/misc/pascal/plink/plsym.c @@ -3,7 +3,7 @@ * Symbol management for the P-Code Linker * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/plink/plsym.h b/misc/pascal/plink/plsym.h index 69218830fd..95f047e9dd 100644 --- a/misc/pascal/plink/plsym.h +++ b/misc/pascal/plink/plsym.h @@ -3,7 +3,7 @@ * External Declarations associated with plsym.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/misc/pascal/tests/501-uses.sh b/misc/pascal/tests/501-uses.sh index 819ffc2489..27e1055242 100755 --- a/misc/pascal/tests/501-uses.sh +++ b/misc/pascal/tests/501-uses.sh @@ -3,7 +3,7 @@ # tests/501-uses.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/tests/debug.sh b/misc/pascal/tests/debug.sh index 855ede28d4..91857853f6 100755 --- a/misc/pascal/tests/debug.sh +++ b/misc/pascal/tests/debug.sh @@ -3,7 +3,7 @@ # debug.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/tests/list.sh b/misc/pascal/tests/list.sh index 2e50ab8762..8d599d66e5 100755 --- a/misc/pascal/tests/list.sh +++ b/misc/pascal/tests/list.sh @@ -3,7 +3,7 @@ # list.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/tests/testall.sh b/misc/pascal/tests/testall.sh index 6af7570ea3..7d3f745571 100755 --- a/misc/pascal/tests/testall.sh +++ b/misc/pascal/tests/testall.sh @@ -3,7 +3,7 @@ # testall.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/misc/pascal/tests/testone.sh b/misc/pascal/tests/testone.sh index 9f407e331a..10eb999cb1 100755 --- a/misc/pascal/tests/testone.sh +++ b/misc/pascal/tests/testone.sh @@ -3,7 +3,7 @@ # testone.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From 84cfa6fceb0d0779e381982f04d253f8f105ebdc Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 18:32:24 +0000 Subject: [PATCH 66/95] Email address change in nuttx/ git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5145 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/8051/include/arch.h | 2 +- nuttx/arch/8051/include/irq.h | 2 +- nuttx/arch/8051/include/syscall.h | 2 +- nuttx/arch/8051/include/types.h | 2 +- nuttx/arch/8051/src/up_allocateheap.c | 2 +- nuttx/arch/8051/src/up_assert.c | 2 +- nuttx/arch/8051/src/up_blocktask.c | 2 +- nuttx/arch/8051/src/up_debug.c | 2 +- nuttx/arch/8051/src/up_delay.c | 2 +- nuttx/arch/8051/src/up_exit.c | 2 +- nuttx/arch/8051/src/up_head.S | 2 +- nuttx/arch/8051/src/up_idle.c | 2 +- nuttx/arch/8051/src/up_initialize.c | 2 +- nuttx/arch/8051/src/up_initialstate.c | 2 +- nuttx/arch/8051/src/up_internal.h | 2 +- nuttx/arch/8051/src/up_interruptcontext.c | 2 +- nuttx/arch/8051/src/up_irq.c | 2 +- nuttx/arch/8051/src/up_irqtest.c | 2 +- nuttx/arch/8051/src/up_putc.c | 2 +- nuttx/arch/8051/src/up_releasepending.c | 2 +- nuttx/arch/8051/src/up_reprioritizertr.c | 2 +- nuttx/arch/8051/src/up_restorecontext.c | 2 +- nuttx/arch/8051/src/up_savecontext.c | 2 +- nuttx/arch/8051/src/up_timerisr.c | 2 +- nuttx/arch/8051/src/up_unblocktask.c | 2 +- nuttx/arch/arm/include/arch.h | 2 +- nuttx/arch/arm/include/arm/irq.h | 2 +- nuttx/arch/arm/include/arm/syscall.h | 2 +- nuttx/arch/arm/include/armv7-m/syscall.h | 2 +- nuttx/arch/arm/include/c5471/irq.h | 2 +- nuttx/arch/arm/include/dm320/irq.h | 2 +- nuttx/arch/arm/include/imx/irq.h | 2 +- nuttx/arch/arm/include/irq.h | 2 +- nuttx/arch/arm/include/kinetis/irq.h | 2 +- nuttx/arch/arm/include/lm3s/irq.h | 2 +- nuttx/arch/arm/include/lpc17xx/irq.h | 2 +- nuttx/arch/arm/include/lpc214x/irq.h | 2 +- nuttx/arch/arm/include/lpc2378/irq.h | 2 +- nuttx/arch/arm/include/lpc31xx/irq.h | 2 +- nuttx/arch/arm/include/sam3u/irq.h | 2 +- nuttx/arch/arm/include/serial.h | 2 +- nuttx/arch/arm/include/str71x/irq.h | 2 +- nuttx/arch/arm/include/syscall.h | 2 +- nuttx/arch/arm/include/types.h | 2 +- nuttx/arch/arm/include/watchdog.h | 2 +- nuttx/arch/arm/src/arm/arm.h | 2 +- nuttx/arch/arm/src/arm/pg_macros.h | 2 +- nuttx/arch/arm/src/arm/up_allocpage.c | 2 +- nuttx/arch/arm/src/arm/up_assert.c | 2 +- nuttx/arch/arm/src/arm/up_blocktask.c | 2 +- nuttx/arch/arm/src/arm/up_cache.S | 2 +- nuttx/arch/arm/src/arm/up_checkmapping.c | 2 +- nuttx/arch/arm/src/arm/up_copystate.c | 2 +- nuttx/arch/arm/src/arm/up_dataabort.c | 2 +- nuttx/arch/arm/src/arm/up_doirq.c | 2 +- .../arch/arm/src/arm/up_fullcontextrestore.S | 2 +- nuttx/arch/arm/src/arm/up_head.S | 2 +- nuttx/arch/arm/src/arm/up_initialstate.c | 2 +- nuttx/arch/arm/src/arm/up_pginitialize.c | 2 +- nuttx/arch/arm/src/arm/up_prefetchabort.c | 2 +- nuttx/arch/arm/src/arm/up_releasepending.c | 2 +- nuttx/arch/arm/src/arm/up_reprioritizertr.c | 2 +- nuttx/arch/arm/src/arm/up_saveusercontext.S | 2 +- nuttx/arch/arm/src/arm/up_schedulesigaction.c | 2 +- nuttx/arch/arm/src/arm/up_sigdeliver.c | 2 +- nuttx/arch/arm/src/arm/up_syscall.c | 2 +- nuttx/arch/arm/src/arm/up_unblocktask.c | 2 +- nuttx/arch/arm/src/arm/up_undefinedinsn.c | 2 +- nuttx/arch/arm/src/arm/up_va2pte.c | 2 +- nuttx/arch/arm/src/arm/up_vectoraddrexcptn.S | 2 +- nuttx/arch/arm/src/arm/up_vectors.S | 2 +- nuttx/arch/arm/src/arm/up_vectortab.S | 2 +- nuttx/arch/arm/src/armv7-m/psr.h | 2 +- nuttx/arch/arm/src/armv7-m/svcall.h | 2 +- nuttx/arch/arm/src/armv7-m/up_assert.c | 2 +- nuttx/arch/arm/src/armv7-m/up_copystate.c | 2 +- nuttx/arch/arm/src/armv7-m/up_doirq.c | 2 +- nuttx/arch/arm/src/armv7-m/up_hardfault.c | 2 +- nuttx/arch/arm/src/armv7-m/up_memfault.c | 2 +- nuttx/arch/arm/src/armv7-m/up_mpu.c | 2 +- .../arch/arm/src/armv7-m/up_saveusercontext.S | 2 +- nuttx/arch/arm/src/armv7-m/up_sigdeliver.c | 2 +- nuttx/arch/arm/src/armv7-m/up_switchcontext.S | 2 +- nuttx/arch/arm/src/c5471/Make.defs | 2 +- nuttx/arch/arm/src/c5471/c5471_ethernet.c | 2 +- nuttx/arch/arm/src/c5471/c5471_lowputc.S | 2 +- nuttx/arch/arm/src/c5471/c5471_timerisr.c | 2 +- nuttx/arch/arm/src/c5471/c5471_vectors.S | 2 +- nuttx/arch/arm/src/c5471/chip.h | 2 +- nuttx/arch/arm/src/calypso/Make.defs | 2 +- nuttx/arch/arm/src/calypso/calypso_lowputc.S | 2 +- nuttx/arch/arm/src/calypso/calypso_serial.c | 2 +- nuttx/arch/arm/src/calypso/chip.h | 2 +- nuttx/arch/arm/src/common/up_allocateheap.c | 2 +- nuttx/arch/arm/src/common/up_arch.h | 2 +- nuttx/arch/arm/src/common/up_checkstack.c | 2 +- nuttx/arch/arm/src/common/up_etherstub.c | 2 +- nuttx/arch/arm/src/common/up_idle.c | 2 +- .../arch/arm/src/common/up_interruptcontext.c | 2 +- nuttx/arch/arm/src/common/up_lowputs.c | 2 +- nuttx/arch/arm/src/common/up_mdelay.c | 2 +- nuttx/arch/arm/src/common/up_modifyreg16.c | 2 +- nuttx/arch/arm/src/common/up_modifyreg32.c | 2 +- nuttx/arch/arm/src/common/up_modifyreg8.c | 2 +- nuttx/arch/arm/src/common/up_puts.c | 2 +- nuttx/arch/arm/src/common/up_releasestack.c | 2 +- nuttx/arch/arm/src/common/up_udelay.c | 2 +- nuttx/arch/arm/src/common/up_usestack.c | 2 +- nuttx/arch/arm/src/dm320/Make.defs | 2 +- nuttx/arch/arm/src/dm320/chip.h | 2 +- nuttx/arch/arm/src/dm320/dm320_ahb.h | 2 +- nuttx/arch/arm/src/dm320/dm320_allocateheap.c | 2 +- nuttx/arch/arm/src/dm320/dm320_busc.h | 2 +- nuttx/arch/arm/src/dm320/dm320_clkc.h | 2 +- nuttx/arch/arm/src/dm320/dm320_decodeirq.c | 2 +- nuttx/arch/arm/src/dm320/dm320_emif.h | 2 +- nuttx/arch/arm/src/dm320/dm320_framebuffer.c | 2 +- nuttx/arch/arm/src/dm320/dm320_gio.h | 2 +- nuttx/arch/arm/src/dm320/dm320_intc.h | 2 +- nuttx/arch/arm/src/dm320/dm320_lowputc.S | 2 +- nuttx/arch/arm/src/dm320/dm320_memorymap.h | 2 +- nuttx/arch/arm/src/dm320/dm320_osd.h | 2 +- nuttx/arch/arm/src/dm320/dm320_restart.S | 2 +- nuttx/arch/arm/src/dm320/dm320_timer.h | 2 +- nuttx/arch/arm/src/dm320/dm320_timerisr.c | 2 +- nuttx/arch/arm/src/dm320/dm320_uart.h | 2 +- nuttx/arch/arm/src/dm320/dm320_usb.h | 2 +- nuttx/arch/arm/src/imx/Make.defs | 2 +- nuttx/arch/arm/src/imx/chip.h | 2 +- nuttx/arch/arm/src/imx/imx_aitc.h | 2 +- nuttx/arch/arm/src/imx/imx_allocateheap.c | 2 +- nuttx/arch/arm/src/imx/imx_cspi.h | 2 +- nuttx/arch/arm/src/imx/imx_decodeirq.c | 2 +- nuttx/arch/arm/src/imx/imx_dma.h | 500 ++--- nuttx/arch/arm/src/imx/imx_eim.h | 170 +- nuttx/arch/arm/src/imx/imx_gpio.c | 2 +- nuttx/arch/arm/src/imx/imx_gpio.h | 1124 +++++------ nuttx/arch/arm/src/imx/imx_i2c.h | 138 +- nuttx/arch/arm/src/imx/imx_irq.c | 2 +- nuttx/arch/arm/src/imx/imx_lowputc.S | 2 +- nuttx/arch/arm/src/imx/imx_memorymap.h | 2 +- nuttx/arch/arm/src/imx/imx_rtc.h | 170 +- nuttx/arch/arm/src/imx/imx_spi.c | 2 +- nuttx/arch/arm/src/imx/imx_system.h | 374 ++-- nuttx/arch/arm/src/imx/imx_timer.h | 2 +- nuttx/arch/arm/src/imx/imx_timerisr.c | 2 +- nuttx/arch/arm/src/imx/imx_uart.h | 2 +- nuttx/arch/arm/src/imx/imx_usbd.h | 640 +++--- nuttx/arch/arm/src/imx/imx_wdog.h | 162 +- nuttx/arch/arm/src/kinetis/Make.defs | 2 +- nuttx/arch/arm/src/kinetis/chip.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_adc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_aips.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_axbs.h | 2 +- .../arm/src/kinetis/kinetis_clockconfig.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_clrpend.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_cmp.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_cmt.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_config.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_crc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_dac.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_dma.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_dmamux.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_dspi.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_enet.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_ewm.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_flexbus.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_flexcan.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_fmc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_ftfl.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_ftm.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_gpio.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_i2c.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_i2s.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_idle.c | 208 +- nuttx/arch/arm/src/kinetis/kinetis_internal.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_irq.c | 2 +- .../arch/arm/src/kinetis/kinetis_k40pinmux.h | 2 +- .../arch/arm/src/kinetis/kinetis_k60pinmux.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_llwu.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_lowputc.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_lptmr.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_mcg.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_mcm.h | 2 +- .../arch/arm/src/kinetis/kinetis_memorymap.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_mmcau.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_mpu.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_osc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pdb.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pin.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pindma.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pingpio.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pinirq.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pinmux.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pit.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_pmc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_port.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_rngb.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_rtc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_sdhc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_sim.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_slcd.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_smc.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_timerisr.c | 2 +- nuttx/arch/arm/src/kinetis/kinetis_tsi.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_uart.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_usbdcd.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_usbotg.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_vectors.S | 2 +- nuttx/arch/arm/src/kinetis/kinetis_vrefv1.h | 2 +- nuttx/arch/arm/src/kinetis/kinetis_wdog.c | 234 +-- nuttx/arch/arm/src/kinetis/kinetis_wdog.h | 2 +- nuttx/arch/arm/src/lm3s/Make.defs | 2 +- nuttx/arch/arm/src/lm3s/chip.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_dumpgpio.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_ethernet.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_flash.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_gpio.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_gpio.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_i2c.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_internal.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_irq.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_lowputc.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_memorymap.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_ssi.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_ssi.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_syscontrol.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_syscontrol.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_timerisr.c | 2 +- nuttx/arch/arm/src/lm3s/lm3s_uart.h | 2 +- nuttx/arch/arm/src/lm3s/lm3s_vectors.S | 2 +- nuttx/arch/arm/src/lpc17xx/chip.h | 2 +- .../arch/arm/src/lpc17xx/lpc17_clockconfig.c | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_clrpend.c | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_dac.h | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_emacram.h | 484 ++--- nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.c | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h | 834 ++++---- nuttx/arch/arm/src/lpc17xx/lpc17_gpio.h | 392 ++-- nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c | 1090 +++++----- nuttx/arch/arm/src/lpc17xx/lpc17_i2c.h | 416 ++-- nuttx/arch/arm/src/lpc17xx/lpc17_mcpwm.h | 560 +++--- nuttx/arch/arm/src/lpc17xx/lpc17_memorymap.h | 272 +-- nuttx/arch/arm/src/lpc17xx/lpc17_ohciram.h | 526 ++--- nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h | 1270 ++++++------ nuttx/arch/arm/src/lpc17xx/lpc17_pwm.h | 446 ++--- nuttx/arch/arm/src/lpc17xx/lpc17_qei.h | 380 ++-- nuttx/arch/arm/src/lpc17xx/lpc17_rit.h | 184 +- nuttx/arch/arm/src/lpc17xx/lpc17_serial.h | 254 +-- nuttx/arch/arm/src/lpc17xx/lpc17_spi.c | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_spi.h | 282 +-- nuttx/arch/arm/src/lpc17xx/lpc17_syscon.h | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_timerisr.c | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_usb.h | 1556 +++++++-------- nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S | 2 +- nuttx/arch/arm/src/lpc17xx/lpc17_wdt.h | 216 +- nuttx/arch/arm/src/lpc214x/Make.defs | 2 +- nuttx/arch/arm/src/lpc214x/chip.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_apb.h | 2 +- .../arch/arm/src/lpc214x/lpc214x_decodeirq.c | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_i2c.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_irq.c | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_lowputc.S | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_pinsel.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_pll.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_power.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_spi.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_timer.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_timerisr.c | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_uart.h | 284 +-- nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h | 2 +- nuttx/arch/arm/src/lpc214x/lpc214x_vic.h | 2 +- nuttx/arch/arm/src/lpc2378/Make.defs | 2 +- nuttx/arch/arm/src/lpc2378/chip.h | 2 +- nuttx/arch/arm/src/lpc2378/internal.h | 2 +- .../arch/arm/src/lpc2378/lpc23xx_decodeirq.c | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_lowputc.S | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c | 2 +- nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h | 462 ++--- nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h | 2 +- nuttx/arch/arm/src/lpc43xx/chip/lpc43_qei.h | 2 +- nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c | 2 +- nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h | 2 +- nuttx/arch/arm/src/sam3u/chip.h | 2 +- nuttx/arch/arm/src/sam3u/sam3u_adc.h | 472 ++--- nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_chipid.h | 334 ++-- nuttx/arch/arm/src/sam3u/sam3u_clockconfig.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_dmac.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_dmac.h | 882 ++++----- nuttx/arch/arm/src/sam3u/sam3u_eefc.h | 240 +-- nuttx/arch/arm/src/sam3u/sam3u_gpbr.h | 180 +- nuttx/arch/arm/src/sam3u/sam3u_gpioirq.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_hsmci.h | 594 +++--- nuttx/arch/arm/src/sam3u/sam3u_irq.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_lowputc.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_matrix.h | 428 ++-- nuttx/arch/arm/src/sam3u/sam3u_memorymap.h | 290 +-- nuttx/arch/arm/src/sam3u/sam3u_mpuinit.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_pdc.h | 206 +- nuttx/arch/arm/src/sam3u/sam3u_pio.h | 648 +++--- nuttx/arch/arm/src/sam3u/sam3u_pmc.h | 632 +++--- nuttx/arch/arm/src/sam3u/sam3u_pwm.h | 1266 ++++++------ nuttx/arch/arm/src/sam3u/sam3u_rstc.h | 204 +- nuttx/arch/arm/src/sam3u/sam3u_rtc.h | 368 ++-- nuttx/arch/arm/src/sam3u/sam3u_rtt.h | 178 +- nuttx/arch/arm/src/sam3u/sam3u_smc.h | 864 ++++---- nuttx/arch/arm/src/sam3u/sam3u_ssc.h | 584 +++--- nuttx/arch/arm/src/sam3u/sam3u_supc.h | 328 ++-- nuttx/arch/arm/src/sam3u/sam3u_tc.h | 694 +++---- nuttx/arch/arm/src/sam3u/sam3u_timerisr.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_twi.h | 384 ++-- nuttx/arch/arm/src/sam3u/sam3u_uart.h | 782 ++++---- nuttx/arch/arm/src/sam3u/sam3u_udphs.h | 741 +++---- nuttx/arch/arm/src/sam3u/sam3u_userspace.c | 2 +- nuttx/arch/arm/src/sam3u/sam3u_vectors.S | 2 +- nuttx/arch/arm/src/sam3u/sam3u_wdt.h | 192 +- nuttx/arch/arm/src/stm32/chip/stm32_bkp.h | 2 +- nuttx/arch/arm/src/stm32/chip/stm32_exti.h | 2 +- .../arch/arm/src/stm32/chip/stm32_memorymap.h | 2 +- .../arm/src/stm32/chip/stm32f100_pinmap.h | 2 +- .../arm/src/stm32/chip/stm32f103re_pinmap.h | 2 +- .../arm/src/stm32/chip/stm32f105vb_pinmap.h | 2 +- .../arm/src/stm32/chip/stm32f107vc_pinmap.h | 2 +- .../src/stm32/chip/stm32f10xxx_memorymap.h | 2 +- .../arm/src/stm32/chip/stm32f20xxx_pinmap.h | 2 +- .../arm/src/stm32/chip/stm32f40xxx_gpio.h | 2 +- .../arch/arm/src/stm32/chip/stm32f40xxx_rtc.h | 2 +- nuttx/arch/arm/src/stm32/stm32_dbgmcu.h | 2 +- nuttx/arch/arm/src/stm32/stm32_eth.h | 2 +- nuttx/arch/arm/src/stm32/stm32_gpio.h | 2 +- nuttx/arch/arm/src/stm32/stm32_i2c.h | 2 +- nuttx/arch/arm/src/stm32/stm32_lowputc.h | 2 +- nuttx/arch/arm/src/stm32/stm32_pwr.h | 2 +- nuttx/arch/arm/src/stm32/stm32_spi.h | 2 +- nuttx/arch/arm/src/stm32/stm32_timerisr.c | 2 +- nuttx/arch/arm/src/stm32/stm32_usbdev.h | 2 +- nuttx/arch/arm/src/stm32/stm32_wdg.h | 2 +- nuttx/arch/arm/src/str71x/Make.defs | 2 +- nuttx/arch/arm/src/str71x/chip.h | 2 +- nuttx/arch/arm/src/str71x/str71x_adc12.h | 218 +- nuttx/arch/arm/src/str71x/str71x_apb.h | 218 +- nuttx/arch/arm/src/str71x/str71x_bspi.h | 306 +-- nuttx/arch/arm/src/str71x/str71x_can.h | 414 ++-- nuttx/arch/arm/src/str71x/str71x_decodeirq.c | 2 +- nuttx/arch/arm/src/str71x/str71x_eic.h | 352 ++-- nuttx/arch/arm/src/str71x/str71x_emi.h | 206 +- nuttx/arch/arm/src/str71x/str71x_flash.h | 246 +-- nuttx/arch/arm/src/str71x/str71x_gpio.h | 188 +- nuttx/arch/arm/src/str71x/str71x_i2c.h | 306 +-- nuttx/arch/arm/src/str71x/str71x_internal.h | 312 +-- nuttx/arch/arm/src/str71x/str71x_irq.c | 2 +- nuttx/arch/arm/src/str71x/str71x_lowputc.c | 2 +- nuttx/arch/arm/src/str71x/str71x_map.h | 198 +- nuttx/arch/arm/src/str71x/str71x_pcu.h | 318 +-- nuttx/arch/arm/src/str71x/str71x_prccu.c | 2 +- nuttx/arch/arm/src/str71x/str71x_rccu.h | 286 +-- nuttx/arch/arm/src/str71x/str71x_rtc.h | 184 +- nuttx/arch/arm/src/str71x/str71x_timer.h | 310 +-- nuttx/arch/arm/src/str71x/str71x_timerisr.c | 2 +- nuttx/arch/arm/src/str71x/str71x_uart.h | 362 ++-- nuttx/arch/arm/src/str71x/str71x_usb.h | 360 ++-- nuttx/arch/arm/src/str71x/str71x_wdog.h | 150 +- nuttx/arch/arm/src/str71x/str71x_xti.c | 2 +- nuttx/arch/arm/src/str71x/str71x_xti.h | 210 +- nuttx/arch/avr/include/arch.h | 2 +- nuttx/arch/avr/include/at32uc3/irq.h | 2 +- nuttx/arch/avr/include/at90usb/irq.h | 2 +- nuttx/arch/avr/include/atmega/irq.h | 2 +- nuttx/arch/avr/include/avr/avr.h | 2 +- nuttx/arch/avr/include/avr/irq.h | 2 +- nuttx/arch/avr/include/avr/syscall.h | 2 +- nuttx/arch/avr/include/avr/types.h | 2 +- nuttx/arch/avr/include/avr32/avr32.h | 2 +- nuttx/arch/avr/include/avr32/irq.h | 2 +- nuttx/arch/avr/include/avr32/syscall.h | 2 +- nuttx/arch/avr/include/avr32/types.h | 2 +- nuttx/arch/avr/include/irq.h | 2 +- nuttx/arch/avr/include/limits.h | 2 +- nuttx/arch/avr/include/syscall.h | 2 +- nuttx/arch/avr/include/types.h | 2 +- nuttx/arch/avr/src/at32uc3/Make.defs | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_abdac.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_adc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_clkinit.c | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_config.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_eic.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_flashc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_gpio.c | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_gpio.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_gpioirq.c | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_hmatrix.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_intc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_internal.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_irq.c | 2 +- .../arch/avr/src/at32uc3/at32uc3_memorymap.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_pdca.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_pinmux.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_pm.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_pwm.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_rtc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_spi.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_ssc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_tc.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_twi.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_usart.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_usbb.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3_wdt.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3a_pinmux.h | 2 +- nuttx/arch/avr/src/at32uc3/at32uc3b_pinmux.h | 2 +- nuttx/arch/avr/src/at32uc3/chip.h | 2 +- nuttx/arch/avr/src/at90usb/Make.defs | 2 +- .../arch/avr/src/at90usb/at90usb_exceptions.S | 2 +- nuttx/arch/avr/src/at90usb/at90usb_head.S | 2 +- nuttx/arch/avr/src/at90usb/at90usb_internal.h | 2 +- .../arch/avr/src/at90usb/at90usb_lowconsole.c | 2 +- .../arch/avr/src/at90usb/at90usb_memorymap.h | 2 +- nuttx/arch/avr/src/at90usb/at90usb_timerisr.c | 2 +- nuttx/arch/avr/src/at90usb/chip.h | 2 +- nuttx/arch/avr/src/atmega/Make.defs | 2 +- nuttx/arch/avr/src/atmega/atmega_exceptions.S | 2 +- nuttx/arch/avr/src/atmega/atmega_head.S | 2 +- nuttx/arch/avr/src/atmega/atmega_internal.h | 2 +- nuttx/arch/avr/src/atmega/atmega_lowconsole.c | 2 +- nuttx/arch/avr/src/atmega/atmega_memorymap.h | 2 +- nuttx/arch/avr/src/atmega/atmega_timerisr.c | 2 +- nuttx/arch/avr/src/atmega/chip.h | 2 +- nuttx/arch/avr/src/avr/avr_internal.h | 2 +- nuttx/arch/avr/src/avr/excptmacros.h | 2 +- nuttx/arch/avr/src/avr/up_blocktask.c | 2 +- nuttx/arch/avr/src/avr/up_checkstack.c | 2 +- nuttx/arch/avr/src/avr/up_copystate.c | 2 +- nuttx/arch/avr/src/avr/up_createstack.c | 2 +- nuttx/arch/avr/src/avr/up_doirq.c | 2 +- nuttx/arch/avr/src/avr/up_dumpstate.c | 2 +- nuttx/arch/avr/src/avr/up_initialstate.c | 2 +- nuttx/arch/avr/src/avr/up_irq.c | 2 +- nuttx/arch/avr/src/avr/up_releasepending.c | 2 +- nuttx/arch/avr/src/avr/up_reprioritizertr.c | 2 +- nuttx/arch/avr/src/avr/up_romgetc.c | 2 +- nuttx/arch/avr/src/avr/up_schedulesigaction.c | 2 +- nuttx/arch/avr/src/avr/up_sigdeliver.c | 2 +- nuttx/arch/avr/src/avr/up_spi.c | 2 +- nuttx/arch/avr/src/avr/up_switchcontext.S | 2 +- nuttx/arch/avr/src/avr/up_unblocktask.c | 2 +- nuttx/arch/avr/src/avr/up_usestack.c | 2 +- nuttx/arch/avr/src/avr32/avr32_internal.h | 2 +- nuttx/arch/avr/src/avr32/up_blocktask.c | 2 +- nuttx/arch/avr/src/avr32/up_copystate.c | 2 +- nuttx/arch/avr/src/avr32/up_createstack.c | 2 +- nuttx/arch/avr/src/avr32/up_doirq.c | 2 +- nuttx/arch/avr/src/avr32/up_dumpstate.c | 2 +- nuttx/arch/avr/src/avr32/up_exceptions.S | 2 +- .../avr/src/avr32/up_fullcontextrestore.S | 2 +- nuttx/arch/avr/src/avr32/up_initialstate.c | 2 +- nuttx/arch/avr/src/avr32/up_nommuhead.S | 2 +- nuttx/arch/avr/src/avr32/up_releasepending.c | 2 +- nuttx/arch/avr/src/avr32/up_reprioritizertr.c | 2 +- .../arch/avr/src/avr32/up_schedulesigaction.c | 2 +- nuttx/arch/avr/src/avr32/up_sigdeliver.c | 2 +- nuttx/arch/avr/src/avr32/up_switchcontext.S | 2 +- nuttx/arch/avr/src/avr32/up_syscall6.S | 2 +- nuttx/arch/avr/src/avr32/up_unblocktask.c | 2 +- nuttx/arch/avr/src/avr32/up_usestack.c | 2 +- nuttx/arch/avr/src/common/up_allocateheap.c | 2 +- nuttx/arch/avr/src/common/up_arch.h | 2 +- nuttx/arch/avr/src/common/up_assert.c | 2 +- nuttx/arch/avr/src/common/up_exit.c | 2 +- nuttx/arch/avr/src/common/up_idle.c | 2 +- nuttx/arch/avr/src/common/up_internal.h | 2 +- .../arch/avr/src/common/up_interruptcontext.c | 2 +- nuttx/arch/avr/src/common/up_lowputs.c | 2 +- nuttx/arch/avr/src/common/up_mdelay.c | 2 +- nuttx/arch/avr/src/common/up_modifyreg16.c | 2 +- nuttx/arch/avr/src/common/up_modifyreg32.c | 2 +- nuttx/arch/avr/src/common/up_modifyreg8.c | 2 +- nuttx/arch/avr/src/common/up_puts.c | 2 +- nuttx/arch/avr/src/common/up_releasestack.c | 2 +- nuttx/arch/avr/src/common/up_udelay.c | 2 +- nuttx/arch/hc/include/arch.h | 2 +- nuttx/arch/hc/include/hc12/irq.h | 2 +- nuttx/arch/hc/include/hc12/types.h | 2 +- nuttx/arch/hc/include/hcs12/irq.h | 2 +- nuttx/arch/hc/include/hcs12/types.h | 2 +- nuttx/arch/hc/include/irq.h | 2 +- nuttx/arch/hc/include/limits.h | 2 +- nuttx/arch/hc/include/m9s12/irq.h | 2 +- nuttx/arch/hc/include/syscall.h | 2 +- nuttx/arch/hc/include/types.h | 2 +- nuttx/arch/hc/src/common/up_allocateheap.c | 2 +- nuttx/arch/hc/src/common/up_arch.h | 2 +- nuttx/arch/hc/src/common/up_blocktask.c | 2 +- nuttx/arch/hc/src/common/up_copystate.c | 2 +- nuttx/arch/hc/src/common/up_createstack.c | 2 +- nuttx/arch/hc/src/common/up_doirq.c | 2 +- nuttx/arch/hc/src/common/up_exit.c | 2 +- nuttx/arch/hc/src/common/up_idle.c | 2 +- .../arch/hc/src/common/up_interruptcontext.c | 2 +- nuttx/arch/hc/src/common/up_mdelay.c | 2 +- nuttx/arch/hc/src/common/up_modifyreg16.c | 2 +- nuttx/arch/hc/src/common/up_modifyreg32.c | 2 +- nuttx/arch/hc/src/common/up_modifyreg8.c | 2 +- nuttx/arch/hc/src/common/up_puts.c | 2 +- nuttx/arch/hc/src/common/up_releasepending.c | 2 +- nuttx/arch/hc/src/common/up_releasestack.c | 2 +- nuttx/arch/hc/src/common/up_reprioritizertr.c | 2 +- nuttx/arch/hc/src/common/up_udelay.c | 2 +- nuttx/arch/hc/src/common/up_unblocktask.c | 2 +- nuttx/arch/hc/src/common/up_usestack.c | 2 +- nuttx/arch/hc/src/m9s12/Make.defs | 2 +- nuttx/arch/hc/src/m9s12/chip.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_assert.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_atd.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_crg.h | 280 +-- nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_emac.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_ethernet.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_flash.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_gpio.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_iic.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_initialstate.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_int.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_internal.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_irq.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_lowputc.S | 2 +- nuttx/arch/hc/src/m9s12/m9s12_mebi.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_mmc.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_phy.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_pim.h | 2 +- .../arch/hc/src/m9s12/m9s12_saveusercontext.S | 2 +- nuttx/arch/hc/src/m9s12/m9s12_sci.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_serial.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_spi.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_start.S | 2 +- nuttx/arch/hc/src/m9s12/m9s12_tim.h | 2 +- nuttx/arch/hc/src/m9s12/m9s12_timerisr.c | 2 +- nuttx/arch/hc/src/m9s12/m9s12_vectors.S | 2 +- nuttx/arch/mips/include/arch.h | 2 +- nuttx/arch/mips/include/irq.h | 2 +- nuttx/arch/mips/include/mips32/registers.h | 2 +- nuttx/arch/mips/include/mips32/syscall.h | 2 +- nuttx/arch/mips/include/syscall.h | 2 +- nuttx/arch/mips/include/types.h | 2 +- nuttx/arch/mips/src/common/up_allocateheap.c | 2 +- nuttx/arch/mips/src/common/up_arch.h | 2 +- nuttx/arch/mips/src/common/up_createstack.c | 2 +- .../mips/src/common/up_interruptcontext.c | 2 +- nuttx/arch/mips/src/common/up_lowputs.c | 2 +- nuttx/arch/mips/src/common/up_mdelay.c | 2 +- nuttx/arch/mips/src/common/up_modifyreg16.c | 2 +- nuttx/arch/mips/src/common/up_modifyreg32.c | 2 +- nuttx/arch/mips/src/common/up_modifyreg8.c | 2 +- nuttx/arch/mips/src/common/up_puts.c | 2 +- nuttx/arch/mips/src/common/up_releasestack.c | 2 +- nuttx/arch/mips/src/common/up_udelay.c | 2 +- nuttx/arch/mips/src/common/up_usestack.c | 2 +- nuttx/arch/mips/src/mips32/mips32-memorymap.h | 192 +- nuttx/arch/mips/src/mips32/up_assert.c | 2 +- nuttx/arch/mips/src/mips32/up_copystate.c | 2 +- nuttx/arch/mips/src/mips32/up_doirq.c | 2 +- nuttx/arch/mips/src/mips32/up_dumpstate.c | 2 +- .../arch/mips/src/mips32/up_releasepending.c | 2 +- .../arch/mips/src/mips32/up_reprioritizertr.c | 2 +- nuttx/arch/mips/src/mips32/up_unblocktask.c | 2 +- nuttx/arch/mips/src/pic32mx/pic32mx-che.h | 370 ++-- nuttx/arch/mips/src/pic32mx/pic32mx-cm.h | 280 +-- nuttx/arch/mips/src/pic32mx/pic32mx-ddp.h | 188 +- nuttx/arch/mips/src/pic32mx/pic32mx-flash.h | 260 +-- nuttx/arch/mips/src/pic32mx/pic32mx-osc.h | 330 ++-- nuttx/arch/mips/src/pic32mx/pic32mx-pmp.h | 2 +- nuttx/arch/mips/src/pic32mx/pic32mx-reset.h | 234 +-- nuttx/arch/mips/src/pic32mx/pic32mx-rtcc.h | 438 ++--- .../arch/mips/src/pic32mx/pic32mx-timerisr.c | 2 +- nuttx/arch/mips/src/pic32mx/pic32mx-wdt.h | 2 +- nuttx/arch/rgmp/include/math.h | 2 +- nuttx/arch/rgmp/include/stdbool.h | 2 +- nuttx/arch/rgmp/include/stdint.h | 2 +- nuttx/arch/rgmp/include/types.h | 2 +- nuttx/arch/rgmp/src/x86/com.c | 2 +- nuttx/arch/sh/include/arch.h | 2 +- nuttx/arch/sh/include/irq.h | 2 +- nuttx/arch/sh/include/limits.h | 2 +- nuttx/arch/sh/include/m16c/irq.h | 2 +- nuttx/arch/sh/include/m16c/types.h | 2 +- nuttx/arch/sh/include/serial.h | 2 +- nuttx/arch/sh/include/sh1/irq.h | 2 +- nuttx/arch/sh/include/sh1/types.h | 2 +- nuttx/arch/sh/include/syscall.h | 2 +- nuttx/arch/sh/include/types.h | 2 +- nuttx/arch/sh/include/watchdog.h | 2 +- nuttx/arch/sh/src/common/up_allocateheap.c | 2 +- nuttx/arch/sh/src/common/up_arch.h | 2 +- nuttx/arch/sh/src/common/up_assert.c | 2 +- nuttx/arch/sh/src/common/up_blocktask.c | 2 +- nuttx/arch/sh/src/common/up_createstack.c | 2 +- nuttx/arch/sh/src/common/up_doirq.c | 2 +- nuttx/arch/sh/src/common/up_exit.c | 2 +- nuttx/arch/sh/src/common/up_idle.c | 2 +- .../arch/sh/src/common/up_interruptcontext.c | 2 +- nuttx/arch/sh/src/common/up_lowputs.c | 2 +- nuttx/arch/sh/src/common/up_mdelay.c | 2 +- nuttx/arch/sh/src/common/up_puts.c | 2 +- nuttx/arch/sh/src/common/up_releasepending.c | 2 +- nuttx/arch/sh/src/common/up_releasestack.c | 2 +- nuttx/arch/sh/src/common/up_reprioritizertr.c | 2 +- nuttx/arch/sh/src/common/up_udelay.c | 2 +- nuttx/arch/sh/src/common/up_unblocktask.c | 2 +- nuttx/arch/sh/src/common/up_usestack.c | 2 +- nuttx/arch/sh/src/m16c/Make.defs | 2 +- nuttx/arch/sh/src/m16c/chip.h | 2 +- nuttx/arch/sh/src/m16c/m16c_copystate.c | 2 +- nuttx/arch/sh/src/m16c/m16c_dumpstate.c | 2 +- nuttx/arch/sh/src/m16c/m16c_initialstate.c | 2 +- nuttx/arch/sh/src/m16c/m16c_irq.c | 2 +- nuttx/arch/sh/src/m16c/m16c_lowputc.c | 2 +- .../arch/sh/src/m16c/m16c_schedulesigaction.c | 2 +- nuttx/arch/sh/src/m16c/m16c_sigdeliver.c | 2 +- nuttx/arch/sh/src/m16c/m16c_timer.h | 2 +- nuttx/arch/sh/src/m16c/m16c_timerisr.c | 2 +- nuttx/arch/sh/src/m16c/m16c_uart.h | 2 +- nuttx/arch/sh/src/m16c/m16c_vectors.S | 2 +- nuttx/arch/sh/src/sh1/Make.defs | 2 +- nuttx/arch/sh/src/sh1/chip.h | 2 +- nuttx/arch/sh/src/sh1/sh1_703x.h | 950 ++++----- nuttx/arch/sh/src/sh1/sh1_copystate.c | 2 +- nuttx/arch/sh/src/sh1/sh1_dumpstate.c | 2 +- nuttx/arch/sh/src/sh1/sh1_initialstate.c | 2 +- nuttx/arch/sh/src/sh1/sh1_irq.c | 2 +- nuttx/arch/sh/src/sh1/sh1_lowputc.c | 2 +- nuttx/arch/sh/src/sh1/sh1_saveusercontext.S | 2 +- nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c | 2 +- nuttx/arch/sh/src/sh1/sh1_sigdeliver.c | 2 +- nuttx/arch/sh/src/sh1/sh1_timerisr.c | 2 +- nuttx/arch/sh/src/sh1/sh1_vector.S | 2 +- nuttx/arch/sim/include/arch.h | 2 +- nuttx/arch/sim/include/irq.h | 2 +- nuttx/arch/sim/include/syscall.h | 2 +- nuttx/arch/sim/include/types.h | 2 +- nuttx/arch/sim/src/up_allocateheap.c | 2 +- nuttx/arch/sim/src/up_blockdevice.c | 2 +- nuttx/arch/sim/src/up_blocktask.c | 2 +- nuttx/arch/sim/src/up_createstack.c | 2 +- nuttx/arch/sim/src/up_devconsole.c | 2 +- nuttx/arch/sim/src/up_deviceimage.c | 2 +- nuttx/arch/sim/src/up_exit.c | 2 +- nuttx/arch/sim/src/up_framebuffer.c | 2 +- nuttx/arch/sim/src/up_hostusleep.c | 2 +- nuttx/arch/sim/src/up_initialstate.c | 2 +- nuttx/arch/sim/src/up_interruptcontext.c | 2 +- nuttx/arch/sim/src/up_lcd.c | 2 +- nuttx/arch/sim/src/up_netdev.c | 2 +- nuttx/arch/sim/src/up_releasepending.c | 2 +- nuttx/arch/sim/src/up_releasestack.c | 2 +- nuttx/arch/sim/src/up_reprioritizertr.c | 2 +- nuttx/arch/sim/src/up_romgetc.c | 2 +- nuttx/arch/sim/src/up_schedulesigaction.c | 2 +- nuttx/arch/sim/src/up_stdio.c | 2 +- nuttx/arch/sim/src/up_tapdev.c | 2 +- nuttx/arch/sim/src/up_touchscreen.c | 2 +- nuttx/arch/sim/src/up_unblocktask.c | 2 +- nuttx/arch/sim/src/up_usestack.c | 2 +- nuttx/arch/sim/src/up_wpcap.c | 2 +- nuttx/arch/sim/src/up_x11eventloop.c | 2 +- nuttx/arch/sim/src/up_x11framebuffer.c | 2 +- nuttx/arch/x86/include/arch.h | 2 +- nuttx/arch/x86/include/i486/arch.h | 2 +- nuttx/arch/x86/include/i486/io.h | 2 +- nuttx/arch/x86/include/i486/irq.h | 2 +- nuttx/arch/x86/include/i486/limits.h | 2 +- nuttx/arch/x86/include/i486/syscall.h | 2 +- nuttx/arch/x86/include/i486/types.h | 2 +- nuttx/arch/x86/include/io.h | 2 +- nuttx/arch/x86/include/irq.h | 2 +- nuttx/arch/x86/include/limits.h | 2 +- nuttx/arch/x86/include/qemu/arch.h | 2 +- nuttx/arch/x86/include/qemu/irq.h | 2 +- nuttx/arch/x86/include/syscall.h | 2 +- nuttx/arch/x86/include/types.h | 2 +- nuttx/arch/x86/src/common/up_allocateheap.c | 2 +- nuttx/arch/x86/src/common/up_arch.h | 2 +- nuttx/arch/x86/src/common/up_assert.c | 2 +- nuttx/arch/x86/src/common/up_blocktask.c | 2 +- nuttx/arch/x86/src/common/up_copystate.c | 2 +- nuttx/arch/x86/src/common/up_exit.c | 2 +- .../arch/x86/src/common/up_interruptcontext.c | 2 +- nuttx/arch/x86/src/common/up_lowputs.c | 2 +- nuttx/arch/x86/src/common/up_mdelay.c | 2 +- nuttx/arch/x86/src/common/up_modifyreg16.c | 2 +- nuttx/arch/x86/src/common/up_modifyreg32.c | 2 +- nuttx/arch/x86/src/common/up_modifyreg8.c | 2 +- nuttx/arch/x86/src/common/up_puts.c | 2 +- nuttx/arch/x86/src/common/up_releasepending.c | 2 +- .../arch/x86/src/common/up_reprioritizertr.c | 2 +- nuttx/arch/x86/src/common/up_udelay.c | 2 +- nuttx/arch/x86/src/common/up_unblocktask.c | 2 +- nuttx/arch/x86/src/i486/i486_utils.S | 2 +- nuttx/arch/x86/src/i486/up_createstack.c | 2 +- nuttx/arch/x86/src/i486/up_initialstate.c | 2 +- nuttx/arch/x86/src/i486/up_irq.c | 2 +- nuttx/arch/x86/src/i486/up_regdump.c | 2 +- nuttx/arch/x86/src/i486/up_releasestack.c | 2 +- nuttx/arch/x86/src/i486/up_savestate.c | 2 +- .../arch/x86/src/i486/up_schedulesigaction.c | 2 +- nuttx/arch/x86/src/i486/up_sigdeliver.c | 2 +- nuttx/arch/x86/src/i486/up_syscall6.S | 194 +- nuttx/arch/x86/src/i486/up_usestack.c | 2 +- nuttx/arch/x86/src/qemu/Make.defs | 2 +- nuttx/arch/x86/src/qemu/chip.h | 2 +- .../x86/src/qemu/qemu_fullcontextrestore.S | 2 +- nuttx/arch/x86/src/qemu/qemu_handlers.c | 2 +- nuttx/arch/x86/src/qemu/qemu_head.S | 322 +-- nuttx/arch/x86/src/qemu/qemu_idle.c | 2 +- nuttx/arch/x86/src/qemu/qemu_internal.h | 2 +- nuttx/arch/x86/src/qemu/qemu_lowputc.c | 2 +- nuttx/arch/x86/src/qemu/qemu_memorymap.h | 134 +- .../arch/x86/src/qemu/qemu_saveusercontext.S | 2 +- nuttx/arch/x86/src/qemu/qemu_timerisr.c | 2 +- nuttx/arch/x86/src/qemu/qemu_vectors.S | 2 +- nuttx/arch/z16/include/arch.h | 2 +- nuttx/arch/z16/include/irq.h | 2 +- nuttx/arch/z16/include/serial.h | 2 +- nuttx/arch/z16/include/syscall.h | 2 +- nuttx/arch/z16/include/types.h | 2 +- nuttx/arch/z16/include/z16f/arch.h | 2 +- nuttx/arch/z16/include/z16f/irq.h | 2 +- nuttx/arch/z16/src/common/up_allocateheap.c | 2 +- nuttx/arch/z16/src/common/up_assert.c | 2 +- nuttx/arch/z16/src/common/up_blocktask.c | 2 +- nuttx/arch/z16/src/common/up_copystate.c | 2 +- nuttx/arch/z16/src/common/up_createstack.c | 2 +- nuttx/arch/z16/src/common/up_doirq.c | 2 +- nuttx/arch/z16/src/common/up_exit.c | 2 +- nuttx/arch/z16/src/common/up_idle.c | 2 +- nuttx/arch/z16/src/common/up_initialstate.c | 2 +- .../arch/z16/src/common/up_interruptcontext.c | 2 +- nuttx/arch/z16/src/common/up_mdelay.c | 2 +- nuttx/arch/z16/src/common/up_registerdump.c | 2 +- nuttx/arch/z16/src/common/up_releasepending.c | 2 +- nuttx/arch/z16/src/common/up_releasestack.c | 2 +- .../arch/z16/src/common/up_reprioritizertr.c | 2 +- .../z16/src/common/up_schedulesigaction.c | 2 +- nuttx/arch/z16/src/common/up_sigdeliver.c | 2 +- nuttx/arch/z16/src/common/up_stackdump.c | 2 +- nuttx/arch/z16/src/common/up_udelay.c | 2 +- nuttx/arch/z16/src/common/up_unblocktask.c | 2 +- nuttx/arch/z16/src/common/up_usestack.c | 2 +- nuttx/arch/z16/src/z16f/Make.defs | 2 +- nuttx/arch/z16/src/z16f/chip.h | 2 +- nuttx/arch/z16/src/z16f/z16f_clkinit.c | 2 +- nuttx/arch/z16/src/z16f/z16f_irq.c | 2 +- .../z16/src/z16f/z16f_restoreusercontext.S | 2 +- .../arch/z16/src/z16f/z16f_saveusercontext.S | 2 +- nuttx/arch/z16/src/z16f/z16f_sysexec.c | 2 +- nuttx/arch/z16/src/z16f/z16f_timerisr.c | 2 +- nuttx/arch/z80/include/arch.h | 2 +- nuttx/arch/z80/include/ez80/arch.h | 2 +- nuttx/arch/z80/include/ez80/io.h | 2 +- nuttx/arch/z80/include/ez80/irq.h | 2 +- nuttx/arch/z80/include/ez80/types.h | 2 +- nuttx/arch/z80/include/io.h | 2 +- nuttx/arch/z80/include/irq.h | 2 +- nuttx/arch/z80/include/limits.h | 2 +- nuttx/arch/z80/include/serial.h | 2 +- nuttx/arch/z80/include/syscall.h | 2 +- nuttx/arch/z80/include/types.h | 2 +- nuttx/arch/z80/include/z8/arch.h | 2 +- nuttx/arch/z80/include/z8/irq.h | 2 +- nuttx/arch/z80/include/z8/types.h | 2 +- nuttx/arch/z80/include/z80/arch.h | 2 +- nuttx/arch/z80/include/z80/io.h | 2 +- nuttx/arch/z80/include/z80/irq.h | 2 +- nuttx/arch/z80/include/z80/types.h | 2 +- nuttx/arch/z80/src/common/up_allocateheap.c | 2 +- nuttx/arch/z80/src/common/up_arch.h | 2 +- nuttx/arch/z80/src/common/up_assert.c | 2 +- nuttx/arch/z80/src/common/up_blocktask.c | 2 +- nuttx/arch/z80/src/common/up_createstack.c | 2 +- nuttx/arch/z80/src/common/up_doirq.c | 2 +- nuttx/arch/z80/src/common/up_exit.c | 2 +- nuttx/arch/z80/src/common/up_idle.c | 2 +- nuttx/arch/z80/src/common/up_internal.h | 2 +- .../arch/z80/src/common/up_interruptcontext.c | 2 +- nuttx/arch/z80/src/common/up_mdelay.c | 2 +- nuttx/arch/z80/src/common/up_puts.c | 2 +- nuttx/arch/z80/src/common/up_releasepending.c | 2 +- nuttx/arch/z80/src/common/up_releasestack.c | 2 +- .../arch/z80/src/common/up_reprioritizertr.c | 2 +- nuttx/arch/z80/src/common/up_stackdump.c | 2 +- nuttx/arch/z80/src/common/up_udelay.c | 2 +- nuttx/arch/z80/src/common/up_unblocktask.c | 2 +- nuttx/arch/z80/src/common/up_usestack.c | 2 +- nuttx/arch/z80/src/ez80/Make.defs | 2 +- nuttx/arch/z80/src/ez80/chip.h | 2 +- nuttx/arch/z80/src/ez80/ez80_clock.c | 2 +- nuttx/arch/z80/src/ez80/ez80_copystate.c | 2 +- nuttx/arch/z80/src/ez80/ez80_i2c.c | 2 +- nuttx/arch/z80/src/ez80/ez80_initialstate.c | 2 +- nuttx/arch/z80/src/ez80/ez80_io.asm | 2 +- nuttx/arch/z80/src/ez80/ez80_irq.c | 2 +- nuttx/arch/z80/src/ez80/ez80_irqsave.asm | 176 +- nuttx/arch/z80/src/ez80/ez80_registerdump.c | 2 +- .../arch/z80/src/ez80/ez80_restorecontext.asm | 220 +-- .../z80/src/ez80/ez80_saveusercontext.asm | 2 +- .../z80/src/ez80/ez80_schedulesigaction.c | 2 +- nuttx/arch/z80/src/ez80/ez80_sigdeliver.c | 2 +- nuttx/arch/z80/src/ez80/ez80_spi.c | 2 +- nuttx/arch/z80/src/ez80/ez80_startup.asm | 310 +-- nuttx/arch/z80/src/ez80/ez80_timerisr.c | 2 +- nuttx/arch/z80/src/ez80/ez80_vectors.asm | 680 +++---- nuttx/arch/z80/src/ez80/ez80f91.h | 2 +- nuttx/arch/z80/src/ez80/ez80f91_emac.h | 2 +- nuttx/arch/z80/src/ez80/ez80f91_i2c.h | 2 +- nuttx/arch/z80/src/ez80/ez80f91_init.asm | 512 ++--- nuttx/arch/z80/src/ez80/ez80f91_spi.h | 2 +- nuttx/arch/z80/src/ez80/switch.h | 2 +- nuttx/arch/z80/src/ez80/up_mem.h | 2 +- nuttx/arch/z80/src/mkhpbase.sh | 2 +- nuttx/arch/z80/src/z8/Make.defs | 2 +- nuttx/arch/z80/src/z8/chip.h | 2 +- nuttx/arch/z80/src/z8/switch.h | 2 +- nuttx/arch/z80/src/z8/up_mem.h | 2 +- nuttx/arch/z80/src/z8/z8_head.S | 506 ++--- nuttx/arch/z80/src/z8/z8_i2c.c | 2 +- nuttx/arch/z80/src/z8/z8_initialstate.c | 2 +- nuttx/arch/z80/src/z8/z8_irq.c | 2 +- nuttx/arch/z80/src/z8/z8_registerdump.c | 2 +- nuttx/arch/z80/src/z8/z8_restorecontext.S | 328 ++-- nuttx/arch/z80/src/z8/z8_saveirqcontext.c | 2 +- nuttx/arch/z80/src/z8/z8_saveusercontext.S | 330 ++-- nuttx/arch/z80/src/z8/z8_schedulesigaction.c | 2 +- nuttx/arch/z80/src/z8/z8_sigdeliver.c | 2 +- nuttx/arch/z80/src/z8/z8_timerisr.c | 2 +- nuttx/arch/z80/src/z8/z8_vector.S | 1746 ++++++++--------- nuttx/arch/z80/src/z80/Make.defs | 2 +- nuttx/arch/z80/src/z80/chip.h | 2 +- nuttx/arch/z80/src/z80/switch.h | 2 +- nuttx/arch/z80/src/z80/z80_copystate.c | 2 +- nuttx/arch/z80/src/z80/z80_head.asm | 566 +++--- nuttx/arch/z80/src/z80/z80_initialstate.c | 2 +- nuttx/arch/z80/src/z80/z80_io.c | 2 +- nuttx/arch/z80/src/z80/z80_irq.c | 2 +- nuttx/arch/z80/src/z80/z80_registerdump.c | 2 +- .../z80/src/z80/z80_restoreusercontext.asm | 208 +- nuttx/arch/z80/src/z80/z80_rom.asm | 552 +++--- .../arch/z80/src/z80/z80_saveusercontext.asm | 2 +- .../arch/z80/src/z80/z80_schedulesigaction.c | 2 +- nuttx/arch/z80/src/z80/z80_sigdeliver.c | 2 +- nuttx/binfmt/Makefile | 2 +- nuttx/binfmt/binfmt_dumpmodule.c | 2 +- nuttx/binfmt/binfmt_exec.c | 2 +- nuttx/binfmt/binfmt_execmodule.c | 2 +- nuttx/binfmt/binfmt_globals.c | 2 +- nuttx/binfmt/binfmt_internal.h | 2 +- nuttx/binfmt/binfmt_loadmodule.c | 2 +- nuttx/binfmt/binfmt_register.c | 2 +- nuttx/binfmt/binfmt_unloadmodule.c | 2 +- nuttx/binfmt/binfmt_unregister.c | 2 +- nuttx/binfmt/libnxflat/Make.defs | 2 +- nuttx/binfmt/libnxflat/gnu-nxflat.ld | 2 +- nuttx/binfmt/libnxflat/libnxflat_bind.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_init.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_load.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_read.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_uninit.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_unload.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_verify.c | 2 +- nuttx/binfmt/nxflat.c | 2 +- nuttx/binfmt/symtab_findbyname.c | 2 +- nuttx/binfmt/symtab_findbyvalue.c | 2 +- nuttx/binfmt/symtab_findorderedbyname.c | 2 +- nuttx/binfmt/symtab_findorderedbyvalue.c | 2 +- nuttx/configs/amber/hello/appconfig | 2 +- nuttx/configs/amber/hello/ld.script | 2 +- nuttx/configs/amber/hello/setenv.sh | 2 +- nuttx/configs/amber/include/board.h | 2 +- nuttx/configs/amber/src/Makefile | 2 +- nuttx/configs/amber/src/amber_internal.h | 202 +- nuttx/configs/amber/src/up_boot.c | 2 +- nuttx/configs/avr32dev1/include/board.h | 2 +- nuttx/configs/avr32dev1/nsh/Make.defs | 2 +- nuttx/configs/avr32dev1/nsh/defconfig | 2 +- nuttx/configs/avr32dev1/nsh/ld.script | 2 +- nuttx/configs/avr32dev1/nsh/setenv.sh | 2 +- nuttx/configs/avr32dev1/ostest/Make.defs | 2 +- nuttx/configs/avr32dev1/ostest/appconfig | 2 +- nuttx/configs/avr32dev1/ostest/defconfig | 2 +- nuttx/configs/avr32dev1/ostest/ld.script | 2 +- nuttx/configs/avr32dev1/ostest/setenv.sh | 2 +- nuttx/configs/avr32dev1/src/Makefile | 2 +- .../avr32dev1/src/avr32dev1_internal.h | 254 +-- nuttx/configs/avr32dev1/src/up_boot.c | 168 +- nuttx/configs/avr32dev1/src/up_buttons.c | 2 +- nuttx/configs/avr32dev1/src/up_leds.c | 2 +- nuttx/configs/c5471evm/httpd/Make.defs | 2 +- nuttx/configs/c5471evm/httpd/appconfig | 2 +- nuttx/configs/c5471evm/httpd/defconfig | 2 +- nuttx/configs/c5471evm/httpd/setenv.sh | 2 +- nuttx/configs/c5471evm/include/board.h | 2 +- nuttx/configs/c5471evm/nettest/Make.defs | 2 +- nuttx/configs/c5471evm/nettest/appconfig | 2 +- nuttx/configs/c5471evm/nettest/defconfig | 2 +- nuttx/configs/c5471evm/nettest/setenv.sh | 2 +- nuttx/configs/c5471evm/nsh/Make.defs | 2 +- nuttx/configs/c5471evm/nsh/defconfig | 2 +- nuttx/configs/c5471evm/nsh/setenv.sh | 2 +- nuttx/configs/c5471evm/ostest/Make.defs | 2 +- nuttx/configs/c5471evm/ostest/appconfig | 2 +- nuttx/configs/c5471evm/ostest/defconfig | 2 +- nuttx/configs/c5471evm/ostest/setenv.sh | 2 +- nuttx/configs/c5471evm/src/Makefile | 2 +- nuttx/configs/c5471evm/src/up_leds.c | 2 +- .../configs/compal_e88/nsh_highram/Make.defs | 2 +- .../configs/compal_e88/nsh_highram/appconfig | 2 +- .../configs/compal_e88/nsh_highram/setenv.sh | 2 +- nuttx/configs/compal_e88/src/Makefile | 2 +- .../compal_e99/nsh_compalram/Make.defs | 2 +- .../compal_e99/nsh_compalram/appconfig | 2 +- .../compal_e99/nsh_compalram/setenv.sh | 2 +- .../configs/compal_e99/nsh_highram/Make.defs | 2 +- .../configs/compal_e99/nsh_highram/appconfig | 2 +- .../configs/compal_e99/nsh_highram/setenv.sh | 2 +- nuttx/configs/compal_e99/src/Makefile | 2 +- nuttx/configs/demo9s12ne64/include/board.h | 2 +- nuttx/configs/demo9s12ne64/ostest/Make.defs | 2 +- nuttx/configs/demo9s12ne64/ostest/appconfig | 2 +- .../demo9s12ne64/ostest/ld.script.banked | 2 +- .../demo9s12ne64/ostest/ld.script.nonbanked | 2 +- nuttx/configs/demo9s12ne64/ostest/setenv.sh | 2 +- nuttx/configs/demo9s12ne64/src/Makefile | 2 +- nuttx/configs/demo9s12ne64/src/demo9s12ne64.h | 182 +- nuttx/configs/demo9s12ne64/src/up_boot.c | 178 +- nuttx/configs/demo9s12ne64/src/up_buttons.c | 2 +- nuttx/configs/demo9s12ne64/src/up_leds.c | 2 +- nuttx/configs/demo9s12ne64/src/up_nsh.c | 2 +- nuttx/configs/demo9s12ne64/src/up_spi.c | 2 +- nuttx/configs/ea3131/include/board.h | 2 +- .../configs/ea3131/include/board_memorymap.h | 2 +- nuttx/configs/ea3131/locked/Makefile | 2 +- nuttx/configs/ea3131/locked/ld-locked.script | 2 +- nuttx/configs/ea3131/nsh/Make.defs | 2 +- nuttx/configs/ea3131/nsh/setenv.sh | 2 +- nuttx/configs/ea3131/ostest/appconfig | 2 +- nuttx/configs/ea3131/ostest/setenv.sh | 2 +- nuttx/configs/ea3131/pgnsh/setenv.sh | 2 +- nuttx/configs/ea3131/src/up_buttons.c | 2 +- nuttx/configs/ea3131/src/up_clkinit.c | 2 +- nuttx/configs/ea3131/src/up_leds.c | 2 +- nuttx/configs/ea3131/src/up_usbmsc.c | 2 +- nuttx/configs/ea3131/tools/Makefile | 2 +- nuttx/configs/ea3131/tools/lpchdr.c | 2 +- nuttx/configs/ea3131/tools/lpchdr.h | 2 +- nuttx/configs/ea3131/usbserial/appconfig | 2 +- nuttx/configs/ea3131/usbserial/setenv.sh | 2 +- nuttx/configs/ea3131/usbstorage/appconfig | 2 +- nuttx/configs/ea3131/usbstorage/setenv.sh | 2 +- nuttx/configs/eagle100/httpd/Make.defs | 2 +- nuttx/configs/eagle100/httpd/appconfig | 2 +- nuttx/configs/eagle100/httpd/defconfig | 2 +- nuttx/configs/eagle100/httpd/setenv.sh | 2 +- nuttx/configs/eagle100/include/board.h | 2 +- nuttx/configs/eagle100/nettest/Make.defs | 2 +- nuttx/configs/eagle100/nettest/appconfig | 2 +- nuttx/configs/eagle100/nettest/setenv.sh | 2 +- nuttx/configs/eagle100/nsh/Make.defs | 2 +- nuttx/configs/eagle100/nsh/setenv.sh | 2 +- nuttx/configs/eagle100/nxflat/Make.defs | 2 +- nuttx/configs/eagle100/nxflat/appconfig | 2 +- nuttx/configs/eagle100/nxflat/defconfig | 2 +- nuttx/configs/eagle100/nxflat/setenv.sh | 2 +- nuttx/configs/eagle100/ostest/Make.defs | 2 +- nuttx/configs/eagle100/ostest/appconfig | 2 +- nuttx/configs/eagle100/ostest/setenv.sh | 2 +- nuttx/configs/eagle100/src/Makefile | 2 +- .../configs/eagle100/src/eagle100_internal.h | 212 +- nuttx/configs/eagle100/src/up_boot.c | 182 +- nuttx/configs/eagle100/src/up_ethernet.c | 196 +- nuttx/configs/eagle100/src/up_leds.c | 2 +- nuttx/configs/eagle100/src/up_ssi.c | 304 +-- nuttx/configs/eagle100/thttpd/Make.defs | 2 +- nuttx/configs/eagle100/thttpd/appconfig | 2 +- nuttx/configs/eagle100/thttpd/setenv.sh | 2 +- nuttx/configs/ez80f910200kitg/include/board.h | 2 +- .../configs/ez80f910200kitg/ostest/Make.defs | 2 +- .../configs/ez80f910200kitg/ostest/appconfig | 2 +- .../configs/ez80f910200kitg/ostest/defconfig | 2 +- .../ez80f910200kitg/ostest/ostest.linkcmd | 2 +- .../configs/ez80f910200kitg/ostest/setenv.sh | 2 +- nuttx/configs/ez80f910200kitg/src/Makefile | 2 +- nuttx/configs/ez80f910200kitg/src/ez80_leds.c | 2 +- .../ez80f910200kitg/src/ez80_lowinit.c | 132 +- nuttx/configs/ez80f910200zco/dhcpd/Make.defs | 2 +- nuttx/configs/ez80f910200zco/dhcpd/appconfig | 2 +- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 2 +- .../ez80f910200zco/dhcpd/dhcpd.linkcmd | 2 +- nuttx/configs/ez80f910200zco/dhcpd/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/httpd/Make.defs | 2 +- nuttx/configs/ez80f910200zco/httpd/appconfig | 2 +- nuttx/configs/ez80f910200zco/httpd/defconfig | 2 +- .../ez80f910200zco/httpd/httpd.linkcmd | 2 +- nuttx/configs/ez80f910200zco/httpd/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/include/board.h | 2 +- .../configs/ez80f910200zco/nettest/Make.defs | 2 +- .../configs/ez80f910200zco/nettest/appconfig | 2 +- .../configs/ez80f910200zco/nettest/defconfig | 2 +- .../ez80f910200zco/nettest/nettest.linkcmd | 2 +- .../configs/ez80f910200zco/nettest/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/nsh/Make.defs | 2 +- nuttx/configs/ez80f910200zco/nsh/defconfig | 2 +- nuttx/configs/ez80f910200zco/nsh/nsh.linkcmd | 2 +- nuttx/configs/ez80f910200zco/nsh/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/ostest/Make.defs | 2 +- nuttx/configs/ez80f910200zco/ostest/appconfig | 2 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 2 +- .../ez80f910200zco/ostest/ostest.linkcmd | 2 +- nuttx/configs/ez80f910200zco/ostest/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/poll/Make.defs | 2 +- nuttx/configs/ez80f910200zco/poll/appconfig | 2 +- nuttx/configs/ez80f910200zco/poll/defconfig | 2 +- .../configs/ez80f910200zco/poll/poll.linkcmd | 2 +- nuttx/configs/ez80f910200zco/poll/setenv.sh | 2 +- nuttx/configs/ez80f910200zco/src/Makefile | 2 +- .../configs/ez80f910200zco/src/ez80_buttons.c | 348 ++-- nuttx/configs/ez80f910200zco/src/ez80_leds.c | 2 +- .../configs/ez80f910200zco/src/ez80_lowinit.c | 132 +- .../ez80f910200zco/src/ez80f910200zco.h | 2 +- nuttx/configs/kwikstik-k40/include/board.h | 2 +- nuttx/configs/kwikstik-k40/ostest/Make.defs | 2 +- nuttx/configs/kwikstik-k40/ostest/appconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/ld.script | 2 +- nuttx/configs/kwikstik-k40/ostest/setenv.sh | 2 +- nuttx/configs/kwikstik-k40/src/Makefile | 2 +- .../kwikstik-k40/src/kwikstik-internal.h | 2 +- nuttx/configs/kwikstik-k40/src/up_boot.c | 2 +- nuttx/configs/kwikstik-k40/src/up_buttons.c | 2 +- nuttx/configs/kwikstik-k40/src/up_lcd.c | 2 +- nuttx/configs/kwikstik-k40/src/up_leds.c | 2 +- nuttx/configs/kwikstik-k40/src/up_nsh.c | 2 +- nuttx/configs/kwikstik-k40/src/up_spi.c | 2 +- nuttx/configs/kwikstik-k40/src/up_usbdev.c | 2 +- nuttx/configs/kwikstik-k40/src/up_usbmsc.c | 2 +- nuttx/configs/lm3s6432-s2e/include/board.h | 2 +- nuttx/configs/lm3s6432-s2e/nsh/Make.defs | 2 +- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/nsh/ld.script | 2 +- nuttx/configs/lm3s6432-s2e/nsh/setenv.sh | 2 +- nuttx/configs/lm3s6432-s2e/ostest/Make.defs | 2 +- nuttx/configs/lm3s6432-s2e/ostest/appconfig | 2 +- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/ostest/ld.script | 2 +- nuttx/configs/lm3s6432-s2e/ostest/setenv.sh | 2 +- nuttx/configs/lm3s6432-s2e/src/Makefile | 2 +- .../lm3s6432-s2e/src/lm3s6432s2e_internal.h | 2 +- nuttx/configs/lm3s6432-s2e/src/up_boot.c | 2 +- nuttx/configs/lm3s6432-s2e/src/up_ethernet.c | 2 +- nuttx/configs/lm3s6432-s2e/src/up_leds.c | 2 +- nuttx/configs/lm3s6432-s2e/src/up_nsh.c | 2 +- nuttx/configs/lm3s6432-s2e/src/up_ssi.c | 2 +- nuttx/configs/lm3s6965-ek/include/board.h | 2 +- nuttx/configs/lm3s6965-ek/nsh/Make.defs | 2 +- nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nsh/ld.script | 2 +- nuttx/configs/lm3s6965-ek/nsh/setenv.sh | 2 +- nuttx/configs/lm3s6965-ek/nx/Make.defs | 2 +- nuttx/configs/lm3s6965-ek/nx/appconfig | 2 +- nuttx/configs/lm3s6965-ek/nx/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nx/ld.script | 2 +- nuttx/configs/lm3s6965-ek/nx/setenv.sh | 2 +- nuttx/configs/lm3s6965-ek/ostest/Make.defs | 2 +- nuttx/configs/lm3s6965-ek/ostest/appconfig | 2 +- nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 +- nuttx/configs/lm3s6965-ek/ostest/ld.script | 2 +- nuttx/configs/lm3s6965-ek/ostest/setenv.sh | 2 +- nuttx/configs/lm3s6965-ek/src/Makefile | 2 +- .../lm3s6965-ek/src/lm3s6965ek_internal.h | 272 +-- nuttx/configs/lm3s6965-ek/src/up_boot.c | 184 +- nuttx/configs/lm3s6965-ek/src/up_ethernet.c | 196 +- nuttx/configs/lm3s6965-ek/src/up_leds.c | 2 +- nuttx/configs/lm3s6965-ek/src/up_nsh.c | 2 +- nuttx/configs/lm3s6965-ek/src/up_oled.c | 2 +- nuttx/configs/lm3s6965-ek/src/up_ssi.c | 328 ++-- nuttx/configs/lm3s8962-ek/include/board.h | 2 +- nuttx/configs/lm3s8962-ek/nsh/Make.defs | 2 +- nuttx/configs/lm3s8962-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nsh/ld.script | 2 +- nuttx/configs/lm3s8962-ek/nsh/setenv.sh | 2 +- nuttx/configs/lm3s8962-ek/nx/Make.defs | 2 +- nuttx/configs/lm3s8962-ek/nx/appconfig | 2 +- nuttx/configs/lm3s8962-ek/nx/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nx/ld.script | 2 +- nuttx/configs/lm3s8962-ek/nx/setenv.sh | 2 +- nuttx/configs/lm3s8962-ek/ostest/Make.defs | 2 +- nuttx/configs/lm3s8962-ek/ostest/appconfig | 2 +- nuttx/configs/lm3s8962-ek/ostest/defconfig | 2 +- nuttx/configs/lm3s8962-ek/ostest/ld.script | 2 +- nuttx/configs/lm3s8962-ek/ostest/setenv.sh | 2 +- nuttx/configs/lm3s8962-ek/src/Makefile | 2 +- .../lm3s8962-ek/src/lm3s8962ek_internal.h | 272 +-- nuttx/configs/lm3s8962-ek/src/up_boot.c | 184 +- nuttx/configs/lm3s8962-ek/src/up_ethernet.c | 196 +- nuttx/configs/lm3s8962-ek/src/up_leds.c | 2 +- nuttx/configs/lm3s8962-ek/src/up_nsh.c | 2 +- nuttx/configs/lm3s8962-ek/src/up_oled.c | 2 +- nuttx/configs/lm3s8962-ek/src/up_ssi.c | 328 ++-- nuttx/configs/lpc4330-xplorer/nsh/setenv.sh | 2 +- .../configs/lpc4330-xplorer/ostest/setenv.sh | 2 +- .../lpcxpresso-lpc1768/dhcpd/Make.defs | 2 +- .../lpcxpresso-lpc1768/dhcpd/appconfig | 2 +- .../lpcxpresso-lpc1768/dhcpd/ld.script | 2 +- .../lpcxpresso-lpc1768/dhcpd/setenv.sh | 2 +- .../lpcxpresso-lpc1768/include/board.h | 2 +- .../configs/lpcxpresso-lpc1768/nsh/Make.defs | 2 +- .../configs/lpcxpresso-lpc1768/nsh/ld.script | 2 +- .../configs/lpcxpresso-lpc1768/nsh/setenv.sh | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/appconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/ld.script | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/setenv.sh | 2 +- .../lpcxpresso-lpc1768/ostest/Make.defs | 2 +- .../lpcxpresso-lpc1768/ostest/appconfig | 2 +- .../lpcxpresso-lpc1768/ostest/ld.script | 2 +- .../lpcxpresso-lpc1768/ostest/setenv.sh | 2 +- nuttx/configs/lpcxpresso-lpc1768/src/Makefile | 2 +- .../src/lpcxpresso_internal.h | 2 +- .../configs/lpcxpresso-lpc1768/src/up_boot.c | 2 +- .../configs/lpcxpresso-lpc1768/src/up_leds.c | 2 +- nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c | 2 +- .../configs/lpcxpresso-lpc1768/src/up_oled.c | 2 +- nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c | 2 +- .../lpcxpresso-lpc1768/src/up_usbmsc.c | 2 +- .../lpcxpresso-lpc1768/thttpd/Make.defs | 2 +- .../lpcxpresso-lpc1768/thttpd/appconfig | 2 +- .../lpcxpresso-lpc1768/thttpd/ld.script | 2 +- .../lpcxpresso-lpc1768/thttpd/setenv.sh | 2 +- .../configs/lpcxpresso-lpc1768/tools/flash.sh | 2 +- .../lpcxpresso-lpc1768/usbstorage/Make.defs | 2 +- .../lpcxpresso-lpc1768/usbstorage/appconfig | 2 +- .../lpcxpresso-lpc1768/usbstorage/ld.script | 2 +- .../lpcxpresso-lpc1768/usbstorage/setenv.sh | 2 +- nuttx/configs/m68332evb/Make.defs | 2 +- nuttx/configs/m68332evb/appconfig | 2 +- nuttx/configs/m68332evb/defconfig | 2 +- nuttx/configs/m68332evb/ld.script | 2 +- nuttx/configs/m68332evb/setenv.sh | 2 +- nuttx/configs/m68332evb/src/Makefile | 2 +- nuttx/configs/mbed/hidkbd/Make.defs | 2 +- nuttx/configs/mbed/hidkbd/appconfig | 2 +- nuttx/configs/mbed/hidkbd/ld.script | 2 +- nuttx/configs/mbed/hidkbd/setenv.sh | 2 +- nuttx/configs/mbed/include/board.h | 2 +- nuttx/configs/mbed/nsh/Make.defs | 2 +- nuttx/configs/mbed/nsh/ld.script | 2 +- nuttx/configs/mbed/nsh/setenv.sh | 2 +- nuttx/configs/mbed/src/Makefile | 2 +- nuttx/configs/mbed/src/mbed_internal.h | 188 +- nuttx/configs/mbed/src/up_boot.c | 164 +- nuttx/configs/mbed/src/up_leds.c | 2 +- nuttx/configs/mbed/src/up_nsh.c | 2 +- .../mcu123-lpc214x/composite/appconfig | 2 +- nuttx/configs/mcu123-lpc214x/include/board.h | 2 +- nuttx/configs/mcu123-lpc214x/nsh/Make.defs | 2 +- nuttx/configs/mcu123-lpc214x/nsh/setenv.sh | 2 +- nuttx/configs/mcu123-lpc214x/ostest/Make.defs | 2 +- nuttx/configs/mcu123-lpc214x/ostest/appconfig | 2 +- nuttx/configs/mcu123-lpc214x/ostest/setenv.sh | 2 +- .../mcu123-lpc214x/scripts/lpc21isp.sh | 2 +- nuttx/configs/mcu123-lpc214x/src/up_leds.c | 2 +- nuttx/configs/mcu123-lpc214x/src/up_nsh.c | 2 +- nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c | 2 +- .../mcu123-lpc214x/usbserial/Make.defs | 2 +- .../mcu123-lpc214x/usbserial/appconfig | 2 +- .../mcu123-lpc214x/usbserial/setenv.sh | 2 +- .../mcu123-lpc214x/usbstorage/appconfig | 2 +- .../mcu123-lpc214x/usbstorage/setenv.sh | 2 +- nuttx/configs/micropendous3/hello/appconfig | 2 +- nuttx/configs/micropendous3/hello/ld.script | 2 +- nuttx/configs/micropendous3/hello/setenv.sh | 2 +- nuttx/configs/micropendous3/include/board.h | 2 +- nuttx/configs/micropendous3/src/Makefile | 2 +- .../src/micropendous3_internal.h | 202 +- nuttx/configs/micropendous3/src/up_boot.c | 2 +- nuttx/configs/mx1ads/include/board.h | 2 +- nuttx/configs/mx1ads/ostest/Make.defs | 2 +- nuttx/configs/mx1ads/ostest/appconfig | 2 +- nuttx/configs/mx1ads/ostest/defconfig | 2 +- nuttx/configs/mx1ads/ostest/ld.script | 2 +- nuttx/configs/mx1ads/ostest/setenv.sh | 2 +- nuttx/configs/mx1ads/src/Makefile | 2 +- nuttx/configs/mx1ads/src/up_boot.c | 214 +- nuttx/configs/mx1ads/src/up_leds.c | 2 +- nuttx/configs/mx1ads/src/up_network.c | 2 +- nuttx/configs/ne64badge/include/board.h | 2 +- nuttx/configs/ne64badge/ostest/Make.defs | 2 +- nuttx/configs/ne64badge/ostest/appconfig | 2 +- .../configs/ne64badge/ostest/ld.script.banked | 2 +- .../ne64badge/ostest/ld.script.nonbanked | 2 +- nuttx/configs/ne64badge/ostest/setenv.sh | 2 +- nuttx/configs/ne64badge/src/Makefile | 2 +- .../ne64badge/src/ne64badge_internal.h | 410 ++-- nuttx/configs/ne64badge/src/up_boot.c | 178 +- nuttx/configs/ne64badge/src/up_buttons.c | 2 +- nuttx/configs/ne64badge/src/up_leds.c | 2 +- nuttx/configs/ne64badge/src/up_nsh.c | 2 +- nuttx/configs/ne64badge/src/up_spi.c | 2 +- nuttx/configs/ntosd-dm320/include/board.h | 2 +- nuttx/configs/ntosd-dm320/nettest/Make.defs | 2 +- nuttx/configs/ntosd-dm320/nettest/appconfig | 2 +- nuttx/configs/ntosd-dm320/nettest/defconfig | 2 +- nuttx/configs/ntosd-dm320/nettest/ld.script | 2 +- nuttx/configs/ntosd-dm320/nettest/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/nsh/Make.defs | 2 +- nuttx/configs/ntosd-dm320/nsh/defconfig | 2 +- nuttx/configs/ntosd-dm320/nsh/ld.script | 2 +- nuttx/configs/ntosd-dm320/nsh/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/ostest/Make.defs | 2 +- nuttx/configs/ntosd-dm320/ostest/appconfig | 2 +- nuttx/configs/ntosd-dm320/ostest/defconfig | 2 +- nuttx/configs/ntosd-dm320/ostest/ld.script | 2 +- nuttx/configs/ntosd-dm320/ostest/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/poll/Make.defs | 2 +- nuttx/configs/ntosd-dm320/poll/appconfig | 2 +- nuttx/configs/ntosd-dm320/poll/defconfig | 2 +- nuttx/configs/ntosd-dm320/poll/ld.script | 2 +- nuttx/configs/ntosd-dm320/poll/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/src/Makefile | 2 +- nuttx/configs/ntosd-dm320/src/up_leds.c | 2 +- nuttx/configs/ntosd-dm320/src/up_network.c | 2 +- nuttx/configs/ntosd-dm320/thttpd/Make.defs | 2 +- nuttx/configs/ntosd-dm320/thttpd/appconfig | 2 +- nuttx/configs/ntosd-dm320/thttpd/defconfig | 2 +- nuttx/configs/ntosd-dm320/thttpd/ld.script | 2 +- nuttx/configs/ntosd-dm320/thttpd/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/udp/Make.defs | 2 +- nuttx/configs/ntosd-dm320/udp/appconfig | 2 +- nuttx/configs/ntosd-dm320/udp/defconfig | 2 +- nuttx/configs/ntosd-dm320/udp/ld.script | 2 +- nuttx/configs/ntosd-dm320/udp/setenv.sh | 2 +- nuttx/configs/ntosd-dm320/uip/Make.defs | 2 +- nuttx/configs/ntosd-dm320/uip/appconfig | 2 +- nuttx/configs/ntosd-dm320/uip/ld.script | 2 +- nuttx/configs/ntosd-dm320/uip/setenv.sh | 2 +- nuttx/configs/nucleus2g/nsh/Make.defs | 2 +- nuttx/configs/nucleus2g/nsh/ld.script | 2 +- nuttx/configs/nucleus2g/nsh/setenv.sh | 2 +- nuttx/configs/nucleus2g/ostest/Make.defs | 2 +- nuttx/configs/nucleus2g/ostest/appconfig | 2 +- nuttx/configs/nucleus2g/ostest/ld.script | 2 +- nuttx/configs/nucleus2g/ostest/setenv.sh | 2 +- nuttx/configs/nucleus2g/src/Makefile | 2 +- nuttx/configs/nucleus2g/src/up_leds.c | 2 +- nuttx/configs/nucleus2g/src/up_nsh.c | 2 +- nuttx/configs/nucleus2g/src/up_ssp.c | 370 ++-- nuttx/configs/nucleus2g/src/up_usbmsc.c | 2 +- nuttx/configs/nucleus2g/usbserial/Make.defs | 2 +- nuttx/configs/nucleus2g/usbserial/appconfig | 2 +- nuttx/configs/nucleus2g/usbserial/ld.script | 2 +- nuttx/configs/nucleus2g/usbserial/setenv.sh | 2 +- nuttx/configs/nucleus2g/usbstorage/Make.defs | 2 +- nuttx/configs/nucleus2g/usbstorage/appconfig | 2 +- nuttx/configs/nucleus2g/usbstorage/ld.script | 2 +- nuttx/configs/nucleus2g/usbstorage/setenv.sh | 2 +- .../configs/olimex-lpc1766stk/ftpc/Make.defs | 2 +- .../configs/olimex-lpc1766stk/ftpc/setenv.sh | 2 +- .../olimex-lpc1766stk/hidkbd/Make.defs | 2 +- .../olimex-lpc1766stk/hidkbd/appconfig | 2 +- .../olimex-lpc1766stk/hidkbd/setenv.sh | 2 +- .../olimex-lpc1766stk/nettest/Make.defs | 2 +- .../olimex-lpc1766stk/nettest/appconfig | 2 +- .../olimex-lpc1766stk/nettest/setenv.sh | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/Make.defs | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh | 2 +- nuttx/configs/olimex-lpc1766stk/nx/Make.defs | 2 +- nuttx/configs/olimex-lpc1766stk/nx/appconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nx/setenv.sh | 2 +- .../olimex-lpc1766stk/ostest/Make.defs | 2 +- .../olimex-lpc1766stk/ostest/appconfig | 2 +- .../olimex-lpc1766stk/ostest/setenv.sh | 2 +- .../olimex-lpc1766stk/slip-httpd/Make.defs | 2 +- .../olimex-lpc1766stk/slip-httpd/appconfig | 2 +- .../olimex-lpc1766stk/slip-httpd/setenv.sh | 2 +- nuttx/configs/olimex-lpc1766stk/src/up_lcd.c | 2 +- nuttx/configs/olimex-lpc1766stk/src/up_ssp.c | 2 +- .../configs/olimex-lpc1766stk/src/up_usbmsc.c | 2 +- .../olimex-lpc1766stk/thttpd/Make.defs | 2 +- .../olimex-lpc1766stk/thttpd/appconfig | 2 +- .../olimex-lpc1766stk/thttpd/setenv.sh | 2 +- .../olimex-lpc1766stk/usbserial/Make.defs | 2 +- .../olimex-lpc1766stk/usbserial/appconfig | 2 +- .../olimex-lpc1766stk/usbserial/setenv.sh | 2 +- .../olimex-lpc1766stk/usbstorage/Make.defs | 2 +- .../olimex-lpc1766stk/usbstorage/appconfig | 2 +- .../olimex-lpc1766stk/usbstorage/setenv.sh | 2 +- .../configs/olimex-lpc1766stk/wlan/Make.defs | 2 +- .../configs/olimex-lpc1766stk/wlan/appconfig | 2 +- .../configs/olimex-lpc1766stk/wlan/setenv.sh | 2 +- nuttx/configs/olimex-lpc2378/include/board.h | 180 +- nuttx/configs/olimex-lpc2378/nsh/Make.defs | 2 +- nuttx/configs/olimex-lpc2378/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc2378/nsh/ld.script | 2 +- nuttx/configs/olimex-lpc2378/nsh/setenv.sh | 2 +- nuttx/configs/olimex-lpc2378/ostest/Make.defs | 2 +- nuttx/configs/olimex-lpc2378/ostest/appconfig | 2 +- nuttx/configs/olimex-lpc2378/ostest/defconfig | 2 +- nuttx/configs/olimex-lpc2378/ostest/ld.script | 2 +- nuttx/configs/olimex-lpc2378/ostest/setenv.sh | 2 +- nuttx/configs/olimex-lpc2378/src/Makefile | 2 +- nuttx/configs/olimex-lpc2378/src/up_leds.c | 2 +- nuttx/configs/olimex-lpc2378/src/up_nsh.c | 2 +- nuttx/configs/olimex-stm32-p107/nsh/appconfig | 2 +- nuttx/configs/olimex-stm32-p107/nsh/setenv.sh | 2 +- .../olimex-stm32-p107/ostest/appconfig | 2 +- .../olimex-stm32-p107/ostest/setenv.sh | 2 +- nuttx/configs/olimex-strp711/include/board.h | 2 +- .../configs/olimex-strp711/nettest/Make.defs | 2 +- .../configs/olimex-strp711/nettest/appconfig | 2 +- .../configs/olimex-strp711/nettest/ld.script | 2 +- .../configs/olimex-strp711/nettest/setenv.sh | 2 +- nuttx/configs/olimex-strp711/nsh/Make.defs | 2 +- nuttx/configs/olimex-strp711/nsh/defconfig | 2 +- nuttx/configs/olimex-strp711/nsh/ld.script | 2 +- nuttx/configs/olimex-strp711/nsh/setenv.sh | 2 +- nuttx/configs/olimex-strp711/ostest/Make.defs | 2 +- nuttx/configs/olimex-strp711/ostest/appconfig | 2 +- nuttx/configs/olimex-strp711/ostest/defconfig | 2 +- nuttx/configs/olimex-strp711/ostest/ld.script | 2 +- nuttx/configs/olimex-strp711/ostest/setenv.sh | 2 +- nuttx/configs/olimex-strp711/src/up_buttons.c | 2 +- nuttx/configs/olimex-strp711/src/up_leds.c | 2 +- nuttx/configs/olimex-strp711/src/up_nsh.c | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/Make.defs | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/ld.script | 2 +- .../configs/pcblogic-pic32mx/ostest/Make.defs | 2 +- .../configs/pcblogic-pic32mx/ostest/appconfig | 2 +- .../configs/pcblogic-pic32mx/ostest/ld.script | 2 +- nuttx/configs/pcblogic-pic32mx/src/Makefile | 2 +- .../pcblogic-pic32mx/src/pcblogic-internal.h | 2 +- nuttx/configs/pcblogic-pic32mx/src/up_boot.c | 2 +- nuttx/configs/pjrc-8051/appconfig | 2 +- nuttx/configs/pjrc-8051/include/board.h | 2 +- nuttx/configs/pjrc-8051/include/pjrc.h | 2 +- nuttx/configs/pjrc-8051/setenv.sh | 2 +- nuttx/configs/pjrc-8051/src/Makefile | 2 +- nuttx/configs/pjrc-8051/src/up_leds.c | 2 +- nuttx/configs/qemu-i486/include/board.h | 2 +- nuttx/configs/qemu-i486/nsh/Make.defs | 2 +- nuttx/configs/qemu-i486/nsh/defconfig | 2 +- nuttx/configs/qemu-i486/nsh/ld.script | 2 +- nuttx/configs/qemu-i486/nsh/setenv.sh | 2 +- nuttx/configs/qemu-i486/ostest/Make.defs | 2 +- nuttx/configs/qemu-i486/ostest/appconfig | 2 +- nuttx/configs/qemu-i486/ostest/defconfig | 2 +- nuttx/configs/qemu-i486/ostest/ld.script | 2 +- nuttx/configs/qemu-i486/ostest/setenv.sh | 2 +- nuttx/configs/qemu-i486/src/Makefile | 2 +- .../configs/qemu-i486/src/qemui486_internal.h | 138 +- nuttx/configs/qemu-i486/src/up_boot.c | 164 +- nuttx/configs/rgmp/arm/default/Make.defs | 2 +- nuttx/configs/rgmp/arm/default/appconfig | 2 +- nuttx/configs/rgmp/arm/default/defconfig | 2 +- nuttx/configs/rgmp/arm/default/setenv.sh | 2 +- nuttx/configs/rgmp/arm/nsh/Make.defs | 2 +- nuttx/configs/rgmp/arm/nsh/appconfig | 2 +- nuttx/configs/rgmp/arm/nsh/defconfig | 2 +- nuttx/configs/rgmp/arm/nsh/setenv.sh | 2 +- nuttx/configs/rgmp/x86/default/Make.defs | 2 +- nuttx/configs/rgmp/x86/default/appconfig | 2 +- nuttx/configs/rgmp/x86/default/defconfig | 2 +- nuttx/configs/rgmp/x86/default/setenv.sh | 2 +- nuttx/configs/rgmp/x86/nsh/Make.defs | 2 +- nuttx/configs/rgmp/x86/nsh/appconfig | 2 +- nuttx/configs/rgmp/x86/nsh/defconfig | 2 +- nuttx/configs/rgmp/x86/nsh/setenv.sh | 2 +- nuttx/configs/sam3u-ek/kernel/Makefile | 2 +- nuttx/configs/sam3u-ek/kernel/kernel.ld | 2 +- nuttx/configs/sam3u-ek/knsh/Make.defs | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/ld.script | 2 +- nuttx/configs/sam3u-ek/knsh/setenv.sh | 2 +- nuttx/configs/sam3u-ek/nsh/Make.defs | 2 +- nuttx/configs/sam3u-ek/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nsh/ld.script | 2 +- nuttx/configs/sam3u-ek/nsh/setenv.sh | 2 +- nuttx/configs/sam3u-ek/nx/Make.defs | 2 +- nuttx/configs/sam3u-ek/nx/appconfig | 2 +- nuttx/configs/sam3u-ek/nx/defconfig | 2 +- nuttx/configs/sam3u-ek/nx/ld.script | 2 +- nuttx/configs/sam3u-ek/nx/setenv.sh | 2 +- nuttx/configs/sam3u-ek/ostest/Make.defs | 2 +- nuttx/configs/sam3u-ek/ostest/appconfig | 2 +- nuttx/configs/sam3u-ek/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/ostest/ld.script | 2 +- nuttx/configs/sam3u-ek/ostest/setenv.sh | 2 +- nuttx/configs/sam3u-ek/src/Makefile | 2 +- nuttx/configs/sam3u-ek/src/up_buttons.c | 2 +- nuttx/configs/sam3u-ek/src/up_lcd.c | 2 +- nuttx/configs/sam3u-ek/src/up_leds.c | 2 +- nuttx/configs/sam3u-ek/src/up_mmcsd.c | 2 +- nuttx/configs/sam3u-ek/src/up_nsh.c | 2 +- nuttx/configs/sam3u-ek/src/up_usbdev.c | 2 +- nuttx/configs/sam3u-ek/src/up_usbmsc.c | 2 +- nuttx/configs/sam3u-ek/touchscreen/Make.defs | 2 +- nuttx/configs/sam3u-ek/touchscreen/ld.script | 2 +- nuttx/configs/sam3u-ek/touchscreen/setenv.sh | 2 +- nuttx/configs/sim/mount/appconfig | 2 +- nuttx/configs/sim/mount/defconfig | 2 +- nuttx/configs/sim/mount/setenv.sh | 2 +- nuttx/configs/sim/nettest/appconfig | 2 +- nuttx/configs/sim/nettest/defconfig | 2 +- nuttx/configs/sim/nettest/setenv.sh | 2 +- nuttx/configs/sim/nsh/setenv.sh | 2 +- nuttx/configs/sim/nx/setenv.sh | 2 +- nuttx/configs/sim/nx11/setenv.sh | 2 +- nuttx/configs/sim/nxffs/appconfig | 2 +- nuttx/configs/sim/nxffs/defconfig | 2 +- nuttx/configs/sim/nxffs/setenv.sh | 2 +- nuttx/configs/sim/ostest/appconfig | 2 +- nuttx/configs/sim/ostest/defconfig | 2 +- nuttx/configs/sim/ostest/setenv.sh | 2 +- nuttx/configs/sim/pashello/appconfig | 2 +- nuttx/configs/sim/pashello/defconfig | 2 +- nuttx/configs/sim/pashello/setenv.sh | 2 +- nuttx/configs/sim/src/Makefile | 2 +- nuttx/configs/sim/src/up_touchscreen.c | 2 +- nuttx/configs/sim/touchscreen/appconfig | 2 +- nuttx/configs/sim/touchscreen/defconfig | 2 +- nuttx/configs/sim/touchscreen/setenv.sh | 2 +- nuttx/configs/skp16c26/include/board.h | 2 +- nuttx/configs/skp16c26/ostest/Make.defs | 2 +- nuttx/configs/skp16c26/ostest/appconfig | 2 +- nuttx/configs/skp16c26/ostest/defconfig | 2 +- nuttx/configs/skp16c26/ostest/ld.script | 2 +- nuttx/configs/skp16c26/ostest/setenv.sh | 2 +- nuttx/configs/skp16c26/src/Makefile | 2 +- .../configs/skp16c26/src/skp16c26_internal.h | 2 +- nuttx/configs/skp16c26/src/up_buttons.c | 2 +- nuttx/configs/skp16c26/src/up_lcd.c | 2 +- nuttx/configs/skp16c26/src/up_leds.c | 2 +- nuttx/configs/sure-pic32mx/ostest/Make.defs | 2 +- nuttx/configs/sure-pic32mx/ostest/appconfig | 2 +- nuttx/configs/sure-pic32mx/ostest/ld.script | 2 +- nuttx/configs/sure-pic32mx/src/up_boot.c | 2 +- nuttx/configs/teensy/hello/appconfig | 2 +- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/hello/ld.script | 2 +- nuttx/configs/teensy/hello/setenv.sh | 2 +- nuttx/configs/teensy/include/board.h | 2 +- nuttx/configs/teensy/nsh/ld.script | 2 +- nuttx/configs/teensy/nsh/setenv.sh | 2 +- nuttx/configs/teensy/src/Makefile | 2 +- nuttx/configs/teensy/src/teensy_internal.h | 202 +- nuttx/configs/teensy/src/up_boot.c | 2 +- nuttx/configs/teensy/src/up_leds.c | 2 +- nuttx/configs/teensy/src/up_spi.c | 404 ++-- nuttx/configs/teensy/src/up_usbmsc.c | 2 +- nuttx/configs/teensy/usbstorage/appconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/teensy/usbstorage/ld.script | 2 +- nuttx/configs/teensy/usbstorage/setenv.sh | 2 +- nuttx/configs/twr-k60n512/include/board.h | 2 +- nuttx/configs/twr-k60n512/nsh/Make.defs | 2 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/nsh/ld.script | 2 +- nuttx/configs/twr-k60n512/nsh/setenv.sh | 2 +- nuttx/configs/twr-k60n512/ostest/Make.defs | 2 +- nuttx/configs/twr-k60n512/ostest/appconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/ld.script | 2 +- nuttx/configs/twr-k60n512/ostest/setenv.sh | 2 +- nuttx/configs/twr-k60n512/src/Makefile | 2 +- .../configs/twr-k60n512/src/twrk60-internal.h | 2 +- nuttx/configs/twr-k60n512/src/up_boot.c | 2 +- nuttx/configs/twr-k60n512/src/up_buttons.c | 2 +- nuttx/configs/twr-k60n512/src/up_leds.c | 2 +- nuttx/configs/twr-k60n512/src/up_nsh.c | 2 +- nuttx/configs/twr-k60n512/src/up_spi.c | 2 +- nuttx/configs/twr-k60n512/src/up_usbdev.c | 2 +- nuttx/configs/twr-k60n512/src/up_usbmsc.c | 2 +- nuttx/configs/us7032evb1/include/board.h | 2 +- nuttx/configs/us7032evb1/nsh/Make.defs | 2 +- nuttx/configs/us7032evb1/nsh/defconfig | 2 +- nuttx/configs/us7032evb1/nsh/ld.script | 2 +- nuttx/configs/us7032evb1/nsh/setenv.sh | 2 +- nuttx/configs/us7032evb1/ostest/Make.defs | 2 +- nuttx/configs/us7032evb1/ostest/appconfig | 2 +- nuttx/configs/us7032evb1/ostest/defconfig | 2 +- nuttx/configs/us7032evb1/ostest/ld.script | 2 +- nuttx/configs/us7032evb1/ostest/setenv.sh | 2 +- nuttx/configs/us7032evb1/shterm/Makefile | 2 +- nuttx/configs/us7032evb1/shterm/shterm.c | 2 +- nuttx/configs/us7032evb1/src/Makefile | 2 +- nuttx/configs/us7032evb1/src/up_leds.c | 2 +- nuttx/configs/vsn/include/board.h | 2 +- nuttx/configs/vsn/nsh/Make.defs | 2 +- nuttx/configs/vsn/nsh/ld.script | 2 +- nuttx/configs/vsn/nsh/ld.script.dfu | 2 +- nuttx/configs/vsn/nsh/setenv.sh | 2 +- nuttx/configs/vsn/src/Makefile | 2 +- nuttx/configs/vsn/src/boot.c | 2 +- nuttx/configs/vsn/src/spi.c | 2 +- nuttx/configs/vsn/src/usbdev.c | 2 +- nuttx/configs/vsn/src/usbmsc.c | 2 +- nuttx/configs/xtrs/include/board.h | 2 +- nuttx/configs/xtrs/nsh/setenv.sh | 2 +- nuttx/configs/xtrs/ostest/appconfig | 2 +- nuttx/configs/xtrs/ostest/setenv.sh | 2 +- nuttx/configs/xtrs/pashello/appconfig | 2 +- nuttx/configs/xtrs/pashello/setenv.sh | 2 +- nuttx/configs/xtrs/src/Make.defs | 2 +- nuttx/configs/xtrs/src/Makefile | 2 +- nuttx/configs/xtrs/src/xtr_irq.c | 2 +- nuttx/configs/xtrs/src/xtr_timerisr.c | 2 +- nuttx/configs/xtrs/src/xtrs_head.asm | 2 +- nuttx/configs/z16f2800100zcog/include/board.h | 2 +- .../configs/z16f2800100zcog/ostest/Make.defs | 2 +- .../configs/z16f2800100zcog/ostest/appconfig | 2 +- .../configs/z16f2800100zcog/ostest/defconfig | 2 +- .../z16f2800100zcog/ostest/ostest.linkcmd | 2 +- .../configs/z16f2800100zcog/ostest/setenv.sh | 2 +- .../z16f2800100zcog/pashello/Make.defs | 2 +- .../z16f2800100zcog/pashello/appconfig | 2 +- .../z16f2800100zcog/pashello/defconfig | 2 +- .../z16f2800100zcog/pashello/pashello.linkcmd | 2 +- .../z16f2800100zcog/pashello/setenv.sh | 2 +- nuttx/configs/z16f2800100zcog/src/Makefile | 2 +- nuttx/configs/z16f2800100zcog/src/z16f_leds.c | 2 +- .../z16f2800100zcog/src/z16f_lowinit.c | 180 +- nuttx/configs/z80sim/include/board.h | 2 +- nuttx/configs/z80sim/nsh/defconfig | 2 +- nuttx/configs/z80sim/nsh/setenv.sh | 2 +- nuttx/configs/z80sim/ostest/appconfig | 2 +- nuttx/configs/z80sim/ostest/setenv.sh | 2 +- nuttx/configs/z80sim/pashello/appconfig | 2 +- nuttx/configs/z80sim/pashello/defconfig | 2 +- nuttx/configs/z80sim/pashello/setenv.sh | 2 +- nuttx/configs/z80sim/src/Makefile | 2 +- nuttx/configs/z80sim/src/z80_irq.c | 2 +- nuttx/configs/z80sim/src/z80_lowputc.c | 2 +- nuttx/configs/z80sim/src/z80_timerisr.c | 2 +- nuttx/configs/z8encore000zco/include/board.h | 2 +- nuttx/configs/z8encore000zco/ostest/Make.defs | 2 +- nuttx/configs/z8encore000zco/ostest/appconfig | 2 +- .../z8encore000zco/ostest/ostest.linkcmd | 2 +- nuttx/configs/z8encore000zco/ostest/setenv.sh | 2 +- nuttx/configs/z8encore000zco/src/Makefile | 2 +- nuttx/configs/z8encore000zco/src/z8_leds.c | 2 +- nuttx/configs/z8encore000zco/src/z8_lowinit.c | 132 +- nuttx/configs/z8f64200100kit/include/board.h | 2 +- nuttx/configs/z8f64200100kit/ostest/Make.defs | 2 +- nuttx/configs/z8f64200100kit/ostest/appconfig | 2 +- .../z8f64200100kit/ostest/ostest.linkcmd | 2 +- nuttx/configs/z8f64200100kit/ostest/setenv.sh | 2 +- nuttx/configs/z8f64200100kit/src/Makefile | 2 +- nuttx/configs/z8f64200100kit/src/z8_leds.c | 2 +- nuttx/configs/z8f64200100kit/src/z8_lowinit.c | 132 +- nuttx/drivers/analog/Make.defs | 2 +- nuttx/drivers/analog/dac.c | 2 +- nuttx/drivers/input/Make.defs | 2 +- nuttx/drivers/lcd/nokia6100.c | 2 +- nuttx/drivers/lcd/pcf8833.h | 302 +-- nuttx/drivers/lcd/s1d15g10.h | 280 +-- nuttx/drivers/lcd/skeleton.c | 2 +- nuttx/drivers/lcd/ssd1305.h | 422 ++-- nuttx/drivers/lcd/ug-9664hswag01.c | 2 +- nuttx/drivers/mmcsd/Make.defs | 2 +- nuttx/drivers/mmcsd/mmcsd_csd.h | 2 +- nuttx/drivers/mmcsd/mmcsd_debug.c | 2 +- nuttx/drivers/mmcsd/mmcsd_internal.h | 2 +- nuttx/drivers/mmcsd/mmcsd_sdio.h | 678 +++---- nuttx/drivers/mmcsd/mmcsd_spi.h | 2 +- nuttx/drivers/mtd/at45db.c | 2 +- nuttx/drivers/mtd/flash_eraseall.c | 2 +- nuttx/drivers/mtd/ftl.c | 2 +- nuttx/drivers/mtd/skeleton.c | 2 +- nuttx/drivers/net/cs89x0.c | 2 +- nuttx/drivers/net/cs89x0.h | 652 +++--- nuttx/drivers/net/dm90x0.c | 2 +- nuttx/drivers/net/enc28j60.h | 2 +- nuttx/drivers/power/pm_activity.c | 2 +- nuttx/drivers/sensors/Make.defs | 2 +- nuttx/drivers/sensors/lm75.c | 2 +- nuttx/drivers/sercomm/Make.defs | 2 +- nuttx/drivers/usbhost/Make.defs | 2 +- nuttx/drivers/usbhost/usbhost_findclass.c | 2 +- nuttx/drivers/usbhost/usbhost_hidkbd.c | 2 +- nuttx/drivers/usbhost/usbhost_registerclass.c | 2 +- nuttx/drivers/usbhost/usbhost_registry.c | 2 +- nuttx/drivers/usbhost/usbhost_registry.h | 2 +- nuttx/drivers/wireless/Make.defs | 2 +- nuttx/fs/fat/Make.defs | 2 +- nuttx/fs/fat/fs_configfat.c | 2 +- nuttx/fs/fat/fs_fat32dirent.c | 2 +- nuttx/fs/fat/fs_mkfatfs.c | 2 +- nuttx/fs/fat/fs_mkfatfs.h | 2 +- nuttx/fs/fat/fs_writefat.c | 2 +- nuttx/fs/mmap/Make.defs | 2 +- nuttx/fs/mmap/fs_mmap.c | 2 +- nuttx/fs/mmap/fs_munmap.c | 2 +- nuttx/fs/mmap/fs_rammap.c | 2 +- nuttx/fs/mmap/fs_rammap.h | 2 +- nuttx/fs/nfs/nfs_util.c | 2 +- nuttx/fs/nxffs/Make.defs | 2 +- nuttx/fs/nxffs/nxffs_block.c | 2 +- nuttx/fs/nxffs/nxffs_blockstats.c | 2 +- nuttx/fs/nxffs/nxffs_cache.c | 2 +- nuttx/fs/nxffs/nxffs_dirent.c | 2 +- nuttx/fs/nxffs/nxffs_dump.c | 2 +- nuttx/fs/nxffs/nxffs_ioctl.c | 2 +- nuttx/fs/nxffs/nxffs_open.c | 2 +- nuttx/fs/nxffs/nxffs_read.c | 2 +- nuttx/fs/nxffs/nxffs_reformat.c | 2 +- nuttx/fs/nxffs/nxffs_stat.c | 2 +- nuttx/fs/nxffs/nxffs_unlink.c | 2 +- nuttx/fs/nxffs/nxffs_util.c | 2 +- nuttx/fs/romfs/Make.defs | 2 +- nuttx/fs/romfs/fs_romfs.c | 2 +- nuttx/fs/romfs/fs_romfs.h | 2 +- nuttx/fs/romfs/fs_romfsutil.c | 2 +- nuttx/graphics/nxbe/nxbe_clipper.c | 2 +- nuttx/graphics/nxbe/nxbe_closewindow.c | 2 +- nuttx/graphics/nxbe/nxbe_colormap.c | 2 +- nuttx/graphics/nxbe/nxbe_fill.c | 2 +- nuttx/graphics/nxbe/nxbe_redraw.c | 2 +- nuttx/graphics/nxbe/nxbe_setposition.c | 2 +- nuttx/graphics/nxbe/nxbe_setsize.c | 2 +- nuttx/graphics/nxbe/nxbe_visible.c | 2 +- nuttx/graphics/nxfonts/Make.defs | 2 +- nuttx/graphics/nxfonts/Makefile.sources | 2 +- nuttx/graphics/nxfonts/nxfonts_bitmaps.c | 2 +- nuttx/graphics/nxfonts/nxfonts_convert.c | 2 +- nuttx/graphics/nxfonts/nxfonts_getfont.c | 2 +- nuttx/graphics/nxfonts/nxfonts_internal.h | 2 +- .../graphics/nxglib/fb/nxglib_copyrectangle.c | 2 +- .../graphics/nxglib/fb/nxglib_fillrectangle.c | 2 +- .../nxglib/lcd/nxglib_copyrectangle.c | 2 +- .../nxglib/lcd/nxglib_fillrectangle.c | 2 +- .../nxglib/lcd/nxglib_moverectangle.c | 2 +- nuttx/graphics/nxglib/nxglib_bitblit.h | 2 +- nuttx/graphics/nxglib/nxglib_circlepts.c | 2 +- nuttx/graphics/nxglib/nxglib_circletraps.c | 2 +- nuttx/graphics/nxglib/nxglib_colorcopy.c | 2 +- nuttx/graphics/nxglib/nxglib_copyrun.h | 2 +- nuttx/graphics/nxglib/nxglib_fillrun.h | 2 +- nuttx/graphics/nxglib/nxglib_intersecting.c | 2 +- .../graphics/nxglib/nxglib_nonintersecting.c | 2 +- nuttx/graphics/nxglib/nxglib_rectadd.c | 2 +- nuttx/graphics/nxglib/nxglib_rectcopy.c | 2 +- nuttx/graphics/nxglib/nxglib_rectinside.c | 2 +- nuttx/graphics/nxglib/nxglib_rectintersect.c | 2 +- nuttx/graphics/nxglib/nxglib_rectoffset.c | 2 +- nuttx/graphics/nxglib/nxglib_rectoverlap.c | 2 +- nuttx/graphics/nxglib/nxglib_rectsize.c | 2 +- nuttx/graphics/nxglib/nxglib_rectunion.c | 2 +- nuttx/graphics/nxglib/nxglib_rgb2yuv.c | 2 +- nuttx/graphics/nxglib/nxglib_runcopy.c | 2 +- nuttx/graphics/nxglib/nxglib_runoffset.c | 2 +- nuttx/graphics/nxglib/nxglib_splitline.c | 2 +- nuttx/graphics/nxglib/nxglib_trapcopy.c | 2 +- nuttx/graphics/nxglib/nxglib_trapoffset.c | 2 +- nuttx/graphics/nxglib/nxglib_vectoradd.c | 2 +- nuttx/graphics/nxglib/nxglib_vectsubtract.c | 2 +- nuttx/graphics/nxglib/nxglib_yuv2rgb.c | 2 +- nuttx/graphics/nxmu/nx_drawcircle.c | 2 +- nuttx/graphics/nxmu/nx_drawline.c | 2 +- nuttx/graphics/nxmu/nx_eventnotify.c | 2 +- nuttx/graphics/nxmu/nx_fillcircle.c | 2 +- nuttx/graphics/nxmu/nxmu_openwindow.c | 2 +- nuttx/graphics/nxmu/nxmu_releasebkgd.c | 2 +- nuttx/graphics/nxmu/nxmu_requestbkgd.c | 2 +- nuttx/graphics/nxmu/nxmu_semtake.c | 2 +- nuttx/graphics/nxsu/nx_bitmap.c | 2 +- nuttx/graphics/nxsu/nx_close.c | 2 +- nuttx/graphics/nxsu/nx_closewindow.c | 2 +- nuttx/graphics/nxsu/nx_drawcircle.c | 2 +- nuttx/graphics/nxsu/nx_drawline.c | 2 +- nuttx/graphics/nxsu/nx_fill.c | 2 +- nuttx/graphics/nxsu/nx_fillcircle.c | 2 +- nuttx/graphics/nxsu/nx_filltrapezoid.c | 2 +- nuttx/graphics/nxsu/nx_getposition.c | 2 +- nuttx/graphics/nxsu/nx_kbdchin.c | 2 +- nuttx/graphics/nxsu/nx_kbdin.c | 2 +- nuttx/graphics/nxsu/nx_lower.c | 2 +- nuttx/graphics/nxsu/nx_move.c | 2 +- nuttx/graphics/nxsu/nx_open.c | 2 +- nuttx/graphics/nxsu/nx_raise.c | 2 +- nuttx/graphics/nxsu/nx_requestbkgd.c | 2 +- nuttx/graphics/nxsu/nx_setbgcolor.c | 2 +- nuttx/graphics/nxsu/nx_setsize.c | 2 +- nuttx/graphics/nxsu/nxfe.h | 2 +- nuttx/graphics/nxsu/nxsu_redrawreq.c | 2 +- nuttx/graphics/nxsu/nxsu_reportposition.c | 2 +- nuttx/graphics/nxtk/nxtk_bitmapwindow.c | 2 +- nuttx/graphics/nxtk/nxtk_closetoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_closewindow.c | 2 +- nuttx/graphics/nxtk/nxtk_containerclip.c | 2 +- nuttx/graphics/nxtk/nxtk_drawcircletoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_drawcirclewindow.c | 2 +- nuttx/graphics/nxtk/nxtk_drawlinetoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_drawlinewindow.c | 2 +- nuttx/graphics/nxtk/nxtk_fillcircletoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_fillcirclewindow.c | 2 +- nuttx/graphics/nxtk/nxtk_filltoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_filltraptoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_filltrapwindow.c | 2 +- nuttx/graphics/nxtk/nxtk_fillwindow.c | 2 +- nuttx/graphics/nxtk/nxtk_getposition.c | 2 +- nuttx/graphics/nxtk/nxtk_lower.c | 2 +- nuttx/graphics/nxtk/nxtk_movetoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_movewindow.c | 2 +- nuttx/graphics/nxtk/nxtk_opentoolbar.c | 2 +- nuttx/graphics/nxtk/nxtk_raise.c | 2 +- nuttx/graphics/nxtk/nxtk_setsize.c | 2 +- nuttx/graphics/nxtk/nxtk_setsubwindows.c | 2 +- nuttx/graphics/nxtk/nxtk_subwindowclip.c | 2 +- nuttx/graphics/nxtk/nxtk_subwindowmove.c | 2 +- nuttx/lib/mqueue/mq_getattr.c | 2 +- nuttx/lib/mqueue/mq_setattr.c | 2 +- nuttx/lib/queue/dq_addafter.c | 2 +- nuttx/lib/queue/dq_addbefore.c | 2 +- nuttx/lib/queue/dq_addfirst.c | 2 +- nuttx/lib/queue/dq_addlast.c | 2 +- nuttx/lib/queue/dq_rem.c | 2 +- nuttx/lib/queue/dq_remfirst.c | 2 +- nuttx/lib/queue/dq_remlast.c | 2 +- nuttx/lib/queue/sq_addafter.c | 2 +- nuttx/lib/queue/sq_addfirst.c | 2 +- nuttx/lib/queue/sq_addlast.c | 2 +- nuttx/lib/queue/sq_rem.c | 2 +- nuttx/lib/queue/sq_remafter.c | 2 +- nuttx/lib/queue/sq_remfirst.c | 2 +- nuttx/lib/queue/sq_remlast.c | 2 +- nuttx/lib/string/lib_checkbase.c | 2 +- nuttx/lib/string/lib_isbasedigit.c | 2 +- nuttx/lib/string/lib_memcmp.c | 2 +- nuttx/lib/string/lib_memmove.c | 2 +- nuttx/lib/string/lib_memset.c | 2 +- nuttx/lib/string/lib_skipspace.c | 2 +- nuttx/lib/string/lib_strcasecmp.c | 2 +- nuttx/lib/string/lib_strcat.c | 124 +- nuttx/lib/string/lib_strcmp.c | 2 +- nuttx/lib/string/lib_strcpy.c | 2 +- nuttx/lib/string/lib_strcspn.c | 2 +- nuttx/lib/string/lib_strdup.c | 2 +- nuttx/lib/string/lib_strlen.c | 2 +- nuttx/lib/string/lib_strncasecmp.c | 2 +- nuttx/lib/string/lib_strncat.c | 2 +- nuttx/lib/string/lib_strncmp.c | 2 +- nuttx/lib/string/lib_strncpy.c | 2 +- nuttx/lib/string/lib_strndup.c | 2 +- nuttx/lib/string/lib_strnlen.c | 2 +- nuttx/lib/string/lib_strpbrk.c | 2 +- nuttx/lib/string/lib_strrchr.c | 2 +- nuttx/lib/string/lib_strspn.c | 2 +- nuttx/lib/string/lib_strstr.c | 2 +- nuttx/lib/string/lib_strtok.c | 2 +- nuttx/lib/string/lib_strtokr.c | 2 +- nuttx/lib/string/lib_strtol.c | 2 +- nuttx/lib/string/lib_strtoll.c | 2 +- nuttx/lib/string/lib_strtoul.c | 2 +- nuttx/lib/string/lib_strtoull.c | 2 +- nuttx/libxx/Makefile | 2 +- nuttx/libxx/libxx_delete.cxx | 2 +- nuttx/libxx/libxx_deletea.cxx | 2 +- nuttx/libxx/libxx_new.cxx | 2 +- nuttx/libxx/libxx_newa.cxx | 2 +- nuttx/net/listen.c | 2 +- nuttx/net/net_arptimer.c | 2 +- nuttx/net/net_checksd.c | 2 +- nuttx/net/net_dsec2timeval.c | 2 +- nuttx/net/net_dup.c | 2 +- nuttx/net/net_dup2.c | 2 +- nuttx/net/net_timeval2dsec.c | 2 +- nuttx/net/netdev_count.c | 2 +- nuttx/net/netdev_findbyaddr.c | 2 +- nuttx/net/netdev_findbyname.c | 2 +- nuttx/net/netdev_unregister.c | 2 +- nuttx/net/uip/Make.defs | 2 +- nuttx/net/uip/uip_arptab.c | 2 +- nuttx/net/uip/uip_callback.c | 2 +- nuttx/net/uip/uip_icmppoll.c | 2 +- nuttx/net/uip/uip_igmpgroup.c | 2 +- nuttx/net/uip/uip_igmpinit.c | 2 +- nuttx/net/uip/uip_igmpinput.c | 2 +- nuttx/net/uip/uip_igmpjoin.c | 2 +- nuttx/net/uip/uip_igmpleave.c | 2 +- nuttx/net/uip/uip_igmpmsg.c | 2 +- nuttx/net/uip/uip_igmppoll.c | 2 +- nuttx/net/uip/uip_igmpsend.c | 2 +- nuttx/net/uip/uip_igmptimer.c | 2 +- nuttx/net/uip/uip_initialize.c | 2 +- nuttx/net/uip/uip_listen.c | 2 +- nuttx/net/uip/uip_mcastmac.c | 2 +- nuttx/net/uip/uip_neighbor.h | 2 +- nuttx/net/uip/uip_send.c | 2 +- nuttx/net/uip/uip_setipid.c | 2 +- nuttx/net/uip/uip_tcpappsend.c | 2 +- nuttx/net/uip/uip_tcpcallback.c | 2 +- nuttx/net/uip/uip_tcpconn.c | 2 +- nuttx/net/uip/uip_tcppoll.c | 2 +- nuttx/net/uip/uip_tcpreadahead.c | 2 +- nuttx/net/uip/uip_tcpseqno.c | 2 +- nuttx/net/uip/uip_tcptimer.c | 2 +- nuttx/net/uip/uip_udpcallback.c | 2 +- nuttx/net/uip/uip_udpinput.c | 2 +- nuttx/net/uip/uip_udppoll.c | 2 +- nuttx/net/uip/uip_udpsend.c | 2 +- nuttx/syscall/Makefile | 2 +- nuttx/syscall/proxies/Make.defs | 2 +- nuttx/syscall/stub_lookup.h | 2 +- nuttx/syscall/stubs/Make.defs | 2 +- nuttx/tools/unlink.sh | 2 +- nuttx/tools/version.sh | 2 +- nuttx/tools/winlink.sh | 2 +- nuttx/tools/zipme.sh | 2 +- 1820 files changed, 27052 insertions(+), 27051 deletions(-) diff --git a/nuttx/arch/8051/include/arch.h b/nuttx/arch/8051/include/arch.h index 1ca504fb81..4626662e42 100644 --- a/nuttx/arch/8051/include/arch.h +++ b/nuttx/arch/8051/include/arch.h @@ -2,7 +2,7 @@ * arch.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/include/irq.h b/nuttx/arch/8051/include/irq.h index 60f5d1c474..ce6334dd0c 100644 --- a/nuttx/arch/8051/include/irq.h +++ b/nuttx/arch/8051/include/irq.h @@ -2,7 +2,7 @@ * irq.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/include/syscall.h b/nuttx/arch/8051/include/syscall.h index de72d1edf4..2c85fb4201 100644 --- a/nuttx/arch/8051/include/syscall.h +++ b/nuttx/arch/8051/include/syscall.h @@ -2,7 +2,7 @@ * arch/8051/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/include/types.h b/nuttx/arch/8051/include/types.h index 2d195631a1..4a528c7d04 100644 --- a/nuttx/arch/8051/include/types.h +++ b/nuttx/arch/8051/include/types.h @@ -2,7 +2,7 @@ * arch/8051/include/types.h * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_allocateheap.c b/nuttx/arch/8051/src/up_allocateheap.c index 6ef1a77dac..b797b44208 100644 --- a/nuttx/arch/8051/src/up_allocateheap.c +++ b/nuttx/arch/8051/src/up_allocateheap.c @@ -2,7 +2,7 @@ * up_allocateheap.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_assert.c b/nuttx/arch/8051/src/up_assert.c index 157b18ae51..10a5daf356 100644 --- a/nuttx/arch/8051/src/up_assert.c +++ b/nuttx/arch/8051/src/up_assert.c @@ -2,7 +2,7 @@ * up_assert.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_blocktask.c b/nuttx/arch/8051/src/up_blocktask.c index 811955efa9..14dc371dde 100644 --- a/nuttx/arch/8051/src/up_blocktask.c +++ b/nuttx/arch/8051/src/up_blocktask.c @@ -2,7 +2,7 @@ * up_blocktask.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_debug.c b/nuttx/arch/8051/src/up_debug.c index 9d9bce2a00..27049f7f5e 100644 --- a/nuttx/arch/8051/src/up_debug.c +++ b/nuttx/arch/8051/src/up_debug.c @@ -2,7 +2,7 @@ * up_assert.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_delay.c b/nuttx/arch/8051/src/up_delay.c index 3403c69cc2..ad8950e86c 100644 --- a/nuttx/arch/8051/src/up_delay.c +++ b/nuttx/arch/8051/src/up_delay.c @@ -2,7 +2,7 @@ * up_delay.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_exit.c b/nuttx/arch/8051/src/up_exit.c index 736fc71d54..27b9fe1386 100644 --- a/nuttx/arch/8051/src/up_exit.c +++ b/nuttx/arch/8051/src/up_exit.c @@ -2,7 +2,7 @@ * up_exit.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_head.S b/nuttx/arch/8051/src/up_head.S index 44f8038c9e..47d270fc91 100644 --- a/nuttx/arch/8051/src/up_head.S +++ b/nuttx/arch/8051/src/up_head.S @@ -2,7 +2,7 @@ * up_head.S * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_idle.c b/nuttx/arch/8051/src/up_idle.c index 802e684bec..4259f8a74b 100644 --- a/nuttx/arch/8051/src/up_idle.c +++ b/nuttx/arch/8051/src/up_idle.c @@ -2,7 +2,7 @@ * up_idle.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_initialize.c b/nuttx/arch/8051/src/up_initialize.c index 8e74921476..b4835f4d19 100644 --- a/nuttx/arch/8051/src/up_initialize.c +++ b/nuttx/arch/8051/src/up_initialize.c @@ -2,7 +2,7 @@ * up_initialize.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_initialstate.c b/nuttx/arch/8051/src/up_initialstate.c index 5289d867c3..85f172888b 100644 --- a/nuttx/arch/8051/src/up_initialstate.c +++ b/nuttx/arch/8051/src/up_initialstate.c @@ -2,7 +2,7 @@ * up_initialstate.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_internal.h b/nuttx/arch/8051/src/up_internal.h index 75fe58c40f..c213cc3d40 100644 --- a/nuttx/arch/8051/src/up_internal.h +++ b/nuttx/arch/8051/src/up_internal.h @@ -2,7 +2,7 @@ * up_internal.h * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_interruptcontext.c b/nuttx/arch/8051/src/up_interruptcontext.c index 81426a94e4..bcc9e4cd9d 100644 --- a/nuttx/arch/8051/src/up_interruptcontext.c +++ b/nuttx/arch/8051/src/up_interruptcontext.c @@ -2,7 +2,7 @@ * up_interruptcontext.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_irq.c b/nuttx/arch/8051/src/up_irq.c index f40bdbf31b..dee3120c8b 100644 --- a/nuttx/arch/8051/src/up_irq.c +++ b/nuttx/arch/8051/src/up_irq.c @@ -2,7 +2,7 @@ * up_irq.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_irqtest.c b/nuttx/arch/8051/src/up_irqtest.c index 211f7e05f0..4889ccfd17 100644 --- a/nuttx/arch/8051/src/up_irqtest.c +++ b/nuttx/arch/8051/src/up_irqtest.c @@ -2,7 +2,7 @@ * up_irqtest.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_putc.c b/nuttx/arch/8051/src/up_putc.c index a4b96e23f4..66979ce4af 100644 --- a/nuttx/arch/8051/src/up_putc.c +++ b/nuttx/arch/8051/src/up_putc.c @@ -2,7 +2,7 @@ * up_putc.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_releasepending.c b/nuttx/arch/8051/src/up_releasepending.c index c35199bd58..55f46edae7 100644 --- a/nuttx/arch/8051/src/up_releasepending.c +++ b/nuttx/arch/8051/src/up_releasepending.c @@ -2,7 +2,7 @@ * up_releasepending.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_reprioritizertr.c b/nuttx/arch/8051/src/up_reprioritizertr.c index 8810a8fe16..6d4a72487f 100644 --- a/nuttx/arch/8051/src/up_reprioritizertr.c +++ b/nuttx/arch/8051/src/up_reprioritizertr.c @@ -2,7 +2,7 @@ * up_reprioritizertr.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_restorecontext.c b/nuttx/arch/8051/src/up_restorecontext.c index cf7fc10395..d1aaae1820 100644 --- a/nuttx/arch/8051/src/up_restorecontext.c +++ b/nuttx/arch/8051/src/up_restorecontext.c @@ -2,7 +2,7 @@ * up_restorecontext.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_savecontext.c b/nuttx/arch/8051/src/up_savecontext.c index 9a86faa947..c5d0ae1c76 100644 --- a/nuttx/arch/8051/src/up_savecontext.c +++ b/nuttx/arch/8051/src/up_savecontext.c @@ -2,7 +2,7 @@ * up_savecontext.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_timerisr.c b/nuttx/arch/8051/src/up_timerisr.c index 3ca2faad67..e31c5e13fd 100644 --- a/nuttx/arch/8051/src/up_timerisr.c +++ b/nuttx/arch/8051/src/up_timerisr.c @@ -2,7 +2,7 @@ * up_timerisr.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/8051/src/up_unblocktask.c b/nuttx/arch/8051/src/up_unblocktask.c index 9152eae0a1..1c82236a5f 100644 --- a/nuttx/arch/8051/src/up_unblocktask.c +++ b/nuttx/arch/8051/src/up_unblocktask.c @@ -2,7 +2,7 @@ * up_unblocktask.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/arch.h b/nuttx/arch/arm/include/arch.h index dd750ad77a..d0b2602eba 100644 --- a/nuttx/arch/arm/include/arch.h +++ b/nuttx/arch/arm/include/arch.h @@ -2,7 +2,7 @@ * arch/arm/include/arch.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/arm/irq.h b/nuttx/arch/arm/include/arm/irq.h index 6b4f05539a..a06abe8886 100644 --- a/nuttx/arch/arm/include/arm/irq.h +++ b/nuttx/arch/arm/include/arm/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/arm/irq.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/arm/syscall.h b/nuttx/arch/arm/include/arm/syscall.h index e06de1a3c2..3fc36c3db0 100644 --- a/nuttx/arch/arm/include/arm/syscall.h +++ b/nuttx/arch/arm/include/arm/syscall.h @@ -2,7 +2,7 @@ * arch/arm/include/arm/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/armv7-m/syscall.h b/nuttx/arch/arm/include/armv7-m/syscall.h index 4c7b843021..4278c3a36b 100644 --- a/nuttx/arch/arm/include/armv7-m/syscall.h +++ b/nuttx/arch/arm/include/armv7-m/syscall.h @@ -2,7 +2,7 @@ * arch/arm/include/armv7-m/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/c5471/irq.h b/nuttx/arch/arm/include/c5471/irq.h index 7f6dcd3433..97aa0352a3 100644 --- a/nuttx/arch/arm/include/c5471/irq.h +++ b/nuttx/arch/arm/include/c5471/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/c5471/irq.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/dm320/irq.h b/nuttx/arch/arm/include/dm320/irq.h index c8c89af5e1..320b56614e 100644 --- a/nuttx/arch/arm/include/dm320/irq.h +++ b/nuttx/arch/arm/include/dm320/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/dm320/irq.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/imx/irq.h b/nuttx/arch/arm/include/imx/irq.h index c2fd93d898..28158bb8d3 100644 --- a/nuttx/arch/arm/include/imx/irq.h +++ b/nuttx/arch/arm/include/imx/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/imx/irq.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/irq.h b/nuttx/arch/arm/include/irq.h index 71493a9fed..bde751b990 100644 --- a/nuttx/arch/arm/include/irq.h +++ b/nuttx/arch/arm/include/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/irq.h * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/kinetis/irq.h b/nuttx/arch/arm/include/kinetis/irq.h index af10ce6f40..8a020ea1b6 100644 --- a/nuttx/arch/arm/include/kinetis/irq.h +++ b/nuttx/arch/arm/include/kinetis/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/kinetis/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/lm3s/irq.h b/nuttx/arch/arm/include/lm3s/irq.h index 3eca0e0e83..6ffc7dec09 100644 --- a/nuttx/arch/arm/include/lm3s/irq.h +++ b/nuttx/arch/arm/include/lm3s/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/lm3s/irq.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/lpc17xx/irq.h b/nuttx/arch/arm/include/lpc17xx/irq.h index aebdc31596..a7eebb32c2 100755 --- a/nuttx/arch/arm/include/lpc17xx/irq.h +++ b/nuttx/arch/arm/include/lpc17xx/irq.h @@ -2,7 +2,7 @@ * arch/lpc17xxx/irq.h * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/lpc214x/irq.h b/nuttx/arch/arm/include/lpc214x/irq.h index 221644a076..5652fc7a9c 100644 --- a/nuttx/arch/arm/include/lpc214x/irq.h +++ b/nuttx/arch/arm/include/lpc214x/irq.h @@ -2,7 +2,7 @@ * arch/lpc214x/irq.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/lpc2378/irq.h b/nuttx/arch/arm/include/lpc2378/irq.h index 3ea09d7af1..807c991194 100755 --- a/nuttx/arch/arm/include/lpc2378/irq.h +++ b/nuttx/arch/arm/include/lpc2378/irq.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/lpc31xx/irq.h b/nuttx/arch/arm/include/lpc31xx/irq.h index 5a701239b2..d3654a507f 100755 --- a/nuttx/arch/arm/include/lpc31xx/irq.h +++ b/nuttx/arch/arm/include/lpc31xx/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/lpc31xx/irq.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/sam3u/irq.h b/nuttx/arch/arm/include/sam3u/irq.h index 2c6940b68f..481db74a2c 100755 --- a/nuttx/arch/arm/include/sam3u/irq.h +++ b/nuttx/arch/arm/include/sam3u/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/sam3u/irq.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/serial.h b/nuttx/arch/arm/include/serial.h index 80eefb2b4a..844f78a2b9 100644 --- a/nuttx/arch/arm/include/serial.h +++ b/nuttx/arch/arm/include/serial.h @@ -2,7 +2,7 @@ * arch/arm/include/serial.h * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/str71x/irq.h b/nuttx/arch/arm/include/str71x/irq.h index bac58bb2a5..5ce85416ae 100644 --- a/nuttx/arch/arm/include/str71x/irq.h +++ b/nuttx/arch/arm/include/str71x/irq.h @@ -2,7 +2,7 @@ * arch/arm/include/str71x/irq.h * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/syscall.h b/nuttx/arch/arm/include/syscall.h index 4c9eee63ef..8b438200a8 100644 --- a/nuttx/arch/arm/include/syscall.h +++ b/nuttx/arch/arm/include/syscall.h @@ -2,7 +2,7 @@ * arch/arm/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/types.h b/nuttx/arch/arm/include/types.h index c3471ca59b..c06b289503 100644 --- a/nuttx/arch/arm/include/types.h +++ b/nuttx/arch/arm/include/types.h @@ -2,7 +2,7 @@ * arch/arm/include/types.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/include/watchdog.h b/nuttx/arch/arm/include/watchdog.h index f70b8d2e9a..43fbac2be8 100644 --- a/nuttx/arch/arm/include/watchdog.h +++ b/nuttx/arch/arm/include/watchdog.h @@ -2,7 +2,7 @@ * arch/arm/include/watchdog.h * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/arm.h b/nuttx/arch/arm/src/arm/arm.h index 4332838149..2ad31fc469 100644 --- a/nuttx/arch/arm/src/arm/arm.h +++ b/nuttx/arch/arm/src/arm/arm.h @@ -2,7 +2,7 @@ * arch/arm/src/arm/arm.h * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/pg_macros.h b/nuttx/arch/arm/src/arm/pg_macros.h index fc50f61460..dc65a5d06a 100644 --- a/nuttx/arch/arm/src/arm/pg_macros.h +++ b/nuttx/arch/arm/src/arm/pg_macros.h @@ -2,7 +2,7 @@ * arch/arm/src/arm/pg_macros.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_allocpage.c b/nuttx/arch/arm/src/arm/up_allocpage.c index c2a31d09c0..0284e48bc3 100755 --- a/nuttx/arch/arm/src/arm/up_allocpage.c +++ b/nuttx/arch/arm/src/arm/up_allocpage.c @@ -3,7 +3,7 @@ * Allocate a new page and map it to the fault address of a task. * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_assert.c b/nuttx/arch/arm/src/arm/up_assert.c index f52dc1b946..023e6e22d4 100644 --- a/nuttx/arch/arm/src/arm/up_assert.c +++ b/nuttx/arch/arm/src/arm/up_assert.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_assert.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_blocktask.c b/nuttx/arch/arm/src/arm/up_blocktask.c index 36c8740d66..f72a024653 100755 --- a/nuttx/arch/arm/src/arm/up_blocktask.c +++ b/nuttx/arch/arm/src/arm/up_blocktask.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_blocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_cache.S b/nuttx/arch/arm/src/arm/up_cache.S index 05926fbb4f..1d459e6930 100644 --- a/nuttx/arch/arm/src/arm/up_cache.S +++ b/nuttx/arch/arm/src/arm/up_cache.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_cache.S * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_checkmapping.c b/nuttx/arch/arm/src/arm/up_checkmapping.c index 370c94c9d5..ca8c3a0323 100755 --- a/nuttx/arch/arm/src/arm/up_checkmapping.c +++ b/nuttx/arch/arm/src/arm/up_checkmapping.c @@ -4,7 +4,7 @@ * address space. * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_copystate.c b/nuttx/arch/arm/src/arm/up_copystate.c index 44f027b328..c76ee8e707 100644 --- a/nuttx/arch/arm/src/arm/up_copystate.c +++ b/nuttx/arch/arm/src/arm/up_copystate.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_copystate.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_dataabort.c b/nuttx/arch/arm/src/arm/up_dataabort.c index c36970c1be..f019419685 100644 --- a/nuttx/arch/arm/src/arm/up_dataabort.c +++ b/nuttx/arch/arm/src/arm/up_dataabort.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_dataabort.c * * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_doirq.c b/nuttx/arch/arm/src/arm/up_doirq.c index 1f1c774738..c82587fff0 100644 --- a/nuttx/arch/arm/src/arm/up_doirq.c +++ b/nuttx/arch/arm/src/arm/up_doirq.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_doirq.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_fullcontextrestore.S b/nuttx/arch/arm/src/arm/up_fullcontextrestore.S index d0745ef5b4..44573a5f44 100644 --- a/nuttx/arch/arm/src/arm/up_fullcontextrestore.S +++ b/nuttx/arch/arm/src/arm/up_fullcontextrestore.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_fullcontextrestore.S * * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_head.S b/nuttx/arch/arm/src/arm/up_head.S index c04dddf8aa..91d67fd15b 100644 --- a/nuttx/arch/arm/src/arm/up_head.S +++ b/nuttx/arch/arm/src/arm/up_head.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_head.S * * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_initialstate.c b/nuttx/arch/arm/src/arm/up_initialstate.c index 4711c9f444..fb672a2aca 100644 --- a/nuttx/arch/arm/src/arm/up_initialstate.c +++ b/nuttx/arch/arm/src/arm/up_initialstate.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_initialstate.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_pginitialize.c b/nuttx/arch/arm/src/arm/up_pginitialize.c index 1aea951134..5470f73e35 100755 --- a/nuttx/arch/arm/src/arm/up_pginitialize.c +++ b/nuttx/arch/arm/src/arm/up_pginitialize.c @@ -3,7 +3,7 @@ * Initialize the MMU for on-demand paging support. * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_prefetchabort.c b/nuttx/arch/arm/src/arm/up_prefetchabort.c index ed3dd91d33..9af644fc0e 100644 --- a/nuttx/arch/arm/src/arm/up_prefetchabort.c +++ b/nuttx/arch/arm/src/arm/up_prefetchabort.c @@ -2,7 +2,7 @@ * arch/arm/src/src/up_prefetchabort.c * * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_releasepending.c b/nuttx/arch/arm/src/arm/up_releasepending.c index dcad401593..8adeeb26d9 100755 --- a/nuttx/arch/arm/src/arm/up_releasepending.c +++ b/nuttx/arch/arm/src/arm/up_releasepending.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_releasepending.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_reprioritizertr.c b/nuttx/arch/arm/src/arm/up_reprioritizertr.c index 38bce2a72b..02bc39d625 100755 --- a/nuttx/arch/arm/src/arm/up_reprioritizertr.c +++ b/nuttx/arch/arm/src/arm/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_reprioritizertr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_saveusercontext.S b/nuttx/arch/arm/src/arm/up_saveusercontext.S index 8d154d1873..43487cc42f 100644 --- a/nuttx/arch/arm/src/arm/up_saveusercontext.S +++ b/nuttx/arch/arm/src/arm/up_saveusercontext.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_saveusercontext.S * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_schedulesigaction.c b/nuttx/arch/arm/src/arm/up_schedulesigaction.c index 0dfb6e540f..a76438f946 100644 --- a/nuttx/arch/arm/src/arm/up_schedulesigaction.c +++ b/nuttx/arch/arm/src/arm/up_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_schedulesigaction.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_sigdeliver.c b/nuttx/arch/arm/src/arm/up_sigdeliver.c index f92f85e7e0..8684494483 100644 --- a/nuttx/arch/arm/src/arm/up_sigdeliver.c +++ b/nuttx/arch/arm/src/arm/up_sigdeliver.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_sigdeliver.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_syscall.c b/nuttx/arch/arm/src/arm/up_syscall.c index f331a13146..1bcd66502f 100644 --- a/nuttx/arch/arm/src/arm/up_syscall.c +++ b/nuttx/arch/arm/src/arm/up_syscall.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_syscall.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_unblocktask.c b/nuttx/arch/arm/src/arm/up_unblocktask.c index 73e292561f..633dc4e821 100755 --- a/nuttx/arch/arm/src/arm/up_unblocktask.c +++ b/nuttx/arch/arm/src/arm/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_unblocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_undefinedinsn.c b/nuttx/arch/arm/src/arm/up_undefinedinsn.c index 4c50991b0f..d61abe11b7 100644 --- a/nuttx/arch/arm/src/arm/up_undefinedinsn.c +++ b/nuttx/arch/arm/src/arm/up_undefinedinsn.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_undefinedinsn.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_va2pte.c b/nuttx/arch/arm/src/arm/up_va2pte.c index 5f92ad8218..eb5a4c56b4 100755 --- a/nuttx/arch/arm/src/arm/up_va2pte.c +++ b/nuttx/arch/arm/src/arm/up_va2pte.c @@ -3,7 +3,7 @@ * Utility to map a virtual address to a L2 page table entry. * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_vectoraddrexcptn.S b/nuttx/arch/arm/src/arm/up_vectoraddrexcptn.S index e034c394f6..ba5787cb91 100644 --- a/nuttx/arch/arm/src/arm/up_vectoraddrexcptn.S +++ b/nuttx/arch/arm/src/arm/up_vectoraddrexcptn.S @@ -2,7 +2,7 @@ * arch/arm/src/src/up_vectoraddrexceptn.S * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_vectors.S b/nuttx/arch/arm/src/arm/up_vectors.S index 00c5d52b06..bcf9c37d0f 100644 --- a/nuttx/arch/arm/src/arm/up_vectors.S +++ b/nuttx/arch/arm/src/arm/up_vectors.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_vectors.S * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/arm/up_vectortab.S b/nuttx/arch/arm/src/arm/up_vectortab.S index a7972fa3c2..8eae70055c 100644 --- a/nuttx/arch/arm/src/arm/up_vectortab.S +++ b/nuttx/arch/arm/src/arm/up_vectortab.S @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_vectortab.S * * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/psr.h b/nuttx/arch/arm/src/armv7-m/psr.h index 30913f7c9e..b8b33c80f6 100644 --- a/nuttx/arch/arm/src/armv7-m/psr.h +++ b/nuttx/arch/arm/src/armv7-m/psr.h @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/psr.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/svcall.h b/nuttx/arch/arm/src/armv7-m/svcall.h index 51b5b9111a..9a4db89b13 100644 --- a/nuttx/arch/arm/src/armv7-m/svcall.h +++ b/nuttx/arch/arm/src/armv7-m/svcall.h @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/svcall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c index 77fd0b596f..2662cbe37f 100644 --- a/nuttx/arch/arm/src/armv7-m/up_assert.c +++ b/nuttx/arch/arm/src/armv7-m/up_assert.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_assert.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_copystate.c b/nuttx/arch/arm/src/armv7-m/up_copystate.c index a5ad312f5e..e9eede8f99 100644 --- a/nuttx/arch/arm/src/armv7-m/up_copystate.c +++ b/nuttx/arch/arm/src/armv7-m/up_copystate.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_copystate.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_doirq.c b/nuttx/arch/arm/src/armv7-m/up_doirq.c index 7ac1ec34db..375054fba6 100644 --- a/nuttx/arch/arm/src/armv7-m/up_doirq.c +++ b/nuttx/arch/arm/src/armv7-m/up_doirq.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_doirq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_hardfault.c b/nuttx/arch/arm/src/armv7-m/up_hardfault.c index a9eea81036..cb3ce9e8a9 100644 --- a/nuttx/arch/arm/src/armv7-m/up_hardfault.c +++ b/nuttx/arch/arm/src/armv7-m/up_hardfault.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_hardfault.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_memfault.c b/nuttx/arch/arm/src/armv7-m/up_memfault.c index bbe3f6573f..ab93c7697d 100644 --- a/nuttx/arch/arm/src/armv7-m/up_memfault.c +++ b/nuttx/arch/arm/src/armv7-m/up_memfault.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_memfault.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_mpu.c b/nuttx/arch/arm/src/armv7-m/up_mpu.c index 27936562c9..4bb3f21d98 100644 --- a/nuttx/arch/arm/src/armv7-m/up_mpu.c +++ b/nuttx/arch/arm/src/armv7-m/up_mpu.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_mpu.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S b/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S index c8da074303..06eb183d21 100755 --- a/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S +++ b/nuttx/arch/arm/src/armv7-m/up_saveusercontext.S @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_saveusercontext.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c index 3c340b8d3c..38673c41d4 100644 --- a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c +++ b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_sigdeliver.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/armv7-m/up_switchcontext.S b/nuttx/arch/arm/src/armv7-m/up_switchcontext.S index 854f6fa162..762e2066e8 100755 --- a/nuttx/arch/arm/src/armv7-m/up_switchcontext.S +++ b/nuttx/arch/arm/src/armv7-m/up_switchcontext.S @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_switchcontext.S * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/c5471/Make.defs b/nuttx/arch/arm/src/c5471/Make.defs index 636197f4e7..d1c2cf0ac7 100644 --- a/nuttx/arch/arm/src/c5471/Make.defs +++ b/nuttx/arch/arm/src/c5471/Make.defs @@ -2,7 +2,7 @@ # c5471/Make.defs # # Copyright (C) 2007 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c index 507f63cf9f..142e0f0848 100644 --- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c +++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c @@ -2,7 +2,7 @@ * arch/arm/src/c5471/c5471_ethernet.c * * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based one a C5471 Linux driver and released under this BSD license with * special permisson from the copyright holder of the Linux driver: diff --git a/nuttx/arch/arm/src/c5471/c5471_lowputc.S b/nuttx/arch/arm/src/c5471/c5471_lowputc.S index 096742a700..b56483b879 100644 --- a/nuttx/arch/arm/src/c5471/c5471_lowputc.S +++ b/nuttx/arch/arm/src/c5471/c5471_lowputc.S @@ -2,7 +2,7 @@ * c5471/c5471_lowputc.S * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/c5471/c5471_timerisr.c b/nuttx/arch/arm/src/c5471/c5471_timerisr.c index c9ff790556..1a221674d5 100644 --- a/nuttx/arch/arm/src/c5471/c5471_timerisr.c +++ b/nuttx/arch/arm/src/c5471/c5471_timerisr.c @@ -2,7 +2,7 @@ * c5471/c5471_timerisr.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/c5471/c5471_vectors.S b/nuttx/arch/arm/src/c5471/c5471_vectors.S index 34f9e1b237..aa514b03fa 100644 --- a/nuttx/arch/arm/src/c5471/c5471_vectors.S +++ b/nuttx/arch/arm/src/c5471/c5471_vectors.S @@ -2,7 +2,7 @@ * arch/arm/src/c5471/c5471_vectors.S * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/c5471/chip.h b/nuttx/arch/arm/src/c5471/chip.h index 7121fd2209..d465ba8340 100644 --- a/nuttx/arch/arm/src/c5471/chip.h +++ b/nuttx/arch/arm/src/c5471/chip.h @@ -2,7 +2,7 @@ * c5471/chip.h * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/calypso/Make.defs b/nuttx/arch/arm/src/calypso/Make.defs index d8f1613b05..1552f17d14 100644 --- a/nuttx/arch/arm/src/calypso/Make.defs +++ b/nuttx/arch/arm/src/calypso/Make.defs @@ -2,7 +2,7 @@ # calypso/Make.defs # # Copyright (C) 2007 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Copyright (C) 2011 Stefan Richter. All rights reserved. # Author: Stefan Richter diff --git a/nuttx/arch/arm/src/calypso/calypso_lowputc.S b/nuttx/arch/arm/src/calypso/calypso_lowputc.S index 951ea03d50..16e5ef4c1a 100644 --- a/nuttx/arch/arm/src/calypso/calypso_lowputc.S +++ b/nuttx/arch/arm/src/calypso/calypso_lowputc.S @@ -6,7 +6,7 @@ * * based on: c5471/c5471_lowputc.S * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/calypso/calypso_serial.c b/nuttx/arch/arm/src/calypso/calypso_serial.c index 5175d25bbd..62e20409b9 100644 --- a/nuttx/arch/arm/src/calypso/calypso_serial.c +++ b/nuttx/arch/arm/src/calypso/calypso_serial.c @@ -6,7 +6,7 @@ * * based on c5471/c5471_serial.c * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/calypso/chip.h b/nuttx/arch/arm/src/calypso/chip.h index d190dbc225..c607fc7186 100644 --- a/nuttx/arch/arm/src/calypso/chip.h +++ b/nuttx/arch/arm/src/calypso/chip.h @@ -6,7 +6,7 @@ * * based on: c5471/chip.h * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_allocateheap.c b/nuttx/arch/arm/src/common/up_allocateheap.c index fbd1421a74..d4b763196e 100644 --- a/nuttx/arch/arm/src/common/up_allocateheap.c +++ b/nuttx/arch/arm/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_allocateheap.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_arch.h b/nuttx/arch/arm/src/common/up_arch.h index b612f6af25..af29bbf652 100644 --- a/nuttx/arch/arm/src/common/up_arch.h +++ b/nuttx/arch/arm/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/arm/src/common/up_arch.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_checkstack.c b/nuttx/arch/arm/src/common/up_checkstack.c index 6c13f63d13..ac8d9e7b91 100644 --- a/nuttx/arch/arm/src/common/up_checkstack.c +++ b/nuttx/arch/arm/src/common/up_checkstack.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_checkstack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_etherstub.c b/nuttx/arch/arm/src/common/up_etherstub.c index 1c4a71ce68..407e7b45bc 100755 --- a/nuttx/arch/arm/src/common/up_etherstub.c +++ b/nuttx/arch/arm/src/common/up_etherstub.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_etherstub.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_idle.c b/nuttx/arch/arm/src/common/up_idle.c index 62557c3a8d..187af76e7d 100644 --- a/nuttx/arch/arm/src/common/up_idle.c +++ b/nuttx/arch/arm/src/common/up_idle.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_idle.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_interruptcontext.c b/nuttx/arch/arm/src/common/up_interruptcontext.c index b67ad523a2..0039692bcd 100644 --- a/nuttx/arch/arm/src/common/up_interruptcontext.c +++ b/nuttx/arch/arm/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_interruptcontext.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_lowputs.c b/nuttx/arch/arm/src/common/up_lowputs.c index 8b2919a05e..890167e0ef 100644 --- a/nuttx/arch/arm/src/common/up_lowputs.c +++ b/nuttx/arch/arm/src/common/up_lowputs.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_lowputs.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_mdelay.c b/nuttx/arch/arm/src/common/up_mdelay.c index b9b9ffc0e4..2c04476206 100644 --- a/nuttx/arch/arm/src/common/up_mdelay.c +++ b/nuttx/arch/arm/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_mdelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_modifyreg16.c b/nuttx/arch/arm/src/common/up_modifyreg16.c index e488a6eee3..32ebd6f96a 100644 --- a/nuttx/arch/arm/src/common/up_modifyreg16.c +++ b/nuttx/arch/arm/src/common/up_modifyreg16.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_modifyreg16.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_modifyreg32.c b/nuttx/arch/arm/src/common/up_modifyreg32.c index 8b93f6b84f..a878732847 100644 --- a/nuttx/arch/arm/src/common/up_modifyreg32.c +++ b/nuttx/arch/arm/src/common/up_modifyreg32.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_modifyreg32.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_modifyreg8.c b/nuttx/arch/arm/src/common/up_modifyreg8.c index 2c9dbac250..92ed48eff2 100644 --- a/nuttx/arch/arm/src/common/up_modifyreg8.c +++ b/nuttx/arch/arm/src/common/up_modifyreg8.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_modifyreg8.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_puts.c b/nuttx/arch/arm/src/common/up_puts.c index 4e74f0cdc3..f56dbf07e5 100644 --- a/nuttx/arch/arm/src/common/up_puts.c +++ b/nuttx/arch/arm/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_puts.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_releasestack.c b/nuttx/arch/arm/src/common/up_releasestack.c index 407bd1b544..82f5db88ff 100644 --- a/nuttx/arch/arm/src/common/up_releasestack.c +++ b/nuttx/arch/arm/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_releasestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_udelay.c b/nuttx/arch/arm/src/common/up_udelay.c index d2d5b74d93..8fcb935223 100644 --- a/nuttx/arch/arm/src/common/up_udelay.c +++ b/nuttx/arch/arm/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_udelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/common/up_usestack.c b/nuttx/arch/arm/src/common/up_usestack.c index f46be0cc90..a3f4f48163 100644 --- a/nuttx/arch/arm/src/common/up_usestack.c +++ b/nuttx/arch/arm/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/arm/src/common/up_usestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/Make.defs b/nuttx/arch/arm/src/dm320/Make.defs index 7962d81789..9571966721 100644 --- a/nuttx/arch/arm/src/dm320/Make.defs +++ b/nuttx/arch/arm/src/dm320/Make.defs @@ -2,7 +2,7 @@ # dm320/Make.defs # # Copyright (C) 2007, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/chip.h b/nuttx/arch/arm/src/dm320/chip.h index 102d6caa36..7ac681e114 100644 --- a/nuttx/arch/arm/src/dm320/chip.h +++ b/nuttx/arch/arm/src/dm320/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/dm320/chip.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_ahb.h b/nuttx/arch/arm/src/dm320/dm320_ahb.h index 7e238f54b7..6a3654666b 100644 --- a/nuttx/arch/arm/src/dm320/dm320_ahb.h +++ b/nuttx/arch/arm/src/dm320/dm320_ahb.h @@ -2,7 +2,7 @@ * dm320/dm320_uart.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_allocateheap.c b/nuttx/arch/arm/src/dm320/dm320_allocateheap.c index 19875276b0..5d4b900935 100644 --- a/nuttx/arch/arm/src/dm320/dm320_allocateheap.c +++ b/nuttx/arch/arm/src/dm320/dm320_allocateheap.c @@ -2,7 +2,7 @@ * dm320/dm320_allocateheap.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_busc.h b/nuttx/arch/arm/src/dm320/dm320_busc.h index b7c3287e57..8c35909467 100644 --- a/nuttx/arch/arm/src/dm320/dm320_busc.h +++ b/nuttx/arch/arm/src/dm320/dm320_busc.h @@ -2,7 +2,7 @@ * dm320/dm320_busc.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_clkc.h b/nuttx/arch/arm/src/dm320/dm320_clkc.h index 1e8e7da91d..7019b11dce 100644 --- a/nuttx/arch/arm/src/dm320/dm320_clkc.h +++ b/nuttx/arch/arm/src/dm320/dm320_clkc.h @@ -2,7 +2,7 @@ * dm320/dm320_clkc.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_decodeirq.c b/nuttx/arch/arm/src/dm320/dm320_decodeirq.c index cb3efa5b97..c7032c4b11 100644 --- a/nuttx/arch/arm/src/dm320/dm320_decodeirq.c +++ b/nuttx/arch/arm/src/dm320/dm320_decodeirq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/dm320_decodeirq.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_emif.h b/nuttx/arch/arm/src/dm320/dm320_emif.h index 0675595d06..653e20fe0d 100644 --- a/nuttx/arch/arm/src/dm320/dm320_emif.h +++ b/nuttx/arch/arm/src/dm320/dm320_emif.h @@ -2,7 +2,7 @@ * dm320/dm320_emif.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_framebuffer.c b/nuttx/arch/arm/src/dm320/dm320_framebuffer.c index fc29fa007f..1b1197d532 100644 --- a/nuttx/arch/arm/src/dm320/dm320_framebuffer.c +++ b/nuttx/arch/arm/src/dm320/dm320_framebuffer.c @@ -2,7 +2,7 @@ * arch/arm/src/dm320/dm320_framebuffer.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_gio.h b/nuttx/arch/arm/src/dm320/dm320_gio.h index da21c67558..4ad277047c 100644 --- a/nuttx/arch/arm/src/dm320/dm320_gio.h +++ b/nuttx/arch/arm/src/dm320/dm320_gio.h @@ -2,7 +2,7 @@ * dm320/dm320_gio.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_intc.h b/nuttx/arch/arm/src/dm320/dm320_intc.h index 245eb30ca9..f05febb2f9 100644 --- a/nuttx/arch/arm/src/dm320/dm320_intc.h +++ b/nuttx/arch/arm/src/dm320/dm320_intc.h @@ -2,7 +2,7 @@ * dm320/dm320_intc.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_lowputc.S b/nuttx/arch/arm/src/dm320/dm320_lowputc.S index 52953fc2c6..e60fa95272 100644 --- a/nuttx/arch/arm/src/dm320/dm320_lowputc.S +++ b/nuttx/arch/arm/src/dm320/dm320_lowputc.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/dm320_lowputc.S * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_memorymap.h b/nuttx/arch/arm/src/dm320/dm320_memorymap.h index 8b8e9c447e..a8aafbb718 100644 --- a/nuttx/arch/arm/src/dm320/dm320_memorymap.h +++ b/nuttx/arch/arm/src/dm320/dm320_memorymap.h @@ -2,7 +2,7 @@ * dm320/dm320_memorymap.h * * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_osd.h b/nuttx/arch/arm/src/dm320/dm320_osd.h index 496e49ff2b..199651e692 100644 --- a/nuttx/arch/arm/src/dm320/dm320_osd.h +++ b/nuttx/arch/arm/src/dm320/dm320_osd.h @@ -2,7 +2,7 @@ * dm320/dm320_osd.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_restart.S b/nuttx/arch/arm/src/dm320/dm320_restart.S index ccbdfc2d9d..7e25d8ff2a 100644 --- a/nuttx/arch/arm/src/dm320/dm320_restart.S +++ b/nuttx/arch/arm/src/dm320/dm320_restart.S @@ -2,7 +2,7 @@ * arch/arm/src/dm320/dm320_restart.S * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_timer.h b/nuttx/arch/arm/src/dm320/dm320_timer.h index 31839a091c..2ef4079067 100644 --- a/nuttx/arch/arm/src/dm320/dm320_timer.h +++ b/nuttx/arch/arm/src/dm320/dm320_timer.h @@ -2,7 +2,7 @@ * dm320/dm320_timer.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_timerisr.c b/nuttx/arch/arm/src/dm320/dm320_timerisr.c index 18e88b448c..59efa53d35 100644 --- a/nuttx/arch/arm/src/dm320/dm320_timerisr.c +++ b/nuttx/arch/arm/src/dm320/dm320_timerisr.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/dm320_timerisr.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_uart.h b/nuttx/arch/arm/src/dm320/dm320_uart.h index f92a5ccdd6..d668489412 100644 --- a/nuttx/arch/arm/src/dm320/dm320_uart.h +++ b/nuttx/arch/arm/src/dm320/dm320_uart.h @@ -2,7 +2,7 @@ * dm320/dm320_uart.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/dm320/dm320_usb.h b/nuttx/arch/arm/src/dm320/dm320_usb.h index 229c2857e9..6db7aef3d6 100644 --- a/nuttx/arch/arm/src/dm320/dm320_usb.h +++ b/nuttx/arch/arm/src/dm320/dm320_usb.h @@ -2,7 +2,7 @@ * dm320/dm320_uart.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/Make.defs b/nuttx/arch/arm/src/imx/Make.defs index f26bd05751..3b2e6ad77c 100644 --- a/nuttx/arch/arm/src/imx/Make.defs +++ b/nuttx/arch/arm/src/imx/Make.defs @@ -2,7 +2,7 @@ # arch/arm/src/imx/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/chip.h b/nuttx/arch/arm/src/imx/chip.h index c8a6615d7e..94985efb66 100644 --- a/nuttx/arch/arm/src/imx/chip.h +++ b/nuttx/arch/arm/src/imx/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/chip.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_aitc.h b/nuttx/arch/arm/src/imx/imx_aitc.h index fdd8a5cf35..5b83c5f46a 100644 --- a/nuttx/arch/arm/src/imx/imx_aitc.h +++ b/nuttx/arch/arm/src/imx/imx_aitc.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_aitc.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_allocateheap.c b/nuttx/arch/arm/src/imx/imx_allocateheap.c index a42b2fb85e..4831c8c8b9 100644 --- a/nuttx/arch/arm/src/imx/imx_allocateheap.c +++ b/nuttx/arch/arm/src/imx/imx_allocateheap.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_allocateheap.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_cspi.h b/nuttx/arch/arm/src/imx/imx_cspi.h index 421b6a4e31..1a60730d57 100755 --- a/nuttx/arch/arm/src/imx/imx_cspi.h +++ b/nuttx/arch/arm/src/imx/imx_cspi.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_cspi.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_decodeirq.c b/nuttx/arch/arm/src/imx/imx_decodeirq.c index 55c72ed76f..ba37a60a2e 100644 --- a/nuttx/arch/arm/src/imx/imx_decodeirq.c +++ b/nuttx/arch/arm/src/imx/imx_decodeirq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_decodeirq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_dma.h b/nuttx/arch/arm/src/imx/imx_dma.h index bf3b03673d..2d5d553ce6 100755 --- a/nuttx/arch/arm/src/imx/imx_dma.h +++ b/nuttx/arch/arm/src/imx/imx_dma.h @@ -1,250 +1,250 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_dma.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_DMA_H -#define __ARCH_ARM_IMX_DMA_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* DMA Register Offsets *************************************************************/ - -#define DMA_SYS_OFFSET 0x0000 -#define DMA_M2D_OFFSET 0x0040 -#define DMA_CH0_OFFSET 0x0080 -#define DMA_CH1_OFFSET 0x00c0 -#define DMA_CH2_OFFSET 0x0100 -#define DMA_CH3_OFFSET 0x0140 -#define DMA_CH4_OFFSET 0x0180 -#define DMA_CH5_OFFSET 0x01C0 -#define DMA_CH6_OFFSET 0x0200 -#define DMA_CH7_OFFSET 0x0240 -#define DMA_CH8_OFFSET 0x0280 -#define DMA_CH9_OFFSET 0x02c0 -#define DMA_CH10_OFFSET 0x0300 -#define DMA_CH_OFFSET(n) (DMA_CH0_OFFSET + (n)*0x0040) -#define DMA_TST_OFFSET 0x0340 - -#define DMA_DCR_OFFSET 0x0000 -#define DMA_ISR_OFFSET 0x0004 -#define DMA_IMR_OFFSET 0x0008 -#define DMA_BTOSR_OFFSET 0x000c -#define DMA_RTOSR_OFFSET 0x0010 -#define DMA_TESR_OFFSET 0x0014 -#define DMA_BOSR_OFFSET 0x0018 -#define DMA_BTOCR_OFFSET 0x001c - -#define DMA_WSRA_OFFSET 0x0000 -#define DMA_XSRA_OFFSET 0x0004 -#define DMA_YSRA_OFFSET 0x0008 -#define DMA_WSRB_OFFSET 0x000c -#define DMA_XSRB_OFFSET 0x0010 -#define DMA_YSRB_OFFSET 0x0014 - -#define DMA_SAR_OFFSET 0x0000 -#define DMA_DAR_OFFSET 0x0004 -#define DMA_CNTR_OFFSET 0x0008 -#define DMA_CCR_OFFSET 0x000c -#define DMA_RSSR_OFFSET 0x0010 -#define DMA_BLR_OFFSET 0x0014 -#define DMA_RTOR_OFFSET 0x0018 -#define DMA_BUCR_OFFSET 0x0018 - -#define DMA_TCR_OFFSET 0x0000 -#define DMA_TFIFOA_OFFSET 0x0004 -#define DMA_TDRR_OFFSET 0x0008 -#define DMA_TDIPR_OFFSET 0x000c -#define DMA_TFIFOB_OFFSET 0x0010 - -/* DMA Register Addresses ***********************************************************/ - -#define IMX_DMA_SYS_BASE (IMX_DMA_VBASE + DMA_SYS_OFFSET) -#define IMX_DMA_M2D_BASE (IMX_DMA_VBASE + DMA_M2D_OFFSET) -#define IMX_DMA_CH0_BASE (IMX_DMA_VBASE + DMA_CH0_OFFSET) -#define IMX_DMA_CH1_BASE (IMX_DMA_VBASE + DMA_CH1_OFFSET) -#define IMX_DMA_CH2_BASE (IMX_DMA_VBASE + DMA_CH2_OFFSET) -#define IMX_DMA_CH3_BASE (IMX_DMA_VBASE + DMA_CH3_OFFSET) -#define IMX_DMA_CH4_BASE (IMX_DMA_VBASE + DMA_CH4_OFFSET) -#define IMX_DMA_CH5_BASE (IMX_DMA_VBASE + DMA_CH5_OFFSET) -#define IMX_DMA_CH6_BASE (IMX_DMA_VBASE + DMA_CH6_OFFSET) -#define IMX_DMA_CH7_BASE (IMX_DMA_VBASE + DMA_CH7_OFFSET) -#define IMX_DMA_CH8_BASE (IMX_DMA_VBASE + DMA_CH8_OFFSET) -#define IMX_DMA_CH9_BASE (IMX_DMA_VBASE + DMA_CH9_OFFSET) -#define IMX_DMA_CH10_BASE (IMX_DMA_VBASE + DMA_CH10_OFFSET) -#define IMX_DMA_CH_BASE(n) (IMX_DMA_VBASE + DMA_CH_OFFSET(n)) -#define IMX_DMA_TST_BASE (IMX_DMA_VBASE + DMA_TST_OFFSET) - -#define IMX_DMA_DCR (DMA_SYS_BASE + DMA_DCR_OFFSET) -#define IMX_DMA_ISR (DMA_SYS_BASE + DMA_ISR_OFFSET) -#define IMX_DMA_IMR (DMA_SYS_BASE + DMA_IMR_OFFSET) -#define IMX_DMA_BTOSR (DMA_SYS_BASE + DMA_BTOSR_OFFSET) -#define IMX_DMA_RTOSR (DMA_SYS_BASE + DMA_RTOSR_OFFSET) -#define IMX_DMA_TESR (DMA_SYS_BASE + DMA_TESR_OFFSET) -#define IMX_DMA_BOSR (DMA_SYS_BASE + DMA_BOSR_OFFSET) -#define IMX_DMA_BTOCR (DMA_SYS_BASE + DMA_BTOCR_OFFSET) - -#define IMX_DMA_WSRA (DMA_M2D_BASE + DMA_WSRA_OFFSET) -#define IMX_DMA_XSRA (DMA_M2D_BASE + DMA_XSRA_OFFSET) -#define IMX_DMA_YSRA (DMA_M2D_BASE + DMA_YSRA_OFFSET) -#define IMX_DMA_WSRB (DMA_M2D_BASE + DMA_WSRB_OFFSET) -#define IMX_DMA_XSRB (DMA_M2D_BASE + DMA_XSRB_OFFSET) -#define IMX_DMA_YSRB (DMA_M2D_BASE + DMA_YSRB_OFFSET) - -#define IMX_DMA_SAR0 (DMA_CH0_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR0 (DMA_CH0_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR0 (DMA_CH0_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR0 (DMA_CH0_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR0 (DMA_CH0_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR0 (DMA_CH0_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR0 (DMA_CH0_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR0 (DMA_CH0_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR1 (DMA_CH1_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR1 (DMA_CH1_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR1 (DMA_CH1_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR1 (DMA_CH1_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR1 (DMA_CH1_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR1 (DMA_CH1_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR1 (DMA_CH1_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR1 (DMA_CH1_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR2 (DMA_CH2_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR2 (DMA_CH2_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR2 (DMA_CH2_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR2 (DMA_CH2_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR2 (DMA_CH2_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR2 (DMA_CH2_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR2 (DMA_CH2_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR2 (DMA_CH2_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR3 (DMA_CH3_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR3 (DMA_CH3_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR3 (DMA_CH3_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR3 (DMA_CH3_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR3 (DMA_CH3_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR3 (DMA_CH3_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR3 (DMA_CH3_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR3 (DMA_CH3_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR4 (DMA_CH4_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR4 (DMA_CH4_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR4 (DMA_CH4_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR4 (DMA_CH4_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR4 (DMA_CH4_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR4 (DMA_CH4_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR4 (DMA_CH4_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR4 (DMA_CH4_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR5 (DMA_CH5_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR5 (DMA_CH5_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR5 (DMA_CH5_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR5 (DMA_CH5_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR5 (DMA_CH5_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR5 (DMA_CH5_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR5 (DMA_CH5_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR5 (DMA_CH5_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR6 (DMA_CH6_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR6 (DMA_CH6_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR6 (DMA_CH6_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR6 (DMA_CH6_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR6 (DMA_CH6_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR6 (DMA_CH6_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR6 (DMA_CH6_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR6 (DMA_CH6_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR7 (DMA_CH7_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR7 (DMA_CH7_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR7 (DMA_CH7_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR7 (DMA_CH7_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR7 (DMA_CH7_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR7 (DMA_CH7_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR7 (DMA_CH7_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR7 (DMA_CH7_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR8 (DMA_CH8_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR8 (DMA_CH8_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR8 (DMA_CH8_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR8 (DMA_CH8_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR8 (DMA_CH8_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR8 (DMA_CH8_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR8 (DMA_CH8_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR8 (DMA_CH8_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR9 (DMA_CH9_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR9 (DMA_CH9_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR9 (DMA_CH9_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR9 (DMA_CH9_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR9 (DMA_CH9_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR9 (DMA_CH9_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR9 (DMA_CH9_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR9 (DMA_CH9_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR10 (DMA_CH10_BASE + DMA_SAR_OFFSET) -#define IMX_DMA_DAR10 (DMA_CH10_BASE + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR10 (DMA_CH10_BASE + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR10 (DMA_CH10_BASE + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR10 (DMA_CH10_BASE + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR10 (DMA_CH10_BASE + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR10 (DMA_CH10_BASE + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR10 (DMA_CH10_BASE + DMA_BUCR_OFFSET) - -#define IMX_DMA_SAR(n) (DMA_CH_BASE(n) + DMA_SAR_OFFSET) -#define IMX_DMA_DAR(n) (DMA_CH_BASE(n) + DMA_DAR_OFFSET) -#define IMX_DMA_CNTR(n) (DMA_CH_BASE(n) + DMA_CNTR_OFFSET) -#define IMX_DMA_CCR(n) (DMA_CH_BASE(n) + DMA_CCR_OFFSET) -#define IMX_DMA_RSSR(n) (DMA_CH_BASE(n) + DMA_RSSR_OFFSET) -#define IMX_DMA_BLR(n) (DMA_CH_BASE(n) + DMA_BLR_OFFSET) -#define IMX_DMA_RTOR(n) (DMA_CH_BASE(n) + DMA_RTOR_OFFSET) -#define IMX_DMA_BUCR(n) (DMA_CH_BASE(n) + DMA_BUCR_OFFSET) - -#define IMX_DMA_TCR (DMA_TST_BASE + DMA_TCR_OFFSET) -#define IMX_DMA_TFIFOA (DMA_TST_BASE + DMA_TFIFOA_OFFSET) -#define IMX_DMA_TDRR (DMA_TST_BASE + DMA_TDRR_OFFSET) -#define IMX_DMA_TDIPR (DMA_TST_BASE + DMA_TDIPR_OFFSET) -#define IMX_DMA_TFIFOB (DMA_TST_BASE + DMA_TFIFOB_OFFSET) - -/* DMA Register Bit Definitions *****************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_DMA_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_dma.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_DMA_H +#define __ARCH_ARM_IMX_DMA_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* DMA Register Offsets *************************************************************/ + +#define DMA_SYS_OFFSET 0x0000 +#define DMA_M2D_OFFSET 0x0040 +#define DMA_CH0_OFFSET 0x0080 +#define DMA_CH1_OFFSET 0x00c0 +#define DMA_CH2_OFFSET 0x0100 +#define DMA_CH3_OFFSET 0x0140 +#define DMA_CH4_OFFSET 0x0180 +#define DMA_CH5_OFFSET 0x01C0 +#define DMA_CH6_OFFSET 0x0200 +#define DMA_CH7_OFFSET 0x0240 +#define DMA_CH8_OFFSET 0x0280 +#define DMA_CH9_OFFSET 0x02c0 +#define DMA_CH10_OFFSET 0x0300 +#define DMA_CH_OFFSET(n) (DMA_CH0_OFFSET + (n)*0x0040) +#define DMA_TST_OFFSET 0x0340 + +#define DMA_DCR_OFFSET 0x0000 +#define DMA_ISR_OFFSET 0x0004 +#define DMA_IMR_OFFSET 0x0008 +#define DMA_BTOSR_OFFSET 0x000c +#define DMA_RTOSR_OFFSET 0x0010 +#define DMA_TESR_OFFSET 0x0014 +#define DMA_BOSR_OFFSET 0x0018 +#define DMA_BTOCR_OFFSET 0x001c + +#define DMA_WSRA_OFFSET 0x0000 +#define DMA_XSRA_OFFSET 0x0004 +#define DMA_YSRA_OFFSET 0x0008 +#define DMA_WSRB_OFFSET 0x000c +#define DMA_XSRB_OFFSET 0x0010 +#define DMA_YSRB_OFFSET 0x0014 + +#define DMA_SAR_OFFSET 0x0000 +#define DMA_DAR_OFFSET 0x0004 +#define DMA_CNTR_OFFSET 0x0008 +#define DMA_CCR_OFFSET 0x000c +#define DMA_RSSR_OFFSET 0x0010 +#define DMA_BLR_OFFSET 0x0014 +#define DMA_RTOR_OFFSET 0x0018 +#define DMA_BUCR_OFFSET 0x0018 + +#define DMA_TCR_OFFSET 0x0000 +#define DMA_TFIFOA_OFFSET 0x0004 +#define DMA_TDRR_OFFSET 0x0008 +#define DMA_TDIPR_OFFSET 0x000c +#define DMA_TFIFOB_OFFSET 0x0010 + +/* DMA Register Addresses ***********************************************************/ + +#define IMX_DMA_SYS_BASE (IMX_DMA_VBASE + DMA_SYS_OFFSET) +#define IMX_DMA_M2D_BASE (IMX_DMA_VBASE + DMA_M2D_OFFSET) +#define IMX_DMA_CH0_BASE (IMX_DMA_VBASE + DMA_CH0_OFFSET) +#define IMX_DMA_CH1_BASE (IMX_DMA_VBASE + DMA_CH1_OFFSET) +#define IMX_DMA_CH2_BASE (IMX_DMA_VBASE + DMA_CH2_OFFSET) +#define IMX_DMA_CH3_BASE (IMX_DMA_VBASE + DMA_CH3_OFFSET) +#define IMX_DMA_CH4_BASE (IMX_DMA_VBASE + DMA_CH4_OFFSET) +#define IMX_DMA_CH5_BASE (IMX_DMA_VBASE + DMA_CH5_OFFSET) +#define IMX_DMA_CH6_BASE (IMX_DMA_VBASE + DMA_CH6_OFFSET) +#define IMX_DMA_CH7_BASE (IMX_DMA_VBASE + DMA_CH7_OFFSET) +#define IMX_DMA_CH8_BASE (IMX_DMA_VBASE + DMA_CH8_OFFSET) +#define IMX_DMA_CH9_BASE (IMX_DMA_VBASE + DMA_CH9_OFFSET) +#define IMX_DMA_CH10_BASE (IMX_DMA_VBASE + DMA_CH10_OFFSET) +#define IMX_DMA_CH_BASE(n) (IMX_DMA_VBASE + DMA_CH_OFFSET(n)) +#define IMX_DMA_TST_BASE (IMX_DMA_VBASE + DMA_TST_OFFSET) + +#define IMX_DMA_DCR (DMA_SYS_BASE + DMA_DCR_OFFSET) +#define IMX_DMA_ISR (DMA_SYS_BASE + DMA_ISR_OFFSET) +#define IMX_DMA_IMR (DMA_SYS_BASE + DMA_IMR_OFFSET) +#define IMX_DMA_BTOSR (DMA_SYS_BASE + DMA_BTOSR_OFFSET) +#define IMX_DMA_RTOSR (DMA_SYS_BASE + DMA_RTOSR_OFFSET) +#define IMX_DMA_TESR (DMA_SYS_BASE + DMA_TESR_OFFSET) +#define IMX_DMA_BOSR (DMA_SYS_BASE + DMA_BOSR_OFFSET) +#define IMX_DMA_BTOCR (DMA_SYS_BASE + DMA_BTOCR_OFFSET) + +#define IMX_DMA_WSRA (DMA_M2D_BASE + DMA_WSRA_OFFSET) +#define IMX_DMA_XSRA (DMA_M2D_BASE + DMA_XSRA_OFFSET) +#define IMX_DMA_YSRA (DMA_M2D_BASE + DMA_YSRA_OFFSET) +#define IMX_DMA_WSRB (DMA_M2D_BASE + DMA_WSRB_OFFSET) +#define IMX_DMA_XSRB (DMA_M2D_BASE + DMA_XSRB_OFFSET) +#define IMX_DMA_YSRB (DMA_M2D_BASE + DMA_YSRB_OFFSET) + +#define IMX_DMA_SAR0 (DMA_CH0_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR0 (DMA_CH0_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR0 (DMA_CH0_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR0 (DMA_CH0_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR0 (DMA_CH0_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR0 (DMA_CH0_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR0 (DMA_CH0_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR0 (DMA_CH0_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR1 (DMA_CH1_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR1 (DMA_CH1_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR1 (DMA_CH1_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR1 (DMA_CH1_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR1 (DMA_CH1_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR1 (DMA_CH1_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR1 (DMA_CH1_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR1 (DMA_CH1_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR2 (DMA_CH2_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR2 (DMA_CH2_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR2 (DMA_CH2_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR2 (DMA_CH2_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR2 (DMA_CH2_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR2 (DMA_CH2_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR2 (DMA_CH2_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR2 (DMA_CH2_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR3 (DMA_CH3_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR3 (DMA_CH3_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR3 (DMA_CH3_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR3 (DMA_CH3_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR3 (DMA_CH3_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR3 (DMA_CH3_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR3 (DMA_CH3_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR3 (DMA_CH3_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR4 (DMA_CH4_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR4 (DMA_CH4_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR4 (DMA_CH4_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR4 (DMA_CH4_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR4 (DMA_CH4_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR4 (DMA_CH4_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR4 (DMA_CH4_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR4 (DMA_CH4_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR5 (DMA_CH5_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR5 (DMA_CH5_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR5 (DMA_CH5_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR5 (DMA_CH5_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR5 (DMA_CH5_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR5 (DMA_CH5_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR5 (DMA_CH5_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR5 (DMA_CH5_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR6 (DMA_CH6_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR6 (DMA_CH6_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR6 (DMA_CH6_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR6 (DMA_CH6_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR6 (DMA_CH6_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR6 (DMA_CH6_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR6 (DMA_CH6_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR6 (DMA_CH6_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR7 (DMA_CH7_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR7 (DMA_CH7_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR7 (DMA_CH7_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR7 (DMA_CH7_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR7 (DMA_CH7_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR7 (DMA_CH7_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR7 (DMA_CH7_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR7 (DMA_CH7_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR8 (DMA_CH8_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR8 (DMA_CH8_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR8 (DMA_CH8_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR8 (DMA_CH8_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR8 (DMA_CH8_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR8 (DMA_CH8_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR8 (DMA_CH8_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR8 (DMA_CH8_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR9 (DMA_CH9_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR9 (DMA_CH9_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR9 (DMA_CH9_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR9 (DMA_CH9_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR9 (DMA_CH9_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR9 (DMA_CH9_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR9 (DMA_CH9_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR9 (DMA_CH9_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR10 (DMA_CH10_BASE + DMA_SAR_OFFSET) +#define IMX_DMA_DAR10 (DMA_CH10_BASE + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR10 (DMA_CH10_BASE + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR10 (DMA_CH10_BASE + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR10 (DMA_CH10_BASE + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR10 (DMA_CH10_BASE + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR10 (DMA_CH10_BASE + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR10 (DMA_CH10_BASE + DMA_BUCR_OFFSET) + +#define IMX_DMA_SAR(n) (DMA_CH_BASE(n) + DMA_SAR_OFFSET) +#define IMX_DMA_DAR(n) (DMA_CH_BASE(n) + DMA_DAR_OFFSET) +#define IMX_DMA_CNTR(n) (DMA_CH_BASE(n) + DMA_CNTR_OFFSET) +#define IMX_DMA_CCR(n) (DMA_CH_BASE(n) + DMA_CCR_OFFSET) +#define IMX_DMA_RSSR(n) (DMA_CH_BASE(n) + DMA_RSSR_OFFSET) +#define IMX_DMA_BLR(n) (DMA_CH_BASE(n) + DMA_BLR_OFFSET) +#define IMX_DMA_RTOR(n) (DMA_CH_BASE(n) + DMA_RTOR_OFFSET) +#define IMX_DMA_BUCR(n) (DMA_CH_BASE(n) + DMA_BUCR_OFFSET) + +#define IMX_DMA_TCR (DMA_TST_BASE + DMA_TCR_OFFSET) +#define IMX_DMA_TFIFOA (DMA_TST_BASE + DMA_TFIFOA_OFFSET) +#define IMX_DMA_TDRR (DMA_TST_BASE + DMA_TDRR_OFFSET) +#define IMX_DMA_TDIPR (DMA_TST_BASE + DMA_TDIPR_OFFSET) +#define IMX_DMA_TFIFOB (DMA_TST_BASE + DMA_TFIFOB_OFFSET) + +/* DMA Register Bit Definitions *****************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_DMA_H */ diff --git a/nuttx/arch/arm/src/imx/imx_eim.h b/nuttx/arch/arm/src/imx/imx_eim.h index 50849794a2..decd54e46a 100755 --- a/nuttx/arch/arm/src/imx/imx_eim.h +++ b/nuttx/arch/arm/src/imx/imx_eim.h @@ -1,85 +1,85 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_eim.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_WIEM_H -#define __ARCH_ARM_IMX_WIEM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* EIM Register Offsets ************************************************************/ - -#define EIM_CS0H_OFFSET 0x00 -#define EIM_CS0L_OFFSET 0x04 -#define EIM_CS1H_OFFSET 0x08 -#define EIM_CS1L_OFFSET 0x0c -#define EIM_CS2H_OFFSET 0x10 -#define EIM_CS2L_OFFSET 0x14 -#define EIM_CS3H_OFFSET 0x18 -#define EIM_CS3L_OFFSET 0x1c -#define EIM_CS4H_OFFSET 0x20 -#define EIM_CS4L_OFFSET 0x24 -#define EIM_CS5H_OFFSET 0x28 -#define EIM_CS5L_OFFSET 0x2c -#define EIM_WEIM_OFFSET 0x30 - -/* EIM Register Addresses ***********************************************************/ - -#define IMX_EIM_CS0H (EIM_BASE_ADDR + EIM_CS0H_OFFSET) -#define IMX_EIM_CS0L (EIM_BASE_ADDR + EIM_CS0L_OFFSET) -#define IMX_EIM_CS1H (EIM_BASE_ADDR + EIM_CS1H_OFFSET) -#define IMX_EIM_CS1L (EIM_BASE_ADDR + EIM_CS1L_OFFSET) -#define IMX_EIM_CS2H (EIM_BASE_ADDR + EIM_CS2H_OFFSET) -#define IMX_EIM_CS2L (EIM_BASE_ADDR + EIM_CS2L_OFFSET) -#define IMX_EIM_CS3H (EIM_BASE_ADDR + EIM_CS3H_OFFSET) -#define IMX_EIM_CS3L (EIM_BASE_ADDR + EIM_CS3L_OFFSET) -#define IMX_EIM_CS4H (EIM_BASE_ADDR + EIM_CS4H_OFFSET) -#define IMX_EIM_CS4L (EIM_BASE_ADDR + EIM_CS4L_OFFSET) -#define IMX_EIM_CS5H (EIM_BASE_ADDR + EIM_CS5H_OFFSET) -#define IMX_EIM_CS5L (EIM_BASE_ADDR + EIM_CS5L_OFFSET) -#define IMX_EIM_WEIM (EIM_BASE_ADDR + EIM_WEIM_OFFSET) - -/* EIM Register Bit Definitions *****************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_EIM_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_eim.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_WIEM_H +#define __ARCH_ARM_IMX_WIEM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* EIM Register Offsets ************************************************************/ + +#define EIM_CS0H_OFFSET 0x00 +#define EIM_CS0L_OFFSET 0x04 +#define EIM_CS1H_OFFSET 0x08 +#define EIM_CS1L_OFFSET 0x0c +#define EIM_CS2H_OFFSET 0x10 +#define EIM_CS2L_OFFSET 0x14 +#define EIM_CS3H_OFFSET 0x18 +#define EIM_CS3L_OFFSET 0x1c +#define EIM_CS4H_OFFSET 0x20 +#define EIM_CS4L_OFFSET 0x24 +#define EIM_CS5H_OFFSET 0x28 +#define EIM_CS5L_OFFSET 0x2c +#define EIM_WEIM_OFFSET 0x30 + +/* EIM Register Addresses ***********************************************************/ + +#define IMX_EIM_CS0H (EIM_BASE_ADDR + EIM_CS0H_OFFSET) +#define IMX_EIM_CS0L (EIM_BASE_ADDR + EIM_CS0L_OFFSET) +#define IMX_EIM_CS1H (EIM_BASE_ADDR + EIM_CS1H_OFFSET) +#define IMX_EIM_CS1L (EIM_BASE_ADDR + EIM_CS1L_OFFSET) +#define IMX_EIM_CS2H (EIM_BASE_ADDR + EIM_CS2H_OFFSET) +#define IMX_EIM_CS2L (EIM_BASE_ADDR + EIM_CS2L_OFFSET) +#define IMX_EIM_CS3H (EIM_BASE_ADDR + EIM_CS3H_OFFSET) +#define IMX_EIM_CS3L (EIM_BASE_ADDR + EIM_CS3L_OFFSET) +#define IMX_EIM_CS4H (EIM_BASE_ADDR + EIM_CS4H_OFFSET) +#define IMX_EIM_CS4L (EIM_BASE_ADDR + EIM_CS4L_OFFSET) +#define IMX_EIM_CS5H (EIM_BASE_ADDR + EIM_CS5H_OFFSET) +#define IMX_EIM_CS5L (EIM_BASE_ADDR + EIM_CS5L_OFFSET) +#define IMX_EIM_WEIM (EIM_BASE_ADDR + EIM_WEIM_OFFSET) + +/* EIM Register Bit Definitions *****************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_EIM_H */ diff --git a/nuttx/arch/arm/src/imx/imx_gpio.c b/nuttx/arch/arm/src/imx/imx_gpio.c index f6099310f6..94e87fdfef 100644 --- a/nuttx/arch/arm/src/imx/imx_gpio.c +++ b/nuttx/arch/arm/src/imx/imx_gpio.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_gpio.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_gpio.h b/nuttx/arch/arm/src/imx/imx_gpio.h index 26c1c43465..dcdf9c68e3 100755 --- a/nuttx/arch/arm/src/imx/imx_gpio.h +++ b/nuttx/arch/arm/src/imx/imx_gpio.h @@ -1,562 +1,562 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_gpio.h - * arch/arm/src/chip/imx_gpio.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_GPIO_H -#define __ARCH_ARM_IMX_GPIO_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#ifndef __ASSEMBLY__ -# include -#endif -#include "up_arch.h" /* getreg32(), putreg32() */ - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* GPIO Register Offsets ************************************************************/ - -#define GPIO_DDIR_OFFSET 0x0000 /* Data Direction Register */ -#define GPIO_OCR1_OFFSET 0x0004 /* Output Configuration Register 1 */ -#define GPIO_OCR2_OFFSET 0x0008 /* Output Configuration Register 2 */ -#define GPIO_ICONFA1_OFFSET 0x000c /* Input Configuration Register A1 */ -#define GPIO_ICONFA2_OFFSET 0x0010 /* Input Configuration Register A2 */ -#define GPIO_ICONFB1_OFFSET 0x0014 /* Input Configuration Register B1 */ -#define GPIO_ICONFB2_OFFSET 0x0018 /* Input Configuration Register B2 */ -#define GPIO_DR_OFFSET 0x001c /* Data Register */ -#define GPIO_GIUS_OFFSET 0x0020 /* GPIO In Use Register */ -#define GPIO_SSR_OFFSET 0x0024 /* Sample Status Register */ -#define GPIO_ICR1_OFFSET 0x0028 /* Interrupt Configuration Register 1 */ -#define GPIO_ICR2_OFFSET 0x002c /* Interrupt Configuration Register 2 */ -#define GPIO_IMR_OFFSET 0x0030 /* Interrupt Mask Register */ -#define GPIO_ISR_OFFSET 0x0034 /* Interrupt Status Register */ -#define GPIO_GPR_OFFSET 0x0038 /* General Purpose Register */ -#define GPIO_SWR_OFFSET 0x003c /* Software Reset Register */ -#define GPIO_PUEN_OFFSET 0x0040 /* Pull_Up Enable Register */ - -#define GPIO_PTA_OFFSET 0x0000 /* Port A offset */ -#define GPIO_PTB_OFFSET 0x0100 /* Port B offset */ -#define GPIO_PTC_OFFSET 0x0200 /* Port C offset */ -#define GPIO_PTD_OFFSET 0x0300 /* Port D offset */ - -#define GPIOA 0 /* Port A index */ -#define GPIOB 1 /* Port B index */ -#define GPIOC 2 /* Port C index */ -#define GPIOD 3 /* Port D index */ -#define GPIO_PT_OFFSET(n) (GPIO_PTA_OFFSET + (n)*0x0100) - -/* GPIO Register Addresses **********************************************************/ - -#define IMX_PTA_VBASE (IMX_GPIO_VBASE + GPIO_PTA_OFFSET) -#define IMX_PTB_VBASE (IMX_GPIO_VBASE + GPIO_PTB_OFFSET) -#define IMX_PTC_VBASE (IMX_GPIO_VBASE + GPIO_PTC_OFFSET) -#define IMX_PTD_VBASE (IMX_GPIO_VBASE + GPIO_PTD_OFFSET) -#define IMX_PT_VBASE(n) (IMX_GPIO_VBASE + GPIO_PT_OFFSET(n)) - -#define IMX_GPIOA_DDIR (IMX_PTA_VBASE + GPIO_DDIR_OFFSET) -#define IMX_GPIOA_OCR1 (IMX_PTA_VBASE + GPIO_OCR1_OFFSET) -#define IMX_GPIOA_OCR2 (IMX_PTA_VBASE + GPIO_OCR2_OFFSET) -#define IMX_GPIOA_ICONFA1 (IMX_PTA_VBASE + GPIO_ICONFA1_OFFSET) -#define IMX_GPIOA_ICONFA2 (IMX_PTA_VBASE + GPIO_ICONFA2_OFFSET) -#define IMX_GPIOA_ICONFB1 (IMX_PTA_VBASE + GPIO_ICONFB1_OFFSET) -#define IMX_GPIOA_ICONFB2 (IMX_PTA_VBASE + GPIO_ICONFB2_OFFSET) -#define IMX_GPIOA_DR (IMX_PTA_VBASE + GPIO_DR_OFFSET) -#define IMX_GPIOA_GIUS (IMX_PTA_VBASE + GPIO_GIUS_OFFSET) -#define IMX_GPIOA_SSR (IMX_PTA_VBASE + GPIO_SSR_OFFSET) -#define IMX_GPIOA_ICR1 (IMX_PTA_VBASE + GPIO_ICR1_OFFSET) -#define IMX_GPIOA_ICR2 (IMX_PTA_VBASE + GPIO_ICR2_OFFSET) -#define IMX_GPIOA_IMR (IMX_PTA_VBASE + GPIO_IMR_OFFSET) -#define IMX_GPIOA_ISR (IMX_PTA_VBASE + GPIO_ISR_OFFSET) -#define IMX_GPIOA_GPR (IMX_PTA_VBASE + GPIO_GPR_OFFSET) -#define IMX_GPIOA_SWR (IMX_PTA_VBASE + GPIO_SWR_OFFSET) -#define IMX_GPIOA_PUEN (IMX_PTA_VBASE + GPIO_PUEN_OFFSET) - -#define IMX_GPIOB_DDIR (IMX_PTB_VBASE + GPIO_DDIR_OFFSET) -#define IMX_GPIOB_OCR1 (IMX_PTB_VBASE + GPIO_OCR1_OFFSET) -#define IMX_GPIOB_OCR2 (IMX_PTB_VBASE + GPIO_OCR2_OFFSET) -#define IMX_GPIOB_ICONFA1 (IMX_PTB_VBASE + GPIO_ICONFA1_OFFSET) -#define IMX_GPIOB_ICONFA2 (IMX_PTB_VBASE + GPIO_ICONFA2_OFFSET) -#define IMX_GPIOB_ICONFB1 (IMX_PTB_VBASE + GPIO_ICONFB1_OFFSET) -#define IMX_GPIOB_ICONFB2 (IMX_PTB_VBASE + GPIO_ICONFB2_OFFSET) -#define IMX_GPIOB_DR (IMX_PTB_VBASE + GPIO_DR_OFFSET) -#define IMX_GPIOB_GIUS (IMX_PTB_VBASE + GPIO_GIUS_OFFSET) -#define IMX_GPIOB_SSR (IMX_PTB_VBASE + GPIO_SSR_OFFSET) -#define IMX_GPIOB_ICR1 (IMX_PTB_VBASE + GPIO_ICR1_OFFSET) -#define IMX_GPIOB_ICR2 (IMX_PTB_VBASE + GPIO_ICR2_OFFSET) -#define IMX_GPIOB_IMR (IMX_PTB_VBASE + GPIO_IMR_OFFSET) -#define IMX_GPIOB_ISR (IMX_PTB_VBASE + GPIO_ISR_OFFSET) -#define IMX_GPIOB_GPR (IMX_PTB_VBASE + GPIO_GPR_OFFSET) -#define IMX_GPIOB_SWR (IMX_PTB_VBASE + GPIO_SWR_OFFSET) -#define IMX_GPIOB_PUEN (IMX_PTB_VBASE + GPIO_PUEN_OFFSET) - -#define IMX_GPIOC_DDIR (IMX_PTC_VBASE + GPIO_DDIR_OFFSET) -#define IMX_GPIOC_OCR1 (IMX_PTC_VBASE + GPIO_OCR1_OFFSET) -#define IMX_GPIOC_OCR2 (IMX_PTC_VBASE + GPIO_OCR2_OFFSET) -#define IMX_GPIOC_ICONFA1 (IMX_PTC_VBASE + GPIO_ICONFA1_OFFSET) -#define IMX_GPIOC_ICONFA2 (IMX_PTC_VBASE + GPIO_ICONFA2_OFFSET) -#define IMX_GPIOC_ICONFB1 (IMX_PTC_VBASE + GPIO_ICONFB1_OFFSET) -#define IMX_GPIOC_ICONFB2 (IMX_PTC_VBASE + GPIO_ICONFB2_OFFSET) -#define IMX_GPIOC_DR (IMX_PTC_VBASE + GPIO_DR_OFFSET) -#define IMX_GPIOC_GIUS (IMX_PTC_VBASE + GPIO_GIUS_OFFSET) -#define IMX_GPIOC_SSR (IMX_PTC_VBASE + GPIO_SSR_OFFSET) -#define IMX_GPIOC_ICR1 (IMX_PTC_VBASE + GPIO_ICR1_OFFSET) -#define IMX_GPIOC_ICR2 (IMX_PTC_VBASE + GPIO_ICR2_OFFSET) -#define IMX_GPIOC_IMR (IMX_PTC_VBASE + GPIO_IMR_OFFSET) -#define IMX_GPIOC_ISR (IMX_PTC_VBASE + GPIO_ISR_OFFSET) -#define IMX_GPIOC_GPR (IMX_PTC_VBASE + GPIO_GPR_OFFSET) -#define IMX_GPIOC_SWR (IMX_PTC_VBASE + GPIO_SWR_OFFSET) -#define IMX_GPIOC_PUEN (IMX_PTC_VBASE + GPIO_PUEN_OFFSET) - -#define IMX_GPIOD_DDIR (IMX_PTD_VBASE + GPIO_DDIR_OFFSET) -#define IMX_GPIOD_OCR1 (IMX_PTD_VBASE + GPIO_OCR1_OFFSET) -#define IMX_GPIOD_OCR2 (IMX_PTD_VBASE + GPIO_OCR2_OFFSET) -#define IMX_GPIOD_ICONFA1 (IMX_PTD_VBASE + GPIO_ICONFA1_OFFSET) -#define IMX_GPIOD_ICONFA2 (IMX_PTD_VBASE + GPIO_ICONFA2_OFFSET) -#define IMX_GPIOD_ICONFB1 (IMX_PTD_VBASE + GPIO_ICONFB1_OFFSET) -#define IMX_GPIOD_ICONFB2 (IMX_PTD_VBASE + GPIO_ICONFB2_OFFSET) -#define IMX_GPIOD_DR (IMX_PTD_VBASE + GPIO_DR_OFFSET) -#define IMX_GPIOD_GIUS (IMX_PTD_VBASE + GPIO_GIUS_OFFSET) -#define IMX_GPIOD_SSR (IMX_PTD_VBASE + GPIO_SSR_OFFSET) -#define IMX_GPIOD_ICR1 (IMX_PTD_VBASE + GPIO_ICR1_OFFSET) -#define IMX_GPIOD_ICR2 (IMX_PTD_VBASE + GPIO_ICR2_OFFSET) -#define IMX_GPIOD_IMR (IMX_PTD_VBASE + GPIO_IMR_OFFSET) -#define IMX_GPIOD_ISR (IMX_PTD_VBASE + GPIO_ISR_OFFSET) -#define IMX_GPIOD_GPR (IMX_PTD_VBASE + GPIO_GPR_OFFSET) -#define IMX_GPIOD_SWR (IMX_PTD_VBASE + GPIO_SWR_OFFSET) -#define IMX_GPIOD_PUEN (IMX_PTD_VBASE + GPIO_PUEN_OFFSET) - -#define IMX_GPIO_DDIR(n) (IMX_PT_VBASE(n) + GPIO_DDIR_OFFSET) -#define IMX_GPIO_OCR1(n) (IMX_PT_VBASE(n) + GPIO_OCR1_OFFSET) -#define IMX_GPIO_OCR2(n) (IMX_PT_VBASE(n) + GPIO_OCR2_OFFSET) -#define IMX_GPIO_ICONFA1(n) (IMX_PT_VBASE(n) + GPIO_ICONFA1_OFFSET) -#define IMX_GPIO_ICONFA2(n) (IMX_PT_VBASE(n) + GPIO_ICONFA2_OFFSET) -#define IMX_GPIO_ICONFB1(n) (IMX_PT_VBASE(n) + GPIO_ICONFB1_OFFSET) -#define IMX_GPIO_ICONFB2(n) (IMX_PT_VBASE(n) + GPIO_ICONFB2_OFFSET) -#define IMX_GPIO_DR(n) (IMX_PT_VBASE(n) + GPIO_DR_OFFSET) -#define IMX_GPIO_GIUS(n) (IMX_PT_VBASE(n) + GPIO_GIUS_OFFSET) -#define IMX_GPIO_SSR(n) (IMX_PT_VBASE(n) + GPIO_SSR_OFFSET) -#define IMX_GPIO_ICR1(n) (IMX_PT_VBASE(n) + GPIO_ICR1_OFFSET) -#define IMX_GPIO_ICR2(n) (IMX_PT_VBASE(n) + GPIO_ICR2_OFFSET) -#define IMX_GPIO_IMR(n) (IMX_PT_VBASE(n) + GPIO_IMR_OFFSET) -#define IMX_GPIO_ISR(n) (IMX_PT_VBASE(n) + GPIO_ISR_OFFSET) -#define IMX_GPIO_GPR(n) (IMX_PT_VBASE(n) + GPIO_GPR_OFFSET) -#define IMX_GPIO_SWR(n) (IMX_PT_VBASE(n) + GPIO_SWR_OFFSET) -#define IMX_GPIO_PUEN(n) (IMX_PT_VBASE(n) + GPIO_PUEN_OFFSET) - -/* GPIO Register Bit Definitions ****************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_GPIO_H */ - -#ifndef __ASSEMBLY__ - -/* Handler circular include... This file includes up_arch.h, but this file is - * included by up_arch.h (via chip.h) BEFORE getreg32 is defined. - */ - -#if !defined(__ARCH_ARM_IMX_GPIOHELPERS_H) && defined(getreg32) -#define __ARCH_ARM_IMX_GPIOHELPERS_H - -/* Select whether the pin is an input or output */ - -static inline void imxgpio_dirout(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_DDIR(port)); - regval |= (1 << bit); - putreg32(regval, IMX_GPIO_DDIR(port)); -} - -static inline void imxgpio_dirin(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_DDIR(port)); - regval &= ~(1 << bit); - putreg32(regval, IMX_GPIO_DDIR(port)); -} - -/* Select input configuration */ - -static inline void imxgpio_ocrain(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_OCR1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_OCR2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_ocrbin(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_OCR1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_OCR2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (1 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_ocrcin(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_OCR1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_OCR2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (2 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_ocrodrin(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_OCR1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_OCR2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval |= (3 << shift); - putreg32(regval, regaddr); -} - -/* Input configuration */ - -static inline void imxgpio_aoutgpio(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFA1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFA2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_aoutisr(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFA1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFA2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (1 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_aout0(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFA1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFA2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (2 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_aout1(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFA1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFA2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval |= (3 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_boutgpio(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFB1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFB2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_boutisr(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFB1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFB2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (1 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_bout0(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFB1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFB2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval &= ~(3 << shift); - regval |= (2 << shift); - putreg32(regval, regaddr); -} - -static inline void imxgpio_bout1(int port, int bit) -{ - uint32_t regval; - uint32_t regaddr; - int shift; - - if (bit < 16) - { - regaddr = IMX_GPIO_ICONFB1(port); - shift = (bit << 1); - } - else - { - regaddr = IMX_GPIO_ICONFB2(port); - shift = ((bit - 16) << 1); - } - - regval = getreg32(regaddr); - regval |= (3 << shift); - putreg32(regval, regaddr); -} - -/* Select whether the pin is used for its GPIO function or for - * its peripheral function. Also select the primary or alternate - * peripheral function. - */ - -static inline void imxgpio_gpiofunc(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_GIUS(port)); - regval |= (1 << bit); - putreg32(regval, IMX_GPIO_GIUS(port)); -} - -static inline void imxgpio_peripheralfunc(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_GIUS(port)); - regval &= ~(1 << bit); - putreg32(regval, IMX_GPIO_GIUS(port)); -} - -static inline void imxgpio_altperipheralfunc(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_GPR(port)); - regval |= (1 << bit); - putreg32(regval, IMX_GPIO_GPR(port)); -} - -static inline void imxgpio_primaryperipheralfunc(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_GPR(port)); - regval &= ~(1 << bit); - putreg32(regval, IMX_GPIO_GPR(port)); -} - -/* Enable/disable pullups */ - -static inline void imxgpio_pullupenable(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_PUEN(port)); - regval |= (1 << bit); - putreg32(regval, IMX_GPIO_PUEN(port)); -} - -static inline void imxgpio_pullupdisable(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_PUEN(port)); - regval &= ~(1 << bit); - putreg32(regval, IMX_GPIO_PUEN(port)); -} - -static inline void imxgpio_setoutput(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_DR(port)); - regval |= (1 << bit); - putreg32(regval, IMX_GPIO_DR(port)); -} - -static inline void imxgpio_clroutput(int port, int bit) -{ - uint32_t regval = getreg32(IMX_GPIO_DR(port)); - regval &= ~(1 << bit); - putreg32(regval, IMX_GPIO_DR(port)); -} - -/* Useful functions for normal configurations */ - -extern void imxgpio_configoutput(int port, int bit, int value); -extern void imxgpio_configinput(int port, int bit); - -extern void imxgpio_configpfoutput(int port, int bit); -extern void imxgpio_configpfinput(int port, int bit); - -#endif - -#endif /* __ARCH_ARM_IMX_GPIOHELPERS_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_gpio.h + * arch/arm/src/chip/imx_gpio.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_GPIO_H +#define __ARCH_ARM_IMX_GPIO_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#ifndef __ASSEMBLY__ +# include +#endif +#include "up_arch.h" /* getreg32(), putreg32() */ + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* GPIO Register Offsets ************************************************************/ + +#define GPIO_DDIR_OFFSET 0x0000 /* Data Direction Register */ +#define GPIO_OCR1_OFFSET 0x0004 /* Output Configuration Register 1 */ +#define GPIO_OCR2_OFFSET 0x0008 /* Output Configuration Register 2 */ +#define GPIO_ICONFA1_OFFSET 0x000c /* Input Configuration Register A1 */ +#define GPIO_ICONFA2_OFFSET 0x0010 /* Input Configuration Register A2 */ +#define GPIO_ICONFB1_OFFSET 0x0014 /* Input Configuration Register B1 */ +#define GPIO_ICONFB2_OFFSET 0x0018 /* Input Configuration Register B2 */ +#define GPIO_DR_OFFSET 0x001c /* Data Register */ +#define GPIO_GIUS_OFFSET 0x0020 /* GPIO In Use Register */ +#define GPIO_SSR_OFFSET 0x0024 /* Sample Status Register */ +#define GPIO_ICR1_OFFSET 0x0028 /* Interrupt Configuration Register 1 */ +#define GPIO_ICR2_OFFSET 0x002c /* Interrupt Configuration Register 2 */ +#define GPIO_IMR_OFFSET 0x0030 /* Interrupt Mask Register */ +#define GPIO_ISR_OFFSET 0x0034 /* Interrupt Status Register */ +#define GPIO_GPR_OFFSET 0x0038 /* General Purpose Register */ +#define GPIO_SWR_OFFSET 0x003c /* Software Reset Register */ +#define GPIO_PUEN_OFFSET 0x0040 /* Pull_Up Enable Register */ + +#define GPIO_PTA_OFFSET 0x0000 /* Port A offset */ +#define GPIO_PTB_OFFSET 0x0100 /* Port B offset */ +#define GPIO_PTC_OFFSET 0x0200 /* Port C offset */ +#define GPIO_PTD_OFFSET 0x0300 /* Port D offset */ + +#define GPIOA 0 /* Port A index */ +#define GPIOB 1 /* Port B index */ +#define GPIOC 2 /* Port C index */ +#define GPIOD 3 /* Port D index */ +#define GPIO_PT_OFFSET(n) (GPIO_PTA_OFFSET + (n)*0x0100) + +/* GPIO Register Addresses **********************************************************/ + +#define IMX_PTA_VBASE (IMX_GPIO_VBASE + GPIO_PTA_OFFSET) +#define IMX_PTB_VBASE (IMX_GPIO_VBASE + GPIO_PTB_OFFSET) +#define IMX_PTC_VBASE (IMX_GPIO_VBASE + GPIO_PTC_OFFSET) +#define IMX_PTD_VBASE (IMX_GPIO_VBASE + GPIO_PTD_OFFSET) +#define IMX_PT_VBASE(n) (IMX_GPIO_VBASE + GPIO_PT_OFFSET(n)) + +#define IMX_GPIOA_DDIR (IMX_PTA_VBASE + GPIO_DDIR_OFFSET) +#define IMX_GPIOA_OCR1 (IMX_PTA_VBASE + GPIO_OCR1_OFFSET) +#define IMX_GPIOA_OCR2 (IMX_PTA_VBASE + GPIO_OCR2_OFFSET) +#define IMX_GPIOA_ICONFA1 (IMX_PTA_VBASE + GPIO_ICONFA1_OFFSET) +#define IMX_GPIOA_ICONFA2 (IMX_PTA_VBASE + GPIO_ICONFA2_OFFSET) +#define IMX_GPIOA_ICONFB1 (IMX_PTA_VBASE + GPIO_ICONFB1_OFFSET) +#define IMX_GPIOA_ICONFB2 (IMX_PTA_VBASE + GPIO_ICONFB2_OFFSET) +#define IMX_GPIOA_DR (IMX_PTA_VBASE + GPIO_DR_OFFSET) +#define IMX_GPIOA_GIUS (IMX_PTA_VBASE + GPIO_GIUS_OFFSET) +#define IMX_GPIOA_SSR (IMX_PTA_VBASE + GPIO_SSR_OFFSET) +#define IMX_GPIOA_ICR1 (IMX_PTA_VBASE + GPIO_ICR1_OFFSET) +#define IMX_GPIOA_ICR2 (IMX_PTA_VBASE + GPIO_ICR2_OFFSET) +#define IMX_GPIOA_IMR (IMX_PTA_VBASE + GPIO_IMR_OFFSET) +#define IMX_GPIOA_ISR (IMX_PTA_VBASE + GPIO_ISR_OFFSET) +#define IMX_GPIOA_GPR (IMX_PTA_VBASE + GPIO_GPR_OFFSET) +#define IMX_GPIOA_SWR (IMX_PTA_VBASE + GPIO_SWR_OFFSET) +#define IMX_GPIOA_PUEN (IMX_PTA_VBASE + GPIO_PUEN_OFFSET) + +#define IMX_GPIOB_DDIR (IMX_PTB_VBASE + GPIO_DDIR_OFFSET) +#define IMX_GPIOB_OCR1 (IMX_PTB_VBASE + GPIO_OCR1_OFFSET) +#define IMX_GPIOB_OCR2 (IMX_PTB_VBASE + GPIO_OCR2_OFFSET) +#define IMX_GPIOB_ICONFA1 (IMX_PTB_VBASE + GPIO_ICONFA1_OFFSET) +#define IMX_GPIOB_ICONFA2 (IMX_PTB_VBASE + GPIO_ICONFA2_OFFSET) +#define IMX_GPIOB_ICONFB1 (IMX_PTB_VBASE + GPIO_ICONFB1_OFFSET) +#define IMX_GPIOB_ICONFB2 (IMX_PTB_VBASE + GPIO_ICONFB2_OFFSET) +#define IMX_GPIOB_DR (IMX_PTB_VBASE + GPIO_DR_OFFSET) +#define IMX_GPIOB_GIUS (IMX_PTB_VBASE + GPIO_GIUS_OFFSET) +#define IMX_GPIOB_SSR (IMX_PTB_VBASE + GPIO_SSR_OFFSET) +#define IMX_GPIOB_ICR1 (IMX_PTB_VBASE + GPIO_ICR1_OFFSET) +#define IMX_GPIOB_ICR2 (IMX_PTB_VBASE + GPIO_ICR2_OFFSET) +#define IMX_GPIOB_IMR (IMX_PTB_VBASE + GPIO_IMR_OFFSET) +#define IMX_GPIOB_ISR (IMX_PTB_VBASE + GPIO_ISR_OFFSET) +#define IMX_GPIOB_GPR (IMX_PTB_VBASE + GPIO_GPR_OFFSET) +#define IMX_GPIOB_SWR (IMX_PTB_VBASE + GPIO_SWR_OFFSET) +#define IMX_GPIOB_PUEN (IMX_PTB_VBASE + GPIO_PUEN_OFFSET) + +#define IMX_GPIOC_DDIR (IMX_PTC_VBASE + GPIO_DDIR_OFFSET) +#define IMX_GPIOC_OCR1 (IMX_PTC_VBASE + GPIO_OCR1_OFFSET) +#define IMX_GPIOC_OCR2 (IMX_PTC_VBASE + GPIO_OCR2_OFFSET) +#define IMX_GPIOC_ICONFA1 (IMX_PTC_VBASE + GPIO_ICONFA1_OFFSET) +#define IMX_GPIOC_ICONFA2 (IMX_PTC_VBASE + GPIO_ICONFA2_OFFSET) +#define IMX_GPIOC_ICONFB1 (IMX_PTC_VBASE + GPIO_ICONFB1_OFFSET) +#define IMX_GPIOC_ICONFB2 (IMX_PTC_VBASE + GPIO_ICONFB2_OFFSET) +#define IMX_GPIOC_DR (IMX_PTC_VBASE + GPIO_DR_OFFSET) +#define IMX_GPIOC_GIUS (IMX_PTC_VBASE + GPIO_GIUS_OFFSET) +#define IMX_GPIOC_SSR (IMX_PTC_VBASE + GPIO_SSR_OFFSET) +#define IMX_GPIOC_ICR1 (IMX_PTC_VBASE + GPIO_ICR1_OFFSET) +#define IMX_GPIOC_ICR2 (IMX_PTC_VBASE + GPIO_ICR2_OFFSET) +#define IMX_GPIOC_IMR (IMX_PTC_VBASE + GPIO_IMR_OFFSET) +#define IMX_GPIOC_ISR (IMX_PTC_VBASE + GPIO_ISR_OFFSET) +#define IMX_GPIOC_GPR (IMX_PTC_VBASE + GPIO_GPR_OFFSET) +#define IMX_GPIOC_SWR (IMX_PTC_VBASE + GPIO_SWR_OFFSET) +#define IMX_GPIOC_PUEN (IMX_PTC_VBASE + GPIO_PUEN_OFFSET) + +#define IMX_GPIOD_DDIR (IMX_PTD_VBASE + GPIO_DDIR_OFFSET) +#define IMX_GPIOD_OCR1 (IMX_PTD_VBASE + GPIO_OCR1_OFFSET) +#define IMX_GPIOD_OCR2 (IMX_PTD_VBASE + GPIO_OCR2_OFFSET) +#define IMX_GPIOD_ICONFA1 (IMX_PTD_VBASE + GPIO_ICONFA1_OFFSET) +#define IMX_GPIOD_ICONFA2 (IMX_PTD_VBASE + GPIO_ICONFA2_OFFSET) +#define IMX_GPIOD_ICONFB1 (IMX_PTD_VBASE + GPIO_ICONFB1_OFFSET) +#define IMX_GPIOD_ICONFB2 (IMX_PTD_VBASE + GPIO_ICONFB2_OFFSET) +#define IMX_GPIOD_DR (IMX_PTD_VBASE + GPIO_DR_OFFSET) +#define IMX_GPIOD_GIUS (IMX_PTD_VBASE + GPIO_GIUS_OFFSET) +#define IMX_GPIOD_SSR (IMX_PTD_VBASE + GPIO_SSR_OFFSET) +#define IMX_GPIOD_ICR1 (IMX_PTD_VBASE + GPIO_ICR1_OFFSET) +#define IMX_GPIOD_ICR2 (IMX_PTD_VBASE + GPIO_ICR2_OFFSET) +#define IMX_GPIOD_IMR (IMX_PTD_VBASE + GPIO_IMR_OFFSET) +#define IMX_GPIOD_ISR (IMX_PTD_VBASE + GPIO_ISR_OFFSET) +#define IMX_GPIOD_GPR (IMX_PTD_VBASE + GPIO_GPR_OFFSET) +#define IMX_GPIOD_SWR (IMX_PTD_VBASE + GPIO_SWR_OFFSET) +#define IMX_GPIOD_PUEN (IMX_PTD_VBASE + GPIO_PUEN_OFFSET) + +#define IMX_GPIO_DDIR(n) (IMX_PT_VBASE(n) + GPIO_DDIR_OFFSET) +#define IMX_GPIO_OCR1(n) (IMX_PT_VBASE(n) + GPIO_OCR1_OFFSET) +#define IMX_GPIO_OCR2(n) (IMX_PT_VBASE(n) + GPIO_OCR2_OFFSET) +#define IMX_GPIO_ICONFA1(n) (IMX_PT_VBASE(n) + GPIO_ICONFA1_OFFSET) +#define IMX_GPIO_ICONFA2(n) (IMX_PT_VBASE(n) + GPIO_ICONFA2_OFFSET) +#define IMX_GPIO_ICONFB1(n) (IMX_PT_VBASE(n) + GPIO_ICONFB1_OFFSET) +#define IMX_GPIO_ICONFB2(n) (IMX_PT_VBASE(n) + GPIO_ICONFB2_OFFSET) +#define IMX_GPIO_DR(n) (IMX_PT_VBASE(n) + GPIO_DR_OFFSET) +#define IMX_GPIO_GIUS(n) (IMX_PT_VBASE(n) + GPIO_GIUS_OFFSET) +#define IMX_GPIO_SSR(n) (IMX_PT_VBASE(n) + GPIO_SSR_OFFSET) +#define IMX_GPIO_ICR1(n) (IMX_PT_VBASE(n) + GPIO_ICR1_OFFSET) +#define IMX_GPIO_ICR2(n) (IMX_PT_VBASE(n) + GPIO_ICR2_OFFSET) +#define IMX_GPIO_IMR(n) (IMX_PT_VBASE(n) + GPIO_IMR_OFFSET) +#define IMX_GPIO_ISR(n) (IMX_PT_VBASE(n) + GPIO_ISR_OFFSET) +#define IMX_GPIO_GPR(n) (IMX_PT_VBASE(n) + GPIO_GPR_OFFSET) +#define IMX_GPIO_SWR(n) (IMX_PT_VBASE(n) + GPIO_SWR_OFFSET) +#define IMX_GPIO_PUEN(n) (IMX_PT_VBASE(n) + GPIO_PUEN_OFFSET) + +/* GPIO Register Bit Definitions ****************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_GPIO_H */ + +#ifndef __ASSEMBLY__ + +/* Handler circular include... This file includes up_arch.h, but this file is + * included by up_arch.h (via chip.h) BEFORE getreg32 is defined. + */ + +#if !defined(__ARCH_ARM_IMX_GPIOHELPERS_H) && defined(getreg32) +#define __ARCH_ARM_IMX_GPIOHELPERS_H + +/* Select whether the pin is an input or output */ + +static inline void imxgpio_dirout(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_DDIR(port)); + regval |= (1 << bit); + putreg32(regval, IMX_GPIO_DDIR(port)); +} + +static inline void imxgpio_dirin(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_DDIR(port)); + regval &= ~(1 << bit); + putreg32(regval, IMX_GPIO_DDIR(port)); +} + +/* Select input configuration */ + +static inline void imxgpio_ocrain(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_OCR1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_OCR2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_ocrbin(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_OCR1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_OCR2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (1 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_ocrcin(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_OCR1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_OCR2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (2 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_ocrodrin(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_OCR1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_OCR2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval |= (3 << shift); + putreg32(regval, regaddr); +} + +/* Input configuration */ + +static inline void imxgpio_aoutgpio(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFA1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFA2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_aoutisr(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFA1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFA2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (1 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_aout0(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFA1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFA2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (2 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_aout1(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFA1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFA2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval |= (3 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_boutgpio(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFB1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFB2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_boutisr(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFB1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFB2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (1 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_bout0(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFB1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFB2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval &= ~(3 << shift); + regval |= (2 << shift); + putreg32(regval, regaddr); +} + +static inline void imxgpio_bout1(int port, int bit) +{ + uint32_t regval; + uint32_t regaddr; + int shift; + + if (bit < 16) + { + regaddr = IMX_GPIO_ICONFB1(port); + shift = (bit << 1); + } + else + { + regaddr = IMX_GPIO_ICONFB2(port); + shift = ((bit - 16) << 1); + } + + regval = getreg32(regaddr); + regval |= (3 << shift); + putreg32(regval, regaddr); +} + +/* Select whether the pin is used for its GPIO function or for + * its peripheral function. Also select the primary or alternate + * peripheral function. + */ + +static inline void imxgpio_gpiofunc(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_GIUS(port)); + regval |= (1 << bit); + putreg32(regval, IMX_GPIO_GIUS(port)); +} + +static inline void imxgpio_peripheralfunc(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_GIUS(port)); + regval &= ~(1 << bit); + putreg32(regval, IMX_GPIO_GIUS(port)); +} + +static inline void imxgpio_altperipheralfunc(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_GPR(port)); + regval |= (1 << bit); + putreg32(regval, IMX_GPIO_GPR(port)); +} + +static inline void imxgpio_primaryperipheralfunc(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_GPR(port)); + regval &= ~(1 << bit); + putreg32(regval, IMX_GPIO_GPR(port)); +} + +/* Enable/disable pullups */ + +static inline void imxgpio_pullupenable(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_PUEN(port)); + regval |= (1 << bit); + putreg32(regval, IMX_GPIO_PUEN(port)); +} + +static inline void imxgpio_pullupdisable(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_PUEN(port)); + regval &= ~(1 << bit); + putreg32(regval, IMX_GPIO_PUEN(port)); +} + +static inline void imxgpio_setoutput(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_DR(port)); + regval |= (1 << bit); + putreg32(regval, IMX_GPIO_DR(port)); +} + +static inline void imxgpio_clroutput(int port, int bit) +{ + uint32_t regval = getreg32(IMX_GPIO_DR(port)); + regval &= ~(1 << bit); + putreg32(regval, IMX_GPIO_DR(port)); +} + +/* Useful functions for normal configurations */ + +extern void imxgpio_configoutput(int port, int bit, int value); +extern void imxgpio_configinput(int port, int bit); + +extern void imxgpio_configpfoutput(int port, int bit); +extern void imxgpio_configpfinput(int port, int bit); + +#endif + +#endif /* __ARCH_ARM_IMX_GPIOHELPERS_H */ diff --git a/nuttx/arch/arm/src/imx/imx_i2c.h b/nuttx/arch/arm/src/imx/imx_i2c.h index b2896b7eea..8b1c065e22 100755 --- a/nuttx/arch/arm/src/imx/imx_i2c.h +++ b/nuttx/arch/arm/src/imx/imx_i2c.h @@ -1,69 +1,69 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_i2c.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_I2C_H -#define __ARCH_ARM_IMX_I2C_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* I2C Register Offsets *************************************************************/ - -#define I2C_IADR_OFFSET 0x0000 -#define I2C_IFDR_OFFSET 0x0004 -#define I2C_I2CR_OFFSET 0x0008 -#define I2C_I2SR_OFFSET 0x000c -#define I2C_I2DR_OFFSET 0x0010 - -/* I2C Register Addresses ***********************************************************/ - -#define IMX_I2C_IADR (IMX_I2C_VBASE + I2C_IADR_OFFSET) -#define IMX_I2C_IFDR (IMX_I2C_VBASE + I2C_IFDR_OFFSET) -#define IMX_I2C_I2CR (IMX_I2C_VBASE + I2C_I2CR_OFFSET) -#define IMX_I2C_I2SR (IMX_I2C_VBASE + I2C_I2SR_OFFSET) -#define IMX_I2C_I2DR (IMX_I2C_VBASE + I2C_I2DR_OFFSET) - -/* I2C Register Bit Definitions *****************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_I2C_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_i2c.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_I2C_H +#define __ARCH_ARM_IMX_I2C_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* I2C Register Offsets *************************************************************/ + +#define I2C_IADR_OFFSET 0x0000 +#define I2C_IFDR_OFFSET 0x0004 +#define I2C_I2CR_OFFSET 0x0008 +#define I2C_I2SR_OFFSET 0x000c +#define I2C_I2DR_OFFSET 0x0010 + +/* I2C Register Addresses ***********************************************************/ + +#define IMX_I2C_IADR (IMX_I2C_VBASE + I2C_IADR_OFFSET) +#define IMX_I2C_IFDR (IMX_I2C_VBASE + I2C_IFDR_OFFSET) +#define IMX_I2C_I2CR (IMX_I2C_VBASE + I2C_I2CR_OFFSET) +#define IMX_I2C_I2SR (IMX_I2C_VBASE + I2C_I2SR_OFFSET) +#define IMX_I2C_I2DR (IMX_I2C_VBASE + I2C_I2DR_OFFSET) + +/* I2C Register Bit Definitions *****************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_I2C_H */ diff --git a/nuttx/arch/arm/src/imx/imx_irq.c b/nuttx/arch/arm/src/imx/imx_irq.c index 934a60f0b5..6715a4ad70 100644 --- a/nuttx/arch/arm/src/imx/imx_irq.c +++ b/nuttx/arch/arm/src/imx/imx_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_irq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_lowputc.S b/nuttx/arch/arm/src/imx/imx_lowputc.S index c009556220..b0c8163a3e 100644 --- a/nuttx/arch/arm/src/imx/imx_lowputc.S +++ b/nuttx/arch/arm/src/imx/imx_lowputc.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_lowputc.S * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_memorymap.h b/nuttx/arch/arm/src/imx/imx_memorymap.h index 7eafc908a5..fd23aafc33 100644 --- a/nuttx/arch/arm/src/imx/imx_memorymap.h +++ b/nuttx/arch/arm/src/imx/imx_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_memorymap.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_rtc.h b/nuttx/arch/arm/src/imx/imx_rtc.h index 68f684fec5..249e7a40d2 100755 --- a/nuttx/arch/arm/src/imx/imx_rtc.h +++ b/nuttx/arch/arm/src/imx/imx_rtc.h @@ -1,85 +1,85 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_rtc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_RTC_H -#define __ARCH_ARM_IMX_RTC_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* RTC Register Offsets *************************************************************/ - -#define RTC_HOURMIN_OFFSET 0x0000 -#define RTC_SECOND_OFFSET 0x0004 -#define RTC_ALRM_HM_OFFSET 0x0008 -#define RTC_ALRM_SEC_OFFSET 0x000c -#define RTC_RTCCTL_OFFSET 0x0010 -#define RTC_RTCISR_OFFSET 0x0014 -#define RTC_RTCIENR_OFFSET 0x0018 -#define RTC_STPWCH_OFFSET 0x001c -#define RTC_DAYR_OFFSET 0x0020 -#define RTC_DAYALARM_OFFSET 0x0024 -#define RTC_TEST1_OFFSET 0x0028 -#define RTC_TEST2_OFFSET 0x002c -#define RTC_TEST3_OFFSET 0x0030 - -/* RTC Register Addresses ***********************************************************/ - -#define IMX_RTC_HOURMIN (IMX_RTC_VBASE + RTC_HOURMIN_OFFSET) -#define IMX_RTC_SECOND (IMX_RTC_VBASE + RTC_SECOND_OFFSET) -#define IMX_RTC_ALRM_HM (IMX_RTC_VBASE + RTC_ALRM_HM_OFFSET) -#define IMX_RTC_ALRM_SEC (IMX_RTC_VBASE + RTC_ALRM_SEC_OFFSET) -#define IMX_RTC_RTCCTL (IMX_RTC_VBASE + RTC_RTCCTL_OFFSET) -#define IMX_RTC_RTCISR (IMX_RTC_VBASE + RTC_RTCISR_OFFSET) -#define IMX_RTC_RTCIENR (IMX_RTC_VBASE + RTC_RTCIENR_OFFSET) -#define IMX_RTC_STPWCH (IMX_RTC_VBASE + RTC_STPWCH_OFFSET) -#define IMX_RTC_DAYR (IMX_RTC_VBASE + RTC_DAYR_OFFSET) -#define IMX_RTC_DAYALARM (IMX_RTC_VBASE + RTC_DAYALARM_OFFSET) -#define IMX_RTC_TEST1 (IMX_RTC_VBASE + RTC_TEST1_OFFSET) -#define IMX_RTC_TEST2 (IMX_RTC_VBASE + RTC_TEST2_OFFSET) -#define IMX_RTC_TEST3 (IMX_RTC_VBASE + RTC_TEST3_OFFSET) - -/* RTC Register Bit Definitions *****************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_RTC_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_rtc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_RTC_H +#define __ARCH_ARM_IMX_RTC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* RTC Register Offsets *************************************************************/ + +#define RTC_HOURMIN_OFFSET 0x0000 +#define RTC_SECOND_OFFSET 0x0004 +#define RTC_ALRM_HM_OFFSET 0x0008 +#define RTC_ALRM_SEC_OFFSET 0x000c +#define RTC_RTCCTL_OFFSET 0x0010 +#define RTC_RTCISR_OFFSET 0x0014 +#define RTC_RTCIENR_OFFSET 0x0018 +#define RTC_STPWCH_OFFSET 0x001c +#define RTC_DAYR_OFFSET 0x0020 +#define RTC_DAYALARM_OFFSET 0x0024 +#define RTC_TEST1_OFFSET 0x0028 +#define RTC_TEST2_OFFSET 0x002c +#define RTC_TEST3_OFFSET 0x0030 + +/* RTC Register Addresses ***********************************************************/ + +#define IMX_RTC_HOURMIN (IMX_RTC_VBASE + RTC_HOURMIN_OFFSET) +#define IMX_RTC_SECOND (IMX_RTC_VBASE + RTC_SECOND_OFFSET) +#define IMX_RTC_ALRM_HM (IMX_RTC_VBASE + RTC_ALRM_HM_OFFSET) +#define IMX_RTC_ALRM_SEC (IMX_RTC_VBASE + RTC_ALRM_SEC_OFFSET) +#define IMX_RTC_RTCCTL (IMX_RTC_VBASE + RTC_RTCCTL_OFFSET) +#define IMX_RTC_RTCISR (IMX_RTC_VBASE + RTC_RTCISR_OFFSET) +#define IMX_RTC_RTCIENR (IMX_RTC_VBASE + RTC_RTCIENR_OFFSET) +#define IMX_RTC_STPWCH (IMX_RTC_VBASE + RTC_STPWCH_OFFSET) +#define IMX_RTC_DAYR (IMX_RTC_VBASE + RTC_DAYR_OFFSET) +#define IMX_RTC_DAYALARM (IMX_RTC_VBASE + RTC_DAYALARM_OFFSET) +#define IMX_RTC_TEST1 (IMX_RTC_VBASE + RTC_TEST1_OFFSET) +#define IMX_RTC_TEST2 (IMX_RTC_VBASE + RTC_TEST2_OFFSET) +#define IMX_RTC_TEST3 (IMX_RTC_VBASE + RTC_TEST3_OFFSET) + +/* RTC Register Bit Definitions *****************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_RTC_H */ diff --git a/nuttx/arch/arm/src/imx/imx_spi.c b/nuttx/arch/arm/src/imx/imx_spi.c index e07cd5d32e..5ee601263d 100755 --- a/nuttx/arch/arm/src/imx/imx_spi.c +++ b/nuttx/arch/arm/src/imx/imx_spi.c @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_spi.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_system.h b/nuttx/arch/arm/src/imx/imx_system.h index a3a4b4c549..ad363f14a2 100755 --- a/nuttx/arch/arm/src/imx/imx_system.h +++ b/nuttx/arch/arm/src/imx/imx_system.h @@ -1,187 +1,187 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_system.h - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_SYSTEM_H -#define __ARCH_ARM_IMX_SYSTEM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* AIPI Register Offsets ************************************************************/ - -#define AIPI_PSR0_OFFSET 0x0000 /* Peripheral Size Register 0 */ -#define AIPI_PSR1_OFFSET 0x0004 /* Peripheral Size Register 1 */ -#define AIPI_PAR_OFFSET 0x0008 /* Peripheral Access Register */ - -/* AIPI Register Addresses **********************************************************/ - -#define IMX_AIPI1_PSR0 (IMX_AIPI1_VBASE + AIPI_PSR0_OFFSET) -#define IMX_AIPI1_PSR1 (IMX_AIPI1_VBASE + AIPI_PSR1_OFFSET) -#define IMX_AIPI1_PAR (IMX_AIPI1_VBASE + AIPI_PAR_OFFSET) - -#define IMX_AIPI2_PSR0 (IMX_AIP2_VBASE + AIPI_PSR0_OFFSET) -#define IMX_AIPI2_PSR1 (IMX_AIP2_VBASE + AIPI_PSR1_OFFSET) -#define IMX_AIPI2_PAR (IMX_AIP2_VBASE + 0xAIPI_PAR_OFFSET) - -/* AIPI Register Bit Definitions ****************************************************/ - -/* PLL Register Offsets *************************************************************/ - -#define PLL_CSCR_OFFSET 0x0000 /* Clock Source Control Register */ -#define PLL_MPCTL0_OFFSET 0x0004 /* MCU PLL Control Register 0 */ -#define PLL_MPCTL1_OFFSET 0x0008 /* MCU PLL & System Clock Control Register 1 */ -#define PLL_SPCTL0_OFFSET 0x000c /* System PLL Control Register 0 */ -#define PLL_SPCTL1_OFFSET 0x0010 /* System PLL Control Register 1 */ -#define PLL_PCDR_OFFSET 0x0020 /* Peripherial Clock Divider Register */ - -/* PLL Register Addresses ***********************************************************/ - -#define IMX_PLL_CSCR (IMX_PLL_VBASE + PLL_CSCR_OFFSET) -#define IMX_PLL_MPCTL0 (IMX_PLL_VBASE + PLL_MPCTL0_OFFSET) -#define IMX_PLL_MPCTL1 (IMX_PLL_VBASE + PLL_MPCTL1_OFFSET) -#define IMX_PLL_SPCTL0 (IMX_PLL_VBASE + PLL_SPCTL0_OFFSET) -#define IMX_PLL_SPCTL1 (IMX_PLL_VBASE + PLL_SPCTL1_OFFSET) -#define IMX_PLL_PCDR (IMX_PLL_VBASE + PLL_PCDR_OFFSET) - -/* PLL Register Bit Definitions *****************************************************/ - -#define PLL_CSCR_MPEN (1 << 0) /* Bit 0: 1 = MCU PLL enabled */ -#define PLL_CSCR_SPEN (1 << 1) /* Bit 1: System PLL Enable */ -#define PLL_CSCR_BCLKDIV_SHIFT 10 /* Bits 13–10: BClock Divider */ -#define PLL_CSCR_BCLKDIV_MASK (15 << PLL_CSCR_BCLK_DIV_SHIFT) -#define PLL_CSCR_PRESC (1 << 15) /* Bit 15: MPU PLL clock prescaler */ -#define PLL_CSCR_SYSTEM_SEL (1 << 16) /* Bit 16: System clock source select */ -#define PLL_CSCR_OSCEN (1 << 17) /* Bit 17: Ext. 16MHz oscillator enable */ -#define PLL_CSCR_CLK16_SEL (1 << 18) /* Bit 18: Select BT ref RFBTCLK16 */ -#define PLL_CSCR_MPLLRESTART (1 << 21) /* Bit 21: MPLL Restart */ -#define PLL_CSCR_SPLLRESTART (1 << 22) /* Bit 22: SPLL Restart */ -#define PLL_CSCR_SDCNT_SHIFT 24 /* Bits 25–24: Shut-Down Control */ -#define PLL_CSCR_SDCNT_MASK (3 << PLL_CSCR_SDCNT_SHIFT) -#define CSCR_SDCNT_2ndEDGE (1 << PLL_CSCR_SDCNT_SHIFT) -#define CSCR_SDCNT_3rdEDGE (2 << PLL_CSCR_SDCNT_SHIFT) -#define CSCR_SDCNT_4thEDGE (3 << PLL_CSCR_SDCNT_SHIFT) -#define PLL_CSCR_USBDIV_SHIFT 28 /* Bits 28–26: USB Divider */ -#define PLL_CSCR_USBDIV_MASK (7 << PLL_CSCR_USB_DIV_SHIFT) -#define PLL_CSCR_CLKOSEL_SHIFT 29 /* Bits 31–29: CLKO Select */ -#define PLL_CSCR_CLKOSEL_MASK (7 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_PERCLK1 (0 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_HCLK (1 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_CLK48M (2 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_CLK16M (3 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_PREMCLK (4 << PLL_CSCR_CLKOSEL_SHIFT) -#define CSCR_CLKOSEL_FCLK (5 << PLL_CSCR_CLKOSEL_SHIFT) - -#define PLL_MPCTL0_MFN_SHIFT 0 /* Bits 9–0: Multiplication Factor (Numerator) */ -#define PLL_MPCTL0_MFN_MASK (0x03ff << PLL_MPCTL0_MFN_SHIFT) -#define PLL_MPCTL0_MFI_SHIFT 10 /* Bits 13–10: Multiplication Factor (Integer) */ -#define PLL_MPCTL0_MFI_MASK (0x0f << PLL_MPCTL0_MFI_SHIFT) -#define PLL_MPCTL0_MFD_SHIFT 16 /* Bits 25–16: Multiplication Factor (Denominator) */ -#define PLL_MPCTL0_MFD_MASK (0x03ff << PLL_MPCTL0_MFD_SHIFT) -#define PLL_MPCTL0_PD_SHIFT 26 /* Bits 29–26: Predivider Factor */ -#define PLL_MPCTL0_PD_MASK (0x0f << PLL_MPCTL0_PD_SHIFT - -#define PLL_MPCTL1_BRMO (1 << 6) /* Bit 6: Controls the BRM order */ - -#define PLL_SPCTL0_MFN_SHIFT 0 /* Bits 9–0: Multiplication Factor (Numerator) */ -#define PLL_SPCTL0_MFN_MASK (0x03ff << PLL_SPCTL0_MFN_SHIFT) -#define PLL_SPCTL0_MFI_SHIFT 10 /* Bits 13–10: Multiplication Factor (Integer) */ -#define PLL_SPCTL0_MFI_MASK (0x0f << PLL_SPCTL0_MFI_SHIFT) -#define PLL_SPCTL0_MFD_SHIFT 16 /* Bits 25–16: Multiplication Factor (Denominator) */ -#define PLL_SPCTL0_MFD_MASK (0x03ff << PLL_SPCTL0_MFD_SHIFT) -#define PLL_SPCTL0_PD_SHIFT 26 /* Bits 29–26: Predivider Factor */ -#define PLL_SPCTL0_PD_MASK (0x0f << PLL_SPCTL0_PD_SHIFT) - -#define PLL_SPCTL1_BRMO (1 << 6) /* Bit 6: Controls the BRM order */ -#define PLL_SPCTL1_LF (1 << 15) /* Bit 15: Indicates if System PLL is locked */ - -#define PLL_PCDR_PCLKDIV1_SHIFT 0 /* Bits 3–0: Peripheral Clock Divider 1 */ -#define PLL_PCDR_PCLKDIV1_MASK (0x0f << PLL_PCDR_PCLKDIV1_SHIFT) -#define PLL_PCDR_PCLKDIV2_SHIFT 4 /* Bits 7–4: Peripheral Clock Divider 2 */ -#define PLL_PCDR_PCLKDIV2_MASK (0x0f << PLL_PCDR_PCLKDIV2_SHIFT) -#define PLL_PCDR_PCLKDIV3_SHIFT 16 /* Bits 22–16: Peripheral Clock Divider 3 */ -#define PLL_PCDR_PCLKDIV3_MASK (0x7f << PLL_PCDR_PCLKDIV3_SHIFT) - -/* PLL Helper Macros ****************************************************************/ - -/* SC Register Offsets **************************************************************/ - -#define SC_RSR_OFFSET 0x0000 /* Reset Source Register */ -#define SC_SIDR_OFFSET 0x0004 /* Silicon ID Register */ -#define SC_FMCR_OFFSET 0x0008 /* Function Muxing Control Register */ -#define SC_GPCR_OFFSET 0x000c /* Global Peripheral Control Regiser */ - -/* SC Register Addresses ************************************************************/ - -#define IMX_SC_RSR (IMX_SC_VBASE + SC_RSR_OFFSET) -#define IMX_SC_SIDR (IMX_SC_VBASE + SC_SIDR_OFFSET) -#define IMX_SC_FMCR (IMX_SC_VBASE + SC_FMCR_OFFSET) -#define IMX_SC_GPCR (IMX_SC_VBASE + SC_GPCR_OFFSET) - -/* SC Register Bit Definitions ******************************************************/ - - -#define FMCR_SDCS_SEL (1 << 0) /* Bit 0: 1:CSD0 selected */ -#define FMCR_SDCS1_SEL (1 << 1) /* Bit 1: 1:CSD1 selected */ -#define FMCR_EXT_BREN (1 << 2) /* Bit 2: 1:External bus request enabled */ -#define FMCR_SSI_TXCLKSEL (1 << 3) /* Bit 3: 1:Input from Port B[19] SIM_CLK pin */ -#define FMCR_SSI_TXFSSEL (1 << 4) /* Bit 4: 1:Input from Port B[18] SIM_RST pin */ -#define FMCR_SSI_RXDATSEL (1 << 5) /* Bit 5: 1:Input from Port B[16] SIM_TX pin */ -#define FMCR_SSI_RXCLKSEL (1 << 6) /* Bit 6: 1:Input from Port B[15] SIM_PD pin */ -#define FMCR_SSI_RXFSSEL (1 << 7) /* Bit 7: 1:Input from Port B[14] SIM_SVEN pin */ -#define FMCR_SPI2_RXDSEL (1 << 8) /* Bit 8: 1:Input from SPI2_RXD_1 pin - * (AOUT of Port D[9]) */ - -/* SDRAMC Register Offsets **********************************************************/ - -#define SDRAMC_SDCTL0_OFFSET 0x0000 -#define SDRAMC_SDCTL1_OFFSET 0x0004 - -/* SDRAMC Register Addresses ********************************************************/ - -#define IMX_SDRAMC_SDCTL0 (IMX_SDRAMC_VBASE + SDRAMC_SDCTL0_OFFSET) -#define IMX_SDRAMC_SDCTL1 (IMX_SDRAMC_VBASE + SDRAMC_SDCTL1_OFFSET)) - -/* SDRAMC Register Bit Definitions **************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_SYSTEM_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_system.h + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_SYSTEM_H +#define __ARCH_ARM_IMX_SYSTEM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* AIPI Register Offsets ************************************************************/ + +#define AIPI_PSR0_OFFSET 0x0000 /* Peripheral Size Register 0 */ +#define AIPI_PSR1_OFFSET 0x0004 /* Peripheral Size Register 1 */ +#define AIPI_PAR_OFFSET 0x0008 /* Peripheral Access Register */ + +/* AIPI Register Addresses **********************************************************/ + +#define IMX_AIPI1_PSR0 (IMX_AIPI1_VBASE + AIPI_PSR0_OFFSET) +#define IMX_AIPI1_PSR1 (IMX_AIPI1_VBASE + AIPI_PSR1_OFFSET) +#define IMX_AIPI1_PAR (IMX_AIPI1_VBASE + AIPI_PAR_OFFSET) + +#define IMX_AIPI2_PSR0 (IMX_AIP2_VBASE + AIPI_PSR0_OFFSET) +#define IMX_AIPI2_PSR1 (IMX_AIP2_VBASE + AIPI_PSR1_OFFSET) +#define IMX_AIPI2_PAR (IMX_AIP2_VBASE + 0xAIPI_PAR_OFFSET) + +/* AIPI Register Bit Definitions ****************************************************/ + +/* PLL Register Offsets *************************************************************/ + +#define PLL_CSCR_OFFSET 0x0000 /* Clock Source Control Register */ +#define PLL_MPCTL0_OFFSET 0x0004 /* MCU PLL Control Register 0 */ +#define PLL_MPCTL1_OFFSET 0x0008 /* MCU PLL & System Clock Control Register 1 */ +#define PLL_SPCTL0_OFFSET 0x000c /* System PLL Control Register 0 */ +#define PLL_SPCTL1_OFFSET 0x0010 /* System PLL Control Register 1 */ +#define PLL_PCDR_OFFSET 0x0020 /* Peripherial Clock Divider Register */ + +/* PLL Register Addresses ***********************************************************/ + +#define IMX_PLL_CSCR (IMX_PLL_VBASE + PLL_CSCR_OFFSET) +#define IMX_PLL_MPCTL0 (IMX_PLL_VBASE + PLL_MPCTL0_OFFSET) +#define IMX_PLL_MPCTL1 (IMX_PLL_VBASE + PLL_MPCTL1_OFFSET) +#define IMX_PLL_SPCTL0 (IMX_PLL_VBASE + PLL_SPCTL0_OFFSET) +#define IMX_PLL_SPCTL1 (IMX_PLL_VBASE + PLL_SPCTL1_OFFSET) +#define IMX_PLL_PCDR (IMX_PLL_VBASE + PLL_PCDR_OFFSET) + +/* PLL Register Bit Definitions *****************************************************/ + +#define PLL_CSCR_MPEN (1 << 0) /* Bit 0: 1 = MCU PLL enabled */ +#define PLL_CSCR_SPEN (1 << 1) /* Bit 1: System PLL Enable */ +#define PLL_CSCR_BCLKDIV_SHIFT 10 /* Bits 13–10: BClock Divider */ +#define PLL_CSCR_BCLKDIV_MASK (15 << PLL_CSCR_BCLK_DIV_SHIFT) +#define PLL_CSCR_PRESC (1 << 15) /* Bit 15: MPU PLL clock prescaler */ +#define PLL_CSCR_SYSTEM_SEL (1 << 16) /* Bit 16: System clock source select */ +#define PLL_CSCR_OSCEN (1 << 17) /* Bit 17: Ext. 16MHz oscillator enable */ +#define PLL_CSCR_CLK16_SEL (1 << 18) /* Bit 18: Select BT ref RFBTCLK16 */ +#define PLL_CSCR_MPLLRESTART (1 << 21) /* Bit 21: MPLL Restart */ +#define PLL_CSCR_SPLLRESTART (1 << 22) /* Bit 22: SPLL Restart */ +#define PLL_CSCR_SDCNT_SHIFT 24 /* Bits 25–24: Shut-Down Control */ +#define PLL_CSCR_SDCNT_MASK (3 << PLL_CSCR_SDCNT_SHIFT) +#define CSCR_SDCNT_2ndEDGE (1 << PLL_CSCR_SDCNT_SHIFT) +#define CSCR_SDCNT_3rdEDGE (2 << PLL_CSCR_SDCNT_SHIFT) +#define CSCR_SDCNT_4thEDGE (3 << PLL_CSCR_SDCNT_SHIFT) +#define PLL_CSCR_USBDIV_SHIFT 28 /* Bits 28–26: USB Divider */ +#define PLL_CSCR_USBDIV_MASK (7 << PLL_CSCR_USB_DIV_SHIFT) +#define PLL_CSCR_CLKOSEL_SHIFT 29 /* Bits 31–29: CLKO Select */ +#define PLL_CSCR_CLKOSEL_MASK (7 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_PERCLK1 (0 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_HCLK (1 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_CLK48M (2 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_CLK16M (3 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_PREMCLK (4 << PLL_CSCR_CLKOSEL_SHIFT) +#define CSCR_CLKOSEL_FCLK (5 << PLL_CSCR_CLKOSEL_SHIFT) + +#define PLL_MPCTL0_MFN_SHIFT 0 /* Bits 9–0: Multiplication Factor (Numerator) */ +#define PLL_MPCTL0_MFN_MASK (0x03ff << PLL_MPCTL0_MFN_SHIFT) +#define PLL_MPCTL0_MFI_SHIFT 10 /* Bits 13–10: Multiplication Factor (Integer) */ +#define PLL_MPCTL0_MFI_MASK (0x0f << PLL_MPCTL0_MFI_SHIFT) +#define PLL_MPCTL0_MFD_SHIFT 16 /* Bits 25–16: Multiplication Factor (Denominator) */ +#define PLL_MPCTL0_MFD_MASK (0x03ff << PLL_MPCTL0_MFD_SHIFT) +#define PLL_MPCTL0_PD_SHIFT 26 /* Bits 29–26: Predivider Factor */ +#define PLL_MPCTL0_PD_MASK (0x0f << PLL_MPCTL0_PD_SHIFT + +#define PLL_MPCTL1_BRMO (1 << 6) /* Bit 6: Controls the BRM order */ + +#define PLL_SPCTL0_MFN_SHIFT 0 /* Bits 9–0: Multiplication Factor (Numerator) */ +#define PLL_SPCTL0_MFN_MASK (0x03ff << PLL_SPCTL0_MFN_SHIFT) +#define PLL_SPCTL0_MFI_SHIFT 10 /* Bits 13–10: Multiplication Factor (Integer) */ +#define PLL_SPCTL0_MFI_MASK (0x0f << PLL_SPCTL0_MFI_SHIFT) +#define PLL_SPCTL0_MFD_SHIFT 16 /* Bits 25–16: Multiplication Factor (Denominator) */ +#define PLL_SPCTL0_MFD_MASK (0x03ff << PLL_SPCTL0_MFD_SHIFT) +#define PLL_SPCTL0_PD_SHIFT 26 /* Bits 29–26: Predivider Factor */ +#define PLL_SPCTL0_PD_MASK (0x0f << PLL_SPCTL0_PD_SHIFT) + +#define PLL_SPCTL1_BRMO (1 << 6) /* Bit 6: Controls the BRM order */ +#define PLL_SPCTL1_LF (1 << 15) /* Bit 15: Indicates if System PLL is locked */ + +#define PLL_PCDR_PCLKDIV1_SHIFT 0 /* Bits 3–0: Peripheral Clock Divider 1 */ +#define PLL_PCDR_PCLKDIV1_MASK (0x0f << PLL_PCDR_PCLKDIV1_SHIFT) +#define PLL_PCDR_PCLKDIV2_SHIFT 4 /* Bits 7–4: Peripheral Clock Divider 2 */ +#define PLL_PCDR_PCLKDIV2_MASK (0x0f << PLL_PCDR_PCLKDIV2_SHIFT) +#define PLL_PCDR_PCLKDIV3_SHIFT 16 /* Bits 22–16: Peripheral Clock Divider 3 */ +#define PLL_PCDR_PCLKDIV3_MASK (0x7f << PLL_PCDR_PCLKDIV3_SHIFT) + +/* PLL Helper Macros ****************************************************************/ + +/* SC Register Offsets **************************************************************/ + +#define SC_RSR_OFFSET 0x0000 /* Reset Source Register */ +#define SC_SIDR_OFFSET 0x0004 /* Silicon ID Register */ +#define SC_FMCR_OFFSET 0x0008 /* Function Muxing Control Register */ +#define SC_GPCR_OFFSET 0x000c /* Global Peripheral Control Regiser */ + +/* SC Register Addresses ************************************************************/ + +#define IMX_SC_RSR (IMX_SC_VBASE + SC_RSR_OFFSET) +#define IMX_SC_SIDR (IMX_SC_VBASE + SC_SIDR_OFFSET) +#define IMX_SC_FMCR (IMX_SC_VBASE + SC_FMCR_OFFSET) +#define IMX_SC_GPCR (IMX_SC_VBASE + SC_GPCR_OFFSET) + +/* SC Register Bit Definitions ******************************************************/ + + +#define FMCR_SDCS_SEL (1 << 0) /* Bit 0: 1:CSD0 selected */ +#define FMCR_SDCS1_SEL (1 << 1) /* Bit 1: 1:CSD1 selected */ +#define FMCR_EXT_BREN (1 << 2) /* Bit 2: 1:External bus request enabled */ +#define FMCR_SSI_TXCLKSEL (1 << 3) /* Bit 3: 1:Input from Port B[19] SIM_CLK pin */ +#define FMCR_SSI_TXFSSEL (1 << 4) /* Bit 4: 1:Input from Port B[18] SIM_RST pin */ +#define FMCR_SSI_RXDATSEL (1 << 5) /* Bit 5: 1:Input from Port B[16] SIM_TX pin */ +#define FMCR_SSI_RXCLKSEL (1 << 6) /* Bit 6: 1:Input from Port B[15] SIM_PD pin */ +#define FMCR_SSI_RXFSSEL (1 << 7) /* Bit 7: 1:Input from Port B[14] SIM_SVEN pin */ +#define FMCR_SPI2_RXDSEL (1 << 8) /* Bit 8: 1:Input from SPI2_RXD_1 pin + * (AOUT of Port D[9]) */ + +/* SDRAMC Register Offsets **********************************************************/ + +#define SDRAMC_SDCTL0_OFFSET 0x0000 +#define SDRAMC_SDCTL1_OFFSET 0x0004 + +/* SDRAMC Register Addresses ********************************************************/ + +#define IMX_SDRAMC_SDCTL0 (IMX_SDRAMC_VBASE + SDRAMC_SDCTL0_OFFSET) +#define IMX_SDRAMC_SDCTL1 (IMX_SDRAMC_VBASE + SDRAMC_SDCTL1_OFFSET)) + +/* SDRAMC Register Bit Definitions **************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_SYSTEM_H */ diff --git a/nuttx/arch/arm/src/imx/imx_timer.h b/nuttx/arch/arm/src/imx/imx_timer.h index d923a686d3..9d91d3c0d2 100644 --- a/nuttx/arch/arm/src/imx/imx_timer.h +++ b/nuttx/arch/arm/src/imx/imx_timer.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_timer.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_timerisr.c b/nuttx/arch/arm/src/imx/imx_timerisr.c index 30367e97c0..896dc86e52 100644 --- a/nuttx/arch/arm/src/imx/imx_timerisr.c +++ b/nuttx/arch/arm/src/imx/imx_timerisr.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/imx_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_uart.h b/nuttx/arch/arm/src/imx/imx_uart.h index 89d40f543b..5646e83f7e 100644 --- a/nuttx/arch/arm/src/imx/imx_uart.h +++ b/nuttx/arch/arm/src/imx/imx_uart.h @@ -2,7 +2,7 @@ * arch/arm/src/imx/imx_uart.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/imx/imx_usbd.h b/nuttx/arch/arm/src/imx/imx_usbd.h index be53f23584..8c810cacfb 100755 --- a/nuttx/arch/arm/src/imx/imx_usbd.h +++ b/nuttx/arch/arm/src/imx/imx_usbd.h @@ -1,320 +1,320 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_usbd.h - * - * Copyright (c) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_USBD_H -#define __ARCH_ARM_IMX_USBD_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* USBD Register Offsets ************************************************************/ - -#define USBD_FRAME_OFFSET 0x0000 -#define USBD_SPEC_OFFSET 0x0004 -#define USBD_STAT_OFFSET 0x0008 -#define USBD_CTRL_OFFSET 0x000c -#define USBD_DADR_OFFSET 0x0010 -#define USBD_DDAT_OFFSET 0x0014 -#define USBD_INTR_OFFSET 0x0018 -#define USBD_MASK_OFFSET 0x001c -#define USBD_ENAB_OFFSET 0x0024 - -#define USBD_EP0_OFFSET 0x0030 -#define USBD_EP1_OFFSET 0x0060 -#define USBD_EP2_OFFSET 0x0090 -#define USBD_EP3_OFFSET 0x00c0 -#define USBD_EP4_OFFSET 0x00f0 -#define USBD_EP5_OFFSET 0x0120 -#define USBD_EP_OFFSET(n) (USBD_EP0_OFFSET + (n)*0x0030) - -#define USBD_EP_STAT_OFFSET 0x0000 -#define USBD_EP_INTR_OFFSET 0x0004 -#define USBD_EP_MASK_OFFSET 0x0008 -#define USBD_EP_FDAT_OFFSET 0x000c -#define USBD_EP_FSTAT_OFFSET 0x0010 -#define USBD_EP_FCTRL_OFFSET 0x0014 -#define USBD_EP_LRFP_OFFSET 0x0018 -#define USBD_EP_LRWP_OFFSET 0x001c -#define USBD_EP_FALRM_OFFSET 0x0020 -#define USBD_EP_FRDP_OFFSET 0x0024 -#define USBD_EP_FRWP_OFFSET 0x0028 - -/* USBD Register Addresses **********************************************************/ - -#define IMX_USBD_FRAME (IMX_USBD_VBASE + USBD_FRAME_OFFSET) -#define IMX_USBD_SPEC (IMX_USBD_VBASE + USBD_SPEC_OFFSET) -#define IMX_USBD_STAT (IMX_USBD_VBASE + USBD_STAT_OFFSET) -#define IMX_USBD_CTRL (IMX_USBD_VBASE + USBD_CTRL_OFFSET) -#define IMX_USBD_DADR (IMX_USBD_VBASE + USBD_DADR_OFFSET) -#define IMX_USBD_DDAT (IMX_USBD_VBASE + USBD_DDAT_OFFSET) -#define IMX_USBD_INTR (IMX_USBD_VBASE + USBD_INTR_OFFSET) -#define IMX_USBD_MASK (IMX_USBD_VBASE + USBD_MASK_OFFSET) -#define IMX_USBD_ENAB (IMX_USBD_VBASE + USBD_ENAB_OFFSET) - -#define IMX_USBD_EP0_BASE (IMX_USBD_VBASE + USBD_EP0_OFFSET) -#define IMX_USBD_EP1_BASE (IMX_USBD_VBASE + USBD_EP1_OFFSET) -#define IMX_USBD_EP2_BASE (IMX_USBD_VBASE + USBD_EP2_OFFSET) -#define IMX_USBD_EP3_BASE (IMX_USBD_VBASE + USBD_EP3_OFFSET) -#define IMX_USBD_EP4_BASE (IMX_USBD_VBASE + USBD_EP4_OFFSET) -#define IMX_USBD_EP5_BASE (IMX_USBD_VBASE + USBD_EP5_OFFSET) -#define IMX_USBD_EP_BASE(n) (IMX_USBD_VBASE + USBD_EP_OFFSET(n)) - -#define IMX_USBD_EP0_STAT (IMX_USBD_EP0_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP0_INTR (IMX_USBD_EP0_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP0_MASK (IMX_USBD_EP0_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP0_FDAT (IMX_USBD_EP0_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP0_FSTAT (IMX_USBD_EP0_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP0_FCTRL (IMX_USBD_EP0_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP0_LRFP (IMX_USBD_EP0_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP0_LRWP (IMX_USBD_EP0_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP0_FALRM (IMX_USBD_EP0_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP0_FRDP (IMX_USBD_EP0_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP0_FRWP (IMX_USBD_EP0_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP1_STAT (IMX_USBD_EP1_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP1_INTR (IMX_USBD_EP1_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP1_MASK (IMX_USBD_EP1_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP1_FDAT (IMX_USBD_EP1_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP1_FSTAT (IMX_USBD_EP1_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP1_FCTRL (IMX_USBD_EP1_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP1_LRFP (IMX_USBD_EP1_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP1_LRWP (IMX_USBD_EP1_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP1_FALRM (IMX_USBD_EP1_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP1_FRDP (IMX_USBD_EP1_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP1_FRWP (IMX_USBD_EP1_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP2_STAT (IMX_USBD_EP2_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP2_INTR (IMX_USBD_EP2_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP2_MASK (IMX_USBD_EP2_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP2_FDAT (IMX_USBD_EP2_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP2_FSTAT (IMX_USBD_EP2_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP2_FCTRL (IMX_USBD_EP2_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP2_LRFP (IMX_USBD_EP2_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP2_LRWP (IMX_USBD_EP2_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP2_FALRM (IMX_USBD_EP2_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP2_FRDP (IMX_USBD_EP2_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP2_FRWP (IMX_USBD_EP2_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP3_STAT (IMX_USBD_EP3_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP3_INTR (IMX_USBD_EP3_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP3_MASK (IMX_USBD_EP3_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP3_FDAT (IMX_USBD_EP3_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP3_FSTAT (IMX_USBD_EP3_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP3_FCTRL (IMX_USBD_EP3_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP3_LRFP (IMX_USBD_EP3_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP3_LRWP (IMX_USBD_EP3_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP3_FALRM (IMX_USBD_EP3_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP3_FRDP (IMX_USBD_EP3_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP3_FRWP (IMX_USBD_EP3_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP4_STAT (IMX_USBD_EP4_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP4_INTR (IMX_USBD_EP4_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP4_MASK (IMX_USBD_EP4_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP4_FDAT (IMX_USBD_EP4_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP4_FSTAT (IMX_USBD_EP4_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP4_FCTRL (IMX_USBD_EP4_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP4_LRFP (IMX_USBD_EP4_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP4_LRWP (IMX_USBD_EP4_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP4_FALRM (IMX_USBD_EP4_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP4_FRDP (IMX_USBD_EP4_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP4_FRWP (IMX_USBD_EP4_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP5_STAT (IMX_USBD_EP5_BASE + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP5_INTR (IMX_USBD_EP5_BASE + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP5_MASK (IMX_USBD_EP5_BASE + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP5_FDAT (IMX_USBD_EP5_BASE + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP5_FSTAT (IMX_USBD_EP5_BASE + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP5_FCTRL (IMX_USBD_EP5_BASE + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP5_LRFP (IMX_USBD_EP5_BASE + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP5_LRWP (IMX_USBD_EP5_BASE + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP5_FALRM (IMX_USBD_EP5_BASE + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP5_FRDP (IMX_USBD_EP5_BASE + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP5_FRWP (IMX_USBD_EP5_BASE + USBD_EP_FRWP_OFFSET) - -#define IMX_USBD_EP_STAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_STAT_OFFSET) -#define IMX_USBD_EP_INTR(n) (IMX_USBD_EP_BASE(n) + USBD_EP_INTR_OFFSET) -#define IMX_USBD_EP_MASK(n) (IMX_USBD_EP_BASE(n) + USBD_EP_MASK_OFFSET) -#define IMX_USBD_EP_FDAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FDAT_OFFSET) -#define IMX_USBD_EP_FSTAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FSTAT_OFFSET) -#define IMX_USBD_EP_FCTRL(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FCTRL_OFFSET) -#define IMX_USBD_EP_LRFP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_LRFP_OFFSET) -#define IMX_USBD_EP_LRWP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_LRWP_OFFSET) -#define IMX_USBD_EP_FALRM(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FALRM_OFFSET) -#define IMX_USBD_EP_FRDP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FRDP_OFFSET) -#define IMX_USBD_EP_FRWP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FRWP_OFFSET) - -/* USBD Register Bit Definitions ****************************************************/ - -/* USBD FRAME Register */ - -#define USBD_FRAME_FRAME_SHIFT 0 /* Bit 0-10: Frame Field */ -#define USBD_FRAME_FRAME_MASK (0x07ff << USBD_FRAME_FRAME_SHIFT) -#define USBD_FRAME_MATCH_SHIFT 16 /* Bit 16-26: Match Field */ -#define USBD_FRAME_MATCH_MASK (0x07ff << USBD_FRAME_MATCH_SHIFT) - -/* USBD STAT Register */ - -#define USBD_STAT_ALTSET_SHIFT 0 /* Bit 0-2: Alternate Setting */ -#define USBD_STAT_ALTSET_MASK (0x07 << USBD_FRAME_MATCH_SHIFT) -#define USBD_STAT_INTF_SHIFT 3 /* Bit 3-4: Interface */ -#define USBD_STAT_INTF_MASK (0x03 << USBD_FRAME_MATCH_SHIFT) -#define USBD_STAT_CFG_SHIFT 5 /* Bit 5-6: Configuration */ -#define USBD_STAT_CFG_MASK (0x03 << USBD_FRAME_MATCH_SHIFT) -#define USBD_STAT_SUSP (1 << 7) /* Bit 7: Suspend */ -#define USBD_STAT_RST (1 << 8) /* Bit 8: Reset Signaling */ - -/* USBD CTRL Register */ - -#define USBD_CTRL_RESUME (1 << 0) /* Bit 0: Resume */ -#define USBD_CTRL_AFEENA (1 << 1) /* Bit 1: Analog Front-End Enable */ -#define USBD_CTRL_UDCRST (1 << 2) /* Bit 2: UDC Reset */ -#define USBD_CTRL_USBENA (1 << 3) /* Bit 3: USB Enable */ -#define USBD_CTRL_USBSPD (1 << 4) /* Bit 4: USB Speed */ -#define USBD_CTRL_CMDERROR (1 << 5) /* Bit 5: Command Error */ -#define USBD_CTRL_CMDOVER (1 << 6) /* Bit 6: Command Over */ - -/* USBD DADR Register */ - -#define USBD_DADR_DADR_SHIFT 0 /* Bit 0-8: Desired RAM Address */ -#define USBD_DADR_DADR_MASK (0x1ff << USBD_DADR_DADR_SHIFT) -#define USBD_DADR_BSY (1 << 30) /* Bit 30: Busy */ -#define USBD_DADR_CFG (1 << 31) /* Bit 31: Configuration */ - -/* USBD DDAT Register */ - -#define USBD_DDAT_DDAT_SHIFT 0 /* Bit 0-7: Descriptor Data Buffer */ -#define USBD_DDAT_DDAT_MASK (0xff << USBD_DDAT_DDAT_SHIFT) - -/* USBD INTR Register */ - -#define USBD_INTR_CFGCHG (1 << 0) /* Bit 0: Configuration Change */ -#define USBD_INTR_FRAMEMATCH (1 << 1) /* Bit 1: FRAME_MATCH */ -#define USBD_INTR_SUSP (1 << 2) /* Bit 2: Active to Suspend */ -#define USBD_INTR_RES (1 << 3) /* Bit 3: Suspend to Resume */ -#define USBD_INTR_RESETSTART (1 << 4) /* Bit 4: Restart Signaling Start */ -#define USBD_INTR_RESETSTOP (1 << 5) /* Bit 5: Restart Signaling Stop */ -#define USBD_INTR_SOF (1 << 6) /* Bit 6: Start-of-Frame Interrupt */ -#define USBD_INTR_MSOF (1 << 7) /* Bit 7: Missed Start-of-Frame Interrupt */ -#define USBD_INTR_WAKEUP (1 << 31) /* Bit 31: Wakeup */ - -/* USBD MASK Register */ - -#define USBD_MASK_CFGCHG (1 << 0) /* Bit 0: Configuration Change */ -#define USBD_MASK_FRAMEMATCH (1 << 1) /* Bit 1: FRAME_MATCH */ -#define USBD_MASK_SUSP (1 << 2) /* Bit 2: Active to Suspend */ -#define USBD_MASK_RES (1 << 3) /* Bit 3: Suspend to Resume */ -#define USBD_MASK_RESETSTART (1 << 4) /* Bit 4: Restart Signaling Start */ -#define USBD_MASK_RESETSTOP (1 << 5) /* Bit 5: Restart Signaling Stop */ -#define USBD_MASK_SOF (1 << 6) /* Bit 6: Start-of-Frame Interrupt */ -#define USBD_MASK_MSOF (1 << 7) /* Bit 7: Missed Start-of-Frame Interrupt */ -#define USBD_MASK_WAKEUP (1 << 31) /* Bit 31: Wakeup */ - -/* USBD ENAB Register */ - -#define USBD_ENAB_PWDMD (1 << 0) /* Bit 0: Power Mode */ -#define USBD_ENAB_ENDIANMODE (1 << 28) /* Bit 28: Endian Mode Select */ -#define USBD_ENAB_SUSPEND (1 << 29) /* Bit 29: Suspend */ -#define USBD_ENAB_ENAB (1 << 30) /* Bit 30: Enable */ -#define USBD_ENAB_RST (1 << 31) /* Bit 31: Reset */ - -/* USBD EPSTAT Register */ - -#define USBD_EPSTAT_FORCESTALL (1 << 0) /* Bit 0: Force a Stall Condition */ -#define USBD_EPSTAT_FLUSH (1 << 1) /* Bit 1: Flush */ -#define USBD_EPSTAT_ZLPS (1 << 2) /* Bit 2: Zero Length Packet Send */ -#define USBD_EPSTAT_TYP_SHIFT 3 /* Bit 3-4: Endpoint Type */ -#define USBD_EPSTAT_TYP_MASK (0x03 << USBD_EPSTAT_TYP_SHIFT) -#define USBD_EPSTAT_MAX_SHIFT 5 /* Bit 5-6: Maximum Packet Size */ -#define USBD_EPSTAT_MAX_MASK (0x03 << USBD_EPSTAT_MAX_SHIFT) -#define USBD_EPSTAT_DIR (1 << 7) /* Bit 7: Transfer Direction */ -#define USBD_EPSTAT_SIP (1 << 8) /* Bit 8: Setup Packet in Progress */ -#define USBD_EPSTAT_BYTECOUNT_SHIFT 16 /* Bit 16-22: Byte Count */ -#define USBD_EPSTAT_BYTECOUNT_MASK (0x7f << USBD_EPSTAT_BYTECOUNT_SHIFT) - -/* USBD EPINTR Register */ - -#define USBD_EPINTR_EOF (1 << 0) /* Bit 0: End-of-Frame */ -#define USBD_EPINTR_DEVREQ (1 << 1) /* Bit 1: Device Request */ -#define USBD_EPINTR_EOT (1 << 2) /* Bit 2: End of Transfer */ -#define USBD_EPINTR_MDEVREQ (1 << 3) /* Bit 3: Multiple Device Request */ -#define USBD_EPINTR_FIFOLOW (1 << 4) /* Bit 4: FIFO Low */ -#define USBD_EPINTR_FIFOHIGH (1 << 5) /* Bit 5: FIFO High */ -#define USBD_EPINTR_FIFOERROR (1 << 6) /* Bit 6: FIFO Error */ -#define USBD_EPINTR_FIFOEMPTY (1 << 7) /* Bit 7: FIFO Empty */ -#define USBD_EPINTR_FIFOFULL (1 << 8) /* Bit 8: FIFO Full */ - -/* USBD EPMASK Register */ - -#define USBD_EPMASK_EOF (1 << 0) /* Bit 0: End-of-Frame */ -#define USBD_EPMASK_DEVREQ (1 << 1) /* Bit 1: Device Request */ -#define USBD_EPMASK_EOT (1 << 2) /* Bit 2: End of Transfer */ -#define USBD_EPMASK_MDEVREQ (1 << 3) /* Bit 3: Multiple Device Request */ -#define USBD_EPMASK_FIFOLOW (1 << 4) /* Bit 4: FIFO Low */ -#define USBD_EPMASK_FIFOHIGH (1 << 5) /* Bit 5: FIFO High */ -#define USBD_EPMASK_FIFOERROR (1 << 6) /* Bit 6: FIFO Error */ -#define USBD_EPMASK_FIFOEMPTY (1 << 7) /* Bit 7: FIFO Empty */ -#define USBD_EPMASK_FIFOFULL (1 << 8) /* Bit 8: FIFO Full */ - -/* USBD EPFSTAT Register */ - -#define USBD_EPFSTAT_EMPTY (1 << 16) /* Bit 16: FIFO Empty */ -#define USBD_EPFSTAT_ALARM (1 << 17) /* Bit 17: FIFO Alarm */ -#define USBD_EPFSTAT_FULL (1 << 18) /* Bit 18: FIFO Full */ -#define USBD_EPFSTAT_FR (1 << 19) /* Bit 19: FIFO Ready */ -#define USBD_EPFSTAT_OF (1 << 20) /* Bit 20: FIFO Overflow */ -#define USBD_EPFSTAT_UF (1 << 21) /* Bit 21: FIFO Underflow */ -#define USBD_EPFSTAT_ERROR (1 << 22) /* Bit 22: FIFO Error */ -#define USBD_EPFSTAT_FRAME3 (1 << 24) /* Bit 24: Frame Status Bit 3 */ -#define USBD_EPFSTAT_FRAME2 (1 << 25) /* Bit 25: Frame Status Bit 2 */ -#define USBD_EPFSTAT_FRAME1 (1 << 26) /* Bit 26: Frame Status Bit 1 */ -#define USBD_EPFSTAT_FRAME0 (1 << 27) /* Bit 27: Frame Status Bit 0 */ - -/* USBD EPFCTRL Register */ - -#define USBD_EPCTRL_GR_SHIFT 24 /* Bit 24-26: Granularity */ -#define USBD_EPCTRL_GR_MASK (0x07 << USBD_EPCTRL_GR_SHIFT) -#define USBD_EPCTRL_FRAME (1 << 27) /* Bit 27: Frame Mode */ -#define USBD_EPCTRL_WFR (1 << 28) /* Bit 29: Write Frame End */ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_USBD_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_usbd.h + * + * Copyright (c) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_USBD_H +#define __ARCH_ARM_IMX_USBD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* USBD Register Offsets ************************************************************/ + +#define USBD_FRAME_OFFSET 0x0000 +#define USBD_SPEC_OFFSET 0x0004 +#define USBD_STAT_OFFSET 0x0008 +#define USBD_CTRL_OFFSET 0x000c +#define USBD_DADR_OFFSET 0x0010 +#define USBD_DDAT_OFFSET 0x0014 +#define USBD_INTR_OFFSET 0x0018 +#define USBD_MASK_OFFSET 0x001c +#define USBD_ENAB_OFFSET 0x0024 + +#define USBD_EP0_OFFSET 0x0030 +#define USBD_EP1_OFFSET 0x0060 +#define USBD_EP2_OFFSET 0x0090 +#define USBD_EP3_OFFSET 0x00c0 +#define USBD_EP4_OFFSET 0x00f0 +#define USBD_EP5_OFFSET 0x0120 +#define USBD_EP_OFFSET(n) (USBD_EP0_OFFSET + (n)*0x0030) + +#define USBD_EP_STAT_OFFSET 0x0000 +#define USBD_EP_INTR_OFFSET 0x0004 +#define USBD_EP_MASK_OFFSET 0x0008 +#define USBD_EP_FDAT_OFFSET 0x000c +#define USBD_EP_FSTAT_OFFSET 0x0010 +#define USBD_EP_FCTRL_OFFSET 0x0014 +#define USBD_EP_LRFP_OFFSET 0x0018 +#define USBD_EP_LRWP_OFFSET 0x001c +#define USBD_EP_FALRM_OFFSET 0x0020 +#define USBD_EP_FRDP_OFFSET 0x0024 +#define USBD_EP_FRWP_OFFSET 0x0028 + +/* USBD Register Addresses **********************************************************/ + +#define IMX_USBD_FRAME (IMX_USBD_VBASE + USBD_FRAME_OFFSET) +#define IMX_USBD_SPEC (IMX_USBD_VBASE + USBD_SPEC_OFFSET) +#define IMX_USBD_STAT (IMX_USBD_VBASE + USBD_STAT_OFFSET) +#define IMX_USBD_CTRL (IMX_USBD_VBASE + USBD_CTRL_OFFSET) +#define IMX_USBD_DADR (IMX_USBD_VBASE + USBD_DADR_OFFSET) +#define IMX_USBD_DDAT (IMX_USBD_VBASE + USBD_DDAT_OFFSET) +#define IMX_USBD_INTR (IMX_USBD_VBASE + USBD_INTR_OFFSET) +#define IMX_USBD_MASK (IMX_USBD_VBASE + USBD_MASK_OFFSET) +#define IMX_USBD_ENAB (IMX_USBD_VBASE + USBD_ENAB_OFFSET) + +#define IMX_USBD_EP0_BASE (IMX_USBD_VBASE + USBD_EP0_OFFSET) +#define IMX_USBD_EP1_BASE (IMX_USBD_VBASE + USBD_EP1_OFFSET) +#define IMX_USBD_EP2_BASE (IMX_USBD_VBASE + USBD_EP2_OFFSET) +#define IMX_USBD_EP3_BASE (IMX_USBD_VBASE + USBD_EP3_OFFSET) +#define IMX_USBD_EP4_BASE (IMX_USBD_VBASE + USBD_EP4_OFFSET) +#define IMX_USBD_EP5_BASE (IMX_USBD_VBASE + USBD_EP5_OFFSET) +#define IMX_USBD_EP_BASE(n) (IMX_USBD_VBASE + USBD_EP_OFFSET(n)) + +#define IMX_USBD_EP0_STAT (IMX_USBD_EP0_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP0_INTR (IMX_USBD_EP0_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP0_MASK (IMX_USBD_EP0_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP0_FDAT (IMX_USBD_EP0_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP0_FSTAT (IMX_USBD_EP0_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP0_FCTRL (IMX_USBD_EP0_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP0_LRFP (IMX_USBD_EP0_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP0_LRWP (IMX_USBD_EP0_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP0_FALRM (IMX_USBD_EP0_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP0_FRDP (IMX_USBD_EP0_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP0_FRWP (IMX_USBD_EP0_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP1_STAT (IMX_USBD_EP1_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP1_INTR (IMX_USBD_EP1_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP1_MASK (IMX_USBD_EP1_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP1_FDAT (IMX_USBD_EP1_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP1_FSTAT (IMX_USBD_EP1_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP1_FCTRL (IMX_USBD_EP1_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP1_LRFP (IMX_USBD_EP1_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP1_LRWP (IMX_USBD_EP1_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP1_FALRM (IMX_USBD_EP1_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP1_FRDP (IMX_USBD_EP1_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP1_FRWP (IMX_USBD_EP1_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP2_STAT (IMX_USBD_EP2_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP2_INTR (IMX_USBD_EP2_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP2_MASK (IMX_USBD_EP2_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP2_FDAT (IMX_USBD_EP2_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP2_FSTAT (IMX_USBD_EP2_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP2_FCTRL (IMX_USBD_EP2_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP2_LRFP (IMX_USBD_EP2_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP2_LRWP (IMX_USBD_EP2_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP2_FALRM (IMX_USBD_EP2_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP2_FRDP (IMX_USBD_EP2_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP2_FRWP (IMX_USBD_EP2_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP3_STAT (IMX_USBD_EP3_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP3_INTR (IMX_USBD_EP3_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP3_MASK (IMX_USBD_EP3_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP3_FDAT (IMX_USBD_EP3_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP3_FSTAT (IMX_USBD_EP3_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP3_FCTRL (IMX_USBD_EP3_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP3_LRFP (IMX_USBD_EP3_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP3_LRWP (IMX_USBD_EP3_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP3_FALRM (IMX_USBD_EP3_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP3_FRDP (IMX_USBD_EP3_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP3_FRWP (IMX_USBD_EP3_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP4_STAT (IMX_USBD_EP4_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP4_INTR (IMX_USBD_EP4_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP4_MASK (IMX_USBD_EP4_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP4_FDAT (IMX_USBD_EP4_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP4_FSTAT (IMX_USBD_EP4_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP4_FCTRL (IMX_USBD_EP4_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP4_LRFP (IMX_USBD_EP4_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP4_LRWP (IMX_USBD_EP4_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP4_FALRM (IMX_USBD_EP4_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP4_FRDP (IMX_USBD_EP4_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP4_FRWP (IMX_USBD_EP4_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP5_STAT (IMX_USBD_EP5_BASE + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP5_INTR (IMX_USBD_EP5_BASE + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP5_MASK (IMX_USBD_EP5_BASE + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP5_FDAT (IMX_USBD_EP5_BASE + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP5_FSTAT (IMX_USBD_EP5_BASE + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP5_FCTRL (IMX_USBD_EP5_BASE + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP5_LRFP (IMX_USBD_EP5_BASE + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP5_LRWP (IMX_USBD_EP5_BASE + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP5_FALRM (IMX_USBD_EP5_BASE + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP5_FRDP (IMX_USBD_EP5_BASE + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP5_FRWP (IMX_USBD_EP5_BASE + USBD_EP_FRWP_OFFSET) + +#define IMX_USBD_EP_STAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_STAT_OFFSET) +#define IMX_USBD_EP_INTR(n) (IMX_USBD_EP_BASE(n) + USBD_EP_INTR_OFFSET) +#define IMX_USBD_EP_MASK(n) (IMX_USBD_EP_BASE(n) + USBD_EP_MASK_OFFSET) +#define IMX_USBD_EP_FDAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FDAT_OFFSET) +#define IMX_USBD_EP_FSTAT(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FSTAT_OFFSET) +#define IMX_USBD_EP_FCTRL(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FCTRL_OFFSET) +#define IMX_USBD_EP_LRFP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_LRFP_OFFSET) +#define IMX_USBD_EP_LRWP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_LRWP_OFFSET) +#define IMX_USBD_EP_FALRM(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FALRM_OFFSET) +#define IMX_USBD_EP_FRDP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FRDP_OFFSET) +#define IMX_USBD_EP_FRWP(n) (IMX_USBD_EP_BASE(n) + USBD_EP_FRWP_OFFSET) + +/* USBD Register Bit Definitions ****************************************************/ + +/* USBD FRAME Register */ + +#define USBD_FRAME_FRAME_SHIFT 0 /* Bit 0-10: Frame Field */ +#define USBD_FRAME_FRAME_MASK (0x07ff << USBD_FRAME_FRAME_SHIFT) +#define USBD_FRAME_MATCH_SHIFT 16 /* Bit 16-26: Match Field */ +#define USBD_FRAME_MATCH_MASK (0x07ff << USBD_FRAME_MATCH_SHIFT) + +/* USBD STAT Register */ + +#define USBD_STAT_ALTSET_SHIFT 0 /* Bit 0-2: Alternate Setting */ +#define USBD_STAT_ALTSET_MASK (0x07 << USBD_FRAME_MATCH_SHIFT) +#define USBD_STAT_INTF_SHIFT 3 /* Bit 3-4: Interface */ +#define USBD_STAT_INTF_MASK (0x03 << USBD_FRAME_MATCH_SHIFT) +#define USBD_STAT_CFG_SHIFT 5 /* Bit 5-6: Configuration */ +#define USBD_STAT_CFG_MASK (0x03 << USBD_FRAME_MATCH_SHIFT) +#define USBD_STAT_SUSP (1 << 7) /* Bit 7: Suspend */ +#define USBD_STAT_RST (1 << 8) /* Bit 8: Reset Signaling */ + +/* USBD CTRL Register */ + +#define USBD_CTRL_RESUME (1 << 0) /* Bit 0: Resume */ +#define USBD_CTRL_AFEENA (1 << 1) /* Bit 1: Analog Front-End Enable */ +#define USBD_CTRL_UDCRST (1 << 2) /* Bit 2: UDC Reset */ +#define USBD_CTRL_USBENA (1 << 3) /* Bit 3: USB Enable */ +#define USBD_CTRL_USBSPD (1 << 4) /* Bit 4: USB Speed */ +#define USBD_CTRL_CMDERROR (1 << 5) /* Bit 5: Command Error */ +#define USBD_CTRL_CMDOVER (1 << 6) /* Bit 6: Command Over */ + +/* USBD DADR Register */ + +#define USBD_DADR_DADR_SHIFT 0 /* Bit 0-8: Desired RAM Address */ +#define USBD_DADR_DADR_MASK (0x1ff << USBD_DADR_DADR_SHIFT) +#define USBD_DADR_BSY (1 << 30) /* Bit 30: Busy */ +#define USBD_DADR_CFG (1 << 31) /* Bit 31: Configuration */ + +/* USBD DDAT Register */ + +#define USBD_DDAT_DDAT_SHIFT 0 /* Bit 0-7: Descriptor Data Buffer */ +#define USBD_DDAT_DDAT_MASK (0xff << USBD_DDAT_DDAT_SHIFT) + +/* USBD INTR Register */ + +#define USBD_INTR_CFGCHG (1 << 0) /* Bit 0: Configuration Change */ +#define USBD_INTR_FRAMEMATCH (1 << 1) /* Bit 1: FRAME_MATCH */ +#define USBD_INTR_SUSP (1 << 2) /* Bit 2: Active to Suspend */ +#define USBD_INTR_RES (1 << 3) /* Bit 3: Suspend to Resume */ +#define USBD_INTR_RESETSTART (1 << 4) /* Bit 4: Restart Signaling Start */ +#define USBD_INTR_RESETSTOP (1 << 5) /* Bit 5: Restart Signaling Stop */ +#define USBD_INTR_SOF (1 << 6) /* Bit 6: Start-of-Frame Interrupt */ +#define USBD_INTR_MSOF (1 << 7) /* Bit 7: Missed Start-of-Frame Interrupt */ +#define USBD_INTR_WAKEUP (1 << 31) /* Bit 31: Wakeup */ + +/* USBD MASK Register */ + +#define USBD_MASK_CFGCHG (1 << 0) /* Bit 0: Configuration Change */ +#define USBD_MASK_FRAMEMATCH (1 << 1) /* Bit 1: FRAME_MATCH */ +#define USBD_MASK_SUSP (1 << 2) /* Bit 2: Active to Suspend */ +#define USBD_MASK_RES (1 << 3) /* Bit 3: Suspend to Resume */ +#define USBD_MASK_RESETSTART (1 << 4) /* Bit 4: Restart Signaling Start */ +#define USBD_MASK_RESETSTOP (1 << 5) /* Bit 5: Restart Signaling Stop */ +#define USBD_MASK_SOF (1 << 6) /* Bit 6: Start-of-Frame Interrupt */ +#define USBD_MASK_MSOF (1 << 7) /* Bit 7: Missed Start-of-Frame Interrupt */ +#define USBD_MASK_WAKEUP (1 << 31) /* Bit 31: Wakeup */ + +/* USBD ENAB Register */ + +#define USBD_ENAB_PWDMD (1 << 0) /* Bit 0: Power Mode */ +#define USBD_ENAB_ENDIANMODE (1 << 28) /* Bit 28: Endian Mode Select */ +#define USBD_ENAB_SUSPEND (1 << 29) /* Bit 29: Suspend */ +#define USBD_ENAB_ENAB (1 << 30) /* Bit 30: Enable */ +#define USBD_ENAB_RST (1 << 31) /* Bit 31: Reset */ + +/* USBD EPSTAT Register */ + +#define USBD_EPSTAT_FORCESTALL (1 << 0) /* Bit 0: Force a Stall Condition */ +#define USBD_EPSTAT_FLUSH (1 << 1) /* Bit 1: Flush */ +#define USBD_EPSTAT_ZLPS (1 << 2) /* Bit 2: Zero Length Packet Send */ +#define USBD_EPSTAT_TYP_SHIFT 3 /* Bit 3-4: Endpoint Type */ +#define USBD_EPSTAT_TYP_MASK (0x03 << USBD_EPSTAT_TYP_SHIFT) +#define USBD_EPSTAT_MAX_SHIFT 5 /* Bit 5-6: Maximum Packet Size */ +#define USBD_EPSTAT_MAX_MASK (0x03 << USBD_EPSTAT_MAX_SHIFT) +#define USBD_EPSTAT_DIR (1 << 7) /* Bit 7: Transfer Direction */ +#define USBD_EPSTAT_SIP (1 << 8) /* Bit 8: Setup Packet in Progress */ +#define USBD_EPSTAT_BYTECOUNT_SHIFT 16 /* Bit 16-22: Byte Count */ +#define USBD_EPSTAT_BYTECOUNT_MASK (0x7f << USBD_EPSTAT_BYTECOUNT_SHIFT) + +/* USBD EPINTR Register */ + +#define USBD_EPINTR_EOF (1 << 0) /* Bit 0: End-of-Frame */ +#define USBD_EPINTR_DEVREQ (1 << 1) /* Bit 1: Device Request */ +#define USBD_EPINTR_EOT (1 << 2) /* Bit 2: End of Transfer */ +#define USBD_EPINTR_MDEVREQ (1 << 3) /* Bit 3: Multiple Device Request */ +#define USBD_EPINTR_FIFOLOW (1 << 4) /* Bit 4: FIFO Low */ +#define USBD_EPINTR_FIFOHIGH (1 << 5) /* Bit 5: FIFO High */ +#define USBD_EPINTR_FIFOERROR (1 << 6) /* Bit 6: FIFO Error */ +#define USBD_EPINTR_FIFOEMPTY (1 << 7) /* Bit 7: FIFO Empty */ +#define USBD_EPINTR_FIFOFULL (1 << 8) /* Bit 8: FIFO Full */ + +/* USBD EPMASK Register */ + +#define USBD_EPMASK_EOF (1 << 0) /* Bit 0: End-of-Frame */ +#define USBD_EPMASK_DEVREQ (1 << 1) /* Bit 1: Device Request */ +#define USBD_EPMASK_EOT (1 << 2) /* Bit 2: End of Transfer */ +#define USBD_EPMASK_MDEVREQ (1 << 3) /* Bit 3: Multiple Device Request */ +#define USBD_EPMASK_FIFOLOW (1 << 4) /* Bit 4: FIFO Low */ +#define USBD_EPMASK_FIFOHIGH (1 << 5) /* Bit 5: FIFO High */ +#define USBD_EPMASK_FIFOERROR (1 << 6) /* Bit 6: FIFO Error */ +#define USBD_EPMASK_FIFOEMPTY (1 << 7) /* Bit 7: FIFO Empty */ +#define USBD_EPMASK_FIFOFULL (1 << 8) /* Bit 8: FIFO Full */ + +/* USBD EPFSTAT Register */ + +#define USBD_EPFSTAT_EMPTY (1 << 16) /* Bit 16: FIFO Empty */ +#define USBD_EPFSTAT_ALARM (1 << 17) /* Bit 17: FIFO Alarm */ +#define USBD_EPFSTAT_FULL (1 << 18) /* Bit 18: FIFO Full */ +#define USBD_EPFSTAT_FR (1 << 19) /* Bit 19: FIFO Ready */ +#define USBD_EPFSTAT_OF (1 << 20) /* Bit 20: FIFO Overflow */ +#define USBD_EPFSTAT_UF (1 << 21) /* Bit 21: FIFO Underflow */ +#define USBD_EPFSTAT_ERROR (1 << 22) /* Bit 22: FIFO Error */ +#define USBD_EPFSTAT_FRAME3 (1 << 24) /* Bit 24: Frame Status Bit 3 */ +#define USBD_EPFSTAT_FRAME2 (1 << 25) /* Bit 25: Frame Status Bit 2 */ +#define USBD_EPFSTAT_FRAME1 (1 << 26) /* Bit 26: Frame Status Bit 1 */ +#define USBD_EPFSTAT_FRAME0 (1 << 27) /* Bit 27: Frame Status Bit 0 */ + +/* USBD EPFCTRL Register */ + +#define USBD_EPCTRL_GR_SHIFT 24 /* Bit 24-26: Granularity */ +#define USBD_EPCTRL_GR_MASK (0x07 << USBD_EPCTRL_GR_SHIFT) +#define USBD_EPCTRL_FRAME (1 << 27) /* Bit 27: Frame Mode */ +#define USBD_EPCTRL_WFR (1 << 28) /* Bit 29: Write Frame End */ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_USBD_H */ diff --git a/nuttx/arch/arm/src/imx/imx_wdog.h b/nuttx/arch/arm/src/imx/imx_wdog.h index 137e677541..4ee6438b36 100755 --- a/nuttx/arch/arm/src/imx/imx_wdog.h +++ b/nuttx/arch/arm/src/imx/imx_wdog.h @@ -1,81 +1,81 @@ -/************************************************************************************ - * arch/arm/src/imx/imx_wdog.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_IMX_WDOG_H -#define __ARCH_ARM_IMX_WDOG_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* WDOG Register Offsets ************************************************************/ - -#define WDOG_WCR_OFFSET 0x0000 /* Watchdog Control Register */ -#define WDOG_WSR_OFFSET 0x0004 /* Watchdog Service Register */ -#define WDOG_WSTR_OFFSET 0x0008 /* Watchdog Status Register */ - -/* WDOG Register Addresses **********************************************************/ - -#define IMX_WDOG_WCR (IMX_WDOG_VBASE + WDOG_WCR_OFFSET) -#define IMX_WDOG_WSR (IMX_WDOG_VBASE + WDOG_WSR_OFFSET) -#define IMX_WDOG_WSTRT (IMX_WDOG_VBASE + WDOG_WSTR_OFFSET) - -/* WDOG Register Bit Definitions ****************************************************/ - -/* Watchdog Control Register */ - -#define WDOG_WCR_WDE (1 << 0) /* Bit 0: Watchdog Enable */ -#define WDOG_WCR_WDEC (1 << 1) /* Bit 1: Watchdog Enable Control */ -#define WDOG_WCR_SWR (1 << 2) /* Bit 2: Software Reset Enable */ -#define WDOG_WCR_TMD (1 << 3) /* Bit 3: Test Mode Enable */ -#define WDOG_WCR_WIE (1 << 4) /* Bit 4: Watchdog Interrupt Enable */ -#define WDOG_WCR_WT_SHIFT 8 /* Bit 8-14: Watchdog Timeout */ -#define WDOG_WCR_WT_MASK (0x7f << WDOG_WCR_WT_SHIFT) -#define WDOG_WCR_WHALT (1 << 15) /* Bit 15: Watchdog Halt */ - -/* Watchdog Service Register */ - -#define WDOG_WSR_SHIFT 0 /* Bit 0-15: Watchdog Service Register */ -#define WDOG_WT_MASK (0xffff << WDOG_WSR_SHIFT) - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_IMX_WDOG_H */ +/************************************************************************************ + * arch/arm/src/imx/imx_wdog.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX_WDOG_H +#define __ARCH_ARM_IMX_WDOG_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* WDOG Register Offsets ************************************************************/ + +#define WDOG_WCR_OFFSET 0x0000 /* Watchdog Control Register */ +#define WDOG_WSR_OFFSET 0x0004 /* Watchdog Service Register */ +#define WDOG_WSTR_OFFSET 0x0008 /* Watchdog Status Register */ + +/* WDOG Register Addresses **********************************************************/ + +#define IMX_WDOG_WCR (IMX_WDOG_VBASE + WDOG_WCR_OFFSET) +#define IMX_WDOG_WSR (IMX_WDOG_VBASE + WDOG_WSR_OFFSET) +#define IMX_WDOG_WSTRT (IMX_WDOG_VBASE + WDOG_WSTR_OFFSET) + +/* WDOG Register Bit Definitions ****************************************************/ + +/* Watchdog Control Register */ + +#define WDOG_WCR_WDE (1 << 0) /* Bit 0: Watchdog Enable */ +#define WDOG_WCR_WDEC (1 << 1) /* Bit 1: Watchdog Enable Control */ +#define WDOG_WCR_SWR (1 << 2) /* Bit 2: Software Reset Enable */ +#define WDOG_WCR_TMD (1 << 3) /* Bit 3: Test Mode Enable */ +#define WDOG_WCR_WIE (1 << 4) /* Bit 4: Watchdog Interrupt Enable */ +#define WDOG_WCR_WT_SHIFT 8 /* Bit 8-14: Watchdog Timeout */ +#define WDOG_WCR_WT_MASK (0x7f << WDOG_WCR_WT_SHIFT) +#define WDOG_WCR_WHALT (1 << 15) /* Bit 15: Watchdog Halt */ + +/* Watchdog Service Register */ + +#define WDOG_WSR_SHIFT 0 /* Bit 0-15: Watchdog Service Register */ +#define WDOG_WT_MASK (0xffff << WDOG_WSR_SHIFT) + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX_WDOG_H */ diff --git a/nuttx/arch/arm/src/kinetis/Make.defs b/nuttx/arch/arm/src/kinetis/Make.defs index 2b978b6b50..22d066828b 100644 --- a/nuttx/arch/arm/src/kinetis/Make.defs +++ b/nuttx/arch/arm/src/kinetis/Make.defs @@ -2,7 +2,7 @@ # arch/arm/src/kinetis/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/chip.h b/nuttx/arch/arm/src/kinetis/chip.h index 253562a06e..6ad781c208 100644 --- a/nuttx/arch/arm/src/kinetis/chip.h +++ b/nuttx/arch/arm/src/kinetis/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/chip.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_adc.h b/nuttx/arch/arm/src/kinetis/kinetis_adc.h index 47bbdbd706..a17aa06c7f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_adc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_adc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_adc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_aips.h b/nuttx/arch/arm/src/kinetis/kinetis_aips.h index 6e04401476..8f460567f7 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_aips.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_aips.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_aips.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_axbs.h b/nuttx/arch/arm/src/kinetis/kinetis_axbs.h index 4a51360053..bf8543d4da 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_axbs.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_axbs.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_axbs.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_clockconfig.c b/nuttx/arch/arm/src/kinetis/kinetis_clockconfig.c index f167a0328a..31ea235d2c 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_clockconfig.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_clockconfig.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/kinetis_clockconfig.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_clrpend.c b/nuttx/arch/arm/src/kinetis/kinetis_clrpend.c index 98997bf2ed..2837d867f3 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_clrpend.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_clrpend.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/kinetis_clrpend.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_cmp.h b/nuttx/arch/arm/src/kinetis/kinetis_cmp.h index 207d861972..822b7a339f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_cmp.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_cmp.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_cmp.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_cmt.h b/nuttx/arch/arm/src/kinetis/kinetis_cmt.h index 34cd121772..c3c47bb676 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_cmt.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_cmt.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_cmt.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_config.h b/nuttx/arch/arm/src/kinetis/kinetis_config.h index 025ebc7a85..4faa90ce7d 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_config.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_config.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_config.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_crc.h b/nuttx/arch/arm/src/kinetis/kinetis_crc.h index 88e20f64c0..7b590cf3a9 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_crc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_crc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_crc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_dac.h b/nuttx/arch/arm/src/kinetis/kinetis_dac.h index fbc2fd6973..5c3b5c0c03 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_dac.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_dac.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_dac.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_dma.h b/nuttx/arch/arm/src/kinetis/kinetis_dma.h index efe586345a..9876a46a0f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_dma.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_dma.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_dma.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_dmamux.h b/nuttx/arch/arm/src/kinetis/kinetis_dmamux.h index 0db25305d0..b83579180e 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_dmamux.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_dmamux.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_dmamux.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_dspi.h b/nuttx/arch/arm/src/kinetis/kinetis_dspi.h index a2ead5852c..e682ef23e8 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_dspi.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_dspi.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_dspi.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_enet.h b/nuttx/arch/arm/src/kinetis/kinetis_enet.h index d610f15c3a..0a5e78ea92 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_enet.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_enet.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_enet.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_ewm.h b/nuttx/arch/arm/src/kinetis/kinetis_ewm.h index 4e6113e817..e259a3cf29 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_ewm.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_ewm.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_ewm.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_flexbus.h b/nuttx/arch/arm/src/kinetis/kinetis_flexbus.h index e4936949ad..37992320fb 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_flexbus.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_flexbus.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_flexbus.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_flexcan.h b/nuttx/arch/arm/src/kinetis/kinetis_flexcan.h index f129c95773..db151d5403 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_flexcan.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_flexcan.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_flexcan.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_fmc.h b/nuttx/arch/arm/src/kinetis/kinetis_fmc.h index 2a318e3dec..66f3a39092 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_fmc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_fmc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_fmc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_ftfl.h b/nuttx/arch/arm/src/kinetis/kinetis_ftfl.h index 27746ab023..92e53b650d 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_ftfl.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_ftfl.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_ftfl.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_ftm.h b/nuttx/arch/arm/src/kinetis/kinetis_ftm.h index a318ddfeeb..52f782855b 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_ftm.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_ftm.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_ftm.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_gpio.h b/nuttx/arch/arm/src/kinetis/kinetis_gpio.h index 8a87aa72aa..1d3d10553f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_gpio.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_gpio.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_gpio.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_i2c.h b/nuttx/arch/arm/src/kinetis/kinetis_i2c.h index 353882eff2..bee9ef92db 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_i2c.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_i2c.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_i2c.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_i2s.h b/nuttx/arch/arm/src/kinetis/kinetis_i2s.h index f69aa85436..11bcc09955 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_i2s.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_i2s.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_i2s.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_idle.c b/nuttx/arch/arm/src/kinetis/kinetis_idle.c index 8fc914f3f4..bcf8218cb4 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_idle.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_idle.c @@ -1,104 +1,104 @@ -/**************************************************************************** - * arch/arm/src/kinetis/kinetis_idle.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include -#include "up_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Does the board support an IDLE LED to indicate that the board is in the - * IDLE state? - */ - -#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE) -# define BEGIN_IDLE() up_ledon(LED_IDLE) -# define END_IDLE() up_ledoff(LED_IDLE) -#else -# define BEGIN_IDLE() -# define END_IDLE() -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_idle - * - * Description: - * up_idle() is the logic that will be executed when their is no other - * ready-to-run task. This is processor idle time and will continue until - * some interrupt occurs to cause a context switch from the idle task. - * - * Processing in this state may be processor-specific. e.g., this is where - * power management operations might be performed. - * - ****************************************************************************/ - -void up_idle(void) -{ -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS) - /* If the system is idle and there are no timer interrupts, then process - * "fake" timer interrupts. Hopefully, something will wake up. - */ - - sched_process_timer(); -#else - - /* Sleep until an interrupt occurs to save power */ - - BEGIN_IDLE(); - asm("WFI"); - END_IDLE(); -#endif -} - +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_idle.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include +#include "up_internal.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Does the board support an IDLE LED to indicate that the board is in the + * IDLE state? + */ + +#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE) +# define BEGIN_IDLE() up_ledon(LED_IDLE) +# define END_IDLE() up_ledoff(LED_IDLE) +#else +# define BEGIN_IDLE() +# define END_IDLE() +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_idle + * + * Description: + * up_idle() is the logic that will be executed when their is no other + * ready-to-run task. This is processor idle time and will continue until + * some interrupt occurs to cause a context switch from the idle task. + * + * Processing in this state may be processor-specific. e.g., this is where + * power management operations might be performed. + * + ****************************************************************************/ + +void up_idle(void) +{ +#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS) + /* If the system is idle and there are no timer interrupts, then process + * "fake" timer interrupts. Hopefully, something will wake up. + */ + + sched_process_timer(); +#else + + /* Sleep until an interrupt occurs to save power */ + + BEGIN_IDLE(); + asm("WFI"); + END_IDLE(); +#endif +} + diff --git a/nuttx/arch/arm/src/kinetis/kinetis_internal.h b/nuttx/arch/arm/src/kinetis/kinetis_internal.h index c050326788..8d7baaaf1b 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_internal.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_internal.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_irq.c b/nuttx/arch/arm/src/kinetis/kinetis_irq.c index 308afcb974..6fb58c6bf9 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_irq.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/kinetis_irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_k40pinmux.h b/nuttx/arch/arm/src/kinetis/kinetis_k40pinmux.h index 13a4da4213..9798eda6be 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_k40pinmux.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_k40pinmux.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_k40pinmux.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_k60pinmux.h b/nuttx/arch/arm/src/kinetis/kinetis_k60pinmux.h index dee0d15d67..2c77dd4ba7 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_k60pinmux.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_k60pinmux.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_k60pinset.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_llwu.h b/nuttx/arch/arm/src/kinetis/kinetis_llwu.h index 60fa2fed74..4324a76251 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_llwu.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_llwu.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_llwu.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c b/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c index 96d9d69897..f52d3ba35c 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_lowputc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_lptmr.h b/nuttx/arch/arm/src/kinetis/kinetis_lptmr.h index 42e251f301..863b24108e 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_lptmr.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_lptmr.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_lptmr.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_mcg.h b/nuttx/arch/arm/src/kinetis/kinetis_mcg.h index 6f0ba652cc..60f13cd2a0 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_mcg.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_mcg.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_mcg.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_mcm.h b/nuttx/arch/arm/src/kinetis/kinetis_mcm.h index 8424587aac..d899b77027 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_mcm.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_mcm.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_mcm.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_memorymap.h b/nuttx/arch/arm/src/kinetis/kinetis_memorymap.h index be0b229543..7253717bd2 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_memorymap.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_memorymap.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_mmcau.h b/nuttx/arch/arm/src/kinetis/kinetis_mmcau.h index f1ba0e7690..7468a1d0bf 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_mmcau.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_mmcau.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_mmcau.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_mpu.h b/nuttx/arch/arm/src/kinetis/kinetis_mpu.h index 9db2570b9d..f2b1bf9143 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_mpu.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_mpu.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_mpu.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_osc.h b/nuttx/arch/arm/src/kinetis/kinetis_osc.h index fef1e0ae71..16efcf3282 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_osc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_osc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_osc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pdb.h b/nuttx/arch/arm/src/kinetis/kinetis_pdb.h index 525efc7388..9cfab9b99f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pdb.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_pdb.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pdb.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pin.c b/nuttx/arch/arm/src/kinetis/kinetis_pin.c index cdd9e19c1e..43bfae61ef 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pin.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_pin.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pin.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pindma.c b/nuttx/arch/arm/src/kinetis/kinetis_pindma.c index 00d9a07e69..91132a6a74 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pindma.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_pindma.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pindma.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pingpio.c b/nuttx/arch/arm/src/kinetis/kinetis_pingpio.c index 23829c6d7e..fe25f0df0f 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pingpio.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_pingpio.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pingpio.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pinirq.c b/nuttx/arch/arm/src/kinetis/kinetis_pinirq.c index 1ed9092e28..537e7be9f2 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pinirq.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_pinirq.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pinirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pinmux.h b/nuttx/arch/arm/src/kinetis/kinetis_pinmux.h index 04d956e4ea..9c791539f6 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pinmux.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_pinmux.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pinmux.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pit.h b/nuttx/arch/arm/src/kinetis/kinetis_pit.h index 6771f63109..808508f8fe 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pit.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_pit.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pit.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_pmc.h b/nuttx/arch/arm/src/kinetis/kinetis_pmc.h index 2525a936c7..065847da3d 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_pmc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_pmc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_pmc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_port.h b/nuttx/arch/arm/src/kinetis/kinetis_port.h index 2f72f48743..a256fc5c65 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_port.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_port.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_port.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_rngb.h b/nuttx/arch/arm/src/kinetis/kinetis_rngb.h index f55b37843e..a4f6775550 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_rngb.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_rngb.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_rngb.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_rtc.h b/nuttx/arch/arm/src/kinetis/kinetis_rtc.h index 2a3c57e59d..69c097a7c9 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_rtc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_rtc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_rtc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_sdhc.h b/nuttx/arch/arm/src/kinetis/kinetis_sdhc.h index cf96faabec..5d122315a9 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_sdhc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_sdhc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_sdhc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_sim.h b/nuttx/arch/arm/src/kinetis/kinetis_sim.h index bdbf4dc026..aad17e923e 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_sim.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_sim.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_sim.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_slcd.h b/nuttx/arch/arm/src/kinetis/kinetis_slcd.h index 6849af423c..d56ee5c41e 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_slcd.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_slcd.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_slcd.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_smc.h b/nuttx/arch/arm/src/kinetis/kinetis_smc.h index b596164b05..213ea80775 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_smc.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_smc.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_smc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_timerisr.c b/nuttx/arch/arm/src/kinetis/kinetis_timerisr.c index 62758ee9c3..9f9f14ba6c 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_timerisr.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_tsi.h b/nuttx/arch/arm/src/kinetis/kinetis_tsi.h index df96a0d8c7..5e1dd9976b 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_tsi.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_tsi.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_tsi.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_uart.h b/nuttx/arch/arm/src/kinetis/kinetis_uart.h index 2983aaf0db..fbdf7a3192 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_uart.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_uart.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_uart.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_usbdcd.h b/nuttx/arch/arm/src/kinetis/kinetis_usbdcd.h index cfbb28a97e..fad76d1500 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_usbdcd.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_usbdcd.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_usbdcd.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_usbotg.h b/nuttx/arch/arm/src/kinetis/kinetis_usbotg.h index 9219398e79..127c718312 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_usbotg.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_usbotg.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_usbotg.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_vectors.S b/nuttx/arch/arm/src/kinetis/kinetis_vectors.S index ff252c91a1..faa1ce7a78 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_vectors.S +++ b/nuttx/arch/arm/src/kinetis/kinetis_vectors.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/kinetis_vectors.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_vrefv1.h b/nuttx/arch/arm/src/kinetis/kinetis_vrefv1.h index 01789e2125..ed9a1ff95c 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_vrefv1.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_vrefv1.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_vrefv1.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/kinetis/kinetis_wdog.c b/nuttx/arch/arm/src/kinetis/kinetis_wdog.c index 9ba49306fa..19b6b1d59b 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_wdog.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_wdog.c @@ -1,117 +1,117 @@ -/**************************************************************************** - * arch/arm/src/kinetis/kinetis_wdog.c - * arch/arm/src/chip/kinetis_wdog.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include "up_arch.h" -#include "kinetis_internal.h" -#include "kinetis_wdog.h" - -/**************************************************************************** - * Private Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: kinetis_wdunlock - * - * Description: - * Watchdog timer unlock routine. Writing 0xc520 followed by 0xd928 will - * unlock the write once registers in the WDOG so they are writable - * within the WCT period. - * - ****************************************************************************/ - -static void kinetis_wdunlock(void) -{ - irqstate_t flags; - - /* This sequence must execute within 20 clock cycles. Disable interrupts - * to assure that the following steps are atomic. - */ - - flags = irqsave(); - - /* Write 0xC520 followed by 0xD928 to the unlock register */ - - putreg16(0xc520, KINETIS_WDOG_UNLOCK); - putreg16(0xd928, KINETIS_WDOG_UNLOCK); - irqrestore(flags); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: kinetis_wddisable - * - * Description: - * Disable the watchdog timer - * - ****************************************************************************/ - -void kinetis_wddisable(void) -{ - uint16_t regval; - - /* Unlock the watchdog so that we can write to registers */ - - kinetis_wdunlock(); - - /* Clear the WDOGEN bit to disable the watchdog */ - - regval = getreg16(KINETIS_WDOG_STCTRLH); - regval &= ~WDOG_STCTRLH_WDOGEN; - putreg16(regval, KINETIS_WDOG_STCTRLH); -} +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_wdog.c + * arch/arm/src/chip/kinetis_wdog.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include "up_arch.h" +#include "kinetis_internal.h" +#include "kinetis_wdog.h" + +/**************************************************************************** + * Private Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_wdunlock + * + * Description: + * Watchdog timer unlock routine. Writing 0xc520 followed by 0xd928 will + * unlock the write once registers in the WDOG so they are writable + * within the WCT period. + * + ****************************************************************************/ + +static void kinetis_wdunlock(void) +{ + irqstate_t flags; + + /* This sequence must execute within 20 clock cycles. Disable interrupts + * to assure that the following steps are atomic. + */ + + flags = irqsave(); + + /* Write 0xC520 followed by 0xD928 to the unlock register */ + + putreg16(0xc520, KINETIS_WDOG_UNLOCK); + putreg16(0xd928, KINETIS_WDOG_UNLOCK); + irqrestore(flags); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_wddisable + * + * Description: + * Disable the watchdog timer + * + ****************************************************************************/ + +void kinetis_wddisable(void) +{ + uint16_t regval; + + /* Unlock the watchdog so that we can write to registers */ + + kinetis_wdunlock(); + + /* Clear the WDOGEN bit to disable the watchdog */ + + regval = getreg16(KINETIS_WDOG_STCTRLH); + regval &= ~WDOG_STCTRLH_WDOGEN; + putreg16(regval, KINETIS_WDOG_STCTRLH); +} diff --git a/nuttx/arch/arm/src/kinetis/kinetis_wdog.h b/nuttx/arch/arm/src/kinetis/kinetis_wdog.h index 0432802b7c..326c2cf628 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_wdog.h +++ b/nuttx/arch/arm/src/kinetis/kinetis_wdog.h @@ -2,7 +2,7 @@ * arch/arm/src/kinetis/kinetis_wdog.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/Make.defs b/nuttx/arch/arm/src/lm3s/Make.defs index 01fceaaa8b..574526f181 100644 --- a/nuttx/arch/arm/src/lm3s/Make.defs +++ b/nuttx/arch/arm/src/lm3s/Make.defs @@ -2,7 +2,7 @@ # arch/arm/src/lm3s/Make.defs # # Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/chip.h b/nuttx/arch/arm/src/lm3s/chip.h index 7be4cba516..1e22f6221c 100644 --- a/nuttx/arch/arm/src/lm3s/chip.h +++ b/nuttx/arch/arm/src/lm3s/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/chip.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_dumpgpio.c b/nuttx/arch/arm/src/lm3s/lm3s_dumpgpio.c index 631fc7e803..334a3930f9 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_dumpgpio.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_dumpgpio.c @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_dumpgpio.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_ethernet.c b/nuttx/arch/arm/src/lm3s/lm3s_ethernet.c index be38a7b26a..f7bbedb20c 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_ethernet.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_ethernet.c @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_ethernet.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_flash.h b/nuttx/arch/arm/src/lm3s/lm3s_flash.h index 53b0e685aa..83e3889214 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_flash.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_flash.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_flash.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_gpio.c b/nuttx/arch/arm/src/lm3s/lm3s_gpio.c index a57b792ab2..c345d113c6 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_gpio.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_gpio.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lm3s_gpio.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_gpio.h b/nuttx/arch/arm/src/lm3s/lm3s_gpio.h index 4b04569130..0666664329 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_gpio.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_gpio.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_gpio.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_i2c.h b/nuttx/arch/arm/src/lm3s/lm3s_i2c.h index f306328e35..a5f0567b98 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_i2c.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_i2c.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_i2c.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_internal.h b/nuttx/arch/arm/src/lm3s/lm3s_internal.h index 2ecc9c14af..9bfd67a5e4 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_internal.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_internal.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_internal.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_irq.c b/nuttx/arch/arm/src/lm3s/lm3s_irq.c index d129f50cf0..aa0ed6c879 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_irq.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lm3s_irq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c index 81e312cf14..69ac56a9d3 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_lowputc.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_memorymap.h b/nuttx/arch/arm/src/lm3s/lm3s_memorymap.h index 0bc420ff1f..be0d8b58d7 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_memorymap.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_memorymap.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_ssi.c b/nuttx/arch/arm/src/lm3s/lm3s_ssi.c index 3b6abab2c9..c756e2b6ad 100755 --- a/nuttx/arch/arm/src/lm3s/lm3s_ssi.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_ssi.c @@ -2,7 +2,7 @@ * arch/arm/src/lm32/lm3s_ssi.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_ssi.h b/nuttx/arch/arm/src/lm3s/lm3s_ssi.h index 10832dda11..482dab3269 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_ssi.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_ssi.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_ssi.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.c b/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.c index bd67a6ae19..e26789d32f 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lm3s_syscontrol.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.h b/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.h index 773d3338f8..c59b921c48 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_syscontrol.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_syscontrol.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_timerisr.c b/nuttx/arch/arm/src/lm3s/lm3s_timerisr.c index ad5aa279de..4d42af5971 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_timerisr.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_uart.h b/nuttx/arch/arm/src/lm3s/lm3s_uart.h index f807f0a2a9..91bfb2266a 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_uart.h +++ b/nuttx/arch/arm/src/lm3s/lm3s_uart.h @@ -2,7 +2,7 @@ * arch/arm/src/lm3s/lm3s_uart.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lm3s/lm3s_vectors.S b/nuttx/arch/arm/src/lm3s/lm3s_vectors.S index 518685f42e..71db122a0d 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_vectors.S +++ b/nuttx/arch/arm/src/lm3s/lm3s_vectors.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/lm3s_vectors.S * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/chip.h b/nuttx/arch/arm/src/lpc17xx/chip.h index ab671cf6d3..9824820175 100644 --- a/nuttx/arch/arm/src/lpc17xx/chip.h +++ b/nuttx/arch/arm/src/lpc17xx/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/chip.h * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_clockconfig.c b/nuttx/arch/arm/src/lpc17xx/lpc17_clockconfig.c index 7f41371bf8..635090e9f1 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_clockconfig.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_clockconfig.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lpc17_clockconfig.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_clrpend.c b/nuttx/arch/arm/src/lpc17xx/lpc17_clrpend.c index d8f27e4db1..242f7ac4ff 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_clrpend.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_clrpend.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/lpc17_clrpend.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_dac.h b/nuttx/arch/arm/src/lpc17xx/lpc17_dac.h index e1e7c1b40c..a35e16eae4 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_dac.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_dac.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/lpc17_dac.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_emacram.h b/nuttx/arch/arm/src/lpc17xx/lpc17_emacram.h index 3561b72ba8..700ad7ec32 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_emacram.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_emacram.h @@ -1,242 +1,242 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_emacram.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Default, no-EMAC Case ************************************************************/ -/* Assume that all of AHB SRAM will be available for heap. If this is not true, then - * LPC17_BANK0_HEAPSIZE will be undefined and redefined below. - */ - -#undef LPC17_BANK0_HEAPBASE -#undef LPC17_BANK0_HEAPSIZE -#ifdef LPC17_HAVE_BANK0 -# define LPC17_BANK0_HEAPBASE LPC17_SRAM_BANK0 -# define LPC17_BANK0_HEAPSIZE LPC17_BANK0_SIZE -#endif - -/* Is networking enabled? Is the LPC17xx Ethernet device enabled? Does this chip have - * and Ethernet controlloer? Yes... then we will replace the above default definitions. - */ - -#if defined(CONFIG_NET) && defined(CONFIG_LPC17_ETHERNET) && LPC17_NETHCONTROLLERS > 0 - -/* EMAC RAM Configuration ***********************************************************/ -/* Is AHB SRAM available? */ - -#ifndef LPC17_HAVE_BANK0 -# error "AHB SRAM Bank0 is not available for EMAC RAM" -#endif - -/* Number of Tx descriptors */ - -#ifndef CONFIG_NET_NTXDESC -# define CONFIG_NET_NTXDESC 18 -#endif - -/* Number of Rx descriptors */ - -#ifndef CONFIG_NET_NRXDESC -# define CONFIG_NET_NRXDESC 18 -#endif - -/* Size of the region at the beginning of AHB SRAM 0 set set aside for the EMAC. - * This size must fit within AHB SRAM Bank 0 and also be a multiple of 32-bit - * words. - */ - -#ifndef CONFIG_NET_EMACRAM_SIZE -# define CONFIG_NET_EMACRAM_SIZE LPC17_BANK0_SIZE -#endif - -#if CONFIG_NET_EMACRAM_SIZE > LPC17_BANK0_SIZE -# error "EMAC RAM size cannot exceed the size of AHB SRAM Bank 0" -#endif - -#if (CONFIG_NET_EMACRAM_SIZE & 3) != 0 -# error "EMAC RAM size must be in multiples of 32-bit words" -#endif - -/* Determine is there is any meaningful space left at the end of AHB Bank 0 that - * could be added to the heap. - */ - -#undef LPC17_BANK0_HEAPBASE -#undef LPC17_BANK0_HEAPSIZE -#if CONFIG_NET_EMACRAM_SIZE < (LPC17_BANK0_SIZE-128) -# define LPC17_BANK0_HEAPBASE (LPC17_SRAM_BANK0 + CONFIG_NET_EMACRAM_SIZE) -# define LPC17_BANK0_HEAPSIZE (LPC17_BANK0_SIZE - CONFIG_NET_EMACRAM_SIZE) -#endif - -/* Memory at the beginning of AHB SRAM, Bank 0 is set aside for EMAC Tx and Rx - * descriptors. The position is not controllable, only the size of the region - * is controllable. - */ - -#define LPC17_EMACRAM_BASE LPC17_SRAM_BANK0 -#define LPC17_EMACRAM_SIZE CONFIG_NET_EMACRAM_SIZE - -/* Descriptor Memory Layout *********************************************************/ -/* EMAC DMA RAM and descriptor definitions. The configured number of descriptors - * will determine the organization and the size of the descriptor and status tables. - * There is a complex interaction between the maximum packet size (CONFIG_NET_BUFSIZE) - * and the number of Rx and Tx descriptors that can be suppored (CONFIG_NET_NRXDESC - * and CONFIG_NET_NTXDESC): Small buffers -> more packets. This is something that - * needs to be tuned for you system. - * - * For a 16Kb SRAM region, here is the relationship: - * - * 16384 <= ntx * (pktsize + 8 + 4) + nrx * (pktsize + 8 + 8) - * - * If ntx == nrx and pktsize == 424, then you could have - * ntx = nrx = 18. - * - * An example with all of the details: - * - * NTXDESC=18 NRXDESC=18 CONFIG_NET_EMACRAM_SIZE=16Kb CONFIG_NET_BUFSIZE=420: - * LPC17_TXDESCTAB_SIZE = 18*8 = 144 - * LPC17_TXSTATTAB_SIZE = 18*4 = 72 - * LPC17_TXTAB_SIZE = 216 - * - * LPC17_RXDESCTAB_SIZE = 16*8 = 144 - * LPC17_RXSTATTAB_SIZE = 16*8 = 144 - * LPC17_TXTAB_SIZE = 288 - * - * LPC17_DESCTAB_SIZE = 504 - * LPC17_DESC_BASE = LPC17_SRAM_BANK0 + 0x00004000 - 504 - * = LPC17_SRAM_BANK0 + 0x00003e08 - * LPC17_TXDESC_BASE = LPC17_SRAM_BANK0 + 0x00003e08 - * LPC17_TXSTAT_BASE = LPC17_SRAM_BANK0 + 0x00003e98 - * LPC17_RXDESC_BASE = LPC17_SRAM_BANK0 + 0x00003ee0 - * LPC17_RXSTAT_BASE = LPC17_SRAM_BANK0 + 0x00003f70 - * - * LPC17_PKTMEM_BASE = LPC17_SRAM_BANK0 - * LPC17_PKTMEM_SIZE = 0x00004000-504 = 0x00003e40 - * LPC17_PKTMEM_END = LPC17_SRAM_BANK0 + 0x00003e08 - - * LPC17_MAXPACKET_SIZE = ((420 + 3 + 2) & ~3) = 424 - * LPC17_NTXPKTS = 18 - * LPC17_NRXPKTS = 18 - - * LPC17_TXBUFFER_SIZE = 18 * 424 = 0x00001dd0 - * LPC17_RXBUFFER_SIZE = 18 * 424 = 0x00001dd0 - * LPC17_BUFFER_SIZE = 0x00003ba0 - - * LPC17_BUFFER_BASE = LPC17_SRAM_BANK0 - * LPC17_TXBUFFER_BASE = LPC17_SRAM_BANK0 - * LPC17_RXBUFFER_BASE = LPC17_SRAM_BANK0 + 0x00001dd0 - * LPC17_BUFFER_END = LPC17_SRAM_BANK0 + 0x00003ba0 - * - * Then the check LPC17_BUFFER_END < LPC17_PKTMEM_END passes. The amount of - * unused memory is small: 0x00003e08-0x00003ba0 or about 616 bytes -- not - * enough for two more packets. - * - * [It is also possible, with some effort, to reclaim any unused - * SRAM for the use in the heap. But that has not yet been pursued.] - */ - -#define LPC17_TXDESCTAB_SIZE (CONFIG_NET_NTXDESC*LPC17_TXDESC_SIZE) -#define LPC17_TXSTATTAB_SIZE (CONFIG_NET_NTXDESC*LPC17_TXSTAT_SIZE) -#define LPC17_TXTAB_SIZE (LPC17_TXDESCTAB_SIZE+LPC17_TXSTATTAB_SIZE) - -#define LPC17_RXDESCTAB_SIZE (CONFIG_NET_NRXDESC*LPC17_RXDESC_SIZE) -#define LPC17_RXSTATTAB_SIZE (CONFIG_NET_NRXDESC*LPC17_RXSTAT_SIZE) -#define LPC17_RXTAB_SIZE (LPC17_RXDESCTAB_SIZE+LPC17_RXSTATTAB_SIZE) - -#define LPC17_DESCTAB_SIZE (LPC17_TXTAB_SIZE+LPC17_RXTAB_SIZE) - -/* Descriptor table memory organization. Descriptor tables are packed at - * the end of AHB SRAM, Bank 0. The beginning of bank 0 is reserved for - * packet memory. - */ - -#define LPC17_DESC_BASE (LPC17_EMACRAM_BASE+LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE) -#define LPC17_TXDESC_BASE LPC17_DESC_BASE -#define LPC17_TXSTAT_BASE (LPC17_TXDESC_BASE+LPC17_TXDESCTAB_SIZE) -#define LPC17_RXDESC_BASE (LPC17_TXSTAT_BASE+LPC17_TXSTATTAB_SIZE) -#define LPC17_RXSTAT_BASE (LPC17_RXDESC_BASE + LPC17_RXDESCTAB_SIZE) - -/* Now carve up the beginning of SRAM for packet memory. The size of a - * packet buffer is related to the size of the MTU. We'll round sizes up - * to multiples of 256 bytes. - */ - -#define LPC17_PKTMEM_BASE LPC17_EMACRAM_BASE -#define LPC17_PKTMEM_SIZE (LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE) -#define LPC17_PKTMEM_END (LPC17_EMACRAM_BASE+LPC17_PKTMEM_SIZE) - -#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3) -#define LPC17_NTXPKTS CONFIG_NET_NTXDESC -#define LPC17_NRXPKTS CONFIG_NET_NRXDESC - -#define LPC17_TXBUFFER_SIZE (LPC17_NTXPKTS * LPC17_MAXPACKET_SIZE) -#define LPC17_RXBUFFER_SIZE (LPC17_NRXPKTS * LPC17_MAXPACKET_SIZE) -#define LPC17_BUFFER_SIZE (LPC17_TXBUFFER_SIZE + LPC17_RXBUFFER_SIZE) - -#define LPC17_BUFFER_BASE LPC17_PKTMEM_BASE -#define LPC17_TXBUFFER_BASE LPC17_BUFFER_BASE -#define LPC17_RXBUFFER_BASE (LPC17_TXBUFFER_BASE + LPC17_TXBUFFER_SIZE) -#define LPC17_BUFFER_END (LPC17_BUFFER_BASE + LPC17_BUFFER_SIZE) - -#if LPC17_BUFFER_END > LPC17_PKTMEM_END -# error "Packet memory overlaps descriptor tables" -#endif - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* CONFIG_NET && CONFIG_LPC17_ETHERNET && LPC17_NETHCONTROLLERS > 0*/ -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_emacram.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Default, no-EMAC Case ************************************************************/ +/* Assume that all of AHB SRAM will be available for heap. If this is not true, then + * LPC17_BANK0_HEAPSIZE will be undefined and redefined below. + */ + +#undef LPC17_BANK0_HEAPBASE +#undef LPC17_BANK0_HEAPSIZE +#ifdef LPC17_HAVE_BANK0 +# define LPC17_BANK0_HEAPBASE LPC17_SRAM_BANK0 +# define LPC17_BANK0_HEAPSIZE LPC17_BANK0_SIZE +#endif + +/* Is networking enabled? Is the LPC17xx Ethernet device enabled? Does this chip have + * and Ethernet controlloer? Yes... then we will replace the above default definitions. + */ + +#if defined(CONFIG_NET) && defined(CONFIG_LPC17_ETHERNET) && LPC17_NETHCONTROLLERS > 0 + +/* EMAC RAM Configuration ***********************************************************/ +/* Is AHB SRAM available? */ + +#ifndef LPC17_HAVE_BANK0 +# error "AHB SRAM Bank0 is not available for EMAC RAM" +#endif + +/* Number of Tx descriptors */ + +#ifndef CONFIG_NET_NTXDESC +# define CONFIG_NET_NTXDESC 18 +#endif + +/* Number of Rx descriptors */ + +#ifndef CONFIG_NET_NRXDESC +# define CONFIG_NET_NRXDESC 18 +#endif + +/* Size of the region at the beginning of AHB SRAM 0 set set aside for the EMAC. + * This size must fit within AHB SRAM Bank 0 and also be a multiple of 32-bit + * words. + */ + +#ifndef CONFIG_NET_EMACRAM_SIZE +# define CONFIG_NET_EMACRAM_SIZE LPC17_BANK0_SIZE +#endif + +#if CONFIG_NET_EMACRAM_SIZE > LPC17_BANK0_SIZE +# error "EMAC RAM size cannot exceed the size of AHB SRAM Bank 0" +#endif + +#if (CONFIG_NET_EMACRAM_SIZE & 3) != 0 +# error "EMAC RAM size must be in multiples of 32-bit words" +#endif + +/* Determine is there is any meaningful space left at the end of AHB Bank 0 that + * could be added to the heap. + */ + +#undef LPC17_BANK0_HEAPBASE +#undef LPC17_BANK0_HEAPSIZE +#if CONFIG_NET_EMACRAM_SIZE < (LPC17_BANK0_SIZE-128) +# define LPC17_BANK0_HEAPBASE (LPC17_SRAM_BANK0 + CONFIG_NET_EMACRAM_SIZE) +# define LPC17_BANK0_HEAPSIZE (LPC17_BANK0_SIZE - CONFIG_NET_EMACRAM_SIZE) +#endif + +/* Memory at the beginning of AHB SRAM, Bank 0 is set aside for EMAC Tx and Rx + * descriptors. The position is not controllable, only the size of the region + * is controllable. + */ + +#define LPC17_EMACRAM_BASE LPC17_SRAM_BANK0 +#define LPC17_EMACRAM_SIZE CONFIG_NET_EMACRAM_SIZE + +/* Descriptor Memory Layout *********************************************************/ +/* EMAC DMA RAM and descriptor definitions. The configured number of descriptors + * will determine the organization and the size of the descriptor and status tables. + * There is a complex interaction between the maximum packet size (CONFIG_NET_BUFSIZE) + * and the number of Rx and Tx descriptors that can be suppored (CONFIG_NET_NRXDESC + * and CONFIG_NET_NTXDESC): Small buffers -> more packets. This is something that + * needs to be tuned for you system. + * + * For a 16Kb SRAM region, here is the relationship: + * + * 16384 <= ntx * (pktsize + 8 + 4) + nrx * (pktsize + 8 + 8) + * + * If ntx == nrx and pktsize == 424, then you could have + * ntx = nrx = 18. + * + * An example with all of the details: + * + * NTXDESC=18 NRXDESC=18 CONFIG_NET_EMACRAM_SIZE=16Kb CONFIG_NET_BUFSIZE=420: + * LPC17_TXDESCTAB_SIZE = 18*8 = 144 + * LPC17_TXSTATTAB_SIZE = 18*4 = 72 + * LPC17_TXTAB_SIZE = 216 + * + * LPC17_RXDESCTAB_SIZE = 16*8 = 144 + * LPC17_RXSTATTAB_SIZE = 16*8 = 144 + * LPC17_TXTAB_SIZE = 288 + * + * LPC17_DESCTAB_SIZE = 504 + * LPC17_DESC_BASE = LPC17_SRAM_BANK0 + 0x00004000 - 504 + * = LPC17_SRAM_BANK0 + 0x00003e08 + * LPC17_TXDESC_BASE = LPC17_SRAM_BANK0 + 0x00003e08 + * LPC17_TXSTAT_BASE = LPC17_SRAM_BANK0 + 0x00003e98 + * LPC17_RXDESC_BASE = LPC17_SRAM_BANK0 + 0x00003ee0 + * LPC17_RXSTAT_BASE = LPC17_SRAM_BANK0 + 0x00003f70 + * + * LPC17_PKTMEM_BASE = LPC17_SRAM_BANK0 + * LPC17_PKTMEM_SIZE = 0x00004000-504 = 0x00003e40 + * LPC17_PKTMEM_END = LPC17_SRAM_BANK0 + 0x00003e08 + + * LPC17_MAXPACKET_SIZE = ((420 + 3 + 2) & ~3) = 424 + * LPC17_NTXPKTS = 18 + * LPC17_NRXPKTS = 18 + + * LPC17_TXBUFFER_SIZE = 18 * 424 = 0x00001dd0 + * LPC17_RXBUFFER_SIZE = 18 * 424 = 0x00001dd0 + * LPC17_BUFFER_SIZE = 0x00003ba0 + + * LPC17_BUFFER_BASE = LPC17_SRAM_BANK0 + * LPC17_TXBUFFER_BASE = LPC17_SRAM_BANK0 + * LPC17_RXBUFFER_BASE = LPC17_SRAM_BANK0 + 0x00001dd0 + * LPC17_BUFFER_END = LPC17_SRAM_BANK0 + 0x00003ba0 + * + * Then the check LPC17_BUFFER_END < LPC17_PKTMEM_END passes. The amount of + * unused memory is small: 0x00003e08-0x00003ba0 or about 616 bytes -- not + * enough for two more packets. + * + * [It is also possible, with some effort, to reclaim any unused + * SRAM for the use in the heap. But that has not yet been pursued.] + */ + +#define LPC17_TXDESCTAB_SIZE (CONFIG_NET_NTXDESC*LPC17_TXDESC_SIZE) +#define LPC17_TXSTATTAB_SIZE (CONFIG_NET_NTXDESC*LPC17_TXSTAT_SIZE) +#define LPC17_TXTAB_SIZE (LPC17_TXDESCTAB_SIZE+LPC17_TXSTATTAB_SIZE) + +#define LPC17_RXDESCTAB_SIZE (CONFIG_NET_NRXDESC*LPC17_RXDESC_SIZE) +#define LPC17_RXSTATTAB_SIZE (CONFIG_NET_NRXDESC*LPC17_RXSTAT_SIZE) +#define LPC17_RXTAB_SIZE (LPC17_RXDESCTAB_SIZE+LPC17_RXSTATTAB_SIZE) + +#define LPC17_DESCTAB_SIZE (LPC17_TXTAB_SIZE+LPC17_RXTAB_SIZE) + +/* Descriptor table memory organization. Descriptor tables are packed at + * the end of AHB SRAM, Bank 0. The beginning of bank 0 is reserved for + * packet memory. + */ + +#define LPC17_DESC_BASE (LPC17_EMACRAM_BASE+LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE) +#define LPC17_TXDESC_BASE LPC17_DESC_BASE +#define LPC17_TXSTAT_BASE (LPC17_TXDESC_BASE+LPC17_TXDESCTAB_SIZE) +#define LPC17_RXDESC_BASE (LPC17_TXSTAT_BASE+LPC17_TXSTATTAB_SIZE) +#define LPC17_RXSTAT_BASE (LPC17_RXDESC_BASE + LPC17_RXDESCTAB_SIZE) + +/* Now carve up the beginning of SRAM for packet memory. The size of a + * packet buffer is related to the size of the MTU. We'll round sizes up + * to multiples of 256 bytes. + */ + +#define LPC17_PKTMEM_BASE LPC17_EMACRAM_BASE +#define LPC17_PKTMEM_SIZE (LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE) +#define LPC17_PKTMEM_END (LPC17_EMACRAM_BASE+LPC17_PKTMEM_SIZE) + +#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3) +#define LPC17_NTXPKTS CONFIG_NET_NTXDESC +#define LPC17_NRXPKTS CONFIG_NET_NRXDESC + +#define LPC17_TXBUFFER_SIZE (LPC17_NTXPKTS * LPC17_MAXPACKET_SIZE) +#define LPC17_RXBUFFER_SIZE (LPC17_NRXPKTS * LPC17_MAXPACKET_SIZE) +#define LPC17_BUFFER_SIZE (LPC17_TXBUFFER_SIZE + LPC17_RXBUFFER_SIZE) + +#define LPC17_BUFFER_BASE LPC17_PKTMEM_BASE +#define LPC17_TXBUFFER_BASE LPC17_BUFFER_BASE +#define LPC17_RXBUFFER_BASE (LPC17_TXBUFFER_BASE + LPC17_TXBUFFER_SIZE) +#define LPC17_BUFFER_END (LPC17_BUFFER_BASE + LPC17_BUFFER_SIZE) + +#if LPC17_BUFFER_END > LPC17_PKTMEM_END +# error "Packet memory overlaps descriptor tables" +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* CONFIG_NET && CONFIG_LPC17_ETHERNET && LPC17_NETHCONTROLLERS > 0*/ +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_EMACRAM_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.c index 1fb27ccc97..f567d52c09 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/lpc17_gpdma.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h index d4803eba5e..c0e70efa5f 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpdma.h @@ -1,417 +1,417 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_gpdma.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -/* General registers (see also LPC17_SYSCON_DMAREQSEL_OFFSET in lpc17_syscon.h) */ - -#define LPC17_DMA_INTST_OFFSET 0x0000 /* DMA Interrupt Status Register */ -#define LPC17_DMA_INTTCST_OFFSET 0x0004 /* DMA Interrupt Terminal Count Request Status Register */ -#define LPC17_DMA_INTTCCLR_OFFSET 0x0008 /* DMA Interrupt Terminal Count Request Clear Register */ -#define LPC17_DMA_INTERRST_OFFSET 0x000c /* DMA Interrupt Error Status Register */ -#define LPC17_DMA_INTERRCLR_OFFSET 0x0010 /* DMA Interrupt Error Clear Register */ -#define LPC17_DMA_RAWINTTCST_OFFSET 0x0014 /* DMA Raw Interrupt Terminal Count Status Register */ -#define LPC17_DMA_RAWINTERRST_OFFSET 0x0018 /* DMA Raw Error Interrupt Status Register */ -#define LPC17_DMA_ENBLDCHNS_OFFSET 0x001c /* DMA Enabled Channel Register */ -#define LPC17_DMA_SOFTBREQ_OFFSET 0x0020 /* DMA Software Burst Request Register */ -#define LPC17_DMA_SOFTSREQ_OFFSET 0x0024 /* DMA Software Single Request Register */ -#define LPC17_DMA_SOFTLBREQ_OFFSET 0x0028 /* DMA Software Last Burst Request Register */ -#define LPC17_DMA_SOFTLSREQ_OFFSET 0x002c /* DMA Software Last Single Request Register */ -#define LPC17_DMA_CONFIG_OFFSET 0x0030 /* DMA Configuration Register */ -#define LPC17_DMA_SYNC_OFFSET 0x0034 /* DMA Synchronization Register */ - -/* Channel Registers */ - -#define LPC17_DMA_CHAN_OFFSET(n) (0x0100 + ((n) << 5)) /* n=0,1,...7 */ - -#define LPC17_DMACH_SRCADDR_OFFSET 0x0000 /* DMA Channel Source Address Register */ -#define LPC17_DMACH_DESTADDR_OFFSET 0x0004 /* DMA Channel Destination Address Register */ -#define LPC17_DMACH_LLI_OFFSET 0x0008 /* DMA Channel Linked List Item Register */ -#define LPC17_DMACH_CONTROL_OFFSET 0x000c /* DMA Channel Control Register */ -#define LPC17_DMACH_CONFIG_OFFSET 0x0010 /* DMA Channel Configuration Register */ - -#define LPC17_DMACH0_SRCADDR_OFFSET (0x100+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH0_DESTADDR_OFFSET (0x100+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH0_LLI_OFFSET (0x100+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH0_CONTROL_OFFSET (0x100+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH0_CONFIG_OFFSET (0x100+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH1_SRCADDR_OFFSET (0x120+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH1_DESTADDR_OFFSET (0x120+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH1_LLI_OFFSET (0x120+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH1_CONTROL_OFFSET (0x120+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH1_CONFIG_OFFSET (0x120+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH2_SRCADDR_OFFSET (0x140+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH2_DESTADDR_OFFSET (0x140+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH2_LLI_OFFSET (0x140+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH2_CONTROL_OFFSET (0x140+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH2_CONFIG_OFFSET (0x140+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH3_SRCADDR_OFFSET (0x160+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH3_DESTADDR_OFFSET (0x160+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH3_LLI_OFFSET (0x160+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH3_CONTROL_OFFSET (0x160+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH3_CONFIG_OFFSET (0x160+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH4_SRCADDR_OFFSET (0x180+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH4_DESTADDR_OFFSET (0x180+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH4_LLI_OFFSET (0x180+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH4_CONTROL_OFFSET (0x180+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH4_CONFIG_OFFSET (0x180+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH5_SRCADDR_OFFSET (0x1a0+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH5_DESTADDR_OFFSET (0x1a0+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH5_LLI_OFFSET (0x1a0+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH5_CONTROL_OFFSET (0x1a0+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH5_CONFIG_OFFSET (0x1a0+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH6_SRCADDR_OFFSET (0x1c0+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH6_DESTADDR_OFFSET (0x1c0+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH6_LLI_OFFSET (0x1c0+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH6_CONTROL_OFFSET (0x1c0+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH6_CONFIG_OFFSET (0x1c0+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH7_SRCADDR_OFFSET (0x1e0+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH7_DESTADDR_OFFSET (0x1e0+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH7_LLI_OFFSET (0x1e0+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH7_CONTROL_OFFSET (0x1e0+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH7_CONFIG_OFFSET (0x1e0+LPC17_DMACH_CONFIG_OFFSET) - -/* Register addresses ***************************************************************/ -/* General registers (see also LPC17_SYSCON_DMAREQSEL in lpc17_syscon.h) */ - -#define LPC17_DMA_INTST (LPC17_GPDMA_BASE+LPC17_DMA_INTST_OFFSET) -#define LPC17_DMA_INTTCST (LPC17_GPDMA_BASE+LPC17_DMA_INTTCST_OFFSET) -#define LPC17_DMA_INTTCCLR (LPC17_GPDMA_BASE+LPC17_DMA_INTTCCLR_OFFSET) -#define LPC17_DMA_INTERRST (LPC17_GPDMA_BASE+LPC17_DMA_INTERRST_OFFSET) -#define LPC17_DMA_INTERRCLR (LPC17_GPDMA_BASE+LPC17_DMA_INTERRCLR_OFFSET) -#define LPC17_DMA_RAWINTTCST (LPC17_GPDMA_BASE+LPC17_DMA_RAWINTTCST_OFFSET) -#define LPC17_DMA_RAWINTERRST (LPC17_GPDMA_BASE+LPC17_DMA_RAWINTERRST_OFFSET) -#define LPC17_DMA_ENBLDCHNS (LPC17_GPDMA_BASE+LPC17_DMA_ENBLDCHNS_OFFSET) -#define LPC17_DMA_SOFTBREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTBREQ_OFFSET) -#define LPC17_DMA_SOFTSREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTSREQ_OFFSET) -#define LPC17_DMA_SOFTLBREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTLBREQ_OFFSET) -#define LPC17_DMA_SOFTLSREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTLSREQ_OFFSET) -#define LPC17_DMA_CONFIG (LPC17_GPDMA_BASE+LPC17_DMA_CONFIG_OFFSET) -#define LPC17_DMA_SYNC (LPC17_GPDMA_BASE+LPC17_DMA_SYNC_OFFSET) - -/* Channel Registers */ - -#define LPC17_DMACH_BASE(n) (LPC17_GPDMA_BASE+LPC17_DMA_CHAN_OFFSET(n)) - -#define LPC17_DMACH_SRCADDR(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_SRCADDR_OFFSET) -#define LPC17_DMACH_DESTADDR(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_DESTADDR_OFFSET) -#define LPC17_DMACH_LLI(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_LLI_OFFSET) -#define LPC17_DMACH_CONTROL(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_CONTROL_OFFSET) -#define LPC17_DMACH_CONFIG(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_CONFIG_OFFSET) - -#define LPC17_DMACH0_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH0_SRCADDR_OFFSET) -#define LPC17_DMACH0_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH0_DESTADDR_OFFSET) -#define LPC17_DMACH0_LLI (LPC17_GPDMA_BASE+LPC17_DMACH0_LLI_OFFSET) -#define LPC17_DMACH0_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH0_CONTROL_OFFSET) -#define LPC17_DMACH0_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH0_CONFIG_OFFSET) - -#define LPC17_DMACH1_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH1_SRCADDR_OFFSET) -#define LPC17_DMACH1_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH1_DESTADDR_OFFSET) -#define LPC17_DMACH1_LLI (LPC17_GPDMA_BASE+LPC17_DMACH1_LLI_OFFSET) -#define LPC17_DMACH1_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH1_CONTROL_OFFSET) -#define LPC17_DMACH1_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH1_CONFIG_OFFSET) - -#define LPC17_DMACH2_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH2_SRCADDR_OFFSET) -#define LPC17_DMACH2_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH2_DESTADDR_OFFSET) -#define LPC17_DMACH2_LLI (LPC17_GPDMA_BASE+LPC17_DMACH2_LLI_OFFSET) -#define LPC17_DMACH2_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH2_CONTROL_OFFSET) -#define LPC17_DMACH2_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH2_CONFIG_OFFSET) - -#define LPC17_DMACH3_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH3_SRCADDR_OFFSET) -#define LPC17_DMACH3_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH3_DESTADDR_OFFSET) -#define LPC17_DMACH3_LLI (LPC17_GPDMA_BASE+LPC17_DMACH3_LLI_OFFSET) -#define LPC17_DMACH3_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH3_CONTROL_OFFSET) -#define LPC17_DMACH3_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH3_CONFIG_OFFSET) - -#define LPC17_DMACH4_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH4_SRCADDR_OFFSET) -#define LPC17_DMACH4_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH4_DESTADDR_OFFSET) -#define LPC17_DMACH4_LLI (LPC17_GPDMA_BASE+LPC17_DMACH4_LLI_OFFSET) -#define LPC17_DMACH4_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH4_CONTROL_OFFSET) -#define LPC17_DMACH4_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH4_CONFIG_OFFSET) - -#define LPC17_DMACH5_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH5_SRCADDR_OFFSET) -#define LPC17_DMACH5_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH5_DESTADDR_OFFSET) -#define LPC17_DMACH5_LLI (LPC17_GPDMA_BASE+LPC17_DMACH5_LLI_OFFSET) -#define LPC17_DMACH5_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH5_CONTROL_OFFSET) -#define LPC17_DMACH5_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH5_CONFIG_OFFSET) - -#define LPC17_DMACH6_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH6_SRCADDR_OFFSET) -#define LPC17_DMACH6_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH6_DESTADDR_OFFSET) -#define LPC17_DMACH6_LLI (LPC17_GPDMA_BASE+LPC17_DMACH6_LLI_OFFSET) -#define LPC17_DMACH6_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH6_CONTROL_OFFSET) -#define LPC17_DMACH6_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH6_CONFIG_OFFSET) - -#define LPC17_DMACH7_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH7_SRCADDR_OFFSET) -#define LPC17_DMACH7_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH7_DESTADDR_OFFSET) -#define LPC17_DMACH7_LLI (LPC17_GPDMA_BASE+LPC17_DMACH7_LLI_OFFSET) -#define LPC17_DMACH7_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH7_CONTROL_OFFSET) -#define LPC17_DMACH7_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH7_CONFIG_OFFSET) - -/* Register bit definitions *********************************************************/ -/* DMA request connections */ - -#define DMA_REQ_SSP0TX (0) -#define DMA_REQ_SSP0RX (1) -#define DMA_REQ_SSP1TX (2) -#define DMA_REQ_SSP1RX (3) -#define DMA_REQ_ADC (4) -#define DMA_REQ_I2SCH0 (5) -#define DMA_REQ_I2SCH1 (6) -#define DMA_REQ_DAC (7) - -#define DMA_REQ_UART0TX (8) -#define DMA_REQ_UART0RX (9) -#define DMA_REQ_UART1TX (10) -#define DMA_REQ_UART1RX (11) -#define DMA_REQ_UART2TX (12) -#define DMA_REQ_UART2RX (13) -#define DMA_REQ_UART3TX (14) -#define DMA_REQ_UART3RX (15) - -#define DMA_REQ_MAT0p0 (8) -#define DMA_REQ_MAT0p1 (9) -#define DMA_REQ_MAT1p0 (10) -#define DMA_REQ_MAT1p1 (11) -#define DMA_REQ_MAT2p0 (12) -#define DMA_REQ_MAT2p1 (13) -#define DMA_REQ_MAT3p0 (14) -#define DMA_REQ_MAT3p1 (15) - -/* General registers (see also LPC17_SYSCON_DMAREQSEL in lpc17_syscon.h) */ -/* Fach of the following registers, bits 0-7 controls DMA channels 9-7, - * respectively. Bits 8-31 are reserved. - * - * DMA Interrupt Status Register - * DMA Interrupt Terminal Count Request Status Register - * DMA Interrupt Terminal Count Request Clear Register - * DMA Interrupt Error Status Register - * DMA Interrupt Error Clear Register - * DMA Raw Interrupt Terminal Count Status Register - * DMA Raw Error Interrupt Status Register - * DMA Enabled Channel Register - */ - -#define DMACH(n) (1 << (n)) /* n=0,1,...7 */ - -/* For each of the following registers, bits 0-15 represent a set of encoded - * DMA sources. Bits 16-31 are reserved in each case. - * - * DMA Software Burst Request Register - * DMA Software Single Request Register - * DMA Software Last Burst Request Register - * DMA Software Last Single Request Register - * DMA Synchronization Register - */ - -#define DMA_REQ_SSP0TX_BIT (1 << DMA_REQ_SSP0TX) -#define DMA_REQ_SSP0RX_BIT (1 << DMA_REQ_SSP0RX) -#define DMA_REQ_SSP1TX_BIT (1 << DMA_REQ_SSP1TX) -#define DMA_REQ_SSP1RX_BIT (1 << DMA_REQ_SSP0RX) -#define DMA_REQ_ADC_BIT (1 << DMA_REQ_ADC) -#define DMA_REQ_I2SCH0_BIT (1 << DMA_REQ_I2SCH0) -#define DMA_REQ_I2SCH1_BIT (1 << DMA_REQ_I2SCH1) -#define DMA_REQ_DAC_BIT (1 << DMA_REQ_DAC) - -#define DMA_REQ_UART0TX_BIT (1 << DMA_REQ_UART0TX) -#define DMA_REQ_UART0RX_BIT (1 << DMA_REQ_UART0RX) -#define DMA_REQ_UART1TX_BIT (1 << DMA_REQ_UART1TX) -#define DMA_REQ_UART1RX_BIT (1 << DMA_REQ_UART1RX) -#define DMA_REQ_UART2TX_BIT (1 << DMA_REQ_UART2TX) -#define DMA_REQ_UART2RX_BIT (1 << DMA_REQ_UART2RX) -#define DMA_REQ_UART3TX_BIT (1 << DMA_REQ_UART3TX) -#define DMA_REQ_UART3RX_BIT (1 << DMA_REQ_UART3RX) - -#define DMA_REQ_MAT0p0_BIT (1 << DMA_REQ_MAT0p0) -#define DMA_REQ_MAT0p1_BIT (1 << DMA_REQ_MAT0p1) -#define DMA_REQ_MAT1p0_BIT (1 << DMA_REQ_MAT1p0) -#define DMA_REQ_MAT1p1_BIT (1 << DMA_REQ_MAT1p1) -#define DMA_REQ_MAT2p0_BIT (1 << DMA_REQ_MAT2p0) -#define DMA_REQ_MAT2p1_BIT (1 << DMA_REQ_MAT2p1) -#define DMA_REQ_MAT3p0_BIT (1 << DMA_REQ_MAT3p0) -#define DMA_REQ_MAT3p1_BIT (1 << DMA_REQ_MAT3p1) - -/* DMA Configuration Register */ - -#define DMA_CONFIG_E (1 << 0) /* Bit 0: DMA Controller enable */ -#define DMA_CONFIG_M (1 << 1) /* Bit 1: AHB Master endianness configuration */ - /* Bits 2-31: Reserved */ -/* Channel Registers */ - -/* DMA Channel Source Address Register (Bits 0-31: Source Address) */ -/* DMA Channel Destination Address Register Bits 0-31: Destination Address) */ -/* DMA Channel Linked List Item Register (Bits 0-31: Address of next link list - * item. Bits 0-1 must be zero. - */ - -/* DMA Channel Control Register */ - -#define DMACH_CONTROL_XFRSIZE_SHIFT (0) /* Bits 0-11: Transfer size */ -#define DMACH_CONTROL_XFRSIZE_MASK (0x0fff << DMACH_CONTROL_XFRSIZE_SHIFT) -#define DMACH_CONTROL_SBSIZE_SHIFT (12) /* Bits 12-14: Source burst size */ -#define DMACH_CONTROL_SBSIZE_MASK (7 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_1 (0 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_4 (1 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_8 (2 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_16 (3 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_32 (4 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_64 (5 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_128 (6 << DMACH_CONTROL_SBSIZE_SHIFT) -# define DMACH_CONTROL_SBSIZE_256 (7 << DMACH_CONTROL_SBSIZE_SHIFT) -#define DMACH_CONTROL_DBSIZE_SHIFT (15) /* Bits 15-17: Destination burst size */ -#define DMACH_CONTROL_DBSIZE_MASK (7 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_1 (0 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_4 (1 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_8 (2 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_16 (3 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_32 (4 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_64 (5 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_128 (6 << DMACH_CONTROL_DBSIZE_SHIFT) -# define DMACH_CONTROL_DBSIZE_256 (7 << DMACH_CONTROL_DBSIZE_SHIFT) -#define DMACH_CONTROL_SWIDTH_SHIFT (18) /* Bits 18-20: Source transfer width */ -#define DMACH_CONTROL_SWIDTH_MASK (7 << DMACH_CONTROL_SWIDTH_SHIFT) -#define DMACH_CONTROL_DWIDTH_SHIFT (21) /* Bits 21-23: Destination transfer width */ -#define DMACH_CONTROL_DWIDTH_MASK (7 << DMACH_CONTROL_DWIDTH_SHIFT) -#define DMACH_CONTROL_SI (1 << 26) /* Bit 26: Source increment */ -#define DMACH_CONTROL_DI (1 << 27) /* Bit 27: Destination increment */ -#define DMACH_CONTROL_PROT1 (1 << 28) /* Bit 28: User/priviledged mode */ -#define DMACH_CONTROL_PROT2 (1 << 29) /* Bit 29: Bufferable */ -#define DMACH_CONTROL_PROT3 (1 << 30) /* Bit 30: Cacheable */ -#define DMACH_CONTROL_I (1 << 31) /* Bit 31: Terminal count interrupt enable */ - -/* DMA Channel Configuration Register */ - - -#define DMACH_CONFIG_E (1 << 0) /* Bit 0: Channel enable */ -#define DMACH_CONFIG_SRCPER_SHIFT (1) /* Bits 1-5: Source peripheral */ -#define DMACH_CONFIG_SRCPER_MASK (31 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_SSP0TX (DMA_REQ_SSP0TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_SSP0RX (DMA_REQ_SSP0RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_SSP1TX (DMA_REQ_SSP1TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_SSP1RX (DMA_REQ_SSP0RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_ADC (DMA_REQ_ADC << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_I2SCH0 (DMA_REQ_I2SCH0 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_I2SCH1 (DMA_REQ_I2SCH1 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_DAC (DMA_REQ_DAC << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART0TX (DMA_REQ_UART0TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART0RX (DMA_REQ_UART0RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART1TX (DMA_REQ_UART1TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART1RX (DMA_REQ_UART1RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART2TX (DMA_REQ_UART2TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART2RX (DMA_REQ_UART2RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART3TX (DMA_REQ_UART3TX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_UART3RX (DMA_REQ_UART3RX << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT0p0 (DMA_REQ_MAT0p0 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT0p1 (DMA_REQ_MAT0p1 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT1p0 (DMA_REQ_MAT1p0 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT1p1 (DMA_REQ_MAT1p1 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT2p0 (DMA_REQ_MAT2p0 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT2p1 (DMA_REQ_MAT2p1 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT3p0 (DMA_REQ_MAT3p0 << DMACH_CONFIG_SRCPER_SHIFT) -# define DMACH_CONFIG_SRCPER_MAT3p1 (DMA_REQ_MAT3p1 << DMACH_CONFIG_SRCPER_SHIFT) -#define DMACH_CONFIG_DSTPER_SHIFT (6) /* Bits 6-10: Source peripheral */ -#define DMACH_CONFIG_DSTPER_MASK (31 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_SSP0TX (DMA_REQ_SSP0TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_SSP0RX (DMA_REQ_SSP0RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_SSP1TX (DMA_REQ_SSP1TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_SSP1RX (DMA_REQ_SSP0RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_ADC (DMA_REQ_ADC << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_I2SCH0 (DMA_REQ_I2SCH0 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_I2SCH1 (DMA_REQ_I2SCH1 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_DAC (DMA_REQ_DAC << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART0TX (DMA_REQ_UART0TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART0RX (DMA_REQ_UART0RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART1TX (DMA_REQ_UART1TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART1RX (DMA_REQ_UART1RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART2TX (DMA_REQ_UART2TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART2RX (DMA_REQ_UART2RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART3TX (DMA_REQ_UART3TX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_UART3RX (DMA_REQ_UART3RX << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT0p0 (DMA_REQ_MAT0p0 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT0p1 (DMA_REQ_MAT0p1 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT1p0 (DMA_REQ_MAT1p0 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT1p1 (DMA_REQ_MAT1p1 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT2p0 (DMA_REQ_MAT2p0 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT2p1 (DMA_REQ_MAT2p1 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT3p0 (DMA_REQ_MAT3p0 << DMACH_CONFIG_DSTPER_SHIFT) -# define DMACH_CONFIG_DSTPER_MAT3p1 (DMA_REQ_MAT3p1 << DMACH_CONFIG_DSTPER_SHIFT) -#define DMACH_CONFIG_XFRTYPE_SHIFT (11) /* Bits 11-13: Type of transfer */ -#define DMACH_CONFIG_XFRTYPE_MASK (7 << DMACH_CONFIG_XFRTYPE_SHIFT) -# define DMACH_CONFIG_XFRTYPE_M2M (0 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Memory to memory DMA */ -# define DMACH_CONFIG_XFRTYPE_M2P (1 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Memory to peripheral DMA */ -# define DMACH_CONFIG_XFRTYPE_P2M (2 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Peripheral to memory DMA */ -# define DMACH_CONFIG_XFRTYPE_P2P (3 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Peripheral to peripheral DMA */ -#define DMACH_CONFIG_IE (1 << 14) /* Bit 14: Interrupt error mask */ -#define DMACH_CONFIG_ ITC (1 << 15) /* Bit 15: Terminal count interrupt mask */ -#define DMACH_CONFIG_L (1 << 16) /* Bit 16: Lock */ -#define DMACH_CONFIG_A (1 << 17) /* Bit 17: Active */ -#define DMACH_CONFIG_H (1 << 18) /* Bit 18: Halt */ - /* Bits 19-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_gpdma.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +/* General registers (see also LPC17_SYSCON_DMAREQSEL_OFFSET in lpc17_syscon.h) */ + +#define LPC17_DMA_INTST_OFFSET 0x0000 /* DMA Interrupt Status Register */ +#define LPC17_DMA_INTTCST_OFFSET 0x0004 /* DMA Interrupt Terminal Count Request Status Register */ +#define LPC17_DMA_INTTCCLR_OFFSET 0x0008 /* DMA Interrupt Terminal Count Request Clear Register */ +#define LPC17_DMA_INTERRST_OFFSET 0x000c /* DMA Interrupt Error Status Register */ +#define LPC17_DMA_INTERRCLR_OFFSET 0x0010 /* DMA Interrupt Error Clear Register */ +#define LPC17_DMA_RAWINTTCST_OFFSET 0x0014 /* DMA Raw Interrupt Terminal Count Status Register */ +#define LPC17_DMA_RAWINTERRST_OFFSET 0x0018 /* DMA Raw Error Interrupt Status Register */ +#define LPC17_DMA_ENBLDCHNS_OFFSET 0x001c /* DMA Enabled Channel Register */ +#define LPC17_DMA_SOFTBREQ_OFFSET 0x0020 /* DMA Software Burst Request Register */ +#define LPC17_DMA_SOFTSREQ_OFFSET 0x0024 /* DMA Software Single Request Register */ +#define LPC17_DMA_SOFTLBREQ_OFFSET 0x0028 /* DMA Software Last Burst Request Register */ +#define LPC17_DMA_SOFTLSREQ_OFFSET 0x002c /* DMA Software Last Single Request Register */ +#define LPC17_DMA_CONFIG_OFFSET 0x0030 /* DMA Configuration Register */ +#define LPC17_DMA_SYNC_OFFSET 0x0034 /* DMA Synchronization Register */ + +/* Channel Registers */ + +#define LPC17_DMA_CHAN_OFFSET(n) (0x0100 + ((n) << 5)) /* n=0,1,...7 */ + +#define LPC17_DMACH_SRCADDR_OFFSET 0x0000 /* DMA Channel Source Address Register */ +#define LPC17_DMACH_DESTADDR_OFFSET 0x0004 /* DMA Channel Destination Address Register */ +#define LPC17_DMACH_LLI_OFFSET 0x0008 /* DMA Channel Linked List Item Register */ +#define LPC17_DMACH_CONTROL_OFFSET 0x000c /* DMA Channel Control Register */ +#define LPC17_DMACH_CONFIG_OFFSET 0x0010 /* DMA Channel Configuration Register */ + +#define LPC17_DMACH0_SRCADDR_OFFSET (0x100+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH0_DESTADDR_OFFSET (0x100+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH0_LLI_OFFSET (0x100+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH0_CONTROL_OFFSET (0x100+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH0_CONFIG_OFFSET (0x100+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH1_SRCADDR_OFFSET (0x120+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH1_DESTADDR_OFFSET (0x120+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH1_LLI_OFFSET (0x120+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH1_CONTROL_OFFSET (0x120+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH1_CONFIG_OFFSET (0x120+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH2_SRCADDR_OFFSET (0x140+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH2_DESTADDR_OFFSET (0x140+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH2_LLI_OFFSET (0x140+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH2_CONTROL_OFFSET (0x140+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH2_CONFIG_OFFSET (0x140+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH3_SRCADDR_OFFSET (0x160+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH3_DESTADDR_OFFSET (0x160+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH3_LLI_OFFSET (0x160+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH3_CONTROL_OFFSET (0x160+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH3_CONFIG_OFFSET (0x160+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH4_SRCADDR_OFFSET (0x180+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH4_DESTADDR_OFFSET (0x180+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH4_LLI_OFFSET (0x180+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH4_CONTROL_OFFSET (0x180+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH4_CONFIG_OFFSET (0x180+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH5_SRCADDR_OFFSET (0x1a0+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH5_DESTADDR_OFFSET (0x1a0+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH5_LLI_OFFSET (0x1a0+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH5_CONTROL_OFFSET (0x1a0+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH5_CONFIG_OFFSET (0x1a0+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH6_SRCADDR_OFFSET (0x1c0+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH6_DESTADDR_OFFSET (0x1c0+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH6_LLI_OFFSET (0x1c0+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH6_CONTROL_OFFSET (0x1c0+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH6_CONFIG_OFFSET (0x1c0+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH7_SRCADDR_OFFSET (0x1e0+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH7_DESTADDR_OFFSET (0x1e0+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH7_LLI_OFFSET (0x1e0+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH7_CONTROL_OFFSET (0x1e0+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH7_CONFIG_OFFSET (0x1e0+LPC17_DMACH_CONFIG_OFFSET) + +/* Register addresses ***************************************************************/ +/* General registers (see also LPC17_SYSCON_DMAREQSEL in lpc17_syscon.h) */ + +#define LPC17_DMA_INTST (LPC17_GPDMA_BASE+LPC17_DMA_INTST_OFFSET) +#define LPC17_DMA_INTTCST (LPC17_GPDMA_BASE+LPC17_DMA_INTTCST_OFFSET) +#define LPC17_DMA_INTTCCLR (LPC17_GPDMA_BASE+LPC17_DMA_INTTCCLR_OFFSET) +#define LPC17_DMA_INTERRST (LPC17_GPDMA_BASE+LPC17_DMA_INTERRST_OFFSET) +#define LPC17_DMA_INTERRCLR (LPC17_GPDMA_BASE+LPC17_DMA_INTERRCLR_OFFSET) +#define LPC17_DMA_RAWINTTCST (LPC17_GPDMA_BASE+LPC17_DMA_RAWINTTCST_OFFSET) +#define LPC17_DMA_RAWINTERRST (LPC17_GPDMA_BASE+LPC17_DMA_RAWINTERRST_OFFSET) +#define LPC17_DMA_ENBLDCHNS (LPC17_GPDMA_BASE+LPC17_DMA_ENBLDCHNS_OFFSET) +#define LPC17_DMA_SOFTBREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTBREQ_OFFSET) +#define LPC17_DMA_SOFTSREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTSREQ_OFFSET) +#define LPC17_DMA_SOFTLBREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTLBREQ_OFFSET) +#define LPC17_DMA_SOFTLSREQ (LPC17_GPDMA_BASE+LPC17_DMA_SOFTLSREQ_OFFSET) +#define LPC17_DMA_CONFIG (LPC17_GPDMA_BASE+LPC17_DMA_CONFIG_OFFSET) +#define LPC17_DMA_SYNC (LPC17_GPDMA_BASE+LPC17_DMA_SYNC_OFFSET) + +/* Channel Registers */ + +#define LPC17_DMACH_BASE(n) (LPC17_GPDMA_BASE+LPC17_DMA_CHAN_OFFSET(n)) + +#define LPC17_DMACH_SRCADDR(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_SRCADDR_OFFSET) +#define LPC17_DMACH_DESTADDR(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_DESTADDR_OFFSET) +#define LPC17_DMACH_LLI(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_LLI_OFFSET) +#define LPC17_DMACH_CONTROL(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_CONTROL_OFFSET) +#define LPC17_DMACH_CONFIG(n) (LPC17_DMACH_BASE(n)+LPC17_DMACH_CONFIG_OFFSET) + +#define LPC17_DMACH0_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH0_SRCADDR_OFFSET) +#define LPC17_DMACH0_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH0_DESTADDR_OFFSET) +#define LPC17_DMACH0_LLI (LPC17_GPDMA_BASE+LPC17_DMACH0_LLI_OFFSET) +#define LPC17_DMACH0_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH0_CONTROL_OFFSET) +#define LPC17_DMACH0_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH0_CONFIG_OFFSET) + +#define LPC17_DMACH1_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH1_SRCADDR_OFFSET) +#define LPC17_DMACH1_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH1_DESTADDR_OFFSET) +#define LPC17_DMACH1_LLI (LPC17_GPDMA_BASE+LPC17_DMACH1_LLI_OFFSET) +#define LPC17_DMACH1_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH1_CONTROL_OFFSET) +#define LPC17_DMACH1_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH1_CONFIG_OFFSET) + +#define LPC17_DMACH2_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH2_SRCADDR_OFFSET) +#define LPC17_DMACH2_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH2_DESTADDR_OFFSET) +#define LPC17_DMACH2_LLI (LPC17_GPDMA_BASE+LPC17_DMACH2_LLI_OFFSET) +#define LPC17_DMACH2_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH2_CONTROL_OFFSET) +#define LPC17_DMACH2_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH2_CONFIG_OFFSET) + +#define LPC17_DMACH3_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH3_SRCADDR_OFFSET) +#define LPC17_DMACH3_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH3_DESTADDR_OFFSET) +#define LPC17_DMACH3_LLI (LPC17_GPDMA_BASE+LPC17_DMACH3_LLI_OFFSET) +#define LPC17_DMACH3_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH3_CONTROL_OFFSET) +#define LPC17_DMACH3_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH3_CONFIG_OFFSET) + +#define LPC17_DMACH4_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH4_SRCADDR_OFFSET) +#define LPC17_DMACH4_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH4_DESTADDR_OFFSET) +#define LPC17_DMACH4_LLI (LPC17_GPDMA_BASE+LPC17_DMACH4_LLI_OFFSET) +#define LPC17_DMACH4_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH4_CONTROL_OFFSET) +#define LPC17_DMACH4_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH4_CONFIG_OFFSET) + +#define LPC17_DMACH5_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH5_SRCADDR_OFFSET) +#define LPC17_DMACH5_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH5_DESTADDR_OFFSET) +#define LPC17_DMACH5_LLI (LPC17_GPDMA_BASE+LPC17_DMACH5_LLI_OFFSET) +#define LPC17_DMACH5_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH5_CONTROL_OFFSET) +#define LPC17_DMACH5_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH5_CONFIG_OFFSET) + +#define LPC17_DMACH6_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH6_SRCADDR_OFFSET) +#define LPC17_DMACH6_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH6_DESTADDR_OFFSET) +#define LPC17_DMACH6_LLI (LPC17_GPDMA_BASE+LPC17_DMACH6_LLI_OFFSET) +#define LPC17_DMACH6_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH6_CONTROL_OFFSET) +#define LPC17_DMACH6_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH6_CONFIG_OFFSET) + +#define LPC17_DMACH7_SRCADDR (LPC17_GPDMA_BASE+LPC17_DMACH7_SRCADDR_OFFSET) +#define LPC17_DMACH7_DESTADDR (LPC17_GPDMA_BASE+LPC17_DMACH7_DESTADDR_OFFSET) +#define LPC17_DMACH7_LLI (LPC17_GPDMA_BASE+LPC17_DMACH7_LLI_OFFSET) +#define LPC17_DMACH7_CONTROL (LPC17_GPDMA_BASE+LPC17_DMACH7_CONTROL_OFFSET) +#define LPC17_DMACH7_CONFIG (LPC17_GPDMA_BASE+LPC17_DMACH7_CONFIG_OFFSET) + +/* Register bit definitions *********************************************************/ +/* DMA request connections */ + +#define DMA_REQ_SSP0TX (0) +#define DMA_REQ_SSP0RX (1) +#define DMA_REQ_SSP1TX (2) +#define DMA_REQ_SSP1RX (3) +#define DMA_REQ_ADC (4) +#define DMA_REQ_I2SCH0 (5) +#define DMA_REQ_I2SCH1 (6) +#define DMA_REQ_DAC (7) + +#define DMA_REQ_UART0TX (8) +#define DMA_REQ_UART0RX (9) +#define DMA_REQ_UART1TX (10) +#define DMA_REQ_UART1RX (11) +#define DMA_REQ_UART2TX (12) +#define DMA_REQ_UART2RX (13) +#define DMA_REQ_UART3TX (14) +#define DMA_REQ_UART3RX (15) + +#define DMA_REQ_MAT0p0 (8) +#define DMA_REQ_MAT0p1 (9) +#define DMA_REQ_MAT1p0 (10) +#define DMA_REQ_MAT1p1 (11) +#define DMA_REQ_MAT2p0 (12) +#define DMA_REQ_MAT2p1 (13) +#define DMA_REQ_MAT3p0 (14) +#define DMA_REQ_MAT3p1 (15) + +/* General registers (see also LPC17_SYSCON_DMAREQSEL in lpc17_syscon.h) */ +/* Fach of the following registers, bits 0-7 controls DMA channels 9-7, + * respectively. Bits 8-31 are reserved. + * + * DMA Interrupt Status Register + * DMA Interrupt Terminal Count Request Status Register + * DMA Interrupt Terminal Count Request Clear Register + * DMA Interrupt Error Status Register + * DMA Interrupt Error Clear Register + * DMA Raw Interrupt Terminal Count Status Register + * DMA Raw Error Interrupt Status Register + * DMA Enabled Channel Register + */ + +#define DMACH(n) (1 << (n)) /* n=0,1,...7 */ + +/* For each of the following registers, bits 0-15 represent a set of encoded + * DMA sources. Bits 16-31 are reserved in each case. + * + * DMA Software Burst Request Register + * DMA Software Single Request Register + * DMA Software Last Burst Request Register + * DMA Software Last Single Request Register + * DMA Synchronization Register + */ + +#define DMA_REQ_SSP0TX_BIT (1 << DMA_REQ_SSP0TX) +#define DMA_REQ_SSP0RX_BIT (1 << DMA_REQ_SSP0RX) +#define DMA_REQ_SSP1TX_BIT (1 << DMA_REQ_SSP1TX) +#define DMA_REQ_SSP1RX_BIT (1 << DMA_REQ_SSP0RX) +#define DMA_REQ_ADC_BIT (1 << DMA_REQ_ADC) +#define DMA_REQ_I2SCH0_BIT (1 << DMA_REQ_I2SCH0) +#define DMA_REQ_I2SCH1_BIT (1 << DMA_REQ_I2SCH1) +#define DMA_REQ_DAC_BIT (1 << DMA_REQ_DAC) + +#define DMA_REQ_UART0TX_BIT (1 << DMA_REQ_UART0TX) +#define DMA_REQ_UART0RX_BIT (1 << DMA_REQ_UART0RX) +#define DMA_REQ_UART1TX_BIT (1 << DMA_REQ_UART1TX) +#define DMA_REQ_UART1RX_BIT (1 << DMA_REQ_UART1RX) +#define DMA_REQ_UART2TX_BIT (1 << DMA_REQ_UART2TX) +#define DMA_REQ_UART2RX_BIT (1 << DMA_REQ_UART2RX) +#define DMA_REQ_UART3TX_BIT (1 << DMA_REQ_UART3TX) +#define DMA_REQ_UART3RX_BIT (1 << DMA_REQ_UART3RX) + +#define DMA_REQ_MAT0p0_BIT (1 << DMA_REQ_MAT0p0) +#define DMA_REQ_MAT0p1_BIT (1 << DMA_REQ_MAT0p1) +#define DMA_REQ_MAT1p0_BIT (1 << DMA_REQ_MAT1p0) +#define DMA_REQ_MAT1p1_BIT (1 << DMA_REQ_MAT1p1) +#define DMA_REQ_MAT2p0_BIT (1 << DMA_REQ_MAT2p0) +#define DMA_REQ_MAT2p1_BIT (1 << DMA_REQ_MAT2p1) +#define DMA_REQ_MAT3p0_BIT (1 << DMA_REQ_MAT3p0) +#define DMA_REQ_MAT3p1_BIT (1 << DMA_REQ_MAT3p1) + +/* DMA Configuration Register */ + +#define DMA_CONFIG_E (1 << 0) /* Bit 0: DMA Controller enable */ +#define DMA_CONFIG_M (1 << 1) /* Bit 1: AHB Master endianness configuration */ + /* Bits 2-31: Reserved */ +/* Channel Registers */ + +/* DMA Channel Source Address Register (Bits 0-31: Source Address) */ +/* DMA Channel Destination Address Register Bits 0-31: Destination Address) */ +/* DMA Channel Linked List Item Register (Bits 0-31: Address of next link list + * item. Bits 0-1 must be zero. + */ + +/* DMA Channel Control Register */ + +#define DMACH_CONTROL_XFRSIZE_SHIFT (0) /* Bits 0-11: Transfer size */ +#define DMACH_CONTROL_XFRSIZE_MASK (0x0fff << DMACH_CONTROL_XFRSIZE_SHIFT) +#define DMACH_CONTROL_SBSIZE_SHIFT (12) /* Bits 12-14: Source burst size */ +#define DMACH_CONTROL_SBSIZE_MASK (7 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_1 (0 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_4 (1 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_8 (2 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_16 (3 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_32 (4 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_64 (5 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_128 (6 << DMACH_CONTROL_SBSIZE_SHIFT) +# define DMACH_CONTROL_SBSIZE_256 (7 << DMACH_CONTROL_SBSIZE_SHIFT) +#define DMACH_CONTROL_DBSIZE_SHIFT (15) /* Bits 15-17: Destination burst size */ +#define DMACH_CONTROL_DBSIZE_MASK (7 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_1 (0 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_4 (1 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_8 (2 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_16 (3 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_32 (4 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_64 (5 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_128 (6 << DMACH_CONTROL_DBSIZE_SHIFT) +# define DMACH_CONTROL_DBSIZE_256 (7 << DMACH_CONTROL_DBSIZE_SHIFT) +#define DMACH_CONTROL_SWIDTH_SHIFT (18) /* Bits 18-20: Source transfer width */ +#define DMACH_CONTROL_SWIDTH_MASK (7 << DMACH_CONTROL_SWIDTH_SHIFT) +#define DMACH_CONTROL_DWIDTH_SHIFT (21) /* Bits 21-23: Destination transfer width */ +#define DMACH_CONTROL_DWIDTH_MASK (7 << DMACH_CONTROL_DWIDTH_SHIFT) +#define DMACH_CONTROL_SI (1 << 26) /* Bit 26: Source increment */ +#define DMACH_CONTROL_DI (1 << 27) /* Bit 27: Destination increment */ +#define DMACH_CONTROL_PROT1 (1 << 28) /* Bit 28: User/priviledged mode */ +#define DMACH_CONTROL_PROT2 (1 << 29) /* Bit 29: Bufferable */ +#define DMACH_CONTROL_PROT3 (1 << 30) /* Bit 30: Cacheable */ +#define DMACH_CONTROL_I (1 << 31) /* Bit 31: Terminal count interrupt enable */ + +/* DMA Channel Configuration Register */ + + +#define DMACH_CONFIG_E (1 << 0) /* Bit 0: Channel enable */ +#define DMACH_CONFIG_SRCPER_SHIFT (1) /* Bits 1-5: Source peripheral */ +#define DMACH_CONFIG_SRCPER_MASK (31 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_SSP0TX (DMA_REQ_SSP0TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_SSP0RX (DMA_REQ_SSP0RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_SSP1TX (DMA_REQ_SSP1TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_SSP1RX (DMA_REQ_SSP0RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_ADC (DMA_REQ_ADC << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_I2SCH0 (DMA_REQ_I2SCH0 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_I2SCH1 (DMA_REQ_I2SCH1 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_DAC (DMA_REQ_DAC << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART0TX (DMA_REQ_UART0TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART0RX (DMA_REQ_UART0RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART1TX (DMA_REQ_UART1TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART1RX (DMA_REQ_UART1RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART2TX (DMA_REQ_UART2TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART2RX (DMA_REQ_UART2RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART3TX (DMA_REQ_UART3TX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_UART3RX (DMA_REQ_UART3RX << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT0p0 (DMA_REQ_MAT0p0 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT0p1 (DMA_REQ_MAT0p1 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT1p0 (DMA_REQ_MAT1p0 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT1p1 (DMA_REQ_MAT1p1 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT2p0 (DMA_REQ_MAT2p0 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT2p1 (DMA_REQ_MAT2p1 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT3p0 (DMA_REQ_MAT3p0 << DMACH_CONFIG_SRCPER_SHIFT) +# define DMACH_CONFIG_SRCPER_MAT3p1 (DMA_REQ_MAT3p1 << DMACH_CONFIG_SRCPER_SHIFT) +#define DMACH_CONFIG_DSTPER_SHIFT (6) /* Bits 6-10: Source peripheral */ +#define DMACH_CONFIG_DSTPER_MASK (31 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_SSP0TX (DMA_REQ_SSP0TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_SSP0RX (DMA_REQ_SSP0RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_SSP1TX (DMA_REQ_SSP1TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_SSP1RX (DMA_REQ_SSP0RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_ADC (DMA_REQ_ADC << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_I2SCH0 (DMA_REQ_I2SCH0 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_I2SCH1 (DMA_REQ_I2SCH1 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_DAC (DMA_REQ_DAC << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART0TX (DMA_REQ_UART0TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART0RX (DMA_REQ_UART0RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART1TX (DMA_REQ_UART1TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART1RX (DMA_REQ_UART1RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART2TX (DMA_REQ_UART2TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART2RX (DMA_REQ_UART2RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART3TX (DMA_REQ_UART3TX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_UART3RX (DMA_REQ_UART3RX << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT0p0 (DMA_REQ_MAT0p0 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT0p1 (DMA_REQ_MAT0p1 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT1p0 (DMA_REQ_MAT1p0 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT1p1 (DMA_REQ_MAT1p1 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT2p0 (DMA_REQ_MAT2p0 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT2p1 (DMA_REQ_MAT2p1 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT3p0 (DMA_REQ_MAT3p0 << DMACH_CONFIG_DSTPER_SHIFT) +# define DMACH_CONFIG_DSTPER_MAT3p1 (DMA_REQ_MAT3p1 << DMACH_CONFIG_DSTPER_SHIFT) +#define DMACH_CONFIG_XFRTYPE_SHIFT (11) /* Bits 11-13: Type of transfer */ +#define DMACH_CONFIG_XFRTYPE_MASK (7 << DMACH_CONFIG_XFRTYPE_SHIFT) +# define DMACH_CONFIG_XFRTYPE_M2M (0 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Memory to memory DMA */ +# define DMACH_CONFIG_XFRTYPE_M2P (1 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Memory to peripheral DMA */ +# define DMACH_CONFIG_XFRTYPE_P2M (2 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Peripheral to memory DMA */ +# define DMACH_CONFIG_XFRTYPE_P2P (3 << DMACH_CONFIG_XFRTYPE_SHIFT) /* Peripheral to peripheral DMA */ +#define DMACH_CONFIG_IE (1 << 14) /* Bit 14: Interrupt error mask */ +#define DMACH_CONFIG_ ITC (1 << 15) /* Bit 15: Terminal count interrupt mask */ +#define DMACH_CONFIG_L (1 << 16) /* Bit 16: Lock */ +#define DMACH_CONFIG_A (1 << 17) /* Bit 17: Active */ +#define DMACH_CONFIG_H (1 << 18) /* Bit 18: Halt */ + /* Bits 19-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_GPDMA_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.h b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.h index 39fa161fc8..002ef3fafe 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.h @@ -1,196 +1,196 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_gpio.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ -/* GPIO block register offsets ******************************************************/ - -#define LPC17_FIO0_OFFSET 0x0000 -#define LPC17_FIO1_OFFSET 0x0020 -#define LPC17_FIO2_OFFSET 0x0040 -#define LPC17_FIO3_OFFSET 0x0060 -#define LPC17_FIO4_OFFSET 0x0080 - -#define LPC17_FIO_DIR_OFFSET 0x0000 /* Fast GPIO Port Direction control */ -#define LPC17_FIO_MASK_OFFSET 0x0010 /* Fast Mask register for ports */ -#define LPC17_FIO_PIN_OFFSET 0x0014 /* Fast Port Pin value registers */ -#define LPC17_FIO_SET_OFFSET 0x0018 /* Fast Port Output Set registers */ -#define LPC17_FIO_CLR_OFFSET 0x001c /* Fast Port Output Clear register */ - -/* GPIO interrupt block register offsets ********************************************/ - -#define LPC17_GPIOINT_OFFSET(n) (0x10*(n) + 0x80) -#define LPC17_GPIOINT0_OFFSET 0x0080 -#define LPC17_GPIOINT2_OFFSET 0x00a0 - -#define LPC17_GPIOINT_IOINTSTATUS_OFFSET 0x0000 /* GPIO overall Interrupt Status */ -#define LPC17_GPIOINT_INTSTATR_OFFSET 0x0004 /* GPIO Interrupt Status Rising edge */ -#define LPC17_GPIOINT_INTSTATF_OFFSET 0x0008 /* GPIO Interrupt Status Falling edge */ -#define LPC17_GPIOINT_INTCLR_OFFSET 0x000c /* GPIO Interrupt Clear */ -#define LPC17_GPIOINT_INTENR_OFFSET 0x0010 /* GPIO Interrupt Enable Rising edge */ -#define LPC17_GPIOINT_INTENF_OFFSET 0x0014 /* GPIO Interrupt Enable Falling edge */ - -/* Register addresses ***************************************************************/ -/* GPIO block register addresses ****************************************************/ - -#define LPC17_FIO_BASE(n) (LPC17_GPIO_BASE+LPC17_GPIOINT_OFFSET(n)) -#define LPC17_FIO0_BASE (LPC17_GPIO_BASE+LPC17_FIO0_OFFSET) -#define LPC17_FIO1_BASE (LPC17_GPIO_BASE+LPC17_FIO1_OFFSET) -#define LPC17_FIO2_BASE (LPC17_GPIO_BASE+LPC17_FIO2_OFFSET) -#define LPC17_FIO3_BASE (LPC17_GPIO_BASE+LPC17_FIO3_OFFSET) -#define LPC17_FIO4_BASE (LPC17_GPIO_BASE+LPC17_FIO4_OFFSET) - -#define LPC17_FIO_DIR(n) (LPC17_FIO_BASE(n)+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO_MASK(n) (LPC17_FIO_BASE(n)+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO_PIN(n) (LPC17_FIO_BASE(n)+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO_SET(n) (LPC17_FIO_BASE(n)+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO_CLR(n) (LPC17_FIO_BASE(n)+LPC17_FIO_CLR_OFFSET) - -#define LPC17_FIO0_DIR (LPC17_FIO0_BASE+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO0_MASK (LPC17_FIO0_BASE+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO0_PIN (LPC17_FIO0_BASE+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO0_SET (LPC17_FIO0_BASE+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO0_CLR (LPC17_FIO0_BASE+LPC17_FIO_CLR_OFFSET) - -#define LPC17_FIO1_DIR (LPC17_FIO1_BASE+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO1_MASK (LPC17_FIO1_BASE+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO1_PIN (LPC17_FIO1_BASE+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO1_SET (LPC17_FIO1_BASE+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO1_CLR (LPC17_FIO1_BASE+LPC17_FIO_CLR_OFFSET) - -#define LPC17_FIO2_DIR (LPC17_FIO2_BASE+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO2_MASK (LPC17_FIO2_BASE+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO2_PIN (LPC17_FIO2_BASE+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO2_SET (LPC17_FIO2_BASE+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO2_CLR (LPC17_FIO2_BASE+LPC17_FIO_CLR_OFFSET) - -#define LPC17_FIO3_DIR (LPC17_FIO3_BASE+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO3_MASK (LPC17_FIO3_BASE+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO3_PIN (LPC17_FIO3_BASE+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO3_SET (LPC17_FIO3_BASE+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO3_CLR (LPC17_FIO3_BASE+LPC17_FIO_CLR_OFFSET) - -#define LPC17_FIO4_DIR (LPC17_FIO4_BASE+LPC17_FIO_DIR_OFFSET) -#define LPC17_FIO4_MASK (LPC17_FIO4_BASE+LPC17_FIO_MASK_OFFSET) -#define LPC17_FIO4_PIN (LPC17_FIO4_BASE+LPC17_FIO_PIN_OFFSET) -#define LPC17_FIO4_SET (LPC17_FIO4_BASE+LPC17_FIO_SET_OFFSET) -#define LPC17_FIO4_CLR (LPC17_FIO4_BASE+LPC17_FIO_CLR_OFFSET) - -/* GPIO interrupt block register addresses ******************************************/ - -#define LPC17_GPIOINTn_BASE(n) (LPC17_GPIOINT_BASE+LPC17_GPIOINT_OFFSET(n)) -#define LPC17_GPIOINT0_BASE (LPC17_GPIOINT_BASE+LPC17_GPIOINT0_OFFSET) -#define LPC17_GPIOINT2_BASE (LPC17_GPIOINT_BASE+LPC17_GPIOINT2_OFFSET) - -#define LPC17_GPIOINT_IOINTSTATUS (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_IOINTSTATUS_OFFSET) - -#define LPC17_GPIOINT_INTSTATR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTSTATR_OFFSET) -#define LPC17_GPIOINT_INTSTATF(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTSTATF_OFFSET) -#define LPC17_GPIOINT_INTCLR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTCLR_OFFSET) -#define LPC17_GPIOINT_INTENR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTENR_OFFSET) -#define LPC17_GPIOINT_INTENF(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTENF_OFFSET) - -/* Pins P0.0-31 (P0.12-14 nad P0.31 are reserved) */ - -#define LPC17_GPIOINT0_INTSTATR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTSTATR_OFFSET) -#define LPC17_GPIOINT0_INTSTATF (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTSTATF_OFFSET) -#define LPC17_GPIOINT0_INTCLR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTCLR_OFFSET) -#define LPC17_GPIOINT0_INTENR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTENR_OFFSET) -#define LPC17_GPIOINT0_INTENF (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTENF_OFFSET) - -/* Pins P2.0-13 (P0.14-31 are reserved) */ - -#define LPC17_GPIOINT2_INTSTATR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTSTATR_OFFSET) -#define LPC17_GPIOINT2_INTSTATF (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTSTATF_OFFSET) -#define LPC17_GPIOINT2_INTCLR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTCLR_OFFSET) -#define LPC17_GPIOINT2_INTENR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTENR_OFFSET) -#define LPC17_GPIOINT2_INTENF (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTENF_OFFSET) - -/* Register bit definitions *********************************************************/ -/* GPIO block register bit definitions **********************************************/ - -/* Fast GPIO Port Direction control registers (FIODIR) */ -/* Fast Mask register for ports (FIOMASK) */ -/* Fast Port Pin value registers using FIOMASK (FIOPIN) */ -/* Fast Port Output Set registers using FIOMASK (FIOSET) */ -/* Fast Port Output Clear register using FIOMASK (FIOCLR) */ - -#define FIO(n) (1 << (n)) /* n=0,1,..31 */ - -/* GPIO interrupt block register bit definitions ************************************/ - -/* GPIO overall Interrupt Status (IOINTSTATUS) */ -#define GPIOINT_IOINTSTATUS_P0INT (1 << 0) /* Bit 0: Port 0 GPIO interrupt pending */ - /* Bit 1: Reserved */ -#define GPIOINT_IOINTSTATUS_P2INT (1 << 2) /* Bit 2: Port 2 GPIO interrupt pending */ - /* Bits 3-31: Reserved */ - -/* GPIO Interrupt Status for Rising edge (INTSTATR) - * GPIO Interrupt Status for Falling edge (INTSTATF) - * GPIO Interrupt Clear (INTCLR) - * GPIO Interrupt Enable for Rising edge (INTENR) - * GPIO Interrupt Enable for Falling edge (INTENF) - */ - -#define GPIOINT(n) (1 << (n)) /* n=0,1,..31 */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_gpio.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ +/* GPIO block register offsets ******************************************************/ + +#define LPC17_FIO0_OFFSET 0x0000 +#define LPC17_FIO1_OFFSET 0x0020 +#define LPC17_FIO2_OFFSET 0x0040 +#define LPC17_FIO3_OFFSET 0x0060 +#define LPC17_FIO4_OFFSET 0x0080 + +#define LPC17_FIO_DIR_OFFSET 0x0000 /* Fast GPIO Port Direction control */ +#define LPC17_FIO_MASK_OFFSET 0x0010 /* Fast Mask register for ports */ +#define LPC17_FIO_PIN_OFFSET 0x0014 /* Fast Port Pin value registers */ +#define LPC17_FIO_SET_OFFSET 0x0018 /* Fast Port Output Set registers */ +#define LPC17_FIO_CLR_OFFSET 0x001c /* Fast Port Output Clear register */ + +/* GPIO interrupt block register offsets ********************************************/ + +#define LPC17_GPIOINT_OFFSET(n) (0x10*(n) + 0x80) +#define LPC17_GPIOINT0_OFFSET 0x0080 +#define LPC17_GPIOINT2_OFFSET 0x00a0 + +#define LPC17_GPIOINT_IOINTSTATUS_OFFSET 0x0000 /* GPIO overall Interrupt Status */ +#define LPC17_GPIOINT_INTSTATR_OFFSET 0x0004 /* GPIO Interrupt Status Rising edge */ +#define LPC17_GPIOINT_INTSTATF_OFFSET 0x0008 /* GPIO Interrupt Status Falling edge */ +#define LPC17_GPIOINT_INTCLR_OFFSET 0x000c /* GPIO Interrupt Clear */ +#define LPC17_GPIOINT_INTENR_OFFSET 0x0010 /* GPIO Interrupt Enable Rising edge */ +#define LPC17_GPIOINT_INTENF_OFFSET 0x0014 /* GPIO Interrupt Enable Falling edge */ + +/* Register addresses ***************************************************************/ +/* GPIO block register addresses ****************************************************/ + +#define LPC17_FIO_BASE(n) (LPC17_GPIO_BASE+LPC17_GPIOINT_OFFSET(n)) +#define LPC17_FIO0_BASE (LPC17_GPIO_BASE+LPC17_FIO0_OFFSET) +#define LPC17_FIO1_BASE (LPC17_GPIO_BASE+LPC17_FIO1_OFFSET) +#define LPC17_FIO2_BASE (LPC17_GPIO_BASE+LPC17_FIO2_OFFSET) +#define LPC17_FIO3_BASE (LPC17_GPIO_BASE+LPC17_FIO3_OFFSET) +#define LPC17_FIO4_BASE (LPC17_GPIO_BASE+LPC17_FIO4_OFFSET) + +#define LPC17_FIO_DIR(n) (LPC17_FIO_BASE(n)+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO_MASK(n) (LPC17_FIO_BASE(n)+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO_PIN(n) (LPC17_FIO_BASE(n)+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO_SET(n) (LPC17_FIO_BASE(n)+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO_CLR(n) (LPC17_FIO_BASE(n)+LPC17_FIO_CLR_OFFSET) + +#define LPC17_FIO0_DIR (LPC17_FIO0_BASE+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO0_MASK (LPC17_FIO0_BASE+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO0_PIN (LPC17_FIO0_BASE+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO0_SET (LPC17_FIO0_BASE+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO0_CLR (LPC17_FIO0_BASE+LPC17_FIO_CLR_OFFSET) + +#define LPC17_FIO1_DIR (LPC17_FIO1_BASE+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO1_MASK (LPC17_FIO1_BASE+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO1_PIN (LPC17_FIO1_BASE+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO1_SET (LPC17_FIO1_BASE+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO1_CLR (LPC17_FIO1_BASE+LPC17_FIO_CLR_OFFSET) + +#define LPC17_FIO2_DIR (LPC17_FIO2_BASE+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO2_MASK (LPC17_FIO2_BASE+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO2_PIN (LPC17_FIO2_BASE+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO2_SET (LPC17_FIO2_BASE+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO2_CLR (LPC17_FIO2_BASE+LPC17_FIO_CLR_OFFSET) + +#define LPC17_FIO3_DIR (LPC17_FIO3_BASE+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO3_MASK (LPC17_FIO3_BASE+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO3_PIN (LPC17_FIO3_BASE+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO3_SET (LPC17_FIO3_BASE+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO3_CLR (LPC17_FIO3_BASE+LPC17_FIO_CLR_OFFSET) + +#define LPC17_FIO4_DIR (LPC17_FIO4_BASE+LPC17_FIO_DIR_OFFSET) +#define LPC17_FIO4_MASK (LPC17_FIO4_BASE+LPC17_FIO_MASK_OFFSET) +#define LPC17_FIO4_PIN (LPC17_FIO4_BASE+LPC17_FIO_PIN_OFFSET) +#define LPC17_FIO4_SET (LPC17_FIO4_BASE+LPC17_FIO_SET_OFFSET) +#define LPC17_FIO4_CLR (LPC17_FIO4_BASE+LPC17_FIO_CLR_OFFSET) + +/* GPIO interrupt block register addresses ******************************************/ + +#define LPC17_GPIOINTn_BASE(n) (LPC17_GPIOINT_BASE+LPC17_GPIOINT_OFFSET(n)) +#define LPC17_GPIOINT0_BASE (LPC17_GPIOINT_BASE+LPC17_GPIOINT0_OFFSET) +#define LPC17_GPIOINT2_BASE (LPC17_GPIOINT_BASE+LPC17_GPIOINT2_OFFSET) + +#define LPC17_GPIOINT_IOINTSTATUS (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_IOINTSTATUS_OFFSET) + +#define LPC17_GPIOINT_INTSTATR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTSTATR_OFFSET) +#define LPC17_GPIOINT_INTSTATF(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTSTATF_OFFSET) +#define LPC17_GPIOINT_INTCLR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTCLR_OFFSET) +#define LPC17_GPIOINT_INTENR(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTENR_OFFSET) +#define LPC17_GPIOINT_INTENF(n) (LPC17_GPIOINTn_BASE(n)+LPC17_GPIOINT_INTENF_OFFSET) + +/* Pins P0.0-31 (P0.12-14 nad P0.31 are reserved) */ + +#define LPC17_GPIOINT0_INTSTATR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTSTATR_OFFSET) +#define LPC17_GPIOINT0_INTSTATF (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTSTATF_OFFSET) +#define LPC17_GPIOINT0_INTCLR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTCLR_OFFSET) +#define LPC17_GPIOINT0_INTENR (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTENR_OFFSET) +#define LPC17_GPIOINT0_INTENF (LPC17_GPIOINT0_BASE+LPC17_GPIOINT_INTENF_OFFSET) + +/* Pins P2.0-13 (P0.14-31 are reserved) */ + +#define LPC17_GPIOINT2_INTSTATR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTSTATR_OFFSET) +#define LPC17_GPIOINT2_INTSTATF (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTSTATF_OFFSET) +#define LPC17_GPIOINT2_INTCLR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTCLR_OFFSET) +#define LPC17_GPIOINT2_INTENR (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTENR_OFFSET) +#define LPC17_GPIOINT2_INTENF (LPC17_GPIOINT2_BASE+LPC17_GPIOINT_INTENF_OFFSET) + +/* Register bit definitions *********************************************************/ +/* GPIO block register bit definitions **********************************************/ + +/* Fast GPIO Port Direction control registers (FIODIR) */ +/* Fast Mask register for ports (FIOMASK) */ +/* Fast Port Pin value registers using FIOMASK (FIOPIN) */ +/* Fast Port Output Set registers using FIOMASK (FIOSET) */ +/* Fast Port Output Clear register using FIOMASK (FIOCLR) */ + +#define FIO(n) (1 << (n)) /* n=0,1,..31 */ + +/* GPIO interrupt block register bit definitions ************************************/ + +/* GPIO overall Interrupt Status (IOINTSTATUS) */ +#define GPIOINT_IOINTSTATUS_P0INT (1 << 0) /* Bit 0: Port 0 GPIO interrupt pending */ + /* Bit 1: Reserved */ +#define GPIOINT_IOINTSTATUS_P2INT (1 << 2) /* Bit 2: Port 2 GPIO interrupt pending */ + /* Bits 3-31: Reserved */ + +/* GPIO Interrupt Status for Rising edge (INTSTATR) + * GPIO Interrupt Status for Falling edge (INTSTATF) + * GPIO Interrupt Clear (INTCLR) + * GPIO Interrupt Enable for Rising edge (INTENR) + * GPIO Interrupt Enable for Falling edge (INTENF) + */ + +#define GPIOINT(n) (1 << (n)) /* n=0,1,..31 */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_GPIO_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c b/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c index ccff276e56..48d6fefce1 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c @@ -1,545 +1,545 @@ -/******************************************************************************* - * arch/arm/src/lpc17xx/lpc17_i2c.c - * - * Copyright (C) 2011 Li Zhuoyi. All rights reserved. - * Author: Li Zhuoyi - * History: 0.1 2011-08-20 initial version - * - * Derived from arch/arm/src/lpc31xx/lpc31_i2c.c - * - * Author: David Hewson - * - * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - *******************************************************************************/ - -/******************************************************************************* - * Included Files - *******************************************************************************/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "wdog.h" -#include "chip.h" -#include "up_arch.h" -#include "up_internal.h" -#include "os_internal.h" - - -#include "lpc17_internal.h" -#include "lpc17_syscon.h" -#include "lpc17_pinconn.h" -#include "lpc17_i2c.h" - -#if defined(CONFIG_LPC17_I2C0) || defined(CONFIG_LPC17_I2C1) || defined(CONFIG_LPC17_I2C2) - -#ifndef GPIO_I2C1_SCL - #define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 - #define GPIO_I2C1_SDA GPIO_I2C1_SDA_1 -#endif -#ifndef CONFIG_I2C0_FREQ - #define CONFIG_I2C0_FREQ 100000 -#endif -#ifndef CONFIG_I2C1_FREQ - #define CONFIG_I2C1_FREQ 100000 -#endif -#ifndef CONFIG_I2C2_FREQ - #define CONFIG_I2C2_FREQ 100000 -#endif - -/******************************************************************************* - * Definitions - *******************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define I2C_TIMEOUT ((20 * CLK_TCK) / 1000) /* 20 mS */ - -/**************************************************************************** - * Private Data - ****************************************************************************/ -struct lpc17_i2cdev_s -{ - struct i2c_dev_s dev; /* Generic I2C device */ - struct i2c_msg_s msg; /* a single message for legacy read/write */ - unsigned int base; /* Base address of registers */ - uint16_t irqid; /* IRQ for this device */ - - sem_t mutex; /* Only one thread can access at a time */ - sem_t wait; /* Place to wait for state machine completion */ - volatile uint8_t state; /* State of state machine */ - WDOG_ID timeout; /* watchdog to timeout when bus hung */ - - uint16_t wrcnt; /* number of bytes sent to tx fifo */ - uint16_t rdcnt; /* number of bytes read from rx fifo */ -}; - -static struct lpc17_i2cdev_s i2cdevices[3]; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ -static int i2c_start (struct lpc17_i2cdev_s *priv); -static void i2c_stop (struct lpc17_i2cdev_s *priv); -static int i2c_interrupt (int irq, FAR void *context); -static void i2c_timeout (int argc, uint32_t arg, ...); - -/**************************************************************************** - * I2C device operations - ****************************************************************************/ - -static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency); -static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits); -static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen); -static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen); -static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count); - -struct i2c_ops_s lpc17_i2c_ops = -{ - .setfrequency = i2c_setfrequency, - .setaddress = i2c_setaddress, - .write = i2c_write, - .read = i2c_read, -#ifdef CONFIG_I2C_TRANSFER - .transfer = i2c_transfer -#endif -}; - -/******************************************************************************* - * Name: lpc17_i2c_setfrequency - * - * Description: - * Set the frequence for the next transfer - * - *******************************************************************************/ - -static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; - - if (frequency > 100000) - { - /* asymetric per 400Khz I2C spec */ - putreg32 ( LPC17_CCLK / (83 + 47) * 47 / frequency, priv->base + LPC17_I2C_SCLH_OFFSET); - putreg32 ( LPC17_CCLK / (83 + 47) * 83 / frequency, priv->base + LPC17_I2C_SCLL_OFFSET); - } - else - { - /* 50/50 mark space ratio */ - putreg32 (LPC17_CCLK / 100 * 50 / frequency, priv->base + LPC17_I2C_SCLH_OFFSET); - putreg32 (LPC17_CCLK / 100 * 50 / frequency, priv->base + LPC17_I2C_SCLL_OFFSET); - } - - /* FIXME: This function should return the actual selected frequency */ - return frequency; -} - -/******************************************************************************* - * Name: lpc17_i2c_setaddress - * - * Description: - * Set the I2C slave address for a subsequent read/write - * - *******************************************************************************/ -static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; - - DEBUGASSERT(dev != NULL); - DEBUGASSERT(nbits == 7 ); - - priv->msg.addr = addr<<1; - priv->msg.flags = 0 ; - - return OK; -} - -/******************************************************************************* - * Name: lpc17_i2c_write - * - * Description: - * Send a block of data on I2C using the previously selected I2C - * frequency and slave address. - * - *******************************************************************************/ -static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; - int ret; - - DEBUGASSERT (dev != NULL); - - priv->wrcnt=0; - priv->rdcnt=0; - priv->msg.addr &= ~0x01; - priv->msg.buffer = (uint8_t*)buffer; - priv->msg.length = buflen; - - ret = i2c_start (priv); - - return ret >0 ? OK : -ETIMEDOUT; -} - -/******************************************************************************* - * Name: lpc17_i2c_read - * - * Description: - * Receive a block of data on I2C using the previously selected I2C - * frequency and slave address. - * - *******************************************************************************/ -static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; - int ret; - - DEBUGASSERT (dev != NULL); - - priv->wrcnt=0; - priv->rdcnt=0; - priv->msg.addr |= 0x01; - priv->msg.buffer = buffer; - priv->msg.length = buflen; - - ret = i2c_start (priv); - - return ret >0 ? OK : -ETIMEDOUT; -} - -/******************************************************************************* - * Name: i2c_start - * - * Description: - * Perform a I2C transfer start - * - *******************************************************************************/ -static int i2c_start (struct lpc17_i2cdev_s *priv) -{ - int ret=-1; - sem_wait (&priv->mutex); - - putreg32(I2C_CONCLR_STAC|I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); - putreg32(I2C_CONSET_STA,priv->base+LPC17_I2C_CONSET_OFFSET); - - wd_start (priv->timeout, I2C_TIMEOUT, i2c_timeout, 1, (uint32_t)priv); - sem_wait(&priv->wait); - wd_cancel (priv->timeout); - sem_post (&priv->mutex); - - if( priv-> state == 0x18 || priv->state == 0x28) - ret=priv->wrcnt; - else if( priv-> state == 0x50 || priv->state == 0x58) - ret=priv->rdcnt; - return ret; -} - -/******************************************************************************* - * Name: i2c_stop - * - * Description: - * Perform a I2C transfer stop - * - *******************************************************************************/ -static void i2c_stop (struct lpc17_i2cdev_s *priv) -{ - if(priv->state!=0x38) - putreg32(I2C_CONSET_STO|I2C_CONSET_AA,priv->base+LPC17_I2C_CONSET_OFFSET); - sem_post (&priv->wait); -} - -/******************************************************************************* - * Name: i2c_timeout - * - * Description: - * Watchdog timer for timeout of I2C operation - * - *******************************************************************************/ - -static void i2c_timeout (int argc, uint32_t arg, ...) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) arg; - - irqstate_t flags = irqsave(); - priv->state = 0xff; - sem_post (&priv->wait); - irqrestore (flags); -} - -/******************************************************************************* - * Name: i2c_interrupt - * - * Description: - * The I2C Interrupt Handler - * - *******************************************************************************/ - -static int i2c_interrupt (int irq, FAR void *context) -{ - struct lpc17_i2cdev_s *priv; -#ifdef CONFIG_LPC17_I2C0 - if (irq == LPC17_IRQ_I2C0) - { - priv=&i2cdevices[0]; - } - else -#endif -#ifdef CONFIG_LPC17_I2C1 - if (irq == LPC17_IRQ_I2C1) - { - priv=&i2cdevices[1]; - } - else -#endif -#ifdef CONFIG_LPC17_I2C2 - if (irq == LPC17_IRQ_I2C2) - { - priv=&i2cdevices[2]; - } - else -#endif - { - PANIC(OSERR_INTERNAL); - } -/* - * refrence UM10360 19.10.5 - */ - uint32_t state = getreg32(priv->base+LPC17_I2C_STAT_OFFSET); - putreg32(I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); - priv->state=state; - state &=0xf8; - switch (state) - { - case 0x00: //Bus Error - case 0x20: - case 0x30: - case 0x38: - case 0x48: - i2c_stop(priv); - break; - case 0x08: //START - case 0x10: //Repeat START - putreg32(priv->msg.addr,priv->base+LPC17_I2C_DAT_OFFSET); - putreg32(I2C_CONCLR_STAC,priv->base+LPC17_I2C_CONCLR_OFFSET); - break; - case 0x18: - priv->wrcnt=0; - putreg32(priv->msg.buffer[0],priv->base+LPC17_I2C_DAT_OFFSET); - break; - case 0x28: - priv->wrcnt++; - if(priv->wrcntmsg.length) - putreg32(priv->msg.buffer[priv->wrcnt],priv->base+LPC17_I2C_DAT_OFFSET); - else - i2c_stop(priv); - break; - case 0x40: - priv->rdcnt=-1; - putreg32(I2C_CONSET_AA,priv->base+LPC17_I2C_CONSET_OFFSET); - break; - case 0x50: - priv->rdcnt++; - if(priv->rdcntmsg.length) - priv->msg.buffer[priv->rdcnt]=getreg32(priv->base+LPC17_I2C_BUFR_OFFSET); - if(priv->rdcnt>=priv->msg.length-1) - putreg32(I2C_CONCLR_AAC|I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); - break; - case 0x58: - i2c_stop(priv); - break; - default: - i2c_stop(priv); - break; - } - return OK; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - - -/******************************************************************************* - * Name: up_i2cinitialize - * - * Description: - * Initialise an I2C device - * - *******************************************************************************/ - -struct i2c_dev_s *up_i2cinitialize(int port) -{ - struct lpc17_i2cdev_s *priv; - - if (port>2) - { - dbg("lpc I2C Only support 0,1,2\n"); - return NULL; - } - - irqstate_t flags; - uint32_t regval; - - flags = irqsave(); - - priv= &i2cdevices[port]; -#ifdef CONFIG_LPC17_I2C0 - if (port==0) - { - priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[0]; - priv->base = LPC17_I2C0_BASE; - priv->irqid = LPC17_IRQ_I2C0; - - regval = getreg32(LPC17_SYSCON_PCONP); - regval |= SYSCON_PCONP_PCI2C0; - putreg32(regval, LPC17_SYSCON_PCONP); - - regval = getreg32(LPC17_SYSCON_PCLKSEL0); - regval &= ~SYSCON_PCLKSEL0_I2C0_MASK; - regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL0_I2C0_SHIFT); - putreg32(regval, LPC17_SYSCON_PCLKSEL0); - - lpc17_configgpio(GPIO_I2C0_SCL); - lpc17_configgpio(GPIO_I2C0_SDA); - - putreg32 (LPC17_CCLK/CONFIG_I2C0_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); - putreg32 (LPC17_CCLK/CONFIG_I2C0_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); - - } - else -#endif -#ifdef CONFIG_LPC17_I2C1 - if(port==1) - { - priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[1]; - priv->base = LPC17_I2C1_BASE; - priv->irqid = LPC17_IRQ_I2C1; - - regval = getreg32(LPC17_SYSCON_PCONP); - regval |= SYSCON_PCONP_PCI2C1; - putreg32(regval, LPC17_SYSCON_PCONP); - - regval = getreg32(LPC17_SYSCON_PCLKSEL1); - regval &= ~SYSCON_PCLKSEL1_I2C1_MASK; - regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL1_I2C1_SHIFT); - putreg32(regval, LPC17_SYSCON_PCLKSEL1); - - lpc17_configgpio(GPIO_I2C1_SCL); - lpc17_configgpio(GPIO_I2C1_SDA); - - putreg32 (LPC17_CCLK/CONFIG_I2C1_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); - putreg32 (LPC17_CCLK/CONFIG_I2C1_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); - } - else -#endif -#ifdef CONFIG_LPC17_I2C2 - if(port==2) - { - priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[2]; - priv->base = LPC17_I2C2_BASE; - priv->irqid = LPC17_IRQ_I2C2; - - regval = getreg32(LPC17_SYSCON_PCONP); - regval |= SYSCON_PCONP_PCI2C2; - putreg32(regval, LPC17_SYSCON_PCONP); - - regval = getreg32(LPC17_SYSCON_PCLKSEL1); - regval &= ~SYSCON_PCLKSEL1_I2C2_MASK; - regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL1_I2C2_SHIFT); - putreg32(regval, LPC17_SYSCON_PCLKSEL1); - - lpc17_configgpio(GPIO_I2C2_SCL); - lpc17_configgpio(GPIO_I2C2_SDA); - - putreg32 (LPC17_CCLK/CONFIG_I2C2_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); - putreg32 (LPC17_CCLK/CONFIG_I2C2_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); - } - else -#endif - { - return NULL; - } - putreg32(I2C_CONSET_I2EN,priv->base+LPC17_I2C_CONSET_OFFSET); - - sem_init (&priv->mutex, 0, 1); - sem_init (&priv->wait, 0, 0); - - /* Allocate a watchdog timer */ - priv->timeout = wd_create(); - - DEBUGASSERT(priv->timeout != 0); - - /* Attach Interrupt Handler */ - irq_attach (priv->irqid, i2c_interrupt); - - /* Enable Interrupt Handler */ - up_enable_irq(priv->irqid); - - /* Install our operations */ - priv->dev.ops = &lpc17_i2c_ops; - - return &priv->dev; -} - -/******************************************************************************* - * Name: up_i2cuninitalize - * - * Description: - * Uninitialise an I2C device - * - *******************************************************************************/ - -int up_i2cuninitialize(FAR struct i2c_dev_s * dev) -{ - struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; - - putreg32(I2C_CONCLRT_I2ENC,priv->base+LPC17_I2C_CONCLR_OFFSET); - up_disable_irq(priv->irqid); - irq_detach (priv->irqid); - return OK; -} - -#endif +/******************************************************************************* + * arch/arm/src/lpc17xx/lpc17_i2c.c + * + * Copyright (C) 2011 Li Zhuoyi. All rights reserved. + * Author: Li Zhuoyi + * History: 0.1 2011-08-20 initial version + * + * Derived from arch/arm/src/lpc31xx/lpc31_i2c.c + * + * Author: David Hewson + * + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + *******************************************************************************/ + +/******************************************************************************* + * Included Files + *******************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "wdog.h" +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "os_internal.h" + + +#include "lpc17_internal.h" +#include "lpc17_syscon.h" +#include "lpc17_pinconn.h" +#include "lpc17_i2c.h" + +#if defined(CONFIG_LPC17_I2C0) || defined(CONFIG_LPC17_I2C1) || defined(CONFIG_LPC17_I2C2) + +#ifndef GPIO_I2C1_SCL + #define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 + #define GPIO_I2C1_SDA GPIO_I2C1_SDA_1 +#endif +#ifndef CONFIG_I2C0_FREQ + #define CONFIG_I2C0_FREQ 100000 +#endif +#ifndef CONFIG_I2C1_FREQ + #define CONFIG_I2C1_FREQ 100000 +#endif +#ifndef CONFIG_I2C2_FREQ + #define CONFIG_I2C2_FREQ 100000 +#endif + +/******************************************************************************* + * Definitions + *******************************************************************************/ + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define I2C_TIMEOUT ((20 * CLK_TCK) / 1000) /* 20 mS */ + +/**************************************************************************** + * Private Data + ****************************************************************************/ +struct lpc17_i2cdev_s +{ + struct i2c_dev_s dev; /* Generic I2C device */ + struct i2c_msg_s msg; /* a single message for legacy read/write */ + unsigned int base; /* Base address of registers */ + uint16_t irqid; /* IRQ for this device */ + + sem_t mutex; /* Only one thread can access at a time */ + sem_t wait; /* Place to wait for state machine completion */ + volatile uint8_t state; /* State of state machine */ + WDOG_ID timeout; /* watchdog to timeout when bus hung */ + + uint16_t wrcnt; /* number of bytes sent to tx fifo */ + uint16_t rdcnt; /* number of bytes read from rx fifo */ +}; + +static struct lpc17_i2cdev_s i2cdevices[3]; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ +static int i2c_start (struct lpc17_i2cdev_s *priv); +static void i2c_stop (struct lpc17_i2cdev_s *priv); +static int i2c_interrupt (int irq, FAR void *context); +static void i2c_timeout (int argc, uint32_t arg, ...); + +/**************************************************************************** + * I2C device operations + ****************************************************************************/ + +static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency); +static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits); +static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen); +static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen); +static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count); + +struct i2c_ops_s lpc17_i2c_ops = +{ + .setfrequency = i2c_setfrequency, + .setaddress = i2c_setaddress, + .write = i2c_write, + .read = i2c_read, +#ifdef CONFIG_I2C_TRANSFER + .transfer = i2c_transfer +#endif +}; + +/******************************************************************************* + * Name: lpc17_i2c_setfrequency + * + * Description: + * Set the frequence for the next transfer + * + *******************************************************************************/ + +static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; + + if (frequency > 100000) + { + /* asymetric per 400Khz I2C spec */ + putreg32 ( LPC17_CCLK / (83 + 47) * 47 / frequency, priv->base + LPC17_I2C_SCLH_OFFSET); + putreg32 ( LPC17_CCLK / (83 + 47) * 83 / frequency, priv->base + LPC17_I2C_SCLL_OFFSET); + } + else + { + /* 50/50 mark space ratio */ + putreg32 (LPC17_CCLK / 100 * 50 / frequency, priv->base + LPC17_I2C_SCLH_OFFSET); + putreg32 (LPC17_CCLK / 100 * 50 / frequency, priv->base + LPC17_I2C_SCLL_OFFSET); + } + + /* FIXME: This function should return the actual selected frequency */ + return frequency; +} + +/******************************************************************************* + * Name: lpc17_i2c_setaddress + * + * Description: + * Set the I2C slave address for a subsequent read/write + * + *******************************************************************************/ +static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; + + DEBUGASSERT(dev != NULL); + DEBUGASSERT(nbits == 7 ); + + priv->msg.addr = addr<<1; + priv->msg.flags = 0 ; + + return OK; +} + +/******************************************************************************* + * Name: lpc17_i2c_write + * + * Description: + * Send a block of data on I2C using the previously selected I2C + * frequency and slave address. + * + *******************************************************************************/ +static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; + int ret; + + DEBUGASSERT (dev != NULL); + + priv->wrcnt=0; + priv->rdcnt=0; + priv->msg.addr &= ~0x01; + priv->msg.buffer = (uint8_t*)buffer; + priv->msg.length = buflen; + + ret = i2c_start (priv); + + return ret >0 ? OK : -ETIMEDOUT; +} + +/******************************************************************************* + * Name: lpc17_i2c_read + * + * Description: + * Receive a block of data on I2C using the previously selected I2C + * frequency and slave address. + * + *******************************************************************************/ +static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; + int ret; + + DEBUGASSERT (dev != NULL); + + priv->wrcnt=0; + priv->rdcnt=0; + priv->msg.addr |= 0x01; + priv->msg.buffer = buffer; + priv->msg.length = buflen; + + ret = i2c_start (priv); + + return ret >0 ? OK : -ETIMEDOUT; +} + +/******************************************************************************* + * Name: i2c_start + * + * Description: + * Perform a I2C transfer start + * + *******************************************************************************/ +static int i2c_start (struct lpc17_i2cdev_s *priv) +{ + int ret=-1; + sem_wait (&priv->mutex); + + putreg32(I2C_CONCLR_STAC|I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); + putreg32(I2C_CONSET_STA,priv->base+LPC17_I2C_CONSET_OFFSET); + + wd_start (priv->timeout, I2C_TIMEOUT, i2c_timeout, 1, (uint32_t)priv); + sem_wait(&priv->wait); + wd_cancel (priv->timeout); + sem_post (&priv->mutex); + + if( priv-> state == 0x18 || priv->state == 0x28) + ret=priv->wrcnt; + else if( priv-> state == 0x50 || priv->state == 0x58) + ret=priv->rdcnt; + return ret; +} + +/******************************************************************************* + * Name: i2c_stop + * + * Description: + * Perform a I2C transfer stop + * + *******************************************************************************/ +static void i2c_stop (struct lpc17_i2cdev_s *priv) +{ + if(priv->state!=0x38) + putreg32(I2C_CONSET_STO|I2C_CONSET_AA,priv->base+LPC17_I2C_CONSET_OFFSET); + sem_post (&priv->wait); +} + +/******************************************************************************* + * Name: i2c_timeout + * + * Description: + * Watchdog timer for timeout of I2C operation + * + *******************************************************************************/ + +static void i2c_timeout (int argc, uint32_t arg, ...) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) arg; + + irqstate_t flags = irqsave(); + priv->state = 0xff; + sem_post (&priv->wait); + irqrestore (flags); +} + +/******************************************************************************* + * Name: i2c_interrupt + * + * Description: + * The I2C Interrupt Handler + * + *******************************************************************************/ + +static int i2c_interrupt (int irq, FAR void *context) +{ + struct lpc17_i2cdev_s *priv; +#ifdef CONFIG_LPC17_I2C0 + if (irq == LPC17_IRQ_I2C0) + { + priv=&i2cdevices[0]; + } + else +#endif +#ifdef CONFIG_LPC17_I2C1 + if (irq == LPC17_IRQ_I2C1) + { + priv=&i2cdevices[1]; + } + else +#endif +#ifdef CONFIG_LPC17_I2C2 + if (irq == LPC17_IRQ_I2C2) + { + priv=&i2cdevices[2]; + } + else +#endif + { + PANIC(OSERR_INTERNAL); + } +/* + * refrence UM10360 19.10.5 + */ + uint32_t state = getreg32(priv->base+LPC17_I2C_STAT_OFFSET); + putreg32(I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); + priv->state=state; + state &=0xf8; + switch (state) + { + case 0x00: //Bus Error + case 0x20: + case 0x30: + case 0x38: + case 0x48: + i2c_stop(priv); + break; + case 0x08: //START + case 0x10: //Repeat START + putreg32(priv->msg.addr,priv->base+LPC17_I2C_DAT_OFFSET); + putreg32(I2C_CONCLR_STAC,priv->base+LPC17_I2C_CONCLR_OFFSET); + break; + case 0x18: + priv->wrcnt=0; + putreg32(priv->msg.buffer[0],priv->base+LPC17_I2C_DAT_OFFSET); + break; + case 0x28: + priv->wrcnt++; + if(priv->wrcntmsg.length) + putreg32(priv->msg.buffer[priv->wrcnt],priv->base+LPC17_I2C_DAT_OFFSET); + else + i2c_stop(priv); + break; + case 0x40: + priv->rdcnt=-1; + putreg32(I2C_CONSET_AA,priv->base+LPC17_I2C_CONSET_OFFSET); + break; + case 0x50: + priv->rdcnt++; + if(priv->rdcntmsg.length) + priv->msg.buffer[priv->rdcnt]=getreg32(priv->base+LPC17_I2C_BUFR_OFFSET); + if(priv->rdcnt>=priv->msg.length-1) + putreg32(I2C_CONCLR_AAC|I2C_CONCLR_SIC,priv->base+LPC17_I2C_CONCLR_OFFSET); + break; + case 0x58: + i2c_stop(priv); + break; + default: + i2c_stop(priv); + break; + } + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + + +/******************************************************************************* + * Name: up_i2cinitialize + * + * Description: + * Initialise an I2C device + * + *******************************************************************************/ + +struct i2c_dev_s *up_i2cinitialize(int port) +{ + struct lpc17_i2cdev_s *priv; + + if (port>2) + { + dbg("lpc I2C Only support 0,1,2\n"); + return NULL; + } + + irqstate_t flags; + uint32_t regval; + + flags = irqsave(); + + priv= &i2cdevices[port]; +#ifdef CONFIG_LPC17_I2C0 + if (port==0) + { + priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[0]; + priv->base = LPC17_I2C0_BASE; + priv->irqid = LPC17_IRQ_I2C0; + + regval = getreg32(LPC17_SYSCON_PCONP); + regval |= SYSCON_PCONP_PCI2C0; + putreg32(regval, LPC17_SYSCON_PCONP); + + regval = getreg32(LPC17_SYSCON_PCLKSEL0); + regval &= ~SYSCON_PCLKSEL0_I2C0_MASK; + regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL0_I2C0_SHIFT); + putreg32(regval, LPC17_SYSCON_PCLKSEL0); + + lpc17_configgpio(GPIO_I2C0_SCL); + lpc17_configgpio(GPIO_I2C0_SDA); + + putreg32 (LPC17_CCLK/CONFIG_I2C0_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); + putreg32 (LPC17_CCLK/CONFIG_I2C0_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); + + } + else +#endif +#ifdef CONFIG_LPC17_I2C1 + if(port==1) + { + priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[1]; + priv->base = LPC17_I2C1_BASE; + priv->irqid = LPC17_IRQ_I2C1; + + regval = getreg32(LPC17_SYSCON_PCONP); + regval |= SYSCON_PCONP_PCI2C1; + putreg32(regval, LPC17_SYSCON_PCONP); + + regval = getreg32(LPC17_SYSCON_PCLKSEL1); + regval &= ~SYSCON_PCLKSEL1_I2C1_MASK; + regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL1_I2C1_SHIFT); + putreg32(regval, LPC17_SYSCON_PCLKSEL1); + + lpc17_configgpio(GPIO_I2C1_SCL); + lpc17_configgpio(GPIO_I2C1_SDA); + + putreg32 (LPC17_CCLK/CONFIG_I2C1_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); + putreg32 (LPC17_CCLK/CONFIG_I2C1_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); + } + else +#endif +#ifdef CONFIG_LPC17_I2C2 + if(port==2) + { + priv= (FAR struct lpc17_i2cdev_s *)&i2cdevices[2]; + priv->base = LPC17_I2C2_BASE; + priv->irqid = LPC17_IRQ_I2C2; + + regval = getreg32(LPC17_SYSCON_PCONP); + regval |= SYSCON_PCONP_PCI2C2; + putreg32(regval, LPC17_SYSCON_PCONP); + + regval = getreg32(LPC17_SYSCON_PCLKSEL1); + regval &= ~SYSCON_PCLKSEL1_I2C2_MASK; + regval |= (SYSCON_PCLKSEL_CCLK << SYSCON_PCLKSEL1_I2C2_SHIFT); + putreg32(regval, LPC17_SYSCON_PCLKSEL1); + + lpc17_configgpio(GPIO_I2C2_SCL); + lpc17_configgpio(GPIO_I2C2_SDA); + + putreg32 (LPC17_CCLK/CONFIG_I2C2_FREQ/2, priv->base + LPC17_I2C_SCLH_OFFSET); + putreg32 (LPC17_CCLK/CONFIG_I2C2_FREQ/2, priv->base + LPC17_I2C_SCLL_OFFSET); + } + else +#endif + { + return NULL; + } + putreg32(I2C_CONSET_I2EN,priv->base+LPC17_I2C_CONSET_OFFSET); + + sem_init (&priv->mutex, 0, 1); + sem_init (&priv->wait, 0, 0); + + /* Allocate a watchdog timer */ + priv->timeout = wd_create(); + + DEBUGASSERT(priv->timeout != 0); + + /* Attach Interrupt Handler */ + irq_attach (priv->irqid, i2c_interrupt); + + /* Enable Interrupt Handler */ + up_enable_irq(priv->irqid); + + /* Install our operations */ + priv->dev.ops = &lpc17_i2c_ops; + + return &priv->dev; +} + +/******************************************************************************* + * Name: up_i2cuninitalize + * + * Description: + * Uninitialise an I2C device + * + *******************************************************************************/ + +int up_i2cuninitialize(FAR struct i2c_dev_s * dev) +{ + struct lpc17_i2cdev_s *priv = (struct lpc17_i2cdev_s *) dev; + + putreg32(I2C_CONCLRT_I2ENC,priv->base+LPC17_I2C_CONCLR_OFFSET); + up_disable_irq(priv->irqid); + irq_detach (priv->irqid); + return OK; +} + +#endif diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.h b/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.h index f8e098959f..10e1fbeac6 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_i2c.h @@ -1,208 +1,208 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_i2c.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_I2C_CONSET_OFFSET 0x0000 /* I2C Control Set Register */ -#define LPC17_I2C_STAT_OFFSET 0x0004 /* I2C Status Register */ -#define LPC17_I2C_DAT_OFFSET 0x0008 /* I2C Data Register */ -#define LPC17_I2C_ADR0_OFFSET 0x000c /* I2C Slave Address Register 0 */ -#define LPC17_I2C_SCLH_OFFSET 0x0010 /* SCH Duty Cycle Register High Half Word */ -#define LPC17_I2C_SCLL_OFFSET 0x0014 /* SCL Duty Cycle Register Low Half Word */ -#define LPC17_I2C_CONCLR_OFFSET 0x0018 /* I2C Control Clear Register */ -#define LPC17_I2C_MMCTRL_OFFSET 0x001c /* Monitor mode control register */ -#define LPC17_I2C_ADR1_OFFSET 0x0020 /* I2C Slave Address Register 1 */ -#define LPC17_I2C_ADR2_OFFSET 0x0024 /* I2C Slave Address Register 2 */ -#define LPC17_I2C_ADR3_OFFSET 0x0028 /* I2C Slave Address Register 3 */ -#define LPC17_I2C_BUFR_OFFSET 0x002c /* Data buffer register */ -#define LPC17_I2C_MASK0_OFFSET 0x0030 /* I2C Slave address mask register 0 */ -#define LPC17_I2C_MASK1_OFFSET 0x0034 /* I2C Slave address mask register 1 */ -#define LPC17_I2C_MASK2_OFFSET 0x0038 /* I2C Slave address mask register 2 */ -#define LPC17_I2C_MASK3_OFFSET 0x003c /* I2C Slave address mask register */ - -/* Register addresses ***************************************************************/ - -#define LPC17_I2C0_CONSET (LPC17_I2C0_BASE+LPC17_I2C_CONSET_OFFSET) -#define LPC17_I2C0_STAT (LPC17_I2C0_BASE+LPC17_I2C_STAT_OFFSET) -#define LPC17_I2C0_DAT (LPC17_I2C0_BASE+LPC17_I2C_DAT_OFFSET) -#define LPC17_I2C0_ADR0 (LPC17_I2C0_BASE+LPC17_I2C_ADR0_OFFSET) -#define LPC17_I2C0_SCLH (LPC17_I2C0_BASE+LPC17_I2C_SCLH_OFFSET) -#define LPC17_I2C0_SCLL (LPC17_I2C0_BASE+LPC17_I2C_SCLL_OFFSET) -#define LPC17_I2C0_CONCLR (LPC17_I2C0_BASE+LPC17_I2C_CONCLR_OFFSET) -#define LPC17_I2C0_MMCTRL (LPC17_I2C0_BASE+LPC17_I2C_MMCTRL_OFFSET) -#define LPC17_I2C0_ADR1 (LPC17_I2C0_BASE+LPC17_I2C_ADR1_OFFSET) -#define LPC17_I2C0_ADR2 (LPC17_I2C0_BASE+LPC17_I2C_ADR2_OFFSET) -#define LPC17_I2C0_ADR3 (LPC17_I2C0_BASE+LPC17_I2C_ADR3_OFFSET) -#define LPC17_I2C0_BUFR (LPC17_I2C0_BASE+LPC17_I2C_BUFR_OFFSET) -#define LPC17_I2C0_MASK0 (LPC17_I2C0_BASE+LPC17_I2C_MASK0_OFFSET) -#define LPC17_I2C0_MASK1 (LPC17_I2C0_BASE+LPC17_I2C_MASK1_OFFSET) -#define LPC17_I2C0_MASK2 (LPC17_I2C0_BASE+LPC17_I2C_MASK2_OFFSET) -#define LPC17_I2C0_MASK3 (LPC17_I2C0_BASE+LPC17_I2C_MASK3_OFFSET) - -#define LPC17_I2C1_CONSET (LPC17_I2C1_BASE+LPC17_I2C_CONSET_OFFSET) -#define LPC17_I2C1_STAT (LPC17_I2C1_BASE+LPC17_I2C_STAT_OFFSET) -#define LPC17_I2C1_DAT (LPC17_I2C1_BASE+LPC17_I2C_DAT_OFFSET) -#define LPC17_I2C1_ADR0 (LPC17_I2C1_BASE+LPC17_I2C_ADR0_OFFSET) -#define LPC17_I2C1_SCLH (LPC17_I2C1_BASE+LPC17_I2C_SCLH_OFFSET) -#define LPC17_I2C1_SCLL (LPC17_I2C1_BASE+LPC17_I2C_SCLL_OFFSET) -#define LPC17_I2C1_CONCLR (LPC17_I2C1_BASE+LPC17_I2C_CONCLR_OFFSET) -#define LPC17_I2C1_MMCTRL (LPC17_I2C1_BASE+LPC17_I2C_MMCTRL_OFFSET) -#define LPC17_I2C1_ADR1 (LPC17_I2C1_BASE+LPC17_I2C_ADR1_OFFSET) -#define LPC17_I2C1_ADR2 (LPC17_I2C1_BASE+LPC17_I2C_ADR2_OFFSET) -#define LPC17_I2C1_ADR3 (LPC17_I2C1_BASE+LPC17_I2C_ADR3_OFFSET) -#define LPC17_I2C1_BUFR (LPC17_I2C1_BASE+LPC17_I2C_BUFR_OFFSET) -#define LPC17_I2C1_MASK0 (LPC17_I2C1_BASE+LPC17_I2C_MASK0_OFFSET) -#define LPC17_I2C1_MASK1 (LPC17_I2C1_BASE+LPC17_I2C_MASK1_OFFSET) -#define LPC17_I2C1_MASK2 (LPC17_I2C1_BASE+LPC17_I2C_MASK2_OFFSET) -#define LPC17_I2C1_MASK3 (LPC17_I2C1_BASE+LPC17_I2C_MASK3_OFFSET) - -#define LPC17_I2C2_CONSET (LPC17_I2C2_BASE+LPC17_I2C_CONSET_OFFSET) -#define LPC17_I2C2_STAT (LPC17_I2C2_BASE+LPC17_I2C_STAT_OFFSET) -#define LPC17_I2C2_DAT (LPC17_I2C2_BASE+LPC17_I2C_DAT_OFFSET) -#define LPC17_I2C2_ADR0 (LPC17_I2C2_BASE+LPC17_I2C_ADR0_OFFSET) -#define LPC17_I2C2_SCLH (LPC17_I2C2_BASE+LPC17_I2C_SCLH_OFFSET) -#define LPC17_I2C2_SCLL (LPC17_I2C2_BASE+LPC17_I2C_SCLL_OFFSET) -#define LPC17_I2C2_CONCLR (LPC17_I2C2_BASE+LPC17_I2C_CONCLR_OFFSET) -#define LPC17_I2C2_MMCTRL (LPC17_I2C2_BASE+LPC17_I2C_MMCTRL_OFFSET) -#define LPC17_I2C2_ADR1 (LPC17_I2C2_BASE+LPC17_I2C_ADR1_OFFSET) -#define LPC17_I2C2_ADR2 (LPC17_I2C2_BASE+LPC17_I2C_ADR2_OFFSET) -#define LPC17_I2C2_ADR3 (LPC17_I2C2_BASE+LPC17_I2C_ADR3_OFFSET) -#define LPC17_I2C2_BUFR (LPC17_I2C2_BASE+LPC17_I2C_BUFR_OFFSET) -#define LPC17_I2C2_MASK0 (LPC17_I2C2_BASE+LPC17_I2C_MASK0_OFFSET) -#define LPC17_I2C2_MASK1 (LPC17_I2C2_BASE+LPC17_I2C_MASK1_OFFSET) -#define LPC17_I2C2_MASK2 (LPC17_I2C2_BASE+LPC17_I2C_MASK2_OFFSET) -#define LPC17_I2C2_MASK3 (LPC17_I2C2_BASE+LPC17_I2C_MASK3_OFFSET) - -/* Register bit definitions *********************************************************/ -/* I2C Control Set Register */ - /* Bits 0-1: Reserved */ -#define I2C_CONSET_AA (1 << 2) /* Bit 2: Assert acknowledge flag */ -#define I2C_CONSET_SI (1 << 3) /* Bit 3: I2C interrupt flag */ -#define I2C_CONSET_STO (1 << 4) /* Bit 4: STOP flag */ -#define I2C_CONSET_STA (1 << 5) /* Bit 5: START flag */ -#define I2C_CONSET_I2EN (1 << 6) /* Bit 6: I2C interface enable */ - /* Bits 7-31: Reserved */ -/* I2C Control Clear Register */ - /* Bits 0-1: Reserved */ -#define I2C_CONCLR_AAC (1 << 2) /* Bit 2: Assert acknowledge Clear bit */ -#define I2C_CONCLR_SIC (1 << 3) /* Bit 3: I2C interrupt Clear bit */ - /* Bit 4: Reserved */ -#define I2C_CONCLR_STAC (1 << 5) /* Bit 5: START flag Clear bit */ -#define I2C_CONCLRT_I2ENC (1 << 6) /* Bit 6: I2C interface Disable bit */ - /* Bits 7-31: Reserved */ -/* I2C Status Register - * - * See tables 399-402 in the "LPC17xx User Manual" (UM10360), Rev. 01, 4 January - * 2010, NXP for definitions of status codes. - */ - -#define I2C_STAT_MASK (0xff) /* Bits 0-7: I2C interface status - * Bits 0-1 always zero */ - /* Bits 8-31: Reserved */ -/* I2C Data Register */ - -#define I2C_DAT_MASK (0xff) /* Bits 0-7: I2C data */ - /* Bits 8-31: Reserved */ -/* Monitor mode control register */ - -#define I2C_MMCTRL_MMENA (1 << 0) /* Bit 0: Monitor mode enable */ -#define I2C_MMCTRL_ENASCL (1 << 1) /* Bit 1: SCL output enable */ -#define I2C_MMCTRL_MATCHALL (1 << 2) /* Bit 2: Select interrupt register match */ - /* Bits 3-31: Reserved */ -/* Data buffer register */ - -#define I2C_BUFR_MASK (0xff) /* Bits 0-7: 8 MSBs of the I2DAT shift register */ - /* Bits 8-31: Reserved */ -/* I2C Slave address registers: - * - * I2C Slave Address Register 0 - * I2C Slave Address Register 1 - * I2C Slave Address Register 2 - * I2C Slave Address Register 3 - */ - -#define I2C_ADR_GC (1 << 0) /* Bit 0: GC General Call enable bit */ -#define I2C_ADR_ADDR_SHIFT (1) /* Bits 1-7: I2C slave address */ -#define I2C_ADR_ADDR_MASK (0x7f << I2C_ADR_ADDR_SHIFT) - /* Bits 8-31: Reserved */ -/* I2C Slave address mask registers: - * - * I2C Slave address mask register 0 - * I2C Slave address mask register 1 - * I2C Slave address mask register 2 - * I2C Slave address mask register 3 - */ - /* Bit 0: Reserved */ -#define I2C_MASK_SHIFT (1) /* Bits 1-7: I2C mask bits */ -#define I2C_MASK_MASK (0x7f << I2C_ADR_ADDR_SHIFT) - /* Bits 8-31: Reserved */ -/* SCH Duty Cycle Register High Half Word */ - -#define I2C_SCLH_MASK (0xffff) /* Bit 0-15: Count for SCL HIGH time period selection */ - /* Bits 16-31: Reserved */ -/* SCL Duty Cycle Register Low Half Word */ - -#define I2C_SCLL_MASK (0xffff) /* Bit 0-15: Count for SCL LOW time period selection */ - /* Bits 16-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_i2c.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_I2C_CONSET_OFFSET 0x0000 /* I2C Control Set Register */ +#define LPC17_I2C_STAT_OFFSET 0x0004 /* I2C Status Register */ +#define LPC17_I2C_DAT_OFFSET 0x0008 /* I2C Data Register */ +#define LPC17_I2C_ADR0_OFFSET 0x000c /* I2C Slave Address Register 0 */ +#define LPC17_I2C_SCLH_OFFSET 0x0010 /* SCH Duty Cycle Register High Half Word */ +#define LPC17_I2C_SCLL_OFFSET 0x0014 /* SCL Duty Cycle Register Low Half Word */ +#define LPC17_I2C_CONCLR_OFFSET 0x0018 /* I2C Control Clear Register */ +#define LPC17_I2C_MMCTRL_OFFSET 0x001c /* Monitor mode control register */ +#define LPC17_I2C_ADR1_OFFSET 0x0020 /* I2C Slave Address Register 1 */ +#define LPC17_I2C_ADR2_OFFSET 0x0024 /* I2C Slave Address Register 2 */ +#define LPC17_I2C_ADR3_OFFSET 0x0028 /* I2C Slave Address Register 3 */ +#define LPC17_I2C_BUFR_OFFSET 0x002c /* Data buffer register */ +#define LPC17_I2C_MASK0_OFFSET 0x0030 /* I2C Slave address mask register 0 */ +#define LPC17_I2C_MASK1_OFFSET 0x0034 /* I2C Slave address mask register 1 */ +#define LPC17_I2C_MASK2_OFFSET 0x0038 /* I2C Slave address mask register 2 */ +#define LPC17_I2C_MASK3_OFFSET 0x003c /* I2C Slave address mask register */ + +/* Register addresses ***************************************************************/ + +#define LPC17_I2C0_CONSET (LPC17_I2C0_BASE+LPC17_I2C_CONSET_OFFSET) +#define LPC17_I2C0_STAT (LPC17_I2C0_BASE+LPC17_I2C_STAT_OFFSET) +#define LPC17_I2C0_DAT (LPC17_I2C0_BASE+LPC17_I2C_DAT_OFFSET) +#define LPC17_I2C0_ADR0 (LPC17_I2C0_BASE+LPC17_I2C_ADR0_OFFSET) +#define LPC17_I2C0_SCLH (LPC17_I2C0_BASE+LPC17_I2C_SCLH_OFFSET) +#define LPC17_I2C0_SCLL (LPC17_I2C0_BASE+LPC17_I2C_SCLL_OFFSET) +#define LPC17_I2C0_CONCLR (LPC17_I2C0_BASE+LPC17_I2C_CONCLR_OFFSET) +#define LPC17_I2C0_MMCTRL (LPC17_I2C0_BASE+LPC17_I2C_MMCTRL_OFFSET) +#define LPC17_I2C0_ADR1 (LPC17_I2C0_BASE+LPC17_I2C_ADR1_OFFSET) +#define LPC17_I2C0_ADR2 (LPC17_I2C0_BASE+LPC17_I2C_ADR2_OFFSET) +#define LPC17_I2C0_ADR3 (LPC17_I2C0_BASE+LPC17_I2C_ADR3_OFFSET) +#define LPC17_I2C0_BUFR (LPC17_I2C0_BASE+LPC17_I2C_BUFR_OFFSET) +#define LPC17_I2C0_MASK0 (LPC17_I2C0_BASE+LPC17_I2C_MASK0_OFFSET) +#define LPC17_I2C0_MASK1 (LPC17_I2C0_BASE+LPC17_I2C_MASK1_OFFSET) +#define LPC17_I2C0_MASK2 (LPC17_I2C0_BASE+LPC17_I2C_MASK2_OFFSET) +#define LPC17_I2C0_MASK3 (LPC17_I2C0_BASE+LPC17_I2C_MASK3_OFFSET) + +#define LPC17_I2C1_CONSET (LPC17_I2C1_BASE+LPC17_I2C_CONSET_OFFSET) +#define LPC17_I2C1_STAT (LPC17_I2C1_BASE+LPC17_I2C_STAT_OFFSET) +#define LPC17_I2C1_DAT (LPC17_I2C1_BASE+LPC17_I2C_DAT_OFFSET) +#define LPC17_I2C1_ADR0 (LPC17_I2C1_BASE+LPC17_I2C_ADR0_OFFSET) +#define LPC17_I2C1_SCLH (LPC17_I2C1_BASE+LPC17_I2C_SCLH_OFFSET) +#define LPC17_I2C1_SCLL (LPC17_I2C1_BASE+LPC17_I2C_SCLL_OFFSET) +#define LPC17_I2C1_CONCLR (LPC17_I2C1_BASE+LPC17_I2C_CONCLR_OFFSET) +#define LPC17_I2C1_MMCTRL (LPC17_I2C1_BASE+LPC17_I2C_MMCTRL_OFFSET) +#define LPC17_I2C1_ADR1 (LPC17_I2C1_BASE+LPC17_I2C_ADR1_OFFSET) +#define LPC17_I2C1_ADR2 (LPC17_I2C1_BASE+LPC17_I2C_ADR2_OFFSET) +#define LPC17_I2C1_ADR3 (LPC17_I2C1_BASE+LPC17_I2C_ADR3_OFFSET) +#define LPC17_I2C1_BUFR (LPC17_I2C1_BASE+LPC17_I2C_BUFR_OFFSET) +#define LPC17_I2C1_MASK0 (LPC17_I2C1_BASE+LPC17_I2C_MASK0_OFFSET) +#define LPC17_I2C1_MASK1 (LPC17_I2C1_BASE+LPC17_I2C_MASK1_OFFSET) +#define LPC17_I2C1_MASK2 (LPC17_I2C1_BASE+LPC17_I2C_MASK2_OFFSET) +#define LPC17_I2C1_MASK3 (LPC17_I2C1_BASE+LPC17_I2C_MASK3_OFFSET) + +#define LPC17_I2C2_CONSET (LPC17_I2C2_BASE+LPC17_I2C_CONSET_OFFSET) +#define LPC17_I2C2_STAT (LPC17_I2C2_BASE+LPC17_I2C_STAT_OFFSET) +#define LPC17_I2C2_DAT (LPC17_I2C2_BASE+LPC17_I2C_DAT_OFFSET) +#define LPC17_I2C2_ADR0 (LPC17_I2C2_BASE+LPC17_I2C_ADR0_OFFSET) +#define LPC17_I2C2_SCLH (LPC17_I2C2_BASE+LPC17_I2C_SCLH_OFFSET) +#define LPC17_I2C2_SCLL (LPC17_I2C2_BASE+LPC17_I2C_SCLL_OFFSET) +#define LPC17_I2C2_CONCLR (LPC17_I2C2_BASE+LPC17_I2C_CONCLR_OFFSET) +#define LPC17_I2C2_MMCTRL (LPC17_I2C2_BASE+LPC17_I2C_MMCTRL_OFFSET) +#define LPC17_I2C2_ADR1 (LPC17_I2C2_BASE+LPC17_I2C_ADR1_OFFSET) +#define LPC17_I2C2_ADR2 (LPC17_I2C2_BASE+LPC17_I2C_ADR2_OFFSET) +#define LPC17_I2C2_ADR3 (LPC17_I2C2_BASE+LPC17_I2C_ADR3_OFFSET) +#define LPC17_I2C2_BUFR (LPC17_I2C2_BASE+LPC17_I2C_BUFR_OFFSET) +#define LPC17_I2C2_MASK0 (LPC17_I2C2_BASE+LPC17_I2C_MASK0_OFFSET) +#define LPC17_I2C2_MASK1 (LPC17_I2C2_BASE+LPC17_I2C_MASK1_OFFSET) +#define LPC17_I2C2_MASK2 (LPC17_I2C2_BASE+LPC17_I2C_MASK2_OFFSET) +#define LPC17_I2C2_MASK3 (LPC17_I2C2_BASE+LPC17_I2C_MASK3_OFFSET) + +/* Register bit definitions *********************************************************/ +/* I2C Control Set Register */ + /* Bits 0-1: Reserved */ +#define I2C_CONSET_AA (1 << 2) /* Bit 2: Assert acknowledge flag */ +#define I2C_CONSET_SI (1 << 3) /* Bit 3: I2C interrupt flag */ +#define I2C_CONSET_STO (1 << 4) /* Bit 4: STOP flag */ +#define I2C_CONSET_STA (1 << 5) /* Bit 5: START flag */ +#define I2C_CONSET_I2EN (1 << 6) /* Bit 6: I2C interface enable */ + /* Bits 7-31: Reserved */ +/* I2C Control Clear Register */ + /* Bits 0-1: Reserved */ +#define I2C_CONCLR_AAC (1 << 2) /* Bit 2: Assert acknowledge Clear bit */ +#define I2C_CONCLR_SIC (1 << 3) /* Bit 3: I2C interrupt Clear bit */ + /* Bit 4: Reserved */ +#define I2C_CONCLR_STAC (1 << 5) /* Bit 5: START flag Clear bit */ +#define I2C_CONCLRT_I2ENC (1 << 6) /* Bit 6: I2C interface Disable bit */ + /* Bits 7-31: Reserved */ +/* I2C Status Register + * + * See tables 399-402 in the "LPC17xx User Manual" (UM10360), Rev. 01, 4 January + * 2010, NXP for definitions of status codes. + */ + +#define I2C_STAT_MASK (0xff) /* Bits 0-7: I2C interface status + * Bits 0-1 always zero */ + /* Bits 8-31: Reserved */ +/* I2C Data Register */ + +#define I2C_DAT_MASK (0xff) /* Bits 0-7: I2C data */ + /* Bits 8-31: Reserved */ +/* Monitor mode control register */ + +#define I2C_MMCTRL_MMENA (1 << 0) /* Bit 0: Monitor mode enable */ +#define I2C_MMCTRL_ENASCL (1 << 1) /* Bit 1: SCL output enable */ +#define I2C_MMCTRL_MATCHALL (1 << 2) /* Bit 2: Select interrupt register match */ + /* Bits 3-31: Reserved */ +/* Data buffer register */ + +#define I2C_BUFR_MASK (0xff) /* Bits 0-7: 8 MSBs of the I2DAT shift register */ + /* Bits 8-31: Reserved */ +/* I2C Slave address registers: + * + * I2C Slave Address Register 0 + * I2C Slave Address Register 1 + * I2C Slave Address Register 2 + * I2C Slave Address Register 3 + */ + +#define I2C_ADR_GC (1 << 0) /* Bit 0: GC General Call enable bit */ +#define I2C_ADR_ADDR_SHIFT (1) /* Bits 1-7: I2C slave address */ +#define I2C_ADR_ADDR_MASK (0x7f << I2C_ADR_ADDR_SHIFT) + /* Bits 8-31: Reserved */ +/* I2C Slave address mask registers: + * + * I2C Slave address mask register 0 + * I2C Slave address mask register 1 + * I2C Slave address mask register 2 + * I2C Slave address mask register 3 + */ + /* Bit 0: Reserved */ +#define I2C_MASK_SHIFT (1) /* Bits 1-7: I2C mask bits */ +#define I2C_MASK_MASK (0x7f << I2C_ADR_ADDR_SHIFT) + /* Bits 8-31: Reserved */ +/* SCH Duty Cycle Register High Half Word */ + +#define I2C_SCLH_MASK (0xffff) /* Bit 0-15: Count for SCL HIGH time period selection */ + /* Bits 16-31: Reserved */ +/* SCL Duty Cycle Register Low Half Word */ + +#define I2C_SCLL_MASK (0xffff) /* Bit 0-15: Count for SCL LOW time period selection */ + /* Bits 16-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_I2C_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_mcpwm.h b/nuttx/arch/arm/src/lpc17xx/lpc17_mcpwm.h index 0d562854fd..370aa42de3 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_mcpwm.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_mcpwm.h @@ -1,280 +1,280 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_mcpwm.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_MCPWM_CON_OFFSET 0x0000 /* PWM Control read address */ -#define LPC17_MCPWM_CONSET_OFFSET 0x0004 /* PWM Control set address */ -#define LPC17_MCPWM_CONCLR_OFFSET 0x0008 /* PWM Control clear address */ -#define LPC17_MCPWM_CAPCON_OFFSET 0x000c /* Capture Control read address */ -#define LPC17_MCPWM_CAPCONSET_OFFSET 0x0010 /* Capture Control set address */ -#define LPC17_MCPWM_CAPCONCLR_OFFSET 0x0014 /* Event Control clear address */ -#define LPC17_MCPWM_TC0_OFFSET 0x0018 /* Timer Counter register, channel 0 */ -#define LPC17_MCPWM_TC1_OFFSET 0x001c /* Timer Counter register, channel 1 */ -#define LPC17_MCPWM_TC2_OFFSET 0x0020 /* Timer Counter register, channel 2 */ -#define LPC17_MCPWM_LIM0_OFFSET 0x0024 /* Limit register, channel 0 */ -#define LPC17_MCPWM_LIM1_OFFSET 0x0028 /* Limit register, channel 1 */ -#define LPC17_MCPWM_LIM2_OFFSET 0x002c /* Limit register, channel 2 */ -#define LPC17_MCPWM_MAT0_OFFSET 0x0030 /* Match register, channel 0 */ -#define LPC17_MCPWM_MAT1_OFFSET 0x0034 /* Match register, channel 1 */ -#define LPC17_MCPWM_MAT2_OFFSET 0x0038 /* Match register, channel 2 */ -#define LPC17_MCPWM_DT_OFFSET 0x003c /* Dead time register */ -#define LPC17_MCPWM_CP_OFFSET 0x0040 /* Commutation Pattern register */ -#define LPC17_MCPWM_CAP0_OFFSET 0x0044 /* Capture register, channel 0 */ -#define LPC17_MCPWM_CAP1_OFFSET 0x0048 /* Capture register, channel 1 */ -#define LPC17_MCPWM_CAP2_OFFSET 0x004c /* Capture register, channel 2 */ -#define LPC17_MCPWM_INTEN_OFFSET 0x0050 /* Interrupt Enable read address */ -#define LPC17_MCPWM_INTENSET_OFFSET 0x0054 /* Interrupt Enable set address */ -#define LPC17_MCPWM_INTENCLR_OFFSET 0x0058 /* Interrupt Enable clear address */ -#define LPC17_MCPWM_CNTCON_OFFSET 0x005c /* Count Control read address */ -#define LPC17_MCPWM_CNTCONSET_OFFSET 0x0060 /* Count Control set address */ -#define LPC17_MCPWM_CNTCONCLR_OFFSET 0x0064 /* Count Control clear address */ -#define LPC17_MCPWM_INTF_OFFSET 0x0068 /* Interrupt flags read address */ -#define LPC17_MCPWM_INTFSET_OFFSET 0x006c /* Interrupt flags set address */ -#define LPC17_MCPWM_INTFCLR_OFFSET 0x0070 /* Interrupt flags clear address */ -#define LPC17_MCPWM_CAPCLR_OFFSET 0x0074 /* Capture clear address */ - -/* Register addresses ***************************************************************/ - -#define LPC17_MCPWM_CON (LPC17_MCPWM_BASE+LPC17_MCPWM_CON_OFFSET) -#define LPC17_MCPWM_CONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CONSET_OFFSET) -#define LPC17_MCPWM_CONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CONCLR_OFFSET) -#define LPC17_MCPWM_CAPCON (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCON_OFFSET) -#define LPC17_MCPWM_CAPCONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCONSET_OFFSET) -#define LPC17_MCPWM_CAPCONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCONCLR_OFFSET) -#define LPC17_MCPWM_TC0 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC0_OFFSET) -#define LPC17_MCPWM_TC1 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC1_OFFSET) -#define LPC17_MCPWM_TC2 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC2_OFFSET) -#define LPC17_MCPWM_LIM0 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM0_OFFSET) -#define LPC17_MCPWM_LIM1 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM1_OFFSET) -#define LPC17_MCPWM_LIM2 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM2_OFFSET) -#define LPC17_MCPWM_MAT0 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT0_OFFSET) -#define LPC17_MCPWM_MAT1 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT1_OFFSET) -#define LPC17_MCPWM_MAT2 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT2_OFFSET) -#define LPC17_MCPWM_DT (LPC17_MCPWM_BASE+LPC17_MCPWM_DT_OFFSET) -#define LPC17_MCPWM_CP (LPC17_MCPWM_BASE+LPC17_MCPWM_CP_OFFSET) -#define LPC17_MCPWM_CAP0 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP0_OFFSET) -#define LPC17_MCPWM_CAP1 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP1_OFFSET) -#define LPC17_MCPWM_CAP2 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP2_OFFSET) -#define LPC17_MCPWM_INTEN (LPC17_MCPWM_BASE+LPC17_MCPWM_INTEN_OFFSET) -#define LPC17_MCPWM_INTENSET (LPC17_MCPWM_BASE+LPC17_MCPWM_INTENSET_OFFSET) -#define LPC17_MCPWM_INTENCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_INTENCLR_OFFSET) -#define LPC17_MCPWM_CNTCON (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCON_OFFSET) -#define LPC17_MCPWM_CNTCONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCONSET_OFFSET) -#define LPC17_MCPWM_CNTCONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCONCLR_OFFSET) -#define LPC17_MCPWM_INTF (LPC17_MCPWM_BASE+LPC17_MCPWM_INTF_OFFSET) -#define LPC17_MCPWM_INTFSET (LPC17_MCPWM_BASE+LPC17_MCPWM_INTFSET_OFFSET) -#define LPC17_MCPWM_INTFCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_INTFCLR_OFFSET) -#define LPC17_MCPWM_CAPCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCLR_OFFSET) - -/* Register bit definitions *********************************************************/ -/* There are no bit field definitions for the following registers because they support - * 32-bit values: - * - * - Timer Counter register, channel 0 (TC0), Timer Counter register, channel 1 (TC1), - * and Timer Counter register, channel 2 (TC2): 32-bit Timer/Counter values for - * channels 0, 1, 2 (no bit field definitions) - * - * - Limit register, channel 0 (LIM0), Limit register, channel 1 (LIM1), and Limit - * register, channel 2 (LIM2): 32-bit Limit values for TC0, 1, 2 (no bit field - * definitions) - * - * - Match register, channel 0 MAT0), Match register, channel 1 (MAT1), and Match - * register, channel 2 (MAT2): 32-bit Match values for TC0, 1, 2 (no bit field - * definitions). - * - * - Capture register, channel 0 (CAP0), Capture register, channel 1 (CAP1), and - * Capture register, channel 2 (CAP2): 32-bit TC value at a capture event for - * channels 0, 1, 2 (no bit field definitions) - */ - -/* PWM Control read address (CON), PWM Control set address (CONSET), and PWM Control - * clear address (CONCLR) common regiser bit definitions. - */ - -#define MCPWM_CON_RUN0 (1 << 0) /* Bit 0: Stops/starts timer channel 0 */ -#define MCPWM_CON_CENTER0 (1 << 1) /* Bit 1: Chan 0 edge/center aligned operation */ -#define MCPWM_CON_POLA0 (1 << 2) /* Bit 2: Polarity of MCOA0 and MCOB0 */ -#define MCPWM_CON_DTE0 (1 << 3) /* Bit 3: Dead time feature control */ -#define MCPWM_CON_DISUP0 (1 << 4) /* Bit 4: Enable/disable register updates */ - /* Bits 5-7: Reserved */ -#define MCPWM_CON_RUN1 (1 << 8) /* Bit 8: Stops/starts timer channel 1 */ -#define MCPWM_CON_CENTER1 (1 << 9) /* Bit 9: Chan 1 edge/center aligned operation */ -#define MCPWM_CON_POLA1 (1 << 10) /* Bit 10: Polarity of MCOA1 and MCOB1 */ -#define MCPWM_CON_DTE1 (1 << 11) /* Bit 11: Dead time feature control */ -#define MCPWM_CON_DISUP1 (1 << 12) /* Bit 12: Enable/disable register updates */ - /* Bits 13-15: Reserved */ -#define MCPWM_CON_RUN2 (1 << 16) /* Bit 16: Stops/starts timer channel 2 */ -#define MCPWM_CON_CENTER2 (1 << 17) /* Bit 17: Chan 2 edge/center aligned operation */ -#define MCPWM_CON_POLA2 (1 << 18) /* Bit 18: Polarity of MCOA1 and MCOB1 */ -#define MCPWM_CON_DTE2 (1 << 19) /* Bit 19: Dead time feature control */ -#define MCPWM_CON_DISUP2 (1 << 20) /* Bit 20: Enable/disable register updates */ - /* Bits 21-28: Reserved */ -#define MCPWM_CON_INVBDC (1 << 29) /* Bit 29: Polarity of MCOB outputs (all channels) */ -#define MCPWM_CON_ACMODE (1 << 30) /* Bit 30: 3-phase AC mode select */ -#define MCPWM_CON_DCMODE (1 << 31) /* Bit 31: 3-phase DC mode select */ - -/* Capture Control read address (CAPCON), Capture Control set address (CAPCONSET), - * and Event Control clear address (CAPCONCLR) common register bit defintions - */ - -#define MCPWM_CAPCON_CAP0MCI0RE (1 << 0) /* Bit 0: Enable chan0 rising edge capture MCI0 */ -#define MCPWM_CAPCON_CAP0MCI0FE (1 << 1) /* Bit 1: Enable chan 0 falling edge capture MCI0 */ -#define MCPWM_CAPCON_CAP0MCI1RE (1 << 2) /* Bit 2: Enable chan 0 rising edge capture MCI1 */ -#define MCPWM_CAPCON_CAP0MCI1FE (1 << 3) /* Bit 3: Enable chan 0 falling edge capture MCI1 */ -#define MCPWM_CAPCON_CAP0MCI2RE (1 << 4) /* Bit 4: Enable chan 0 rising edge capture MCI2 */ -#define MCPWM_CAPCON_CAP0MCI2FE (1 << 5) /* Bit 5: Enable chan 0 falling edge capture MCI2 */ -#define MCPWM_CAPCON_CAP1MCI0RE (1 << 6) /* Bit 6: Enable chan 1 rising edge capture MCI0 */ -#define MCPWM_CAPCON_CAP1MCI0FE (1 << 7) /* Bit 7: Enable chan 1 falling edge capture MCI0 */ -#define MCPWM_CAPCON_CAP1MCI1RE (1 << 8) /* Bit 8: Enable chan 1 rising edge capture MCI1 */ -#define MCPWM_CAPCON_CAP1MCI1FE (1 << 9) /* Bit 9: Enable chan 1 falling edge capture MCI1 */ -#define MCPWM_CAPCON_CAP1MCI2RE (1 << 10) /* Bit 10: Enable chan 1 rising edge capture MCI2 */ -#define MCPWM_CAPCON_CAP1MCI2FE (1 << 11) /* Bit 11: Enable chan 1 falling edge capture MCI2 */ -#define MCPWM_CAPCON_CAP2MCI0RE (1 << 12) /* Bit 12: Enable chan 2 rising edge capture MCI0 */ -#define MCPWM_CAPCON_CAP2MCI0FE (1 << 13) /* Bit 13: Enable chan 2 falling edge capture MCI0 */ -#define MCPWM_CAPCON_CAP2MCI1RE (1 << 14) /* Bit 14: Enable chan 2 rising edge capture MCI1 */ -#define MCPWM_CAPCON_CAP2MCI1FE (1 << 15) /* Bit 15: Enable chan 2 falling edge capture MCI1 */ -#define MCPWM_CAPCON_CAP2MCI2RE (1 << 16) /* Bit 16: Enable chan 2 rising edge capture MCI2 */ -#define MCPWM_CAPCON_CAP2MCI2FE (1 << 17) /* Bit 17: Enable chan 2 falling edge capture MCI2 */ -#define MCPWM_CAPCON_RT0 (1 << 18) /* Bit 18: TC0 reset by chan 0 capture event */ -#define MCPWM_CAPCON_RT1 (1 << 19) /* Bit 19: TC1 reset by chan 1 capture event */ -#define MCPWM_CAPCON_RT2 (1 << 20) /* Bit 20: TC2 reset by chan 2 capture event */ -#define MCPWM_CAPCON_HNFCAP0 (1 << 21) /* Bit 21: Hardware noise filter */ -#define MCPWM_CAPCON_HNFCAP1 (1 << 22) /* Bit 22: Hardware noise filter */ -#define MCPWM_CAPCON_HNFCAP2 (1 << 23) /* Bit 23: Hardware noise filter */ - /* Bits 24-31: Reserved -/* Dead time register */ - -#define MCPWM_DT_DT0_SHIFT (0) /* Bits 0-9: Dead time for channel 0 */ -#define MCPWM_DT_DT0_MASK (0x03ff << MCPWM_DT_DT0_SHIFT) -#define MCPWM_DT_DT1_SHIFT (10) /* Bits 10-19: Dead time for channel 1 */ -#define MCPWM_DT_DT1_MASK (0x03ff << MCPWM_DT_DT1_SHIFT) -#define MCPWM_DT_DT2_SHIFT (20) /* Bits 20-29: Dead time for channel 2 */ -#define MCPWM_DT_DT2_MASK (0x03ff << MCPWM_DT_DT2_SHIFT) - /* Bits 30-31: reserved */ -/* Commutation Pattern register */ - -#define MCPWM_CP_CCPA0 (1 << 0) /* Bit 0: Iinternal MCOA0 */ -#define MCPWM_CP_CCPB0 (1 << 1) /* Bit 1: MCOB0 tracks internal MCOA0 */ -#define MCPWM_CP_CCPA1 (1 << 2) /* Bit 2: MCOA1 tracks internal MCOA0 */ -#define MCPWM_CP_CCPB1 (1 << 3) /* Bit 3: MCOB1 tracks internal MCOA0 */ -#define MCPWM_CP_CCPA2 (1 << 4) /* Bit 4: MCOA2 tracks internal MCOA0 */ -#define MCPWM_CP_CCPB2 (1 << 5) /* Bit 5: MCOB2 tracks internal MCOA0 */ - /* Bits 6-31: reserved */ - -/* Interrupt Enable read address (INTEN), Interrupt Enable set address (INTENSET), - * Interrupt Enable clear address (INTENCLR), Interrupt flags read address (INTF), - * Interrupt flags set address (INTFSET), and Interrupt flags clear address (INTFCLR) - * common bit field definitions - */ - -#define MCPWM_INT_ILIM0 (1 << 0) /* Bit 0: Limit interrupts for channel 0 */ -#define MCPWM_INT_IMAT0 (1 << 1) /* Bit 1: Match interrupts for channel 0 */ -#define MCPWM_INT_ICAP0 (1 << 2) /* Bit 2: Capture interrupts for channel 0 */ - /* Bit 3: Reserved */ -#define MCPWM_INT_ILIM1 (1 << 4) /* Bit 4: Limit interrupts for channel 1 */ -#define MCPWM_INT_IMAT1 (1 << 5) /* Bit 5: Match interrupts for channel 1 */ -#define MCPWM_INT_ICAP1 (1 << 6) /* Bit 6: Capture interrupts for channel 1 */ - /* Bit 7: Reserved */ -#define MCPWM_INT_ILIM2 (1 << 8) /* Bit 8: Limit interrupts for channel 2 */ -#define MCPWM_INT_IMAT2 (1 << 9) /* Bit 9: Match interrupts for channel 2 */ -#define MCPWM_INT_ICAP2 (1 << 10) /* Bit 10: Capture interrupts for channel 2 */ - /* Bits 11-14: Reserved */ -#define MCPWM_INT_ABORT (1 << 15) /* Bit 15: Fast abort interrupt */ - /* Bits 16-31: Reserved */ - -/* Count Control read address (CNTCON), Count Control set address (CNTCONSET), and - * Count Control clear address (CNTCONCLR) common register bit definitions. - */ - -#define MCPWM_CNTCON_TC0MCI0RE (1 << 0) /* Bit 0: Counter 0 incr on rising edge MCI0 */ -#define MCPWM_CNTCON_TC0MCI0FE (1 << 1) /* Bit 1: Counter 0 incr onfalling edge MCI0 */ -#define MCPWM_CNTCON_TC0MCI1RE (1 << 2) /* Bit 2: Counter 0 incr onrising edge MCI1 */ -#define MCPWM_CNTCON_TC0MCI1FE (1 << 3) /* Bit 3: Counter 0 incr onfalling edge MCI1 */ -#define MCPWM_CNTCON_TC0MCI2RE (1 << 4) /* Bit 4: Counter 0 incr onrising edge MCI2 */ -#define MCPWM_CNTCON_TC0MCI2FE (1 << 5) /* Bit 5: Counter 0 incr onfalling edge MCI2 */ -#define MCPWM_CNTCON_TC1MCI0RE (1 << 6) /* Bit 6: Counter 1 incr onrising edge MCI0 */ -#define MCPWM_CNTCON_TC1MCI0FE (1 << 7) /* Bit 7: Counter 1 incr onfalling edge MCI0 */ -#define MCPWM_CNTCON_TC1MCI1RE (1 << 8) /* Bit 8: Counter 1 incr onrising edge MCI1 */ -#define MCPWM_CNTCON_TC1MCI1FE (1 << 9) /* Bit 9: Counter 1 incr onfalling edge MCI1 */ -#define MCPWM_CNTCON_TC1MCI2RE (1 << 10) /* Bit 10: Counter 1 incr onrising edge MCI2 */ -#define MCPWM_CNTCON_TC1MCI2FE (1 << 11) /* Bit 11: Counter 1 incr onfalling edge MCI2 */ -#define MCPWM_CNTCON_TC2MCI0RE (1 << 12) /* Bit 12: Counter 2 incr onrising edge MCI0 */ -#define MCPWM_CNTCON_TC2MCI0FE (1 << 13) /* Bit 13: Counter 2 incr onfalling edge MCI0 */ -#define MCPWM_CNTCON_TC2MCI1RE (1 << 14) /* Bit 14: Counter 2 incr onrising edge MCI1 */ -#define MCPWM_CNTCON_TC2MCI1FE (1 << 15) /* Bit 15: Counter 2 incr onfalling edge MCI1 */ -#define MCPWM_CNTCON_TC2MCI2RE (1 << 16) /* Bit 16: Counter 2 incr onrising edge MCI2 */ -#define MCPWM_CNTCON_TC2MCI2FE (1 << 17) /* Bit 17: Counter 2 incr onfalling edge MCI2 */ - /* Bits 28-28: Reserved */ -#define MCPWM_CNTCON_CNTR0 (1 << 29) /* Bit 29: Channel 0 counter mode */ -#define MCPWM_CNTCON_CNTR1 (1 << 30) /* Bit 30: Channel 1 counter mode */ -#define MCPWM_CNTCON_CNTR2 (1 << 31) /* Bit 31: Channel 2 counter mode */ - -/* Capture clear address */ - -#define MCPWM_CAPCLR_MCCLR0 (1 << 0) /* Bit 0: Clear MCCAP0 register */ -#define MCPWM_CAPCLR_MCCLR1 (1 << 1) /* Bit 1: Clear MCCAP1 register */ -#define MCPWM_CAPCLR_MCCLR2 (1 << 2) /* Bit 2: Clear MCCAP2 register */ - /* Bits 2-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_mcpwm.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_MCPWM_CON_OFFSET 0x0000 /* PWM Control read address */ +#define LPC17_MCPWM_CONSET_OFFSET 0x0004 /* PWM Control set address */ +#define LPC17_MCPWM_CONCLR_OFFSET 0x0008 /* PWM Control clear address */ +#define LPC17_MCPWM_CAPCON_OFFSET 0x000c /* Capture Control read address */ +#define LPC17_MCPWM_CAPCONSET_OFFSET 0x0010 /* Capture Control set address */ +#define LPC17_MCPWM_CAPCONCLR_OFFSET 0x0014 /* Event Control clear address */ +#define LPC17_MCPWM_TC0_OFFSET 0x0018 /* Timer Counter register, channel 0 */ +#define LPC17_MCPWM_TC1_OFFSET 0x001c /* Timer Counter register, channel 1 */ +#define LPC17_MCPWM_TC2_OFFSET 0x0020 /* Timer Counter register, channel 2 */ +#define LPC17_MCPWM_LIM0_OFFSET 0x0024 /* Limit register, channel 0 */ +#define LPC17_MCPWM_LIM1_OFFSET 0x0028 /* Limit register, channel 1 */ +#define LPC17_MCPWM_LIM2_OFFSET 0x002c /* Limit register, channel 2 */ +#define LPC17_MCPWM_MAT0_OFFSET 0x0030 /* Match register, channel 0 */ +#define LPC17_MCPWM_MAT1_OFFSET 0x0034 /* Match register, channel 1 */ +#define LPC17_MCPWM_MAT2_OFFSET 0x0038 /* Match register, channel 2 */ +#define LPC17_MCPWM_DT_OFFSET 0x003c /* Dead time register */ +#define LPC17_MCPWM_CP_OFFSET 0x0040 /* Commutation Pattern register */ +#define LPC17_MCPWM_CAP0_OFFSET 0x0044 /* Capture register, channel 0 */ +#define LPC17_MCPWM_CAP1_OFFSET 0x0048 /* Capture register, channel 1 */ +#define LPC17_MCPWM_CAP2_OFFSET 0x004c /* Capture register, channel 2 */ +#define LPC17_MCPWM_INTEN_OFFSET 0x0050 /* Interrupt Enable read address */ +#define LPC17_MCPWM_INTENSET_OFFSET 0x0054 /* Interrupt Enable set address */ +#define LPC17_MCPWM_INTENCLR_OFFSET 0x0058 /* Interrupt Enable clear address */ +#define LPC17_MCPWM_CNTCON_OFFSET 0x005c /* Count Control read address */ +#define LPC17_MCPWM_CNTCONSET_OFFSET 0x0060 /* Count Control set address */ +#define LPC17_MCPWM_CNTCONCLR_OFFSET 0x0064 /* Count Control clear address */ +#define LPC17_MCPWM_INTF_OFFSET 0x0068 /* Interrupt flags read address */ +#define LPC17_MCPWM_INTFSET_OFFSET 0x006c /* Interrupt flags set address */ +#define LPC17_MCPWM_INTFCLR_OFFSET 0x0070 /* Interrupt flags clear address */ +#define LPC17_MCPWM_CAPCLR_OFFSET 0x0074 /* Capture clear address */ + +/* Register addresses ***************************************************************/ + +#define LPC17_MCPWM_CON (LPC17_MCPWM_BASE+LPC17_MCPWM_CON_OFFSET) +#define LPC17_MCPWM_CONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CONSET_OFFSET) +#define LPC17_MCPWM_CONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CONCLR_OFFSET) +#define LPC17_MCPWM_CAPCON (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCON_OFFSET) +#define LPC17_MCPWM_CAPCONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCONSET_OFFSET) +#define LPC17_MCPWM_CAPCONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCONCLR_OFFSET) +#define LPC17_MCPWM_TC0 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC0_OFFSET) +#define LPC17_MCPWM_TC1 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC1_OFFSET) +#define LPC17_MCPWM_TC2 (LPC17_MCPWM_BASE+LPC17_MCPWM_TC2_OFFSET) +#define LPC17_MCPWM_LIM0 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM0_OFFSET) +#define LPC17_MCPWM_LIM1 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM1_OFFSET) +#define LPC17_MCPWM_LIM2 (LPC17_MCPWM_BASE+LPC17_MCPWM_LIM2_OFFSET) +#define LPC17_MCPWM_MAT0 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT0_OFFSET) +#define LPC17_MCPWM_MAT1 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT1_OFFSET) +#define LPC17_MCPWM_MAT2 (LPC17_MCPWM_BASE+LPC17_MCPWM_MAT2_OFFSET) +#define LPC17_MCPWM_DT (LPC17_MCPWM_BASE+LPC17_MCPWM_DT_OFFSET) +#define LPC17_MCPWM_CP (LPC17_MCPWM_BASE+LPC17_MCPWM_CP_OFFSET) +#define LPC17_MCPWM_CAP0 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP0_OFFSET) +#define LPC17_MCPWM_CAP1 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP1_OFFSET) +#define LPC17_MCPWM_CAP2 (LPC17_MCPWM_BASE+LPC17_MCPWM_CAP2_OFFSET) +#define LPC17_MCPWM_INTEN (LPC17_MCPWM_BASE+LPC17_MCPWM_INTEN_OFFSET) +#define LPC17_MCPWM_INTENSET (LPC17_MCPWM_BASE+LPC17_MCPWM_INTENSET_OFFSET) +#define LPC17_MCPWM_INTENCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_INTENCLR_OFFSET) +#define LPC17_MCPWM_CNTCON (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCON_OFFSET) +#define LPC17_MCPWM_CNTCONSET (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCONSET_OFFSET) +#define LPC17_MCPWM_CNTCONCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CNTCONCLR_OFFSET) +#define LPC17_MCPWM_INTF (LPC17_MCPWM_BASE+LPC17_MCPWM_INTF_OFFSET) +#define LPC17_MCPWM_INTFSET (LPC17_MCPWM_BASE+LPC17_MCPWM_INTFSET_OFFSET) +#define LPC17_MCPWM_INTFCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_INTFCLR_OFFSET) +#define LPC17_MCPWM_CAPCLR (LPC17_MCPWM_BASE+LPC17_MCPWM_CAPCLR_OFFSET) + +/* Register bit definitions *********************************************************/ +/* There are no bit field definitions for the following registers because they support + * 32-bit values: + * + * - Timer Counter register, channel 0 (TC0), Timer Counter register, channel 1 (TC1), + * and Timer Counter register, channel 2 (TC2): 32-bit Timer/Counter values for + * channels 0, 1, 2 (no bit field definitions) + * + * - Limit register, channel 0 (LIM0), Limit register, channel 1 (LIM1), and Limit + * register, channel 2 (LIM2): 32-bit Limit values for TC0, 1, 2 (no bit field + * definitions) + * + * - Match register, channel 0 MAT0), Match register, channel 1 (MAT1), and Match + * register, channel 2 (MAT2): 32-bit Match values for TC0, 1, 2 (no bit field + * definitions). + * + * - Capture register, channel 0 (CAP0), Capture register, channel 1 (CAP1), and + * Capture register, channel 2 (CAP2): 32-bit TC value at a capture event for + * channels 0, 1, 2 (no bit field definitions) + */ + +/* PWM Control read address (CON), PWM Control set address (CONSET), and PWM Control + * clear address (CONCLR) common regiser bit definitions. + */ + +#define MCPWM_CON_RUN0 (1 << 0) /* Bit 0: Stops/starts timer channel 0 */ +#define MCPWM_CON_CENTER0 (1 << 1) /* Bit 1: Chan 0 edge/center aligned operation */ +#define MCPWM_CON_POLA0 (1 << 2) /* Bit 2: Polarity of MCOA0 and MCOB0 */ +#define MCPWM_CON_DTE0 (1 << 3) /* Bit 3: Dead time feature control */ +#define MCPWM_CON_DISUP0 (1 << 4) /* Bit 4: Enable/disable register updates */ + /* Bits 5-7: Reserved */ +#define MCPWM_CON_RUN1 (1 << 8) /* Bit 8: Stops/starts timer channel 1 */ +#define MCPWM_CON_CENTER1 (1 << 9) /* Bit 9: Chan 1 edge/center aligned operation */ +#define MCPWM_CON_POLA1 (1 << 10) /* Bit 10: Polarity of MCOA1 and MCOB1 */ +#define MCPWM_CON_DTE1 (1 << 11) /* Bit 11: Dead time feature control */ +#define MCPWM_CON_DISUP1 (1 << 12) /* Bit 12: Enable/disable register updates */ + /* Bits 13-15: Reserved */ +#define MCPWM_CON_RUN2 (1 << 16) /* Bit 16: Stops/starts timer channel 2 */ +#define MCPWM_CON_CENTER2 (1 << 17) /* Bit 17: Chan 2 edge/center aligned operation */ +#define MCPWM_CON_POLA2 (1 << 18) /* Bit 18: Polarity of MCOA1 and MCOB1 */ +#define MCPWM_CON_DTE2 (1 << 19) /* Bit 19: Dead time feature control */ +#define MCPWM_CON_DISUP2 (1 << 20) /* Bit 20: Enable/disable register updates */ + /* Bits 21-28: Reserved */ +#define MCPWM_CON_INVBDC (1 << 29) /* Bit 29: Polarity of MCOB outputs (all channels) */ +#define MCPWM_CON_ACMODE (1 << 30) /* Bit 30: 3-phase AC mode select */ +#define MCPWM_CON_DCMODE (1 << 31) /* Bit 31: 3-phase DC mode select */ + +/* Capture Control read address (CAPCON), Capture Control set address (CAPCONSET), + * and Event Control clear address (CAPCONCLR) common register bit defintions + */ + +#define MCPWM_CAPCON_CAP0MCI0RE (1 << 0) /* Bit 0: Enable chan0 rising edge capture MCI0 */ +#define MCPWM_CAPCON_CAP0MCI0FE (1 << 1) /* Bit 1: Enable chan 0 falling edge capture MCI0 */ +#define MCPWM_CAPCON_CAP0MCI1RE (1 << 2) /* Bit 2: Enable chan 0 rising edge capture MCI1 */ +#define MCPWM_CAPCON_CAP0MCI1FE (1 << 3) /* Bit 3: Enable chan 0 falling edge capture MCI1 */ +#define MCPWM_CAPCON_CAP0MCI2RE (1 << 4) /* Bit 4: Enable chan 0 rising edge capture MCI2 */ +#define MCPWM_CAPCON_CAP0MCI2FE (1 << 5) /* Bit 5: Enable chan 0 falling edge capture MCI2 */ +#define MCPWM_CAPCON_CAP1MCI0RE (1 << 6) /* Bit 6: Enable chan 1 rising edge capture MCI0 */ +#define MCPWM_CAPCON_CAP1MCI0FE (1 << 7) /* Bit 7: Enable chan 1 falling edge capture MCI0 */ +#define MCPWM_CAPCON_CAP1MCI1RE (1 << 8) /* Bit 8: Enable chan 1 rising edge capture MCI1 */ +#define MCPWM_CAPCON_CAP1MCI1FE (1 << 9) /* Bit 9: Enable chan 1 falling edge capture MCI1 */ +#define MCPWM_CAPCON_CAP1MCI2RE (1 << 10) /* Bit 10: Enable chan 1 rising edge capture MCI2 */ +#define MCPWM_CAPCON_CAP1MCI2FE (1 << 11) /* Bit 11: Enable chan 1 falling edge capture MCI2 */ +#define MCPWM_CAPCON_CAP2MCI0RE (1 << 12) /* Bit 12: Enable chan 2 rising edge capture MCI0 */ +#define MCPWM_CAPCON_CAP2MCI0FE (1 << 13) /* Bit 13: Enable chan 2 falling edge capture MCI0 */ +#define MCPWM_CAPCON_CAP2MCI1RE (1 << 14) /* Bit 14: Enable chan 2 rising edge capture MCI1 */ +#define MCPWM_CAPCON_CAP2MCI1FE (1 << 15) /* Bit 15: Enable chan 2 falling edge capture MCI1 */ +#define MCPWM_CAPCON_CAP2MCI2RE (1 << 16) /* Bit 16: Enable chan 2 rising edge capture MCI2 */ +#define MCPWM_CAPCON_CAP2MCI2FE (1 << 17) /* Bit 17: Enable chan 2 falling edge capture MCI2 */ +#define MCPWM_CAPCON_RT0 (1 << 18) /* Bit 18: TC0 reset by chan 0 capture event */ +#define MCPWM_CAPCON_RT1 (1 << 19) /* Bit 19: TC1 reset by chan 1 capture event */ +#define MCPWM_CAPCON_RT2 (1 << 20) /* Bit 20: TC2 reset by chan 2 capture event */ +#define MCPWM_CAPCON_HNFCAP0 (1 << 21) /* Bit 21: Hardware noise filter */ +#define MCPWM_CAPCON_HNFCAP1 (1 << 22) /* Bit 22: Hardware noise filter */ +#define MCPWM_CAPCON_HNFCAP2 (1 << 23) /* Bit 23: Hardware noise filter */ + /* Bits 24-31: Reserved +/* Dead time register */ + +#define MCPWM_DT_DT0_SHIFT (0) /* Bits 0-9: Dead time for channel 0 */ +#define MCPWM_DT_DT0_MASK (0x03ff << MCPWM_DT_DT0_SHIFT) +#define MCPWM_DT_DT1_SHIFT (10) /* Bits 10-19: Dead time for channel 1 */ +#define MCPWM_DT_DT1_MASK (0x03ff << MCPWM_DT_DT1_SHIFT) +#define MCPWM_DT_DT2_SHIFT (20) /* Bits 20-29: Dead time for channel 2 */ +#define MCPWM_DT_DT2_MASK (0x03ff << MCPWM_DT_DT2_SHIFT) + /* Bits 30-31: reserved */ +/* Commutation Pattern register */ + +#define MCPWM_CP_CCPA0 (1 << 0) /* Bit 0: Iinternal MCOA0 */ +#define MCPWM_CP_CCPB0 (1 << 1) /* Bit 1: MCOB0 tracks internal MCOA0 */ +#define MCPWM_CP_CCPA1 (1 << 2) /* Bit 2: MCOA1 tracks internal MCOA0 */ +#define MCPWM_CP_CCPB1 (1 << 3) /* Bit 3: MCOB1 tracks internal MCOA0 */ +#define MCPWM_CP_CCPA2 (1 << 4) /* Bit 4: MCOA2 tracks internal MCOA0 */ +#define MCPWM_CP_CCPB2 (1 << 5) /* Bit 5: MCOB2 tracks internal MCOA0 */ + /* Bits 6-31: reserved */ + +/* Interrupt Enable read address (INTEN), Interrupt Enable set address (INTENSET), + * Interrupt Enable clear address (INTENCLR), Interrupt flags read address (INTF), + * Interrupt flags set address (INTFSET), and Interrupt flags clear address (INTFCLR) + * common bit field definitions + */ + +#define MCPWM_INT_ILIM0 (1 << 0) /* Bit 0: Limit interrupts for channel 0 */ +#define MCPWM_INT_IMAT0 (1 << 1) /* Bit 1: Match interrupts for channel 0 */ +#define MCPWM_INT_ICAP0 (1 << 2) /* Bit 2: Capture interrupts for channel 0 */ + /* Bit 3: Reserved */ +#define MCPWM_INT_ILIM1 (1 << 4) /* Bit 4: Limit interrupts for channel 1 */ +#define MCPWM_INT_IMAT1 (1 << 5) /* Bit 5: Match interrupts for channel 1 */ +#define MCPWM_INT_ICAP1 (1 << 6) /* Bit 6: Capture interrupts for channel 1 */ + /* Bit 7: Reserved */ +#define MCPWM_INT_ILIM2 (1 << 8) /* Bit 8: Limit interrupts for channel 2 */ +#define MCPWM_INT_IMAT2 (1 << 9) /* Bit 9: Match interrupts for channel 2 */ +#define MCPWM_INT_ICAP2 (1 << 10) /* Bit 10: Capture interrupts for channel 2 */ + /* Bits 11-14: Reserved */ +#define MCPWM_INT_ABORT (1 << 15) /* Bit 15: Fast abort interrupt */ + /* Bits 16-31: Reserved */ + +/* Count Control read address (CNTCON), Count Control set address (CNTCONSET), and + * Count Control clear address (CNTCONCLR) common register bit definitions. + */ + +#define MCPWM_CNTCON_TC0MCI0RE (1 << 0) /* Bit 0: Counter 0 incr on rising edge MCI0 */ +#define MCPWM_CNTCON_TC0MCI0FE (1 << 1) /* Bit 1: Counter 0 incr onfalling edge MCI0 */ +#define MCPWM_CNTCON_TC0MCI1RE (1 << 2) /* Bit 2: Counter 0 incr onrising edge MCI1 */ +#define MCPWM_CNTCON_TC0MCI1FE (1 << 3) /* Bit 3: Counter 0 incr onfalling edge MCI1 */ +#define MCPWM_CNTCON_TC0MCI2RE (1 << 4) /* Bit 4: Counter 0 incr onrising edge MCI2 */ +#define MCPWM_CNTCON_TC0MCI2FE (1 << 5) /* Bit 5: Counter 0 incr onfalling edge MCI2 */ +#define MCPWM_CNTCON_TC1MCI0RE (1 << 6) /* Bit 6: Counter 1 incr onrising edge MCI0 */ +#define MCPWM_CNTCON_TC1MCI0FE (1 << 7) /* Bit 7: Counter 1 incr onfalling edge MCI0 */ +#define MCPWM_CNTCON_TC1MCI1RE (1 << 8) /* Bit 8: Counter 1 incr onrising edge MCI1 */ +#define MCPWM_CNTCON_TC1MCI1FE (1 << 9) /* Bit 9: Counter 1 incr onfalling edge MCI1 */ +#define MCPWM_CNTCON_TC1MCI2RE (1 << 10) /* Bit 10: Counter 1 incr onrising edge MCI2 */ +#define MCPWM_CNTCON_TC1MCI2FE (1 << 11) /* Bit 11: Counter 1 incr onfalling edge MCI2 */ +#define MCPWM_CNTCON_TC2MCI0RE (1 << 12) /* Bit 12: Counter 2 incr onrising edge MCI0 */ +#define MCPWM_CNTCON_TC2MCI0FE (1 << 13) /* Bit 13: Counter 2 incr onfalling edge MCI0 */ +#define MCPWM_CNTCON_TC2MCI1RE (1 << 14) /* Bit 14: Counter 2 incr onrising edge MCI1 */ +#define MCPWM_CNTCON_TC2MCI1FE (1 << 15) /* Bit 15: Counter 2 incr onfalling edge MCI1 */ +#define MCPWM_CNTCON_TC2MCI2RE (1 << 16) /* Bit 16: Counter 2 incr onrising edge MCI2 */ +#define MCPWM_CNTCON_TC2MCI2FE (1 << 17) /* Bit 17: Counter 2 incr onfalling edge MCI2 */ + /* Bits 28-28: Reserved */ +#define MCPWM_CNTCON_CNTR0 (1 << 29) /* Bit 29: Channel 0 counter mode */ +#define MCPWM_CNTCON_CNTR1 (1 << 30) /* Bit 30: Channel 1 counter mode */ +#define MCPWM_CNTCON_CNTR2 (1 << 31) /* Bit 31: Channel 2 counter mode */ + +/* Capture clear address */ + +#define MCPWM_CAPCLR_MCCLR0 (1 << 0) /* Bit 0: Clear MCCAP0 register */ +#define MCPWM_CAPCLR_MCCLR1 (1 << 1) /* Bit 1: Clear MCCAP1 register */ +#define MCPWM_CAPCLR_MCCLR2 (1 << 2) /* Bit 2: Clear MCCAP2 register */ + /* Bits 2-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_MCPWM_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_memorymap.h b/nuttx/arch/arm/src/lpc17xx/lpc17_memorymap.h index da69f1481e..ae66b684cb 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_memorymap.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_memorymap.h @@ -1,136 +1,136 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_memorymap.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Memory Map ***********************************************************************/ - -#define LPC17_FLASH_BASE 0x00000000 /* -0x1fffffff: On-chip non-volatile memory */ -#define LPC17_SRAM_BASE 0x10000000 /* -0x10007fff: On-chip SRAM (devices <=32Kb) */ -#define LPC17_ROM_BASE 0x1fff0000 /* -0x1fffffff: 8Kb Boot ROM with flash services */ -#define LPC17_AHBSRAM_BASE 0x20000000 /* -0x3fffffff: On-chip AHB SRAM (devices >32Kb) */ -# define LPC17_SRAM_BANK0 0x2007c000 /* -0x2007ffff: On-chip AHB SRAM Bank0 (devices >=32Kb) */ -# define LPC17_SRAM_BANK1 0x20080000 /* -0x2008ffff: On-chip AHB SRAM Bank1 (devices 64Kb) */ -#define LPC17_GPIO_BASE 0x2009c000 /* -0x2009ffff: GPIO */ -#define LPC17_APB_BASE 0x40000000 /* -0x5fffffff: APB Peripherals */ -# define LPC17_APB0_BASE 0x40000000 /* -0x4007ffff: APB0 Peripherals */ -# define LPC17_APB1_BASE 0x40080000 /* -0x400fffff: APB1 Peripherals */ -# define LPC17_AHB_BASE 0x50000000 /* -0x501fffff: DMA Controller, Ethernet, and USB */ -#define LPC17_CORTEXM3_BASE 0xe0000000 /* -0xe00fffff: (see armv7-m/nvic.h) */ -#define LPC17_SCS_BASE 0xe000e000 -#define LPC17_DEBUGMCU_BASE 0xe0042000 - -/* AHB SRAM Bank sizes **************************************************************/ - -#define LPC17_BANK0_SIZE (16*1024) /* Size of AHB SRAM Bank0 (if present) */ -#define LPC17_BANK1_SIZE (16*1024) /* Size of AHB SRAM Bank1 (if present) */ - -/* APB0 Peripherals *****************************************************************/ - -#define LPC17_WDT_BASE 0x40000000 /* -0x40003fff: Watchdog timer */ -#define LPC17_TMR0_BASE 0x40004000 /* -0x40007fff: Timer 0 */ -#define LPC17_TMR1_BASE 0x40008000 /* -0x4000bfff: Timer 1 */ -#define LPC17_UART0_BASE 0x4000c000 /* -0x4000ffff: UART 0 */ -#define LPC17_UART1_BASE 0x40010000 /* -0x40013fff: UART 1 */ - /* -0x40017fff: Reserved */ -#define LPC17_PWM1_BASE 0x40018000 /* -0x4001bfff: PWM 1 */ -#define LPC17_I2C0_BASE 0x4001c000 /* -0x4001ffff: I2C 0 */ -#define LPC17_SPI_BASE 0x40020000 /* -0x40023fff: SPI */ -#define LPC17_RTC_BASE 0x40024000 /* -0x40027fff: RTC + backup registers */ -#define LPC17_GPIOINT_BASE 0x40028000 /* -0x4002bfff: GPIO interrupts */ -#define LPC17_PINCONN_BASE 0x4002c000 /* -0x4002ffff: Pin connect block */ -#define LPC17_SSP1_BASE 0x40030000 /* -0x40033fff: SSP 1 */ -#define LPC17_ADC_BASE 0x40034000 /* -0x40037fff: ADC */ -#define LPC17_CANAFRAM_BASE 0x40038000 /* -0x4003bfff: CAN acceptance filter (AF) RAM */ -#define LPC17_CANAF_BASE 0x4003c000 /* -0x4003ffff: CAN acceptance filter (AF) registers */ -#define LPC17_CAN_BASE 0x40040000 /* -0x40043fff: CAN common registers */ -#define LPC17_CAN1_BASE 0x40044000 /* -0x40047fff: CAN controller l */ -#define LPC17_CAN2_BASE 0x40048000 /* -0x4004bfff: CAN controller 2 */ - /* -0x4005bfff: Reserved */ -#define LPC17_I2C1_BASE 0x4005c000 /* -0x4005ffff: I2C 1 */ - /* -0x4007ffff: Reserved */ - -/* APB1 Peripherals *****************************************************************/ - - /* -0x40087fff: Reserved */ -#define LPC17_SSP0_BASE 0x40088000 /* -0x4008bfff: SSP 0 */ -#define LPC17_DAC_BASE 0x4008c000 /* -0x4008ffff: DAC */ -#define LPC17_TMR2_BASE 0x40090000 /* -0x40093fff: Timer 2 */ -#define LPC17_TMR3_BASE 0x40094000 /* -0x40097fff: Timer 3 */ -#define LPC17_UART2_BASE 0x40098000 /* -0x4009bfff: UART 2 */ -#define LPC17_UART3_BASE 0x4009c000 /* -0x4009ffff: UART 3 */ -#define LPC17_I2C2_BASE 0x400a0000 /* -0x400a3fff: I2C 2 */ - /* -0x400a7fff: Reserved */ -#define LPC17_I2S_BASE 0x400a8000 /* -0x400abfff: I2S */ - /* -0x400affff: Reserved */ -#define LPC17_RIT_BASE 0x400b0000 /* -0x400b3fff: Repetitive interrupt timer */ - /* -0x400b7fff: Reserved */ -#define LPC17_MCPWM_BASE 0x400b8000 /* -0x400bbfff: Motor control PWM */ -#define LPC17_QEI_BASE 0x400bc000 /* -0x400bffff: Quadrature encoder interface */ - /* -0x400fbfff: Reserved */ -#define LPC17_SYSCON_BASE 0x400fc000 /* -0x400fffff: System control */ - -/* AHB Peripherals ******************************************************************/ - -#define LPC17_ETH_BASE 0x50000000 /* -0x50003fff: Ethernet controller */ -#define LPC17_GPDMA_BASE 0x50004000 /* -0x50007fff: GPDMA controller */ -#define LPC17_USB_BASE 0x5000c000 /* -0x5000cfff: USB controller */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_memorymap.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Memory Map ***********************************************************************/ + +#define LPC17_FLASH_BASE 0x00000000 /* -0x1fffffff: On-chip non-volatile memory */ +#define LPC17_SRAM_BASE 0x10000000 /* -0x10007fff: On-chip SRAM (devices <=32Kb) */ +#define LPC17_ROM_BASE 0x1fff0000 /* -0x1fffffff: 8Kb Boot ROM with flash services */ +#define LPC17_AHBSRAM_BASE 0x20000000 /* -0x3fffffff: On-chip AHB SRAM (devices >32Kb) */ +# define LPC17_SRAM_BANK0 0x2007c000 /* -0x2007ffff: On-chip AHB SRAM Bank0 (devices >=32Kb) */ +# define LPC17_SRAM_BANK1 0x20080000 /* -0x2008ffff: On-chip AHB SRAM Bank1 (devices 64Kb) */ +#define LPC17_GPIO_BASE 0x2009c000 /* -0x2009ffff: GPIO */ +#define LPC17_APB_BASE 0x40000000 /* -0x5fffffff: APB Peripherals */ +# define LPC17_APB0_BASE 0x40000000 /* -0x4007ffff: APB0 Peripherals */ +# define LPC17_APB1_BASE 0x40080000 /* -0x400fffff: APB1 Peripherals */ +# define LPC17_AHB_BASE 0x50000000 /* -0x501fffff: DMA Controller, Ethernet, and USB */ +#define LPC17_CORTEXM3_BASE 0xe0000000 /* -0xe00fffff: (see armv7-m/nvic.h) */ +#define LPC17_SCS_BASE 0xe000e000 +#define LPC17_DEBUGMCU_BASE 0xe0042000 + +/* AHB SRAM Bank sizes **************************************************************/ + +#define LPC17_BANK0_SIZE (16*1024) /* Size of AHB SRAM Bank0 (if present) */ +#define LPC17_BANK1_SIZE (16*1024) /* Size of AHB SRAM Bank1 (if present) */ + +/* APB0 Peripherals *****************************************************************/ + +#define LPC17_WDT_BASE 0x40000000 /* -0x40003fff: Watchdog timer */ +#define LPC17_TMR0_BASE 0x40004000 /* -0x40007fff: Timer 0 */ +#define LPC17_TMR1_BASE 0x40008000 /* -0x4000bfff: Timer 1 */ +#define LPC17_UART0_BASE 0x4000c000 /* -0x4000ffff: UART 0 */ +#define LPC17_UART1_BASE 0x40010000 /* -0x40013fff: UART 1 */ + /* -0x40017fff: Reserved */ +#define LPC17_PWM1_BASE 0x40018000 /* -0x4001bfff: PWM 1 */ +#define LPC17_I2C0_BASE 0x4001c000 /* -0x4001ffff: I2C 0 */ +#define LPC17_SPI_BASE 0x40020000 /* -0x40023fff: SPI */ +#define LPC17_RTC_BASE 0x40024000 /* -0x40027fff: RTC + backup registers */ +#define LPC17_GPIOINT_BASE 0x40028000 /* -0x4002bfff: GPIO interrupts */ +#define LPC17_PINCONN_BASE 0x4002c000 /* -0x4002ffff: Pin connect block */ +#define LPC17_SSP1_BASE 0x40030000 /* -0x40033fff: SSP 1 */ +#define LPC17_ADC_BASE 0x40034000 /* -0x40037fff: ADC */ +#define LPC17_CANAFRAM_BASE 0x40038000 /* -0x4003bfff: CAN acceptance filter (AF) RAM */ +#define LPC17_CANAF_BASE 0x4003c000 /* -0x4003ffff: CAN acceptance filter (AF) registers */ +#define LPC17_CAN_BASE 0x40040000 /* -0x40043fff: CAN common registers */ +#define LPC17_CAN1_BASE 0x40044000 /* -0x40047fff: CAN controller l */ +#define LPC17_CAN2_BASE 0x40048000 /* -0x4004bfff: CAN controller 2 */ + /* -0x4005bfff: Reserved */ +#define LPC17_I2C1_BASE 0x4005c000 /* -0x4005ffff: I2C 1 */ + /* -0x4007ffff: Reserved */ + +/* APB1 Peripherals *****************************************************************/ + + /* -0x40087fff: Reserved */ +#define LPC17_SSP0_BASE 0x40088000 /* -0x4008bfff: SSP 0 */ +#define LPC17_DAC_BASE 0x4008c000 /* -0x4008ffff: DAC */ +#define LPC17_TMR2_BASE 0x40090000 /* -0x40093fff: Timer 2 */ +#define LPC17_TMR3_BASE 0x40094000 /* -0x40097fff: Timer 3 */ +#define LPC17_UART2_BASE 0x40098000 /* -0x4009bfff: UART 2 */ +#define LPC17_UART3_BASE 0x4009c000 /* -0x4009ffff: UART 3 */ +#define LPC17_I2C2_BASE 0x400a0000 /* -0x400a3fff: I2C 2 */ + /* -0x400a7fff: Reserved */ +#define LPC17_I2S_BASE 0x400a8000 /* -0x400abfff: I2S */ + /* -0x400affff: Reserved */ +#define LPC17_RIT_BASE 0x400b0000 /* -0x400b3fff: Repetitive interrupt timer */ + /* -0x400b7fff: Reserved */ +#define LPC17_MCPWM_BASE 0x400b8000 /* -0x400bbfff: Motor control PWM */ +#define LPC17_QEI_BASE 0x400bc000 /* -0x400bffff: Quadrature encoder interface */ + /* -0x400fbfff: Reserved */ +#define LPC17_SYSCON_BASE 0x400fc000 /* -0x400fffff: System control */ + +/* AHB Peripherals ******************************************************************/ + +#define LPC17_ETH_BASE 0x50000000 /* -0x50003fff: Ethernet controller */ +#define LPC17_GPDMA_BASE 0x50004000 /* -0x50007fff: GPDMA controller */ +#define LPC17_USB_BASE 0x5000c000 /* -0x5000cfff: USB controller */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_MEMORYMAP_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ohciram.h b/nuttx/arch/arm/src/lpc17xx/lpc17_ohciram.h index 7601fefca6..1e0564a874 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_ohciram.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ohciram.h @@ -1,263 +1,263 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_ohciram.h - * - * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Default, no-OHCI Case ************************************************************/ -/* Assume that all of AHB SRAM will be available for heap. If this is not true, then - * LPC17_BANK1_HEAPSIZE will be undefined but redefined below. - */ - -#undef LPC17_BANK1_HEAPBASE -#undef LPC17_BANK1_HEAPSIZE -#ifdef LPC17_HAVE_BANK1 -# define LPC17_BANK1_HEAPBASE LPC17_SRAM_BANK1 -# define LPC17_BANK1_HEAPSIZE LPC17_BANK1_SIZE -#endif - -/* Is networking enabled? Is the LPC17xx Ethernet device enabled? Does this chip have - * and Ethernet controlloer? Yes... then we will replace the above default definitions. - */ - -#if defined(CONFIG_USBHOST) && defined(CONFIG_LPC17_USBHOST) && LPC17_NUSBHOST > 0 - -/* OHCI RAM Configuration ***********************************************************/ -/* Is AHB SRAM available? */ - -#ifndef LPC17_HAVE_BANK1 -# error "AHB SRAM Bank1 is not available for OHCI RAM" -#endif - -/* OHCI/Heap Memory Allocation ******************************************************/ -/* Configured Size of the region at the end of AHB SRAM BANK1 set set aside for the - * OHCI. This size must fit within AHB SRAM Bank 1 and also be a multiple of 256 - * bytes. - */ - -#ifndef CONFIG_USBHOST_OHCIRAM_SIZE -# define CONFIG_USBHOST_OHCIRAM_SIZE LPC17_BANK1_SIZE -#endif - -#if CONFIG_USBHOST_OHCIRAM_SIZE > LPC17_BANK1_SIZE -# error "OHCI RAM size cannot exceed the size of AHB SRAM Bank 1" -#endif - -#if (CONFIG_USBHOST_OHCIRAM_SIZE & 0xff) != 0 -# error "OHCI RAM size must be in multiples of 256 bytes" -#endif - -/* Then position the OHCI RAM at the end of AHB SRAM Bank 1 */ - -#define LPC17_OHCIRAM_END (LPC17_SRAM_BANK1 + LPC17_BANK1_SIZE) -#define LPC17_OHCIRAM_BASE (LPC17_OHCIRAM_END - CONFIG_USBHOST_OHCIRAM_SIZE) -#define LPC17_OHCIRAM_SIZE CONFIG_USBHOST_OHCIRAM_SIZE - -/* Determine is there is any meaningful space left at the beginning of AHB Bank 1 - * that could be added to the heap. - */ - -#undef LPC17_BANK1_HEAPBASE -#undef LPC17_BANK1_HEAPSIZE -#if LPC17_OHCIRAM_SIZE < (LPC17_BANK1_SIZE-128) -# define LPC17_BANK1_HEAPBASE LPC17_SRAM_BANK1 -# define LPC17_BANK1_HEAPSIZE (LPC17_BANK1_SIZE - LPC17_OHCIRAM_SIZE) -#endif - -/* Numbers and Sizes of Things ******************************************************/ -/* Fixed size of the OHCI control area */ - -#define LPC17_HCCA_SIZE 256 - -/* Fixed endpoint descriptor size. The actual size required by the hardware is only - * 16 bytes, however, we set aside an additional 16 bytes for for internal use by - * the OHCI host driver. 16-bytes is set aside because the EDs must still be - * aligned to 16-byte boundaries. - */ - -#define LPC17_ED_SIZE 32 - -/* Configurable number of user endpoint descriptors (EDs). This number excludes - * the control endpoint that is always allocated. - */ - -#ifndef CONFIG_USBHOST_NEDS -# define CONFIG_USBHOST_NEDS 2 -#endif - -/* Derived size of user endpoint descriptor (ED) memory. */ - -#define LPC17_EDFREE_SIZE (CONFIG_USBHOST_NEDS * LPC17_ED_SIZE) - -/* Fixed transfer descriptor size. The actual size required by the hardware is only - * 16 bytes, however, we set aside an additional 16 bytes for for internal use by - * the OHCI host driver. 16-bytes is set aside because the TDs must still be - * aligned to 16-byte boundaries. - */ - -#define LPC17_TD_SIZE 32 - -/* Configurable number of user transfer descriptors (TDs). */ - -#ifndef CONFIG_USBHOST_NTDS -# define CONFIG_USBHOST_NTDS 3 -#endif - -#if CONFIG_USBHOST_NTDS < 2 -# error "Insufficent TDs" -#endif - -/* Derived size of user trasnfer descriptor (TD) memory. */ - -#define LPC17_TDFREE_SIZE (CONFIG_USBHOST_NTDS * LPC17_TD_SIZE) - -/* Configurable number of request/descriptor buffers (TDBUFFER) */ - -#ifndef CONFIG_USBHOST_TDBUFFERS -# define CONFIG_USBHOST_TDBUFFERS 2 -#endif - -#if CONFIG_USBHOST_TDBUFFERS < 2 -# error "At least two TD buffers are required" -#endif - -/* Configurable size of a TD buffer */ - -#if CONFIG_USBHOST_TDBUFFERS > 0 && !defined(CONFIG_USBHOST_TDBUFSIZE) -# define CONFIG_USBHOST_TDBUFSIZE 128 -#endif - -#if (CONFIG_USBHOST_TDBUFSIZE & 3) != 0 -# error "TD buffer size must be an even number of 32-bit words" -#endif - -#define LPC17_TBFREE_SIZE (CONFIG_USBHOST_TDBUFFERS * CONFIG_USBHOST_TDBUFSIZE) - -/* Configurable size of an IO buffer. The number of IO buffers will be determined - * by what is left at the end of the BANK1 memory setup aside of OHCI RAM. - */ - -#ifndef CONFIG_USBHOST_IOBUFSIZE -# define CONFIG_USBHOST_IOBUFSIZE 512 -#endif - -#if (CONFIG_USBHOST_IOBUFSIZE & 3) != 0 -# error "IO buffer size must be an even number of 32-bit words" -#endif - -/* OHCI Memory Layout ***************************************************************/ -/* Example: - * Hardware: - * LPC17_SRAM_BANK1 0x20008000 - * LPC17_BANK1_SIZE 16384 - * - * Configuration: - * CONFIG_USBHOST_OHCIRAM_SIZE 1536 - * CONFIG_USBHOST_NEDS 2 - * CONFIG_USBHOST_NTDS 3 - * CONFIG_USBHOST_TDBUFFERS 3 - * CONFIG_USBHOST_TDBUFSIZE 128 - * CONFIG_USBHOST_IOBUFSIZE 512 - * - * Sizes of things - * LPC17_EDFREE_SIZE 64 0x00000040 - * LPC17_TDFREE_SIZE 96 0x00000060 - * LPC17_TBFREE_SIZE 384 0x00000100 - * LPC17_IOFREE_SIZE 512 0x00000200 - * - * Memory Layout - * LPC17_OHCIRAM_END (0x20008000 + 16384) = 0x20084000 - * LPC17_OHCIRAM_BASE (0x2000c000 - 1536) = 0x2000ba00 - * LPC17_OHCIRAM_SIZE 1280 - * LPC17_BANK1_HEAPBASE 0x20008000 - * LPC17_BANK1_HEAPSIZE (16384 - 1280) = 15104 - * - * LPC17_HCCA_BASE 0x20083a00 -- Communications area - * LPC17_TDTAIL_ADDR 0x20083b00 -- Common. pre-allocated tail TD - * LPC17_EDCTRL_ADDR 0x20083b20 -- Pre-allocated ED for EP0 - * LPC17_EDFREE_BASE 0x20083b40 -- Free EDs - * LPC17_TDFREE_BASE 0x20083b80 -- Free TDs - * LPC17_TBFREE_BASE 0x20083be0 -- Free request/descriptor buffers - * LPC17_IOFREE_BASE 0x20083d60 -- Free large I/O buffers - * LPC17_IOBUFFERS (0x20084000 - 0x20083d60) / 512 = 672/512 = 1 - * - * Wasted memory: 672-512 = 160 bytes - */ - -#define LPC17_HCCA_BASE (LPC17_OHCIRAM_BASE) -#define LPC17_TDTAIL_ADDR (LPC17_HCCA_BASE + LPC17_HCCA_SIZE) -#define LPC17_EDCTRL_ADDR (LPC17_TDTAIL_ADDR + LPC17_TD_SIZE) -#define LPC17_EDFREE_BASE (LPC17_EDCTRL_ADDR + LPC17_ED_SIZE) -#define LPC17_TDFREE_BASE (LPC17_EDFREE_BASE + LPC17_EDFREE_SIZE) -#define LPC17_TBFREE_BASE (LPC17_TDFREE_BASE + LPC17_TDFREE_SIZE) -#define LPC17_IOFREE_BASE (LPC17_TBFREE_BASE + LPC17_TBFREE_SIZE) - -#if LPC17_IOFREE_BASE > LPC17_OHCIRAM_END -# error "Insufficient OHCI RAM allocated" -#endif - -/* Finally, use the remainder of the allocated OHCI for IO buffers */ - -#if CONFIG_USBHOST_IOBUFSIZE > 0 -# define LPC17_IOBUFFERS ((LPC17_OHCIRAM_END - LPC17_IOFREE_BASE) / CONFIG_USBHOST_IOBUFSIZE) -#else -# define LPC17_IOBUFFERS 0 -#endif - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* CONFIG_USBHOST && CONFIG_LPC17_USBHOST && LPC17_NUSBHOST > 0*/ -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_ohciram.h + * + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Default, no-OHCI Case ************************************************************/ +/* Assume that all of AHB SRAM will be available for heap. If this is not true, then + * LPC17_BANK1_HEAPSIZE will be undefined but redefined below. + */ + +#undef LPC17_BANK1_HEAPBASE +#undef LPC17_BANK1_HEAPSIZE +#ifdef LPC17_HAVE_BANK1 +# define LPC17_BANK1_HEAPBASE LPC17_SRAM_BANK1 +# define LPC17_BANK1_HEAPSIZE LPC17_BANK1_SIZE +#endif + +/* Is networking enabled? Is the LPC17xx Ethernet device enabled? Does this chip have + * and Ethernet controlloer? Yes... then we will replace the above default definitions. + */ + +#if defined(CONFIG_USBHOST) && defined(CONFIG_LPC17_USBHOST) && LPC17_NUSBHOST > 0 + +/* OHCI RAM Configuration ***********************************************************/ +/* Is AHB SRAM available? */ + +#ifndef LPC17_HAVE_BANK1 +# error "AHB SRAM Bank1 is not available for OHCI RAM" +#endif + +/* OHCI/Heap Memory Allocation ******************************************************/ +/* Configured Size of the region at the end of AHB SRAM BANK1 set set aside for the + * OHCI. This size must fit within AHB SRAM Bank 1 and also be a multiple of 256 + * bytes. + */ + +#ifndef CONFIG_USBHOST_OHCIRAM_SIZE +# define CONFIG_USBHOST_OHCIRAM_SIZE LPC17_BANK1_SIZE +#endif + +#if CONFIG_USBHOST_OHCIRAM_SIZE > LPC17_BANK1_SIZE +# error "OHCI RAM size cannot exceed the size of AHB SRAM Bank 1" +#endif + +#if (CONFIG_USBHOST_OHCIRAM_SIZE & 0xff) != 0 +# error "OHCI RAM size must be in multiples of 256 bytes" +#endif + +/* Then position the OHCI RAM at the end of AHB SRAM Bank 1 */ + +#define LPC17_OHCIRAM_END (LPC17_SRAM_BANK1 + LPC17_BANK1_SIZE) +#define LPC17_OHCIRAM_BASE (LPC17_OHCIRAM_END - CONFIG_USBHOST_OHCIRAM_SIZE) +#define LPC17_OHCIRAM_SIZE CONFIG_USBHOST_OHCIRAM_SIZE + +/* Determine is there is any meaningful space left at the beginning of AHB Bank 1 + * that could be added to the heap. + */ + +#undef LPC17_BANK1_HEAPBASE +#undef LPC17_BANK1_HEAPSIZE +#if LPC17_OHCIRAM_SIZE < (LPC17_BANK1_SIZE-128) +# define LPC17_BANK1_HEAPBASE LPC17_SRAM_BANK1 +# define LPC17_BANK1_HEAPSIZE (LPC17_BANK1_SIZE - LPC17_OHCIRAM_SIZE) +#endif + +/* Numbers and Sizes of Things ******************************************************/ +/* Fixed size of the OHCI control area */ + +#define LPC17_HCCA_SIZE 256 + +/* Fixed endpoint descriptor size. The actual size required by the hardware is only + * 16 bytes, however, we set aside an additional 16 bytes for for internal use by + * the OHCI host driver. 16-bytes is set aside because the EDs must still be + * aligned to 16-byte boundaries. + */ + +#define LPC17_ED_SIZE 32 + +/* Configurable number of user endpoint descriptors (EDs). This number excludes + * the control endpoint that is always allocated. + */ + +#ifndef CONFIG_USBHOST_NEDS +# define CONFIG_USBHOST_NEDS 2 +#endif + +/* Derived size of user endpoint descriptor (ED) memory. */ + +#define LPC17_EDFREE_SIZE (CONFIG_USBHOST_NEDS * LPC17_ED_SIZE) + +/* Fixed transfer descriptor size. The actual size required by the hardware is only + * 16 bytes, however, we set aside an additional 16 bytes for for internal use by + * the OHCI host driver. 16-bytes is set aside because the TDs must still be + * aligned to 16-byte boundaries. + */ + +#define LPC17_TD_SIZE 32 + +/* Configurable number of user transfer descriptors (TDs). */ + +#ifndef CONFIG_USBHOST_NTDS +# define CONFIG_USBHOST_NTDS 3 +#endif + +#if CONFIG_USBHOST_NTDS < 2 +# error "Insufficent TDs" +#endif + +/* Derived size of user trasnfer descriptor (TD) memory. */ + +#define LPC17_TDFREE_SIZE (CONFIG_USBHOST_NTDS * LPC17_TD_SIZE) + +/* Configurable number of request/descriptor buffers (TDBUFFER) */ + +#ifndef CONFIG_USBHOST_TDBUFFERS +# define CONFIG_USBHOST_TDBUFFERS 2 +#endif + +#if CONFIG_USBHOST_TDBUFFERS < 2 +# error "At least two TD buffers are required" +#endif + +/* Configurable size of a TD buffer */ + +#if CONFIG_USBHOST_TDBUFFERS > 0 && !defined(CONFIG_USBHOST_TDBUFSIZE) +# define CONFIG_USBHOST_TDBUFSIZE 128 +#endif + +#if (CONFIG_USBHOST_TDBUFSIZE & 3) != 0 +# error "TD buffer size must be an even number of 32-bit words" +#endif + +#define LPC17_TBFREE_SIZE (CONFIG_USBHOST_TDBUFFERS * CONFIG_USBHOST_TDBUFSIZE) + +/* Configurable size of an IO buffer. The number of IO buffers will be determined + * by what is left at the end of the BANK1 memory setup aside of OHCI RAM. + */ + +#ifndef CONFIG_USBHOST_IOBUFSIZE +# define CONFIG_USBHOST_IOBUFSIZE 512 +#endif + +#if (CONFIG_USBHOST_IOBUFSIZE & 3) != 0 +# error "IO buffer size must be an even number of 32-bit words" +#endif + +/* OHCI Memory Layout ***************************************************************/ +/* Example: + * Hardware: + * LPC17_SRAM_BANK1 0x20008000 + * LPC17_BANK1_SIZE 16384 + * + * Configuration: + * CONFIG_USBHOST_OHCIRAM_SIZE 1536 + * CONFIG_USBHOST_NEDS 2 + * CONFIG_USBHOST_NTDS 3 + * CONFIG_USBHOST_TDBUFFERS 3 + * CONFIG_USBHOST_TDBUFSIZE 128 + * CONFIG_USBHOST_IOBUFSIZE 512 + * + * Sizes of things + * LPC17_EDFREE_SIZE 64 0x00000040 + * LPC17_TDFREE_SIZE 96 0x00000060 + * LPC17_TBFREE_SIZE 384 0x00000100 + * LPC17_IOFREE_SIZE 512 0x00000200 + * + * Memory Layout + * LPC17_OHCIRAM_END (0x20008000 + 16384) = 0x20084000 + * LPC17_OHCIRAM_BASE (0x2000c000 - 1536) = 0x2000ba00 + * LPC17_OHCIRAM_SIZE 1280 + * LPC17_BANK1_HEAPBASE 0x20008000 + * LPC17_BANK1_HEAPSIZE (16384 - 1280) = 15104 + * + * LPC17_HCCA_BASE 0x20083a00 -- Communications area + * LPC17_TDTAIL_ADDR 0x20083b00 -- Common. pre-allocated tail TD + * LPC17_EDCTRL_ADDR 0x20083b20 -- Pre-allocated ED for EP0 + * LPC17_EDFREE_BASE 0x20083b40 -- Free EDs + * LPC17_TDFREE_BASE 0x20083b80 -- Free TDs + * LPC17_TBFREE_BASE 0x20083be0 -- Free request/descriptor buffers + * LPC17_IOFREE_BASE 0x20083d60 -- Free large I/O buffers + * LPC17_IOBUFFERS (0x20084000 - 0x20083d60) / 512 = 672/512 = 1 + * + * Wasted memory: 672-512 = 160 bytes + */ + +#define LPC17_HCCA_BASE (LPC17_OHCIRAM_BASE) +#define LPC17_TDTAIL_ADDR (LPC17_HCCA_BASE + LPC17_HCCA_SIZE) +#define LPC17_EDCTRL_ADDR (LPC17_TDTAIL_ADDR + LPC17_TD_SIZE) +#define LPC17_EDFREE_BASE (LPC17_EDCTRL_ADDR + LPC17_ED_SIZE) +#define LPC17_TDFREE_BASE (LPC17_EDFREE_BASE + LPC17_EDFREE_SIZE) +#define LPC17_TBFREE_BASE (LPC17_TDFREE_BASE + LPC17_TDFREE_SIZE) +#define LPC17_IOFREE_BASE (LPC17_TBFREE_BASE + LPC17_TBFREE_SIZE) + +#if LPC17_IOFREE_BASE > LPC17_OHCIRAM_END +# error "Insufficient OHCI RAM allocated" +#endif + +/* Finally, use the remainder of the allocated OHCI for IO buffers */ + +#if CONFIG_USBHOST_IOBUFSIZE > 0 +# define LPC17_IOBUFFERS ((LPC17_OHCIRAM_END - LPC17_IOFREE_BASE) / CONFIG_USBHOST_IOBUFSIZE) +#else +# define LPC17_IOBUFFERS 0 +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* CONFIG_USBHOST && CONFIG_LPC17_USBHOST && LPC17_NUSBHOST > 0*/ +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_OHCIRAM_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h b/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h index e41bdb8dee..c0e0ec9160 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h @@ -1,635 +1,635 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_pinconn.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_PINCONN_PINSEL0_OFFSET 0x0000 /* Pin function select register 0 */ -#define LPC17_PINCONN_PINSEL1_OFFSET 0x0004 /* Pin function select register 1 */ -#define LPC17_PINCONN_PINSEL2_OFFSET 0x0008 /* Pin function select register 2 */ -#define LPC17_PINCONN_PINSEL3_OFFSET 0x000c /* Pin function select register 3 */ -#define LPC17_PINCONN_PINSEL4_OFFSET 0x0010 /* Pin function select register 4 */ -#define LPC17_PINCONN_PINSEL7_OFFSET 0x001c /* Pin function select register 7 */ -#define LPC17_PINCONN_PINSEL8_OFFSET 0x0020 /* Pin function select register 8 */ -#define LPC17_PINCONN_PINSEL9_OFFSET 0x0024 /* Pin function select register 9 */ -#define LPC17_PINCONN_PINSEL10_OFFSET 0x0028 /* Pin function select register 10 */ -#define LPC17_PINCONN_PINMODE0_OFFSET 0x0040 /* Pin mode select register 0 */ -#define LPC17_PINCONN_PINMODE1_OFFSET 0x0044 /* Pin mode select register 1 */ -#define LPC17_PINCONN_PINMODE2_OFFSET 0x0048 /* Pin mode select register 2 */ -#define LPC17_PINCONN_PINMODE3_OFFSET 0x004c /* Pin mode select register 3 */ -#define LPC17_PINCONN_PINMODE4_OFFSET 0x0050 /* Pin mode select register 4 */ -#define LPC17_PINCONN_PINMODE5_OFFSET 0x0054 /* Pin mode select register 5 */ -#define LPC17_PINCONN_PINMODE6_OFFSET 0x0058 /* Pin mode select register 6 */ -#define LPC17_PINCONN_PINMODE7_OFFSET 0x005c /* Pin mode select register 7 */ -#define LPC17_PINCONN_PINMODE9_OFFSET 0x0064 /* Pin mode select register 9 */ -#define LPC17_PINCONN_ODMODE0_OFFSET 0x0068 /* Open drain mode control register 0 */ -#define LPC17_PINCONN_ODMODE1_OFFSET 0x006c /* Open drain mode control register 1 */ -#define LPC17_PINCONN_ODMODE2_OFFSET 0x0070 /* Open drain mode control register 2 */ -#define LPC17_PINCONN_ODMODE3_OFFSET 0x0074 /* Open drain mode control register 3 */ -#define LPC17_PINCONN_ODMODE4_OFFSET 0x0078 /* Open drain mode control register 4 */ -#define LPC17_PINCONN_I2CPADCFG_OFFSET 0x007c /* I2C Pin Configuration register */ - -/* Register addresses ***************************************************************/ - -#define LPC17_PINCONN_PINSEL0 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL0_OFFSET) -#define LPC17_PINCONN_PINSEL1 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL1_OFFSET) -#define LPC17_PINCONN_PINSEL2 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL2_OFFSET) -#define LPC17_PINCONN_PINSEL3 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL3_OFFSET) -#define LPC17_PINCONN_PINSEL4 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL4_OFFSET) -#define LPC17_PINCONN_PINSEL7 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL7_OFFSET) -#define LPC17_PINCONN_PINSEL8 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL8_OFFSET) -#define LPC17_PINCONN_PINSEL9 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL9_OFFSET) -#define LPC17_PINCONN_PINSEL10 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL10_OFFSET) -#define LPC17_PINCONN_PINMODE0 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE0_OFFSET) -#define LPC17_PINCONN_PINMODE1 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE1_OFFSET) -#define LPC17_PINCONN_PINMODE2 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE2_OFFSET) -#define LPC17_PINCONN_PINMODE3 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE3_OFFSET) -#define LPC17_PINCONN_PINMODE4 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE4_OFFSET) -#define LPC17_PINCONN_PINMODE5 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE5_OFFSET) -#define LPC17_PINCONN_PINMODE6 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE6_OFFSET) -#define LPC17_PINCONN_PINMODE7 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE7_OFFSET) -#define LPC17_PINCONN_PINMODE9 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE9_OFFSET) -#define LPC17_PINCONN_ODMODE0 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE0_OFFSET) -#define LPC17_PINCONN_ODMODE1 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE1_OFFSET) -#define LPC17_PINCONN_ODMODE2 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE2_OFFSET) -#define LPC17_PINCONN_ODMODE3 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE3_OFFSET) -#define LPC17_PINCONN_ODMODE4 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE4_OFFSET) -#define LPC17_PINCONN_I2CPADCFG (LPC17_PINCONN_BASE+LPC17_PINCONN_I2CPADCFG_OFFSET) - -/* Register bit definitions *********************************************************/ -/* Pin Function Select register 0 (PINSEL0: 0x4002c000) */ - -#define PINCONN_PINSEL_GPIO (0) -#define PINCONN_PINSEL_ALT1 (1) -#define PINCONN_PINSEL_ALT2 (2) -#define PINCONN_PINSEL_ALT3 (3) -#define PINCONN_PINSEL_MASK (3) - -#define PINCONN_PINSELL_SHIFT(n) ((n) << 1) /* n=0,1,..,15 */ -#define PINCONN_PINSELL_MASK(n) (3 << PINCONN_PINSELL_SHIFT(n)) -#define PINCONN_PINSELH_SHIFT(n) (((n)-16) << 1) /* n=16,17,..31 */ -#define PINCONN_PINSELH_MASK(n) (3 << PINCONN_PINSELH_SHIFT(n)) - -#define PINCONN_PINSEL0_P0_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINSEL0_P0_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINSEL0_P0p0_SHIFT (0) /* Bits 0-1: P0.0 00=GPIO 01=RD1 10=TXD3 11=SDA1 */ -#define PINCONN_PINSEL0_P0p0_MASK (3 << PINCONN_PINSEL0_P0p0_SHIFT) -#define PINCONN_PINSEL0_P0p1_SHIFT (2) /* Bits 2-3: P0.1 00=GPIO 01=TD1 10=RXD3 11=SCL1 */ -#define PINCONN_PINSEL0_P0p1_MASK (3 << PINCONN_PINSEL0_P0p1_SHIFT) -#define PINCONN_PINSEL0_P0p2_SHIFT (4) /* Bits 4-5: P0.2 00=GPIO 01=TXD0 10=AD0.7 11=Reserved */ -#define PINCONN_PINSEL0_P0p2_MASK (3 << PINCONN_PINSEL0_P0p2_SHIFT) -#define PINCONN_PINSEL0_P0p3_SHIFT (6) /* Bits 6-7: P0.3 00=GPIO 01=RXD0 10=AD0.6 11=Reserved */ -#define PINCONN_PINSEL0_P0p3_MASK (3 << PINCONN_PINSEL0_P0p3_SHIFT) -#define PINCONN_PINSEL0_P0p4_SHIFT (8) /* Bits 8-9: P0.4 00=GPIO 01=I2SRX_CLK 10=RD2 11=CAP2.0 */ -#define PINCONN_PINSEL0_P0p4_MASK (3 << PINCONN_PINSEL0_P0p4_SHIFT) -#define PINCONN_PINSEL0_P0p5_SHIFT (10) /* Bits 10-11: P0.5 00=GPIO 01=I2SRX_WS 10=TD2 11=CAP2.1 */ -#define PINCONN_PINSEL0_P0p5_MASK (3 << PINCONN_PINSEL0_P0p5_SHIFT) -#define PINCONN_PINSEL0_P0p6_SHIFT (12) /* Bits 12-13: P0.6 00=GPIO 01=I2SRX_SDA 10=SSEL1 11=MAT2.0 */ -#define PINCONN_PINSEL0_P0p6_MASK (3 << PINCONN_PINSEL0_P0p6_SHIFT) -#define PINCONN_PINSEL0_P0p7_SHIFT (14) /* Bits 14-15: P0.7 00=GPIO 01=I2STX_CLK 10=SCK1 11=MAT2.1 */ -#define PINCONN_PINSEL0_P0p7_MASK (3 << PINCONN_PINSEL0_P0p7_SHIFT) -#define PINCONN_PINSEL0_P0p8_SHIFT (16) /* Bits 16-17: P0.8 00=GPIO 01=I2STX_WS 10=MISO1 11=MAT2.2 */ -#define PINCONN_PINSEL0_P0p8_MASK (3 << PINCONN_PINSEL0_P0p8_SHIFT) -#define PINCONN_PINSEL0_P0p9_SHIFT (18) /* Bits 18-19: P0.9 00=GPIO 01=I2STX_SDA 10=MOSI1 11=MAT2.3 */ -#define PINCONN_PINSEL0_P0p9_MASK (3 << PINCONN_PINSEL0_P0p9_SHIFT) -#define PINCONN_PINSEL0_P0p10_SHIFT (20) /* Bits 20-21: P0.10 00=GPIO 01=TXD2 10=SDA2 11=MAT3.0 */ -#define PINCONN_PINSEL0_P0p10_MASK (3 << PINCONN_PINSEL0_P0p10_SHIFT) -#define PINCONN_PINSEL0_P0p11_SHIFT (22) /* Bits 22-23: P0.11 00=GPIO 01=RXD2 10=SCL2 11=MAT3.1 */ -#define PINCONN_PINSEL0_P0p11_MASK (3 << PINCONN_PINSEL0_P0p11_SHIFT) - /* Bits 24-29: Reserved */ -#define PINCONN_PINSEL0_P0p15_SHIFT (30) /* Bits 30-31: P0.15 00=GPIO 01=TXD1 10=SCK0 11=SCK */ -#define PINCONN_PINSEL0_P0p15_MASK (3 << PINCONN_PINSEL0_P0p15_SHIFT) - -/* Pin Function Select Register 1 (PINSEL1: 0x4002c004) */ - -#define PINCONN_PINSEL1_P0_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINSEL1_P0_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ - -#define PINCONN_PINSEL1_P0p16_SHIFT (0) /* Bits 0-1: P0.16 00=GPIO 01=RXD1 10=SSEL0 11=SSEL */ -#define PINCONN_PINSEL1_P0p16_MASK (3 << PINCONN_PINSEL1_P0p16_SHIFT) -#define PINCONN_PINSEL1_P0p17_SHIFT (2) /* Bits 2-3: P0.17 00=GPIO 01=CTS1 10=MISO0 11=MISO */ -#define PINCONN_PINSEL1_P0p17_MASK (3 << PINCONN_PINSEL1_P0p17_SHIFT) -#define PINCONN_PINSEL1_P0p18_SHIFT (4) /* Bits 4-5: P0.18 00=GPIO 01=DCD1 10=MOSI0 11=MOSI */ -#define PINCONN_PINSEL1_P0p18_MASK (3 << PINCONN_PINSEL1_P0p18_SHIFT) -#define PINCONN_PINSEL1_P0p19_SHIFT (6) /* Bits 6-7: P0.19 00=GPIO 01=DSR1 10=Reserved 11=SDA1 */ -#define PINCONN_PINSEL1_P0p19_MASK (3 << PINCONN_PINSEL1_P0p19_SHIFT) -#define PINCONN_PINSEL1_P0p20_SHIFT (8) /* Bits 8-9: P0.20 00=GPIO 01=DTR1 10=Reserved 11=SCL1 */ -#define PINCONN_PINSEL1_P0p20_MASK (3 << PINCONN_PINSEL1_P0p20_SHIFT) -#define PINCONN_PINSEL1_P0p21_SHIFT (10) /* Bits 10-11: P0.21 00=GPIO 01=RI1 10=Reserved 11=RD1 */ -#define PINCONN_PINSEL1_P0p21_MASK (3 << PINCONN_PINSEL1_P0p21_SHIFT) -#define PINCONN_PINSEL1_P0p22_SHIFT (12) /* Bits 12-13: P0.22 00=GPIO 01=RTS1 10=Reserved 11=TD1 */ -#define PINCONN_PINSEL1_P0p22_MASK (3 << PINCONN_PINSEL1_P0p22_SHIFT) -#define PINCONN_PINSEL1_P0p23_SHIFT (14) /* Bits 14-15: P0.23 00=GPIO 01=AD0.0 10=I2SRX_CLK 11=CAP3.0 */ -#define PINCONN_PINSEL1_P0p23_MASK (3 << PINCONN_PINSEL1_P0p23_SHIFT) -#define PINCONN_PINSEL1_P0p24_SHIFT (16) /* Bits 16-17: P0.24 00=GPIO 01=AD0.1 10=I2SRX_WS 11=CAP3.1 */ -#define PINCONN_PINSEL1_P0p24_MASK (3 << PINCONN_PINSEL1_P0p24_SHIFT) -#define PINCONN_PINSEL1_P0p25_SHIFT (18) /* Bits 18-19: P0.25 00=GPIO 01=AD0.2 10=I2SRX_SDA 11=TXD3 */ -#define PINCONN_PINSEL1_P0p25_MASK (3 << PINCONN_PINSEL1_P0p25_SHIFT) -#define PINCONN_PINSEL1_P0p26_SHIFT (20) /* Bits 20-21: P0.26 00=GPIO 01=AD0.3 10=AOUT 11=RXD3 */ -#define PINCONN_PINSEL1_P0p26_MASK (3 << PINCONN_PINSEL1_P0p26_SHIFT) -#define PINCONN_PINSEL1_P0p27_SHIFT (22) /* Bits 22-23: P0.27 00=GPIO 01=SDA0 10=USB_SDA 11=Reserved */ -#define PINCONN_PINSEL1_P0p27_MASK (3 << PINCONN_PINSEL1_P0p27_SHIFT) -#define PINCONN_PINSEL1_P0p28_SHIFT (24) /* Bits 24-25: P0.28 00=GPIO 01=SCL0 10=USB_SCL 11=Reserved */ -#define PINCONN_PINSEL1_P0p28_MASK (3 << PINCONN_PINSEL1_P0p28_SHIFT) -#define PINCONN_PINSEL1_P0p29_SHIFT (26) /* Bits 26-27: P0.29 00=GPIO 01=USB_D+ 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL1_P0p29_MASK (3 << PINCONN_PINSEL1_P0p29_SHIFT) -#define PINCONN_PINSEL1_P0p30_SHIFT (28) /* Bits 28-29: P0.30 00=GPIO 01=USB_D- 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL1_P0p30_MASK (3 << PINCONN_PINSEL1_P0p30_SHIFT) - /* Bits 30-31: Reserved */ -/* Pin Function Select register 2 (PINSEL2: 0x4002c008) */ - -#define PINCONN_PINSEL2_P1_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINSEL2_P1_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINSEL2_P1p0_SHIFT (0) /* Bits 0-1: P1.0 00=GPIO 01=ENET_TXD0 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p0_MASK (3 << PINCONN_PINSEL2_P1p0_SHIFT) -#define PINCONN_PINSEL2_P1p1_SHIFT (2) /* Bits 2-3: P1.1 00=GPIO 01=ENET_TXD1 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p1_MASK (3 << PINCONN_PINSEL2_P1p1_SHIFT) - /* Bits 4-7: Reserved */ -#define PINCONN_PINSEL2_P1p4_SHIFT (8) /* Bits 8-9: P1.4 00=GPIO 01=ENET_TX_EN 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p4_MASK (3 << PINCONN_PINSEL2_P1p4_SHIFT) - /* Bits 10-15: Reserved */ -#define PINCONN_PINSEL2_P1p8_SHIFT (16) /* Bits 16-17: P1.8 00=GPIO 01=ENET_CRS 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p8_MASK (3 << PINCONN_PINSEL2_P1p8_SHIFT) -#define PINCONN_PINSEL2_P1p9_SHIFT (18) /* Bits 18-19: P1.9 00=GPIO 01=ENET_RXD0 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p9_MASK (3 << PINCONN_PINSEL2_P1p9_SHIFT) -#define PINCONN_PINSEL2_P1p10_SHIFT (20) /* Bits 20-21: P1.10 00=GPIO 01=ENET_RXD1 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p10_MASK (3 << PINCONN_PINSEL2_P1p10_SHIFT) - /* Bits 22-27: Reserved */ -#define PINCONN_PINSEL2_P1p14_SHIFT (28) /* Bits 28-29: P1.14 00=GPIO 01=ENET_RX_ER 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p14_MASK (3 << PINCONN_PINSEL2_P1p14_SHIFT) -#define PINCONN_PINSEL2_P1p15_SHIFT (30) /* Bits 30-31: P1.15 00=GPIO 01=ENET_REF_CLK 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL2_P1p15_MASK (3 << PINCONN_PINSEL2_P1p15_SHIFT) - -/* Pin Function Select Register 3 (PINSEL3: 0x4002c00c) */ - -#define PINCONN_PINSEL3_P1_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINSEL3_P1_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ - -#define PINCONN_PINSEL3_P1p16_SHIFT (0) /* Bits 0-1: P1.16 00=GPIO 01=ENET_MDC 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL3_P1p16_MASK (3 << PINCONN_PINSEL3_P1p16_SHIFT) -#define PINCONN_PINSEL3_P1p17_SHIFT (2) /* Bits 2-3: P1.17 00=GPIO 01=ENET_MDIO 10=Reserved 11=Reserved */ -#define PINCONN_PINSEL3_P1p17_MASK (3 << PINCONN_PINSEL3_P1p17_SHIFT) -#define PINCONN_PINSEL3_P1p18_SHIFT (4) /* Bits 4-5: P1.18 00=GPIO 01=USB_UP_LED 10=PWM1.1 11=CAP1.0 */ -#define PINCONN_PINSEL3_P1p18_MASK (3 << PINCONN_PINSEL3_P1p18_SHIFT) -#define PINCONN_PINSEL3_P1p19_SHIFT (6) /* Bits 6-7: P1.19 00=GPIO 01=MCOA0 10=USB_PPWR 11=CAP1.1 */ -#define PINCONN_PINSEL3_P1p19_MASK (3 << PINCONN_PINSEL3_P1p19_SHIFT) -#define PINCONN_PINSEL3_P1p20_SHIFT (8) /* Bits 8-9: P1.20 00=GPIO 01=MCI0 10=PWM1.2 11=SCK0 */ -#define PINCONN_PINSEL3_P1p20_MASK (3 << PINCONN_PINSEL3_P1p20_SHIFT) -#define PINCONN_PINSEL3_P1p21_SHIFT (10) /* Bits 10-11: P1.21 00=GPIO 01=MCABORT 10=PWM1.3 11=SSEL0 */ -#define PINCONN_PINSEL3_P1p21_MASK (3 << PINCONN_PINSEL3_P1p21_SHIFT) -#define PINCONN_PINSEL3_P1p22_SHIFT (12) /* Bits 12-13: P1.22 00=GPIO 01=MCOB0 10=USB_PWRD 11=MAT1.0 */ -#define PINCONN_PINSEL3_P1p22_MASK (3 << PINCONN_PINSEL3_P1p22_SHIFT) -#define PINCONN_PINSEL3_P1p23_SHIFT (14) /* Bits 14-15: P1.23 00=GPIO 01=MCI1 10=PWM1.4 11=MISO0 */ -#define PINCONN_PINSEL3_P1p23_MASK (3 << PINCONN_PINSEL3_P1p23_SHIFT) -#define PINCONN_PINSEL3_P1p24_SHIFT (16) /* Bits 16-17: P1.24 00=GPIO 01=MCI2 10=PWM1.5 11=MOSI0 */ -#define PINCONN_PINSEL3_P1p24_MASK (3 << PINCONN_PINSEL3_P1p24_SHIFT) -#define PINCONN_PINSEL3_P1p25_SHIFT (18) /* Bits 18-19: P1.25 00=GPIO 01=MCOA1 10=Reserved 11=MAT1.1 */ -#define PINCONN_PINSEL3_P1p25_MASK (3 << PINCONN_PINSEL3_P1p25_SHIFT) -#define PINCONN_PINSEL3_P1p26_SHIFT (20) /* Bits 20-21: P1.26 00=GPIO 01=MCOB1 10=PWM1.6 11=CAP0.0 */ -#define PINCONN_PINSEL3_P1p26_MASK (3 << PINCONN_PINSEL3_P1p26_SHIFT) -#define PINCONN_PINSEL3_P1p27_SHIFT (22) /* Bits 22-23: P1.27 00=GPIO 01=CLKOUT 10=USB_OVRCR 11=CAP0.1 */ -#define PINCONN_PINSEL3_P1p27_MASK (3 << PINCONN_PINSEL3_P1p27_SHIFT) -#define PINCONN_PINSEL3_P1p28_SHIFT (24) /* Bits 24-25: P1.28 00=GPIO 01=MCOA2 10=PCAP1.0 11=MAT0.0 */ -#define PINCONN_PINSEL3_P1p28_MASK (3 << PINCONN_PINSEL3_P1p28_SHIFT) -#define PINCONN_PINSEL3_P1p29_SHIFT (26) /* Bits 26-27: P1.29 00=GPIO 01=MCOB2 10=PCAP1.1 11=MAT0.1 */ -#define PINCONN_PINSEL3_P1p29_MASK (3 << PINCONN_PINSEL3_P1p29_SHIFT) -#define PINCONN_PINSEL3_P1p30_SHIFT (28) /* Bits 28-29: P1.30 00=GPIO 01=Reserved 10=VBUS 11=AD0.4 */ -#define PINCONN_PINSEL3_P1p30_MASK (3 << PINCONN_PINSEL3_P1p30_SHIFT) -#define PINCONN_PINSEL3_P1p31_SHIFT (30) /* Bits 30-31: P1.31 00=GPIO 01=Reserved 10=SCK1 11=AD0.5 */ -#define PINCONN_PINSEL3_P1p31_MASK (3 << PINCONN_PINSEL3_P1p31_SHIFT) - -/* Pin Function Select Register 4 (PINSEL4: 0x4002c010) */ - -#define PINCONN_PINSEL4_P2_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINSEL4_P2_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINSEL4_P2p0_SHIFT (0) /* Bits 0-1: P2.0 00=GPIO 01=PWM1.1 10=TXD1 11=Reserved */ -#define PINCONN_PINSEL4_P2p0_MASK (3 << PINCONN_PINSEL4_P2p0_SHIFT) -#define PINCONN_PINSEL4_P2p1_SHIFT (2) /* Bits 2-3: P2.1 00=GPIO 01=PWM1.2 10=RXD1 11=Reserved */ -#define PINCONN_PINSEL4_P2p1_MASK (3 << PINCONN_PINSEL4_P2p1_SHIFT) -#define PINCONN_PINSEL4_P2p2_SHIFT (4) /* Bits 4-5: P2.2 00=GPIO 01=PWM1.3 10=CTS1 11=Reserved */ -#define PINCONN_PINSEL4_P2p2_MASK (3 << PINCONN_PINSEL4_P2p2_SHIFT) -#define PINCONN_PINSEL4_P2p3_SHIFT (6) /* Bits 6-7: P2.3 00=GPIO 01=PWM1.4 10=DCD1 11=Reserved */ -#define PINCONN_PINSEL4_P2p3_MASK (3 << PINCONN_PINSEL4_P2p3_SHIFT) -#define PINCONN_PINSEL4_P2p4_SHIFT (8) /* Bits 8-9: P2.4 00=GPIO 01=PWM1.5 10=DSR1 11=Reserved */ -#define PINCONN_PINSEL4_P2p4_MASK (3 << PINCONN_PINSEL4_P2p4_SHIFT) -#define PINCONN_PINSEL4_P2p5_SHIFT (10) /* Bits 10-11: P2.5 00=GPIO 01=PWM1.6 10=DTR1 11=Reserved */ -#define PINCONN_PINSEL4_P2p5_MASK (3 << PINCONN_PINSEL4_P2p5_SHIFT) -#define PINCONN_PINSEL4_P2p6_SHIFT (12) /* Bits 12-13: P2.6 00=GPIO 01=PCAP1.0 10=RI1 11=Reserved */ -#define PINCONN_PINSEL4_P2p6_MASK (3 << PINCONN_PINSEL4_P2p6_SHIFT) -#define PINCONN_PINSEL4_P2p7_SHIFT (14) /* Bits 14-15: P2.7 00=GPIO 01=RD2 10=RTS1 11=Reserved */ -#define PINCONN_PINSEL4_P2p7_MASK (3 << PINCONN_PINSEL4_P2p7_SHIFT) -#define PINCONN_PINSEL4_P2p8_SHIFT (16) /* Bits 16-17: P2.8 00=GPIO 01=TD2 10=TXD2 11=ENET_MDC */ -#define PINCONN_PINSEL4_P2p8_MASK (3 << PINCONN_PINSEL4_P2p8_SHIFT) -#define PINCONN_PINSEL4_P2p9_SHIFT (18) /* Bits 18-19: P2.9 00=GPIO 01=USB_CONNECT 10=RXD2 11=ENET_MDIO */ -#define PINCONN_PINSEL4_P2p9_MASK (3 << PINCONN_PINSEL4_P2p9_SHIFT) -#define PINCONN_PINSEL4_P2p10_SHIFT (20) /* Bits 20-21: P2.10 00=GPIO 01=EINT0 10=NMI 11=Reserved */ -#define PINCONN_PINSEL4_P2p10_MASK (3 << PINCONN_PINSEL4_P2p10_SHIFT) -#define PINCONN_PINSEL4_P2p11_SHIFT (22) /* Bits 22-23: P2.11 00=GPIO 01=EINT1 10=Reserved 11=I2STX_CLK */ -#define PINCONN_PINSEL4_P2p11_MASK (3 << PINCONN_PINSEL4_P2p11_SHIFT) -#define PINCONN_PINSEL4_P2p12_SHIFT (24) /* Bits 24-25: P2.12 00=GPIO 01=PEINT2 10=Reserved 11=I2STX_WS */ -#define PINCONN_PINSEL4_P2p12_MASK (3 << PINCONN_PINSEL4_P2p12_SHIFT) -#define PINCONN_PINSEL4_P2p13_SHIFT (26) /* Bits 26-27: P2.13 00=GPIO 01=EINT3 10=Reserved 11=I2STX_SDA */ -#define PINCONN_PINSEL4_P2p13_MASK (3 << PINCONN_PINSEL4_P2p13_SHIFT) - /* Bits 28-31: Reserved */ -/* Pin Function Select Register 7 (PINSEL7: 0x4002c01c) */ - -#define PINCONN_PINSEL7_P3_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINSEL7_P3_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ - - /* Bits 0-17: Reserved */ -#define PINCONN_PINSEL7_P3p25_SHIFT (18) /* Bits 18-19: P3.25 00=GPIO 01=Reserved 10=MAT0.0 11=PWM1.2 */ -#define PINCONN_PINSEL7_P3p25_MASK (3 << PINCONN_PINSEL7_P3p25_SHIFT) -#define PINCONN_PINSEL7_P3p26_SHIFT (20) /* Bits 20-21: P3.26 00=GPIO 01=STCLK 10=MAT0.1 11=PWM1.3 */ -#define PINCONN_PINSEL7_P3p26_MASK (3 << PINCONN_PINSEL7_P3p26_SHIFT) - /* Bits 22-31: Reserved */ - -/* Pin Function Select Register 8 (PINSEL8: 0x4002c020) */ -/* No description of bits -- Does this register exist? */ - -/* Pin Function Select Register 9 (PINSEL9: 0x4002c024) */ - -#define PINCONN_PINSEL9_P4_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINSEL9_P4_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ - - /* Bits 0-23: Reserved */ -#define PINCONN_PINSEL9_P4p28_SHIFT (24) /* Bits 24-25: P4.28 00=GPIO 01=RX_MCLK 10=MAT2.0 11=TXD3 */ -#define PINCONN_PINSEL9_P4p28_MASK (3 << PINCONN_PINSEL9_P4p28_SHIFT) -#define PINCONN_PINSEL9_P4p29_SHIFT (26) /* Bits 26-27: P4.29 00=GPIO 01=TX_MCLK 10=MAT2.1 11=RXD3 */ -#define PINCONN_PINSEL9_P4p29_MASK (3 << PINCONN_PINSEL9_P4p29_SHIFT) - /* Bits 28-31: Reserved */ -/* Pin Function Select Register 10 (PINSEL10: 0x4002c028) */ - /* Bits 0-2: Reserved */ -#define PINCONN_PINSEL10_TPIU (1 << 3) /* Bit 3: 0=TPIU interface disabled; 1=TPIU interface enabled */ - /* Bits 4-31: Reserved */ -/* Pin Mode select register 0 (PINMODE0: 0x4002c040) */ - -#define PINCONN_PINMODE_PU (0) /* 00: pin has a pull-up resistor enabled */ -#define PINCONN_PINMODE_RM (1) /* 01: pin has repeater mode enabled */ -#define PINCONN_PINMODE_FLOAT (2) /* 10: pin has neither pull-up nor pull-down */ -#define PINCONN_PINMODE_PD (3) /* 11: pin has a pull-down resistor enabled */ -#define PINCONN_PINMODE_MASK (3) - -#define PINCONN_PINMODEL_SHIFT(n) ((n) << 1) /* n=0,1,..,15 */ -#define PINCONN_PINMODEL_MASK(n) (3 << PINCONN_PINMODEL_SHIFT(n)) -#define PINCONN_PINMODEH_SHIFT(n) (((n)-16) << 1) /* n=16,17,..31 */ -#define PINCONN_PINMODEH_MASK(n) (3 << PINCONN_PINMODEH_SHIFT(n)) - -#define PINCONN_PINMODE0_P0_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINMODE0_P0_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINMODE0_P0p0_SHIFT (0) /* Bits 0-1: P0.0 mode control */ -#define PINCONN_PINMODE0_P0p0_MASK (3 << PINCONN_PINMODE0_P0p0_SHIFT) -#define PINCONN_PINMODE0_P0p1_SHIFT (2) /* Bits 2-3: P0.1 mode control */ -#define PINCONN_PINMODE0_P0p1_MASK (3 << PINCONN_PINMODE0_P0p1_SHIFT) -#define PINCONN_PINMODE0_P0p2_SHIFT (4) /* Bits 4-5: P0.2 mode control */ -#define PINCONN_PINMODE0_P0p2_MASK (3 << PINCONN_PINMODE0_P0p2_SHIFT) -#define PINCONN_PINMODE0_P0p3_SHIFT (6) /* Bits 6-7: P0.3 mode control */ -#define PINCONN_PINMODE0_P0p3_MASK (3 << PINCONN_PINMODE0_P0p3_SHIFT) -#define PINCONN_PINMODE0_P0p4_SHIFT (8) /* Bits 8-9: P0.4 mode control */ -#define PINCONN_PINMODE0_P0p4_MASK (3 << PINCONN_PINMODE0_P0p4_SHIFT) -#define PINCONN_PINMODE0_P0p5_SHIFT (10) /* Bits 10-11: P0.5 mode control */ -#define PINCONN_PINMODE0_P0p5_MASK (3 << PINCONN_PINMODE0_P0p5_SHIFT) -#define PINCONN_PINMODE0_P0p6_SHIFT (12) /* Bits 12-13: P0.6 mode control */ -#define PINCONN_PINMODE0_P0p6_MASK (3 << PINCONN_PINMODE0_P0p6_SHIFT) -#define PINCONN_PINMODE0_P0p7_SHIFT (14) /* Bits 14-15: P0.7 mode control */ -#define PINCONN_PINMODE0_P0p7_MASK (3 << PINCONN_PINMODE0_P0p7_SHIFT) -#define PINCONN_PINMODE0_P0p8_SHIFT (16) /* Bits 16-17: P0.8 mode control */ -#define PINCONN_PINMODE0_P0p8_MASK (3 << PINCONN_PINMODE0_P0p8_SHIFT) -#define PINCONN_PINMODE0_P0p9_SHIFT (18) /* Bits 18-19: P0.9 mode control */ -#define PINCONN_PINMODE0_P0p9_MASK (3 << PINCONN_PINMODE0_P0p9_SHIFT) -#define PINCONN_PINMODE0_P0p10_SHIFT (20) /* Bits 20-21: P0.10 mode control */ -#define PINCONN_PINMODE0_P0p10_MASK (3 << PINCONN_PINMODE0_P0p10_SHIFT) -#define PINCONN_PINMODE0_P0p11_SHIFT (22) /* Bits 22-23: P0.11 mode control */ -#define PINCONN_PINMODE0_P0p11_MASK (3 << PINCONN_PINMODE0_P0p11_SHIFT) - /* Bits 24-29: Reserved */ -#define PINCONN_PINMODE0_P0p15_SHIFT (30) /* Bits 30-31: P0.15 mode control */ -#define PINCONN_PINMODE0_P0p15_MASK (3 << PINCONN_PINMODE0_P0p15_SHIFT) - -/* Pin Mode select register 1 (PINMODE1: 0x4002c044) */ - -#define PINCONN_PINMODE1_P0_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINMODE1_P0_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ - -#define PINCONN_PINMODE1_P0p16_SHIFT (0) /* Bits 0-1: P0.16 mode control */ -#define PINCONN_PINMODE1_P0p16_MASK (3 << PINCONN_PINMODE1_P0p16_SHIFT) -#define PINCONN_PINMODE1_P0p17_SHIFT (2) /* Bits 2-3: P0.17 mode control */ -#define PINCONN_PINMODE1_P0p17_MASK (3 << PINCONN_PINMODE1_P0p17_SHIFT) -#define PINCONN_PINMODE1_P0p18_SHIFT (4) /* Bits 4-5: P0.18 mode control */ -#define PINCONN_PINMODE1_P0p18_MASK (3 << PINCONN_PINMODE1_P0p18_SHIFT) -#define PINCONN_PINMODE1_P0p19_SHIFT (6) /* Bits 6-7: P0.19 mode control */ -#define PINCONN_PINMODE1_P0p19_MASK (3 << PINCONN_PINMODE1_P0p19_SHIFT) -#define PINCONN_PINMODE1_P0p20_SHIFT (8) /* Bits 8-9: P0.20 mode control */ -#define PINCONN_PINMODE1_P0p20_MASK (3 << PINCONN_PINMODE1_P0p20_SHIFT) -#define PINCONN_PINMODE1_P0p21_SHIFT (10) /* Bits 10-11: P0.21 mode control */ -#define PINCONN_PINMODE1_P0p21_MASK (3 << PINCONN_PINMODE1_P0p21_SHIFT) -#define PINCONN_PINMODE1_P0p22_SHIFT (12) /* Bits 12-13: P0.22 mode control */ -#define PINCONN_PINMODE1_P0p22_MASK (3 << PINCONN_PINMODE1_P0p22_SHIFT) -#define PINCONN_PINMODE1_P0p23_SHIFT (14) /* Bits 14-15: P0.23 mode control */ -#define PINCONN_PINMODE1_P0p23_MASK (3 << PINCONN_PINMODE1_P0p23_SHIFT) -#define PINCONN_PINMODE1_P0p24_SHIFT (16) /* Bits 16-17: P0.24 mode control */ -#define PINCONN_PINMODE1_P0p24_MASK (3 << PINCONN_PINMODE1_P0p24_SHIFT) -#define PINCONN_PINMODE1_P0p25_SHIFT (18) /* Bits 18-19: P0.25 mode control */ -#define PINCONN_PINMODE1_P0p25_MASK (3 << PINCONN_PINMODE1_P0p25_SHIFT) -#define PINCONN_PINMODE1_P0p26_SHIFT (20) /* Bits 20-21: P0.26 mode control */ -#define PINCONN_PINMODE1_P0p26_MASK (3 << PINCONN_PINMODE1_P0p26_SHIFT) - /* Bits 22-31: Reserved */ - -/* Pin Mode select register 2 (PINMODE2: 0x4002c048) */ - -#define PINCONN_PINMODE2_P1_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINMODE2_P1_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINMODE2_P1p0_SHIFT (0) /* Bits 2-1: P1.0 mode control */ -#define PINCONN_PINMODE2_P1p0_MASK (3 << PINCONN_PINMODE2_P1p0_SHIFT) -#define PINCONN_PINMODE2_P1p1_SHIFT (2) /* Bits 2-3: P1.1 mode control */ -#define PINCONN_PINMODE2_P1p1_MASK (3 << PINCONN_PINMODE2_P1p1_SHIFT) - /* Bits 4-7: Reserved */ -#define PINCONN_PINMODE2_P1p4_SHIFT (8) /* Bits 8-9: P1.4 mode control */ -#define PINCONN_PINMODE2_P1p4_MASK (3 << PINCONN_PINMODE2_P1p4_SHIFT) - /* Bits 10-15: Reserved */ -#define PINCONN_PINMODE2_P1p8_SHIFT (16) /* Bits 16-17: P1.8 mode control */ -#define PINCONN_PINMODE2_P1p8_MASK (3 << PINCONN_PINMODE2_P1p8_SHIFT) -#define PINCONN_PINMODE2_P1p9_SHIFT (18) /* Bits 18-19: P1.9 mode control */ -#define PINCONN_PINMODE2_P1p9_MASK (3 << PINCONN_PINMODE2_P1p9_SHIFT) -#define PINCONN_PINMODE2_P1p10_SHIFT (20) /* Bits 20-21: P1.10 mode control */ -#define PINCONN_PINMODE2_P1p10_MASK (3 << PINCONN_PINMODE2_P1p10_SHIFT) - /* Bits 22-27: Reserved */ -#define PINCONN_PINMODE2_P1p14_SHIFT (28) /* Bits 28-29: P1.14 mode control */ -#define PINCONN_PINMODE2_P1p14_MASK (3 << PINCONN_PINMODE2_P1p14_SHIFT) -#define PINCONN_PINMODE2_P1p15_SHIFT (30) /* Bits 30-31: P1.15 mode control */ -#define PINCONN_PINMODE2_P1p15_MASK (3 << PINCONN_PINMODE2_P1p15_SHIFT) - -/* Pin Mode select register 3 (PINMODE3: 0x4002c04c) */ - -#define PINCONN_PINMODE3_P1_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINMODE3_P1_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ - -#define PINCONN_PINMODE3_P1p16_SHIFT (0) /* Bits 0-1: P1.16 mode control */ -#define PINCONN_PINMODE3_P1p16_MASK (3 << PINCONN_PINMODE3_P1p16_SHIFT) -#define PINCONN_PINMODE3_P1p17_SHIFT (2) /* Bits 2-3: P1.17 mode control */ -#define PINCONN_PINMODE3_P1p17_MASK (3 << PINCONN_PINMODE3_P1p17_SHIFT) -#define PINCONN_PINMODE3_P1p18_SHIFT (4) /* Bits 4-5: P1.18 mode control */ -#define PINCONN_PINMODE3_P1p18_MASK (3 << PINCONN_PINMODE3_P1p18_SHIFT) -#define PINCONN_PINMODE3_P1p19_SHIFT (6) /* Bits 6-7: P1.19 mode control */ -#define PINCONN_PINMODE3_P1p19_MASK (3 << PINCONN_PINMODE3_P1p19_SHIFT) -#define PINCONN_PINMODE3_P1p20_SHIFT (8) /* Bits 8-9: P1.20 mode control */ -#define PINCONN_PINMODE3_P1p20_MASK (3 << PINCONN_PINMODE3_P1p20_SHIFT) -#define PINCONN_PINMODE3_P1p21_SHIFT (10) /* Bits 10-11: P1.21 mode control */ -#define PINCONN_PINMODE3_P1p21_MASK (3 << PINCONN_PINMODE3_P1p21_SHIFT) -#define PINCONN_PINMODE3_P1p22_SHIFT (12) /* Bits 12-13: P1.22 mode control */ -#define PINCONN_PINMODE3_P1p22_MASK (3 << PINCONN_PINMODE3_P1p22_SHIFT) -#define PINCONN_PINMODE3_P1p23_SHIFT (14) /* Bits 14-15: P1.23 mode control */ -#define PINCONN_PINMODE3_P1p23_MASK (3 << PINCONN_PINMODE3_P1p23_SHIFT) -#define PINCONN_PINMODE3_P1p24_SHIFT (16) /* Bits 16-17: P1.24 mode control */ -#define PINCONN_PINMODE3_P1p24_MASK (3 << PINCONN_PINMODE3_P1p24_SHIFT) -#define PINCONN_PINMODE3_P1p25_SHIFT (18) /* Bits 18-19: P1.25 mode control */ -#define PINCONN_PINMODE3_P1p25_MASK (3 << PINCONN_PINMODE3_P1p25_SHIFT) -#define PINCONN_PINMODE3_P1p26_SHIFT (20) /* Bits 20-21: P1.26 mode control */ -#define PINCONN_PINMODE3_P1p26_MASK (3 << PINCONN_PINMODE3_P1p26_SHIFT) -#define PINCONN_PINMODE3_P1p27_SHIFT (22) /* Bits 22-23: P1.27 mode control */ -#define PINCONN_PINMODE3_P1p27_MASK (3 << PINCONN_PINMODE3_P1p27_SHIFT) -#define PINCONN_PINMODE3_P1p28_SHIFT (24) /* Bits 24-25: P1.28 mode control */ -#define PINCONN_PINMODE3_P1p28_MASK (3 << PINCONN_PINMODE3_P1p28_SHIFT) -#define PINCONN_PINMODE3_P1p29_SHIFT (26) /* Bits 26-27: P1.29 mode control */ -#define PINCONN_PINMODE3_P1p29_MASK (3 << PINCONN_PINMODE3_P1p29_SHIFT) -#define PINCONN_PINMODE3_P1p30_SHIFT (28) /* Bits 28-29: P1.30 mode control */ -#define PINCONN_PINMODE3_P1p30_MASK (3 << PINCONN_PINMODE3_P1p30_SHIFT) -#define PINCONN_PINMODE3_P1p31_SHIFT (30) /* Bits 30-31: P1.31 mode control */ -#define PINCONN_PINMODE3_P1p31_MASK (3 << PINCONN_PINMODE3_P1p31_SHIFT) - -/* Pin Mode select register 4 (PINMODE4: 0x4002c050) */ - -#define PINCONN_PINMODE4_P2_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINMODE4_P2_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ - -#define PINCONN_PINMODE4_P2p0_SHIFT (0) /* Bits 0-1: P2.0 mode control */ -#define PINCONN_PINMODE4_P2p0_MASK (3 << PINCONN_PINMODE4_P2p0_SHIFT) -#define PINCONN_PINMODE4_P2p1_SHIFT (2) /* Bits 2-3: P2.1 mode control */ -#define PINCONN_PINMODE4_P2p1_MASK (3 << PINCONN_PINMODE4_P2p1_SHIFT) -#define PINCONN_PINMODE4_P2p2_SHIFT (4) /* Bits 4-5: P2.2 mode control */ -#define PINCONN_PINMODE4_P2p2_MASK (3 << PINCONN_PINMODE4_P2p2_SHIFT) -#define PINCONN_PINMODE4_P2p3_SHIFT (6) /* Bits 6-7: P2.3 mode control */ -#define PINCONN_PINMODE4_P2p3_MASK (3 << PINCONN_PINMODE4_P2p3_SHIFT) -#define PINCONN_PINMODE4_P2p4_SHIFT (8) /* Bits 8-9: P2.4 mode control */ -#define PINCONN_PINMODE4_P2p4_MASK (3 << PINCONN_PINMODE4_P2p4_SHIFT) -#define PINCONN_PINMODE4_P2p5_SHIFT (10) /* Bits 10-11: P2.5 mode control */ -#define PINCONN_PINMODE4_P2p5_MASK (3 << PINCONN_PINMODE4_P2p5_SHIFT) -#define PINCONN_PINMODE4_P2p6_SHIFT (12) /* Bits 12-13: P2.6 mode control */ -#define PINCONN_PINMODE4_P2p6_MASK (3 << PINCONN_PINMODE4_P2p6_SHIFT) -#define PINCONN_PINMODE4_P2p7_SHIFT (14) /* Bits 14-15: P2.7 mode control */ -#define PINCONN_PINMODE4_P2p7_MASK (3 << PINCONN_PINMODE4_P2p7_SHIFT) -#define PINCONN_PINMODE4_P2p8_SHIFT (16) /* Bits 16-17: P2.8 mode control */ -#define PINCONN_PINMODE4_P2p8_MASK (3 << PINCONN_PINMODE4_P2p8_SHIFT) -#define PINCONN_PINMODE4_P2p9_SHIFT (18) /* Bits 18-19: P2.9 mode control */ -#define PINCONN_PINMODE4_P2p9_MASK (3 << PINCONN_PINMODE4_P2p9_SHIFT) -#define PINCONN_PINMODE4_P2p10_SHIFT (20) /* Bits 20-21: P2.10 mode control */ -#define PINCONN_PINMODE4_P2p10_MASK (3 << PINCONN_PINMODE4_P2p10_SHIFT) -#define PINCONN_PINMODE4_P2p11_SHIFT (22) /* Bits 22-23: P2.11 mode control */ -#define PINCONN_PINMODE4_P2p11_MASK (3 << PINCONN_PINMODE4_P2p11_SHIFT) -#define PINCONN_PINMODE4_P2p12_SHIFT (24) /* Bits 24-25: P2.12 mode control */ -#define PINCONN_PINMODE4_P2p12_MASK (3 << PINCONN_PINMODE4_P2p12_SHIFT) -#define PINCONN_PINMODE4_P2p13_SHIFT (26) /* Bits 26-27: P2.13 mode control */ -#define PINCONN_PINMODE4_P2p13_MASK (3 << PINCONN_PINMODE4_P2p13_SHIFT) - /* Bits 28-31: Reserved */ -/* Pin Mode select register 5 (PINMODE5: 0x4002c054) - * Pin Mode select register 6 (PINMODE6: 0x4002c058) - * No bit definitions -- do these registers exist? - */ - -#define PINCONN_PINMODE5_P2_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINMODE5_P2_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ - -#define PINCONN_PINMODE6_P3_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ -#define PINCONN_PINMODE6_P3_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ - -/* Pin Mode select register 7 (PINMODE7: 0x4002c05c) */ - -#define PINCONN_PINMODE7_P3_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINMODE7_P3_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ - /* Bits 0-17: Reserved */ -#define PINCONN_PINMODE7_P3p25_SHIFT (18) /* Bits 18-19: P3.25 mode control */ -#define PINCONN_PINMODE7_P3p25_MASK (3 << PINCONN_PINMODE7_P3p25_SHIFT) -#define PINCONN_PINMODE7_P3p26_SHIFT (20) /* Bits 20-21: P3.26 mode control */ -#define PINCONN_PINMODE7_P3p26_MASK (3 << PINCONN_PINMODE7_P3p26_SHIFT) - /* Bits 22-31: Reserved */ -/* Pin Mode select register 9 (PINMODE9: 0x4002c064) */ - -#define PINCONN_PINMODE9_P4_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ -#define PINCONN_PINMODE9_P4_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ - /* Bits 0-23: Reserved */ -#define PINCONN_PINMODE9_P4p28_SHIFT (24) /* Bits 24-25: P4.28 mode control */ -#define PINCONN_PINMODE9_P4p28_MASK (3 << PINCONN_PINMODE9_P4p28_SHIFT) -#define PINCONN_PINMODE9_P4p29_SHIFT (26) /* Bits 26-27: P4.29 mode control */ -#define PINCONN_PINMODE9_P4p29_MASK (3 << PINCONN_PINMODE9_P4p29_SHIFT) - /* Bits 28-31: Reserved */ -/* Open Drain Pin Mode select register 0 (PINMODE_OD0: 0x4002c068) */ - -#define PINCONN_ODMODE0_P0(n) (1 << (n)) - -#define PINCONN_ODMODE0_P0p0 (1 << 0) /* Bit 0: P0.0 open drain mode */ -#define PINCONN_ODMODE0_P0p1 (1 << 1) /* Bit 1: P0.1 open drain mode */ -#define PINCONN_ODMODE0_P0p2 (1 << 2) /* Bit 2: P0.2 open drain mode */ -#define PINCONN_ODMODE0_P0p3 (1 << 3) /* Bit 3: P0.3 open drain mode */ -#define PINCONN_ODMODE0_P0p4 (1 << 4) /* Bit 4: P0.4 open drain mode */ -#define PINCONN_ODMODE0_P0p5 (1 << 5) /* Bit 5: P0.5 open drain mode */ -#define PINCONN_ODMODE0_P0p6 (1 << 6) /* Bit 6: P0.6 open drain mode */ -#define PINCONN_ODMODE0_P0p7 (1 << 7) /* Bit 7: P0.7 open drain mode */ -#define PINCONN_ODMODE0_P0p8 (1 << 8) /* Bit 8: P0.8 open drain mode */ -#define PINCONN_ODMODE0_P0p9 (1 << 9) /* Bit 9: P0.9 open drain mode */ -#define PINCONN_ODMODE0_P0p10 (1 << 10) /* Bit 10: P0.10 open drain mode */ -#define PINCONN_ODMODE0_P0p11 (1 << 11) /* Bit 11: P0.11 open drain mode */ - /* Bits 12-14: Reserved */ -#define PINCONN_ODMODE0_P0p15 (1 << 15) /* Bit 15: P0.15 open drain mode */ -#define PINCONN_ODMODE0_P0p16 (1 << 16) /* Bit 16: P0.16 open drain mode */ -#define PINCONN_ODMODE0_P0p17 (1 << 17) /* Bit 17: P0.17 open drain mode */ -#define PINCONN_ODMODE0_P0p18 (1 << 18) /* Bit 18: P0.18 open drain mode */ -#define PINCONN_ODMODE0_P0p19 (1 << 19) /* Bit 19: P0.19 open drain mode */ -#define PINCONN_ODMODE0_P0p20 (1 << 20) /* Bit 20: P0.20 open drain mode */ -#define PINCONN_ODMODE0_P0p21 (1 << 21) /* Bit 21: P0.21 open drain mode */ -#define PINCONN_ODMODE0_P0p22 (1 << 22) /* Bit 22: P0.22 open drain mode */ -#define PINCONN_ODMODE0_P0p23 (1 << 23) /* Bit 23: P0.23 open drain mode */ -#define PINCONN_ODMODE0_P0p24 (1 << 24) /* Bit 24: P0.24 open drain mode */ -#define PINCONN_ODMODE0_P0p25 (1 << 25) /* Bit 25: P0.25 open drain mode */ -#define PINCONN_ODMODE0_P0p26 (1 << 25) /* Bit 26: P0.26 open drain mode */ - /* Bits 27-28: Reserved */ -#define PINCONN_ODMODE0_P0p29 (1 << 29) /* Bit 29: P0.29 open drain mode */ -#define PINCONN_ODMODE0_P0p30 (1 << 30) /* Bit 30: P0.30 open drain mode */ - /* Bit 31: Reserved */ -/* Open Drain Pin Mode select register 1 (PINMODE_OD1: 0x4002c06c) */ - -#define PINCONN_ODMODE1_P1(n) (1 << (n)) - -#define PINCONN_ODMODE1_P1p0 (1 << 0) /* Bit 0: P1.0 open drain mode */ -#define PINCONN_ODMODE1_P1p1 (1 << 1) /* Bit 1: P1.1 open drain mode */ - /* Bits 2-3: Reserved */ -#define PINCONN_ODMODE1_P1p4 (1 << 4) /* Bit 4: P1.4 open drain mode */ - /* Bits 5-7: Reserved */ -#define PINCONN_ODMODE1_P1p8 (1 << 8) /* Bit 8: P1.8 open drain mode */ -#define PINCONN_ODMODE1_P1p9 (1 << 9) /* Bit 9: P1.9 open drain mode */ -#define PINCONN_ODMODE1_P1p10 (1 << 10) /* Bit 10: P1.10 open drain mode */ - /* Bits 11-13: Reserved */ -#define PINCONN_ODMODE1_P1p14 (1 << 14) /* Bit 14: P1.14 open drain mode */ -#define PINCONN_ODMODE1_P1p15 (1 << 15) /* Bit 15: P1.15 open drain mode */ -#define PINCONN_ODMODE1_P1p16 (1 << 16) /* Bit 16: P1.16 open drain mode */ -#define PINCONN_ODMODE1_P1p17 (1 << 17) /* Bit 17: P1.17 open drain mode */ -#define PINCONN_ODMODE1_P1p18 (1 << 18) /* Bit 18: P1.18 open drain mode */ -#define PINCONN_ODMODE1_P1p19 (1 << 19) /* Bit 19: P1.19 open drain mode */ -#define PINCONN_ODMODE1_P1p20 (1 << 20) /* Bit 20: P1.20 open drain mode */ -#define PINCONN_ODMODE1_P1p21 (1 << 21) /* Bit 21: P1.21 open drain mode */ -#define PINCONN_ODMODE1_P1p22 (1 << 22) /* Bit 22: P1.22 open drain mode */ -#define PINCONN_ODMODE1_P1p23 (1 << 23) /* Bit 23: P1.23 open drain mode */ -#define PINCONN_ODMODE1_P1p24 (1 << 24) /* Bit 24: P1.24 open drain mode */ -#define PINCONN_ODMODE1_P1p25 (1 << 25) /* Bit 25: P1.25 open drain mode */ -#define PINCONN_ODMODE1_P1p26 (1 << 25) /* Bit 26: P1.26 open drain mode */ -#define PINCONN_ODMODE1_P1p27 (1 << 27) /* Bit 27: P1.27 open drain mode */ -#define PINCONN_ODMODE1_P1p28 (1 << 28) /* Bit 28: P1.28 open drain mode */ -#define PINCONN_ODMODE1_P1p29 (1 << 29) /* Bit 29: P1.29 open drain mode */ -#define PINCONN_ODMODE1_P1p30 (1 << 30) /* Bit 30: P1.30 open drain mode */ -#define PINCONN_ODMODE1_P1p31 (1 << 31) /* Bit 31: P1.31 open drain mode */ - -/* Open Drain Pin Mode select register 2 (PINMODE_OD2: 0x4002c070) */ - -#define PINCONN_ODMODE2_P2(n) (1 << (n)) - -#define PINCONN_ODMODE2_P2p0 (1 << 0) /* Bit 0: P2.0 open drain mode */ -#define PINCONN_ODMODE2_P2p1 (1 << 1) /* Bit 1: P2.1 open drain mode */ -#define PINCONN_ODMODE2_P2p2 (1 << 2) /* Bit 2: P2.2 open drain mode */ -#define PINCONN_ODMODE2_P2p3 (1 << 3) /* Bit 3: P2.3 open drain mode */ -#define PINCONN_ODMODE2_P2p4 (1 << 4) /* Bit 4: P2.4 open drain mode */ -#define PINCONN_ODMODE2_P2p5 (1 << 5) /* Bit 5: P2.5 open drain mode */ -#define PINCONN_ODMODE2_P2p6 (1 << 6) /* Bit 6: P2.6 open drain mode */ -#define PINCONN_ODMODE2_P2p7 (1 << 7) /* Bit 7: P2.7 open drain mode */ -#define PINCONN_ODMODE2_P2p8 (1 << 8) /* Bit 8: P2.8 open drain mode */ -#define PINCONN_ODMODE2_P2p9 (1 << 9) /* Bit 9: P2.9 open drain mode */ -#define PINCONN_ODMODE2_P2p10 (1 << 10) /* Bit 10: P2.10 open drain mode */ -#define PINCONN_ODMODE2_P2p11 (1 << 11) /* Bit 11: P2.11 open drain mode */ -#define PINCONN_ODMODE2_P2p12 (1 << 12) /* Bit 12: P2.12 open drain mode */ -#define PINCONN_ODMODE2_P2p13 (1 << 13) /* Bit 13: P2.13 open drain mode */ - /* Bits 14-31: Reserved */ -/* Open Drain Pin Mode select register 3 (PINMODE_OD3: 0x4002c074) */ - -#define PINCONN_ODMODE3_P3(n) (1 << (n)) - /* Bits 0-24: Reserved */ -#define PINCONN_ODMODE3_P3p25 (1 << 25) /* Bit 25: P3.25 open drain mode */ -#define PINCONN_ODMODE3_P3p26 (1 << 25) /* Bit 26: P3.26 open drain mode */ - /* Bits 17-31: Reserved */ -/* Open Drain Pin Mode select register 4 (PINMODE_OD4: 0x4002c078) */ - -#define PINCONN_ODMODE4_P4(n) (1 << (n)) - /* Bits 0-27: Reserved */ -#define PINCONN_ODMODE4_P4p28 (1 << 28) /* Bit 28: P4.28 open drain mode */ -#define PINCONN_ODMODE4_P4p29 (1 << 29) /* Bit 29: P4.29 open drain mode */ - /* Bits 30-31: Reserved */ -/* I2C Pin Configuration register (I2CPADCFG: 0x4002c07c) */ - -#define PINCONN_I2CPADCFG_SDADRV0 (1 << 0) /* Bit 0: SDA0 pin, P0.27 in Fast Mode Plus */ -#define PINCONN_I2CPADCFG_SDAI2C0 (1 << 1) /* Bit 1: SDA0 pin, P0.27 I2C glitch - * filtering/slew rate control */ -#define PINCONN_I2CPADCFG_SCLDRV0 (1 << 2) /* Bit 2: SCL0 pin, P0.28 in Fast Mode Plus */ -#define PINCONN_I2CPADCFG_SCLI2C0 (1 << 3) /* Bit 3: SCL0 pin, P0.28 I2C glitch - * filtering/slew rate control */ - /* Bits 4-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_pinconn.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_PINCONN_PINSEL0_OFFSET 0x0000 /* Pin function select register 0 */ +#define LPC17_PINCONN_PINSEL1_OFFSET 0x0004 /* Pin function select register 1 */ +#define LPC17_PINCONN_PINSEL2_OFFSET 0x0008 /* Pin function select register 2 */ +#define LPC17_PINCONN_PINSEL3_OFFSET 0x000c /* Pin function select register 3 */ +#define LPC17_PINCONN_PINSEL4_OFFSET 0x0010 /* Pin function select register 4 */ +#define LPC17_PINCONN_PINSEL7_OFFSET 0x001c /* Pin function select register 7 */ +#define LPC17_PINCONN_PINSEL8_OFFSET 0x0020 /* Pin function select register 8 */ +#define LPC17_PINCONN_PINSEL9_OFFSET 0x0024 /* Pin function select register 9 */ +#define LPC17_PINCONN_PINSEL10_OFFSET 0x0028 /* Pin function select register 10 */ +#define LPC17_PINCONN_PINMODE0_OFFSET 0x0040 /* Pin mode select register 0 */ +#define LPC17_PINCONN_PINMODE1_OFFSET 0x0044 /* Pin mode select register 1 */ +#define LPC17_PINCONN_PINMODE2_OFFSET 0x0048 /* Pin mode select register 2 */ +#define LPC17_PINCONN_PINMODE3_OFFSET 0x004c /* Pin mode select register 3 */ +#define LPC17_PINCONN_PINMODE4_OFFSET 0x0050 /* Pin mode select register 4 */ +#define LPC17_PINCONN_PINMODE5_OFFSET 0x0054 /* Pin mode select register 5 */ +#define LPC17_PINCONN_PINMODE6_OFFSET 0x0058 /* Pin mode select register 6 */ +#define LPC17_PINCONN_PINMODE7_OFFSET 0x005c /* Pin mode select register 7 */ +#define LPC17_PINCONN_PINMODE9_OFFSET 0x0064 /* Pin mode select register 9 */ +#define LPC17_PINCONN_ODMODE0_OFFSET 0x0068 /* Open drain mode control register 0 */ +#define LPC17_PINCONN_ODMODE1_OFFSET 0x006c /* Open drain mode control register 1 */ +#define LPC17_PINCONN_ODMODE2_OFFSET 0x0070 /* Open drain mode control register 2 */ +#define LPC17_PINCONN_ODMODE3_OFFSET 0x0074 /* Open drain mode control register 3 */ +#define LPC17_PINCONN_ODMODE4_OFFSET 0x0078 /* Open drain mode control register 4 */ +#define LPC17_PINCONN_I2CPADCFG_OFFSET 0x007c /* I2C Pin Configuration register */ + +/* Register addresses ***************************************************************/ + +#define LPC17_PINCONN_PINSEL0 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL0_OFFSET) +#define LPC17_PINCONN_PINSEL1 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL1_OFFSET) +#define LPC17_PINCONN_PINSEL2 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL2_OFFSET) +#define LPC17_PINCONN_PINSEL3 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL3_OFFSET) +#define LPC17_PINCONN_PINSEL4 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL4_OFFSET) +#define LPC17_PINCONN_PINSEL7 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL7_OFFSET) +#define LPC17_PINCONN_PINSEL8 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL8_OFFSET) +#define LPC17_PINCONN_PINSEL9 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL9_OFFSET) +#define LPC17_PINCONN_PINSEL10 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINSEL10_OFFSET) +#define LPC17_PINCONN_PINMODE0 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE0_OFFSET) +#define LPC17_PINCONN_PINMODE1 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE1_OFFSET) +#define LPC17_PINCONN_PINMODE2 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE2_OFFSET) +#define LPC17_PINCONN_PINMODE3 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE3_OFFSET) +#define LPC17_PINCONN_PINMODE4 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE4_OFFSET) +#define LPC17_PINCONN_PINMODE5 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE5_OFFSET) +#define LPC17_PINCONN_PINMODE6 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE6_OFFSET) +#define LPC17_PINCONN_PINMODE7 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE7_OFFSET) +#define LPC17_PINCONN_PINMODE9 (LPC17_PINCONN_BASE+LPC17_PINCONN_PINMODE9_OFFSET) +#define LPC17_PINCONN_ODMODE0 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE0_OFFSET) +#define LPC17_PINCONN_ODMODE1 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE1_OFFSET) +#define LPC17_PINCONN_ODMODE2 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE2_OFFSET) +#define LPC17_PINCONN_ODMODE3 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE3_OFFSET) +#define LPC17_PINCONN_ODMODE4 (LPC17_PINCONN_BASE+LPC17_PINCONN_ODMODE4_OFFSET) +#define LPC17_PINCONN_I2CPADCFG (LPC17_PINCONN_BASE+LPC17_PINCONN_I2CPADCFG_OFFSET) + +/* Register bit definitions *********************************************************/ +/* Pin Function Select register 0 (PINSEL0: 0x4002c000) */ + +#define PINCONN_PINSEL_GPIO (0) +#define PINCONN_PINSEL_ALT1 (1) +#define PINCONN_PINSEL_ALT2 (2) +#define PINCONN_PINSEL_ALT3 (3) +#define PINCONN_PINSEL_MASK (3) + +#define PINCONN_PINSELL_SHIFT(n) ((n) << 1) /* n=0,1,..,15 */ +#define PINCONN_PINSELL_MASK(n) (3 << PINCONN_PINSELL_SHIFT(n)) +#define PINCONN_PINSELH_SHIFT(n) (((n)-16) << 1) /* n=16,17,..31 */ +#define PINCONN_PINSELH_MASK(n) (3 << PINCONN_PINSELH_SHIFT(n)) + +#define PINCONN_PINSEL0_P0_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINSEL0_P0_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINSEL0_P0p0_SHIFT (0) /* Bits 0-1: P0.0 00=GPIO 01=RD1 10=TXD3 11=SDA1 */ +#define PINCONN_PINSEL0_P0p0_MASK (3 << PINCONN_PINSEL0_P0p0_SHIFT) +#define PINCONN_PINSEL0_P0p1_SHIFT (2) /* Bits 2-3: P0.1 00=GPIO 01=TD1 10=RXD3 11=SCL1 */ +#define PINCONN_PINSEL0_P0p1_MASK (3 << PINCONN_PINSEL0_P0p1_SHIFT) +#define PINCONN_PINSEL0_P0p2_SHIFT (4) /* Bits 4-5: P0.2 00=GPIO 01=TXD0 10=AD0.7 11=Reserved */ +#define PINCONN_PINSEL0_P0p2_MASK (3 << PINCONN_PINSEL0_P0p2_SHIFT) +#define PINCONN_PINSEL0_P0p3_SHIFT (6) /* Bits 6-7: P0.3 00=GPIO 01=RXD0 10=AD0.6 11=Reserved */ +#define PINCONN_PINSEL0_P0p3_MASK (3 << PINCONN_PINSEL0_P0p3_SHIFT) +#define PINCONN_PINSEL0_P0p4_SHIFT (8) /* Bits 8-9: P0.4 00=GPIO 01=I2SRX_CLK 10=RD2 11=CAP2.0 */ +#define PINCONN_PINSEL0_P0p4_MASK (3 << PINCONN_PINSEL0_P0p4_SHIFT) +#define PINCONN_PINSEL0_P0p5_SHIFT (10) /* Bits 10-11: P0.5 00=GPIO 01=I2SRX_WS 10=TD2 11=CAP2.1 */ +#define PINCONN_PINSEL0_P0p5_MASK (3 << PINCONN_PINSEL0_P0p5_SHIFT) +#define PINCONN_PINSEL0_P0p6_SHIFT (12) /* Bits 12-13: P0.6 00=GPIO 01=I2SRX_SDA 10=SSEL1 11=MAT2.0 */ +#define PINCONN_PINSEL0_P0p6_MASK (3 << PINCONN_PINSEL0_P0p6_SHIFT) +#define PINCONN_PINSEL0_P0p7_SHIFT (14) /* Bits 14-15: P0.7 00=GPIO 01=I2STX_CLK 10=SCK1 11=MAT2.1 */ +#define PINCONN_PINSEL0_P0p7_MASK (3 << PINCONN_PINSEL0_P0p7_SHIFT) +#define PINCONN_PINSEL0_P0p8_SHIFT (16) /* Bits 16-17: P0.8 00=GPIO 01=I2STX_WS 10=MISO1 11=MAT2.2 */ +#define PINCONN_PINSEL0_P0p8_MASK (3 << PINCONN_PINSEL0_P0p8_SHIFT) +#define PINCONN_PINSEL0_P0p9_SHIFT (18) /* Bits 18-19: P0.9 00=GPIO 01=I2STX_SDA 10=MOSI1 11=MAT2.3 */ +#define PINCONN_PINSEL0_P0p9_MASK (3 << PINCONN_PINSEL0_P0p9_SHIFT) +#define PINCONN_PINSEL0_P0p10_SHIFT (20) /* Bits 20-21: P0.10 00=GPIO 01=TXD2 10=SDA2 11=MAT3.0 */ +#define PINCONN_PINSEL0_P0p10_MASK (3 << PINCONN_PINSEL0_P0p10_SHIFT) +#define PINCONN_PINSEL0_P0p11_SHIFT (22) /* Bits 22-23: P0.11 00=GPIO 01=RXD2 10=SCL2 11=MAT3.1 */ +#define PINCONN_PINSEL0_P0p11_MASK (3 << PINCONN_PINSEL0_P0p11_SHIFT) + /* Bits 24-29: Reserved */ +#define PINCONN_PINSEL0_P0p15_SHIFT (30) /* Bits 30-31: P0.15 00=GPIO 01=TXD1 10=SCK0 11=SCK */ +#define PINCONN_PINSEL0_P0p15_MASK (3 << PINCONN_PINSEL0_P0p15_SHIFT) + +/* Pin Function Select Register 1 (PINSEL1: 0x4002c004) */ + +#define PINCONN_PINSEL1_P0_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINSEL1_P0_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ + +#define PINCONN_PINSEL1_P0p16_SHIFT (0) /* Bits 0-1: P0.16 00=GPIO 01=RXD1 10=SSEL0 11=SSEL */ +#define PINCONN_PINSEL1_P0p16_MASK (3 << PINCONN_PINSEL1_P0p16_SHIFT) +#define PINCONN_PINSEL1_P0p17_SHIFT (2) /* Bits 2-3: P0.17 00=GPIO 01=CTS1 10=MISO0 11=MISO */ +#define PINCONN_PINSEL1_P0p17_MASK (3 << PINCONN_PINSEL1_P0p17_SHIFT) +#define PINCONN_PINSEL1_P0p18_SHIFT (4) /* Bits 4-5: P0.18 00=GPIO 01=DCD1 10=MOSI0 11=MOSI */ +#define PINCONN_PINSEL1_P0p18_MASK (3 << PINCONN_PINSEL1_P0p18_SHIFT) +#define PINCONN_PINSEL1_P0p19_SHIFT (6) /* Bits 6-7: P0.19 00=GPIO 01=DSR1 10=Reserved 11=SDA1 */ +#define PINCONN_PINSEL1_P0p19_MASK (3 << PINCONN_PINSEL1_P0p19_SHIFT) +#define PINCONN_PINSEL1_P0p20_SHIFT (8) /* Bits 8-9: P0.20 00=GPIO 01=DTR1 10=Reserved 11=SCL1 */ +#define PINCONN_PINSEL1_P0p20_MASK (3 << PINCONN_PINSEL1_P0p20_SHIFT) +#define PINCONN_PINSEL1_P0p21_SHIFT (10) /* Bits 10-11: P0.21 00=GPIO 01=RI1 10=Reserved 11=RD1 */ +#define PINCONN_PINSEL1_P0p21_MASK (3 << PINCONN_PINSEL1_P0p21_SHIFT) +#define PINCONN_PINSEL1_P0p22_SHIFT (12) /* Bits 12-13: P0.22 00=GPIO 01=RTS1 10=Reserved 11=TD1 */ +#define PINCONN_PINSEL1_P0p22_MASK (3 << PINCONN_PINSEL1_P0p22_SHIFT) +#define PINCONN_PINSEL1_P0p23_SHIFT (14) /* Bits 14-15: P0.23 00=GPIO 01=AD0.0 10=I2SRX_CLK 11=CAP3.0 */ +#define PINCONN_PINSEL1_P0p23_MASK (3 << PINCONN_PINSEL1_P0p23_SHIFT) +#define PINCONN_PINSEL1_P0p24_SHIFT (16) /* Bits 16-17: P0.24 00=GPIO 01=AD0.1 10=I2SRX_WS 11=CAP3.1 */ +#define PINCONN_PINSEL1_P0p24_MASK (3 << PINCONN_PINSEL1_P0p24_SHIFT) +#define PINCONN_PINSEL1_P0p25_SHIFT (18) /* Bits 18-19: P0.25 00=GPIO 01=AD0.2 10=I2SRX_SDA 11=TXD3 */ +#define PINCONN_PINSEL1_P0p25_MASK (3 << PINCONN_PINSEL1_P0p25_SHIFT) +#define PINCONN_PINSEL1_P0p26_SHIFT (20) /* Bits 20-21: P0.26 00=GPIO 01=AD0.3 10=AOUT 11=RXD3 */ +#define PINCONN_PINSEL1_P0p26_MASK (3 << PINCONN_PINSEL1_P0p26_SHIFT) +#define PINCONN_PINSEL1_P0p27_SHIFT (22) /* Bits 22-23: P0.27 00=GPIO 01=SDA0 10=USB_SDA 11=Reserved */ +#define PINCONN_PINSEL1_P0p27_MASK (3 << PINCONN_PINSEL1_P0p27_SHIFT) +#define PINCONN_PINSEL1_P0p28_SHIFT (24) /* Bits 24-25: P0.28 00=GPIO 01=SCL0 10=USB_SCL 11=Reserved */ +#define PINCONN_PINSEL1_P0p28_MASK (3 << PINCONN_PINSEL1_P0p28_SHIFT) +#define PINCONN_PINSEL1_P0p29_SHIFT (26) /* Bits 26-27: P0.29 00=GPIO 01=USB_D+ 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL1_P0p29_MASK (3 << PINCONN_PINSEL1_P0p29_SHIFT) +#define PINCONN_PINSEL1_P0p30_SHIFT (28) /* Bits 28-29: P0.30 00=GPIO 01=USB_D- 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL1_P0p30_MASK (3 << PINCONN_PINSEL1_P0p30_SHIFT) + /* Bits 30-31: Reserved */ +/* Pin Function Select register 2 (PINSEL2: 0x4002c008) */ + +#define PINCONN_PINSEL2_P1_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINSEL2_P1_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINSEL2_P1p0_SHIFT (0) /* Bits 0-1: P1.0 00=GPIO 01=ENET_TXD0 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p0_MASK (3 << PINCONN_PINSEL2_P1p0_SHIFT) +#define PINCONN_PINSEL2_P1p1_SHIFT (2) /* Bits 2-3: P1.1 00=GPIO 01=ENET_TXD1 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p1_MASK (3 << PINCONN_PINSEL2_P1p1_SHIFT) + /* Bits 4-7: Reserved */ +#define PINCONN_PINSEL2_P1p4_SHIFT (8) /* Bits 8-9: P1.4 00=GPIO 01=ENET_TX_EN 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p4_MASK (3 << PINCONN_PINSEL2_P1p4_SHIFT) + /* Bits 10-15: Reserved */ +#define PINCONN_PINSEL2_P1p8_SHIFT (16) /* Bits 16-17: P1.8 00=GPIO 01=ENET_CRS 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p8_MASK (3 << PINCONN_PINSEL2_P1p8_SHIFT) +#define PINCONN_PINSEL2_P1p9_SHIFT (18) /* Bits 18-19: P1.9 00=GPIO 01=ENET_RXD0 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p9_MASK (3 << PINCONN_PINSEL2_P1p9_SHIFT) +#define PINCONN_PINSEL2_P1p10_SHIFT (20) /* Bits 20-21: P1.10 00=GPIO 01=ENET_RXD1 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p10_MASK (3 << PINCONN_PINSEL2_P1p10_SHIFT) + /* Bits 22-27: Reserved */ +#define PINCONN_PINSEL2_P1p14_SHIFT (28) /* Bits 28-29: P1.14 00=GPIO 01=ENET_RX_ER 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p14_MASK (3 << PINCONN_PINSEL2_P1p14_SHIFT) +#define PINCONN_PINSEL2_P1p15_SHIFT (30) /* Bits 30-31: P1.15 00=GPIO 01=ENET_REF_CLK 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL2_P1p15_MASK (3 << PINCONN_PINSEL2_P1p15_SHIFT) + +/* Pin Function Select Register 3 (PINSEL3: 0x4002c00c) */ + +#define PINCONN_PINSEL3_P1_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINSEL3_P1_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ + +#define PINCONN_PINSEL3_P1p16_SHIFT (0) /* Bits 0-1: P1.16 00=GPIO 01=ENET_MDC 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL3_P1p16_MASK (3 << PINCONN_PINSEL3_P1p16_SHIFT) +#define PINCONN_PINSEL3_P1p17_SHIFT (2) /* Bits 2-3: P1.17 00=GPIO 01=ENET_MDIO 10=Reserved 11=Reserved */ +#define PINCONN_PINSEL3_P1p17_MASK (3 << PINCONN_PINSEL3_P1p17_SHIFT) +#define PINCONN_PINSEL3_P1p18_SHIFT (4) /* Bits 4-5: P1.18 00=GPIO 01=USB_UP_LED 10=PWM1.1 11=CAP1.0 */ +#define PINCONN_PINSEL3_P1p18_MASK (3 << PINCONN_PINSEL3_P1p18_SHIFT) +#define PINCONN_PINSEL3_P1p19_SHIFT (6) /* Bits 6-7: P1.19 00=GPIO 01=MCOA0 10=USB_PPWR 11=CAP1.1 */ +#define PINCONN_PINSEL3_P1p19_MASK (3 << PINCONN_PINSEL3_P1p19_SHIFT) +#define PINCONN_PINSEL3_P1p20_SHIFT (8) /* Bits 8-9: P1.20 00=GPIO 01=MCI0 10=PWM1.2 11=SCK0 */ +#define PINCONN_PINSEL3_P1p20_MASK (3 << PINCONN_PINSEL3_P1p20_SHIFT) +#define PINCONN_PINSEL3_P1p21_SHIFT (10) /* Bits 10-11: P1.21 00=GPIO 01=MCABORT 10=PWM1.3 11=SSEL0 */ +#define PINCONN_PINSEL3_P1p21_MASK (3 << PINCONN_PINSEL3_P1p21_SHIFT) +#define PINCONN_PINSEL3_P1p22_SHIFT (12) /* Bits 12-13: P1.22 00=GPIO 01=MCOB0 10=USB_PWRD 11=MAT1.0 */ +#define PINCONN_PINSEL3_P1p22_MASK (3 << PINCONN_PINSEL3_P1p22_SHIFT) +#define PINCONN_PINSEL3_P1p23_SHIFT (14) /* Bits 14-15: P1.23 00=GPIO 01=MCI1 10=PWM1.4 11=MISO0 */ +#define PINCONN_PINSEL3_P1p23_MASK (3 << PINCONN_PINSEL3_P1p23_SHIFT) +#define PINCONN_PINSEL3_P1p24_SHIFT (16) /* Bits 16-17: P1.24 00=GPIO 01=MCI2 10=PWM1.5 11=MOSI0 */ +#define PINCONN_PINSEL3_P1p24_MASK (3 << PINCONN_PINSEL3_P1p24_SHIFT) +#define PINCONN_PINSEL3_P1p25_SHIFT (18) /* Bits 18-19: P1.25 00=GPIO 01=MCOA1 10=Reserved 11=MAT1.1 */ +#define PINCONN_PINSEL3_P1p25_MASK (3 << PINCONN_PINSEL3_P1p25_SHIFT) +#define PINCONN_PINSEL3_P1p26_SHIFT (20) /* Bits 20-21: P1.26 00=GPIO 01=MCOB1 10=PWM1.6 11=CAP0.0 */ +#define PINCONN_PINSEL3_P1p26_MASK (3 << PINCONN_PINSEL3_P1p26_SHIFT) +#define PINCONN_PINSEL3_P1p27_SHIFT (22) /* Bits 22-23: P1.27 00=GPIO 01=CLKOUT 10=USB_OVRCR 11=CAP0.1 */ +#define PINCONN_PINSEL3_P1p27_MASK (3 << PINCONN_PINSEL3_P1p27_SHIFT) +#define PINCONN_PINSEL3_P1p28_SHIFT (24) /* Bits 24-25: P1.28 00=GPIO 01=MCOA2 10=PCAP1.0 11=MAT0.0 */ +#define PINCONN_PINSEL3_P1p28_MASK (3 << PINCONN_PINSEL3_P1p28_SHIFT) +#define PINCONN_PINSEL3_P1p29_SHIFT (26) /* Bits 26-27: P1.29 00=GPIO 01=MCOB2 10=PCAP1.1 11=MAT0.1 */ +#define PINCONN_PINSEL3_P1p29_MASK (3 << PINCONN_PINSEL3_P1p29_SHIFT) +#define PINCONN_PINSEL3_P1p30_SHIFT (28) /* Bits 28-29: P1.30 00=GPIO 01=Reserved 10=VBUS 11=AD0.4 */ +#define PINCONN_PINSEL3_P1p30_MASK (3 << PINCONN_PINSEL3_P1p30_SHIFT) +#define PINCONN_PINSEL3_P1p31_SHIFT (30) /* Bits 30-31: P1.31 00=GPIO 01=Reserved 10=SCK1 11=AD0.5 */ +#define PINCONN_PINSEL3_P1p31_MASK (3 << PINCONN_PINSEL3_P1p31_SHIFT) + +/* Pin Function Select Register 4 (PINSEL4: 0x4002c010) */ + +#define PINCONN_PINSEL4_P2_SHIFT(n) PINCONN_PINSELL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINSEL4_P2_MASK(n) PINCONN_PINSELL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINSEL4_P2p0_SHIFT (0) /* Bits 0-1: P2.0 00=GPIO 01=PWM1.1 10=TXD1 11=Reserved */ +#define PINCONN_PINSEL4_P2p0_MASK (3 << PINCONN_PINSEL4_P2p0_SHIFT) +#define PINCONN_PINSEL4_P2p1_SHIFT (2) /* Bits 2-3: P2.1 00=GPIO 01=PWM1.2 10=RXD1 11=Reserved */ +#define PINCONN_PINSEL4_P2p1_MASK (3 << PINCONN_PINSEL4_P2p1_SHIFT) +#define PINCONN_PINSEL4_P2p2_SHIFT (4) /* Bits 4-5: P2.2 00=GPIO 01=PWM1.3 10=CTS1 11=Reserved */ +#define PINCONN_PINSEL4_P2p2_MASK (3 << PINCONN_PINSEL4_P2p2_SHIFT) +#define PINCONN_PINSEL4_P2p3_SHIFT (6) /* Bits 6-7: P2.3 00=GPIO 01=PWM1.4 10=DCD1 11=Reserved */ +#define PINCONN_PINSEL4_P2p3_MASK (3 << PINCONN_PINSEL4_P2p3_SHIFT) +#define PINCONN_PINSEL4_P2p4_SHIFT (8) /* Bits 8-9: P2.4 00=GPIO 01=PWM1.5 10=DSR1 11=Reserved */ +#define PINCONN_PINSEL4_P2p4_MASK (3 << PINCONN_PINSEL4_P2p4_SHIFT) +#define PINCONN_PINSEL4_P2p5_SHIFT (10) /* Bits 10-11: P2.5 00=GPIO 01=PWM1.6 10=DTR1 11=Reserved */ +#define PINCONN_PINSEL4_P2p5_MASK (3 << PINCONN_PINSEL4_P2p5_SHIFT) +#define PINCONN_PINSEL4_P2p6_SHIFT (12) /* Bits 12-13: P2.6 00=GPIO 01=PCAP1.0 10=RI1 11=Reserved */ +#define PINCONN_PINSEL4_P2p6_MASK (3 << PINCONN_PINSEL4_P2p6_SHIFT) +#define PINCONN_PINSEL4_P2p7_SHIFT (14) /* Bits 14-15: P2.7 00=GPIO 01=RD2 10=RTS1 11=Reserved */ +#define PINCONN_PINSEL4_P2p7_MASK (3 << PINCONN_PINSEL4_P2p7_SHIFT) +#define PINCONN_PINSEL4_P2p8_SHIFT (16) /* Bits 16-17: P2.8 00=GPIO 01=TD2 10=TXD2 11=ENET_MDC */ +#define PINCONN_PINSEL4_P2p8_MASK (3 << PINCONN_PINSEL4_P2p8_SHIFT) +#define PINCONN_PINSEL4_P2p9_SHIFT (18) /* Bits 18-19: P2.9 00=GPIO 01=USB_CONNECT 10=RXD2 11=ENET_MDIO */ +#define PINCONN_PINSEL4_P2p9_MASK (3 << PINCONN_PINSEL4_P2p9_SHIFT) +#define PINCONN_PINSEL4_P2p10_SHIFT (20) /* Bits 20-21: P2.10 00=GPIO 01=EINT0 10=NMI 11=Reserved */ +#define PINCONN_PINSEL4_P2p10_MASK (3 << PINCONN_PINSEL4_P2p10_SHIFT) +#define PINCONN_PINSEL4_P2p11_SHIFT (22) /* Bits 22-23: P2.11 00=GPIO 01=EINT1 10=Reserved 11=I2STX_CLK */ +#define PINCONN_PINSEL4_P2p11_MASK (3 << PINCONN_PINSEL4_P2p11_SHIFT) +#define PINCONN_PINSEL4_P2p12_SHIFT (24) /* Bits 24-25: P2.12 00=GPIO 01=PEINT2 10=Reserved 11=I2STX_WS */ +#define PINCONN_PINSEL4_P2p12_MASK (3 << PINCONN_PINSEL4_P2p12_SHIFT) +#define PINCONN_PINSEL4_P2p13_SHIFT (26) /* Bits 26-27: P2.13 00=GPIO 01=EINT3 10=Reserved 11=I2STX_SDA */ +#define PINCONN_PINSEL4_P2p13_MASK (3 << PINCONN_PINSEL4_P2p13_SHIFT) + /* Bits 28-31: Reserved */ +/* Pin Function Select Register 7 (PINSEL7: 0x4002c01c) */ + +#define PINCONN_PINSEL7_P3_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINSEL7_P3_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ + + /* Bits 0-17: Reserved */ +#define PINCONN_PINSEL7_P3p25_SHIFT (18) /* Bits 18-19: P3.25 00=GPIO 01=Reserved 10=MAT0.0 11=PWM1.2 */ +#define PINCONN_PINSEL7_P3p25_MASK (3 << PINCONN_PINSEL7_P3p25_SHIFT) +#define PINCONN_PINSEL7_P3p26_SHIFT (20) /* Bits 20-21: P3.26 00=GPIO 01=STCLK 10=MAT0.1 11=PWM1.3 */ +#define PINCONN_PINSEL7_P3p26_MASK (3 << PINCONN_PINSEL7_P3p26_SHIFT) + /* Bits 22-31: Reserved */ + +/* Pin Function Select Register 8 (PINSEL8: 0x4002c020) */ +/* No description of bits -- Does this register exist? */ + +/* Pin Function Select Register 9 (PINSEL9: 0x4002c024) */ + +#define PINCONN_PINSEL9_P4_SHIFT(n) PINCONN_PINSELH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINSEL9_P4_MASK(n) PINCONN_PINSELH_MASK(n) /* n=16,17,..31 */ + + /* Bits 0-23: Reserved */ +#define PINCONN_PINSEL9_P4p28_SHIFT (24) /* Bits 24-25: P4.28 00=GPIO 01=RX_MCLK 10=MAT2.0 11=TXD3 */ +#define PINCONN_PINSEL9_P4p28_MASK (3 << PINCONN_PINSEL9_P4p28_SHIFT) +#define PINCONN_PINSEL9_P4p29_SHIFT (26) /* Bits 26-27: P4.29 00=GPIO 01=TX_MCLK 10=MAT2.1 11=RXD3 */ +#define PINCONN_PINSEL9_P4p29_MASK (3 << PINCONN_PINSEL9_P4p29_SHIFT) + /* Bits 28-31: Reserved */ +/* Pin Function Select Register 10 (PINSEL10: 0x4002c028) */ + /* Bits 0-2: Reserved */ +#define PINCONN_PINSEL10_TPIU (1 << 3) /* Bit 3: 0=TPIU interface disabled; 1=TPIU interface enabled */ + /* Bits 4-31: Reserved */ +/* Pin Mode select register 0 (PINMODE0: 0x4002c040) */ + +#define PINCONN_PINMODE_PU (0) /* 00: pin has a pull-up resistor enabled */ +#define PINCONN_PINMODE_RM (1) /* 01: pin has repeater mode enabled */ +#define PINCONN_PINMODE_FLOAT (2) /* 10: pin has neither pull-up nor pull-down */ +#define PINCONN_PINMODE_PD (3) /* 11: pin has a pull-down resistor enabled */ +#define PINCONN_PINMODE_MASK (3) + +#define PINCONN_PINMODEL_SHIFT(n) ((n) << 1) /* n=0,1,..,15 */ +#define PINCONN_PINMODEL_MASK(n) (3 << PINCONN_PINMODEL_SHIFT(n)) +#define PINCONN_PINMODEH_SHIFT(n) (((n)-16) << 1) /* n=16,17,..31 */ +#define PINCONN_PINMODEH_MASK(n) (3 << PINCONN_PINMODEH_SHIFT(n)) + +#define PINCONN_PINMODE0_P0_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINMODE0_P0_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINMODE0_P0p0_SHIFT (0) /* Bits 0-1: P0.0 mode control */ +#define PINCONN_PINMODE0_P0p0_MASK (3 << PINCONN_PINMODE0_P0p0_SHIFT) +#define PINCONN_PINMODE0_P0p1_SHIFT (2) /* Bits 2-3: P0.1 mode control */ +#define PINCONN_PINMODE0_P0p1_MASK (3 << PINCONN_PINMODE0_P0p1_SHIFT) +#define PINCONN_PINMODE0_P0p2_SHIFT (4) /* Bits 4-5: P0.2 mode control */ +#define PINCONN_PINMODE0_P0p2_MASK (3 << PINCONN_PINMODE0_P0p2_SHIFT) +#define PINCONN_PINMODE0_P0p3_SHIFT (6) /* Bits 6-7: P0.3 mode control */ +#define PINCONN_PINMODE0_P0p3_MASK (3 << PINCONN_PINMODE0_P0p3_SHIFT) +#define PINCONN_PINMODE0_P0p4_SHIFT (8) /* Bits 8-9: P0.4 mode control */ +#define PINCONN_PINMODE0_P0p4_MASK (3 << PINCONN_PINMODE0_P0p4_SHIFT) +#define PINCONN_PINMODE0_P0p5_SHIFT (10) /* Bits 10-11: P0.5 mode control */ +#define PINCONN_PINMODE0_P0p5_MASK (3 << PINCONN_PINMODE0_P0p5_SHIFT) +#define PINCONN_PINMODE0_P0p6_SHIFT (12) /* Bits 12-13: P0.6 mode control */ +#define PINCONN_PINMODE0_P0p6_MASK (3 << PINCONN_PINMODE0_P0p6_SHIFT) +#define PINCONN_PINMODE0_P0p7_SHIFT (14) /* Bits 14-15: P0.7 mode control */ +#define PINCONN_PINMODE0_P0p7_MASK (3 << PINCONN_PINMODE0_P0p7_SHIFT) +#define PINCONN_PINMODE0_P0p8_SHIFT (16) /* Bits 16-17: P0.8 mode control */ +#define PINCONN_PINMODE0_P0p8_MASK (3 << PINCONN_PINMODE0_P0p8_SHIFT) +#define PINCONN_PINMODE0_P0p9_SHIFT (18) /* Bits 18-19: P0.9 mode control */ +#define PINCONN_PINMODE0_P0p9_MASK (3 << PINCONN_PINMODE0_P0p9_SHIFT) +#define PINCONN_PINMODE0_P0p10_SHIFT (20) /* Bits 20-21: P0.10 mode control */ +#define PINCONN_PINMODE0_P0p10_MASK (3 << PINCONN_PINMODE0_P0p10_SHIFT) +#define PINCONN_PINMODE0_P0p11_SHIFT (22) /* Bits 22-23: P0.11 mode control */ +#define PINCONN_PINMODE0_P0p11_MASK (3 << PINCONN_PINMODE0_P0p11_SHIFT) + /* Bits 24-29: Reserved */ +#define PINCONN_PINMODE0_P0p15_SHIFT (30) /* Bits 30-31: P0.15 mode control */ +#define PINCONN_PINMODE0_P0p15_MASK (3 << PINCONN_PINMODE0_P0p15_SHIFT) + +/* Pin Mode select register 1 (PINMODE1: 0x4002c044) */ + +#define PINCONN_PINMODE1_P0_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINMODE1_P0_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ + +#define PINCONN_PINMODE1_P0p16_SHIFT (0) /* Bits 0-1: P0.16 mode control */ +#define PINCONN_PINMODE1_P0p16_MASK (3 << PINCONN_PINMODE1_P0p16_SHIFT) +#define PINCONN_PINMODE1_P0p17_SHIFT (2) /* Bits 2-3: P0.17 mode control */ +#define PINCONN_PINMODE1_P0p17_MASK (3 << PINCONN_PINMODE1_P0p17_SHIFT) +#define PINCONN_PINMODE1_P0p18_SHIFT (4) /* Bits 4-5: P0.18 mode control */ +#define PINCONN_PINMODE1_P0p18_MASK (3 << PINCONN_PINMODE1_P0p18_SHIFT) +#define PINCONN_PINMODE1_P0p19_SHIFT (6) /* Bits 6-7: P0.19 mode control */ +#define PINCONN_PINMODE1_P0p19_MASK (3 << PINCONN_PINMODE1_P0p19_SHIFT) +#define PINCONN_PINMODE1_P0p20_SHIFT (8) /* Bits 8-9: P0.20 mode control */ +#define PINCONN_PINMODE1_P0p20_MASK (3 << PINCONN_PINMODE1_P0p20_SHIFT) +#define PINCONN_PINMODE1_P0p21_SHIFT (10) /* Bits 10-11: P0.21 mode control */ +#define PINCONN_PINMODE1_P0p21_MASK (3 << PINCONN_PINMODE1_P0p21_SHIFT) +#define PINCONN_PINMODE1_P0p22_SHIFT (12) /* Bits 12-13: P0.22 mode control */ +#define PINCONN_PINMODE1_P0p22_MASK (3 << PINCONN_PINMODE1_P0p22_SHIFT) +#define PINCONN_PINMODE1_P0p23_SHIFT (14) /* Bits 14-15: P0.23 mode control */ +#define PINCONN_PINMODE1_P0p23_MASK (3 << PINCONN_PINMODE1_P0p23_SHIFT) +#define PINCONN_PINMODE1_P0p24_SHIFT (16) /* Bits 16-17: P0.24 mode control */ +#define PINCONN_PINMODE1_P0p24_MASK (3 << PINCONN_PINMODE1_P0p24_SHIFT) +#define PINCONN_PINMODE1_P0p25_SHIFT (18) /* Bits 18-19: P0.25 mode control */ +#define PINCONN_PINMODE1_P0p25_MASK (3 << PINCONN_PINMODE1_P0p25_SHIFT) +#define PINCONN_PINMODE1_P0p26_SHIFT (20) /* Bits 20-21: P0.26 mode control */ +#define PINCONN_PINMODE1_P0p26_MASK (3 << PINCONN_PINMODE1_P0p26_SHIFT) + /* Bits 22-31: Reserved */ + +/* Pin Mode select register 2 (PINMODE2: 0x4002c048) */ + +#define PINCONN_PINMODE2_P1_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINMODE2_P1_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINMODE2_P1p0_SHIFT (0) /* Bits 2-1: P1.0 mode control */ +#define PINCONN_PINMODE2_P1p0_MASK (3 << PINCONN_PINMODE2_P1p0_SHIFT) +#define PINCONN_PINMODE2_P1p1_SHIFT (2) /* Bits 2-3: P1.1 mode control */ +#define PINCONN_PINMODE2_P1p1_MASK (3 << PINCONN_PINMODE2_P1p1_SHIFT) + /* Bits 4-7: Reserved */ +#define PINCONN_PINMODE2_P1p4_SHIFT (8) /* Bits 8-9: P1.4 mode control */ +#define PINCONN_PINMODE2_P1p4_MASK (3 << PINCONN_PINMODE2_P1p4_SHIFT) + /* Bits 10-15: Reserved */ +#define PINCONN_PINMODE2_P1p8_SHIFT (16) /* Bits 16-17: P1.8 mode control */ +#define PINCONN_PINMODE2_P1p8_MASK (3 << PINCONN_PINMODE2_P1p8_SHIFT) +#define PINCONN_PINMODE2_P1p9_SHIFT (18) /* Bits 18-19: P1.9 mode control */ +#define PINCONN_PINMODE2_P1p9_MASK (3 << PINCONN_PINMODE2_P1p9_SHIFT) +#define PINCONN_PINMODE2_P1p10_SHIFT (20) /* Bits 20-21: P1.10 mode control */ +#define PINCONN_PINMODE2_P1p10_MASK (3 << PINCONN_PINMODE2_P1p10_SHIFT) + /* Bits 22-27: Reserved */ +#define PINCONN_PINMODE2_P1p14_SHIFT (28) /* Bits 28-29: P1.14 mode control */ +#define PINCONN_PINMODE2_P1p14_MASK (3 << PINCONN_PINMODE2_P1p14_SHIFT) +#define PINCONN_PINMODE2_P1p15_SHIFT (30) /* Bits 30-31: P1.15 mode control */ +#define PINCONN_PINMODE2_P1p15_MASK (3 << PINCONN_PINMODE2_P1p15_SHIFT) + +/* Pin Mode select register 3 (PINMODE3: 0x4002c04c) */ + +#define PINCONN_PINMODE3_P1_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINMODE3_P1_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ + +#define PINCONN_PINMODE3_P1p16_SHIFT (0) /* Bits 0-1: P1.16 mode control */ +#define PINCONN_PINMODE3_P1p16_MASK (3 << PINCONN_PINMODE3_P1p16_SHIFT) +#define PINCONN_PINMODE3_P1p17_SHIFT (2) /* Bits 2-3: P1.17 mode control */ +#define PINCONN_PINMODE3_P1p17_MASK (3 << PINCONN_PINMODE3_P1p17_SHIFT) +#define PINCONN_PINMODE3_P1p18_SHIFT (4) /* Bits 4-5: P1.18 mode control */ +#define PINCONN_PINMODE3_P1p18_MASK (3 << PINCONN_PINMODE3_P1p18_SHIFT) +#define PINCONN_PINMODE3_P1p19_SHIFT (6) /* Bits 6-7: P1.19 mode control */ +#define PINCONN_PINMODE3_P1p19_MASK (3 << PINCONN_PINMODE3_P1p19_SHIFT) +#define PINCONN_PINMODE3_P1p20_SHIFT (8) /* Bits 8-9: P1.20 mode control */ +#define PINCONN_PINMODE3_P1p20_MASK (3 << PINCONN_PINMODE3_P1p20_SHIFT) +#define PINCONN_PINMODE3_P1p21_SHIFT (10) /* Bits 10-11: P1.21 mode control */ +#define PINCONN_PINMODE3_P1p21_MASK (3 << PINCONN_PINMODE3_P1p21_SHIFT) +#define PINCONN_PINMODE3_P1p22_SHIFT (12) /* Bits 12-13: P1.22 mode control */ +#define PINCONN_PINMODE3_P1p22_MASK (3 << PINCONN_PINMODE3_P1p22_SHIFT) +#define PINCONN_PINMODE3_P1p23_SHIFT (14) /* Bits 14-15: P1.23 mode control */ +#define PINCONN_PINMODE3_P1p23_MASK (3 << PINCONN_PINMODE3_P1p23_SHIFT) +#define PINCONN_PINMODE3_P1p24_SHIFT (16) /* Bits 16-17: P1.24 mode control */ +#define PINCONN_PINMODE3_P1p24_MASK (3 << PINCONN_PINMODE3_P1p24_SHIFT) +#define PINCONN_PINMODE3_P1p25_SHIFT (18) /* Bits 18-19: P1.25 mode control */ +#define PINCONN_PINMODE3_P1p25_MASK (3 << PINCONN_PINMODE3_P1p25_SHIFT) +#define PINCONN_PINMODE3_P1p26_SHIFT (20) /* Bits 20-21: P1.26 mode control */ +#define PINCONN_PINMODE3_P1p26_MASK (3 << PINCONN_PINMODE3_P1p26_SHIFT) +#define PINCONN_PINMODE3_P1p27_SHIFT (22) /* Bits 22-23: P1.27 mode control */ +#define PINCONN_PINMODE3_P1p27_MASK (3 << PINCONN_PINMODE3_P1p27_SHIFT) +#define PINCONN_PINMODE3_P1p28_SHIFT (24) /* Bits 24-25: P1.28 mode control */ +#define PINCONN_PINMODE3_P1p28_MASK (3 << PINCONN_PINMODE3_P1p28_SHIFT) +#define PINCONN_PINMODE3_P1p29_SHIFT (26) /* Bits 26-27: P1.29 mode control */ +#define PINCONN_PINMODE3_P1p29_MASK (3 << PINCONN_PINMODE3_P1p29_SHIFT) +#define PINCONN_PINMODE3_P1p30_SHIFT (28) /* Bits 28-29: P1.30 mode control */ +#define PINCONN_PINMODE3_P1p30_MASK (3 << PINCONN_PINMODE3_P1p30_SHIFT) +#define PINCONN_PINMODE3_P1p31_SHIFT (30) /* Bits 30-31: P1.31 mode control */ +#define PINCONN_PINMODE3_P1p31_MASK (3 << PINCONN_PINMODE3_P1p31_SHIFT) + +/* Pin Mode select register 4 (PINMODE4: 0x4002c050) */ + +#define PINCONN_PINMODE4_P2_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINMODE4_P2_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ + +#define PINCONN_PINMODE4_P2p0_SHIFT (0) /* Bits 0-1: P2.0 mode control */ +#define PINCONN_PINMODE4_P2p0_MASK (3 << PINCONN_PINMODE4_P2p0_SHIFT) +#define PINCONN_PINMODE4_P2p1_SHIFT (2) /* Bits 2-3: P2.1 mode control */ +#define PINCONN_PINMODE4_P2p1_MASK (3 << PINCONN_PINMODE4_P2p1_SHIFT) +#define PINCONN_PINMODE4_P2p2_SHIFT (4) /* Bits 4-5: P2.2 mode control */ +#define PINCONN_PINMODE4_P2p2_MASK (3 << PINCONN_PINMODE4_P2p2_SHIFT) +#define PINCONN_PINMODE4_P2p3_SHIFT (6) /* Bits 6-7: P2.3 mode control */ +#define PINCONN_PINMODE4_P2p3_MASK (3 << PINCONN_PINMODE4_P2p3_SHIFT) +#define PINCONN_PINMODE4_P2p4_SHIFT (8) /* Bits 8-9: P2.4 mode control */ +#define PINCONN_PINMODE4_P2p4_MASK (3 << PINCONN_PINMODE4_P2p4_SHIFT) +#define PINCONN_PINMODE4_P2p5_SHIFT (10) /* Bits 10-11: P2.5 mode control */ +#define PINCONN_PINMODE4_P2p5_MASK (3 << PINCONN_PINMODE4_P2p5_SHIFT) +#define PINCONN_PINMODE4_P2p6_SHIFT (12) /* Bits 12-13: P2.6 mode control */ +#define PINCONN_PINMODE4_P2p6_MASK (3 << PINCONN_PINMODE4_P2p6_SHIFT) +#define PINCONN_PINMODE4_P2p7_SHIFT (14) /* Bits 14-15: P2.7 mode control */ +#define PINCONN_PINMODE4_P2p7_MASK (3 << PINCONN_PINMODE4_P2p7_SHIFT) +#define PINCONN_PINMODE4_P2p8_SHIFT (16) /* Bits 16-17: P2.8 mode control */ +#define PINCONN_PINMODE4_P2p8_MASK (3 << PINCONN_PINMODE4_P2p8_SHIFT) +#define PINCONN_PINMODE4_P2p9_SHIFT (18) /* Bits 18-19: P2.9 mode control */ +#define PINCONN_PINMODE4_P2p9_MASK (3 << PINCONN_PINMODE4_P2p9_SHIFT) +#define PINCONN_PINMODE4_P2p10_SHIFT (20) /* Bits 20-21: P2.10 mode control */ +#define PINCONN_PINMODE4_P2p10_MASK (3 << PINCONN_PINMODE4_P2p10_SHIFT) +#define PINCONN_PINMODE4_P2p11_SHIFT (22) /* Bits 22-23: P2.11 mode control */ +#define PINCONN_PINMODE4_P2p11_MASK (3 << PINCONN_PINMODE4_P2p11_SHIFT) +#define PINCONN_PINMODE4_P2p12_SHIFT (24) /* Bits 24-25: P2.12 mode control */ +#define PINCONN_PINMODE4_P2p12_MASK (3 << PINCONN_PINMODE4_P2p12_SHIFT) +#define PINCONN_PINMODE4_P2p13_SHIFT (26) /* Bits 26-27: P2.13 mode control */ +#define PINCONN_PINMODE4_P2p13_MASK (3 << PINCONN_PINMODE4_P2p13_SHIFT) + /* Bits 28-31: Reserved */ +/* Pin Mode select register 5 (PINMODE5: 0x4002c054) + * Pin Mode select register 6 (PINMODE6: 0x4002c058) + * No bit definitions -- do these registers exist? + */ + +#define PINCONN_PINMODE5_P2_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINMODE5_P2_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ + +#define PINCONN_PINMODE6_P3_SHIFT(n) PINCONN_PINMODEL_SHIFT(n) /* n=0,1,..,15 */ +#define PINCONN_PINMODE6_P3_MASK(n) PINCONN_PINMODEL_MASK(n) /* n=0,1,..,15 */ + +/* Pin Mode select register 7 (PINMODE7: 0x4002c05c) */ + +#define PINCONN_PINMODE7_P3_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINMODE7_P3_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ + /* Bits 0-17: Reserved */ +#define PINCONN_PINMODE7_P3p25_SHIFT (18) /* Bits 18-19: P3.25 mode control */ +#define PINCONN_PINMODE7_P3p25_MASK (3 << PINCONN_PINMODE7_P3p25_SHIFT) +#define PINCONN_PINMODE7_P3p26_SHIFT (20) /* Bits 20-21: P3.26 mode control */ +#define PINCONN_PINMODE7_P3p26_MASK (3 << PINCONN_PINMODE7_P3p26_SHIFT) + /* Bits 22-31: Reserved */ +/* Pin Mode select register 9 (PINMODE9: 0x4002c064) */ + +#define PINCONN_PINMODE9_P4_SHIFT(n) PINCONN_PINMODEH_SHIFT(n) /* n=16,17,..31 */ +#define PINCONN_PINMODE9_P4_MASK(n) PINCONN_PINMODEH_MASK(n) /* n=16,17,..31 */ + /* Bits 0-23: Reserved */ +#define PINCONN_PINMODE9_P4p28_SHIFT (24) /* Bits 24-25: P4.28 mode control */ +#define PINCONN_PINMODE9_P4p28_MASK (3 << PINCONN_PINMODE9_P4p28_SHIFT) +#define PINCONN_PINMODE9_P4p29_SHIFT (26) /* Bits 26-27: P4.29 mode control */ +#define PINCONN_PINMODE9_P4p29_MASK (3 << PINCONN_PINMODE9_P4p29_SHIFT) + /* Bits 28-31: Reserved */ +/* Open Drain Pin Mode select register 0 (PINMODE_OD0: 0x4002c068) */ + +#define PINCONN_ODMODE0_P0(n) (1 << (n)) + +#define PINCONN_ODMODE0_P0p0 (1 << 0) /* Bit 0: P0.0 open drain mode */ +#define PINCONN_ODMODE0_P0p1 (1 << 1) /* Bit 1: P0.1 open drain mode */ +#define PINCONN_ODMODE0_P0p2 (1 << 2) /* Bit 2: P0.2 open drain mode */ +#define PINCONN_ODMODE0_P0p3 (1 << 3) /* Bit 3: P0.3 open drain mode */ +#define PINCONN_ODMODE0_P0p4 (1 << 4) /* Bit 4: P0.4 open drain mode */ +#define PINCONN_ODMODE0_P0p5 (1 << 5) /* Bit 5: P0.5 open drain mode */ +#define PINCONN_ODMODE0_P0p6 (1 << 6) /* Bit 6: P0.6 open drain mode */ +#define PINCONN_ODMODE0_P0p7 (1 << 7) /* Bit 7: P0.7 open drain mode */ +#define PINCONN_ODMODE0_P0p8 (1 << 8) /* Bit 8: P0.8 open drain mode */ +#define PINCONN_ODMODE0_P0p9 (1 << 9) /* Bit 9: P0.9 open drain mode */ +#define PINCONN_ODMODE0_P0p10 (1 << 10) /* Bit 10: P0.10 open drain mode */ +#define PINCONN_ODMODE0_P0p11 (1 << 11) /* Bit 11: P0.11 open drain mode */ + /* Bits 12-14: Reserved */ +#define PINCONN_ODMODE0_P0p15 (1 << 15) /* Bit 15: P0.15 open drain mode */ +#define PINCONN_ODMODE0_P0p16 (1 << 16) /* Bit 16: P0.16 open drain mode */ +#define PINCONN_ODMODE0_P0p17 (1 << 17) /* Bit 17: P0.17 open drain mode */ +#define PINCONN_ODMODE0_P0p18 (1 << 18) /* Bit 18: P0.18 open drain mode */ +#define PINCONN_ODMODE0_P0p19 (1 << 19) /* Bit 19: P0.19 open drain mode */ +#define PINCONN_ODMODE0_P0p20 (1 << 20) /* Bit 20: P0.20 open drain mode */ +#define PINCONN_ODMODE0_P0p21 (1 << 21) /* Bit 21: P0.21 open drain mode */ +#define PINCONN_ODMODE0_P0p22 (1 << 22) /* Bit 22: P0.22 open drain mode */ +#define PINCONN_ODMODE0_P0p23 (1 << 23) /* Bit 23: P0.23 open drain mode */ +#define PINCONN_ODMODE0_P0p24 (1 << 24) /* Bit 24: P0.24 open drain mode */ +#define PINCONN_ODMODE0_P0p25 (1 << 25) /* Bit 25: P0.25 open drain mode */ +#define PINCONN_ODMODE0_P0p26 (1 << 25) /* Bit 26: P0.26 open drain mode */ + /* Bits 27-28: Reserved */ +#define PINCONN_ODMODE0_P0p29 (1 << 29) /* Bit 29: P0.29 open drain mode */ +#define PINCONN_ODMODE0_P0p30 (1 << 30) /* Bit 30: P0.30 open drain mode */ + /* Bit 31: Reserved */ +/* Open Drain Pin Mode select register 1 (PINMODE_OD1: 0x4002c06c) */ + +#define PINCONN_ODMODE1_P1(n) (1 << (n)) + +#define PINCONN_ODMODE1_P1p0 (1 << 0) /* Bit 0: P1.0 open drain mode */ +#define PINCONN_ODMODE1_P1p1 (1 << 1) /* Bit 1: P1.1 open drain mode */ + /* Bits 2-3: Reserved */ +#define PINCONN_ODMODE1_P1p4 (1 << 4) /* Bit 4: P1.4 open drain mode */ + /* Bits 5-7: Reserved */ +#define PINCONN_ODMODE1_P1p8 (1 << 8) /* Bit 8: P1.8 open drain mode */ +#define PINCONN_ODMODE1_P1p9 (1 << 9) /* Bit 9: P1.9 open drain mode */ +#define PINCONN_ODMODE1_P1p10 (1 << 10) /* Bit 10: P1.10 open drain mode */ + /* Bits 11-13: Reserved */ +#define PINCONN_ODMODE1_P1p14 (1 << 14) /* Bit 14: P1.14 open drain mode */ +#define PINCONN_ODMODE1_P1p15 (1 << 15) /* Bit 15: P1.15 open drain mode */ +#define PINCONN_ODMODE1_P1p16 (1 << 16) /* Bit 16: P1.16 open drain mode */ +#define PINCONN_ODMODE1_P1p17 (1 << 17) /* Bit 17: P1.17 open drain mode */ +#define PINCONN_ODMODE1_P1p18 (1 << 18) /* Bit 18: P1.18 open drain mode */ +#define PINCONN_ODMODE1_P1p19 (1 << 19) /* Bit 19: P1.19 open drain mode */ +#define PINCONN_ODMODE1_P1p20 (1 << 20) /* Bit 20: P1.20 open drain mode */ +#define PINCONN_ODMODE1_P1p21 (1 << 21) /* Bit 21: P1.21 open drain mode */ +#define PINCONN_ODMODE1_P1p22 (1 << 22) /* Bit 22: P1.22 open drain mode */ +#define PINCONN_ODMODE1_P1p23 (1 << 23) /* Bit 23: P1.23 open drain mode */ +#define PINCONN_ODMODE1_P1p24 (1 << 24) /* Bit 24: P1.24 open drain mode */ +#define PINCONN_ODMODE1_P1p25 (1 << 25) /* Bit 25: P1.25 open drain mode */ +#define PINCONN_ODMODE1_P1p26 (1 << 25) /* Bit 26: P1.26 open drain mode */ +#define PINCONN_ODMODE1_P1p27 (1 << 27) /* Bit 27: P1.27 open drain mode */ +#define PINCONN_ODMODE1_P1p28 (1 << 28) /* Bit 28: P1.28 open drain mode */ +#define PINCONN_ODMODE1_P1p29 (1 << 29) /* Bit 29: P1.29 open drain mode */ +#define PINCONN_ODMODE1_P1p30 (1 << 30) /* Bit 30: P1.30 open drain mode */ +#define PINCONN_ODMODE1_P1p31 (1 << 31) /* Bit 31: P1.31 open drain mode */ + +/* Open Drain Pin Mode select register 2 (PINMODE_OD2: 0x4002c070) */ + +#define PINCONN_ODMODE2_P2(n) (1 << (n)) + +#define PINCONN_ODMODE2_P2p0 (1 << 0) /* Bit 0: P2.0 open drain mode */ +#define PINCONN_ODMODE2_P2p1 (1 << 1) /* Bit 1: P2.1 open drain mode */ +#define PINCONN_ODMODE2_P2p2 (1 << 2) /* Bit 2: P2.2 open drain mode */ +#define PINCONN_ODMODE2_P2p3 (1 << 3) /* Bit 3: P2.3 open drain mode */ +#define PINCONN_ODMODE2_P2p4 (1 << 4) /* Bit 4: P2.4 open drain mode */ +#define PINCONN_ODMODE2_P2p5 (1 << 5) /* Bit 5: P2.5 open drain mode */ +#define PINCONN_ODMODE2_P2p6 (1 << 6) /* Bit 6: P2.6 open drain mode */ +#define PINCONN_ODMODE2_P2p7 (1 << 7) /* Bit 7: P2.7 open drain mode */ +#define PINCONN_ODMODE2_P2p8 (1 << 8) /* Bit 8: P2.8 open drain mode */ +#define PINCONN_ODMODE2_P2p9 (1 << 9) /* Bit 9: P2.9 open drain mode */ +#define PINCONN_ODMODE2_P2p10 (1 << 10) /* Bit 10: P2.10 open drain mode */ +#define PINCONN_ODMODE2_P2p11 (1 << 11) /* Bit 11: P2.11 open drain mode */ +#define PINCONN_ODMODE2_P2p12 (1 << 12) /* Bit 12: P2.12 open drain mode */ +#define PINCONN_ODMODE2_P2p13 (1 << 13) /* Bit 13: P2.13 open drain mode */ + /* Bits 14-31: Reserved */ +/* Open Drain Pin Mode select register 3 (PINMODE_OD3: 0x4002c074) */ + +#define PINCONN_ODMODE3_P3(n) (1 << (n)) + /* Bits 0-24: Reserved */ +#define PINCONN_ODMODE3_P3p25 (1 << 25) /* Bit 25: P3.25 open drain mode */ +#define PINCONN_ODMODE3_P3p26 (1 << 25) /* Bit 26: P3.26 open drain mode */ + /* Bits 17-31: Reserved */ +/* Open Drain Pin Mode select register 4 (PINMODE_OD4: 0x4002c078) */ + +#define PINCONN_ODMODE4_P4(n) (1 << (n)) + /* Bits 0-27: Reserved */ +#define PINCONN_ODMODE4_P4p28 (1 << 28) /* Bit 28: P4.28 open drain mode */ +#define PINCONN_ODMODE4_P4p29 (1 << 29) /* Bit 29: P4.29 open drain mode */ + /* Bits 30-31: Reserved */ +/* I2C Pin Configuration register (I2CPADCFG: 0x4002c07c) */ + +#define PINCONN_I2CPADCFG_SDADRV0 (1 << 0) /* Bit 0: SDA0 pin, P0.27 in Fast Mode Plus */ +#define PINCONN_I2CPADCFG_SDAI2C0 (1 << 1) /* Bit 1: SDA0 pin, P0.27 I2C glitch + * filtering/slew rate control */ +#define PINCONN_I2CPADCFG_SCLDRV0 (1 << 2) /* Bit 2: SCL0 pin, P0.28 in Fast Mode Plus */ +#define PINCONN_I2CPADCFG_SCLI2C0 (1 << 3) /* Bit 3: SCL0 pin, P0.28 I2C glitch + * filtering/slew rate control */ + /* Bits 4-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_PINCONN_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_pwm.h b/nuttx/arch/arm/src/lpc17xx/lpc17_pwm.h index 6db271a47e..6555ce6166 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_pwm.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_pwm.h @@ -1,223 +1,223 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_pwm.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_PWM_IR_OFFSET 0x0000 /* Interrupt Register */ -#define LPC17_PWM_TCR_OFFSET 0x0004 /* Timer Control Register */ -#define LPC17_PWM_TC_OFFSET 0x0008 /* Timer Counter */ -#define LPC17_PWM_PR_OFFSET 0x000c /* Prescale Register */ -#define LPC17_PWM_PC_OFFSET 0x0010 /* Prescale Counter */ -#define LPC17_PWM_MCR_OFFSET 0x0014 /* Match Control Register */ -#define LPC17_PWM_MR0_OFFSET 0x0018 /* Match Register 0 */ -#define LPC17_PWM_MR1_OFFSET 0x001c /* Match Register 1 */ -#define LPC17_PWM_MR2_OFFSET 0x0020 /* Match Register 2 */ -#define LPC17_PWM_MR3_OFFSET 0x0024 /* Match Register 3 */ -#define LPC17_PWM_CCR_OFFSET 0x0028 /* Capture Control Register */ -#define LPC17_PWM_CR0_OFFSET 0x002c /* Capture Register 0 */ -#define LPC17_PWM_CR1_OFFSET 0x0030 /* Capture Register 1 */ -#define LPC17_PWM_CR2_OFFSET 0x0034 /* Capture Register 2 */ -#define LPC17_PWM_CR3_OFFSET 0x0038 /* Capture Register 3 */ -#define LPC17_PWM_MR4_OFFSET 0x0040 /* Match Register 4 */ -#define LPC17_PWM_MR5_OFFSET 0x0044 /* Match Register 5 */ -#define LPC17_PWM_MR6_OFFSET 0x0048 /* Match Register 6 */ -#define LPC17_PWM_PCR_OFFSET 0x004c /* PWM Control Register */ -#define LPC17_PWM_LER_OFFSET 0x0050 /* Load Enable Register */ -#define LPC17_PWM_CTCR_OFFSET 0x0070 /* Counter/Timer Control Register */ - -/* Register addresses ***************************************************************/ - -#define LPC17_PWM1_IR (LPC17_PWM1_BASE+LPC17_PWM_IR_OFFSET) -#define LPC17_PWM1_TCR (LPC17_PWM1_BASE+LPC17_PWM_TCR_OFFSET) -#define LPC17_PWM1_TC (LPC17_PWM1_BASE+LPC17_PWM_TC_OFFSET) -#define LPC17_PWM1_PR (LPC17_PWM1_BASE+LPC17_PWM_PR_OFFSET) -#define LPC17_PWM1_PC (LPC17_PWM1_BASE+LPC17_PWM_PC_OFFSET) -#define LPC17_PWM1_MCR (LPC17_PWM1_BASE+LPC17_PWM_MCR_OFFSET) -#define LPC17_PWM1_MR0 (LPC17_PWM1_BASE+LPC17_PWM_MR0_OFFSET) -#define LPC17_PWM1_MR1 (LPC17_PWM1_BASE+LPC17_PWM_MR1_OFFSET) -#define LPC17_PWM1_MR2 (LPC17_PWM1_BASE+LPC17_PWM_MR2_OFFSET) -#define LPC17_PWM1_MR3 (LPC17_PWM1_BASE+LPC17_PWM_MR3_OFFSET) -#define LPC17_PWM1_MR4 (LPC17_PWM1_BASE+LPC17_PWM_MR4_OFFSET) -#define LPC17_PWM1_MR5 (LPC17_PWM1_BASE+LPC17_PWM_MR5_OFFSET) -#define LPC17_PWM1_MR6 (LPC17_PWM1_BASE+LPC17_PWM_MR6_OFFSET) -#define LPC17_PWM1_CCR (LPC17_PWM1_BASE+LPC17_PWM_CCR_OFFSET) -#define LPC17_PWM1_CR0 (LPC17_PWM1_BASE+LPC17_PWM_CR0_OFFSET) -#define LPC17_PWM1_CR1 (LPC17_PWM1_BASE+LPC17_PWM_CR1_OFFSET) -#define LPC17_PWM1_CR2 (LPC17_PWM1_BASE+LPC17_PWM_CR2_OFFSET) -#define LPC17_PWM1_CR3 (LPC17_PWM1_BASE+LPC17_PWM_CR3_OFFSET) -#define LPC17_PWM1_PCR (LPC17_PWM1_BASE+LPC17_PWM_PCR_OFFSET) -#define LPC17_PWM1_LER (LPC17_PWM1_BASE+LPC17_PWM_LER_OFFSET) -#define LPC17_PWM1_CTCR (LPC17_PWM1_BASE+LPC17_PWM_CTCR_OFFSET) - -/* Register bit definitions *********************************************************/ -/* Registers holding 32-bit numeric values (no bit field definitions): - * - * Timer Counter (TC) - * Prescale Register (PR) - * Prescale Counter (PC) - * Match Register 0 (MR0) - * Match Register 1 (MR1) - * Match Register 2 (MR2) - * Match Register 3 (MR3) - * Match Register 4 (MR3) - * Match Register 5 (MR3) - * Match Register 6 (MR3) - * Capture Register 0 (CR0) - * Capture Register 1 (CR1) - * Capture Register 1 (CR2) - * Capture Register 1 (CR3) - */ - -/* Interrupt Register */ - -#define PWM_IR_MR0 (1 << 0) /* Bit 0: PWM match channel 0 interrrupt */ -#define PWM_IR_MR1 (1 << 1) /* Bit 1: PWM match channel 1 interrrupt */ -#define PWM_IR_MR2 (1 << 2) /* Bit 2: PWM match channel 2 interrrupt */ -#define PWM_IR_MR3 (1 << 3) /* Bit 3: PWM match channel 3 interrrupt */ -#define PWM_IR_CAP0 (1 << 4) /* Bit 4: Capture input 0 interrrupt */ -#define PWM_IR_CAP1 (1 << 5) /* Bit 5: Capture input 1 interrrupt */ - /* Bits 6-7: Reserved */ -#define PWM_IR_MR4 (1 << 8) /* Bit 8: PWM match channel 4 interrrupt */ -#define PWM_IR_MR5 (1 << 9) /* Bit 9: PWM match channel 5 interrrupt */ -#define PWM_IR_MR6 (1 << 10) /* Bit 10: PWM match channel 6 interrrupt */ - /* Bits 11-31: Reserved */ -/* Timer Control Register */ - -#define PWM_TCR_CNTREN (1 << 0) /* Bit 0: Counter Enable */ -#define PWM_TCR_CNTRRST (1 << 1) /* Bit 1: Counter Reset */ - /* Bit 2: Reserved */ -#define PWM_TCR_PWMEN (1 << 3) /* Bit 3: PWM Enable */ - /* Bits 4-31: Reserved */ -/* Match Control Register */ - -#define PWM_MCR_MR0I (1 << 0) /* Bit 0: Interrupt on MR0 */ -#define PWM_MCR_MR0R (1 << 1) /* Bit 1: Reset on MR0 */ -#define PWM_MCR_MR0S (1 << 2) /* Bit 2: Stop on MR0 */ -#define PWM_MCR_MR1I (1 << 3) /* Bit 3: Interrupt on MR1 */ -#define PWM_MCR_MR1R (1 << 4) /* Bit 4: Reset on MR1 */ -#define PWM_MCR_MR1S (1 << 5) /* Bit 5: Stop on MR1 */ -#define PWM_MCR_MR2I (1 << 6) /* Bit 6: Interrupt on MR2 */ -#define PWM_MCR_MR2R (1 << 7) /* Bit 7: Reset on MR2 */ -#define PWM_MCR_MR2S (1 << 8) /* Bit 8: Stop on MR2 */ -#define PWM_MCR_MR3I (1 << 9) /* Bit 9: Interrupt on MR3 */ -#define PWM_MCR_MR3R (1 << 10) /* Bit 10: Reset on MR3 */ -#define PWM_MCR_MR3S (1 << 11) /* Bit 11: Stop on MR3 */ -#define PWM_MCR_MR4I (1 << 12) /* Bit 12: Interrupt on MR4 */ -#define PWM_MCR_MR4R (1 << 13) /* Bit 13: Reset on MR4 */ -#define PWM_MCR_MR4S (1 << 14) /* Bit 14: Stop on MR4 */ -#define PWM_MCR_MR5I (1 << 15) /* Bit 15: Interrupt on MR5 */ -#define PWM_MCR_MR5R (1 << 16) /* Bit 16: Reset on MR5*/ -#define PWM_MCR_MR5S (1 << 17) /* Bit 17: Stop on MR5 */ -#define PWM_MCR_MR6I (1 << 18) /* Bit 18: Interrupt on MR6 */ -#define PWM_MCR_MR6R (1 << 19) /* Bit 19: Reset on MR6 */ -#define PWM_MCR_MR6S (1 << 20) /* Bit 20: Stop on MR6 */ - /* Bits 21-31: Reserved */ -/* Capture Control Register (Where are CAP2 and 3?) */ - -#define PWM_CCR_CAP0RE (1 << 0) /* Bit 0: Capture on CAPn.0 rising edge */ -#define PWM_CCR_CAP0FE (1 << 1) /* Bit 1: Capture on CAPn.0 falling edg */ -#define PWM_CCR_CAP0I (1 << 2) /* Bit 2: Interrupt on CAPn.0 */ -#define PWM_CCR_CAP1RE (1 << 3) /* Bit 3: Capture on CAPn.1 rising edge */ -#define PWM_CCR_CAP1FE (1 << 4) /* Bit 4: Capture on CAPn.1 falling edg */ -#define PWM_CCR_CAP1I (1 << 5) /* Bit 5: Interrupt on CAPn.1 */ - /* Bits 6-31: Reserved */ -/* PWM Control Register */ - /* Bits 0-1: Reserved */ -#define PWM_PCR_SEL2 (1 << 2) /* Bit 2: PWM2 single edge controlled mode */ -#define PWM_PCR_SEL3 (1 << 3) /* Bit 3: PWM3 single edge controlled mode */ -#define PWM_PCR_SEL4 (1 << 4) /* Bit 4: PWM4 single edge controlled mode */ -#define PWM_PCR_SEL5 (1 << 5) /* Bit 5: PWM5 single edge controlled mode */ -#define PWM_PCR_SEL6 (1 << 6) /* Bit 6: PWM6 single edge controlled mode */ - /* Bits 7-8: Reserved */ -#define PWM_PCR_ENA1 (1 << 9) /* Bit 9: Enable PWM1 output */ -#define PWM_PCR_ENA2 (1 << 10) /* Bit 10: Enable PWM2 output */ -#define PWM_PCR_ENA3 (1 << 11) /* Bit 11: Enable PWM3 output */ -#define PWM_PCR_ENA4 (1 << 12) /* Bit 12: Enable PWM4 output */ -#define PWM_PCR_ENA5 (1 << 13) /* Bit 13: Enable PWM5 output */ -#define PWM_PCR_ENA6 (1 << 14) /* Bit 14: Enable PWM6 output */ - /* Bits 15-31: Reserved */ -/* Load Enable Register */ - -#define PWM_LER_M0EN (1 << 0) /* Bit 0: Enable PWM Match 0 Latch */ -#define PWM_LER_M1EN (1 << 1) /* Bit 1: Enable PWM Match 1 Latch */ -#define PWM_LER_M2EN (1 << 2) /* Bit 2: Enable PWM Match 2 Latch */ -#define PWM_LER_M3EN (1 << 3) /* Bit 3: Enable PWM Match 3 Latch */ -#define PWM_LER_M4EN (1 << 4) /* Bit 4: Enable PWM Match 4 Latch */ -#define PWM_LER_M5EN (1 << 5) /* Bit 5: Enable PWM Match 5 Latch */ -#define PWM_LER_M6EN (1 << 6) /* Bit 6: Enable PWM Match 6 Latch */ - /* Bits 7-31: Reserved */ -/* Counter/Timer Control Register */ - -#define PWM_CTCR_MODE_SHIFT (0) /* Bits 0-1: Counter/Timer Mode */ -#define PWM_CTCR_MODE_MASK (3 << PWM_CTCR_MODE_SHIFT) -# define PWM_CTCR_MODE_TIMER (0 << PWM_CTCR_MODE_SHIFT) /* Timer Mode, prescal match */ -# define PWM_CTCR_MODE_CNTRRE (1 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP rising edge */ -# define PWM_CTCR_MODE_CNTRFE (2 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP falling edge */ -# define PWM_CTCR_MODE_CNTRBE (3 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP both edges */ -#define PWM_CTCR_INPSEL_SHIFT (2) /* Bits 2-3: Count Input Select */ -#define PWM_CTCR_INPSEL_MASK (3 << PWM_CTCR_INPSEL_SHIFT) -# define PWM_CTCR_INPSEL_CAPNp0 (0 << PWM_CTCR_INPSEL_SHIFT) /* CAPn.0 for TIMERn */ -# define PWM_CTCR_INPSEL_CAPNp1 (1 << PWM_CTCR_INPSEL_SHIFT) /* CAPn.0 for TIMERn */ - /* Bits 4-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_pwm.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_PWM_IR_OFFSET 0x0000 /* Interrupt Register */ +#define LPC17_PWM_TCR_OFFSET 0x0004 /* Timer Control Register */ +#define LPC17_PWM_TC_OFFSET 0x0008 /* Timer Counter */ +#define LPC17_PWM_PR_OFFSET 0x000c /* Prescale Register */ +#define LPC17_PWM_PC_OFFSET 0x0010 /* Prescale Counter */ +#define LPC17_PWM_MCR_OFFSET 0x0014 /* Match Control Register */ +#define LPC17_PWM_MR0_OFFSET 0x0018 /* Match Register 0 */ +#define LPC17_PWM_MR1_OFFSET 0x001c /* Match Register 1 */ +#define LPC17_PWM_MR2_OFFSET 0x0020 /* Match Register 2 */ +#define LPC17_PWM_MR3_OFFSET 0x0024 /* Match Register 3 */ +#define LPC17_PWM_CCR_OFFSET 0x0028 /* Capture Control Register */ +#define LPC17_PWM_CR0_OFFSET 0x002c /* Capture Register 0 */ +#define LPC17_PWM_CR1_OFFSET 0x0030 /* Capture Register 1 */ +#define LPC17_PWM_CR2_OFFSET 0x0034 /* Capture Register 2 */ +#define LPC17_PWM_CR3_OFFSET 0x0038 /* Capture Register 3 */ +#define LPC17_PWM_MR4_OFFSET 0x0040 /* Match Register 4 */ +#define LPC17_PWM_MR5_OFFSET 0x0044 /* Match Register 5 */ +#define LPC17_PWM_MR6_OFFSET 0x0048 /* Match Register 6 */ +#define LPC17_PWM_PCR_OFFSET 0x004c /* PWM Control Register */ +#define LPC17_PWM_LER_OFFSET 0x0050 /* Load Enable Register */ +#define LPC17_PWM_CTCR_OFFSET 0x0070 /* Counter/Timer Control Register */ + +/* Register addresses ***************************************************************/ + +#define LPC17_PWM1_IR (LPC17_PWM1_BASE+LPC17_PWM_IR_OFFSET) +#define LPC17_PWM1_TCR (LPC17_PWM1_BASE+LPC17_PWM_TCR_OFFSET) +#define LPC17_PWM1_TC (LPC17_PWM1_BASE+LPC17_PWM_TC_OFFSET) +#define LPC17_PWM1_PR (LPC17_PWM1_BASE+LPC17_PWM_PR_OFFSET) +#define LPC17_PWM1_PC (LPC17_PWM1_BASE+LPC17_PWM_PC_OFFSET) +#define LPC17_PWM1_MCR (LPC17_PWM1_BASE+LPC17_PWM_MCR_OFFSET) +#define LPC17_PWM1_MR0 (LPC17_PWM1_BASE+LPC17_PWM_MR0_OFFSET) +#define LPC17_PWM1_MR1 (LPC17_PWM1_BASE+LPC17_PWM_MR1_OFFSET) +#define LPC17_PWM1_MR2 (LPC17_PWM1_BASE+LPC17_PWM_MR2_OFFSET) +#define LPC17_PWM1_MR3 (LPC17_PWM1_BASE+LPC17_PWM_MR3_OFFSET) +#define LPC17_PWM1_MR4 (LPC17_PWM1_BASE+LPC17_PWM_MR4_OFFSET) +#define LPC17_PWM1_MR5 (LPC17_PWM1_BASE+LPC17_PWM_MR5_OFFSET) +#define LPC17_PWM1_MR6 (LPC17_PWM1_BASE+LPC17_PWM_MR6_OFFSET) +#define LPC17_PWM1_CCR (LPC17_PWM1_BASE+LPC17_PWM_CCR_OFFSET) +#define LPC17_PWM1_CR0 (LPC17_PWM1_BASE+LPC17_PWM_CR0_OFFSET) +#define LPC17_PWM1_CR1 (LPC17_PWM1_BASE+LPC17_PWM_CR1_OFFSET) +#define LPC17_PWM1_CR2 (LPC17_PWM1_BASE+LPC17_PWM_CR2_OFFSET) +#define LPC17_PWM1_CR3 (LPC17_PWM1_BASE+LPC17_PWM_CR3_OFFSET) +#define LPC17_PWM1_PCR (LPC17_PWM1_BASE+LPC17_PWM_PCR_OFFSET) +#define LPC17_PWM1_LER (LPC17_PWM1_BASE+LPC17_PWM_LER_OFFSET) +#define LPC17_PWM1_CTCR (LPC17_PWM1_BASE+LPC17_PWM_CTCR_OFFSET) + +/* Register bit definitions *********************************************************/ +/* Registers holding 32-bit numeric values (no bit field definitions): + * + * Timer Counter (TC) + * Prescale Register (PR) + * Prescale Counter (PC) + * Match Register 0 (MR0) + * Match Register 1 (MR1) + * Match Register 2 (MR2) + * Match Register 3 (MR3) + * Match Register 4 (MR3) + * Match Register 5 (MR3) + * Match Register 6 (MR3) + * Capture Register 0 (CR0) + * Capture Register 1 (CR1) + * Capture Register 1 (CR2) + * Capture Register 1 (CR3) + */ + +/* Interrupt Register */ + +#define PWM_IR_MR0 (1 << 0) /* Bit 0: PWM match channel 0 interrrupt */ +#define PWM_IR_MR1 (1 << 1) /* Bit 1: PWM match channel 1 interrrupt */ +#define PWM_IR_MR2 (1 << 2) /* Bit 2: PWM match channel 2 interrrupt */ +#define PWM_IR_MR3 (1 << 3) /* Bit 3: PWM match channel 3 interrrupt */ +#define PWM_IR_CAP0 (1 << 4) /* Bit 4: Capture input 0 interrrupt */ +#define PWM_IR_CAP1 (1 << 5) /* Bit 5: Capture input 1 interrrupt */ + /* Bits 6-7: Reserved */ +#define PWM_IR_MR4 (1 << 8) /* Bit 8: PWM match channel 4 interrrupt */ +#define PWM_IR_MR5 (1 << 9) /* Bit 9: PWM match channel 5 interrrupt */ +#define PWM_IR_MR6 (1 << 10) /* Bit 10: PWM match channel 6 interrrupt */ + /* Bits 11-31: Reserved */ +/* Timer Control Register */ + +#define PWM_TCR_CNTREN (1 << 0) /* Bit 0: Counter Enable */ +#define PWM_TCR_CNTRRST (1 << 1) /* Bit 1: Counter Reset */ + /* Bit 2: Reserved */ +#define PWM_TCR_PWMEN (1 << 3) /* Bit 3: PWM Enable */ + /* Bits 4-31: Reserved */ +/* Match Control Register */ + +#define PWM_MCR_MR0I (1 << 0) /* Bit 0: Interrupt on MR0 */ +#define PWM_MCR_MR0R (1 << 1) /* Bit 1: Reset on MR0 */ +#define PWM_MCR_MR0S (1 << 2) /* Bit 2: Stop on MR0 */ +#define PWM_MCR_MR1I (1 << 3) /* Bit 3: Interrupt on MR1 */ +#define PWM_MCR_MR1R (1 << 4) /* Bit 4: Reset on MR1 */ +#define PWM_MCR_MR1S (1 << 5) /* Bit 5: Stop on MR1 */ +#define PWM_MCR_MR2I (1 << 6) /* Bit 6: Interrupt on MR2 */ +#define PWM_MCR_MR2R (1 << 7) /* Bit 7: Reset on MR2 */ +#define PWM_MCR_MR2S (1 << 8) /* Bit 8: Stop on MR2 */ +#define PWM_MCR_MR3I (1 << 9) /* Bit 9: Interrupt on MR3 */ +#define PWM_MCR_MR3R (1 << 10) /* Bit 10: Reset on MR3 */ +#define PWM_MCR_MR3S (1 << 11) /* Bit 11: Stop on MR3 */ +#define PWM_MCR_MR4I (1 << 12) /* Bit 12: Interrupt on MR4 */ +#define PWM_MCR_MR4R (1 << 13) /* Bit 13: Reset on MR4 */ +#define PWM_MCR_MR4S (1 << 14) /* Bit 14: Stop on MR4 */ +#define PWM_MCR_MR5I (1 << 15) /* Bit 15: Interrupt on MR5 */ +#define PWM_MCR_MR5R (1 << 16) /* Bit 16: Reset on MR5*/ +#define PWM_MCR_MR5S (1 << 17) /* Bit 17: Stop on MR5 */ +#define PWM_MCR_MR6I (1 << 18) /* Bit 18: Interrupt on MR6 */ +#define PWM_MCR_MR6R (1 << 19) /* Bit 19: Reset on MR6 */ +#define PWM_MCR_MR6S (1 << 20) /* Bit 20: Stop on MR6 */ + /* Bits 21-31: Reserved */ +/* Capture Control Register (Where are CAP2 and 3?) */ + +#define PWM_CCR_CAP0RE (1 << 0) /* Bit 0: Capture on CAPn.0 rising edge */ +#define PWM_CCR_CAP0FE (1 << 1) /* Bit 1: Capture on CAPn.0 falling edg */ +#define PWM_CCR_CAP0I (1 << 2) /* Bit 2: Interrupt on CAPn.0 */ +#define PWM_CCR_CAP1RE (1 << 3) /* Bit 3: Capture on CAPn.1 rising edge */ +#define PWM_CCR_CAP1FE (1 << 4) /* Bit 4: Capture on CAPn.1 falling edg */ +#define PWM_CCR_CAP1I (1 << 5) /* Bit 5: Interrupt on CAPn.1 */ + /* Bits 6-31: Reserved */ +/* PWM Control Register */ + /* Bits 0-1: Reserved */ +#define PWM_PCR_SEL2 (1 << 2) /* Bit 2: PWM2 single edge controlled mode */ +#define PWM_PCR_SEL3 (1 << 3) /* Bit 3: PWM3 single edge controlled mode */ +#define PWM_PCR_SEL4 (1 << 4) /* Bit 4: PWM4 single edge controlled mode */ +#define PWM_PCR_SEL5 (1 << 5) /* Bit 5: PWM5 single edge controlled mode */ +#define PWM_PCR_SEL6 (1 << 6) /* Bit 6: PWM6 single edge controlled mode */ + /* Bits 7-8: Reserved */ +#define PWM_PCR_ENA1 (1 << 9) /* Bit 9: Enable PWM1 output */ +#define PWM_PCR_ENA2 (1 << 10) /* Bit 10: Enable PWM2 output */ +#define PWM_PCR_ENA3 (1 << 11) /* Bit 11: Enable PWM3 output */ +#define PWM_PCR_ENA4 (1 << 12) /* Bit 12: Enable PWM4 output */ +#define PWM_PCR_ENA5 (1 << 13) /* Bit 13: Enable PWM5 output */ +#define PWM_PCR_ENA6 (1 << 14) /* Bit 14: Enable PWM6 output */ + /* Bits 15-31: Reserved */ +/* Load Enable Register */ + +#define PWM_LER_M0EN (1 << 0) /* Bit 0: Enable PWM Match 0 Latch */ +#define PWM_LER_M1EN (1 << 1) /* Bit 1: Enable PWM Match 1 Latch */ +#define PWM_LER_M2EN (1 << 2) /* Bit 2: Enable PWM Match 2 Latch */ +#define PWM_LER_M3EN (1 << 3) /* Bit 3: Enable PWM Match 3 Latch */ +#define PWM_LER_M4EN (1 << 4) /* Bit 4: Enable PWM Match 4 Latch */ +#define PWM_LER_M5EN (1 << 5) /* Bit 5: Enable PWM Match 5 Latch */ +#define PWM_LER_M6EN (1 << 6) /* Bit 6: Enable PWM Match 6 Latch */ + /* Bits 7-31: Reserved */ +/* Counter/Timer Control Register */ + +#define PWM_CTCR_MODE_SHIFT (0) /* Bits 0-1: Counter/Timer Mode */ +#define PWM_CTCR_MODE_MASK (3 << PWM_CTCR_MODE_SHIFT) +# define PWM_CTCR_MODE_TIMER (0 << PWM_CTCR_MODE_SHIFT) /* Timer Mode, prescal match */ +# define PWM_CTCR_MODE_CNTRRE (1 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP rising edge */ +# define PWM_CTCR_MODE_CNTRFE (2 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP falling edge */ +# define PWM_CTCR_MODE_CNTRBE (3 << PWM_CTCR_MODE_SHIFT) /* Counter Mode, CAP both edges */ +#define PWM_CTCR_INPSEL_SHIFT (2) /* Bits 2-3: Count Input Select */ +#define PWM_CTCR_INPSEL_MASK (3 << PWM_CTCR_INPSEL_SHIFT) +# define PWM_CTCR_INPSEL_CAPNp0 (0 << PWM_CTCR_INPSEL_SHIFT) /* CAPn.0 for TIMERn */ +# define PWM_CTCR_INPSEL_CAPNp1 (1 << PWM_CTCR_INPSEL_SHIFT) /* CAPn.0 for TIMERn */ + /* Bits 4-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_PWM_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_qei.h b/nuttx/arch/arm/src/lpc17xx/lpc17_qei.h index 2c37051b13..d1637f9432 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_qei.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_qei.h @@ -1,190 +1,190 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_qei.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ -/* Control registers */ - -#define LPC17_QEI_CON_OFFSET 0x0000 /* Control register */ -#define LPC17_QEI_STAT_OFFSET 0x0004 /* Encoder status register */ -#define LPC17_QEI_CONF_OFFSET 0x0008 /* Configuration register */ - -/* Position, index, and timer registers */ - -#define LPC17_QEI_POS_OFFSET 0x000c /* Position register */ -#define LPC17_QEI_MAXPOS_OFFSET 0x0010 /* Maximum position register */ -#define LPC17_QEI_CMPOS0_OFFSET 0x0014 /* Position compare register */ -#define LPC17_QEI_CMPOS1_OFFSET 0x0018 /* Position compare register */ -#define LPC17_QEI_CMPOS2_OFFSET 0x001c /* Position compare register */ -#define LPC17_QEI_INXCNT_OFFSET 0x0020 /* Index count register */ -#define LPC17_QEI_INXCMP_OFFSET 0x0024 /* Index compare register */ -#define LPC17_QEI_LOAD_OFFSET 0x0028 /* Velocity timer reload register */ -#define LPC17_QEI_TIME_OFFSET 0x002c /* Velocity timer register */ -#define LPC17_QEI_VEL_OFFSET 0x0030 /* Velocity counter register */ -#define LPC17_QEI_CAP_OFFSET 0x0034 /* Velocity capture register */ -#define LPC17_QEI_VELCOMP_OFFSET 0x0038 /* Velocity compare register */ -#define LPC17_QEI_FILTER_OFFSET 0x003c /* Digital filter register */ - -/* Interrupt registers */ - -#define LPC17_QEI_IEC_OFFSET 0x0fd8 /* Interrupt enable clear register */ -#define LPC17_QEI_IES_OFFSET 0x0fdc /* Interrupt enable set register */ -#define LPC17_QEI_INTSTAT_OFFSET 0x0fe0 /* Interrupt status register */ -#define LPC17_QEI_IE_OFFSET 0x0fe4 /* Interrupt enable register */ -#define LPC17_QEI_CLR_OFFSET 0x0fe8 /* Interrupt status clear register */ -#define LPC17_QEI_SET_OFFSET 0x0fec /* Interrupt status set register */ - -/* Register addresses ***************************************************************/ -/* Control registers */ - -#define LPC17_QEI_CON (LPC17_QEI_BASE+LPC17_QEI_CON_OFFSET) -#define LPC17_QEI_STAT (LPC17_QEI_BASE+LPC17_QEI_STAT_OFFSET) -#define LPC17_QEI_CONF (LPC17_QEI_BASE+LPC17_QEI_CONF_OFFSET) - -/* Position, index, and timer registers */ - -#define LPC17_QEI_POS (LPC17_QEI_BASE+LPC17_QEI_POS_OFFSET) -#define LPC17_QEI_MAXPOS (LPC17_QEI_BASE+LPC17_QEI_MAXPOS_OFFSET) -#define LPC17_QEI_CMPOS0 (LPC17_QEI_BASE+LPC17_QEI_CMPOS0_OFFSET) -#define LPC17_QEI_CMPOS1 (LPC17_QEI_BASE+LPC17_QEI_CMPOS1_OFFSET) -#define LPC17_QEI_CMPOS2 (LPC17_QEI_BASE+LPC17_QEI_CMPOS2_OFFSET) -#define LPC17_QEI_INXCNT (LPC17_QEI_BASE+LPC17_QEI_INXCNT_OFFSET) -#define LPC17_QEI_INXCMP (LPC17_QEI_BASE+LPC17_QEI_INXCMP_OFFSET) -#define LPC17_QEI_LOAD (LPC17_QEI_BASE+LPC17_QEI_LOAD_OFFSET) -#define LPC17_QEI_TIME (LPC17_QEI_BASE+LPC17_QEI_TIME_OFFSET) -#define LPC17_QEI_VEL (LPC17_QEI_BASE+LPC17_QEI_VEL_OFFSET) -#define LPC17_QEI_CAP (LPC17_QEI_BASE+LPC17_QEI_CAP_OFFSET) -#define LPC17_QEI_VELCOMP (LPC17_QEI_BASE+LPC17_QEI_VELCOMP_OFFSET) -#define LPC17_QEI_FILTER (LPC17_QEI_BASE+LPC17_QEI_FILTER_OFFSET) - -/* Interrupt registers */ - -#define LPC17_QEI_IEC (LPC17_QEI_BASE+LPC17_QEI_IEC_OFFSET) -#define LPC17_QEI_IES (LPC17_QEI_BASE+LPC17_QEI_IES_OFFSET) -#define LPC17_QEI_INTSTAT (LPC17_QEI_BASE+LPC17_QEI_INTSTAT_OFFSET) -#define LPC17_QEI_IE (LPC17_QEI_BASE+LPC17_QEI_IE_OFFSET) -#define LPC17_QEI_CLR (LPC17_QEI_BASE+LPC17_QEI_CLR_OFFSET) -#define LPC17_QEI_SET (LPC17_QEI_BASE+LPC17_QEI_SET_OFFSET) - -/* Register bit definitions *********************************************************/ -/* The following registers hold 32-bit integer values and have no bit fields defined - * in this section: - * - * Position register (POS) - * Maximum position register (MAXPOS) - * Position compare register 0 (CMPOS0) - * Position compare register 1 (CMPOS) - * Position compare register 2 (CMPOS2) - * Index count register (INXCNT) - * Index compare register (INXCMP) - * Velocity timer reload register (LOAD) - * Velocity timer register (TIME) - * Velocity counter register (VEL) - * Velocity capture register (CAP) - * Velocity compare register (VELCOMP) - * Digital filter register (FILTER) - */ - -/* Control registers */ -/* Control register */ - -#define QEI_CON_RESP (1 << 0) /* Bit 0: Reset position counter */ -#define QEI_CON_RESPI (1 << 1) /* Bit 1: Reset position counter on index */ -#define QEI_CON_RESV (1 << 2) /* Bit 2: Reset velocity */ -#define QEI_CON_RESI (1 << 3) /* Bit 3: Reset index counter */ - /* Bits 4-31: reserved */ -/* Encoder status register */ - -#define QEI_STAT_DIR (1 << 0) /* Bit 0: Direction bit */ - /* Bits 1-31: reserved */ -/* Configuration register */ - -#define QEI_CONF_DIRINV (1 << 0) /* Bit 0: Direction invert */ -#define QEI_CONF_SIGMODE (1 << 1) /* Bit 1: Signal Mode */ -#define QEI_CONF_CAPMODE (1 << 2) /* Bit 2: Capture Mode */ -#define QEI_CONF_INVINX (1 << 3) /* Bit 3: Invert Index */ - /* Bits 4-31: reserved */ -/* Position, index, and timer registers (all 32-bit integer values with not bit fields */ - -/* Interrupt registers */ -/* Interrupt enable clear register (IEC), Interrupt enable set register (IES), - * Interrupt status register (INTSTAT), Interrupt enable register (IE), Interrupt - * status clear register (CLR), and Interrupt status set register (SET) common - * bit definitions. - */ - -#define QEI_INT_INX (1 << 0) /* Bit 0: Index pulse detected */ -#define QEI_INT_TIM (1 << 1) /* Bit 1: Velocity timer overflow occurred */ -#define QEI_INT_VELC (1 << 2) /* Bit 2: Captured velocity less than compare velocity */ -#define QEI_INT_DIR (1 << 3) /* Bit 3: Change of direction detected */ -#define QEI_INT_ERR (1 << 4) /* Bit 4: Encoder phase error detected */ -#define QEI_INT_ENCLK (1 << 5) /* Bit 5: Eencoder clock pulse detected */ -#define QEI_INT_POS0 (1 << 6) /* Bit 6: Position 0 compare equal to current position */ -#define QEI_INT_POS1 (1 << 7) /* Bit 7: Position 1 compare equal to current position */ -#define QEI_INT_POS2 (1 << 8) /* Bit 8: Position 2 compare equal to current position */ -#define QEI_INT_REV (1 << 9) /* Bit 9: Index compare value equal to current index count */ -#define QEI_INT_POS0REV (1 << 10) /* Bit 10: Combined position 0 and revolution count interrupt */ -#define QEI_INT_POS1REV (1 << 11) /* Bit 11: Position 1 and revolution count interrupt */ -#define QEI_INT_POS2REV (1 << 12) /* Bit 12: Position 2 and revolution count interrupt */ - /* Bits 13-31: reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_qei.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ +/* Control registers */ + +#define LPC17_QEI_CON_OFFSET 0x0000 /* Control register */ +#define LPC17_QEI_STAT_OFFSET 0x0004 /* Encoder status register */ +#define LPC17_QEI_CONF_OFFSET 0x0008 /* Configuration register */ + +/* Position, index, and timer registers */ + +#define LPC17_QEI_POS_OFFSET 0x000c /* Position register */ +#define LPC17_QEI_MAXPOS_OFFSET 0x0010 /* Maximum position register */ +#define LPC17_QEI_CMPOS0_OFFSET 0x0014 /* Position compare register */ +#define LPC17_QEI_CMPOS1_OFFSET 0x0018 /* Position compare register */ +#define LPC17_QEI_CMPOS2_OFFSET 0x001c /* Position compare register */ +#define LPC17_QEI_INXCNT_OFFSET 0x0020 /* Index count register */ +#define LPC17_QEI_INXCMP_OFFSET 0x0024 /* Index compare register */ +#define LPC17_QEI_LOAD_OFFSET 0x0028 /* Velocity timer reload register */ +#define LPC17_QEI_TIME_OFFSET 0x002c /* Velocity timer register */ +#define LPC17_QEI_VEL_OFFSET 0x0030 /* Velocity counter register */ +#define LPC17_QEI_CAP_OFFSET 0x0034 /* Velocity capture register */ +#define LPC17_QEI_VELCOMP_OFFSET 0x0038 /* Velocity compare register */ +#define LPC17_QEI_FILTER_OFFSET 0x003c /* Digital filter register */ + +/* Interrupt registers */ + +#define LPC17_QEI_IEC_OFFSET 0x0fd8 /* Interrupt enable clear register */ +#define LPC17_QEI_IES_OFFSET 0x0fdc /* Interrupt enable set register */ +#define LPC17_QEI_INTSTAT_OFFSET 0x0fe0 /* Interrupt status register */ +#define LPC17_QEI_IE_OFFSET 0x0fe4 /* Interrupt enable register */ +#define LPC17_QEI_CLR_OFFSET 0x0fe8 /* Interrupt status clear register */ +#define LPC17_QEI_SET_OFFSET 0x0fec /* Interrupt status set register */ + +/* Register addresses ***************************************************************/ +/* Control registers */ + +#define LPC17_QEI_CON (LPC17_QEI_BASE+LPC17_QEI_CON_OFFSET) +#define LPC17_QEI_STAT (LPC17_QEI_BASE+LPC17_QEI_STAT_OFFSET) +#define LPC17_QEI_CONF (LPC17_QEI_BASE+LPC17_QEI_CONF_OFFSET) + +/* Position, index, and timer registers */ + +#define LPC17_QEI_POS (LPC17_QEI_BASE+LPC17_QEI_POS_OFFSET) +#define LPC17_QEI_MAXPOS (LPC17_QEI_BASE+LPC17_QEI_MAXPOS_OFFSET) +#define LPC17_QEI_CMPOS0 (LPC17_QEI_BASE+LPC17_QEI_CMPOS0_OFFSET) +#define LPC17_QEI_CMPOS1 (LPC17_QEI_BASE+LPC17_QEI_CMPOS1_OFFSET) +#define LPC17_QEI_CMPOS2 (LPC17_QEI_BASE+LPC17_QEI_CMPOS2_OFFSET) +#define LPC17_QEI_INXCNT (LPC17_QEI_BASE+LPC17_QEI_INXCNT_OFFSET) +#define LPC17_QEI_INXCMP (LPC17_QEI_BASE+LPC17_QEI_INXCMP_OFFSET) +#define LPC17_QEI_LOAD (LPC17_QEI_BASE+LPC17_QEI_LOAD_OFFSET) +#define LPC17_QEI_TIME (LPC17_QEI_BASE+LPC17_QEI_TIME_OFFSET) +#define LPC17_QEI_VEL (LPC17_QEI_BASE+LPC17_QEI_VEL_OFFSET) +#define LPC17_QEI_CAP (LPC17_QEI_BASE+LPC17_QEI_CAP_OFFSET) +#define LPC17_QEI_VELCOMP (LPC17_QEI_BASE+LPC17_QEI_VELCOMP_OFFSET) +#define LPC17_QEI_FILTER (LPC17_QEI_BASE+LPC17_QEI_FILTER_OFFSET) + +/* Interrupt registers */ + +#define LPC17_QEI_IEC (LPC17_QEI_BASE+LPC17_QEI_IEC_OFFSET) +#define LPC17_QEI_IES (LPC17_QEI_BASE+LPC17_QEI_IES_OFFSET) +#define LPC17_QEI_INTSTAT (LPC17_QEI_BASE+LPC17_QEI_INTSTAT_OFFSET) +#define LPC17_QEI_IE (LPC17_QEI_BASE+LPC17_QEI_IE_OFFSET) +#define LPC17_QEI_CLR (LPC17_QEI_BASE+LPC17_QEI_CLR_OFFSET) +#define LPC17_QEI_SET (LPC17_QEI_BASE+LPC17_QEI_SET_OFFSET) + +/* Register bit definitions *********************************************************/ +/* The following registers hold 32-bit integer values and have no bit fields defined + * in this section: + * + * Position register (POS) + * Maximum position register (MAXPOS) + * Position compare register 0 (CMPOS0) + * Position compare register 1 (CMPOS) + * Position compare register 2 (CMPOS2) + * Index count register (INXCNT) + * Index compare register (INXCMP) + * Velocity timer reload register (LOAD) + * Velocity timer register (TIME) + * Velocity counter register (VEL) + * Velocity capture register (CAP) + * Velocity compare register (VELCOMP) + * Digital filter register (FILTER) + */ + +/* Control registers */ +/* Control register */ + +#define QEI_CON_RESP (1 << 0) /* Bit 0: Reset position counter */ +#define QEI_CON_RESPI (1 << 1) /* Bit 1: Reset position counter on index */ +#define QEI_CON_RESV (1 << 2) /* Bit 2: Reset velocity */ +#define QEI_CON_RESI (1 << 3) /* Bit 3: Reset index counter */ + /* Bits 4-31: reserved */ +/* Encoder status register */ + +#define QEI_STAT_DIR (1 << 0) /* Bit 0: Direction bit */ + /* Bits 1-31: reserved */ +/* Configuration register */ + +#define QEI_CONF_DIRINV (1 << 0) /* Bit 0: Direction invert */ +#define QEI_CONF_SIGMODE (1 << 1) /* Bit 1: Signal Mode */ +#define QEI_CONF_CAPMODE (1 << 2) /* Bit 2: Capture Mode */ +#define QEI_CONF_INVINX (1 << 3) /* Bit 3: Invert Index */ + /* Bits 4-31: reserved */ +/* Position, index, and timer registers (all 32-bit integer values with not bit fields */ + +/* Interrupt registers */ +/* Interrupt enable clear register (IEC), Interrupt enable set register (IES), + * Interrupt status register (INTSTAT), Interrupt enable register (IE), Interrupt + * status clear register (CLR), and Interrupt status set register (SET) common + * bit definitions. + */ + +#define QEI_INT_INX (1 << 0) /* Bit 0: Index pulse detected */ +#define QEI_INT_TIM (1 << 1) /* Bit 1: Velocity timer overflow occurred */ +#define QEI_INT_VELC (1 << 2) /* Bit 2: Captured velocity less than compare velocity */ +#define QEI_INT_DIR (1 << 3) /* Bit 3: Change of direction detected */ +#define QEI_INT_ERR (1 << 4) /* Bit 4: Encoder phase error detected */ +#define QEI_INT_ENCLK (1 << 5) /* Bit 5: Eencoder clock pulse detected */ +#define QEI_INT_POS0 (1 << 6) /* Bit 6: Position 0 compare equal to current position */ +#define QEI_INT_POS1 (1 << 7) /* Bit 7: Position 1 compare equal to current position */ +#define QEI_INT_POS2 (1 << 8) /* Bit 8: Position 2 compare equal to current position */ +#define QEI_INT_REV (1 << 9) /* Bit 9: Index compare value equal to current index count */ +#define QEI_INT_POS0REV (1 << 10) /* Bit 10: Combined position 0 and revolution count interrupt */ +#define QEI_INT_POS1REV (1 << 11) /* Bit 11: Position 1 and revolution count interrupt */ +#define QEI_INT_POS2REV (1 << 12) /* Bit 12: Position 2 and revolution count interrupt */ + /* Bits 13-31: reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_QEI_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_rit.h b/nuttx/arch/arm/src/lpc17xx/lpc17_rit.h index 57d89de95e..2da0164bde 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_rit.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_rit.h @@ -1,92 +1,92 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_rit.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_RIT_COMPVAL_OFFSET 0x0000 /* Compare register */ -#define LPC17_RIT_MASK_OFFSET 0x0004 /* Mask register */ -#define LPC17_RIT_CTRL_OFFSET 0x0008 /* Control register */ -#define LPC17_RIT_COUNTER_OFFSET 0x000c /* 32-bit counter */ - -/* Register addresses ***************************************************************/ - -#define LPC17_RIT_COMPVAL (LPC17_RIT_BASE+LPC17_RIT_COMPVAL_OFFSET) -#define LPC17_RIT_MASK (LPC17_RIT_BASE+LPC17_RIT_MASK_OFFSET) -#define LPC17_RIT_CTRL (LPC17_RIT_BASE+LPC17_RIT_CTRL_OFFSET) -#define LPC17_RIT_COUNTER (LPC17_RIT_BASE+LPC17_RIT_COUNTER_OFFSET) - -/* Register bit definitions *********************************************************/ -/* Compare register (Bits 0-31: value compared to the counter) */ - -/* Mask register (Bits 0-31: 32-bit mask value) */ - -/* Control register */ - -#define RIT_CTRL_INT (1 << 0) /* Bit 0: Interrupt flag */ -#define RIT_CTRL_ENCLR (1 << 1) /* Bit 1: Timer enable clear */ -#define RIT_CTRL_ENBR (1 << 2) /* Bit 2: Timer enable for debug */ -#define RIT_CTRL_EN (1 << 3) /* Bit 3: Timer enable */ - /* Bits 4-31: Reserved */ -/* 32-bit counter (Bits 0-31: 32-bit up counter) */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_rit.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_RIT_COMPVAL_OFFSET 0x0000 /* Compare register */ +#define LPC17_RIT_MASK_OFFSET 0x0004 /* Mask register */ +#define LPC17_RIT_CTRL_OFFSET 0x0008 /* Control register */ +#define LPC17_RIT_COUNTER_OFFSET 0x000c /* 32-bit counter */ + +/* Register addresses ***************************************************************/ + +#define LPC17_RIT_COMPVAL (LPC17_RIT_BASE+LPC17_RIT_COMPVAL_OFFSET) +#define LPC17_RIT_MASK (LPC17_RIT_BASE+LPC17_RIT_MASK_OFFSET) +#define LPC17_RIT_CTRL (LPC17_RIT_BASE+LPC17_RIT_CTRL_OFFSET) +#define LPC17_RIT_COUNTER (LPC17_RIT_BASE+LPC17_RIT_COUNTER_OFFSET) + +/* Register bit definitions *********************************************************/ +/* Compare register (Bits 0-31: value compared to the counter) */ + +/* Mask register (Bits 0-31: 32-bit mask value) */ + +/* Control register */ + +#define RIT_CTRL_INT (1 << 0) /* Bit 0: Interrupt flag */ +#define RIT_CTRL_ENCLR (1 << 1) /* Bit 1: Timer enable clear */ +#define RIT_CTRL_ENBR (1 << 2) /* Bit 2: Timer enable for debug */ +#define RIT_CTRL_EN (1 << 3) /* Bit 3: Timer enable */ + /* Bits 4-31: Reserved */ +/* 32-bit counter (Bits 0-31: 32-bit up counter) */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_RIT_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h index 9fca96219d..27d7da9d13 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h @@ -1,127 +1,127 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_serial.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "lpc17_uart.h" -#include "lpc17_syscon.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Configuration *********************************************************************/ - -/* Are any UARTs enabled? */ - -#undef HAVE_UART -#if defined(CONFIG_LPC17_UART0) || defined(CONFIG_LPC17_UART1) || \ - defined(CONFIG_LPC17_UART2) || defined(CONFIG_LPC17_UART3) -# define HAVE_UART 1 -#endif - -/* Is there a serial console? There should be at most one defined. It could be on - * any UARTn, n=0,1,2,3 - */ - -#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART0) -# undef CONFIG_UART1_SERIAL_CONSOLE -# undef CONFIG_UART2_SERIAL_CONSOLE -# undef CONFIG_UART3_SERIAL_CONSOLE -# define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART1) -# undef CONFIG_UART0_SERIAL_CONSOLE -# undef CONFIG_UART2_SERIAL_CONSOLE -# undef CONFIG_UART3_SERIAL_CONSOLE -# define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART2) -# undef CONFIG_UART0_SERIAL_CONSOLE -# undef CONFIG_UART1_SERIAL_CONSOLE -# undef CONFIG_UART3_SERIAL_CONSOLE -# define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART3_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART3) -# undef CONFIG_UART0_SERIAL_CONSOLE -# undef CONFIG_UART1_SERIAL_CONSOLE -# undef CONFIG_UART2_SERIAL_CONSOLE -# define HAVE_CONSOLE 1 -#else -# undef CONFIG_UART0_SERIAL_CONSOLE -# undef CONFIG_UART1_SERIAL_CONSOLE -# undef CONFIG_UART2_SERIAL_CONSOLE -# undef CONFIG_UART3_SERIAL_CONSOLE -# undef HAVE_CONSOLE -#endif - -/* Check UART flow control (Only supported by UART1) */ - -# undef CONFIG_UART0_FLOWCONTROL -# undef CONFIG_UART2_FLOWCONTROL -# undef CONFIG_UART3_FLOWCONTROL -#ifndef CONFIG_LPC17_UART1 -# undef CONFIG_UART1_FLOWCONTROL -#endif - -/* We cannot allow the DLM/DLL divisor to become to small or will will lose too - * much accuracy. This following is a "fudge factor" that represents the minimum - * value of the divisor that we will permit. - */ - -#define UART_MINDL 32 - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_serial.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "lpc17_uart.h" +#include "lpc17_syscon.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration *********************************************************************/ + +/* Are any UARTs enabled? */ + +#undef HAVE_UART +#if defined(CONFIG_LPC17_UART0) || defined(CONFIG_LPC17_UART1) || \ + defined(CONFIG_LPC17_UART2) || defined(CONFIG_LPC17_UART3) +# define HAVE_UART 1 +#endif + +/* Is there a serial console? There should be at most one defined. It could be on + * any UARTn, n=0,1,2,3 + */ + +#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART0) +# undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# undef CONFIG_UART3_SERIAL_CONSOLE +# define HAVE_CONSOLE 1 +#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART1) +# undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# undef CONFIG_UART3_SERIAL_CONSOLE +# define HAVE_CONSOLE 1 +#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART2) +# undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART3_SERIAL_CONSOLE +# define HAVE_CONSOLE 1 +#elif defined(CONFIG_UART3_SERIAL_CONSOLE) && defined(CONFIG_LPC17_UART3) +# undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# define HAVE_CONSOLE 1 +#else +# undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# undef CONFIG_UART3_SERIAL_CONSOLE +# undef HAVE_CONSOLE +#endif + +/* Check UART flow control (Only supported by UART1) */ + +# undef CONFIG_UART0_FLOWCONTROL +# undef CONFIG_UART2_FLOWCONTROL +# undef CONFIG_UART3_FLOWCONTROL +#ifndef CONFIG_LPC17_UART1 +# undef CONFIG_UART1_FLOWCONTROL +#endif + +/* We cannot allow the DLM/DLL divisor to become to small or will will lose too + * much accuracy. This following is a "fudge factor" that represents the minimum + * value of the divisor that we will permit. + */ + +#define UART_MINDL 32 + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SERIAL_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c index f0a2b1264b..a7bb159317 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/lpc17_spi.c * * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h index ca7699c15e..880966eb1c 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.h @@ -1,141 +1,141 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_spi.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_SPI_CR_OFFSET 0x0000 /* Control Register */ -#define LPC17_SPI_SR_OFFSET 0x0004 /* SPI Status Register */ -#define LPC17_SPI_DR_OFFSET 0x0008 /* SPI Data Register */ -#define LPC17_SPI_CCR_OFFSET 0x000c /* SPI Clock Counter Register */ -#define LPC17_SPI_TCR_OFFSET 0x0010 /* SPI Test Control Register */ -#define LPC17_SPI_TSR_OFFSET 0x0014 /* SPI Test Status Register */ -#define LPC17_SPI_INT_OFFSET 0x001c /* SPI Interrupt Register */ - -/* Register addresses ***************************************************************/ - -#define LPC17_SPI_CR (LPC17_SPI_BASE+LPC17_SPI_CR_OFFSET) -#define LPC17_SPI_SR (LPC17_SPI_BASE+LPC17_SPI_SR_OFFSET) -#define LPC17_SPI_DR (LPC17_SPI_BASE+LPC17_SPI_DR_OFFSET) -#define LPC17_SPI_CCR (LPC17_SPI_BASE+LPC17_SPI_CCR_OFFSET) -#define LPC17_TCR_CCR (LPC17_SPI_BASE+LPC17_SPI_TCR_OFFSET) -#define LPC17_TSR_CCR (LPC17_SPI_BASE+LPC17_SPI_TSR_OFFSET) -#define LPC17_SPI_INT (LPC17_SPI_BASE+LPC17_SPI_INT_OFFSET) - -/* Register bit definitions *********************************************************/ - -/* Control Register */ - /* Bits 0-1: Reserved */ -#define SPI_CR_BITENABLE (1 << 2) /* Bit 2: Enable word size selected by BITS */ -#define SPI_CR_CPHA (1 << 3) /* Bit 3: Clock phase control */ -#define SPI_CR_CPOL (1 << 4) /* Bit 4: Clock polarity control */ -#define SPI_CR_MSTR (1 << 5) /* Bit 5: Master mode select */ -#define SPI_CR_LSBF (1 << 6) /* Bit 6: SPI data is transferred LSB first */ -#define SPI_CR_SPIE (1 << 7) /* Bit 7: Serial peripheral interrupt enable */ -#define SPI_CR_BITS_SHIFT (8) /* Bits 8-11: Number of bits per word (BITENABLE==1) */ -#define SPI_CR_BITS_MASK (15 << SPI_CR_BITS_SHIFT) -# define SPI_CR_BITS_8BITS (8 << SPI_CR_BITS_SHIFT) /* 8 bits per transfer */ -# define SPI_CR_BITS_9BITS (9 << SPI_CR_BITS_SHIFT) /* 9 bits per transfer */ -# define SPI_CR_BITS_10BITS (10 << SPI_CR_BITS_SHIFT) /* 10 bits per transfer */ -# define SPI_CR_BITS_11BITS (11 << SPI_CR_BITS_SHIFT) /* 11 bits per transfer */ -# define SPI_CR_BITS_12BITS (12 << SPI_CR_BITS_SHIFT) /* 12 bits per transfer */ -# define SPI_CR_BITS_13BITS (13 << SPI_CR_BITS_SHIFT) /* 13 bits per transfer */ -# define SPI_CR_BITS_14BITS (14 << SPI_CR_BITS_SHIFT) /* 14 bits per transfer */ -# define SPI_CR_BITS_15BITS (15 << SPI_CR_BITS_SHIFT) /* 15 bits per transfer */ -# define SPI_CR_BITS_16BITS (0 << SPI_CR_BITS_SHIFT) /* 16 bits per transfer */ - /* Bits 12-31: Reserved */ -/* SPI Status Register */ - /* Bits 0-2: Reserved */ -#define SPI_SR_ABRT (1 << 3) /* Bit 3: Slave abort */ -#define SPI_SR_MODF (1 << 4) /* Bit 4: Mode fault */ -#define SPI_SR_ROVR (1 << 5) /* Bit 5: Read overrun */ -#define SPI_SR_WCOL (1 << 6) /* Bit 6: Write collision */ -#define SPI_SR_SPIF (1 << 7) /* Bit 7: SPI transfer complete */ - /* Bits 8-31: Reserved */ -/* SPI Data Register */ - -#define SPI_DR_MASK (0xff) /* Bits 0-15: SPI Bi-directional data port */ -#define SPI_DR_MASKWIDE (0xffff) /* Bits 0-15: If SPI_CR_BITENABLE != 0 */ - /* Bits 8-31: Reserved */ -/* SPI Clock Counter Register */ - -#define SPI_CCR_MASK (0xff) /* Bits 0-7: SPI Clock counter setting */ - /* Bits 8-31: Reserved */ -/* SPI Test Control Register */ - /* Bit 0: Reserved */ -#define SPI_TCR_TEST_SHIFT (1) /* Bits 1-7: SPI test mode */ -#define SPI_TCR_TEST_MASK (0x7f << SPI_TCR_TEST_SHIFT) - /* Bits 8-31: Reserved */ -/* SPI Test Status Register */ - /* Bits 0-2: Reserved */ -#define SPI_TSR_ABRT (1 << 3) /* Bit 3: Slave abort */ -#define SPI_TSR_MODF (1 << 4) /* Bit 4: Mode fault */ -#define SPI_TSR_ROVR (1 << 5) /* Bit 5: Read overrun */ -#define SPI_TSR_WCOL (1 << 6) /* Bit 6: Write collision */ -#define SPI_TSR_SPIF (1 << 7) /* Bit 7: SPI transfer complete */ - /* Bits 8-31: Reserved */ -/* SPI Interrupt Register */ - -#define SPI_INT_SPIF (1 << 0) /* SPI interrupt */ - /* Bits 1-31: Reserved */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_spi.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_SPI_CR_OFFSET 0x0000 /* Control Register */ +#define LPC17_SPI_SR_OFFSET 0x0004 /* SPI Status Register */ +#define LPC17_SPI_DR_OFFSET 0x0008 /* SPI Data Register */ +#define LPC17_SPI_CCR_OFFSET 0x000c /* SPI Clock Counter Register */ +#define LPC17_SPI_TCR_OFFSET 0x0010 /* SPI Test Control Register */ +#define LPC17_SPI_TSR_OFFSET 0x0014 /* SPI Test Status Register */ +#define LPC17_SPI_INT_OFFSET 0x001c /* SPI Interrupt Register */ + +/* Register addresses ***************************************************************/ + +#define LPC17_SPI_CR (LPC17_SPI_BASE+LPC17_SPI_CR_OFFSET) +#define LPC17_SPI_SR (LPC17_SPI_BASE+LPC17_SPI_SR_OFFSET) +#define LPC17_SPI_DR (LPC17_SPI_BASE+LPC17_SPI_DR_OFFSET) +#define LPC17_SPI_CCR (LPC17_SPI_BASE+LPC17_SPI_CCR_OFFSET) +#define LPC17_TCR_CCR (LPC17_SPI_BASE+LPC17_SPI_TCR_OFFSET) +#define LPC17_TSR_CCR (LPC17_SPI_BASE+LPC17_SPI_TSR_OFFSET) +#define LPC17_SPI_INT (LPC17_SPI_BASE+LPC17_SPI_INT_OFFSET) + +/* Register bit definitions *********************************************************/ + +/* Control Register */ + /* Bits 0-1: Reserved */ +#define SPI_CR_BITENABLE (1 << 2) /* Bit 2: Enable word size selected by BITS */ +#define SPI_CR_CPHA (1 << 3) /* Bit 3: Clock phase control */ +#define SPI_CR_CPOL (1 << 4) /* Bit 4: Clock polarity control */ +#define SPI_CR_MSTR (1 << 5) /* Bit 5: Master mode select */ +#define SPI_CR_LSBF (1 << 6) /* Bit 6: SPI data is transferred LSB first */ +#define SPI_CR_SPIE (1 << 7) /* Bit 7: Serial peripheral interrupt enable */ +#define SPI_CR_BITS_SHIFT (8) /* Bits 8-11: Number of bits per word (BITENABLE==1) */ +#define SPI_CR_BITS_MASK (15 << SPI_CR_BITS_SHIFT) +# define SPI_CR_BITS_8BITS (8 << SPI_CR_BITS_SHIFT) /* 8 bits per transfer */ +# define SPI_CR_BITS_9BITS (9 << SPI_CR_BITS_SHIFT) /* 9 bits per transfer */ +# define SPI_CR_BITS_10BITS (10 << SPI_CR_BITS_SHIFT) /* 10 bits per transfer */ +# define SPI_CR_BITS_11BITS (11 << SPI_CR_BITS_SHIFT) /* 11 bits per transfer */ +# define SPI_CR_BITS_12BITS (12 << SPI_CR_BITS_SHIFT) /* 12 bits per transfer */ +# define SPI_CR_BITS_13BITS (13 << SPI_CR_BITS_SHIFT) /* 13 bits per transfer */ +# define SPI_CR_BITS_14BITS (14 << SPI_CR_BITS_SHIFT) /* 14 bits per transfer */ +# define SPI_CR_BITS_15BITS (15 << SPI_CR_BITS_SHIFT) /* 15 bits per transfer */ +# define SPI_CR_BITS_16BITS (0 << SPI_CR_BITS_SHIFT) /* 16 bits per transfer */ + /* Bits 12-31: Reserved */ +/* SPI Status Register */ + /* Bits 0-2: Reserved */ +#define SPI_SR_ABRT (1 << 3) /* Bit 3: Slave abort */ +#define SPI_SR_MODF (1 << 4) /* Bit 4: Mode fault */ +#define SPI_SR_ROVR (1 << 5) /* Bit 5: Read overrun */ +#define SPI_SR_WCOL (1 << 6) /* Bit 6: Write collision */ +#define SPI_SR_SPIF (1 << 7) /* Bit 7: SPI transfer complete */ + /* Bits 8-31: Reserved */ +/* SPI Data Register */ + +#define SPI_DR_MASK (0xff) /* Bits 0-15: SPI Bi-directional data port */ +#define SPI_DR_MASKWIDE (0xffff) /* Bits 0-15: If SPI_CR_BITENABLE != 0 */ + /* Bits 8-31: Reserved */ +/* SPI Clock Counter Register */ + +#define SPI_CCR_MASK (0xff) /* Bits 0-7: SPI Clock counter setting */ + /* Bits 8-31: Reserved */ +/* SPI Test Control Register */ + /* Bit 0: Reserved */ +#define SPI_TCR_TEST_SHIFT (1) /* Bits 1-7: SPI test mode */ +#define SPI_TCR_TEST_MASK (0x7f << SPI_TCR_TEST_SHIFT) + /* Bits 8-31: Reserved */ +/* SPI Test Status Register */ + /* Bits 0-2: Reserved */ +#define SPI_TSR_ABRT (1 << 3) /* Bit 3: Slave abort */ +#define SPI_TSR_MODF (1 << 4) /* Bit 4: Mode fault */ +#define SPI_TSR_ROVR (1 << 5) /* Bit 5: Read overrun */ +#define SPI_TSR_WCOL (1 << 6) /* Bit 6: Write collision */ +#define SPI_TSR_SPIF (1 << 7) /* Bit 7: SPI transfer complete */ + /* Bits 8-31: Reserved */ +/* SPI Interrupt Register */ + +#define SPI_INT_SPIF (1 << 0) /* SPI interrupt */ + /* Bits 1-31: Reserved */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_SPI_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_syscon.h b/nuttx/arch/arm/src/lpc17xx/lpc17_syscon.h index c9a2dbb546..ce8654645d 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_syscon.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_syscon.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/lpc17_syscon.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_timerisr.c b/nuttx/arch/arm/src/lpc17xx/lpc17_timerisr.c index aa113463a9..918c153a4b 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_timerisr.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc17xx/lpc17_timerisr.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_usb.h b/nuttx/arch/arm/src/lpc17xx/lpc17_usb.h index 40c491811e..8fd5995846 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_usb.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_usb.h @@ -1,778 +1,778 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_usb.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ -/* USB Host Controller (OHCI) *******************************************************/ -/* See include/nuttx/usb/ohci.h */ - -#define LPC17_USBHOST_MODID_OFFSET 0x00fc /* Module ID/Revision ID */ - -/* USB OTG Controller ***************************************************************/ -/* OTG registers */ - -#define LPC17_USBOTG_INTST_OFFSET 0x0100 /* OTG Interrupt Status */ -#define LPC17_USBOTG_INTEN_OFFSET 0x0104 /* OTG Interrupt Enable */ -#define LPC17_USBOTG_INTSET_OFFSET 0x0108 /* OTG Interrupt Set */ -#define LPC17_USBOTG_INTCLR_OFFSET 0x010c /* OTG Interrupt Clear */ -#define LPC17_USBOTG_STCTRL_OFFSET 0x0110 /* OTG Status and Control */ -#define LPC17_USBOTG_TMR_OFFSET 0x0114 /* OTG Timer */ - -/* USB Device Controller ************************************************************/ -/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ - -#define LPC17_USBDEV_INTST_OFFSET 0x0200 /* USB Device Interrupt Status */ -#define LPC17_USBDEV_INTEN_OFFSET 0x0204 /* USB Device Interrupt Enable */ -#define LPC17_USBDEV_INTCLR_OFFSET 0x0208 /* USB Device Interrupt Clear */ -#define LPC17_USBDEV_INTSET_OFFSET 0x020c /* USB Device Interrupt Set */ - -/* SIE Command registers */ - -#define LPC17_USBDEV_CMDCODE_OFFSET 0x0210 /* USB Command Code */ -#define LPC17_USBDEV_CMDDATA_OFFSET 0x0214 /* USB Command Data */ - -/* USB transfer registers */ - -#define LPC17_USBDEV_RXDATA_OFFSET 0x0218 /* USB Receive Data */ -#define LPC17_USBDEV_RXPLEN_OFFSET 0x0220 /* USB Receive Packet Length */ -#define LPC17_USBDEV_TXDATA_OFFSET 0x021c /* USB Transmit Data */ -#define LPC17_USBDEV_TXPLEN_OFFSET 0x0224 /* USB Transmit Packet Length */ -#define LPC17_USBDEV_CTRL_OFFSET 0x0228 /* USB Control */ - -/* More Device interrupt registers */ - -#define LPC17_USBDEV_INTPRI_OFFSET 0x022c /* USB Device Interrupt Priority */ - -/* Endpoint interrupt registers */ - -#define LPC17_USBDEV_EPINTST_OFFSET 0x0230 /* USB Endpoint Interrupt Status */ -#define LPC17_USBDEV_EPINTEN_OFFSET 0x0234 /* USB Endpoint Interrupt Enable */ -#define LPC17_USBDEV_EPINTCLR_OFFSET 0x0238 /* USB Endpoint Interrupt Clear */ -#define LPC17_USBDEV_EPINTSET_OFFSET 0x023c /* USB Endpoint Interrupt Set */ -#define LPC17_USBDEV_EPINTPRI_OFFSET 0x0240 /* USB Endpoint Priority */ - -/* Endpoint realization registers */ - -#define LPC17_USBDEV_REEP_OFFSET 0x0244 /* USB Realize Endpoint */ -#define LPC17_USBDEV_EPIND_OFFSET 0x0248 /* USB Endpoint Index */ -#define LPC17_USBDEV_MAXPSIZE_OFFSET 0x024c /* USB MaxPacketSize */ - -/* DMA registers */ - -#define LPC17_USBDEV_DMARST_OFFSET 0x0250 /* USB DMA Request Status */ -#define LPC17_USBDEV_DMARCLR_OFFSET 0x0254 /* USB DMA Request Clear */ -#define LPC17_USBDEV_DMARSET_OFFSET 0x0258 /* USB DMA Request Set */ -#define LPC17_USBDEV_UDCAH_OFFSET 0x0280 /* USB UDCA Head */ -#define LPC17_USBDEV_EPDMAST_OFFSET 0x0284 /* USB Endpoint DMA Status */ -#define LPC17_USBDEV_EPDMAEN_OFFSET 0x0288 /* USB Endpoint DMA Enable */ -#define LPC17_USBDEV_EPDMADIS_OFFSET 0x028c /* USB Endpoint DMA Disable */ -#define LPC17_USBDEV_DMAINTST_OFFSET 0x0290 /* USB DMA Interrupt Status */ -#define LPC17_USBDEV_DMAINTEN_OFFSET 0x0294 /* USB DMA Interrupt Enable */ -#define LPC17_USBDEV_EOTINTST_OFFSET 0x02a0 /* USB End of Transfer Interrupt Status */ -#define LPC17_USBDEV_EOTINTCLR_OFFSET 0x02a4 /* USB End of Transfer Interrupt Clear */ -#define LPC17_USBDEV_EOTINTSET_OFFSET 0x02a8 /* USB End of Transfer Interrupt Set */ -#define LPC17_USBDEV_NDDRINTST_OFFSET 0x02ac /* USB New DD Request Interrupt Status */ -#define LPC17_USBDEV_NDDRINTCLR_OFFSET 0x02b0 /* USB New DD Request Interrupt Clear */ -#define LPC17_USBDEV_NDDRINTSET_OFFSET 0x02b4 /* USB New DD Request Interrupt Set */ -#define LPC17_USBDEV_SYSERRINTST_OFFSET 0x02b8 /* USB System Error Interrupt Status */ -#define LPC17_USBDEV_SYSERRINTCLR_OFFSET 0x02bc /* USB System Error Interrupt Clear */ -#define LPC17_USBDEV_SYSERRINTSET_OFFSET 0x02c0 /* USB System Error Interrupt Set */ - -/* OTG I2C registers ****************************************************************/ - -#define LPC17_OTGI2C_RX_OFFSET 0x0300 /* I2C Receive */ -#define LPC17_OTGI2C_TX_OFFSET 0x0300 /* I2C Transmit */ -#define LPC17_OTGI2C_STS_OFFSET 0x0304 /* I2C Status */ -#define LPC17_OTGI2C_CTL_OFFSET 0x0308 /* I2C Control */ -#define LPC17_OTGI2C_CLKHI_OFFSET 0x030c /* I2C Clock High */ -#define LPC17_OTGI2C_CLKLO_OFFSET 0x0310 /* I2C Clock Low */ - -/* Clock control registers ***********************************************************/ - -#define LPC17_USBOTG_CLKCTRL_OFFSET 0x0ff4 /* OTG clock controller */ -#define LPC17_USBOTG_CLKST_OFFSET 0x0ff8 /* OTG clock status */ - -#define LPC17_USBDEV_CLKCTRL_OFFSET 0x0ff4 /* USB Clock Control */ -#define LPC17_USBDEV_CLKST_OFFSET 0x0ff8 /* USB Clock Status */ - -/* Register addresses ***************************************************************/ -/* USB Host Controller (OHCI) *******************************************************/ -/* Control and status registers (section 7.1) */ - -#define LPC17_USBHOST_HCIREV (LPC17_USB_BASE+OHCI_HCIREV_OFFSET) -#define LPC17_USBHOST_CTRL (LPC17_USB_BASE+OHCI_CTRL_OFFSET) -#define LPC17_USBHOST_CMDST (LPC17_USB_BASE+OHCI_CMDST_OFFSET) -#define LPC17_USBHOST_INTST (LPC17_USB_BASE+OHCI_INTST_OFFSET) -#define LPC17_USBHOST_INTEN (LPC17_USB_BASE+OHCI_INTEN_OFFSET) -#define LPC17_USBHOST_INTDIS (LPC17_USB_BASE+OHCI_INTDIS_OFFSET) - -/* Memory pointers (section 7.2) */ - -#define LPC17_USBHOST_HCCA (LPC17_USB_BASE+OHCI_HCCA_OFFSET) -#define LPC17_USBHOST_PERED (LPC17_USB_BASE+OHCI_PERED_OFFSET) -#define LPC17_USBHOST_CTRLHEADED (LPC17_USB_BASE+OHCI_CTRLHEADED_OFFSET) -#define LPC17_USBHOST_CTRLED (LPC17_USB_BASE+OHCI_CTRLED_OFFSET) -#define LPC17_USBHOST_BULKHEADED (LPC17_USB_BASE+OHCI_BULKHEADED_OFFSET) -#define LPC17_USBHOST_BULKED (LPC17_USB_BASE+OHCI_BULKED_OFFSET) -#define LPC17_USBHOST_DONEHEAD (LPC17_USB_BASE+OHCI_DONEHEAD_OFFSET) - -/* Frame counters (section 7.3) */ - -#define LPC17_USBHOST_FMINT (LPC17_USB_BASE+OHCI_FMINT_OFFSET) -#define LPC17_USBHOST_FMREM (LPC17_USB_BASE+OHCI_FMREM_OFFSET) -#define LPC17_USBHOST_FMNO (LPC17_USB_BASE+OHCI_FMNO_OFFSET) -#define LPC17_USBHOST_PERSTART (LPC17_USB_BASE+OHCI_PERSTART_OFFSET) - -/* Root hub ports (section 7.4) */ - -#define LPC17_USBHOST_LSTHRES (LPC17_USB_BASE+OHCI_LSTHRES_OFFSET) -#define LPC17_USBHOST_RHDESCA (LPC17_USB_BASE+OHCI_RHDESCA_OFFSET) -#define LPC17_USBHOST_RHDESCB (LPC17_USB_BASE+OHCI_RHDESCB_OFFSET) -#define LPC17_USBHOST_RHSTATUS (LPC17_USB_BASE+OHCI_RHSTATUS_OFFSET) -#define LPC17_USBHOST_RHPORTST1 (LPC17_USB_BASE+OHCI_RHPORTST1_OFFSET) -#define LPC17_USBHOST_RHPORTST2 (LPC17_USB_BASE+OHCI_RHPORTST2_OFFSET) -#define LPC17_USBHOST_MODID (LPC17_USB_BASE+LPC17_USBHOST_MODID_OFFSET) - -/* USB OTG Controller ***************************************************************/ -/* OTG registers */ - -#define LPC17_USBOTG_INTST (LPC17_USB_BASE+LPC17_USBOTG_INTST_OFFSET) -#define LPC17_USBOTG_INTEN (LPC17_USB_BASE+LPC17_USBOTG_INTEN_OFFSET) -#define LPC17_USBOTG_INTSET (LPC17_USB_BASE+LPC17_USBOTG_INTSET_OFFSET) -#define LPC17_USBOTG_INTCLR (LPC17_USB_BASE+LPC17_USBOTG_INTCLR_OFFSET) -#define LPC17_USBOTG_STCTRL (LPC17_USB_BASE+LPC17_USBOTG_STCTRL_OFFSET) -#define LPC17_USBOTG_TMR (LPC17_USB_BASE+LPC17_USBOTG_TMR_OFFSET) - -/* USB Device Controller ************************************************************/ -/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ - -#define LPC17_USBDEV_INTST (LPC17_USB_BASE+LPC17_USBDEV_INTST_OFFSET) -#define LPC17_USBDEV_INTEN (LPC17_USB_BASE+LPC17_USBDEV_INTEN_OFFSET) -#define LPC17_USBDEV_INTCLR (LPC17_USB_BASE+LPC17_USBDEV_INTCLR_OFFSET) -#define LPC17_USBDEV_INTSET (LPC17_USB_BASE+LPC17_USBDEV_INTSET_OFFSET) - -/* SIE Command registers */ - -#define LPC17_USBDEV_CMDCODE (LPC17_USB_BASE+LPC17_USBDEV_CMDCODE_OFFSET) -#define LPC17_USBDEV_CMDDATA (LPC17_USB_BASE+LPC17_USBDEV_CMDDATA_OFFSET) - -/* USB transfer registers */ - -#define LPC17_USBDEV_RXDATA (LPC17_USB_BASE+LPC17_USBDEV_RXDATA_OFFSET) -#define LPC17_USBDEV_RXPLEN (LPC17_USB_BASE+LPC17_USBDEV_RXPLEN_OFFSET) -#define LPC17_USBDEV_TXDATA (LPC17_USB_BASE+LPC17_USBDEV_TXDATA_OFFSET) -#define LPC17_USBDEV_TXPLEN (LPC17_USB_BASE+LPC17_USBDEV_TXPLEN_OFFSET) -#define LPC17_USBDEV_CTRL (LPC17_USB_BASE+LPC17_USBDEV_CTRL_OFFSET) - -/* More Device interrupt registers */ - -#define LPC17_USBDEV_INTPRI (LPC17_USB_BASE+LPC17_USBDEV_INTPRI_OFFSET) - -/* Endpoint interrupt registers */ - -#define LPC17_USBDEV_EPINTST (LPC17_USB_BASE+LPC17_USBDEV_EPINTST_OFFSET) -#define LPC17_USBDEV_EPINTEN (LPC17_USB_BASE+LPC17_USBDEV_EPINTEN_OFFSET) -#define LPC17_USBDEV_EPINTCLR (LPC17_USB_BASE+LPC17_USBDEV_EPINTCLR_OFFSET) -#define LPC17_USBDEV_EPINTSET (LPC17_USB_BASE+LPC17_USBDEV_EPINTSET_OFFSET) -#define LPC17_USBDEV_EPINTPRI (LPC17_USB_BASE+LPC17_USBDEV_EPINTPRI_OFFSET) - -/* Endpoint realization registers */ - -#define LPC17_USBDEV_REEP (LPC17_USB_BASE+LPC17_USBDEV_REEP_OFFSET) -#define LPC17_USBDEV_EPIND (LPC17_USB_BASE+LPC17_USBDEV_EPIND_OFFSET) -#define LPC17_USBDEV_MAXPSIZE (LPC17_USB_BASE+LPC17_USBDEV_MAXPSIZE_OFFSET) - -/* DMA registers */ - -#define LPC17_USBDEV_DMARST (LPC17_USB_BASE+LPC17_USBDEV_DMARST_OFFSET) -#define LPC17_USBDEV_DMARCLR (LPC17_USB_BASE+LPC17_USBDEV_DMARCLR_OFFSET) -#define LPC17_USBDEV_DMARSET (LPC17_USB_BASE+LPC17_USBDEV_DMARSET_OFFSET) -#define LPC17_USBDEV_UDCAH (LPC17_USB_BASE+LPC17_USBDEV_UDCAH_OFFSET) -#define LPC17_USBDEV_EPDMAST (LPC17_USB_BASE+LPC17_USBDEV_EPDMAST_OFFSET) -#define LPC17_USBDEV_EPDMAEN (LPC17_USB_BASE+LPC17_USBDEV_EPDMAEN_OFFSET) -#define LPC17_USBDEV_EPDMADIS (LPC17_USB_BASE+LPC17_USBDEV_EPDMADIS_OFFSET) -#define LPC17_USBDEV_DMAINTST (LPC17_USB_BASE+LPC17_USBDEV_DMAINTST_OFFSET) -#define LPC17_USBDEV_DMAINTEN (LPC17_USB_BASE+LPC17_USBDEV_DMAINTEN_OFFSET) -#define LPC17_USBDEV_EOTINTST (LPC17_USB_BASE+LPC17_USBDEV_EOTINTST_OFFSET) -#define LPC17_USBDEV_EOTINTCLR (LPC17_USB_BASE+LPC17_USBDEV_EOTINTCLR_OFFSET) -#define LPC17_USBDEV_EOTINTSET (LPC17_USB_BASE+LPC17_USBDEV_EOTINTSET_OFFSET) -#define LPC17_USBDEV_NDDRINTST (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTST_OFFSET) -#define LPC17_USBDEV_NDDRINTCLR (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTCLR_OFFSET) -#define LPC17_USBDEV_NDDRINTSET (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTSET_OFFSET) -#define LPC17_USBDEV_SYSERRINTST (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTST_OFFSET) -#define LPC17_USBDEV_SYSERRINTCLR (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTCLR_OFFSET) -#define LPC17_USBDEV_SYSERRINTSET (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTSET_OFFSET) - -/* OTG I2C registers ****************************************************************/ - -#define LPC17_OTGI2C_RX (LPC17_USB_BASE+LPC17_OTGI2C_RX_OFFSET) -#define LPC17_OTGI2C_TX (LPC17_USB_BASE+LPC17_OTGI2C_TX_OFFSET) -#define LPC17_OTGI2C_STS (LPC17_USB_BASE+LPC17_OTGI2C_STS_OFFSET) -#define LPC17_OTGI2C_CTL (LPC17_USB_BASE+LPC17_OTGI2C_CTL_OFFSET) -#define LPC17_OTGI2C_CLKHI (LPC17_USB_BASE+LPC17_OTGI2C_CLKHI_OFFSET) -#define LPC17_OTGI2C_CLKLO (LPC17_USB_BASE+LPC17_OTGI2C_CLKLO_OFFSET) - -/* Clock control registers ***********************************************************/ - -#define LPC17_USBOTG_CLKCTRL (LPC17_USB_BASE+LPC17_USBOTG_CLKCTRL_OFFSET) -#define LPC17_USBOTG_CLKST (LPC17_USB_BASE+LPC17_USBOTG_CLKST_OFFSET) - -#define LPC17_USBDEV_CLKCTRL (LPC17_USB_BASE+LPC17_USBDEV_CLKCTRL_OFFSET) -#define LPC17_USBDEV_CLKST (LPC17_USB_BASE+LPC17_USBDEV_CLKST_OFFSET) - -/* Register bit definitions *********************************************************/ -/* USB Host Controller (OHCI) *******************************************************/ -/* See include/nuttx/usb/ohci.h */ - -/* Module ID/Revision ID */ - -#define USBHOST_MODID_VER_SHIFT (0) /* Bits 0-7: Unique version number */ -#define USBHOST_MODID_VER_MASK (0xff << USBHOST_MODID_VER_SHIFT) -#define USBHOST_MODID_REV_SHIFT (8) /* Bits 9-15: Unique revision number */ -#define USBHOST_MODID_REV_MASK (0xff << USBHOST_MODID_REV_SHIFT) -#define USBHOST_MODID_3505_SHIFT (16) /* Bits 16-31: 0x3505 */ -#define USBHOST_MODID_3505_MASK (0xffff << USBHOST_MODID_3505_SHIFT) -# define USBHOST_MODID_3505 (0x3505 << USBHOST_MODID_3505_SHIFT) - -/* USB OTG Controller ***************************************************************/ -/* OTG registers: - * - * OTG Interrupt Status, OTG Interrupt Enable, OTG Interrupt Set, AND OTG Interrupt - * Clear - */ - -#define USBOTG_INT_TMR (1 << 0) /* Bit 0: Timer time-out */ -#define USBOTG_INT_REMOVE_PU (1 << 1) /* Bit 1: Remove pull-up */ -#define USBOTG_INT_HNP_FAILURE (1 << 2) /* Bit 2: HNP failed */ -#define USBOTG_INT_HNP_SUCCESS (1 << 3) /* Bit 3: HNP succeeded */ - /* Bits 4-31: Reserved */ -/* OTG Status and Control */ - -#define USBOTG_STCTRL_PORTFUNC_SHIFT (0) /* Bits 0-1: Controls port function */ -#define USBOTG_STCTRL_PORTFUNC_MASK (3 << USBOTG_STCTRL_PORTFUNC_SHIFT) -# define USBOTG_STCTRL_PORTFUNC_HNPOK (1 << USBOTG_STCTRL_PORTFUNC_SHIFT) /* HNP suceeded */ -#define USBOTG_STCTRL_TMRSCALE_SHIFT (2) /* Bits 2-3: Timer scale selection */ -#define USBOTG_STCTRL_TMRSCALE_MASK (3 << USBOTG_STCTRL_TMR_SCALE_SHIFT) -# define USBOTG_STCTRL_TMRSCALE_10US (0 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 10uS (100 KHz) */ -# define USBOTG_STCTRL_TMRSCALE_100US (1 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 100uS (10 KHz) */ -# define USBOTG_STCTRL_TMRSCALE_1000US (2 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 1000uS (1 KHz) */ -#define USBOTG_STCTRL_TMRMODE (1 << 4) /* Bit 4: Timer mode selection */ -#define USBOTG_STCTRL_TMREN (1 << 5) /* Bit 5: Timer enable */ -#define USBOTG_STCTRL_TMRRST (1 << 6) /* Bit 6: TTimer reset */ - /* Bit 7: Reserved */ -#define USBOTG_STCTRL_BHNPTRACK (1 << 8) /* Bit 8: Enable HNP tracking for B-device (peripheral) */ -#define USBOTG_STCTRL_AHNPTRACK (1 << 9) /* Bit 9: Enable HNP tracking for A-device (host) */ -#define USBOTG_STCTRL_PUREMOVED (1 << 10) /* Bit 10: Set when D+ pull-up removed */ - /* Bits 11-15: Reserved */ -#define USBOTG_STCTRL_TMRCNT_SHIFT (0) /* Bits 16-313: Timer scale selection */ -#define USBOTG_STCTRL_TMRCNT_MASK (0ffff << USBOTG_STCTRL_TMR_CNT_SHIFT) - -/* OTG Timer */ - -#define USBOTG_TMR_TIMEOUTCNT_SHIFT (0) /* Bits 0-15: Interrupt when CNT matches this */ -#define USBOTG_TMR_TIMEOUTCNT_MASK (0xffff << USBOTG_TMR_TIMEOUTCNT_SHIFT) - /* Bits 16-31: Reserved */ - -/* USB Device Controller ************************************************************/ -/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ -/* USB Device Interrupt Status, USB Device Interrupt Enable, USB Device Interrupt - * Clear, USB Device Interrupt Set, and USB Device Interrupt Priority - */ - -#define USBDEV_INT_FRAME (1 << 0) /* Bit 0: frame interrupt (every 1 ms) */ -#define USBDEV_INT_EPFAST (1 << 1) /* Bit 1: Fast endpoint interrupt */ -#define USBDEV_INT_EPSLOW (1 << 2) /* Bit 2: Slow endpoints interrupt */ -#define USBDEV_INT_DEVSTAT (1 << 3) /* Bit 3: Bus reset, suspend change or connect change */ -#define USBDEV_INT_CCEMPTY (1 << 4) /* Bit 4: Command code register empty */ -#define USBDEV_INT_CDFULL (1 << 5) /* Bit 5: Command data register full */ -#define USBDEV_INT_RXENDPKT (1 << 6) /* Bit 6: RX endpoint data transferred */ -#define USBDEV_INT_TXENDPKT (1 << 7) /* Bit 7: TX endpoint data tansferred */ -#define USBDEV_INT_EPRLZED (1 << 8) /* Bit 8: Endpoints realized */ -#define USBDEV_INT_ERRINT (1 << 9) /* Bit 9: Error Interrupt */ - /* Bits 10-31: Reserved */ -/* SIE Command registers: - * - * USB Command Code - */ - /* Bits 0-7: Reserved */ -#define USBDEV_CMDCODE_PHASE_SHIFT (8) /* Bits 8-15: Command phase */ -#define USBDEV_CMDCODE_PHASE_MASK (0xff << USBDEV_CMDCODE_PHASE_SHIFT) -# define USBDEV_CMDCODE_PHASE_READ (1 << USBDEV_CMDCODE_PHASE_SHIFT) -# define USBDEV_CMDCODE_PHASE_WRITE (2 << USBDEV_CMDCODE_PHASE_SHIFT) -# define USBDEV_CMDCODE_PHASE_COMMAND (5 << USBDEV_CMDCODE_PHASE_SHIFT) -#define USBDEV_CMDCODE_CMD_SHIFT (16) /* Bits 15-23: Command (READ/COMMAND phases) */ -#define USBDEV_CMDCODE_CMD_MASK (0xff << USBDEV_CMDCODE_CMD_SHIFT) -#define USBDEV_CMDCODE_WDATA_SHIFT (16) /* Bits 15-23: Write dagta (WRITE phase) */ -#define USBDEV_CMDCODE_WDATA_MASK (0xff << USBDEV_CMDCODE_CMD_SHIFT) - /* Bits 24-31: Reserved */ -/* USB Command Data */ - -#define USBDEV_CMDDATA_SHIFT (0) /* Bits 0-7: Command read data */ -#define USBDEV_CMDDATA_MASK (0xff << USBDEV_CMDDATA_SHIFT) - /* Bits 8-31: Reserved */ -/* USB transfer registers: - * - * USB Receive Data (Bits 0-31: Received data) - */ - -/* USB Receive Packet Length */ - -#define USBDEV_RXPLEN_SHIFT (0) /* Bits 0-9: Bytes remaining to be read */ -#define USBDEV_RXPLEN_MASK (0x3ff << USBDEV_RXPLEN_SHIFT) -#define USBDEV_RXPLEN_DV (1 << 10) /* Bit 10: DV Data valid */ -#define USBDEV_RXPLEN_PKTRDY (1 << 11) /* Bit 11: Packet ready for reading */ - /* Bits 12-31: Reserved */ -/* USB Transmit Data (Bits 0-31: Transmit data) */ - -/* USB Transmit Packet Length */ - -#define USBDEV_TXPLEN_SHIFT (0) /* Bits 0-9: Bytes remaining to be written */ -#define USBDEV_TXPLEN_MASK (0x3ff << USBDEV_TXPLEN_SHIFT) - /* Bits 10-31: Reserved */ -/* USB Control */ - -#define USBDEV_CTRL_RDEN (1 << 0) /* Bit 0: Read mode control */ -#define USBDEV_CTRL_WREN (1 << 1) /* Bit 1: Write mode control */ -#define USBDEV_CTRL_LOGEP_SHIFT (2) /* Bits 2-5: Logical Endpoint number */ -#define USBDEV_CTRL_LOGEP_MASK (15 << USBDEV_CTRL_LOGEP_SHIFT) - /* Bits 6-31: Reserved */ -/* Endpoint interrupt registers: - * - * USB Endpoint Interrupt Status, USB Endpoint Interrupt Enable, USB Endpoint Interrupt - * Clear, USB Endpoint Interrupt Set, and USB Endpoint Priority. Bits correspond - * to on RX or TX value for any of 15 logical endpoints). - */ - -#define USBDEV_LOGEPRX(n) (1 << ((n) << 1)) -#define USBDEV_LOGEPTX(n) ((1 << ((n) << 1)) + 1) -#define USBDEV_LOGEPRX0 (1 << 0) -#define USBDEV_LOGEPTX0 (1 << 1) -#define USBDEV_LOGEPRX1 (1 << 2) -#define USBDEV_LOGEPTX1 (1 << 3) -#define USBDEV_LOGEPRX2 (1 << 4) -#define USBDEV_LOGEPTX2 (1 << 5) -#define USBDEV_LOGEPRX3 (1 << 6) -#define USBDEV_LOGEPTX3 (1 << 7) -#define USBDEV_LOGEPRX4 (1 << 8) -#define USBDEV_LOGEPTX4 (1 << 9) -#define USBDEV_LOGEPRX5 (1 << 10) -#define USBDEV_LOGEPTX5 (1 << 11) -#define USBDEV_LOGEPRX6 (1 << 12) -#define USBDEV_LOGEPTX6 (1 << 13) -#define USBDEV_LOGEPRX7 (1 << 14) -#define USBDEV_LOGEPTX7 (1 << 15) -#define USBDEV_LOGEPRX8 (1 << 16) -#define USBDEV_LOGEPTX8 (1 << 17) -#define USBDEV_LOGEPRX9 (1 << 18) -#define USBDEV_LOGEPTX9 (1 << 19) -#define USBDEV_LOGEPRX10 (1 << 20) -#define USBDEV_LOGEPTX10 (1 << 21) -#define USBDEV_LOGEPRX11 (1 << 22) -#define USBDEV_LOGEPTX11 (1 << 23) -#define USBDEV_LOGEPRX12 (1 << 24) -#define USBDEV_LOGEPTX12 (1 << 25) -#define USBDEV_LOGEPRX13 (1 << 26) -#define USBDEV_LOGEPTX13 (1 << 27) -#define USBDEV_LOGEPRX14 (1 << 28) -#define USBDEV_LOGEPTX14 (1 << 29) -#define USBDEV_LOGEPRX15 (1 << 30) -#define USBDEV_LOGEPTX15 (1 << 31) - -/* Endpoint realization registers: - * - * USB Realize Endpoint (Bits correspond to 1 of 32 physical endpoints) - */ - -#define USBDEV_PHYEP(n) (1 << (n)) -#define USBDEV_PHYEP0 (1 << 0) -#define USBDEV_PHYEP1 (1 << 1) -#define USBDEV_PHYEP2 (1 << 2) -#define USBDEV_PHYEP3 (1 << 3) -#define USBDEV_PHYEP4 (1 << 4) -#define USBDEV_PHYEP5 (1 << 5) -#define USBDEV_PHYEP6 (1 << 6) -#define USBDEV_PHYEP7 (1 << 7) -#define USBDEV_PHYEP8 (1 << 8) -#define USBDEV_PHYEP9 (1 << 9) -#define USBDEV_PHYEP10 (1 << 10) -#define USBDEV_PHYEP11 (1 << 11) -#define USBDEV_PHYEP12 (1 << 12) -#define USBDEV_PHYEP13 (1 << 13) -#define USBDEV_PHYEP14 (1 << 14) -#define USBDEV_PHYEP15 (1 << 15) -#define USBDEV_PHYEP16 (1 << 16) -#define USBDEV_PHYEP17 (1 << 17) -#define USBDEV_PHYEP18 (1 << 18) -#define USBDEV_PHYEP19 (1 << 19) -#define USBDEV_PHYEP20 (1 << 20) -#define USBDEV_PHYEP21 (1 << 21) -#define USBDEV_PHYEP22 (1 << 22) -#define USBDEV_PHYEP23 (1 << 23) -#define USBDEV_PHYEP24 (1 << 24) -#define USBDEV_PHYEP25 (1 << 25) -#define USBDEV_PHYEP26 (1 << 26) -#define USBDEV_PHYEP27 (1 << 27) -#define USBDEV_PHYEP28 (1 << 28) -#define USBDEV_PHYEP29 (1 << 29) -#define USBDEV_PHYEP30 (1 << 30) -#define USBDEV_PHYEP31 (1 << 31) - -/* USB Endpoint Index */ - -#define USBDEV_EPIND_SHIFT (0) /* Bits 0-4: Physical endpoint number (0-31) */ -#define USBDEV_EPIND_MASK (31 << USBDEV_EPIND_SHIFT) - /* Bits 5-31: Reserved */ -/* USB MaxPacketSize */ - -#define USBDEV_MAXPSIZE_SHIFT (0) /* Bits 0-9: Maximum packet size value */ -#define USBDEV_MAXPSIZE_MASK (0x3ff << USBDEV_MAXPSIZE_SHIFT) - /* Bits 10-31: Reserved */ -/* DMA registers: - * - * USB DMA Request Status, USB DMA Request Clear, and USB DMA Request Set. Registers - * contain bits for each of 32 physical endpoints. Use the USBDEV_PHYEP* definitions - * above. PHYEP0-1 (bits 0-1) must be zero. - */ - -/* USB UDCA Head */ - /* Bits 0-6: Reserved */ -#define USBDEV_UDCAH_SHIFT (7) /* Bits 7-31: UDCA start address */ -#define USBDEV_UDCAH_MASK (0x01ffffff << USBDEV_UDCAH_SHIFT) - -/* USB Endpoint DMA Status, USB Endpoint DMA Enable, and USB Endpoint DMA Disable. - * Registers contain bits for physical endpoints 2-31. Use the USBDEV_PHYEP* - * definitions above. PHYEP0-1 (bits 0-1) must be zero. - */ - -/* USB DMA Interrupt Status and USB DMA Interrupt Enable */ - -#define USBDEV_DMAINT_EOT (1 << 0) /* Bit 0: End of Transfer Interrupt */ -#define USBDEV_DMAINT_NDDR (1 << 1) /* Bit 1: New DD Request Interrupt */ -#define USBDEV_DMAINT_ERR (1 << 2) /* Bit 2: System Error Interrupt */ - /* Bits 3-31: Reserved */ -/* USB End of Transfer Interrupt Status, USB End of Transfer Interrupt Clear, and USB - * End of Transfer Interrupt Set. Registers contain bits for physical endpoints 2-31. - * Use the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. - */ - -/* USB New DD Request Interrupt Status, USB New DD Request Interrupt Clear, and USB - * New DD Request Interrupt Set. Registers contain bits for physical endpoints 2-31. - * Use the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. - */ - -/* USB System Error Interrupt Status, USB System Error Interrupt Clear, USB System - * Error Interrupt Set. Registers contain bits for physical endpoints 2-31. Use - * the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. - */ - -/* OTG I2C registers ****************************************************************/ - -/* I2C Receive */ - -#define OTGI2C_RX_DATA_SHIFT (0) /* Bits 0-7: RX data */ -#define OTGI2C_RX_DATA_MASK (0xff << OTGI2C_RX_SHIFT) - /* Bits 8-31: Reserved */ -/* I2C Transmit */ - -#define OTGI2C_TX_DATA_SHIFT (0) /* Bits 0-7: TX data */ -#define OTGI2C_TX_DATA_MASK (0xff << OTGI2C_TX_DATA_SHIFT) -#define OTGI2C_TX_DATA_START (1 << 8) /* Bit 8: Issue START before transmit */ -#define OTGI2C_TX_DATA_STOP (1 << 9) /* Bit 9: Issue STOP before transmit */ - /* Bits 3-31: Reserved */ -/* I2C Status */ - -#define OTGI2C_STS_TDI (1 << 0) /* Bit 0: Transaction Done Interrupt */ -#define OTGI2C_STS_AFI (1 << 1) /* Bit 1: Arbitration Failure Interrupt */ -#define OTGI2C_STS_NAI (1 << 2) /* Bit 2: No Acknowledge Interrupt */ -#define OTGI2C_STS_DRMI (1 << 3) /* Bit 3: Master Data Request Interrupt */ -#define OTGI2C_STS_DRSI (1 << 4) /* Bit 4: Slave Data Request Interrupt */ -#define OTGI2C_STS_ACTIVE (1 << 5) /* Bit 5: Indicates whether the bus is busy */ -#define OTGI2C_STS_SCL (1 << 6) /* Bit 6: The current value of the SCL signal */ -#define OTGI2C_STS_SDA (1 << 7) /* Bit 7: The current value of the SDA signal */ -#define OTGI2C_STS_RFF (1 << 8) /* Bit 8: Receive FIFO Full (RFF) */ -#define OTGI2C_STS_RFE (1 << 9) /* Bit 9: Receive FIFO Empty */ -#define OTGI2C_STS_TFF (1 << 10) /* Bit 10: Transmit FIFO Full */ -#define OTGI2C_STS_TFE (1 << 11) /* Bit 11: Transmit FIFO Empty */ - /* Bits 12-31: Reserved */ -/* I2C Control */ - -#define OTGI2C_CTL_TDIE (1 << 0) /* Bit 0: Transmit Done Interrupt Enable */ -#define OTGI2C_CTL_AFIE (1 << 1) /* Bit 1: Transmitter Arbitration Failure Interrupt Enable */ -#define OTGI2C_CTL_NAIE (1 << 2) /* Bit 2: Transmitter No Acknowledge Interrupt Enable */ -#define OTGI2C_CTL_DRMIE (1 << 3) /* Bit 3: Master Transmitter Data Request Interrupt Enable */ -#define OTGI2C_CTL_DRSIE (1 << 4) /* Bit 4: Slave Transmitter Data Request Interrupt Enable */ -#define OTGI2C_CTL_REFIE (1 << 5) /* Bit 5: Receive FIFO Full Interrupt Enable */ -#define OTGI2C_CTL_RFDAIE (1 << 6) /* Bit 6: Receive Data Available Interrupt Enable */ -#define OTGI2C_CTL_TFFIE (1 << 7) /* Bit 7: Transmit FIFO Not Full Interrupt Enable */ -#define OTGI2C_CTL_SRST (1 << 8) /* Bit 8: Soft reset */ - /* Bits 9-31: Reserved */ -/* I2C Clock High */ - -#define OTGI2C_CLKHI_SHIFT (0) /* Bits 0-7: Clock divisor high */ -#define OTGI2C_CLKHI_MASK (0xff << OTGI2C_CLKHI_SHIFT) - /* Bits 8-31: Reserved */ -/* I2C Clock Low */ - -#define OTGI2C_CLKLO_SHIFT (0) /* Bits 0-7: Clock divisor high */ -#define OTGI2C_CLLO_MASK (0xff << OTGI2C_CLKLO_SHIFT) - /* Bits 8-31: Reserved */ -/* Clock control registers ***********************************************************/ - -/* USB Clock Control (OTG clock controller) and USB Clock Status (OTG clock status) */ - -#define USBDEV_CLK_HOSTCLK (1 << 0) /* Bit 1: Host clock (OTG only) */ -#define USBDEV_CLK_DEVCLK (1 << 1) /* Bit 1: Device clock */ -#define USBDEV_CLK_I2CCLK (1 << 2) /* Bit 2: I2C clock (OTG only) */ -#define USBDEV_CLK_PORTSELCLK (1 << 3) /* Bit 3: Port select register clock (device only) */ -#define USBDEV_CLK_OTGCLK (1 << 3) /* Bit 3: OTG clock (OTG only) */ -#define USBDEV_CLK_AHBCLK (1 << 4) /* Bit 4: AHB clock */ - /* Bits 5-31: Reserved */ -/* Alternate naming */ - -#define USBOTG_CLK_HOSTCLK USBDEV_CLK_HOSTCLK -#define USBOTG_CLK_DEVCLK USBDEV_CLK_DEVCLK -#define USBOTG_CLK_I2CCLK USBDEV_CLK_I2CCLK -#define USBOTG_CLK_PORTSELCLK USBDEV_CLK_PORTSELCLK -#define USBOTG_CLK_OTGCLK USBDEV_CLK_OTGCLK -#define USBOTG_CLK_AHBCLK USBDEV_CLK_AHBCLK - -/* Endpoints *************************************************************************/ - -#define LPC17_EP0_OUT 0 -#define LPC17_EP0_IN 1 -#define LPC17_CTRLEP_OUT LPC17_EP0_OUT -#define LPC17_CTRLEP_IN LPC17_EP0_IN -#define LPC17_EP1_OUT 2 -#define LPC17_EP1_IN 3 -#define LPC17_EP2_OUT 4 -#define LPC17_EP2_IN 5 -#define LPC17_EP3_OUT 6 -#define LPC17_EP3_IN 7 -#define LPC17_EP4_OUT 8 -#define LPC17_EP4_IN 9 -#define LPC17_EP5_OUT 10 -#define LPC17_EP5_IN 11 -#define LPC17_EP6_OUT 12 -#define LPC17_EP6_IN 13 -#define LPC17_EP7_OUT 14 -#define LPC17_EP7_IN 15 -#define LPC17_EP8_OUT 16 -#define LPC17_EP8_IN 17 -#define LPC17_EP9_OUT 18 -#define LPC17_EP9_IN 19 -#define LPC17_EP10_OUT 20 -#define LPC17_EP10_IN 21 -#define LPC17_EP11_OUT 22 -#define LPC17_EP11_IN 23 -#define LPC17_EP12_OUT 24 -#define LPC17_EP12_IN 25 -#define LPC17_EP13_OUT 26 -#define LPC17_EP13_IN 27 -#define LPC17_EP14_OUT 28 -#define LPC17_EP14_IN 29 -#define LPC17_EP15_OUT 30 -#define LPC17_EP15_IN 31 -#define LPC17_NUMEPS 32 - -/* Commands *************************************************************************/ - -/* USB Command Code Register */ - -#define CMD_USBDEV_PHASESHIFT (8) /* Bits 8-15: Command phase value */ -#define CMD_USBDEV_PHASEMASK (0xff << CMD_USBDEV_PHASESHIFT) -# define CMD_USBDEV_DATAWR (1 << CMD_USBDEV_PHASESHIFT) -# define CMD_USBDEV_DATARD (2 << CMD_USBDEV_PHASESHIFT) -# define CMD_USBDEV_CMDWR (5 << CMD_USBDEV_PHASESHIFT) -#define CMD_USBDEV_CMDSHIFT (16) /* Bits 16-23: Device command/WDATA */ -#define CMD_USBDEV_CMDMASK (0xff << CMD_USBDEV_CMDSHIFT) -#define CMD_USBDEV_WDATASHIFT CMD_USBDEV_CMDSHIFT -#define CMD_USBDEV_WDATAMASK CMD_USBDEV_CMDMASK - -/* Device Commands */ - -#define CMD_USBDEV_SETADDRESS (0x00d0) -#define CMD_USBDEV_CONFIG (0x00d8) -#define CMD_USBDEV_SETMODE (0x00f3) -#define CMD_USBDEV_READFRAMENO (0x00f5) -#define CMD_USBDEV_READTESTREG (0x00fd) -#define CMD_USBDEV_SETSTATUS (0x01fe) /* Bit 8 set to distingish get from set */ -#define CMD_USBDEV_GETSTATUS (0x00fe) -#define CMD_USBDEV_GETERRORCODE (0x00ff) -#define CMD_USBDEV_READERRORSTATUS (0x00fb) - -/* Endpoint Commands */ - -#define CMD_USBDEV_EPSELECT (0x0000) -#define CMD_USBDEV_EPSELECTCLEAR (0x0040) -#define CMD_USBDEV_EPSETSTATUS (0x0140) /* Bit 8 set to distingish get from selectclear */ -#define CMD_USBDEV_EPCLRBUFFER (0x00f2) -#define CMD_USBDEV_EPVALIDATEBUFFER (0x00fa) - -/* Command/response bit definitions ********************************************/ -/* SETADDRESS (0xd0) command definitions */ - -#define CMD_USBDEV_SETADDRESS_MASK (0x7f) /* Bits 0-6: Device address */ -#define CMD_USBDEV_SETADDRESS_DEVEN (1 << 7) /* Bit 7: Device enable */ - -/* SETSTATUS (0xfe) and GETSTATUS (0xfe) response: */ - -#define CMD_STATUS_CONNECT (1 << 0) /* Bit 0: Connected */ -#define CMD_STATUS_CONNCHG (1 << 1) /* Bit 1: Connect change */ -#define CMD_STATUS_SUSPEND (1 << 2) /* Bit 2: Suspend */ -#define CMD_STATUS_SUSPCHG (1 << 3) /* Bit 3: Suspend change */ -#define CMD_STATUS_RESET (1 << 4) /* Bit 4: Bus reset bit */ - -/* EPSELECT (0x00) endpoint status response */ - -#define CMD_EPSELECT_FE (1 << 0) /* Bit 0: IN empty or OUT full */ -#define CMD_EPSELECT_ST (1 << 1) /* Bit 1: Endpoint is stalled */ -#define CMD_EPSELECT_STP (1 << 2) /* Bit 2: Last packet was setup */ -#define CMD_EPSELECT_PO (1 << 3) /* Bit 3: Previous packet was overwritten */ -#define CMD_EPSELECT_EPN (1 << 4) /* Bit 4: NAK sent */ -#define CMD_EPSELECT_B1FULL (1 << 5) /* Bit 5: Buffer 1 full */ -#define CMD_EPSELECT_B2FULL (1 << 6) /* Bit 6: Buffer 2 full */ - /* Bit 7: Reserved */ -/* EPSETSTATUS (0x40) command */ - -#define CMD_SETSTAUS_ST (1 << 0) /* Bit 0: Stalled endpoint bit */ - /* Bits 1-4: Reserved */ -#define CMD_SETSTAUS_DA (1 << 5) /* Bit 5: Disabled endpoint bit */ -#define CMD_SETSTAUS_RFMO (1 << 6) /* Bit 6: Rate feedback mode */ -#define CMD_SETSTAUS_CNDST (1 << 7) /* Bit 7: Conditional stall bit */ - -/* EPCLRBUFFER (0xf2) response */ - -#define CMD_USBDEV_CLRBUFFER_PO (0x00000001) - -/* SETMODE(0xf3) command */ - -#define CMD_SETMODE_APCLK (1 << 0) /* Bit 0: Always PLL Clock */ -#define CMD_SETMODE_INAKCI (1 << 1) /* Bit 1: Interrupt on NAK for Control IN endpoint */ -#define CMD_SETMODE_INAKCO (1 << 2) /* Bit 2: Interrupt on NAK for Control OUT endpoint */ -#define CMD_SETMODE_INAKII (1 << 3) /* Bit 3: Interrupt on NAK for Interrupt IN endpoint */ -#define CMD_SETMODE_INAKIO (1 << 4) /* Bit 4: Interrupt on NAK for Interrupt OUT endpoints */ -#define CMD_SETMODE_INAKBI (1 << 5) /* Bit 5: Interrupt on NAK for Bulk IN endpoints */ -#define CMD_SETMODE_INAKBO (1 << 6) /* Bit 6: Interrupt on NAK for Bulk OUT endpoints */ - -/* READERRORSTATUS (0xFb) command */ - -#define CMD_READERRORSTATUS_PIDERR (1 << 0) /* Bit 0: PID encoding/unknown or Token CRC */ -#define CMD_READERRORSTATUS_UEPKT (1 << 1) /* Bit 1: Unexpected Packet */ -#define CMD_READERRORSTATUS_DCRC (1 << 2) /* Bit 2: Data CRC error */ -#define CMD_READERRORSTATUS_TIMEOUT (1 << 3) /* Bit 3: Time out error */ -#define CMD_READERRORSTATUS_EOP (1 << 4) /* Bit 4: End of packet error */ -#define CMD_READERRORSTATUS_BOVRN (1 << 5) /* Bit 5: Buffer Overrun */ -#define CMD_READERRORSTATUS_BTSTF (1 << 6) /* Bit 6: Bit stuff error */ -#define CMD_READERRORSTATUS_TGLERR (1 << 7) /* Bit 7: Wrong toggle in data PID */ -#define CMD_READERRORSTATUS_ALLERRS (0xff) - -/* DMA ******************************************************************************/ -/* The DMA descriptor */ - -#define USB_DMADESC_NEXTDDPTR 0 /* Offset 0: Next USB descriptor in RAM */ -#define USB_DMADESC_CONFIG 1 /* Offset 1: DMA configuration info. */ -#define USB_DMADESC_STARTADDR 2 /* Offset 2: DMA start address */ -#define USB_DMADESC_STATUS 3 /* Offset 3: DMA status info (read only) */ -#define USB_DMADESC_ISOCSIZEADDR 4 /* Offset 4: Isoc. packet size address */ - -/* Bit settings for CONFIG (offset 1 )*/ - -#define USB_DMADESC_MODE_SHIFT (0) /* Bits 0-1: DMA mode */ -#define USB_DMADESC_MODE_MASK (3 << USB_DMADESC_MODE_SHIFT) -# define USB_DMADESC_MODENORMAL (0 << USB_DMADESC_MODE_SHIFT) /* Mode normal */ -# define USB_DMADESC_MODEATLE (1 << USB_DMADESC_MODE_SHIFT) /* ATLE normal */ -#define USB_DMADESC_NEXTDDVALID (1 << 2) /* Bit 2: Next descriptor valid */ - /* Bit 3: Reserved */ -#define USB_DMADESC_ISCOEP (1 << 4) /* Bit 4: ISOC endpoint */ -#define USB_DMADESC_PKTSIZE_SHIFT (5) /* Bits 5-15: Max packet size */ -#define USB_DMADESC_PKTSIZE_MASK (0x7ff << USB_DMADESC_PKTSIZE_SHIFT) -#define USB_DMADESC_BUFLEN_SHIFT (16) /* Bits 16-31: DMA buffer length */ -#define USB_DMADESC_BUFLEN_MASK (0xffff << USB_DMADESC_BUFLEN_SHIFT - -/* Bit settings for STATUS (offset 3). All must be initialized to zero. */ - -#define USB_DMADESC_STATUS_SHIFT (1) /* Bits 1-4: DMA status */ -#define USB_DMADESC_STATUS_MASK (15 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_NOTSERVICED (0 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_BEINGSERVICED (1 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_NORMALCOMPLETION (2 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_DATAUNDERRUN (3 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_DATAOVERRUN (8 << USB_DMADESC_STATUS_SHIFT) -# define USB_DMADESC_SYSTEMERROR (9 << USB_DMADESC_STATUS_SHIFT) -#define USB_DMADESC_PKTVALID (1 << 5) /* Bit 5: Packet valid */ -#define USB_DMADESC_LSBEXTRACTED (1 << 6) /* Bit 6: LS byte extracted */ -#define USB_DMADESC_MSBEXTRACTED (1 << 7) /* Bit 7: MS byte extracted */ -#define USB_DMADESC_MSGLENPOS_SHIFT (8) /* Bits 8-13: Message length position */ -#define USB_DMADESC_MSGLENPOS_MASK (0x3f << USB_DMADESC_MSGLENPOS_SHIFT) -#define USB_DMADESC_DMACOUNT_SHIFT (16) /* Bits 16-31: DMA count */ -#define USB_DMADESC_DMACOUNT_MASK (0xffff << USB_DMADESC_DMACOUNT_SHIFT) - -/* DMA packet size format */ - -#define USB_DMAPKTSIZE_PKTLEN_SHIFT (0) /* Bits 0-15: Packet length */ -#define USB_DMAPKTSIZE_PKTLEN_MASK (0xffff << USB_DMAPKTSIZE_PKTLEN_SHIFT) -#define USB_DMAPKTSIZE_PKTVALID (1 << 16) /* Bit 16: Packet valid */ -#define USB_DMAPKTSIZE_FRAMENO_SHIFT (17) /* Bit 17-31: Frame number */ -#define USB_DMAPKTSIZE_FRAMENO_MASK (0x7fff << USB_DMAPKTSIZE_FRAMENO_SHIFT) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_usb.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ +/* USB Host Controller (OHCI) *******************************************************/ +/* See include/nuttx/usb/ohci.h */ + +#define LPC17_USBHOST_MODID_OFFSET 0x00fc /* Module ID/Revision ID */ + +/* USB OTG Controller ***************************************************************/ +/* OTG registers */ + +#define LPC17_USBOTG_INTST_OFFSET 0x0100 /* OTG Interrupt Status */ +#define LPC17_USBOTG_INTEN_OFFSET 0x0104 /* OTG Interrupt Enable */ +#define LPC17_USBOTG_INTSET_OFFSET 0x0108 /* OTG Interrupt Set */ +#define LPC17_USBOTG_INTCLR_OFFSET 0x010c /* OTG Interrupt Clear */ +#define LPC17_USBOTG_STCTRL_OFFSET 0x0110 /* OTG Status and Control */ +#define LPC17_USBOTG_TMR_OFFSET 0x0114 /* OTG Timer */ + +/* USB Device Controller ************************************************************/ +/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ + +#define LPC17_USBDEV_INTST_OFFSET 0x0200 /* USB Device Interrupt Status */ +#define LPC17_USBDEV_INTEN_OFFSET 0x0204 /* USB Device Interrupt Enable */ +#define LPC17_USBDEV_INTCLR_OFFSET 0x0208 /* USB Device Interrupt Clear */ +#define LPC17_USBDEV_INTSET_OFFSET 0x020c /* USB Device Interrupt Set */ + +/* SIE Command registers */ + +#define LPC17_USBDEV_CMDCODE_OFFSET 0x0210 /* USB Command Code */ +#define LPC17_USBDEV_CMDDATA_OFFSET 0x0214 /* USB Command Data */ + +/* USB transfer registers */ + +#define LPC17_USBDEV_RXDATA_OFFSET 0x0218 /* USB Receive Data */ +#define LPC17_USBDEV_RXPLEN_OFFSET 0x0220 /* USB Receive Packet Length */ +#define LPC17_USBDEV_TXDATA_OFFSET 0x021c /* USB Transmit Data */ +#define LPC17_USBDEV_TXPLEN_OFFSET 0x0224 /* USB Transmit Packet Length */ +#define LPC17_USBDEV_CTRL_OFFSET 0x0228 /* USB Control */ + +/* More Device interrupt registers */ + +#define LPC17_USBDEV_INTPRI_OFFSET 0x022c /* USB Device Interrupt Priority */ + +/* Endpoint interrupt registers */ + +#define LPC17_USBDEV_EPINTST_OFFSET 0x0230 /* USB Endpoint Interrupt Status */ +#define LPC17_USBDEV_EPINTEN_OFFSET 0x0234 /* USB Endpoint Interrupt Enable */ +#define LPC17_USBDEV_EPINTCLR_OFFSET 0x0238 /* USB Endpoint Interrupt Clear */ +#define LPC17_USBDEV_EPINTSET_OFFSET 0x023c /* USB Endpoint Interrupt Set */ +#define LPC17_USBDEV_EPINTPRI_OFFSET 0x0240 /* USB Endpoint Priority */ + +/* Endpoint realization registers */ + +#define LPC17_USBDEV_REEP_OFFSET 0x0244 /* USB Realize Endpoint */ +#define LPC17_USBDEV_EPIND_OFFSET 0x0248 /* USB Endpoint Index */ +#define LPC17_USBDEV_MAXPSIZE_OFFSET 0x024c /* USB MaxPacketSize */ + +/* DMA registers */ + +#define LPC17_USBDEV_DMARST_OFFSET 0x0250 /* USB DMA Request Status */ +#define LPC17_USBDEV_DMARCLR_OFFSET 0x0254 /* USB DMA Request Clear */ +#define LPC17_USBDEV_DMARSET_OFFSET 0x0258 /* USB DMA Request Set */ +#define LPC17_USBDEV_UDCAH_OFFSET 0x0280 /* USB UDCA Head */ +#define LPC17_USBDEV_EPDMAST_OFFSET 0x0284 /* USB Endpoint DMA Status */ +#define LPC17_USBDEV_EPDMAEN_OFFSET 0x0288 /* USB Endpoint DMA Enable */ +#define LPC17_USBDEV_EPDMADIS_OFFSET 0x028c /* USB Endpoint DMA Disable */ +#define LPC17_USBDEV_DMAINTST_OFFSET 0x0290 /* USB DMA Interrupt Status */ +#define LPC17_USBDEV_DMAINTEN_OFFSET 0x0294 /* USB DMA Interrupt Enable */ +#define LPC17_USBDEV_EOTINTST_OFFSET 0x02a0 /* USB End of Transfer Interrupt Status */ +#define LPC17_USBDEV_EOTINTCLR_OFFSET 0x02a4 /* USB End of Transfer Interrupt Clear */ +#define LPC17_USBDEV_EOTINTSET_OFFSET 0x02a8 /* USB End of Transfer Interrupt Set */ +#define LPC17_USBDEV_NDDRINTST_OFFSET 0x02ac /* USB New DD Request Interrupt Status */ +#define LPC17_USBDEV_NDDRINTCLR_OFFSET 0x02b0 /* USB New DD Request Interrupt Clear */ +#define LPC17_USBDEV_NDDRINTSET_OFFSET 0x02b4 /* USB New DD Request Interrupt Set */ +#define LPC17_USBDEV_SYSERRINTST_OFFSET 0x02b8 /* USB System Error Interrupt Status */ +#define LPC17_USBDEV_SYSERRINTCLR_OFFSET 0x02bc /* USB System Error Interrupt Clear */ +#define LPC17_USBDEV_SYSERRINTSET_OFFSET 0x02c0 /* USB System Error Interrupt Set */ + +/* OTG I2C registers ****************************************************************/ + +#define LPC17_OTGI2C_RX_OFFSET 0x0300 /* I2C Receive */ +#define LPC17_OTGI2C_TX_OFFSET 0x0300 /* I2C Transmit */ +#define LPC17_OTGI2C_STS_OFFSET 0x0304 /* I2C Status */ +#define LPC17_OTGI2C_CTL_OFFSET 0x0308 /* I2C Control */ +#define LPC17_OTGI2C_CLKHI_OFFSET 0x030c /* I2C Clock High */ +#define LPC17_OTGI2C_CLKLO_OFFSET 0x0310 /* I2C Clock Low */ + +/* Clock control registers ***********************************************************/ + +#define LPC17_USBOTG_CLKCTRL_OFFSET 0x0ff4 /* OTG clock controller */ +#define LPC17_USBOTG_CLKST_OFFSET 0x0ff8 /* OTG clock status */ + +#define LPC17_USBDEV_CLKCTRL_OFFSET 0x0ff4 /* USB Clock Control */ +#define LPC17_USBDEV_CLKST_OFFSET 0x0ff8 /* USB Clock Status */ + +/* Register addresses ***************************************************************/ +/* USB Host Controller (OHCI) *******************************************************/ +/* Control and status registers (section 7.1) */ + +#define LPC17_USBHOST_HCIREV (LPC17_USB_BASE+OHCI_HCIREV_OFFSET) +#define LPC17_USBHOST_CTRL (LPC17_USB_BASE+OHCI_CTRL_OFFSET) +#define LPC17_USBHOST_CMDST (LPC17_USB_BASE+OHCI_CMDST_OFFSET) +#define LPC17_USBHOST_INTST (LPC17_USB_BASE+OHCI_INTST_OFFSET) +#define LPC17_USBHOST_INTEN (LPC17_USB_BASE+OHCI_INTEN_OFFSET) +#define LPC17_USBHOST_INTDIS (LPC17_USB_BASE+OHCI_INTDIS_OFFSET) + +/* Memory pointers (section 7.2) */ + +#define LPC17_USBHOST_HCCA (LPC17_USB_BASE+OHCI_HCCA_OFFSET) +#define LPC17_USBHOST_PERED (LPC17_USB_BASE+OHCI_PERED_OFFSET) +#define LPC17_USBHOST_CTRLHEADED (LPC17_USB_BASE+OHCI_CTRLHEADED_OFFSET) +#define LPC17_USBHOST_CTRLED (LPC17_USB_BASE+OHCI_CTRLED_OFFSET) +#define LPC17_USBHOST_BULKHEADED (LPC17_USB_BASE+OHCI_BULKHEADED_OFFSET) +#define LPC17_USBHOST_BULKED (LPC17_USB_BASE+OHCI_BULKED_OFFSET) +#define LPC17_USBHOST_DONEHEAD (LPC17_USB_BASE+OHCI_DONEHEAD_OFFSET) + +/* Frame counters (section 7.3) */ + +#define LPC17_USBHOST_FMINT (LPC17_USB_BASE+OHCI_FMINT_OFFSET) +#define LPC17_USBHOST_FMREM (LPC17_USB_BASE+OHCI_FMREM_OFFSET) +#define LPC17_USBHOST_FMNO (LPC17_USB_BASE+OHCI_FMNO_OFFSET) +#define LPC17_USBHOST_PERSTART (LPC17_USB_BASE+OHCI_PERSTART_OFFSET) + +/* Root hub ports (section 7.4) */ + +#define LPC17_USBHOST_LSTHRES (LPC17_USB_BASE+OHCI_LSTHRES_OFFSET) +#define LPC17_USBHOST_RHDESCA (LPC17_USB_BASE+OHCI_RHDESCA_OFFSET) +#define LPC17_USBHOST_RHDESCB (LPC17_USB_BASE+OHCI_RHDESCB_OFFSET) +#define LPC17_USBHOST_RHSTATUS (LPC17_USB_BASE+OHCI_RHSTATUS_OFFSET) +#define LPC17_USBHOST_RHPORTST1 (LPC17_USB_BASE+OHCI_RHPORTST1_OFFSET) +#define LPC17_USBHOST_RHPORTST2 (LPC17_USB_BASE+OHCI_RHPORTST2_OFFSET) +#define LPC17_USBHOST_MODID (LPC17_USB_BASE+LPC17_USBHOST_MODID_OFFSET) + +/* USB OTG Controller ***************************************************************/ +/* OTG registers */ + +#define LPC17_USBOTG_INTST (LPC17_USB_BASE+LPC17_USBOTG_INTST_OFFSET) +#define LPC17_USBOTG_INTEN (LPC17_USB_BASE+LPC17_USBOTG_INTEN_OFFSET) +#define LPC17_USBOTG_INTSET (LPC17_USB_BASE+LPC17_USBOTG_INTSET_OFFSET) +#define LPC17_USBOTG_INTCLR (LPC17_USB_BASE+LPC17_USBOTG_INTCLR_OFFSET) +#define LPC17_USBOTG_STCTRL (LPC17_USB_BASE+LPC17_USBOTG_STCTRL_OFFSET) +#define LPC17_USBOTG_TMR (LPC17_USB_BASE+LPC17_USBOTG_TMR_OFFSET) + +/* USB Device Controller ************************************************************/ +/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ + +#define LPC17_USBDEV_INTST (LPC17_USB_BASE+LPC17_USBDEV_INTST_OFFSET) +#define LPC17_USBDEV_INTEN (LPC17_USB_BASE+LPC17_USBDEV_INTEN_OFFSET) +#define LPC17_USBDEV_INTCLR (LPC17_USB_BASE+LPC17_USBDEV_INTCLR_OFFSET) +#define LPC17_USBDEV_INTSET (LPC17_USB_BASE+LPC17_USBDEV_INTSET_OFFSET) + +/* SIE Command registers */ + +#define LPC17_USBDEV_CMDCODE (LPC17_USB_BASE+LPC17_USBDEV_CMDCODE_OFFSET) +#define LPC17_USBDEV_CMDDATA (LPC17_USB_BASE+LPC17_USBDEV_CMDDATA_OFFSET) + +/* USB transfer registers */ + +#define LPC17_USBDEV_RXDATA (LPC17_USB_BASE+LPC17_USBDEV_RXDATA_OFFSET) +#define LPC17_USBDEV_RXPLEN (LPC17_USB_BASE+LPC17_USBDEV_RXPLEN_OFFSET) +#define LPC17_USBDEV_TXDATA (LPC17_USB_BASE+LPC17_USBDEV_TXDATA_OFFSET) +#define LPC17_USBDEV_TXPLEN (LPC17_USB_BASE+LPC17_USBDEV_TXPLEN_OFFSET) +#define LPC17_USBDEV_CTRL (LPC17_USB_BASE+LPC17_USBDEV_CTRL_OFFSET) + +/* More Device interrupt registers */ + +#define LPC17_USBDEV_INTPRI (LPC17_USB_BASE+LPC17_USBDEV_INTPRI_OFFSET) + +/* Endpoint interrupt registers */ + +#define LPC17_USBDEV_EPINTST (LPC17_USB_BASE+LPC17_USBDEV_EPINTST_OFFSET) +#define LPC17_USBDEV_EPINTEN (LPC17_USB_BASE+LPC17_USBDEV_EPINTEN_OFFSET) +#define LPC17_USBDEV_EPINTCLR (LPC17_USB_BASE+LPC17_USBDEV_EPINTCLR_OFFSET) +#define LPC17_USBDEV_EPINTSET (LPC17_USB_BASE+LPC17_USBDEV_EPINTSET_OFFSET) +#define LPC17_USBDEV_EPINTPRI (LPC17_USB_BASE+LPC17_USBDEV_EPINTPRI_OFFSET) + +/* Endpoint realization registers */ + +#define LPC17_USBDEV_REEP (LPC17_USB_BASE+LPC17_USBDEV_REEP_OFFSET) +#define LPC17_USBDEV_EPIND (LPC17_USB_BASE+LPC17_USBDEV_EPIND_OFFSET) +#define LPC17_USBDEV_MAXPSIZE (LPC17_USB_BASE+LPC17_USBDEV_MAXPSIZE_OFFSET) + +/* DMA registers */ + +#define LPC17_USBDEV_DMARST (LPC17_USB_BASE+LPC17_USBDEV_DMARST_OFFSET) +#define LPC17_USBDEV_DMARCLR (LPC17_USB_BASE+LPC17_USBDEV_DMARCLR_OFFSET) +#define LPC17_USBDEV_DMARSET (LPC17_USB_BASE+LPC17_USBDEV_DMARSET_OFFSET) +#define LPC17_USBDEV_UDCAH (LPC17_USB_BASE+LPC17_USBDEV_UDCAH_OFFSET) +#define LPC17_USBDEV_EPDMAST (LPC17_USB_BASE+LPC17_USBDEV_EPDMAST_OFFSET) +#define LPC17_USBDEV_EPDMAEN (LPC17_USB_BASE+LPC17_USBDEV_EPDMAEN_OFFSET) +#define LPC17_USBDEV_EPDMADIS (LPC17_USB_BASE+LPC17_USBDEV_EPDMADIS_OFFSET) +#define LPC17_USBDEV_DMAINTST (LPC17_USB_BASE+LPC17_USBDEV_DMAINTST_OFFSET) +#define LPC17_USBDEV_DMAINTEN (LPC17_USB_BASE+LPC17_USBDEV_DMAINTEN_OFFSET) +#define LPC17_USBDEV_EOTINTST (LPC17_USB_BASE+LPC17_USBDEV_EOTINTST_OFFSET) +#define LPC17_USBDEV_EOTINTCLR (LPC17_USB_BASE+LPC17_USBDEV_EOTINTCLR_OFFSET) +#define LPC17_USBDEV_EOTINTSET (LPC17_USB_BASE+LPC17_USBDEV_EOTINTSET_OFFSET) +#define LPC17_USBDEV_NDDRINTST (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTST_OFFSET) +#define LPC17_USBDEV_NDDRINTCLR (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTCLR_OFFSET) +#define LPC17_USBDEV_NDDRINTSET (LPC17_USB_BASE+LPC17_USBDEV_NDDRINTSET_OFFSET) +#define LPC17_USBDEV_SYSERRINTST (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTST_OFFSET) +#define LPC17_USBDEV_SYSERRINTCLR (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTCLR_OFFSET) +#define LPC17_USBDEV_SYSERRINTSET (LPC17_USB_BASE+LPC17_USBDEV_SYSERRINTSET_OFFSET) + +/* OTG I2C registers ****************************************************************/ + +#define LPC17_OTGI2C_RX (LPC17_USB_BASE+LPC17_OTGI2C_RX_OFFSET) +#define LPC17_OTGI2C_TX (LPC17_USB_BASE+LPC17_OTGI2C_TX_OFFSET) +#define LPC17_OTGI2C_STS (LPC17_USB_BASE+LPC17_OTGI2C_STS_OFFSET) +#define LPC17_OTGI2C_CTL (LPC17_USB_BASE+LPC17_OTGI2C_CTL_OFFSET) +#define LPC17_OTGI2C_CLKHI (LPC17_USB_BASE+LPC17_OTGI2C_CLKHI_OFFSET) +#define LPC17_OTGI2C_CLKLO (LPC17_USB_BASE+LPC17_OTGI2C_CLKLO_OFFSET) + +/* Clock control registers ***********************************************************/ + +#define LPC17_USBOTG_CLKCTRL (LPC17_USB_BASE+LPC17_USBOTG_CLKCTRL_OFFSET) +#define LPC17_USBOTG_CLKST (LPC17_USB_BASE+LPC17_USBOTG_CLKST_OFFSET) + +#define LPC17_USBDEV_CLKCTRL (LPC17_USB_BASE+LPC17_USBDEV_CLKCTRL_OFFSET) +#define LPC17_USBDEV_CLKST (LPC17_USB_BASE+LPC17_USBDEV_CLKST_OFFSET) + +/* Register bit definitions *********************************************************/ +/* USB Host Controller (OHCI) *******************************************************/ +/* See include/nuttx/usb/ohci.h */ + +/* Module ID/Revision ID */ + +#define USBHOST_MODID_VER_SHIFT (0) /* Bits 0-7: Unique version number */ +#define USBHOST_MODID_VER_MASK (0xff << USBHOST_MODID_VER_SHIFT) +#define USBHOST_MODID_REV_SHIFT (8) /* Bits 9-15: Unique revision number */ +#define USBHOST_MODID_REV_MASK (0xff << USBHOST_MODID_REV_SHIFT) +#define USBHOST_MODID_3505_SHIFT (16) /* Bits 16-31: 0x3505 */ +#define USBHOST_MODID_3505_MASK (0xffff << USBHOST_MODID_3505_SHIFT) +# define USBHOST_MODID_3505 (0x3505 << USBHOST_MODID_3505_SHIFT) + +/* USB OTG Controller ***************************************************************/ +/* OTG registers: + * + * OTG Interrupt Status, OTG Interrupt Enable, OTG Interrupt Set, AND OTG Interrupt + * Clear + */ + +#define USBOTG_INT_TMR (1 << 0) /* Bit 0: Timer time-out */ +#define USBOTG_INT_REMOVE_PU (1 << 1) /* Bit 1: Remove pull-up */ +#define USBOTG_INT_HNP_FAILURE (1 << 2) /* Bit 2: HNP failed */ +#define USBOTG_INT_HNP_SUCCESS (1 << 3) /* Bit 3: HNP succeeded */ + /* Bits 4-31: Reserved */ +/* OTG Status and Control */ + +#define USBOTG_STCTRL_PORTFUNC_SHIFT (0) /* Bits 0-1: Controls port function */ +#define USBOTG_STCTRL_PORTFUNC_MASK (3 << USBOTG_STCTRL_PORTFUNC_SHIFT) +# define USBOTG_STCTRL_PORTFUNC_HNPOK (1 << USBOTG_STCTRL_PORTFUNC_SHIFT) /* HNP suceeded */ +#define USBOTG_STCTRL_TMRSCALE_SHIFT (2) /* Bits 2-3: Timer scale selection */ +#define USBOTG_STCTRL_TMRSCALE_MASK (3 << USBOTG_STCTRL_TMR_SCALE_SHIFT) +# define USBOTG_STCTRL_TMRSCALE_10US (0 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 10uS (100 KHz) */ +# define USBOTG_STCTRL_TMRSCALE_100US (1 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 100uS (10 KHz) */ +# define USBOTG_STCTRL_TMRSCALE_1000US (2 << USBOTG_STCTRL_TMR_SCALE_SHIFT) /* 1000uS (1 KHz) */ +#define USBOTG_STCTRL_TMRMODE (1 << 4) /* Bit 4: Timer mode selection */ +#define USBOTG_STCTRL_TMREN (1 << 5) /* Bit 5: Timer enable */ +#define USBOTG_STCTRL_TMRRST (1 << 6) /* Bit 6: TTimer reset */ + /* Bit 7: Reserved */ +#define USBOTG_STCTRL_BHNPTRACK (1 << 8) /* Bit 8: Enable HNP tracking for B-device (peripheral) */ +#define USBOTG_STCTRL_AHNPTRACK (1 << 9) /* Bit 9: Enable HNP tracking for A-device (host) */ +#define USBOTG_STCTRL_PUREMOVED (1 << 10) /* Bit 10: Set when D+ pull-up removed */ + /* Bits 11-15: Reserved */ +#define USBOTG_STCTRL_TMRCNT_SHIFT (0) /* Bits 16-313: Timer scale selection */ +#define USBOTG_STCTRL_TMRCNT_MASK (0ffff << USBOTG_STCTRL_TMR_CNT_SHIFT) + +/* OTG Timer */ + +#define USBOTG_TMR_TIMEOUTCNT_SHIFT (0) /* Bits 0-15: Interrupt when CNT matches this */ +#define USBOTG_TMR_TIMEOUTCNT_MASK (0xffff << USBOTG_TMR_TIMEOUTCNT_SHIFT) + /* Bits 16-31: Reserved */ + +/* USB Device Controller ************************************************************/ +/* Device interrupt registers. See also SYSCON_USBINTST in lpc17_syscon.h */ +/* USB Device Interrupt Status, USB Device Interrupt Enable, USB Device Interrupt + * Clear, USB Device Interrupt Set, and USB Device Interrupt Priority + */ + +#define USBDEV_INT_FRAME (1 << 0) /* Bit 0: frame interrupt (every 1 ms) */ +#define USBDEV_INT_EPFAST (1 << 1) /* Bit 1: Fast endpoint interrupt */ +#define USBDEV_INT_EPSLOW (1 << 2) /* Bit 2: Slow endpoints interrupt */ +#define USBDEV_INT_DEVSTAT (1 << 3) /* Bit 3: Bus reset, suspend change or connect change */ +#define USBDEV_INT_CCEMPTY (1 << 4) /* Bit 4: Command code register empty */ +#define USBDEV_INT_CDFULL (1 << 5) /* Bit 5: Command data register full */ +#define USBDEV_INT_RXENDPKT (1 << 6) /* Bit 6: RX endpoint data transferred */ +#define USBDEV_INT_TXENDPKT (1 << 7) /* Bit 7: TX endpoint data tansferred */ +#define USBDEV_INT_EPRLZED (1 << 8) /* Bit 8: Endpoints realized */ +#define USBDEV_INT_ERRINT (1 << 9) /* Bit 9: Error Interrupt */ + /* Bits 10-31: Reserved */ +/* SIE Command registers: + * + * USB Command Code + */ + /* Bits 0-7: Reserved */ +#define USBDEV_CMDCODE_PHASE_SHIFT (8) /* Bits 8-15: Command phase */ +#define USBDEV_CMDCODE_PHASE_MASK (0xff << USBDEV_CMDCODE_PHASE_SHIFT) +# define USBDEV_CMDCODE_PHASE_READ (1 << USBDEV_CMDCODE_PHASE_SHIFT) +# define USBDEV_CMDCODE_PHASE_WRITE (2 << USBDEV_CMDCODE_PHASE_SHIFT) +# define USBDEV_CMDCODE_PHASE_COMMAND (5 << USBDEV_CMDCODE_PHASE_SHIFT) +#define USBDEV_CMDCODE_CMD_SHIFT (16) /* Bits 15-23: Command (READ/COMMAND phases) */ +#define USBDEV_CMDCODE_CMD_MASK (0xff << USBDEV_CMDCODE_CMD_SHIFT) +#define USBDEV_CMDCODE_WDATA_SHIFT (16) /* Bits 15-23: Write dagta (WRITE phase) */ +#define USBDEV_CMDCODE_WDATA_MASK (0xff << USBDEV_CMDCODE_CMD_SHIFT) + /* Bits 24-31: Reserved */ +/* USB Command Data */ + +#define USBDEV_CMDDATA_SHIFT (0) /* Bits 0-7: Command read data */ +#define USBDEV_CMDDATA_MASK (0xff << USBDEV_CMDDATA_SHIFT) + /* Bits 8-31: Reserved */ +/* USB transfer registers: + * + * USB Receive Data (Bits 0-31: Received data) + */ + +/* USB Receive Packet Length */ + +#define USBDEV_RXPLEN_SHIFT (0) /* Bits 0-9: Bytes remaining to be read */ +#define USBDEV_RXPLEN_MASK (0x3ff << USBDEV_RXPLEN_SHIFT) +#define USBDEV_RXPLEN_DV (1 << 10) /* Bit 10: DV Data valid */ +#define USBDEV_RXPLEN_PKTRDY (1 << 11) /* Bit 11: Packet ready for reading */ + /* Bits 12-31: Reserved */ +/* USB Transmit Data (Bits 0-31: Transmit data) */ + +/* USB Transmit Packet Length */ + +#define USBDEV_TXPLEN_SHIFT (0) /* Bits 0-9: Bytes remaining to be written */ +#define USBDEV_TXPLEN_MASK (0x3ff << USBDEV_TXPLEN_SHIFT) + /* Bits 10-31: Reserved */ +/* USB Control */ + +#define USBDEV_CTRL_RDEN (1 << 0) /* Bit 0: Read mode control */ +#define USBDEV_CTRL_WREN (1 << 1) /* Bit 1: Write mode control */ +#define USBDEV_CTRL_LOGEP_SHIFT (2) /* Bits 2-5: Logical Endpoint number */ +#define USBDEV_CTRL_LOGEP_MASK (15 << USBDEV_CTRL_LOGEP_SHIFT) + /* Bits 6-31: Reserved */ +/* Endpoint interrupt registers: + * + * USB Endpoint Interrupt Status, USB Endpoint Interrupt Enable, USB Endpoint Interrupt + * Clear, USB Endpoint Interrupt Set, and USB Endpoint Priority. Bits correspond + * to on RX or TX value for any of 15 logical endpoints). + */ + +#define USBDEV_LOGEPRX(n) (1 << ((n) << 1)) +#define USBDEV_LOGEPTX(n) ((1 << ((n) << 1)) + 1) +#define USBDEV_LOGEPRX0 (1 << 0) +#define USBDEV_LOGEPTX0 (1 << 1) +#define USBDEV_LOGEPRX1 (1 << 2) +#define USBDEV_LOGEPTX1 (1 << 3) +#define USBDEV_LOGEPRX2 (1 << 4) +#define USBDEV_LOGEPTX2 (1 << 5) +#define USBDEV_LOGEPRX3 (1 << 6) +#define USBDEV_LOGEPTX3 (1 << 7) +#define USBDEV_LOGEPRX4 (1 << 8) +#define USBDEV_LOGEPTX4 (1 << 9) +#define USBDEV_LOGEPRX5 (1 << 10) +#define USBDEV_LOGEPTX5 (1 << 11) +#define USBDEV_LOGEPRX6 (1 << 12) +#define USBDEV_LOGEPTX6 (1 << 13) +#define USBDEV_LOGEPRX7 (1 << 14) +#define USBDEV_LOGEPTX7 (1 << 15) +#define USBDEV_LOGEPRX8 (1 << 16) +#define USBDEV_LOGEPTX8 (1 << 17) +#define USBDEV_LOGEPRX9 (1 << 18) +#define USBDEV_LOGEPTX9 (1 << 19) +#define USBDEV_LOGEPRX10 (1 << 20) +#define USBDEV_LOGEPTX10 (1 << 21) +#define USBDEV_LOGEPRX11 (1 << 22) +#define USBDEV_LOGEPTX11 (1 << 23) +#define USBDEV_LOGEPRX12 (1 << 24) +#define USBDEV_LOGEPTX12 (1 << 25) +#define USBDEV_LOGEPRX13 (1 << 26) +#define USBDEV_LOGEPTX13 (1 << 27) +#define USBDEV_LOGEPRX14 (1 << 28) +#define USBDEV_LOGEPTX14 (1 << 29) +#define USBDEV_LOGEPRX15 (1 << 30) +#define USBDEV_LOGEPTX15 (1 << 31) + +/* Endpoint realization registers: + * + * USB Realize Endpoint (Bits correspond to 1 of 32 physical endpoints) + */ + +#define USBDEV_PHYEP(n) (1 << (n)) +#define USBDEV_PHYEP0 (1 << 0) +#define USBDEV_PHYEP1 (1 << 1) +#define USBDEV_PHYEP2 (1 << 2) +#define USBDEV_PHYEP3 (1 << 3) +#define USBDEV_PHYEP4 (1 << 4) +#define USBDEV_PHYEP5 (1 << 5) +#define USBDEV_PHYEP6 (1 << 6) +#define USBDEV_PHYEP7 (1 << 7) +#define USBDEV_PHYEP8 (1 << 8) +#define USBDEV_PHYEP9 (1 << 9) +#define USBDEV_PHYEP10 (1 << 10) +#define USBDEV_PHYEP11 (1 << 11) +#define USBDEV_PHYEP12 (1 << 12) +#define USBDEV_PHYEP13 (1 << 13) +#define USBDEV_PHYEP14 (1 << 14) +#define USBDEV_PHYEP15 (1 << 15) +#define USBDEV_PHYEP16 (1 << 16) +#define USBDEV_PHYEP17 (1 << 17) +#define USBDEV_PHYEP18 (1 << 18) +#define USBDEV_PHYEP19 (1 << 19) +#define USBDEV_PHYEP20 (1 << 20) +#define USBDEV_PHYEP21 (1 << 21) +#define USBDEV_PHYEP22 (1 << 22) +#define USBDEV_PHYEP23 (1 << 23) +#define USBDEV_PHYEP24 (1 << 24) +#define USBDEV_PHYEP25 (1 << 25) +#define USBDEV_PHYEP26 (1 << 26) +#define USBDEV_PHYEP27 (1 << 27) +#define USBDEV_PHYEP28 (1 << 28) +#define USBDEV_PHYEP29 (1 << 29) +#define USBDEV_PHYEP30 (1 << 30) +#define USBDEV_PHYEP31 (1 << 31) + +/* USB Endpoint Index */ + +#define USBDEV_EPIND_SHIFT (0) /* Bits 0-4: Physical endpoint number (0-31) */ +#define USBDEV_EPIND_MASK (31 << USBDEV_EPIND_SHIFT) + /* Bits 5-31: Reserved */ +/* USB MaxPacketSize */ + +#define USBDEV_MAXPSIZE_SHIFT (0) /* Bits 0-9: Maximum packet size value */ +#define USBDEV_MAXPSIZE_MASK (0x3ff << USBDEV_MAXPSIZE_SHIFT) + /* Bits 10-31: Reserved */ +/* DMA registers: + * + * USB DMA Request Status, USB DMA Request Clear, and USB DMA Request Set. Registers + * contain bits for each of 32 physical endpoints. Use the USBDEV_PHYEP* definitions + * above. PHYEP0-1 (bits 0-1) must be zero. + */ + +/* USB UDCA Head */ + /* Bits 0-6: Reserved */ +#define USBDEV_UDCAH_SHIFT (7) /* Bits 7-31: UDCA start address */ +#define USBDEV_UDCAH_MASK (0x01ffffff << USBDEV_UDCAH_SHIFT) + +/* USB Endpoint DMA Status, USB Endpoint DMA Enable, and USB Endpoint DMA Disable. + * Registers contain bits for physical endpoints 2-31. Use the USBDEV_PHYEP* + * definitions above. PHYEP0-1 (bits 0-1) must be zero. + */ + +/* USB DMA Interrupt Status and USB DMA Interrupt Enable */ + +#define USBDEV_DMAINT_EOT (1 << 0) /* Bit 0: End of Transfer Interrupt */ +#define USBDEV_DMAINT_NDDR (1 << 1) /* Bit 1: New DD Request Interrupt */ +#define USBDEV_DMAINT_ERR (1 << 2) /* Bit 2: System Error Interrupt */ + /* Bits 3-31: Reserved */ +/* USB End of Transfer Interrupt Status, USB End of Transfer Interrupt Clear, and USB + * End of Transfer Interrupt Set. Registers contain bits for physical endpoints 2-31. + * Use the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. + */ + +/* USB New DD Request Interrupt Status, USB New DD Request Interrupt Clear, and USB + * New DD Request Interrupt Set. Registers contain bits for physical endpoints 2-31. + * Use the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. + */ + +/* USB System Error Interrupt Status, USB System Error Interrupt Clear, USB System + * Error Interrupt Set. Registers contain bits for physical endpoints 2-31. Use + * the USBDEV_PHYEP* definitions above. PHYEP0-1 (bits 0-1) must be zero. + */ + +/* OTG I2C registers ****************************************************************/ + +/* I2C Receive */ + +#define OTGI2C_RX_DATA_SHIFT (0) /* Bits 0-7: RX data */ +#define OTGI2C_RX_DATA_MASK (0xff << OTGI2C_RX_SHIFT) + /* Bits 8-31: Reserved */ +/* I2C Transmit */ + +#define OTGI2C_TX_DATA_SHIFT (0) /* Bits 0-7: TX data */ +#define OTGI2C_TX_DATA_MASK (0xff << OTGI2C_TX_DATA_SHIFT) +#define OTGI2C_TX_DATA_START (1 << 8) /* Bit 8: Issue START before transmit */ +#define OTGI2C_TX_DATA_STOP (1 << 9) /* Bit 9: Issue STOP before transmit */ + /* Bits 3-31: Reserved */ +/* I2C Status */ + +#define OTGI2C_STS_TDI (1 << 0) /* Bit 0: Transaction Done Interrupt */ +#define OTGI2C_STS_AFI (1 << 1) /* Bit 1: Arbitration Failure Interrupt */ +#define OTGI2C_STS_NAI (1 << 2) /* Bit 2: No Acknowledge Interrupt */ +#define OTGI2C_STS_DRMI (1 << 3) /* Bit 3: Master Data Request Interrupt */ +#define OTGI2C_STS_DRSI (1 << 4) /* Bit 4: Slave Data Request Interrupt */ +#define OTGI2C_STS_ACTIVE (1 << 5) /* Bit 5: Indicates whether the bus is busy */ +#define OTGI2C_STS_SCL (1 << 6) /* Bit 6: The current value of the SCL signal */ +#define OTGI2C_STS_SDA (1 << 7) /* Bit 7: The current value of the SDA signal */ +#define OTGI2C_STS_RFF (1 << 8) /* Bit 8: Receive FIFO Full (RFF) */ +#define OTGI2C_STS_RFE (1 << 9) /* Bit 9: Receive FIFO Empty */ +#define OTGI2C_STS_TFF (1 << 10) /* Bit 10: Transmit FIFO Full */ +#define OTGI2C_STS_TFE (1 << 11) /* Bit 11: Transmit FIFO Empty */ + /* Bits 12-31: Reserved */ +/* I2C Control */ + +#define OTGI2C_CTL_TDIE (1 << 0) /* Bit 0: Transmit Done Interrupt Enable */ +#define OTGI2C_CTL_AFIE (1 << 1) /* Bit 1: Transmitter Arbitration Failure Interrupt Enable */ +#define OTGI2C_CTL_NAIE (1 << 2) /* Bit 2: Transmitter No Acknowledge Interrupt Enable */ +#define OTGI2C_CTL_DRMIE (1 << 3) /* Bit 3: Master Transmitter Data Request Interrupt Enable */ +#define OTGI2C_CTL_DRSIE (1 << 4) /* Bit 4: Slave Transmitter Data Request Interrupt Enable */ +#define OTGI2C_CTL_REFIE (1 << 5) /* Bit 5: Receive FIFO Full Interrupt Enable */ +#define OTGI2C_CTL_RFDAIE (1 << 6) /* Bit 6: Receive Data Available Interrupt Enable */ +#define OTGI2C_CTL_TFFIE (1 << 7) /* Bit 7: Transmit FIFO Not Full Interrupt Enable */ +#define OTGI2C_CTL_SRST (1 << 8) /* Bit 8: Soft reset */ + /* Bits 9-31: Reserved */ +/* I2C Clock High */ + +#define OTGI2C_CLKHI_SHIFT (0) /* Bits 0-7: Clock divisor high */ +#define OTGI2C_CLKHI_MASK (0xff << OTGI2C_CLKHI_SHIFT) + /* Bits 8-31: Reserved */ +/* I2C Clock Low */ + +#define OTGI2C_CLKLO_SHIFT (0) /* Bits 0-7: Clock divisor high */ +#define OTGI2C_CLLO_MASK (0xff << OTGI2C_CLKLO_SHIFT) + /* Bits 8-31: Reserved */ +/* Clock control registers ***********************************************************/ + +/* USB Clock Control (OTG clock controller) and USB Clock Status (OTG clock status) */ + +#define USBDEV_CLK_HOSTCLK (1 << 0) /* Bit 1: Host clock (OTG only) */ +#define USBDEV_CLK_DEVCLK (1 << 1) /* Bit 1: Device clock */ +#define USBDEV_CLK_I2CCLK (1 << 2) /* Bit 2: I2C clock (OTG only) */ +#define USBDEV_CLK_PORTSELCLK (1 << 3) /* Bit 3: Port select register clock (device only) */ +#define USBDEV_CLK_OTGCLK (1 << 3) /* Bit 3: OTG clock (OTG only) */ +#define USBDEV_CLK_AHBCLK (1 << 4) /* Bit 4: AHB clock */ + /* Bits 5-31: Reserved */ +/* Alternate naming */ + +#define USBOTG_CLK_HOSTCLK USBDEV_CLK_HOSTCLK +#define USBOTG_CLK_DEVCLK USBDEV_CLK_DEVCLK +#define USBOTG_CLK_I2CCLK USBDEV_CLK_I2CCLK +#define USBOTG_CLK_PORTSELCLK USBDEV_CLK_PORTSELCLK +#define USBOTG_CLK_OTGCLK USBDEV_CLK_OTGCLK +#define USBOTG_CLK_AHBCLK USBDEV_CLK_AHBCLK + +/* Endpoints *************************************************************************/ + +#define LPC17_EP0_OUT 0 +#define LPC17_EP0_IN 1 +#define LPC17_CTRLEP_OUT LPC17_EP0_OUT +#define LPC17_CTRLEP_IN LPC17_EP0_IN +#define LPC17_EP1_OUT 2 +#define LPC17_EP1_IN 3 +#define LPC17_EP2_OUT 4 +#define LPC17_EP2_IN 5 +#define LPC17_EP3_OUT 6 +#define LPC17_EP3_IN 7 +#define LPC17_EP4_OUT 8 +#define LPC17_EP4_IN 9 +#define LPC17_EP5_OUT 10 +#define LPC17_EP5_IN 11 +#define LPC17_EP6_OUT 12 +#define LPC17_EP6_IN 13 +#define LPC17_EP7_OUT 14 +#define LPC17_EP7_IN 15 +#define LPC17_EP8_OUT 16 +#define LPC17_EP8_IN 17 +#define LPC17_EP9_OUT 18 +#define LPC17_EP9_IN 19 +#define LPC17_EP10_OUT 20 +#define LPC17_EP10_IN 21 +#define LPC17_EP11_OUT 22 +#define LPC17_EP11_IN 23 +#define LPC17_EP12_OUT 24 +#define LPC17_EP12_IN 25 +#define LPC17_EP13_OUT 26 +#define LPC17_EP13_IN 27 +#define LPC17_EP14_OUT 28 +#define LPC17_EP14_IN 29 +#define LPC17_EP15_OUT 30 +#define LPC17_EP15_IN 31 +#define LPC17_NUMEPS 32 + +/* Commands *************************************************************************/ + +/* USB Command Code Register */ + +#define CMD_USBDEV_PHASESHIFT (8) /* Bits 8-15: Command phase value */ +#define CMD_USBDEV_PHASEMASK (0xff << CMD_USBDEV_PHASESHIFT) +# define CMD_USBDEV_DATAWR (1 << CMD_USBDEV_PHASESHIFT) +# define CMD_USBDEV_DATARD (2 << CMD_USBDEV_PHASESHIFT) +# define CMD_USBDEV_CMDWR (5 << CMD_USBDEV_PHASESHIFT) +#define CMD_USBDEV_CMDSHIFT (16) /* Bits 16-23: Device command/WDATA */ +#define CMD_USBDEV_CMDMASK (0xff << CMD_USBDEV_CMDSHIFT) +#define CMD_USBDEV_WDATASHIFT CMD_USBDEV_CMDSHIFT +#define CMD_USBDEV_WDATAMASK CMD_USBDEV_CMDMASK + +/* Device Commands */ + +#define CMD_USBDEV_SETADDRESS (0x00d0) +#define CMD_USBDEV_CONFIG (0x00d8) +#define CMD_USBDEV_SETMODE (0x00f3) +#define CMD_USBDEV_READFRAMENO (0x00f5) +#define CMD_USBDEV_READTESTREG (0x00fd) +#define CMD_USBDEV_SETSTATUS (0x01fe) /* Bit 8 set to distingish get from set */ +#define CMD_USBDEV_GETSTATUS (0x00fe) +#define CMD_USBDEV_GETERRORCODE (0x00ff) +#define CMD_USBDEV_READERRORSTATUS (0x00fb) + +/* Endpoint Commands */ + +#define CMD_USBDEV_EPSELECT (0x0000) +#define CMD_USBDEV_EPSELECTCLEAR (0x0040) +#define CMD_USBDEV_EPSETSTATUS (0x0140) /* Bit 8 set to distingish get from selectclear */ +#define CMD_USBDEV_EPCLRBUFFER (0x00f2) +#define CMD_USBDEV_EPVALIDATEBUFFER (0x00fa) + +/* Command/response bit definitions ********************************************/ +/* SETADDRESS (0xd0) command definitions */ + +#define CMD_USBDEV_SETADDRESS_MASK (0x7f) /* Bits 0-6: Device address */ +#define CMD_USBDEV_SETADDRESS_DEVEN (1 << 7) /* Bit 7: Device enable */ + +/* SETSTATUS (0xfe) and GETSTATUS (0xfe) response: */ + +#define CMD_STATUS_CONNECT (1 << 0) /* Bit 0: Connected */ +#define CMD_STATUS_CONNCHG (1 << 1) /* Bit 1: Connect change */ +#define CMD_STATUS_SUSPEND (1 << 2) /* Bit 2: Suspend */ +#define CMD_STATUS_SUSPCHG (1 << 3) /* Bit 3: Suspend change */ +#define CMD_STATUS_RESET (1 << 4) /* Bit 4: Bus reset bit */ + +/* EPSELECT (0x00) endpoint status response */ + +#define CMD_EPSELECT_FE (1 << 0) /* Bit 0: IN empty or OUT full */ +#define CMD_EPSELECT_ST (1 << 1) /* Bit 1: Endpoint is stalled */ +#define CMD_EPSELECT_STP (1 << 2) /* Bit 2: Last packet was setup */ +#define CMD_EPSELECT_PO (1 << 3) /* Bit 3: Previous packet was overwritten */ +#define CMD_EPSELECT_EPN (1 << 4) /* Bit 4: NAK sent */ +#define CMD_EPSELECT_B1FULL (1 << 5) /* Bit 5: Buffer 1 full */ +#define CMD_EPSELECT_B2FULL (1 << 6) /* Bit 6: Buffer 2 full */ + /* Bit 7: Reserved */ +/* EPSETSTATUS (0x40) command */ + +#define CMD_SETSTAUS_ST (1 << 0) /* Bit 0: Stalled endpoint bit */ + /* Bits 1-4: Reserved */ +#define CMD_SETSTAUS_DA (1 << 5) /* Bit 5: Disabled endpoint bit */ +#define CMD_SETSTAUS_RFMO (1 << 6) /* Bit 6: Rate feedback mode */ +#define CMD_SETSTAUS_CNDST (1 << 7) /* Bit 7: Conditional stall bit */ + +/* EPCLRBUFFER (0xf2) response */ + +#define CMD_USBDEV_CLRBUFFER_PO (0x00000001) + +/* SETMODE(0xf3) command */ + +#define CMD_SETMODE_APCLK (1 << 0) /* Bit 0: Always PLL Clock */ +#define CMD_SETMODE_INAKCI (1 << 1) /* Bit 1: Interrupt on NAK for Control IN endpoint */ +#define CMD_SETMODE_INAKCO (1 << 2) /* Bit 2: Interrupt on NAK for Control OUT endpoint */ +#define CMD_SETMODE_INAKII (1 << 3) /* Bit 3: Interrupt on NAK for Interrupt IN endpoint */ +#define CMD_SETMODE_INAKIO (1 << 4) /* Bit 4: Interrupt on NAK for Interrupt OUT endpoints */ +#define CMD_SETMODE_INAKBI (1 << 5) /* Bit 5: Interrupt on NAK for Bulk IN endpoints */ +#define CMD_SETMODE_INAKBO (1 << 6) /* Bit 6: Interrupt on NAK for Bulk OUT endpoints */ + +/* READERRORSTATUS (0xFb) command */ + +#define CMD_READERRORSTATUS_PIDERR (1 << 0) /* Bit 0: PID encoding/unknown or Token CRC */ +#define CMD_READERRORSTATUS_UEPKT (1 << 1) /* Bit 1: Unexpected Packet */ +#define CMD_READERRORSTATUS_DCRC (1 << 2) /* Bit 2: Data CRC error */ +#define CMD_READERRORSTATUS_TIMEOUT (1 << 3) /* Bit 3: Time out error */ +#define CMD_READERRORSTATUS_EOP (1 << 4) /* Bit 4: End of packet error */ +#define CMD_READERRORSTATUS_BOVRN (1 << 5) /* Bit 5: Buffer Overrun */ +#define CMD_READERRORSTATUS_BTSTF (1 << 6) /* Bit 6: Bit stuff error */ +#define CMD_READERRORSTATUS_TGLERR (1 << 7) /* Bit 7: Wrong toggle in data PID */ +#define CMD_READERRORSTATUS_ALLERRS (0xff) + +/* DMA ******************************************************************************/ +/* The DMA descriptor */ + +#define USB_DMADESC_NEXTDDPTR 0 /* Offset 0: Next USB descriptor in RAM */ +#define USB_DMADESC_CONFIG 1 /* Offset 1: DMA configuration info. */ +#define USB_DMADESC_STARTADDR 2 /* Offset 2: DMA start address */ +#define USB_DMADESC_STATUS 3 /* Offset 3: DMA status info (read only) */ +#define USB_DMADESC_ISOCSIZEADDR 4 /* Offset 4: Isoc. packet size address */ + +/* Bit settings for CONFIG (offset 1 )*/ + +#define USB_DMADESC_MODE_SHIFT (0) /* Bits 0-1: DMA mode */ +#define USB_DMADESC_MODE_MASK (3 << USB_DMADESC_MODE_SHIFT) +# define USB_DMADESC_MODENORMAL (0 << USB_DMADESC_MODE_SHIFT) /* Mode normal */ +# define USB_DMADESC_MODEATLE (1 << USB_DMADESC_MODE_SHIFT) /* ATLE normal */ +#define USB_DMADESC_NEXTDDVALID (1 << 2) /* Bit 2: Next descriptor valid */ + /* Bit 3: Reserved */ +#define USB_DMADESC_ISCOEP (1 << 4) /* Bit 4: ISOC endpoint */ +#define USB_DMADESC_PKTSIZE_SHIFT (5) /* Bits 5-15: Max packet size */ +#define USB_DMADESC_PKTSIZE_MASK (0x7ff << USB_DMADESC_PKTSIZE_SHIFT) +#define USB_DMADESC_BUFLEN_SHIFT (16) /* Bits 16-31: DMA buffer length */ +#define USB_DMADESC_BUFLEN_MASK (0xffff << USB_DMADESC_BUFLEN_SHIFT + +/* Bit settings for STATUS (offset 3). All must be initialized to zero. */ + +#define USB_DMADESC_STATUS_SHIFT (1) /* Bits 1-4: DMA status */ +#define USB_DMADESC_STATUS_MASK (15 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_NOTSERVICED (0 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_BEINGSERVICED (1 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_NORMALCOMPLETION (2 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_DATAUNDERRUN (3 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_DATAOVERRUN (8 << USB_DMADESC_STATUS_SHIFT) +# define USB_DMADESC_SYSTEMERROR (9 << USB_DMADESC_STATUS_SHIFT) +#define USB_DMADESC_PKTVALID (1 << 5) /* Bit 5: Packet valid */ +#define USB_DMADESC_LSBEXTRACTED (1 << 6) /* Bit 6: LS byte extracted */ +#define USB_DMADESC_MSBEXTRACTED (1 << 7) /* Bit 7: MS byte extracted */ +#define USB_DMADESC_MSGLENPOS_SHIFT (8) /* Bits 8-13: Message length position */ +#define USB_DMADESC_MSGLENPOS_MASK (0x3f << USB_DMADESC_MSGLENPOS_SHIFT) +#define USB_DMADESC_DMACOUNT_SHIFT (16) /* Bits 16-31: DMA count */ +#define USB_DMADESC_DMACOUNT_MASK (0xffff << USB_DMADESC_DMACOUNT_SHIFT) + +/* DMA packet size format */ + +#define USB_DMAPKTSIZE_PKTLEN_SHIFT (0) /* Bits 0-15: Packet length */ +#define USB_DMAPKTSIZE_PKTLEN_MASK (0xffff << USB_DMAPKTSIZE_PKTLEN_SHIFT) +#define USB_DMAPKTSIZE_PKTVALID (1 << 16) /* Bit 16: Packet valid */ +#define USB_DMAPKTSIZE_FRAMENO_SHIFT (17) /* Bit 17-31: Frame number */ +#define USB_DMAPKTSIZE_FRAMENO_MASK (0x7fff << USB_DMAPKTSIZE_FRAMENO_SHIFT) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_USB_H */ diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S b/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S index 75eb71f17f..cdb4bef66c 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_vectors.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/lpc17_vectors.S * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_wdt.h b/nuttx/arch/arm/src/lpc17xx/lpc17_wdt.h index dc02b2e1dc..bd7790a6ea 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_wdt.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_wdt.h @@ -1,108 +1,108 @@ -/************************************************************************************ - * arch/arm/src/lpc17xx/lpc17_wdt.h - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H -#define __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "lpc17_memorymap.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define LPC17_WDT_WDMOD_OFFSET 0x0000 /* Watchdog mode register */ -#define LPC17_WDT_WDTC_OFFSET 0x0004 /* Watchdog timer constant register */ -#define LPC17_WDT_WDFEED_OFFSET 0x0008 /* Watchdog feed sequence register */ -#define LPC17_WDT_WDTV_OFFSET 0x000c /* Watchdog timer value register */ -#define LPC17_WDT_WDCLKSEL_OFFSET 0x0010 /* Watchdog clock source selection register */ - -/* Register addresses ***************************************************************/ - -#define LPC17_WDT_WDMOD (LPC17_WDT_BASE+LPC17_WDT_WDMOD_OFFSET) -#define LPC17_WDT_WDTC (LPC17_WDT_BASE+LPC17_WDT_WDTC_OFFSET) -#define LPC17_WDT_WDFEED (LPC17_WDT_BASE+LPC17_WDT_WDFEED_OFFSET) -#define LPC17_WDT_WDTV (LPC17_WDT_BASE+LPC17_WDT_WDTV_OFFSET) -#define LPC17_WDT_WDCLKSEL (LPC17_WDT_BASE+LPC17_WDT_WDCLKSEL_OFFSET) - -/* Register bit definitions *********************************************************/ - -/* Watchdog mode register */ - -#define WDT_WDMOD_WDEN (1 << 0) /* Bit 0: Watchdog enable */ -#define WDT_WDMOD_WDRESET (1 << 1) /* Bit 1: Watchdog reset enable */ -#define WDT_WDMOD_WDTOF (1 << 2) /* Bit 2: Watchdog time-out */ -#define WDT_WDMOD_WDINT (1 << 3) /* Bit 3: Watchdog interrupt */ - /* Bits 14-31: Reserved */ - -/* Watchdog timer constant register (Bits 0-31: Watchdog time-out interval) */ - -/* Watchdog feed sequence register */ - -#define WDT_WDFEED_MASK (0xff) /* Bits 0-7: Feed value should be 0xaa followed by 0x55 */ - /* Bits 14-31: Reserved */ -/* Watchdog timer value register (Bits 0-31: Counter timer value) */ - -/* Watchdog clock source selection register */ - -#define WDT_WDCLKSEL_WDSEL_SHIFT (0) /* Bits 0-1: Clock source for the Watchdog timer */ -#define WDT_WDCLKSEL_WDSEL_MASK (3 << WDT_WDCLKSEL_WDSEL_SHIFT) -# define WDT_WDCLKSEL_WDSEL_INTRC (0 << WDT_WDCLKSEL_WDSEL_SHIFT) /* Internal RC osc */ -# define WDT_WDCLKSEL_WDSEL_APB (1 << WDT_WDCLKSEL_WDSEL_SHIFT) /* APB peripheral clock (watchdog pclk) */ -# define WDT_WDCLKSEL_WDSEL_RTC (2 << WDT_WDCLKSEL_WDSEL_SHIFT) /* RTC oscillator (rtc_clk) */ - /* Bits 2-30: Reserved */ -#define WDT_WDCLKSEL_WDLOCK (1 << 31) /* Bit 31: Lock WDT register bits if set */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H */ +/************************************************************************************ + * arch/arm/src/lpc17xx/lpc17_wdt.h + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H +#define __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "lpc17_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define LPC17_WDT_WDMOD_OFFSET 0x0000 /* Watchdog mode register */ +#define LPC17_WDT_WDTC_OFFSET 0x0004 /* Watchdog timer constant register */ +#define LPC17_WDT_WDFEED_OFFSET 0x0008 /* Watchdog feed sequence register */ +#define LPC17_WDT_WDTV_OFFSET 0x000c /* Watchdog timer value register */ +#define LPC17_WDT_WDCLKSEL_OFFSET 0x0010 /* Watchdog clock source selection register */ + +/* Register addresses ***************************************************************/ + +#define LPC17_WDT_WDMOD (LPC17_WDT_BASE+LPC17_WDT_WDMOD_OFFSET) +#define LPC17_WDT_WDTC (LPC17_WDT_BASE+LPC17_WDT_WDTC_OFFSET) +#define LPC17_WDT_WDFEED (LPC17_WDT_BASE+LPC17_WDT_WDFEED_OFFSET) +#define LPC17_WDT_WDTV (LPC17_WDT_BASE+LPC17_WDT_WDTV_OFFSET) +#define LPC17_WDT_WDCLKSEL (LPC17_WDT_BASE+LPC17_WDT_WDCLKSEL_OFFSET) + +/* Register bit definitions *********************************************************/ + +/* Watchdog mode register */ + +#define WDT_WDMOD_WDEN (1 << 0) /* Bit 0: Watchdog enable */ +#define WDT_WDMOD_WDRESET (1 << 1) /* Bit 1: Watchdog reset enable */ +#define WDT_WDMOD_WDTOF (1 << 2) /* Bit 2: Watchdog time-out */ +#define WDT_WDMOD_WDINT (1 << 3) /* Bit 3: Watchdog interrupt */ + /* Bits 14-31: Reserved */ + +/* Watchdog timer constant register (Bits 0-31: Watchdog time-out interval) */ + +/* Watchdog feed sequence register */ + +#define WDT_WDFEED_MASK (0xff) /* Bits 0-7: Feed value should be 0xaa followed by 0x55 */ + /* Bits 14-31: Reserved */ +/* Watchdog timer value register (Bits 0-31: Counter timer value) */ + +/* Watchdog clock source selection register */ + +#define WDT_WDCLKSEL_WDSEL_SHIFT (0) /* Bits 0-1: Clock source for the Watchdog timer */ +#define WDT_WDCLKSEL_WDSEL_MASK (3 << WDT_WDCLKSEL_WDSEL_SHIFT) +# define WDT_WDCLKSEL_WDSEL_INTRC (0 << WDT_WDCLKSEL_WDSEL_SHIFT) /* Internal RC osc */ +# define WDT_WDCLKSEL_WDSEL_APB (1 << WDT_WDCLKSEL_WDSEL_SHIFT) /* APB peripheral clock (watchdog pclk) */ +# define WDT_WDCLKSEL_WDSEL_RTC (2 << WDT_WDCLKSEL_WDSEL_SHIFT) /* RTC oscillator (rtc_clk) */ + /* Bits 2-30: Reserved */ +#define WDT_WDCLKSEL_WDLOCK (1 << 31) /* Bit 31: Lock WDT register bits if set */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_WDT_H */ diff --git a/nuttx/arch/arm/src/lpc214x/Make.defs b/nuttx/arch/arm/src/lpc214x/Make.defs index 1f199a6ba7..41dc0911c6 100644 --- a/nuttx/arch/arm/src/lpc214x/Make.defs +++ b/nuttx/arch/arm/src/lpc214x/Make.defs @@ -2,7 +2,7 @@ # lpc214x/Make.defs # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/chip.h b/nuttx/arch/arm/src/lpc214x/chip.h index 9d7d963b18..d469aae8bb 100644 --- a/nuttx/arch/arm/src/lpc214x/chip.h +++ b/nuttx/arch/arm/src/lpc214x/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/chip.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_apb.h b/nuttx/arch/arm/src/lpc214x/lpc214x_apb.h index 996983778e..2d41ab1062 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_apb.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_apb.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_apb.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_decodeirq.c b/nuttx/arch/arm/src/lpc214x/lpc214x_decodeirq.c index 6317066c3f..652fe4d618 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_decodeirq.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_decodeirq.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_decodeirq.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_i2c.h b/nuttx/arch/arm/src/lpc214x/lpc214x_i2c.h index 804dc0a11b..a663999683 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_i2c.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_i2c.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_i2c.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_irq.c b/nuttx/arch/arm/src/lpc214x/lpc214x_irq.c index a8b91037c8..cb0f6e12fc 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_irq.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_irq.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_irq.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_lowputc.S b/nuttx/arch/arm/src/lpc214x/lpc214x_lowputc.S index e36b1d83f8..b53e7aa78e 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_lowputc.S +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_lowputc.S @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214X_lowputc.S * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_pinsel.h b/nuttx/arch/arm/src/lpc214x/lpc214x_pinsel.h index e3f793f093..b34eb86b68 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_pinsel.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_pinsel.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_pinsl.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_pll.h b/nuttx/arch/arm/src/lpc214x/lpc214x_pll.h index 386f3a765c..bea923e431 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_pll.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_pll.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_pll.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_power.h b/nuttx/arch/arm/src/lpc214x/lpc214x_power.h index cd493dac65..7eb253160d 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_power.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_power.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_power.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_spi.h b/nuttx/arch/arm/src/lpc214x/lpc214x_spi.h index 202b9e2507..ce6a03db9b 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_spi.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_spi.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_spi.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_timer.h b/nuttx/arch/arm/src/lpc214x/lpc214x_timer.h index 47adf97967..6c239f10ca 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_timer.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_timer.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_timer.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_timerisr.c b/nuttx/arch/arm/src/lpc214x/lpc214x_timerisr.c index 65e9adb57d..99d1d118ff 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_timerisr.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_timerisr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h b/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h index 2752d17ae9..fd634a8165 100755 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h @@ -1,142 +1,142 @@ -/************************************************************************************ - * arch/arm/src/lpc214x/uart.h - * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __LPC214X_UART_H -#define __LPC214X_UART_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include /* For clock settings */ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* PINSEL0 bit definitions for UART0/1 */ - -#define LPC214X_UART0_PINSEL 0x00000005 /* PINSEL0 value for UART0 */ -#define LPC214X_UART0_PINMASK 0x0000000f /* PINSEL0 mask for UART0 */ - -#define LPC214X_UART1_PINSEL 0x00050000 /* PINSEL0 value for UART1 */ -#define LPC214X_UART1_PINMASK 0x000f0000 /* PINSEL0 mask for UART1 */ - -/* Derive baud divisor setting from clock settings (see board.h) */ - -#define UART_BAUD(baud) ((LPC214X_FOSC * LPC214X_PLL_M) / (baud * 16)) - -/* Interrupt Enable Register (IER) bit definitions */ - -#define LPC214X_IER_ERBFI (1 << 0) /* Enable receive data available int */ -#define LPC214X_IER_ETBEI (1 << 1) /* Enable THR empty Interrupt */ -#define LPC214X_IER_ELSI (1 << 2) /* Enable receive line status int */ -#define LPC214X_IER_EDSSI (1 << 3) /* Enable MODEM atatus interrupt (2146/6/8 UART1 Only) */ -#define LPC214X_IER_ALLIE 0x0f /* All interrupts */ - -/* Interrupt ID Register(IIR) bit definitions */ - -#define LPC214X_IIR_NO_INT (1 << 0) /* No interrupts pending */ -#define LPC214X_IIR_MS_INT (0 << 1) /* MODEM Status (UART1 only) */ -#define LPC214X_IIR_THRE_INT (1 << 1) /* Transmit Holding Register Empty */ -#define LPC214X_IIR_RDA_INT (2 << 1) /* Receive Data Available */ -#define LPC214X_IIR_RLS_INT (3 << 1) /* Receive Line Status */ -#define LPC214X_IIR_CTI_INT (6 << 1) /* Character Timeout Indicator */ -#define LPC214X_IIR_MASK 0x0e - -/* FIFO Control Register (FCR) bit definitions */ - -#define LPC214X_FCR_FIFO_ENABLE (1 << 0) /* FIFO enable */ -#define LPC214X_FCR_RX_FIFO_RESET (1 << 1) /* Reset receive FIFO */ -#define LPC214X_FCR_TX_FIFO_RESET (1 << 2) /* Reset transmit FIFO */ -#define LPC214X_FCR_FIFO_TRIG1 (0 << 6) /* Trigger @1 character in FIFO */ -#define LPC214X_FCR_FIFO_TRIG4 (1 << 6) /* Trigger @4 characters in FIFO */ -#define LPC214X_FCR_FIFO_TRIG8 (2 << 6) /* Trigger @8 characters in FIFO */ -#define LPC214X_FCR_FIFO_TRIG14 (3 << 6) /* Trigger @14 characters in FIFO */ - -/* Line Control Register (LCR) bit definitions */ - -#define LPC214X_LCR_CHAR_5 (0 << 0) /* 5-bit character length */ -#define LPC214X_LCR_CHAR_6 (1 << 0) /* 6-bit character length */ -#define LPC214X_LCR_CHAR_7 (2 << 0) /* 7-bit character length */ -#define LPC214X_LCR_CHAR_8 (3 << 0) /* 8-bit character length */ -#define LPC214X_LCR_STOP_1 (0 << 2) /* 1 stop bit */ -#define LPC214X_LCR_STOP_2 (1 << 2) /* 2 stop bits */ -#define LPC214X_LCR_PAR_NONE (0 << 3) /* No parity */ -#define LPC214X_LCR_PAR_ODD (1 << 3) /* Odd parity */ -#define LPC214X_LCR_PAR_EVEN (3 << 3) /* Even parity */ -#define LPC214X_LCR_PAR_MARK (5 << 3) /* Mark "1" parity */ -#define LPC214X_LCR_PAR_SPACE (7 << 3) /* Space "0" parity */ -#define LPC214X_LCR_BREAK_ENABLE (1 << 6) /* Output BREAK */ -#define LPC214X_LCR_DLAB_ENABLE (1 << 7) /* Enable divisor latch access */ - -/* Modem Control Register (MCR) bit definitions */ - -#define LPC214X_MCR_DTR (1 << 0) /* Data terminal ready */ -#define LPC214X_MCR_RTS (1 << 1) /* Request to send */ -#define LPC214X_MCR_LB (1 << 4) /* Loopback */ - -/* Line Status Register (LSR) bit definitions */ - -#define LPC214X_LSR_RDR (1 << 0) /* Receive data ready */ -#define LPC214X_LSR_OE (1 << 1) /* Overrun error */ -#define LPC214X_LSR_PE (1 << 2) /* Parity error */ -#define LPC214X_LSR_FE (1 << 3) /* Framing error */ -#define LPC214X_LSR_BI (1 << 4) /* Break interrupt */ -#define LPC214X_LSR_THRE (1 << 5) /* THR empty */ -#define LPC214X_LSR_TEMT (1 << 6) /* Transmitter empty */ -#define LPC214X_LSR_RXFE (1 << 7) /* Error in receive FIFO */ -#define LPC214X_LSR_ERR_MASK 0x1e - -/* Modem Status Register (MSR) bit definitions */ - -#define LPC214X_MSR_DCTS (1 << 0) /* Delta clear to send */ -#define LPC214X_MSR_DDSR (1 << 1) /* Delta data set ready */ -#define LPC214X_MSR_TERI (1 << 2) /* Trailing edge ring indicator */ -#define LPC214X_MSR_DDCD (1 << 3) /* Delta data carrier detect */ -#define LPC214X_MSR_CTS (1 << 4) /* Clear to send */ -#define LPC214X_MSR_DSR (1 << 5) /* Data set ready */ -#define LPC214X_MSR_RI (1 << 6) /* Ring indicator */ -#define LPC214X_MSR_DCD (1 << 7) /* Data carrier detect */ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Global Function Prototypes - ************************************************************************************/ - -#endif /* __LPC214X_UART_H */ +/************************************************************************************ + * arch/arm/src/lpc214x/uart.h + * + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __LPC214X_UART_H +#define __LPC214X_UART_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include /* For clock settings */ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* PINSEL0 bit definitions for UART0/1 */ + +#define LPC214X_UART0_PINSEL 0x00000005 /* PINSEL0 value for UART0 */ +#define LPC214X_UART0_PINMASK 0x0000000f /* PINSEL0 mask for UART0 */ + +#define LPC214X_UART1_PINSEL 0x00050000 /* PINSEL0 value for UART1 */ +#define LPC214X_UART1_PINMASK 0x000f0000 /* PINSEL0 mask for UART1 */ + +/* Derive baud divisor setting from clock settings (see board.h) */ + +#define UART_BAUD(baud) ((LPC214X_FOSC * LPC214X_PLL_M) / (baud * 16)) + +/* Interrupt Enable Register (IER) bit definitions */ + +#define LPC214X_IER_ERBFI (1 << 0) /* Enable receive data available int */ +#define LPC214X_IER_ETBEI (1 << 1) /* Enable THR empty Interrupt */ +#define LPC214X_IER_ELSI (1 << 2) /* Enable receive line status int */ +#define LPC214X_IER_EDSSI (1 << 3) /* Enable MODEM atatus interrupt (2146/6/8 UART1 Only) */ +#define LPC214X_IER_ALLIE 0x0f /* All interrupts */ + +/* Interrupt ID Register(IIR) bit definitions */ + +#define LPC214X_IIR_NO_INT (1 << 0) /* No interrupts pending */ +#define LPC214X_IIR_MS_INT (0 << 1) /* MODEM Status (UART1 only) */ +#define LPC214X_IIR_THRE_INT (1 << 1) /* Transmit Holding Register Empty */ +#define LPC214X_IIR_RDA_INT (2 << 1) /* Receive Data Available */ +#define LPC214X_IIR_RLS_INT (3 << 1) /* Receive Line Status */ +#define LPC214X_IIR_CTI_INT (6 << 1) /* Character Timeout Indicator */ +#define LPC214X_IIR_MASK 0x0e + +/* FIFO Control Register (FCR) bit definitions */ + +#define LPC214X_FCR_FIFO_ENABLE (1 << 0) /* FIFO enable */ +#define LPC214X_FCR_RX_FIFO_RESET (1 << 1) /* Reset receive FIFO */ +#define LPC214X_FCR_TX_FIFO_RESET (1 << 2) /* Reset transmit FIFO */ +#define LPC214X_FCR_FIFO_TRIG1 (0 << 6) /* Trigger @1 character in FIFO */ +#define LPC214X_FCR_FIFO_TRIG4 (1 << 6) /* Trigger @4 characters in FIFO */ +#define LPC214X_FCR_FIFO_TRIG8 (2 << 6) /* Trigger @8 characters in FIFO */ +#define LPC214X_FCR_FIFO_TRIG14 (3 << 6) /* Trigger @14 characters in FIFO */ + +/* Line Control Register (LCR) bit definitions */ + +#define LPC214X_LCR_CHAR_5 (0 << 0) /* 5-bit character length */ +#define LPC214X_LCR_CHAR_6 (1 << 0) /* 6-bit character length */ +#define LPC214X_LCR_CHAR_7 (2 << 0) /* 7-bit character length */ +#define LPC214X_LCR_CHAR_8 (3 << 0) /* 8-bit character length */ +#define LPC214X_LCR_STOP_1 (0 << 2) /* 1 stop bit */ +#define LPC214X_LCR_STOP_2 (1 << 2) /* 2 stop bits */ +#define LPC214X_LCR_PAR_NONE (0 << 3) /* No parity */ +#define LPC214X_LCR_PAR_ODD (1 << 3) /* Odd parity */ +#define LPC214X_LCR_PAR_EVEN (3 << 3) /* Even parity */ +#define LPC214X_LCR_PAR_MARK (5 << 3) /* Mark "1" parity */ +#define LPC214X_LCR_PAR_SPACE (7 << 3) /* Space "0" parity */ +#define LPC214X_LCR_BREAK_ENABLE (1 << 6) /* Output BREAK */ +#define LPC214X_LCR_DLAB_ENABLE (1 << 7) /* Enable divisor latch access */ + +/* Modem Control Register (MCR) bit definitions */ + +#define LPC214X_MCR_DTR (1 << 0) /* Data terminal ready */ +#define LPC214X_MCR_RTS (1 << 1) /* Request to send */ +#define LPC214X_MCR_LB (1 << 4) /* Loopback */ + +/* Line Status Register (LSR) bit definitions */ + +#define LPC214X_LSR_RDR (1 << 0) /* Receive data ready */ +#define LPC214X_LSR_OE (1 << 1) /* Overrun error */ +#define LPC214X_LSR_PE (1 << 2) /* Parity error */ +#define LPC214X_LSR_FE (1 << 3) /* Framing error */ +#define LPC214X_LSR_BI (1 << 4) /* Break interrupt */ +#define LPC214X_LSR_THRE (1 << 5) /* THR empty */ +#define LPC214X_LSR_TEMT (1 << 6) /* Transmitter empty */ +#define LPC214X_LSR_RXFE (1 << 7) /* Error in receive FIFO */ +#define LPC214X_LSR_ERR_MASK 0x1e + +/* Modem Status Register (MSR) bit definitions */ + +#define LPC214X_MSR_DCTS (1 << 0) /* Delta clear to send */ +#define LPC214X_MSR_DDSR (1 << 1) /* Delta data set ready */ +#define LPC214X_MSR_TERI (1 << 2) /* Trailing edge ring indicator */ +#define LPC214X_MSR_DDCD (1 << 3) /* Delta data carrier detect */ +#define LPC214X_MSR_CTS (1 << 4) /* Clear to send */ +#define LPC214X_MSR_DSR (1 << 5) /* Data set ready */ +#define LPC214X_MSR_RI (1 << 6) /* Ring indicator */ +#define LPC214X_MSR_DCD (1 << 7) /* Data carrier detect */ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Global Function Prototypes + ************************************************************************************/ + +#endif /* __LPC214X_UART_H */ diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h index 67774f1fb0..814622ef51 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_usbdev.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h b/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h index 912019e280..520c6037ae 100755 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc214x/lpc214x_vic.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/Make.defs b/nuttx/arch/arm/src/lpc2378/Make.defs index 2b444d317d..9126fa2a1a 100755 --- a/nuttx/arch/arm/src/lpc2378/Make.defs +++ b/nuttx/arch/arm/src/lpc2378/Make.defs @@ -7,7 +7,7 @@ # This file is part of the NuttX RTOS and based on the lpc2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/chip.h b/nuttx/arch/arm/src/lpc2378/chip.h index d371c12f05..6113f21e81 100755 --- a/nuttx/arch/arm/src/lpc2378/chip.h +++ b/nuttx/arch/arm/src/lpc2378/chip.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/internal.h b/nuttx/arch/arm/src/lpc2378/internal.h index 7abd987009..5a0e63b621 100755 --- a/nuttx/arch/arm/src/lpc2378/internal.h +++ b/nuttx/arch/arm/src/lpc2378/internal.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c index 100502a221..a55ed339d0 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h index ecf629d842..f18bd685a8 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c index 10f188cbaf..96e94c4546 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_lowputc.S b/nuttx/arch/arm/src/lpc2378/lpc23xx_lowputc.S index 1d88b77fb4..cc332a9615 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_lowputc.S +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_lowputc.S @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h index 04c6507b1b..10a97c7f1a 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h index e80f8e23ed..d876ef6ecb 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h index 28439e2201..4de1b3fff2 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c index 5e8d5696d0..d9e63d6d6e 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h index e493a0abd8..2c8999bfa3 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h @@ -1,231 +1,231 @@ -/************************************************************************************ - * arch/arm/src/lpc2378/lpc2378/uart.h - * - * Copyright (C) 2010 Rommel Marcelo. All rights reserved. - * Author: Rommel Marcelo - * - * This file is part of the NuttX RTOS and based on the lpc2148 port: - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H -#define __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include /* For clock settings */ - -/************************************************************************************ - * Definitions - ************************************************************************************/ -/* Derive baud divisor setting from clock settings (see board.h) */ -//--F_in = 57 600 000 Hz U0DLM=0, U0DLL=25, DIVADDVAL=3, MULVAL=12, baudrate=115200, err = 0.000000 % -//--F_in = 57 600 000 Hz U0DLM=1, U0DLL=119, DIVADDVAL=0, MULVAL=1, baudrate=9600, err = 0.000000 % -/* Used only if CONFIG_UART_MULVAL is not defined */ -#define DIVADDVAL 0 -#define MULVAL 1 -#define DLMVAL 1 -#define DLLVAL 119 - -/* UARTx PCLK divider valid values are 1,2,4 */ -#define U0_PCLKDIV 1 -//~ #define U1_PCLKDIV 1 -#define U2_PCLKDIV 1 -//~ #define U3_PCLKDIV 1 - - -#define U0_PCLK (CCLK / U0_PCLKDIV) -//~ #define U1_PCLK (CCLK / U1_PCLKDIV) -#define U2_PCLK (CCLK / U2_PCLKDIV) -//~ #define U3_PCLK (CCLK / U3_PCLKDIV) - -#define U0_PCLKSEL_MASK (0x000000C0) -#define U2_PCLKSEL_MASK (0x00030000) - -/* PCKLSEL0 bits 7:6, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2 */ -#ifdef U0_PCLKDIV -# if U0_PCLKDIV == 1 -# define U0_PCLKSEL (0x00000040) -# elif U0_PCLKDIV == 2 -# define U0_PCLKSEL (0x00000080) -# elif U0_PCLKDIV == 4 -# define U0_PCLKSEL (0x00000000) -# endif -#else -# error "UART0 PCLK divider not set" -#endif - -/* PCKLSEL1 bits 17:16, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2 */ -#ifdef U2_PCLKDIV -# if U2_PCLKDIV == 1 -# define U2_PCLKSEL (0x00010000) -# elif U2_PCLKDIV == 2 -# define U2_PCLKSEL (0x00020000) -# elif U2_PCLKDIV == 4 -# define U2_PCLKSEL (0x00000000) -# endif -#else -# error "UART2 PCLK divider not set" -#endif - - - - -/* Universal Asynchronous Receiver Transmitter Base Addresses */ -#define UART0_BASE_ADDR 0xE000C000 -#define UART1_BASE_ADDR 0xE0010000 -#define UART2_BASE_ADDR 0xE0078000 -#define UART3_BASE_ADDR 0xE007C000 - -/* UART 0/1/2/3 Register Offsets */ -#define UART_RBR_OFFSET 0x00 /* R: Receive Buffer Register (DLAB=0) */ -#define UART_THR_OFFSET 0x00 /* W: Transmit Holding Register (DLAB=0) */ -#define UART_DLL_OFFSET 0x00 /* W: Divisor Latch Register (LSB, DLAB=1) */ -#define UART_IER_OFFSET 0x04 /* W: Interrupt Enable Register (DLAB=0) */ -#define UART_DLM_OFFSET 0x04 /* RW: Divisor Latch Register (MSB, DLAB=1) */ -#define UART_IIR_OFFSET 0x08 /* R: Interrupt ID Register */ -#define UART_FCR_OFFSET 0x08 /* W: FIFO Control Register */ -#define UART_LCR_OFFSET 0x0c /* RW: Line Control Register */ -#define UART_MCR_OFFSET 0x10 /* RW: Modem Control REgister (2146/6/8 UART1 Only) */ -#define UART_LSR_OFFSET 0x14 /* R: Scratch Pad Register */ -#define UART_MSR_OFFSET 0x18 /* RW: MODEM Status Register (2146/6/8 UART1 Only) */ -#define UART_SCR_OFFSET 0x1c /* RW: Line Status Register */ -#define UART_ACR_OFFSET 0x20 /* RW: Autobaud Control Register */ -#define UART_FDR_OFFSET 0x28 /* RW: Fractional Divider Register */ -#define UART_TER_OFFSET 0x30 /* RW: Transmit Enable Register */ - -/* PINSEL0 bit definitions for UART0/2 */ - -#define UART0_PINSEL 0x00000050 /* PINSEL0 value for UART0 */ -#define UART0_PINMASK 0x000000F0 /* PINSEL0 mask for UART0 */ - -#define UART1_TX_PINSEL 0x40000000 /* PINSEL0 value for UART1 Tx */ -#define UART1_TXPINMASK 0xC0000000 /* PINSEL0 mask for UART1 Tx */ -#define UART1_RX_PINSEL 0x00000001 /* PINSEL1 value for UART1 Rx */ -#define UART1_RX_PINMASK 0x00000003 /* PINSEL1 mask for UART1 Rx */ -#define UART1_MODEM_PINSEL 0x00001555 /* PINSEL1 mask for UART1 Modem Interface */ -#define UART1_CTS_PINMASK 0x00003FFF /* PINSEL1 mask for UART1 Modem Interface */ -//~ #define UART1_CTS_PINSEL 0x00000004 /* PINSEL1 mask for UART1 CTS */ -//~ #define UART1_CTS_PINMASK 0x0000000C /* PINSEL1 mask for UART1 CTS */ -//~ #define UART1_CTS_PINSEL 0x00000010 /* PINSEL1 mask for UART1 Rx */ -//~ #define UART1_CTS_PINMASK 0x00000030 /* PINSEL1 mask for UART1 Rx */ -#define UART2_PINSEL 0x00500000 /* PINSEL0 value for UART2 */ -#define UART2_PINMASK 0x00F00000 /* PINSEL0 mask for UART2 */ - -#define UART3_PINSEL 0x0F000000 /* PINSEL9 value for UART3 */ -#define UART3_PINMASK 0x0F000000 /* PINSEL9 mask for UART3 */ - -/* Interrupt Enable Register (IER) bit definitions */ - -#define IER_ERBFI (1 << 0) /* Enable receive data available int */ -#define IER_ETBEI (1 << 1) /* Enable THR empty Interrupt */ -#define IER_ELSI (1 << 2) /* Enable receive line status int */ -#define IER_EDSSI (1 << 3) /* Enable MODEM atatus interrupt (2146/6/8 UART1 Only) */ -#define IER_ALLIE 0x0f /* All interrupts */ - -/* Interrupt ID Register(IIR) bit definitions */ - -#define IIR_NO_INT (1 << 0) /* No interrupts pending */ -#define IIR_MS_INT (0 << 1) /* MODEM Status (UART1 only) */ -#define IIR_THRE_INT (1 << 1) /* Transmit Holding Register Empty */ -#define IIR_RDA_INT (2 << 1) /* Receive Data Available */ -#define IIR_RLS_INT (3 << 1) /* Receive Line Status */ -#define IIR_CTI_INT (6 << 1) /* Character Timeout Indicator */ -#define IIR_MASK 0x0e - -/* FIFO Control Register (FCR) bit definitions */ - -#define FCR_FIFO_ENABLE (1 << 0) /* FIFO enable */ -#define FCR_RX_FIFO_RESET (1 << 1) /* Reset receive FIFO */ -#define FCR_TX_FIFO_RESET (1 << 2) /* Reset transmit FIFO */ -#define FCR_FIFO_TRIG1 (0 << 6) /* Trigger @1 character in FIFO */ -#define FCR_FIFO_TRIG4 (1 << 6) /* Trigger @4 characters in FIFO */ -#define FCR_FIFO_TRIG8 (2 << 6) /* Trigger @8 characters in FIFO */ -#define FCR_FIFO_TRIG14 (3 << 6) /* Trigger @14 characters in FIFO */ - -/* Line Control Register (LCR) bit definitions */ - -#define LCR_CHAR_5 (0 << 0) /* 5-bit character length */ -#define LCR_CHAR_6 (1 << 0) /* 6-bit character length */ -#define LCR_CHAR_7 (2 << 0) /* 7-bit character length */ -#define LCR_CHAR_8 (3 << 0) /* 8-bit character length */ -#define LCR_STOP_1 (0 << 2) /* 1 stop bit */ -#define LCR_STOP_2 (1 << 2) /* 2 stop bits */ -#define LCR_PAR_NONE (0 << 3) /* No parity */ -#define LCR_PAR_ODD (1 << 3) /* Odd parity */ -#define LCR_PAR_EVEN (3 << 3) /* Even parity */ -#define LCR_PAR_MARK (5 << 3) /* Mark "1" parity */ -#define LCR_PAR_SPACE (7 << 3) /* Space "0" parity */ -#define LCR_BREAK_ENABLE (1 << 6) /* Output BREAK */ -#define LCR_DLAB_ENABLE (1 << 7) /* Enable divisor latch access */ - -/* Modem Control Register (MCR) bit definitions */ - -#define MCR_DTR (1 << 0) /* Data terminal ready */ -#define MCR_RTS (1 << 1) /* Request to send */ -#define MCR_LB (1 << 4) /* Loopback */ - -/* Line Status Register (LSR) bit definitions */ - -#define LSR_RDR (1 << 0) /* Receive data ready */ -#define LSR_OE (1 << 1) /* Overrun error */ -#define LSR_PE (1 << 2) /* Parity error */ -#define LSR_FE (1 << 3) /* Framing error */ -#define LSR_BI (1 << 4) /* Break interrupt */ -#define LSR_THRE (1 << 5) /* THR empty */ -#define LSR_TEMT (1 << 6) /* Transmitter empty */ -#define LSR_RXFE (1 << 7) /* Error in receive FIFO */ -#define LSR_ERR_MASK 0x1e - -/* Modem Status Register (MSR) bit definitions */ - -#define MSR_DCTS (1 << 0) /* Delta clear to send */ -#define MSR_DDSR (1 << 1) /* Delta data set ready */ -#define MSR_TERI (1 << 2) /* Trailing edge ring indicator */ -#define MSR_DDCD (1 << 3) /* Delta data carrier detect */ -#define MSR_CTS (1 << 4) /* Clear to send */ -#define MSR_DSR (1 << 5) /* Data set ready */ -#define MSR_RI (1 << 6) /* Ring indicator */ -#define MSR_DCD (1 << 7) /* Data carrier detect */ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Global Function Prototypes - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H */ +/************************************************************************************ + * arch/arm/src/lpc2378/lpc2378/uart.h + * + * Copyright (C) 2010 Rommel Marcelo. All rights reserved. + * Author: Rommel Marcelo + * + * This file is part of the NuttX RTOS and based on the lpc2148 port: + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H +#define __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include /* For clock settings */ + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Derive baud divisor setting from clock settings (see board.h) */ +//--F_in = 57 600 000 Hz U0DLM=0, U0DLL=25, DIVADDVAL=3, MULVAL=12, baudrate=115200, err = 0.000000 % +//--F_in = 57 600 000 Hz U0DLM=1, U0DLL=119, DIVADDVAL=0, MULVAL=1, baudrate=9600, err = 0.000000 % +/* Used only if CONFIG_UART_MULVAL is not defined */ +#define DIVADDVAL 0 +#define MULVAL 1 +#define DLMVAL 1 +#define DLLVAL 119 + +/* UARTx PCLK divider valid values are 1,2,4 */ +#define U0_PCLKDIV 1 +//~ #define U1_PCLKDIV 1 +#define U2_PCLKDIV 1 +//~ #define U3_PCLKDIV 1 + + +#define U0_PCLK (CCLK / U0_PCLKDIV) +//~ #define U1_PCLK (CCLK / U1_PCLKDIV) +#define U2_PCLK (CCLK / U2_PCLKDIV) +//~ #define U3_PCLK (CCLK / U3_PCLKDIV) + +#define U0_PCLKSEL_MASK (0x000000C0) +#define U2_PCLKSEL_MASK (0x00030000) + +/* PCKLSEL0 bits 7:6, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2 */ +#ifdef U0_PCLKDIV +# if U0_PCLKDIV == 1 +# define U0_PCLKSEL (0x00000040) +# elif U0_PCLKDIV == 2 +# define U0_PCLKSEL (0x00000080) +# elif U0_PCLKDIV == 4 +# define U0_PCLKSEL (0x00000000) +# endif +#else +# error "UART0 PCLK divider not set" +#endif + +/* PCKLSEL1 bits 17:16, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2 */ +#ifdef U2_PCLKDIV +# if U2_PCLKDIV == 1 +# define U2_PCLKSEL (0x00010000) +# elif U2_PCLKDIV == 2 +# define U2_PCLKSEL (0x00020000) +# elif U2_PCLKDIV == 4 +# define U2_PCLKSEL (0x00000000) +# endif +#else +# error "UART2 PCLK divider not set" +#endif + + + + +/* Universal Asynchronous Receiver Transmitter Base Addresses */ +#define UART0_BASE_ADDR 0xE000C000 +#define UART1_BASE_ADDR 0xE0010000 +#define UART2_BASE_ADDR 0xE0078000 +#define UART3_BASE_ADDR 0xE007C000 + +/* UART 0/1/2/3 Register Offsets */ +#define UART_RBR_OFFSET 0x00 /* R: Receive Buffer Register (DLAB=0) */ +#define UART_THR_OFFSET 0x00 /* W: Transmit Holding Register (DLAB=0) */ +#define UART_DLL_OFFSET 0x00 /* W: Divisor Latch Register (LSB, DLAB=1) */ +#define UART_IER_OFFSET 0x04 /* W: Interrupt Enable Register (DLAB=0) */ +#define UART_DLM_OFFSET 0x04 /* RW: Divisor Latch Register (MSB, DLAB=1) */ +#define UART_IIR_OFFSET 0x08 /* R: Interrupt ID Register */ +#define UART_FCR_OFFSET 0x08 /* W: FIFO Control Register */ +#define UART_LCR_OFFSET 0x0c /* RW: Line Control Register */ +#define UART_MCR_OFFSET 0x10 /* RW: Modem Control REgister (2146/6/8 UART1 Only) */ +#define UART_LSR_OFFSET 0x14 /* R: Scratch Pad Register */ +#define UART_MSR_OFFSET 0x18 /* RW: MODEM Status Register (2146/6/8 UART1 Only) */ +#define UART_SCR_OFFSET 0x1c /* RW: Line Status Register */ +#define UART_ACR_OFFSET 0x20 /* RW: Autobaud Control Register */ +#define UART_FDR_OFFSET 0x28 /* RW: Fractional Divider Register */ +#define UART_TER_OFFSET 0x30 /* RW: Transmit Enable Register */ + +/* PINSEL0 bit definitions for UART0/2 */ + +#define UART0_PINSEL 0x00000050 /* PINSEL0 value for UART0 */ +#define UART0_PINMASK 0x000000F0 /* PINSEL0 mask for UART0 */ + +#define UART1_TX_PINSEL 0x40000000 /* PINSEL0 value for UART1 Tx */ +#define UART1_TXPINMASK 0xC0000000 /* PINSEL0 mask for UART1 Tx */ +#define UART1_RX_PINSEL 0x00000001 /* PINSEL1 value for UART1 Rx */ +#define UART1_RX_PINMASK 0x00000003 /* PINSEL1 mask for UART1 Rx */ +#define UART1_MODEM_PINSEL 0x00001555 /* PINSEL1 mask for UART1 Modem Interface */ +#define UART1_CTS_PINMASK 0x00003FFF /* PINSEL1 mask for UART1 Modem Interface */ +//~ #define UART1_CTS_PINSEL 0x00000004 /* PINSEL1 mask for UART1 CTS */ +//~ #define UART1_CTS_PINMASK 0x0000000C /* PINSEL1 mask for UART1 CTS */ +//~ #define UART1_CTS_PINSEL 0x00000010 /* PINSEL1 mask for UART1 Rx */ +//~ #define UART1_CTS_PINMASK 0x00000030 /* PINSEL1 mask for UART1 Rx */ +#define UART2_PINSEL 0x00500000 /* PINSEL0 value for UART2 */ +#define UART2_PINMASK 0x00F00000 /* PINSEL0 mask for UART2 */ + +#define UART3_PINSEL 0x0F000000 /* PINSEL9 value for UART3 */ +#define UART3_PINMASK 0x0F000000 /* PINSEL9 mask for UART3 */ + +/* Interrupt Enable Register (IER) bit definitions */ + +#define IER_ERBFI (1 << 0) /* Enable receive data available int */ +#define IER_ETBEI (1 << 1) /* Enable THR empty Interrupt */ +#define IER_ELSI (1 << 2) /* Enable receive line status int */ +#define IER_EDSSI (1 << 3) /* Enable MODEM atatus interrupt (2146/6/8 UART1 Only) */ +#define IER_ALLIE 0x0f /* All interrupts */ + +/* Interrupt ID Register(IIR) bit definitions */ + +#define IIR_NO_INT (1 << 0) /* No interrupts pending */ +#define IIR_MS_INT (0 << 1) /* MODEM Status (UART1 only) */ +#define IIR_THRE_INT (1 << 1) /* Transmit Holding Register Empty */ +#define IIR_RDA_INT (2 << 1) /* Receive Data Available */ +#define IIR_RLS_INT (3 << 1) /* Receive Line Status */ +#define IIR_CTI_INT (6 << 1) /* Character Timeout Indicator */ +#define IIR_MASK 0x0e + +/* FIFO Control Register (FCR) bit definitions */ + +#define FCR_FIFO_ENABLE (1 << 0) /* FIFO enable */ +#define FCR_RX_FIFO_RESET (1 << 1) /* Reset receive FIFO */ +#define FCR_TX_FIFO_RESET (1 << 2) /* Reset transmit FIFO */ +#define FCR_FIFO_TRIG1 (0 << 6) /* Trigger @1 character in FIFO */ +#define FCR_FIFO_TRIG4 (1 << 6) /* Trigger @4 characters in FIFO */ +#define FCR_FIFO_TRIG8 (2 << 6) /* Trigger @8 characters in FIFO */ +#define FCR_FIFO_TRIG14 (3 << 6) /* Trigger @14 characters in FIFO */ + +/* Line Control Register (LCR) bit definitions */ + +#define LCR_CHAR_5 (0 << 0) /* 5-bit character length */ +#define LCR_CHAR_6 (1 << 0) /* 6-bit character length */ +#define LCR_CHAR_7 (2 << 0) /* 7-bit character length */ +#define LCR_CHAR_8 (3 << 0) /* 8-bit character length */ +#define LCR_STOP_1 (0 << 2) /* 1 stop bit */ +#define LCR_STOP_2 (1 << 2) /* 2 stop bits */ +#define LCR_PAR_NONE (0 << 3) /* No parity */ +#define LCR_PAR_ODD (1 << 3) /* Odd parity */ +#define LCR_PAR_EVEN (3 << 3) /* Even parity */ +#define LCR_PAR_MARK (5 << 3) /* Mark "1" parity */ +#define LCR_PAR_SPACE (7 << 3) /* Space "0" parity */ +#define LCR_BREAK_ENABLE (1 << 6) /* Output BREAK */ +#define LCR_DLAB_ENABLE (1 << 7) /* Enable divisor latch access */ + +/* Modem Control Register (MCR) bit definitions */ + +#define MCR_DTR (1 << 0) /* Data terminal ready */ +#define MCR_RTS (1 << 1) /* Request to send */ +#define MCR_LB (1 << 4) /* Loopback */ + +/* Line Status Register (LSR) bit definitions */ + +#define LSR_RDR (1 << 0) /* Receive data ready */ +#define LSR_OE (1 << 1) /* Overrun error */ +#define LSR_PE (1 << 2) /* Parity error */ +#define LSR_FE (1 << 3) /* Framing error */ +#define LSR_BI (1 << 4) /* Break interrupt */ +#define LSR_THRE (1 << 5) /* THR empty */ +#define LSR_TEMT (1 << 6) /* Transmitter empty */ +#define LSR_RXFE (1 << 7) /* Error in receive FIFO */ +#define LSR_ERR_MASK 0x1e + +/* Modem Status Register (MSR) bit definitions */ + +#define MSR_DCTS (1 << 0) /* Delta clear to send */ +#define MSR_DDSR (1 << 1) /* Delta data set ready */ +#define MSR_TERI (1 << 2) /* Trailing edge ring indicator */ +#define MSR_DDCD (1 << 3) /* Delta data carrier detect */ +#define MSR_CTS (1 << 4) /* Clear to send */ +#define MSR_DSR (1 << 5) /* Data set ready */ +#define MSR_RI (1 << 6) /* Ring indicator */ +#define MSR_DCD (1 << 7) /* Data carrier detect */ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Global Function Prototypes + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_UART_H */ diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h index 964c93ed9f..c8b9871a1a 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h @@ -7,7 +7,7 @@ * This file is part of the NuttX RTOS and based on the lpc2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc43xx/chip/lpc43_qei.h b/nuttx/arch/arm/src/lpc43xx/chip/lpc43_qei.h index 5e110ce154..9994c4e9e7 100644 --- a/nuttx/arch/arm/src/lpc43xx/chip/lpc43_qei.h +++ b/nuttx/arch/arm/src/lpc43xx/chip/lpc43_qei.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc43xx/lpc43_qei.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c index b4ca554204..a40d6492de 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.c @@ -7,7 +7,7 @@ * Part of the NuttX OS and based, in part, on the LPC31xx USB driver: * * Authors: David Hewson - * Gregory Nutt + * Gregory Nutt * * Which, in turn, was based on the LPC2148 USB driver: * diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h index 94a2a64eac..fae22d3230 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_usb0dev.h @@ -2,7 +2,7 @@ * arch/arm/src/lpc43xx/lpc43_usbdev.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/chip.h b/nuttx/arch/arm/src/sam3u/chip.h index 7e18e45c91..865cad5eac 100644 --- a/nuttx/arch/arm/src/sam3u/chip.h +++ b/nuttx/arch/arm/src/sam3u/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/sam3u/chip.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_adc.h b/nuttx/arch/arm/src/sam3u/sam3u_adc.h index 6b1f9552e8..4701c0c481 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_adc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_adc.h @@ -1,236 +1,236 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_adc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* ADC register offsets ****************************************************************/ - -#define SAM3U_ADC_CR_OFFSET 0x00 /* Control Register (Both) */ -#define SAM3U_ADC_MR_OFFSET 0x04 /* Mode Register (Both) */ - /* 0x08: Reserved */ - /* 0x0c: Reserved */ -#define SAM3U_ADC_CHER_OFFSET 0x10 /* Channel Enable Register (Both) */ -#define SAM3U_ADC_CHDR_OFFSET 0x14 /* Channel Disable Register (Both) */ -#define SAM3U_ADC_CHSR_OFFSET 0x18 /* Channel Status Register (Both) */ -#define SAM3U_ADC_SR_OFFSET 0x1c /* Status Register (Both) */ -#define SAM3U_ADC_LCDR_OFFSET 0x20 /* Last Converted Data Register (Both) */ -#define SAM3U_ADC_IER_OFFSET 0x24 /* Interrupt Enable Register (Both) */ -#define SAM3U_ADC_IDR_OFFSET 0x28 /* Interrupt Disable Register (Both) */ -#define SAM3U_ADC_IMR_OFFSET 0x2c /* Interrupt Mask Register (Both) */ -#define SAM3U_ADC_CDR_OFFSET(n) (0x30+((n)<<2)) -#define SAM3U_ADC_CDR0_OFFSET 0x30 /* Channel Data Register 0 (Both) */ -#define SAM3U_ADC_CDR1_OFFSET 0x34 /* Channel Data Register 1 (Both) */ -#define SAM3U_ADC_CDR2_OFFSET 0x38 /* Channel Data Register 2 (Both) */ -#define SAM3U_ADC_CDR3_OFFSET 0x3c /* Channel Data Register 3 (Both) */ -#define SAM3U_ADC_CDR4_OFFSET 0x40 /* Channel Data Register 4 (Both) */ -#define SAM3U_ADC_CDR5_OFFSET 0x44 /* Channel Data Register 5 (Both) */ -#define SAM3U_ADC_CDR6_OFFSET 0x48 /* Channel Data Register 6 (Both) */ -#define SAM3U_ADC_CDR7_OFFSET 0x4c /* Channel Data Register 7 (Both) */ -#define SAM3U_ADC12B_ACR_OFFSET 0x64 /* Analog Control Register (ADC12B only) */ -#define SAM3U_ADC12B_EMR_OFFSET 0x68 /* Extended Mode Register (ADC12B only) */ - -/* ADC register adresses ***************************************************************/ - -#define SAM3U_ADC12B_CR (SAM3U_ADC12B_BASE+SAM3U_ADC_CR_OFFSET) -#define SAM3U_ADC12B_MR (SAM3U_ADC12B_BASE+SAM3U_ADC_MR_OFFSET) -#define SAM3U_ADC12B_CHER (SAM3U_ADC12B_BASE+SAM3U_ADC_CHER_OFFSET) -#define SAM3U_ADC12B_CHDR (SAM3U_ADC12B_BASE+SAM3U_ADC_CHDR_OFFSET) -#define SAM3U_ADC12B_CHSR (SAM3U_ADC12B_BASE+SAM3U_ADC_CHSR_OFFSET) -#define SAM3U_ADC12B_SR (SAM3U_ADC12B_BASE+SAM3U_ADC_SR_OFFSET) -#define SAM3U_ADC12B_LCDR_ (SAM3U_ADC12B_BASE+SAM3U_ADC_LCDR_OFFSET) -#define SAM3U_ADC12B_IER (SAM3U_ADC12B_BASE+SAM3U_ADC_IER_OFFSET) -#define SAM3U_ADC12B_IDR (SAM3U_ADC12B_BASE+SAM3U_ADC_IDR_OFFSET) -#define SAM3U_ADC12B_IMR (SAM3U_ADC12B_BASE+SAM3U_ADC_IMR_OFFSET) -#define SAM3U_ADC12B_CDR(n)) (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR_OFFSET(n)) -#define SAM3U_ADC12B_CDR0 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR0_OFFSET) -#define SAM3U_ADC12B_CDR1 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR1_OFFSET) -#define SAM3U_ADC12B_CDR2 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR2_OFFSET) -#define SAM3U_ADC12B_CDR3 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR3_OFFSET) -#define SAM3U_ADC12B_CDR4 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR4_OFFSET) -#define SAM3U_ADC12B_CDR5 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR5_OFFSET) -#define SAM3U_ADC12B_CDR6 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR6_OFFSET) -#define SAM3U_ADC12B_CDR7 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR7_OFFSET) -#define SAM3U_ADC12B_ACR (SAM3U_ADC12B_BASE+SAM3U_ADC12B_ACR_OFFSET) -#define SAM3U_ADC12B_EMR (SAM3U_ADC12B_BASE+SAM3U_ADC12B_EMR_OFFSET) - -#define SAM3U_ADC_CR (SAM3U_ADC_BASE+SAM3U_ADC_CR_OFFSET) -#define SAM3U_ADC_MR (SAM3U_ADC_BASE+SAM3U_ADC_MR_OFFSET) -#define SAM3U_ADC_CHER (SAM3U_ADC_BASE+SAM3U_ADC_CHER_OFFSET) -#define SAM3U_ADC_CHDR (SAM3U_ADC_BASE+SAM3U_ADC_CHDR_OFFSET) -#define SAM3U_ADC_CHSR (SAM3U_ADC_BASE+SAM3U_ADC_CHSR_OFFSET) -#define SAM3U_ADC_SR (SAM3U_ADC_BASE+SAM3U_ADC_SR_OFFSET) -#define SAM3U_ADC_LCDR (SAM3U_ADC_BASE+SAM3U_ADC_LCDR_OFFSET) -#define SAM3U_ADC_IER (SAM3U_ADC_BASE+SAM3U_ADC_IER_OFFSET) -#define SAM3U_ADC_IDR (SAM3U_ADC_BASE+SAM3U_ADC_IDR_OFFSET) -#define SAM3U_ADC_IMR (SAM3U_ADC_BASE+SAM3U_ADC_IMR_OFFSET) -#define SAM3U_ADC_CDR(n)) (SAM3U_ADC_BASE+SAM3U_ADC_CDR_OFFSET(n)) -#define SAM3U_ADC_CDR0 (SAM3U_ADC_BASE+SAM3U_ADC_CDR0_OFFSET) -#define SAM3U_ADC_CDR1 (SAM3U_ADC_BASE+SAM3U_ADC_CDR1_OFFSET) -#define SAM3U_ADC_CDR2 (SAM3U_ADC_BASE+SAM3U_ADC_CDR2_OFFSET) -#define SAM3U_ADC_CDR3 (SAM3U_ADC_BASE+SAM3U_ADC_CDR3_OFFSET) -#define SAM3U_ADC_CDR4 (SAM3U_ADC_BASE+SAM3U_ADC_CDR4_OFFSET) -#define SAM3U_ADC_CDR5 (SAM3U_ADC_BASE+SAM3U_ADC_CDR5_OFFSET) -#define SAM3U_ADC_CDR6 (SAM3U_ADC_BASE+SAM3U_ADC_CDR6_OFFSET) -#define SAM3U_ADC_CDR7 (SAM3U_ADC_BASE+SAM3U_ADC_CDR7_OFFSET) - -/* ADC register bit definitions ********************************************************/ - -/* ADC12B Control Register and ADC(10B) Control Register common bit-field definitions */ - -#define ADC_CR_SWRST (1 << 0) /* Bit 0: Software Reset */ -#define ADC_CR_START (1 << 1) /* Bit 1: Start Conversion */ - -/* ADC12B Mode Register and ADC(10B) Mode Register common bit-field definitions */ - -#define ADC_MR_TRGEN (1 << 0) /* Bit 0: Trigger Enable */ -#define ADC_MR_TRGSEL_SHIFT (1) /* Bits 1-3: Trigger Selection */ -#define ADC_MR_TRGSEL_MASK (7 << ADC_MR_TRGSEL_SHIFT) -#define ADC_MR_LOWRES (1 << 4) /* Bit 4: Resolution */ -#define ADC_MR_SLEEP (1 << 5) /* Bit 5: Sleep Mode */ -#define ADC_MR_PRESCAL_SHIFT (8) /* Bits 8-15: Prescaler Rate Selection */ -#define ADC_MR_PRESCAL_MASK (0xff << ADC_MR_PRESCAL_SHIFT) -#define ADB12B_MRSTARTUP_SHIFT (16) /* Bits 16-23: Start Up Time (ADC12B) */ -#define ADB12B_MRSTARTUP_MASK (0xff << ADB12B_MRSTARTUP_SHIFT -#define ADB10B_MRSTARTUP_SHIFT (16) /* Bits 16-22: Start Up Time (ADC10B) */ -#define ADB10B_MRSTARTUP_MASK (0x7f << ADB10B_MRSTARTUP_SHIFT) -#define ADC_MR_SHTIM_SHIFT (24) /* Bits 24-27: Sample & Hold Time */ -#define ADC_MR_SHTIM_MASK (15 << ADC_MR_SHTIM_SHIFT) - -/* ADC12B Channel Enable Register, ADC12B Channel Disable Register, ADC12B Channel - * Status Register, ADC(10B) Channel Enable Register, ADC(10B) Channel Disable Register, - * and ADC(10B) Channel Status Register common bit-field definitions - */ - -#define ADC_CH(n) (1 << (n)) -#define ADC_CH0 (1 << 0) /* Bit 0: Channel x Enable */ -#define ADC_CH1 (1 << 1) /* Bit 1: Channel x Enable */ -#define ADC_CH2 (1 << 2) /* Bit 2: Channel x Enable */ -#define ADC_CH3 (1 << 3) /* Bit 3: Channel x Enable */ -#define ADC_CH4 (1 << 4) /* Bit 4: Channel x Enable */ -#define ADC_CH5 (1 << 5) /* Bit 5: Channel x Enable */ -#define ADC_CH6 (1 << 6) /* Bit 6: Channel x Enable */ -#define ADC_CH7 (1 << 7) /* Bit 7: Channel x Enable */ - -/* ADC12B Analog Control Register (ADC12B only) */ - -#define ADC12B_ACR_GAIN_SHIFT (0) /* Bits 0-1: Input Gain */ -#define ADC12B_ACR_GAIN_MASK (3 << ADC12B_ACR_GAIN_SHIFT) -#define ADC12B_ACR_IBCTL_SHIFT (8) /* Bits 8-9: Bias Current Control */ -#define ADC12B_ACR_IBCTL_MASK (3 << ADC12B_ACR_IBCTL_SHIFT) -#define ADC12B_ACR_DIFF (1 << 16) /* Bit 16: Differential Mode */ -#define ADC12B_ACR_OFFSET (1 << 17) /* Bit 17: Input OFFSET */ - -/* ADC12B Extended Mode Register (ADC12B only) */ - -#define ADC12B_EMR_OFFMODES (1 << 0) /* Bit 0: Off Mode if Sleep Bit (ADC12B_MR) = 1 */ -#define ADC12B_EMR_OFFMSTIME_SHIFT (16) /* Bits 16-23: Startup Time */ -#define ADC12B_EMR_OFFMSTIME_MASK (0xff << ADC12B_EMR_OFFMSTIME_SHIFT) - -/* ADC12B Status Register , ADC12B Interrupt Enable Register, ADC12B Interrupt - * Disable Register, ADC12B Interrupt Mask Register, ADC(10B) Status Register, - * ADC(10B) Interrupt Enable Register, ADC(10B) Interrupt Disable Register, and - * ADC(10B) Interrupt Mask Register common bit-field definitions - */ - -#define ADC_INT_EOC(n) (1<<(n)) -#define ADC_INT_EOC0 (1 << 0) /* Bit 0: End of Conversion 0 */ -#define ADC_INT_EOC1 (1 << 1) /* Bit 1: End of Conversion 1 */ -#define ADC_INT_EOC2 (1 << 2) /* Bit 2: End of Conversion 2 */ -#define ADC_INT_EOC3 (1 << 3) /* Bit 3: End of Conversion 3 */ -#define ADC_INT_EOC4 (1 << 4) /* Bit 4: End of Conversion 4 */ -#define ADC_INT_EOC5 (1 << 5) /* Bit 5: End of Conversion 5 */ -#define ADC_INT_EOC6 (1 << 6) /* Bit 6: End of Conversion 6 */ -#define ADC_INT_EOC7 (1 << 7) /* Bit 0: End of Conversion 7 */ -#define ADC_INT_OVRE(n) (1<<((n)+8)) -#define ADC_INT_OVRE0 (1 << 8) /* Bit 8: Overrun Error 0 */ -#define ADC_INT_OVRE1 (1 << 9) /* Bit 9: Overrun Error 1 */ -#define ADC_INT_OVRE2 (1 << 10) /* Bit 10: Overrun Error 2 */ -#define ADC_INT_OVRE3 (1 << 11) /* Bit 11: Overrun Error 3 */ -#define ADC_INT_OVRE4 (1 << 12) /* Bit 12: Overrun Error 4 */ -#define ADC_INT_OVRE5 (1 << 13) /* Bit 13: Overrun Error 5 */ -#define ADC_INT_OVRE6 (1 << 14) /* Bit 14: Overrun Error 6 */ -#define ADC_INT_OVRE7 (1 << 15) /* Bit 15: Overrun Error 7 */ -#define ADC_INT_DRDY (1 << 16) /* Bit 16: Data Ready */ -#define ADC_INT_GOVRE (1 << 17) /* Bit 17: General Overrun Error */ -#define ADC_INT_ENDRX (1 << 18) /* Bit 18: End of RX Buffer */ -#define ADC_INT_RXBUFF (1 << 19) /* Bit 19: RX Buffer Full */ - -/* ADC12B Last Converted Data Register */ - -#define ADC12B_LCDR_DATA_SHIFT (0) /* Bits 0-11: Last Data Converted */ -#define ADC12B_LCDR_DATA_MASK (0xfff << ADC12B_LCDR_DATA_SHIFT) - -/* ADC(10B) Last Converted Data Register */ - -#define ADC10B_LCDR_DATA_SHIFT (0) /* Bits 0-9: Last Data Converted */ -#define ADC10B_LCDR_DATA_MASK (0x1ff << ADC10B_LCDR_DATA_SHIFT) - -/* ADC12B Channel Data Register */ - -#define ADC12B_CDR_DATA_SHIFT (0) /* Bits 0-11: Converted Data */ -#define ADC12B_CDR_DATA_MASK (0xfff << ADC12B_CDR_DATA_SHIFT) - -/* ADC(10B) Channel Data Register */ - -#define ADC10B_CDR_DATA_SHIFT (0) /* Bits 0-9: Converted Data */ -#define ADC10B_CDR_DATA_MASK (0x1ff << ADC10B_CDR_DATA_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_adc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* ADC register offsets ****************************************************************/ + +#define SAM3U_ADC_CR_OFFSET 0x00 /* Control Register (Both) */ +#define SAM3U_ADC_MR_OFFSET 0x04 /* Mode Register (Both) */ + /* 0x08: Reserved */ + /* 0x0c: Reserved */ +#define SAM3U_ADC_CHER_OFFSET 0x10 /* Channel Enable Register (Both) */ +#define SAM3U_ADC_CHDR_OFFSET 0x14 /* Channel Disable Register (Both) */ +#define SAM3U_ADC_CHSR_OFFSET 0x18 /* Channel Status Register (Both) */ +#define SAM3U_ADC_SR_OFFSET 0x1c /* Status Register (Both) */ +#define SAM3U_ADC_LCDR_OFFSET 0x20 /* Last Converted Data Register (Both) */ +#define SAM3U_ADC_IER_OFFSET 0x24 /* Interrupt Enable Register (Both) */ +#define SAM3U_ADC_IDR_OFFSET 0x28 /* Interrupt Disable Register (Both) */ +#define SAM3U_ADC_IMR_OFFSET 0x2c /* Interrupt Mask Register (Both) */ +#define SAM3U_ADC_CDR_OFFSET(n) (0x30+((n)<<2)) +#define SAM3U_ADC_CDR0_OFFSET 0x30 /* Channel Data Register 0 (Both) */ +#define SAM3U_ADC_CDR1_OFFSET 0x34 /* Channel Data Register 1 (Both) */ +#define SAM3U_ADC_CDR2_OFFSET 0x38 /* Channel Data Register 2 (Both) */ +#define SAM3U_ADC_CDR3_OFFSET 0x3c /* Channel Data Register 3 (Both) */ +#define SAM3U_ADC_CDR4_OFFSET 0x40 /* Channel Data Register 4 (Both) */ +#define SAM3U_ADC_CDR5_OFFSET 0x44 /* Channel Data Register 5 (Both) */ +#define SAM3U_ADC_CDR6_OFFSET 0x48 /* Channel Data Register 6 (Both) */ +#define SAM3U_ADC_CDR7_OFFSET 0x4c /* Channel Data Register 7 (Both) */ +#define SAM3U_ADC12B_ACR_OFFSET 0x64 /* Analog Control Register (ADC12B only) */ +#define SAM3U_ADC12B_EMR_OFFSET 0x68 /* Extended Mode Register (ADC12B only) */ + +/* ADC register adresses ***************************************************************/ + +#define SAM3U_ADC12B_CR (SAM3U_ADC12B_BASE+SAM3U_ADC_CR_OFFSET) +#define SAM3U_ADC12B_MR (SAM3U_ADC12B_BASE+SAM3U_ADC_MR_OFFSET) +#define SAM3U_ADC12B_CHER (SAM3U_ADC12B_BASE+SAM3U_ADC_CHER_OFFSET) +#define SAM3U_ADC12B_CHDR (SAM3U_ADC12B_BASE+SAM3U_ADC_CHDR_OFFSET) +#define SAM3U_ADC12B_CHSR (SAM3U_ADC12B_BASE+SAM3U_ADC_CHSR_OFFSET) +#define SAM3U_ADC12B_SR (SAM3U_ADC12B_BASE+SAM3U_ADC_SR_OFFSET) +#define SAM3U_ADC12B_LCDR_ (SAM3U_ADC12B_BASE+SAM3U_ADC_LCDR_OFFSET) +#define SAM3U_ADC12B_IER (SAM3U_ADC12B_BASE+SAM3U_ADC_IER_OFFSET) +#define SAM3U_ADC12B_IDR (SAM3U_ADC12B_BASE+SAM3U_ADC_IDR_OFFSET) +#define SAM3U_ADC12B_IMR (SAM3U_ADC12B_BASE+SAM3U_ADC_IMR_OFFSET) +#define SAM3U_ADC12B_CDR(n)) (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR_OFFSET(n)) +#define SAM3U_ADC12B_CDR0 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR0_OFFSET) +#define SAM3U_ADC12B_CDR1 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR1_OFFSET) +#define SAM3U_ADC12B_CDR2 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR2_OFFSET) +#define SAM3U_ADC12B_CDR3 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR3_OFFSET) +#define SAM3U_ADC12B_CDR4 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR4_OFFSET) +#define SAM3U_ADC12B_CDR5 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR5_OFFSET) +#define SAM3U_ADC12B_CDR6 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR6_OFFSET) +#define SAM3U_ADC12B_CDR7 (SAM3U_ADC12B_BASE+SAM3U_ADC_CDR7_OFFSET) +#define SAM3U_ADC12B_ACR (SAM3U_ADC12B_BASE+SAM3U_ADC12B_ACR_OFFSET) +#define SAM3U_ADC12B_EMR (SAM3U_ADC12B_BASE+SAM3U_ADC12B_EMR_OFFSET) + +#define SAM3U_ADC_CR (SAM3U_ADC_BASE+SAM3U_ADC_CR_OFFSET) +#define SAM3U_ADC_MR (SAM3U_ADC_BASE+SAM3U_ADC_MR_OFFSET) +#define SAM3U_ADC_CHER (SAM3U_ADC_BASE+SAM3U_ADC_CHER_OFFSET) +#define SAM3U_ADC_CHDR (SAM3U_ADC_BASE+SAM3U_ADC_CHDR_OFFSET) +#define SAM3U_ADC_CHSR (SAM3U_ADC_BASE+SAM3U_ADC_CHSR_OFFSET) +#define SAM3U_ADC_SR (SAM3U_ADC_BASE+SAM3U_ADC_SR_OFFSET) +#define SAM3U_ADC_LCDR (SAM3U_ADC_BASE+SAM3U_ADC_LCDR_OFFSET) +#define SAM3U_ADC_IER (SAM3U_ADC_BASE+SAM3U_ADC_IER_OFFSET) +#define SAM3U_ADC_IDR (SAM3U_ADC_BASE+SAM3U_ADC_IDR_OFFSET) +#define SAM3U_ADC_IMR (SAM3U_ADC_BASE+SAM3U_ADC_IMR_OFFSET) +#define SAM3U_ADC_CDR(n)) (SAM3U_ADC_BASE+SAM3U_ADC_CDR_OFFSET(n)) +#define SAM3U_ADC_CDR0 (SAM3U_ADC_BASE+SAM3U_ADC_CDR0_OFFSET) +#define SAM3U_ADC_CDR1 (SAM3U_ADC_BASE+SAM3U_ADC_CDR1_OFFSET) +#define SAM3U_ADC_CDR2 (SAM3U_ADC_BASE+SAM3U_ADC_CDR2_OFFSET) +#define SAM3U_ADC_CDR3 (SAM3U_ADC_BASE+SAM3U_ADC_CDR3_OFFSET) +#define SAM3U_ADC_CDR4 (SAM3U_ADC_BASE+SAM3U_ADC_CDR4_OFFSET) +#define SAM3U_ADC_CDR5 (SAM3U_ADC_BASE+SAM3U_ADC_CDR5_OFFSET) +#define SAM3U_ADC_CDR6 (SAM3U_ADC_BASE+SAM3U_ADC_CDR6_OFFSET) +#define SAM3U_ADC_CDR7 (SAM3U_ADC_BASE+SAM3U_ADC_CDR7_OFFSET) + +/* ADC register bit definitions ********************************************************/ + +/* ADC12B Control Register and ADC(10B) Control Register common bit-field definitions */ + +#define ADC_CR_SWRST (1 << 0) /* Bit 0: Software Reset */ +#define ADC_CR_START (1 << 1) /* Bit 1: Start Conversion */ + +/* ADC12B Mode Register and ADC(10B) Mode Register common bit-field definitions */ + +#define ADC_MR_TRGEN (1 << 0) /* Bit 0: Trigger Enable */ +#define ADC_MR_TRGSEL_SHIFT (1) /* Bits 1-3: Trigger Selection */ +#define ADC_MR_TRGSEL_MASK (7 << ADC_MR_TRGSEL_SHIFT) +#define ADC_MR_LOWRES (1 << 4) /* Bit 4: Resolution */ +#define ADC_MR_SLEEP (1 << 5) /* Bit 5: Sleep Mode */ +#define ADC_MR_PRESCAL_SHIFT (8) /* Bits 8-15: Prescaler Rate Selection */ +#define ADC_MR_PRESCAL_MASK (0xff << ADC_MR_PRESCAL_SHIFT) +#define ADB12B_MRSTARTUP_SHIFT (16) /* Bits 16-23: Start Up Time (ADC12B) */ +#define ADB12B_MRSTARTUP_MASK (0xff << ADB12B_MRSTARTUP_SHIFT +#define ADB10B_MRSTARTUP_SHIFT (16) /* Bits 16-22: Start Up Time (ADC10B) */ +#define ADB10B_MRSTARTUP_MASK (0x7f << ADB10B_MRSTARTUP_SHIFT) +#define ADC_MR_SHTIM_SHIFT (24) /* Bits 24-27: Sample & Hold Time */ +#define ADC_MR_SHTIM_MASK (15 << ADC_MR_SHTIM_SHIFT) + +/* ADC12B Channel Enable Register, ADC12B Channel Disable Register, ADC12B Channel + * Status Register, ADC(10B) Channel Enable Register, ADC(10B) Channel Disable Register, + * and ADC(10B) Channel Status Register common bit-field definitions + */ + +#define ADC_CH(n) (1 << (n)) +#define ADC_CH0 (1 << 0) /* Bit 0: Channel x Enable */ +#define ADC_CH1 (1 << 1) /* Bit 1: Channel x Enable */ +#define ADC_CH2 (1 << 2) /* Bit 2: Channel x Enable */ +#define ADC_CH3 (1 << 3) /* Bit 3: Channel x Enable */ +#define ADC_CH4 (1 << 4) /* Bit 4: Channel x Enable */ +#define ADC_CH5 (1 << 5) /* Bit 5: Channel x Enable */ +#define ADC_CH6 (1 << 6) /* Bit 6: Channel x Enable */ +#define ADC_CH7 (1 << 7) /* Bit 7: Channel x Enable */ + +/* ADC12B Analog Control Register (ADC12B only) */ + +#define ADC12B_ACR_GAIN_SHIFT (0) /* Bits 0-1: Input Gain */ +#define ADC12B_ACR_GAIN_MASK (3 << ADC12B_ACR_GAIN_SHIFT) +#define ADC12B_ACR_IBCTL_SHIFT (8) /* Bits 8-9: Bias Current Control */ +#define ADC12B_ACR_IBCTL_MASK (3 << ADC12B_ACR_IBCTL_SHIFT) +#define ADC12B_ACR_DIFF (1 << 16) /* Bit 16: Differential Mode */ +#define ADC12B_ACR_OFFSET (1 << 17) /* Bit 17: Input OFFSET */ + +/* ADC12B Extended Mode Register (ADC12B only) */ + +#define ADC12B_EMR_OFFMODES (1 << 0) /* Bit 0: Off Mode if Sleep Bit (ADC12B_MR) = 1 */ +#define ADC12B_EMR_OFFMSTIME_SHIFT (16) /* Bits 16-23: Startup Time */ +#define ADC12B_EMR_OFFMSTIME_MASK (0xff << ADC12B_EMR_OFFMSTIME_SHIFT) + +/* ADC12B Status Register , ADC12B Interrupt Enable Register, ADC12B Interrupt + * Disable Register, ADC12B Interrupt Mask Register, ADC(10B) Status Register, + * ADC(10B) Interrupt Enable Register, ADC(10B) Interrupt Disable Register, and + * ADC(10B) Interrupt Mask Register common bit-field definitions + */ + +#define ADC_INT_EOC(n) (1<<(n)) +#define ADC_INT_EOC0 (1 << 0) /* Bit 0: End of Conversion 0 */ +#define ADC_INT_EOC1 (1 << 1) /* Bit 1: End of Conversion 1 */ +#define ADC_INT_EOC2 (1 << 2) /* Bit 2: End of Conversion 2 */ +#define ADC_INT_EOC3 (1 << 3) /* Bit 3: End of Conversion 3 */ +#define ADC_INT_EOC4 (1 << 4) /* Bit 4: End of Conversion 4 */ +#define ADC_INT_EOC5 (1 << 5) /* Bit 5: End of Conversion 5 */ +#define ADC_INT_EOC6 (1 << 6) /* Bit 6: End of Conversion 6 */ +#define ADC_INT_EOC7 (1 << 7) /* Bit 0: End of Conversion 7 */ +#define ADC_INT_OVRE(n) (1<<((n)+8)) +#define ADC_INT_OVRE0 (1 << 8) /* Bit 8: Overrun Error 0 */ +#define ADC_INT_OVRE1 (1 << 9) /* Bit 9: Overrun Error 1 */ +#define ADC_INT_OVRE2 (1 << 10) /* Bit 10: Overrun Error 2 */ +#define ADC_INT_OVRE3 (1 << 11) /* Bit 11: Overrun Error 3 */ +#define ADC_INT_OVRE4 (1 << 12) /* Bit 12: Overrun Error 4 */ +#define ADC_INT_OVRE5 (1 << 13) /* Bit 13: Overrun Error 5 */ +#define ADC_INT_OVRE6 (1 << 14) /* Bit 14: Overrun Error 6 */ +#define ADC_INT_OVRE7 (1 << 15) /* Bit 15: Overrun Error 7 */ +#define ADC_INT_DRDY (1 << 16) /* Bit 16: Data Ready */ +#define ADC_INT_GOVRE (1 << 17) /* Bit 17: General Overrun Error */ +#define ADC_INT_ENDRX (1 << 18) /* Bit 18: End of RX Buffer */ +#define ADC_INT_RXBUFF (1 << 19) /* Bit 19: RX Buffer Full */ + +/* ADC12B Last Converted Data Register */ + +#define ADC12B_LCDR_DATA_SHIFT (0) /* Bits 0-11: Last Data Converted */ +#define ADC12B_LCDR_DATA_MASK (0xfff << ADC12B_LCDR_DATA_SHIFT) + +/* ADC(10B) Last Converted Data Register */ + +#define ADC10B_LCDR_DATA_SHIFT (0) /* Bits 0-9: Last Data Converted */ +#define ADC10B_LCDR_DATA_MASK (0x1ff << ADC10B_LCDR_DATA_SHIFT) + +/* ADC12B Channel Data Register */ + +#define ADC12B_CDR_DATA_SHIFT (0) /* Bits 0-11: Converted Data */ +#define ADC12B_CDR_DATA_MASK (0xfff << ADC12B_CDR_DATA_SHIFT) + +/* ADC(10B) Channel Data Register */ + +#define ADC10B_CDR_DATA_SHIFT (0) /* Bits 0-9: Converted Data */ +#define ADC10B_CDR_DATA_MASK (0x1ff << ADC10B_CDR_DATA_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_ADC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c b/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c index f266fd7549..1f4b5fdd2b 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_allocateheap.c @@ -2,7 +2,7 @@ * arch/arm/src/common/sam3u_allocateheap.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_chipid.h b/nuttx/arch/arm/src/sam3u/sam3u_chipid.h index 9ef007d278..03071d77ae 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_chipid.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_chipid.h @@ -1,167 +1,167 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_chipid.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* CHIPID register offsets **************************************************************/ - -#define SAM3U_CHIPID_CIDR 0x00 /* Chip ID Register */ -#define SAM3U_CHIPID_EXID 0x04 /* Chip ID Extension Register */ - -/* CHIPID register adresses *************************************************************/ - -#define SAM3U_CHIPID_CIDR (SAM3U_CHIPID_BASE+SAM3U_CHIPID_CIDR) -#define SAM3U_CHIPID_EXID (SAM3U_CHIPID_BASE+SAM3U_CHIPID_EXID) - -/* CHIPID register bit definitions ******************************************************/ - -#define CHIPID_CIDR_VERSION_SHIFT (0) /* Bits 0-4: Version of the Device */ -#define CHIPID_CIDR_VERSION_MASK (0x1f << CHIPID_CIDR_VERSION_SHIFT) -#define CHIPID_CIDR_EPROC_SHIFT (5) /* Bits 5-7: Embedded Processor */ -#define CHIPID_CIDR_EPROC_MASK (7 << CHIPID_CIDR_EPROC_SHIFT) -# define CHIPID_CIDR_EPROC_ARM946ES (1 << CHIPID_CIDR_EPROC_SHIFT) /* ARM946E-S */ -# define CHIPID_CIDR_EPROC_ARM7TDMI (2 << CHIPID_CIDR_EPROC_SHIFT) /* ARM7TDMI */ -# define CHIPID_CIDR_EPROC_CORTEXM3 (3 << CHIPID_CIDR_EPROC_SHIFT) /* Cortex-M3 */ -# define CHIPID_CIDR_EPROC_ARM920T (4 << CHIPID_CIDR_EPROC_SHIFT) /* ARM920T */ -# define CHIPID_CIDR_EPROC_ARM926EJS (5 << CHIPID_CIDR_EPROC_SHIFT) /* ARM926EJ-S */ -#define CHIPID_CIDR_NVPSIZ_SHIFT (8) /* Bits 8-11: Nonvolatile Program Memory Size */ -#define CHIPID_CIDR_NVPSIZ_MASK (15 << CHIPID_CIDR_NVPSIZ_SHIFT) -# define CHIPID_CIDR_NVPSIZ_NONE (0 << CHIPID_CIDR_NVPSIZ_SHIFT) /* None */ -# define CHIPID_CIDR_NVPSIZ_8KB (1 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 8K bytes */ -# define CHIPID_CIDR_NVPSIZ_16KB (2 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 16K bytes */ -# define CHIPID_CIDR_NVPSIZ_32KB (3 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 32K bytes */ -# define CHIPID_CIDR_NVPSIZ_64KB (5 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 64K bytes */ -# define CHIPID_CIDR_NVPSIZ_128KB (7 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 128K bytes */ -# define CHIPID_CIDR_NVPSIZ_256KB (9 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 256K bytes */ -# define CHIPID_CIDR_NVPSIZ_512KB (10 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 512K bytes */ -# define CHIPID_CIDR_NVPSIZ_1MB (12 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 1024K bytes */ -# define CHIPID_CIDR_NVPSIZ_2MB (14 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 2048K bytes */ -#define CHIPID_CIDR_NVPSIZ2_SHIFT (12) /* Bits 12-15: Nonvolatile Program Memory Size */ -#define CHIPID_CIDR_NVPSIZ2_MASK (15 << CHIPID_CIDR_NVPSIZ_SHIFT) -# define CHIPID_CIDR_NVPSIZ2_NONE (0 << CHIPID_CIDR_NVPSIZ_SHIFT) /* None */ -# define CHIPID_CIDR_NVPSIZ2_8KB (1 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 8K bytes */ -# define CHIPID_CIDR_NVPSIZ2_16KB (2 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 16K bytes */ -# define CHIPID_CIDR_NVPSIZ2_32KB (3 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 32K bytes */ -# define CHIPID_CIDR_NVPSIZ2_64KB (5 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 64K bytes */ -# define CHIPID_CIDR_NVPSIZ2_128KB (7 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 128K bytes */ -# define CHIPID_CIDR_NVPSIZ2_256KB (9 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 256K bytes */ -# define CHIPID_CIDR_NVPSIZ2_512KB (10 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 512K bytes */ -# define CHIPID_CIDR_NVPSIZ2_1MB (12 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 1024K bytes */ -# define CHIPID_CIDR_NVPSIZ2_2MB (14 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 2048K bytes */ -#define CHIPID_CIDR_SRAMSIZ_SHIFT (16) /* Bits 16-19: Internal SRAM Size */ -#define CHIPID_CIDR_SRAMSIZ_MASK (15 << CHIPID_CIDR_SRAMSIZ_SHIFT) -# define CHIPID_CIDR_SRAMSIZ_48KB (0 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 48K bytes */ -# define CHIPID_CIDR_SRAMSIZ_1KB (1 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 1K bytes */ -# define CHIPID_CIDR_SRAMSIZ_2KB (2 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 2K bytes */ -# define CHIPID_CIDR_SRAMSIZ_6KB (3 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 6K bytes */ -# define CHIPID_CIDR_SRAMSIZ_112KB (4 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 112K bytes */ -# define CHIPID_CIDR_SRAMSIZ_4KB (5 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 4K bytes */ -# define CHIPID_CIDR_SRAMSIZ_80KB (6 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 80K bytes */ -# define CHIPID_CIDR_SRAMSIZ_160KB (7 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 160K bytes */ -# define CHIPID_CIDR_SRAMSIZ_8KB (8 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 8K bytes */ -# define CHIPID_CIDR_SRAMSIZ_16KB (9 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 16K bytes */ -# define CHIPID_CIDR_SRAMSIZ_32KB (10 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 32K bytes */ -# define CHIPID_CIDR_SRAMSIZ_64KB (11 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 64K bytes */ -# define CHIPID_CIDR_SRAMSIZ_128KB (12 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 128K bytes */ -# define CHIPID_CIDR_SRAMSIZ_256KB (13 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 256K bytes */ -# define CHIPID_CIDR_SRAMSIZ_96KB (14 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 96K bytes */ -# define CHIPID_CIDR_SRAMSIZ_512KB (15 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 512K bytes */ -#define CHIPID_CIDR_ARCH_SHIFT (20) /* Bits 20-27: Architecture Identifier */ -#define CHIPID_CIDR_ARCH_MASK (0xff << CHIPID_CIDR_ARCH_SHIFT) -# define CHIPID_CIDR_ARCH_AT91SAM9XX (0x19 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM9xx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM9XEXX (0x29 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM9XExx Series */ -# define CHIPID_CIDR_ARCH_AT91X34 (0x34 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x34 Series */ -# define CHIPID_CIDR_ARCH_CAP7 (0x37 << CHIPID_CIDR_ARCH_SHIFT) /* CAP7 Series */ -# define CHIPID_CIDR_ARCH_CAP9 (0x39 << CHIPID_CIDR_ARCH_SHIFT) /* CAP9 Series */ -# define CHIPID_CIDR_ARCH_CAP11 (0x3b << CHIPID_CIDR_ARCH_SHIFT) /* CAP11 Series */ -# define CHIPID_CIDR_ARCH_AT91X40 (0x40 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x40 Series */ -# define CHIPID_CIDR_ARCH_AT91X42 (0x42 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x42 Series */ -# define CHIPID_CIDR_ARCH_AT91X55 (0x55 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x55 Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7AXX (0x60 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Axx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7AQXX (0x61 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7AQxx Series */ -# define CHIPID_CIDR_ARCH_AT91X63 (0x63 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x63 Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7SXX (0x70 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Sxx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7XCXX (0x71 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7XCxx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7SEXX (0x72 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7SExx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7LXX (0x73 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Lxx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7XXX (0x75 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Xxx Series */ -# define CHIPID_CIDR_ARCH_AT91SAM7SLXX (0x76 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7SLxx Series */ -# define CHIPID_CIDR_ARCH_SAM3UXC (0x80 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3UxC Series (100-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3UXE (0x81 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3UxE Series (144-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3AXC (0x83 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3AxC Series (100-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3XXC (0x84 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxC Series (100-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3XXE (0x85 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxE Series (144-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3XXG (0x86 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxG Series (208/217-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3SXA (0x88 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxA Series (48-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3SXB (0x89 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxB Series (64-pin version) */ -# define CHIPID_CIDR_ARCH_SAM3SXC (0x8a << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxC Series (100-pin version) */ -# define CHIPID_CIDR_ARCH_AT91X92 (0x92 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x92 Series */ -# define CHIPID_CIDR_ARCH_AT75CXX (0xf0 << CHIPID_CIDR_ARCH_SHIFT) /* AT75Cxx Series */ -#define CHIPID_CIDR_NVPTYP_SHIFT (28) /* Bits 28-30: Nonvolatile Program Memory Type */ -#define CHIPID_CIDR_NVPTYP_MASK (7 << CHIPID_CIDR_NVPTYP_SHIFT) -# define CHIPID_CIDR_NVPTYP ROM (0 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROM */ -# define CHIPID_CIDR_NVPTYP FLASH (1 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROMless or on-chip Flash */ -# define CHIPID_CIDR_NVPTYP SRAM (4 << CHIPID_CIDR_NVPTYP_SHIFT) /* SRAM emulating ROM */ -# define CHIPID_CIDR_NVPTYP EFLASH (2 << CHIPID_CIDR_NVPTYP_SHIFT) /* Embedded Flash Memory */ -# define CHIPID_CIDR_NVPTYP REFLASH (3 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROM and Embedded Flash Memory */ -#define CHIPID_CIDR_EXT (1 << 31) /* Bit 31: Extension Flag */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_chipid.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* CHIPID register offsets **************************************************************/ + +#define SAM3U_CHIPID_CIDR 0x00 /* Chip ID Register */ +#define SAM3U_CHIPID_EXID 0x04 /* Chip ID Extension Register */ + +/* CHIPID register adresses *************************************************************/ + +#define SAM3U_CHIPID_CIDR (SAM3U_CHIPID_BASE+SAM3U_CHIPID_CIDR) +#define SAM3U_CHIPID_EXID (SAM3U_CHIPID_BASE+SAM3U_CHIPID_EXID) + +/* CHIPID register bit definitions ******************************************************/ + +#define CHIPID_CIDR_VERSION_SHIFT (0) /* Bits 0-4: Version of the Device */ +#define CHIPID_CIDR_VERSION_MASK (0x1f << CHIPID_CIDR_VERSION_SHIFT) +#define CHIPID_CIDR_EPROC_SHIFT (5) /* Bits 5-7: Embedded Processor */ +#define CHIPID_CIDR_EPROC_MASK (7 << CHIPID_CIDR_EPROC_SHIFT) +# define CHIPID_CIDR_EPROC_ARM946ES (1 << CHIPID_CIDR_EPROC_SHIFT) /* ARM946E-S */ +# define CHIPID_CIDR_EPROC_ARM7TDMI (2 << CHIPID_CIDR_EPROC_SHIFT) /* ARM7TDMI */ +# define CHIPID_CIDR_EPROC_CORTEXM3 (3 << CHIPID_CIDR_EPROC_SHIFT) /* Cortex-M3 */ +# define CHIPID_CIDR_EPROC_ARM920T (4 << CHIPID_CIDR_EPROC_SHIFT) /* ARM920T */ +# define CHIPID_CIDR_EPROC_ARM926EJS (5 << CHIPID_CIDR_EPROC_SHIFT) /* ARM926EJ-S */ +#define CHIPID_CIDR_NVPSIZ_SHIFT (8) /* Bits 8-11: Nonvolatile Program Memory Size */ +#define CHIPID_CIDR_NVPSIZ_MASK (15 << CHIPID_CIDR_NVPSIZ_SHIFT) +# define CHIPID_CIDR_NVPSIZ_NONE (0 << CHIPID_CIDR_NVPSIZ_SHIFT) /* None */ +# define CHIPID_CIDR_NVPSIZ_8KB (1 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 8K bytes */ +# define CHIPID_CIDR_NVPSIZ_16KB (2 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 16K bytes */ +# define CHIPID_CIDR_NVPSIZ_32KB (3 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 32K bytes */ +# define CHIPID_CIDR_NVPSIZ_64KB (5 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 64K bytes */ +# define CHIPID_CIDR_NVPSIZ_128KB (7 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 128K bytes */ +# define CHIPID_CIDR_NVPSIZ_256KB (9 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 256K bytes */ +# define CHIPID_CIDR_NVPSIZ_512KB (10 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 512K bytes */ +# define CHIPID_CIDR_NVPSIZ_1MB (12 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 1024K bytes */ +# define CHIPID_CIDR_NVPSIZ_2MB (14 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 2048K bytes */ +#define CHIPID_CIDR_NVPSIZ2_SHIFT (12) /* Bits 12-15: Nonvolatile Program Memory Size */ +#define CHIPID_CIDR_NVPSIZ2_MASK (15 << CHIPID_CIDR_NVPSIZ_SHIFT) +# define CHIPID_CIDR_NVPSIZ2_NONE (0 << CHIPID_CIDR_NVPSIZ_SHIFT) /* None */ +# define CHIPID_CIDR_NVPSIZ2_8KB (1 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 8K bytes */ +# define CHIPID_CIDR_NVPSIZ2_16KB (2 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 16K bytes */ +# define CHIPID_CIDR_NVPSIZ2_32KB (3 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 32K bytes */ +# define CHIPID_CIDR_NVPSIZ2_64KB (5 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 64K bytes */ +# define CHIPID_CIDR_NVPSIZ2_128KB (7 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 128K bytes */ +# define CHIPID_CIDR_NVPSIZ2_256KB (9 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 256K bytes */ +# define CHIPID_CIDR_NVPSIZ2_512KB (10 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 512K bytes */ +# define CHIPID_CIDR_NVPSIZ2_1MB (12 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 1024K bytes */ +# define CHIPID_CIDR_NVPSIZ2_2MB (14 << CHIPID_CIDR_NVPSIZ_SHIFT) /* 2048K bytes */ +#define CHIPID_CIDR_SRAMSIZ_SHIFT (16) /* Bits 16-19: Internal SRAM Size */ +#define CHIPID_CIDR_SRAMSIZ_MASK (15 << CHIPID_CIDR_SRAMSIZ_SHIFT) +# define CHIPID_CIDR_SRAMSIZ_48KB (0 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 48K bytes */ +# define CHIPID_CIDR_SRAMSIZ_1KB (1 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 1K bytes */ +# define CHIPID_CIDR_SRAMSIZ_2KB (2 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 2K bytes */ +# define CHIPID_CIDR_SRAMSIZ_6KB (3 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 6K bytes */ +# define CHIPID_CIDR_SRAMSIZ_112KB (4 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 112K bytes */ +# define CHIPID_CIDR_SRAMSIZ_4KB (5 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 4K bytes */ +# define CHIPID_CIDR_SRAMSIZ_80KB (6 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 80K bytes */ +# define CHIPID_CIDR_SRAMSIZ_160KB (7 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 160K bytes */ +# define CHIPID_CIDR_SRAMSIZ_8KB (8 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 8K bytes */ +# define CHIPID_CIDR_SRAMSIZ_16KB (9 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 16K bytes */ +# define CHIPID_CIDR_SRAMSIZ_32KB (10 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 32K bytes */ +# define CHIPID_CIDR_SRAMSIZ_64KB (11 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 64K bytes */ +# define CHIPID_CIDR_SRAMSIZ_128KB (12 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 128K bytes */ +# define CHIPID_CIDR_SRAMSIZ_256KB (13 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 256K bytes */ +# define CHIPID_CIDR_SRAMSIZ_96KB (14 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 96K bytes */ +# define CHIPID_CIDR_SRAMSIZ_512KB (15 << CHIPID_CIDR_SRAMSIZ_SHIFT) /* 512K bytes */ +#define CHIPID_CIDR_ARCH_SHIFT (20) /* Bits 20-27: Architecture Identifier */ +#define CHIPID_CIDR_ARCH_MASK (0xff << CHIPID_CIDR_ARCH_SHIFT) +# define CHIPID_CIDR_ARCH_AT91SAM9XX (0x19 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM9xx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM9XEXX (0x29 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM9XExx Series */ +# define CHIPID_CIDR_ARCH_AT91X34 (0x34 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x34 Series */ +# define CHIPID_CIDR_ARCH_CAP7 (0x37 << CHIPID_CIDR_ARCH_SHIFT) /* CAP7 Series */ +# define CHIPID_CIDR_ARCH_CAP9 (0x39 << CHIPID_CIDR_ARCH_SHIFT) /* CAP9 Series */ +# define CHIPID_CIDR_ARCH_CAP11 (0x3b << CHIPID_CIDR_ARCH_SHIFT) /* CAP11 Series */ +# define CHIPID_CIDR_ARCH_AT91X40 (0x40 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x40 Series */ +# define CHIPID_CIDR_ARCH_AT91X42 (0x42 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x42 Series */ +# define CHIPID_CIDR_ARCH_AT91X55 (0x55 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x55 Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7AXX (0x60 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Axx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7AQXX (0x61 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7AQxx Series */ +# define CHIPID_CIDR_ARCH_AT91X63 (0x63 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x63 Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7SXX (0x70 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Sxx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7XCXX (0x71 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7XCxx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7SEXX (0x72 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7SExx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7LXX (0x73 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Lxx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7XXX (0x75 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7Xxx Series */ +# define CHIPID_CIDR_ARCH_AT91SAM7SLXX (0x76 << CHIPID_CIDR_ARCH_SHIFT) /* AT91SAM7SLxx Series */ +# define CHIPID_CIDR_ARCH_SAM3UXC (0x80 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3UxC Series (100-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3UXE (0x81 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3UxE Series (144-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3AXC (0x83 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3AxC Series (100-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3XXC (0x84 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxC Series (100-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3XXE (0x85 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxE Series (144-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3XXG (0x86 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3XxG Series (208/217-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3SXA (0x88 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxA Series (48-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3SXB (0x89 << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxB Series (64-pin version) */ +# define CHIPID_CIDR_ARCH_SAM3SXC (0x8a << CHIPID_CIDR_ARCH_SHIFT) /* SAM3SxC Series (100-pin version) */ +# define CHIPID_CIDR_ARCH_AT91X92 (0x92 << CHIPID_CIDR_ARCH_SHIFT) /* AT91x92 Series */ +# define CHIPID_CIDR_ARCH_AT75CXX (0xf0 << CHIPID_CIDR_ARCH_SHIFT) /* AT75Cxx Series */ +#define CHIPID_CIDR_NVPTYP_SHIFT (28) /* Bits 28-30: Nonvolatile Program Memory Type */ +#define CHIPID_CIDR_NVPTYP_MASK (7 << CHIPID_CIDR_NVPTYP_SHIFT) +# define CHIPID_CIDR_NVPTYP ROM (0 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROM */ +# define CHIPID_CIDR_NVPTYP FLASH (1 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROMless or on-chip Flash */ +# define CHIPID_CIDR_NVPTYP SRAM (4 << CHIPID_CIDR_NVPTYP_SHIFT) /* SRAM emulating ROM */ +# define CHIPID_CIDR_NVPTYP EFLASH (2 << CHIPID_CIDR_NVPTYP_SHIFT) /* Embedded Flash Memory */ +# define CHIPID_CIDR_NVPTYP REFLASH (3 << CHIPID_CIDR_NVPTYP_SHIFT) /* ROM and Embedded Flash Memory */ +#define CHIPID_CIDR_EXT (1 << 31) /* Bit 31: Extension Flag */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_CHIPID_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_clockconfig.c b/nuttx/arch/arm/src/sam3u/sam3u_clockconfig.c index 0093368e9f..c9ddba9649 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_clockconfig.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_clockconfig.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/sam3u_clockconfig.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_dmac.c b/nuttx/arch/arm/src/sam3u/sam3u_dmac.c index 8bb186e91b..e3958af745 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_dmac.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_dmac.c @@ -2,7 +2,7 @@ * arch/arm/src/sam3u-ek/sam3u_dmac.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_dmac.h b/nuttx/arch/arm/src/sam3u/sam3u_dmac.h index 523eaf6863..9edf61df74 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_dmac.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_dmac.h @@ -1,441 +1,441 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_dmac.h - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* DMAC register offsets ****************************************************************/ - -/* Global Registers */ - -#define SAM3U_DMAC_GCFG_OFFSET 0x00 /* DMAC Global Configuration Register */ -#define SAM3U_DMAC_EN_OFFSET 0x04 /* DMAC Enable Register */ -#define SAM3U_DMAC_SREQ_OFFSET 0x08 /* DMAC Software Single Request Register */ -#define SAM3U_DMAC_CREQ_OFFSET 0x0c /* DMAC Software Chunk Transfer Request Register */ -#define SAM3U_DMAC_LAST_OFFSET 0x10 /* DMAC Software Last Transfer Flag Register */ - /* 0x014-0x18: Reserved */ -#define SAM3U_DMAC_EBCIER_OFFSET 0x18 /* DMAC Error Enable */ -#define SAM3U_DMAC_EBCIDR_OFFSET 0x1C /* DMAC Error Disable */ -#define SAM3U_DMAC_EBCIMR_OFFSET 0x20 /* DMAC Error Mask */ -#define SAM3U_DMAC_EBCISR_OFFSET 0x24 /* DMAC Error Status */ -#define SAM3U_DMAC_CHER_OFFSET 0x28 /* DMAC Channel Handler Enable Register */ -#define SAM3U_DMAC_CHDR_OFFSET 0x2c /* DMAC Channel Handler Disable Register */ -#define SAM3U_DMAC_CHSR_OFFSET 0x30 /* DMAC Channel Handler Status Register */ - /* 0x034-0x38: Reserved */ -/* DMA channel registers */ - -#define SAM3U_DMACHAN_OFFSET(n) (0x3c+((n)*0x28)) -#define SAM3U_DMACHAN0_OFFSET 0x3c /* 0x3c-0x60: Channel 0 */ -#define SAM3U_DMACHAN1_OFFSET 0x64 /* 0x64-0x88: Channel 1 */ -#define SAM3U_DMACHAN2_OFFSET 0x8c /* 0x8c-0xb0: Channel 2 */ -#define SAM3U_DMACHAN3_OFFSET 0xb4 /* 0xb4-0xd8: Channel 3 */ - -#define SAM3U_DMACHAN_SADDR_OFFSET 0x00 /* DMAC Channel Source Address Register */ -#define SAM3U_DMACHAN_DADDR_OFFSET 0x04 /* DMAC Channel Destination Address Register */ -#define SAM3U_DMACHAN_DSCR_OFFSET 0x08 /* DMAC Channel Descriptor Address Register */ -#define SAM3U_DMACHAN_CTRLA_OFFSET 0x0c /* DMAC Channel Control A Register */ -#define SAM3U_DMACHAN_CTRLB_OFFSET 0x10 /* DMAC Channel Control B Register */ -#define SAM3U_DMACHAN_CFG_OFFSET 0x14 /* DMAC Channel Configuration Register */ - /* 0x18-0x24: Reserved */ - - /* 0x017c-0x1fc: Reserved */ - -/* DMAC register adresses ***************************************************************/ - -/* Global Registers */ - -#define SAM3U_DMAC_GCFG (SAM3U_DMAC_BASE+SAM3U_DMAC_GCFG_OFFSET) -#define SAM3U_DMAC_EN (SAM3U_DMAC_BASE+SAM3U_DMAC_EN_OFFSET) -#define SAM3U_DMAC_SREQ (SAM3U_DMAC_BASE+SAM3U_DMAC_SREQ_OFFSET) -#define SAM3U_DMAC_CREQ (SAM3U_DMAC_BASE+SAM3U_DMAC_CREQ_OFFSET) -#define SAM3U_DMAC_LAST (SAM3U_DMAC_BASE+SAM3U_DMAC_LAST_OFFSET) -#define SAM3U_DMAC_EBCIER (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIER_OFFSET) -#define SAM3U_DMAC_EBCIDR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIDR_OFFSET) -#define SAM3U_DMAC_EBCIMR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIMR_OFFSET) -#define SAM3U_DMAC_EBCISR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCISR_OFFSET) -#define SAM3U_DMAC_CHER (SAM3U_DMAC_BASE+SAM3U_DMAC_CHER_OFFSET) -#define SAM3U_DMAC_CHDR (SAM3U_DMAC_BASE+SAM3U_DMAC_CHDR_OFFSET) -#define SAM3U_DMAC_CHSR (SAM3U_DMAC_BASE+SAM3U_DMAC_CHSR_OFFSET) - -/* DMA channel registers */ - -#define SAM3U_DMACHAN_BASE(n) (SAM3U_DMAC_BASE+SAM3U_DMACHAN_OFFSET(n)) -#define SAM3U_DMACHAN0_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN0_OFFSET) -#define SAM3U_DMACHAN1_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN1_OFFSET) -#define SAM3U_DMACHAN2_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN2_OFFSET) -#define SAM3U_DMACHAN3_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN3_OFFSET) - -#define SAM3U_DMACHAN_SADDR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_SADDR_OFFSET) -#define SAM3U_DMACHAN_DADDR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_DADDR_OFFSET) -#define SAM3U_DMACHAN_DSCR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_DSCR_OFFSET) -#define SAM3U_DMACHAN_CTRLA(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CTRLA_OFFSET) -#define SAM3U_DMACHAN_CTRLB(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CTRLB_OFFSET) -#define SAM3U_DMACHAN_CFG(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CFG_OFFSET) - -#define SAM3U_DMACHAN0_SADDR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_SADDR_OFFSET) -#define SAM3U_DMACHAN0_DADDR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_DADDR_OFFSET) -#define SAM3U_DMACHAN0_DSCR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_DSCR_OFFSET) -#define SAM3U_DMACHAN0_CTRLA (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) -#define SAM3U_DMACHAN0_CTRLB (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) -#define SAM3U_DMACHAN0_CFG (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CFG_OFFSET) - -#define SAM3U_DMACHAN1_SADDR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_SADDR_OFFSET) -#define SAM3U_DMACHAN1_DADDR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_DADDR_OFFSET) -#define SAM3U_DMACHAN1_DSCR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_DSCR_OFFSET) -#define SAM3U_DMACHAN1_CTRLA (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) -#define SAM3U_DMACHAN1_CTRLB (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) -#define SAM3U_DMACHAN1_CFG (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CFG_OFFSET) - -#define SAM3U_DMACHAN2_SADDR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_SADDR_OFFSET) -#define SAM3U_DMACHAN2_DADDR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_DADDR_OFFSET) -#define SAM3U_DMACHAN2_DSCR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_DSCR_OFFSET) -#define SAM3U_DMACHAN2_CTRLA (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) -#define SAM3U_DMACHAN2_CTRLB (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) -#define SAM3U_DMACHAN2_CFG (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CFG_OFFSET) - -#define SAM3U_DMACHAN3_SADDR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_SADDR_OFFSET) -#define SAM3U_DMACHAN3_DADDR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_DADDR_OFFSET) -#define SAM3U_DMACHAN3_DSCR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_DSCR_OFFSET) -#define SAM3U_DMACHAN3_CTRLA (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) -#define SAM3U_DMACHAN3_CTRLB (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) -#define SAM3U_DMACHAN3_CFG (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CFG_OFFSET) - -/* DMAC register bit definitions ********************************************************/ - -/* Global Registers */ - -/* DMAC Global Configuration Register */ - -#define DMAC_GCFG_ARB_CFG (1 << 4) /* Bit 4: Round robin (vs fixed) arbiter */ - -/* DMAC Enable Register */ - -#define DMAC_EN_ENABLE (1 << 0) /* Bit 0: DMA controller enable */ - -/* DMAC Software Single Request Register */ - -#define DMAC_SREQ_SHIFT(n) ((n)<<1) -#define DMAC_SREQ_MASK(n) (3 << DMAC_SREQ_SHIFT(n)) -#define DMAC_SREQ0_SHIFT (0) /* Bits 0-1: Channel 0 */ -#define DMAC_SREQ0_MASK (3 << DMAC_SREQ0_SHIFT) -#define DMAC_SREQ1_SHIFT (2) /* Bits 2-3: Channel 1 */ -#define DMAC_SREQ1_MASK (3 << DMAC_SREQ1_SHIFT) -#define DMAC_SREQ2_SHIFT (4) /* Bits 4-5: Channel 2 */ -#define DMAC_SREQ2_MASK (3 << DMAC_SREQ2_SHIFT) -#define DMAC_SREQ3_SHIFT (6) /* Bits 6-7: Channel 3 */ -#define DMAC_SREQ3_MASK (3 << DMAC_SREQ3_SHIFT) - -#define DMAC_SREQ_SSREQ_SHIFT (0) /* Bits 0, 2, 4, 6: Request a source single transfer */ -# define DMAC_SREQ_SSREQ(n) (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ_SHIFT(n))) -# define DMAC_SREQ_SSREQ0 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ0_SHIFT) -# define DMAC_SREQ_SSREQ1 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ1_SHIFT) -# define DMAC_SREQ_SSREQ2 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ2_SHIFT) -# define DMAC_SREQ_SSREQ3 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ3_SHIFT) -#define DMAC_SREQ_DSREQ_SHIFT (1) /* Bits 1, 3, 5, 7: Request a destination single transfer */ -# define DMAC_SREQ_DSREQ(n) (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ_SHIFT(n)))) -# define DMAC_SREQ_DSREQ0 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ0_SHIFT) -# define DMAC_SREQ_DSREQ1 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ1_SHIFT) -# define DMAC_SREQ_DSREQ2 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ2_SHIFT) -# define DMAC_SREQ_DSREQ3 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ3_SHIFT) - -/* DMAC Software Chunk Transfer Request Register */ - -#define DMAC_CREQ_SHIFT(n) ((n)<<1) -#define DMAC_CREQ_MASK(n) (3 << DMAC_CREQ_SHIFT(n)) -#define DMAC_CREQ0_SHIFT (0) /* Bits 0-1: Channel 0 */ -#define DMAC_CREQ0_MASK (3 << DMAC_CREQ0_SHIFT) -#define DMAC_CREQ1_SHIFT (2) /* Bits 2-3: Channel 1 */ -#define DMAC_CREQ1_MASK (3 << DMAC_CREQ1_SHIFT) -#define DMAC_CREQ2_SHIFT (4) /* Bits 4-5: Channel 2 */ -#define DMAC_CREQ2_MASK (3 << DMAC_CREQ2_SHIFT) -#define DMAC_CREQ3_SHIFT (6) /* Bits 6-7: Channel 3 */ -#define DMAC_CREQ3_MASK (3 << DMAC_CREQ3_SHIFT) - -#define DMAC_CREQ_SCREQ_SHIFT (0) /* Bits 0, 2, 4, 6: Request a source chunk transfer */ -# define DMAC_CREQ_SCREQ(n) (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ_SHIFT(n))) -# define DMAC_CREQ_SCREQ0 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ0_SHIFT) -# define DMAC_CREQ_SCREQ1 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ1_SHIFT) -# define DMAC_CREQ_SCREQ2 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ2_SHIFT) -# define DMAC_CREQ_SCREQ3 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ3_SHIFT) -#define DMAC_CREQ_DCREQ_SHIFT (1) /* Bits 1, 3, 5, 7: Request a destination chunk transfer */ -# define DMAC_CREQ_DCREQ(n) (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ_SHIFT(n)))) -# define DMAC_CREQ_DCREQ0 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ0_SHIFT) -# define DMAC_CREQ_DCREQ1 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ1_SHIFT) -# define DMAC_CREQ_DCREQ2 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ2_SHIFT) -# define DMAC_CREQ_DCREQ3 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ3_SHIFT) - -/* DMAC Software Last Transfer Flag Register */ - -#define DMAC_LAST_SHIFT(n) ((n)<<1) -#define DMAC_LAST_MASK(n) (3 << DMAC_LAST_SHIFT(n)) -#define DMAC_LAST0_SHIFT (0) /* Bits 0-1: Channel 0 */ -#define DMAC_LAST0_MASK (3 << DMAC_LAST0_SHIFT) -#define DMAC_LAST1_SHIFT (2) /* Bits 2-3: Channel 1 */ -#define DMAC_LAST1_MASK (3 << DMAC_LAST1_SHIFT) -#define DMAC_LAST2_SHIFT (4) /* Bits 4-5: Channel 2 */ -#define DMAC_LAST2_MASK (3 << DMAC_LAST2_SHIFT) -#define DMAC_LAST3_SHIFT (6) /* Bits 6-7: Channel 3 */ -#define DMAC_LAST3_MASK (3 << DMAC_LAST3_SHIFT) - -#define DMAC_LAST_SLAST_SHIFT (0) /* Bits 0, 2, 4, 6: Indicates the last transfer */ -# define DMAC_LAST_SLAST(n) (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST_SHIFT(n))) -# define DMAC_LAST_SLAST0 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST0_SHIFT) -# define DMAC_LAST_SLAST1 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST1_SHIFT) -# define DMAC_LAST_SLAST2 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST2_SHIFT) -# define DMAC_LAST_SLAST3 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST3_SHIFT) -#define DMAC_LAST_DLAST_SHIFT (1) /* Bits 1, 3, 5, 7: Indicates the last transfer */ -# define DMAC_LAST_DLAST(n) (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST_SHIFT(n)))) -# define DMAC_LAST_DLAST0 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST0_SHIFT) -# define DMAC_LAST_DLAST1 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST1_SHIFT) -# define DMAC_LAST_DLAST2 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST2_SHIFT) -# define DMAC_LAST_DLAST3 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST3_SHIFT) - -/* DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Enable Register, - * DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Disable Register, - * DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Mask Register, and - * DMAC Error, Buffer Transfer and Chained Buffer Transfer Status Register common - * bit field definitions - */ - -#define DMAC_EBC_BTC_SHIFT (0) /* Bits 0-3: Buffer Transfer Completed Interrupt Enable */ -#define DMAC_EBC_BTC_MASK (15 << DMAC_EBC_BTC_SHIFT) -# define DMAC_EBC_BTC(n) (1 << (DMAC_EBC_BTC_SHIFT+(n))) -# define DMAC_EBC_BTC0 (1 << (DMAC_EBC_BTC_SHIFT+0)) -# define DMAC_EBC_BTC1 (1 << (DMAC_EBC_BTC_SHIFT+1)) -# define DMAC_EBC_BTC2 (1 << (DMAC_EBC_BTC_SHIFT+2)) -# define DMAC_EBC_BTC3 (1 << (DMAC_EBC_BTC_SHIFT+3)) -#define DMAC_EBC_CBTC_SHIFT (8) /* Bits 8-11: Chained Buffer Transfer Completed Interrupt Enable */ -#define DMAC_EBC_CBTC_MASK (15 << DMAC_EBC_CBTC_SHIFT) -# define DMAC_EBC_CBTC(n) (1 << (DMAC_EBC_CBTC_SHIFT+(n))) -# define DMAC_EBC_CBTC0 (1 << (DMAC_EBC_CBTC_SHIFT+0)) -# define DMAC_EBC_CBTC1 (1 << (DMAC_EBC_CBTC_SHIFT+1)) -# define DMAC_EBC_CBTC2 (1 << (DMAC_EBC_CBTC_SHIFT+2)) -# define DMAC_EBC_CBTC3 (1 << (DMAC_EBC_CBTC_SHIFT+3)) -#define DMAC_EBC_ERR_SHIFT (16) /* Bits 16-19: Access Error Interrupt Enable */ -#define DMAC_EBC_ERR_MASK (15 << DMAC_EBC_ERR_SHIFT) -# define DMAC_EBC_ERR(n) (1 << (DMAC_EBC_ERR_SHIFT+(n))) -# define DMAC_EBC_ERR0 (1 << (DMAC_EBC_ERR_SHIFT+0)) -# define DMAC_EBC_ERR1 (1 << (DMAC_EBC_ERR_SHIFT+1)) -# define DMAC_EBC_ERR2 (1 << (DMAC_EBC_ERR_SHIFT+2)) -# define DMAC_EBC_ERR3 (1 << (DMAC_EBC_ERR_SHIFT+3)) - -#define DMAC_EBC_BTCINTS(n) (0x00010001 << (n)) /* BTC + ERR interrupts */ -#define DMAC_EBC_CBTCINTS(n) (0x00010100 << (n)) /* CBT + ERR interrupts */ -#define DMAC_EBC_CHANINTS(n) (0x00010101 << (n)) /* All channel interrupts */ -#define DMAC_EBC_ALLINTS (0x000f0f0f) /* All interrupts */ - -/* DMAC Channel Handler Enable Register */ - -#define DMAC_CHER_ENA_SHIFT (0) /* Bits 0-3: Enable channel */ -#define DMAC_CHER_ENA_MASK (15 << DMAC_CHER_ENA_SHIFT) -# define DMAC_CHER_ENA(n) (1 << (DMAC_CHER_ENA_SHIFT+(n))) -# define DMAC_CHER_ENA0 (1 << (DMAC_CHER_ENA_SHIFT+0)) -# define DMAC_CHER_ENA1 (1 << (DMAC_CHER_ENA_SHIFT+1)) -# define DMAC_CHER_ENA2 (1 << (DMAC_CHER_ENA_SHIFT+2)) -# define DMAC_CHER_ENA3 (1 << (DMAC_CHER_ENA_SHIFT+3)) -#define DMAC_CHER_SUSP_SHIFT (8) /* Bits 8-11: Freeze channel and its context */ -#define DMAC_CHER_SUSP_MASK (15 << DMAC_CHER_SUSP_SHIFT) -# define DMAC_CHER_SUSP(n) (1 << (DMAC_CHER_SUSP_SHIFT+(n))) -# define DMAC_CHER_SUSP0 (1 << (DMAC_CHER_SUSP_SHIFT+0)) -# define DMAC_CHER_SUSP1 (1 << (DMAC_CHER_SUSP_SHIFT+1)) -# define DMAC_CHER_SUSP2 (1 << (DMAC_CHER_SUSP_SHIFT+2)) -# define DMAC_CHER_SUSP3 (1 << (DMAC_CHER_SUSP_SHIFT+3)) -#define DMAC_CHER_KEEP_SHIFT (24) /* Bits 24-27: Resume channel from automatic stall */ -#define DMAC_CHER_KEEP_MASK (15 << DMAC_CHER_KEEP_SHIFT) -# define DMAC_CHER_KEEP(n) (1 << (DMAC_CHER_KEEP_SHIFT+(n))) -# define DMAC_CHER_KEEP0 (1 << (DMAC_CHER_KEEP_SHIFT+0)) -# define DMAC_CHER_KEEP1 (1 << (DMAC_CHER_KEEP_SHIFT+1)) -# define DMAC_CHER_KEEP2 (1 << (DMAC_CHER_KEEP_SHIFT+2)) -# define DMAC_CHER_KEEP3 (1 << (DMAC_CHER_KEEP_SHIFT+3)) - -/* DMAC Channel Handler Disable Register */ - -#define DMAC_CHDR_DIS_SHIFT (0) /* Bits 0-3: Disable DMAC channel */ -#define DMAC_CHDR_DIS_MASK (15 << DMAC_CHDR_DIS_SHIFT) -# define DMAC_CHDR_DIS(n) (1 << (DMAC_CHDR_DIS_SHIFT+(n))) -# define DMAC_CHDR_DIS0 (1 << (DMAC_CHDR_DIS_SHIFT+0)) -# define DMAC_CHDR_DIS1 (1 << (DMAC_CHDR_DIS_SHIFT+1)) -# define DMAC_CHDR_DIS2 (1 << (DMAC_CHDR_DIS_SHIFT+2)) -# define DMAC_CHDR_DIS3 (1 << (DMAC_CHDR_DIS_SHIFT+3)) -# define DMAC_CHDR_DIS_ALL DMAC_CHDR_DIS_MASK -#define DMAC_CHDR_RES_SHIFT (8) /* Bits 8-11: Resume trasnfer, restoring context */ -#define DMAC_CHDR_RES_MASK (15 << DMAC_CHDR_RES_SHIFT) -# define DMAC_CHDR_RES(n) (1 << (DMAC_CHDR_RES_SHIFT+(n))) -# define DMAC_CHDR_RES0 (1 << (DMAC_CHDR_RES_SHIFT+0)) -# define DMAC_CHDR_RES1 (1 << (DMAC_CHDR_RES_SHIFT+1)) -# define DMAC_CHDR_RES2 (1 << (DMAC_CHDR_RES_SHIFT+2)) -# define DMAC_CHDR_RES3 (1 << (DMAC_CHDR_RES_SHIFT+3)) - -/* DMAC Channel Handler Status Register */ - -#define DMAC_CHSR_ENA_SHIFT (0) /* Bits 0-3: Indicates that the channel is stalling */ -#define DMAC_CHSR_ENA_MASK (15 << DMAC_CHSR_ENA_SHIFT) -# define DMAC_CHSR_ENA(n) (1 << (DMAC_CHSR_ENA_SHIFT+(n))) -# define DMAC_CHSR_ENA0 (1 << (DMAC_CHSR_ENA_SHIFT+0)) -# define DMAC_CHSR_ENA1 (1 << (DMAC_CHSR_ENA_SHIFT+1)) -# define DMAC_CHSR_ENA2 (1 << (DMAC_CHSR_ENA_SHIFT+2)) -# define DMAC_CHSR_ENA3 (1 << (DMAC_CHSR_ENA_SHIFT+3)) -#define DMAC_CHSR_SUSP_SHIFT (8) /* Bits 8-11: Indicates that the channel is empty */ -#define DMAC_CHSR_SUSP_MASK (15 << DMAC_CHSR_SUSP_SHIFT) -# define DMAC_CHSR_SUSP(n) (1 << (DMAC_CHSR_SUSP_SHIFT+(n))) -# define DMAC_CHSR_SUSP0 (1 << (DMAC_CHSR_SUSP_SHIFT+0)) -# define DMAC_CHSR_SUSP1 (1 << (DMAC_CHSR_SUSP_SHIFT+1)) -# define DMAC_CHSR_SUSP2 (1 << (DMAC_CHSR_SUSP_SHIFT+2)) -# define DMAC_CHSR_SUSP3 (1 << (DMAC_CHSR_SUSP_SHIFT+3)) -#define DMAC_CHSR_EMPT_SHIFT (16) /* Bits 16-19: Access Error Interrupt Enable */ -#define DMAC_CHSR_EMPT_MASK (15 << DMAC_CHSR_EMPT_SHIFT) -# define DMAC_CHSR_EMPT(n) (1 << (DMAC_CHSR_EMPT_SHIFT+(n))) -# define DMAC_CHSR_EMPT0 (1 << (DMAC_CHSR_EMPT_SHIFT+0)) -# define DMAC_CHSR_EMPT1 (1 << (DMAC_CHSR_EMPT_SHIFT+1)) -# define DMAC_CHSR_EMPT2 (1 << (DMAC_CHSR_EMPT_SHIFT+2)) -# define DMAC_CHSR_EMPT3 (1 << (DMAC_CHSR_EMPT_SHIFT+3)) -#define DMAC_CHSR_STAL_SHIFT (24) /* Bits 24-27: Access Error Interrupt Enable */ -#define DMAC_CHSR_STAL_MASK (15 << DMAC_CHSR_STAL_SHIFT) -# define DMAC_CHSR_STAL(n) (1 << (DMAC_CHSR_STAL_SHIFT+(n))) -# define DMAC_CHSR_STAL0 (1 << (DMAC_CHSR_STAL_SHIFT+0)) -# define DMAC_CHSR_STAL1 (1 << (DMAC_CHSR_STAL_SHIFT+1)) -# define DMAC_CHSR_STAL2 (1 << (DMAC_CHSR_STAL_SHIFT+2)) -# define DMAC_CHSR_STAL3 (1 << (DMAC_CHSR_STAL_SHIFT+3)) - -/* DMA channel registers */ -/* DMAC Channel n [n = 0..3] Control A Register */ - -#define DMACHAN_CTRLA_BTSIZE_MAX (0xfff) -#define DMACHAN_CTRLA_BTSIZE_SHIFT (0) /* Bits 0-11: Buffer Transfer Size */ -#define DMACHAN_CTRLA_BTSIZE_MASK (DMACHAN_CTRLA_BTSIZE_MAX << DMACHAN_CTRLA_BTSIZE_SHIFT) -#define DMACHAN_CTRLA_SCSIZE (1 << 16) /* Bit 16: Source Chunk Transfer Size */ -# define DMACHAN_CTRLA_SCSIZE_1 (0) -# define DMACHAN_CTRLA_SCSIZE_4 DMACHAN_CTRLA_SCSIZE -#define DMACHAN_CTRLA_DCSIZE (1 << 20) /* Bit 20: Destination Chunk Transfer size */ -# define DMACHAN_CTRLA_DCSIZE_1 (0) -# define DMACHAN_CTRLA_DCSIZE_4 DMACHAN_CTRLA_DCSIZE -#define DMACHAN_CTRLA_SRCWIDTH_SHIFT (24) /* Bits 24-25 */ -#define DMACHAN_CTRLA_SRCWIDTH_MASK (3 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) -# define DMACHAN_CTRLA_SRCWIDTH_BYTE (0 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) -# define DMACHAN_CTRLA_SRCWIDTH_HWORD (1 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) -# define DMACHAN_CTRLA_SRCWIDTH_WORD (2 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) -#define DMACHAN_CTRLA_DSTWIDTH_SHIFT (28) /* Bits 28-29 */ -#define DMACHAN_CTRLA_DSTWIDTH_MASK (3 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) -# define DMACHAN_CTRLA_DSTWIDTH_BYTE (0 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) -# define DMACHAN_CTRLA_DSTWIDTH_HWORD (1 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) -# define DMACHAN_CTRLA_DSTWIDTH_WORD (2 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) -#define DMACHAN_CTRLA_DONE (1 << 31) /* Bit 31: Auto disable DMAC */ - -/* DMAC Channel n [n = 0..3] Control B Register */ - -#define DMACHAN_CTRLB_SRCDSCR (1 << 16) /* Bit 16: Source buffer descriptor fetch operation disabled */ -#define DMACHAN_CTRLB_DSTDSCR (1 << 20) /* Bit 20: Dest buffer descriptor fetch operation disabled */ -#define DMACHAN_CTRLB_FC_SHIFT (21) /* Bits 21-22: Flow controller */ -#define DMACHAN_CTRLB_FC_MASK (3 << DMACHAN_CTRLB_FC_SHIFT) -# define DMACHAN_CTRLB_FC_M2M (0 << DMACHAN_CTRLB_FC_SHIFT) /* Memory-to-Memory */ -# define DMACHAN_CTRLB_FC_M2P (1 << DMACHAN_CTRLB_FC_SHIFT) /* Memory-to-Peripheral */ -# define DMACHAN_CTRLB_FC_P2M (2 << DMACHAN_CTRLB_FC_SHIFT) /* Peripheral-to-Memory */ -# define DMACHAN_CTRLB_FC_P2P (3 << DMACHAN_CTRLB_FC_SHIFT) /* Peripheral-to-Peripheral */ -#define DMACHAN_CTRLB_SRCINCR_SHIFT (24) /* Bits 24-25 */ -#define DMACHAN_CTRLB_SRCINCR_MASK (3 << DMACHAN_CTRLB_SRCINCR_SHIFT) -# define DMACHAN_CTRLB_SRCINCR_INCR (0 << DMACHAN_CTRLB_SRCINCR_SHIFT) /* Incrementing address */ -# define DMACHAN_CTRLB_SRCINCR_FIXED (2 << DMACHAN_CTRLB_SRCINCR_SHIFT) /* Fixed address */ -#define DMACHAN_CTRLB_DSTINCR_SHIFT (28) /* Bits 28-29 */ -#define DMACHAN_CTRLB_DSTINCR_MASK (3 << DMACHAN_CTRLB_DSTINCR_SHIFT) -# define DMACHAN_CTRLB_DSTINCR_INCR (0 << DMACHAN_CTRLB_DSTINCR_SHIFT) /* Incrementing address */ -# define DMACHAN_CTRLB_DSTINCR_FIXED (2 << DMACHAN_CTRLB_DSTINCR_SHIFT) /* Fixed address */ -#define DMACHAN_CTRLB_IEN (1 << 30) /* Bit 30: Clear sets BTC[n] flag in EBCISR */ - -/* DMAC Channel n [n = 0..3] Configuration Register */ - -#define DMACHAN_CFG_SRCPER_SHIFT (0) /* Bits 0-3: Channel source associated with peripheral ID */ -#define DMACHAN_CFG_SRCPER_MASK (15 << DMACHAN_CFG_SRCPER_SHIFT) -#define DMACHAN_CFG_DSTPER_SHIFT (4) /* Bits 4-7: Channel dest associated with peripheral ID */ -#define DMACHAN_CFG_DSTPER_MASK (15 << DMACHAN_CFG_DSTPER_SHIFT) -#define DMACHAN_CFG_SRCH2SEL (1 << 9) /* Bit 9: HW handshake triggers transfer */ -#define DMACHAN_CFG_DSTH2SEL (1 << 13) /* Bit 13: HW handshake trigger transfer */ -#define DMACHAN_CFG_SOD (1 << 16) /* Bit 16: Stop on done */ -#define DMACHAN_CFG_LOCKIF (1 << 20) /* Bit 20: Enable lock interface capability */ -#define DMACHAN_CFG_LOCKB (1 << 21) /* Bit 21: Enable AHB Bus Locking capability */ -#define DMACHAN_CFG_LOCKIFL (1 << 22) /* Bit 22: Lock Master Interface Arbiter */ -#define DMACHAN_CFG_AHBPRO_SHIFT (24) /* Bits 24-26: Bus access privilege */ -#define DMACHAN_CFG_AHBPRO_MASK (7 << DMACHAN_CFG_AHBPRO_SHIFT) -# define DMACHAN_CFG_AHBPRO_PRIV (1 << DMACHAN_CFG_AHBPRO_SHIFT) -# define DMACHAN_CFG_AHBPRO_BUFF (2 << DMACHAN_CFG_AHBPRO_SHIFT) -# define DMACHAN_CFG_AHBPRO_CACHE (4 << DMACHAN_CFG_AHBPRO_SHIFT) -#define DMACHAN_CFG_FIFOCFG_SHIFT (28) /* Bits 28-29 */ -#define DMACHAN_CFG_FIFOCFG_MASK (3 << DMACHAN_CFG_FIFOCFG_SHIFT) -# define DMACHAN_CFG_FIFOCFG_LARGEST (0 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Largest length AHB burst */ -# define DMACHAN_CFG_FIFOCFG_HALF (1 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Half FIFO size */ -# define DMACHAN_CFG_FIFOCFG_SINGLE (2 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Single AHB access */ - -/* DMA Peripheral IDs *******************************************************************/ - -#define DMACHAN_PID_MCI0 0 -#define DMACHAN_PID_SSC 3 -#define DMACHAN_PID_MCI1 13 - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/* DMA multi buffer transfer link list entry structure */ - -struct dma_linklist_s -{ - uint32_t src; /* Source address */ - uint32_t dest; /* Destination address */ - uint32_t ctrla; /* Control A value */ - uint32_t ctrlb; /* Control B value */ - uint32_t next; /* Next descriptor address */ -}; - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_dmac.h + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* DMAC register offsets ****************************************************************/ + +/* Global Registers */ + +#define SAM3U_DMAC_GCFG_OFFSET 0x00 /* DMAC Global Configuration Register */ +#define SAM3U_DMAC_EN_OFFSET 0x04 /* DMAC Enable Register */ +#define SAM3U_DMAC_SREQ_OFFSET 0x08 /* DMAC Software Single Request Register */ +#define SAM3U_DMAC_CREQ_OFFSET 0x0c /* DMAC Software Chunk Transfer Request Register */ +#define SAM3U_DMAC_LAST_OFFSET 0x10 /* DMAC Software Last Transfer Flag Register */ + /* 0x014-0x18: Reserved */ +#define SAM3U_DMAC_EBCIER_OFFSET 0x18 /* DMAC Error Enable */ +#define SAM3U_DMAC_EBCIDR_OFFSET 0x1C /* DMAC Error Disable */ +#define SAM3U_DMAC_EBCIMR_OFFSET 0x20 /* DMAC Error Mask */ +#define SAM3U_DMAC_EBCISR_OFFSET 0x24 /* DMAC Error Status */ +#define SAM3U_DMAC_CHER_OFFSET 0x28 /* DMAC Channel Handler Enable Register */ +#define SAM3U_DMAC_CHDR_OFFSET 0x2c /* DMAC Channel Handler Disable Register */ +#define SAM3U_DMAC_CHSR_OFFSET 0x30 /* DMAC Channel Handler Status Register */ + /* 0x034-0x38: Reserved */ +/* DMA channel registers */ + +#define SAM3U_DMACHAN_OFFSET(n) (0x3c+((n)*0x28)) +#define SAM3U_DMACHAN0_OFFSET 0x3c /* 0x3c-0x60: Channel 0 */ +#define SAM3U_DMACHAN1_OFFSET 0x64 /* 0x64-0x88: Channel 1 */ +#define SAM3U_DMACHAN2_OFFSET 0x8c /* 0x8c-0xb0: Channel 2 */ +#define SAM3U_DMACHAN3_OFFSET 0xb4 /* 0xb4-0xd8: Channel 3 */ + +#define SAM3U_DMACHAN_SADDR_OFFSET 0x00 /* DMAC Channel Source Address Register */ +#define SAM3U_DMACHAN_DADDR_OFFSET 0x04 /* DMAC Channel Destination Address Register */ +#define SAM3U_DMACHAN_DSCR_OFFSET 0x08 /* DMAC Channel Descriptor Address Register */ +#define SAM3U_DMACHAN_CTRLA_OFFSET 0x0c /* DMAC Channel Control A Register */ +#define SAM3U_DMACHAN_CTRLB_OFFSET 0x10 /* DMAC Channel Control B Register */ +#define SAM3U_DMACHAN_CFG_OFFSET 0x14 /* DMAC Channel Configuration Register */ + /* 0x18-0x24: Reserved */ + + /* 0x017c-0x1fc: Reserved */ + +/* DMAC register adresses ***************************************************************/ + +/* Global Registers */ + +#define SAM3U_DMAC_GCFG (SAM3U_DMAC_BASE+SAM3U_DMAC_GCFG_OFFSET) +#define SAM3U_DMAC_EN (SAM3U_DMAC_BASE+SAM3U_DMAC_EN_OFFSET) +#define SAM3U_DMAC_SREQ (SAM3U_DMAC_BASE+SAM3U_DMAC_SREQ_OFFSET) +#define SAM3U_DMAC_CREQ (SAM3U_DMAC_BASE+SAM3U_DMAC_CREQ_OFFSET) +#define SAM3U_DMAC_LAST (SAM3U_DMAC_BASE+SAM3U_DMAC_LAST_OFFSET) +#define SAM3U_DMAC_EBCIER (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIER_OFFSET) +#define SAM3U_DMAC_EBCIDR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIDR_OFFSET) +#define SAM3U_DMAC_EBCIMR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCIMR_OFFSET) +#define SAM3U_DMAC_EBCISR (SAM3U_DMAC_BASE+SAM3U_DMAC_EBCISR_OFFSET) +#define SAM3U_DMAC_CHER (SAM3U_DMAC_BASE+SAM3U_DMAC_CHER_OFFSET) +#define SAM3U_DMAC_CHDR (SAM3U_DMAC_BASE+SAM3U_DMAC_CHDR_OFFSET) +#define SAM3U_DMAC_CHSR (SAM3U_DMAC_BASE+SAM3U_DMAC_CHSR_OFFSET) + +/* DMA channel registers */ + +#define SAM3U_DMACHAN_BASE(n) (SAM3U_DMAC_BASE+SAM3U_DMACHAN_OFFSET(n)) +#define SAM3U_DMACHAN0_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN0_OFFSET) +#define SAM3U_DMACHAN1_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN1_OFFSET) +#define SAM3U_DMACHAN2_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN2_OFFSET) +#define SAM3U_DMACHAN3_BASE (SAM3U_DMAC_BASE+SAM3U_DMACHAN3_OFFSET) + +#define SAM3U_DMACHAN_SADDR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_SADDR_OFFSET) +#define SAM3U_DMACHAN_DADDR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_DADDR_OFFSET) +#define SAM3U_DMACHAN_DSCR(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_DSCR_OFFSET) +#define SAM3U_DMACHAN_CTRLA(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CTRLA_OFFSET) +#define SAM3U_DMACHAN_CTRLB(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CTRLB_OFFSET) +#define SAM3U_DMACHAN_CFG(n) (SAM3U_DMACHAN_BASE(n)+SAM3U_DMACHAN_CFG_OFFSET) + +#define SAM3U_DMACHAN0_SADDR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_SADDR_OFFSET) +#define SAM3U_DMACHAN0_DADDR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_DADDR_OFFSET) +#define SAM3U_DMACHAN0_DSCR (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_DSCR_OFFSET) +#define SAM3U_DMACHAN0_CTRLA (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) +#define SAM3U_DMACHAN0_CTRLB (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) +#define SAM3U_DMACHAN0_CFG (SAM3U_DMACHAN0_BASE+SAM3U_DMACHAN_CFG_OFFSET) + +#define SAM3U_DMACHAN1_SADDR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_SADDR_OFFSET) +#define SAM3U_DMACHAN1_DADDR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_DADDR_OFFSET) +#define SAM3U_DMACHAN1_DSCR (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_DSCR_OFFSET) +#define SAM3U_DMACHAN1_CTRLA (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) +#define SAM3U_DMACHAN1_CTRLB (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) +#define SAM3U_DMACHAN1_CFG (SAM3U_DMACHAN1_BASE+SAM3U_DMACHAN_CFG_OFFSET) + +#define SAM3U_DMACHAN2_SADDR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_SADDR_OFFSET) +#define SAM3U_DMACHAN2_DADDR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_DADDR_OFFSET) +#define SAM3U_DMACHAN2_DSCR (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_DSCR_OFFSET) +#define SAM3U_DMACHAN2_CTRLA (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) +#define SAM3U_DMACHAN2_CTRLB (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) +#define SAM3U_DMACHAN2_CFG (SAM3U_DMACHAN2_BASE+SAM3U_DMACHAN_CFG_OFFSET) + +#define SAM3U_DMACHAN3_SADDR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_SADDR_OFFSET) +#define SAM3U_DMACHAN3_DADDR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_DADDR_OFFSET) +#define SAM3U_DMACHAN3_DSCR (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_DSCR_OFFSET) +#define SAM3U_DMACHAN3_CTRLA (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CTRLA_OFFSET) +#define SAM3U_DMACHAN3_CTRLB (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CTRLB_OFFSET) +#define SAM3U_DMACHAN3_CFG (SAM3U_DMACHAN3_BASE+SAM3U_DMACHAN_CFG_OFFSET) + +/* DMAC register bit definitions ********************************************************/ + +/* Global Registers */ + +/* DMAC Global Configuration Register */ + +#define DMAC_GCFG_ARB_CFG (1 << 4) /* Bit 4: Round robin (vs fixed) arbiter */ + +/* DMAC Enable Register */ + +#define DMAC_EN_ENABLE (1 << 0) /* Bit 0: DMA controller enable */ + +/* DMAC Software Single Request Register */ + +#define DMAC_SREQ_SHIFT(n) ((n)<<1) +#define DMAC_SREQ_MASK(n) (3 << DMAC_SREQ_SHIFT(n)) +#define DMAC_SREQ0_SHIFT (0) /* Bits 0-1: Channel 0 */ +#define DMAC_SREQ0_MASK (3 << DMAC_SREQ0_SHIFT) +#define DMAC_SREQ1_SHIFT (2) /* Bits 2-3: Channel 1 */ +#define DMAC_SREQ1_MASK (3 << DMAC_SREQ1_SHIFT) +#define DMAC_SREQ2_SHIFT (4) /* Bits 4-5: Channel 2 */ +#define DMAC_SREQ2_MASK (3 << DMAC_SREQ2_SHIFT) +#define DMAC_SREQ3_SHIFT (6) /* Bits 6-7: Channel 3 */ +#define DMAC_SREQ3_MASK (3 << DMAC_SREQ3_SHIFT) + +#define DMAC_SREQ_SSREQ_SHIFT (0) /* Bits 0, 2, 4, 6: Request a source single transfer */ +# define DMAC_SREQ_SSREQ(n) (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ_SHIFT(n))) +# define DMAC_SREQ_SSREQ0 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ0_SHIFT) +# define DMAC_SREQ_SSREQ1 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ1_SHIFT) +# define DMAC_SREQ_SSREQ2 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ2_SHIFT) +# define DMAC_SREQ_SSREQ3 (1 << (DMAC_SREQ_SSREQ_SHIFT+DMAC_SREQ3_SHIFT) +#define DMAC_SREQ_DSREQ_SHIFT (1) /* Bits 1, 3, 5, 7: Request a destination single transfer */ +# define DMAC_SREQ_DSREQ(n) (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ_SHIFT(n)))) +# define DMAC_SREQ_DSREQ0 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ0_SHIFT) +# define DMAC_SREQ_DSREQ1 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ1_SHIFT) +# define DMAC_SREQ_DSREQ2 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ2_SHIFT) +# define DMAC_SREQ_DSREQ3 (1 << (DMAC_SREQ_DSREQ_SHIFT+DMAC_SREQ3_SHIFT) + +/* DMAC Software Chunk Transfer Request Register */ + +#define DMAC_CREQ_SHIFT(n) ((n)<<1) +#define DMAC_CREQ_MASK(n) (3 << DMAC_CREQ_SHIFT(n)) +#define DMAC_CREQ0_SHIFT (0) /* Bits 0-1: Channel 0 */ +#define DMAC_CREQ0_MASK (3 << DMAC_CREQ0_SHIFT) +#define DMAC_CREQ1_SHIFT (2) /* Bits 2-3: Channel 1 */ +#define DMAC_CREQ1_MASK (3 << DMAC_CREQ1_SHIFT) +#define DMAC_CREQ2_SHIFT (4) /* Bits 4-5: Channel 2 */ +#define DMAC_CREQ2_MASK (3 << DMAC_CREQ2_SHIFT) +#define DMAC_CREQ3_SHIFT (6) /* Bits 6-7: Channel 3 */ +#define DMAC_CREQ3_MASK (3 << DMAC_CREQ3_SHIFT) + +#define DMAC_CREQ_SCREQ_SHIFT (0) /* Bits 0, 2, 4, 6: Request a source chunk transfer */ +# define DMAC_CREQ_SCREQ(n) (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ_SHIFT(n))) +# define DMAC_CREQ_SCREQ0 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ0_SHIFT) +# define DMAC_CREQ_SCREQ1 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ1_SHIFT) +# define DMAC_CREQ_SCREQ2 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ2_SHIFT) +# define DMAC_CREQ_SCREQ3 (1 << (DMAC_CREQ_SCREQ_SHIFT+DMAC_CREQ3_SHIFT) +#define DMAC_CREQ_DCREQ_SHIFT (1) /* Bits 1, 3, 5, 7: Request a destination chunk transfer */ +# define DMAC_CREQ_DCREQ(n) (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ_SHIFT(n)))) +# define DMAC_CREQ_DCREQ0 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ0_SHIFT) +# define DMAC_CREQ_DCREQ1 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ1_SHIFT) +# define DMAC_CREQ_DCREQ2 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ2_SHIFT) +# define DMAC_CREQ_DCREQ3 (1 << (DMAC_CREQ_DCREQ_SHIFT+DMAC_CREQ3_SHIFT) + +/* DMAC Software Last Transfer Flag Register */ + +#define DMAC_LAST_SHIFT(n) ((n)<<1) +#define DMAC_LAST_MASK(n) (3 << DMAC_LAST_SHIFT(n)) +#define DMAC_LAST0_SHIFT (0) /* Bits 0-1: Channel 0 */ +#define DMAC_LAST0_MASK (3 << DMAC_LAST0_SHIFT) +#define DMAC_LAST1_SHIFT (2) /* Bits 2-3: Channel 1 */ +#define DMAC_LAST1_MASK (3 << DMAC_LAST1_SHIFT) +#define DMAC_LAST2_SHIFT (4) /* Bits 4-5: Channel 2 */ +#define DMAC_LAST2_MASK (3 << DMAC_LAST2_SHIFT) +#define DMAC_LAST3_SHIFT (6) /* Bits 6-7: Channel 3 */ +#define DMAC_LAST3_MASK (3 << DMAC_LAST3_SHIFT) + +#define DMAC_LAST_SLAST_SHIFT (0) /* Bits 0, 2, 4, 6: Indicates the last transfer */ +# define DMAC_LAST_SLAST(n) (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST_SHIFT(n))) +# define DMAC_LAST_SLAST0 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST0_SHIFT) +# define DMAC_LAST_SLAST1 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST1_SHIFT) +# define DMAC_LAST_SLAST2 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST2_SHIFT) +# define DMAC_LAST_SLAST3 (1 << (DMAC_LAST_SLAST_SHIFT+DMAC_LAST3_SHIFT) +#define DMAC_LAST_DLAST_SHIFT (1) /* Bits 1, 3, 5, 7: Indicates the last transfer */ +# define DMAC_LAST_DLAST(n) (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST_SHIFT(n)))) +# define DMAC_LAST_DLAST0 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST0_SHIFT) +# define DMAC_LAST_DLAST1 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST1_SHIFT) +# define DMAC_LAST_DLAST2 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST2_SHIFT) +# define DMAC_LAST_DLAST3 (1 << (DMAC_LAST_DLAST_SHIFT+DMAC_LAST3_SHIFT) + +/* DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Enable Register, + * DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Disable Register, + * DMAC Error, Buffer Transfer and Chained Buffer Transfer Interrupt Mask Register, and + * DMAC Error, Buffer Transfer and Chained Buffer Transfer Status Register common + * bit field definitions + */ + +#define DMAC_EBC_BTC_SHIFT (0) /* Bits 0-3: Buffer Transfer Completed Interrupt Enable */ +#define DMAC_EBC_BTC_MASK (15 << DMAC_EBC_BTC_SHIFT) +# define DMAC_EBC_BTC(n) (1 << (DMAC_EBC_BTC_SHIFT+(n))) +# define DMAC_EBC_BTC0 (1 << (DMAC_EBC_BTC_SHIFT+0)) +# define DMAC_EBC_BTC1 (1 << (DMAC_EBC_BTC_SHIFT+1)) +# define DMAC_EBC_BTC2 (1 << (DMAC_EBC_BTC_SHIFT+2)) +# define DMAC_EBC_BTC3 (1 << (DMAC_EBC_BTC_SHIFT+3)) +#define DMAC_EBC_CBTC_SHIFT (8) /* Bits 8-11: Chained Buffer Transfer Completed Interrupt Enable */ +#define DMAC_EBC_CBTC_MASK (15 << DMAC_EBC_CBTC_SHIFT) +# define DMAC_EBC_CBTC(n) (1 << (DMAC_EBC_CBTC_SHIFT+(n))) +# define DMAC_EBC_CBTC0 (1 << (DMAC_EBC_CBTC_SHIFT+0)) +# define DMAC_EBC_CBTC1 (1 << (DMAC_EBC_CBTC_SHIFT+1)) +# define DMAC_EBC_CBTC2 (1 << (DMAC_EBC_CBTC_SHIFT+2)) +# define DMAC_EBC_CBTC3 (1 << (DMAC_EBC_CBTC_SHIFT+3)) +#define DMAC_EBC_ERR_SHIFT (16) /* Bits 16-19: Access Error Interrupt Enable */ +#define DMAC_EBC_ERR_MASK (15 << DMAC_EBC_ERR_SHIFT) +# define DMAC_EBC_ERR(n) (1 << (DMAC_EBC_ERR_SHIFT+(n))) +# define DMAC_EBC_ERR0 (1 << (DMAC_EBC_ERR_SHIFT+0)) +# define DMAC_EBC_ERR1 (1 << (DMAC_EBC_ERR_SHIFT+1)) +# define DMAC_EBC_ERR2 (1 << (DMAC_EBC_ERR_SHIFT+2)) +# define DMAC_EBC_ERR3 (1 << (DMAC_EBC_ERR_SHIFT+3)) + +#define DMAC_EBC_BTCINTS(n) (0x00010001 << (n)) /* BTC + ERR interrupts */ +#define DMAC_EBC_CBTCINTS(n) (0x00010100 << (n)) /* CBT + ERR interrupts */ +#define DMAC_EBC_CHANINTS(n) (0x00010101 << (n)) /* All channel interrupts */ +#define DMAC_EBC_ALLINTS (0x000f0f0f) /* All interrupts */ + +/* DMAC Channel Handler Enable Register */ + +#define DMAC_CHER_ENA_SHIFT (0) /* Bits 0-3: Enable channel */ +#define DMAC_CHER_ENA_MASK (15 << DMAC_CHER_ENA_SHIFT) +# define DMAC_CHER_ENA(n) (1 << (DMAC_CHER_ENA_SHIFT+(n))) +# define DMAC_CHER_ENA0 (1 << (DMAC_CHER_ENA_SHIFT+0)) +# define DMAC_CHER_ENA1 (1 << (DMAC_CHER_ENA_SHIFT+1)) +# define DMAC_CHER_ENA2 (1 << (DMAC_CHER_ENA_SHIFT+2)) +# define DMAC_CHER_ENA3 (1 << (DMAC_CHER_ENA_SHIFT+3)) +#define DMAC_CHER_SUSP_SHIFT (8) /* Bits 8-11: Freeze channel and its context */ +#define DMAC_CHER_SUSP_MASK (15 << DMAC_CHER_SUSP_SHIFT) +# define DMAC_CHER_SUSP(n) (1 << (DMAC_CHER_SUSP_SHIFT+(n))) +# define DMAC_CHER_SUSP0 (1 << (DMAC_CHER_SUSP_SHIFT+0)) +# define DMAC_CHER_SUSP1 (1 << (DMAC_CHER_SUSP_SHIFT+1)) +# define DMAC_CHER_SUSP2 (1 << (DMAC_CHER_SUSP_SHIFT+2)) +# define DMAC_CHER_SUSP3 (1 << (DMAC_CHER_SUSP_SHIFT+3)) +#define DMAC_CHER_KEEP_SHIFT (24) /* Bits 24-27: Resume channel from automatic stall */ +#define DMAC_CHER_KEEP_MASK (15 << DMAC_CHER_KEEP_SHIFT) +# define DMAC_CHER_KEEP(n) (1 << (DMAC_CHER_KEEP_SHIFT+(n))) +# define DMAC_CHER_KEEP0 (1 << (DMAC_CHER_KEEP_SHIFT+0)) +# define DMAC_CHER_KEEP1 (1 << (DMAC_CHER_KEEP_SHIFT+1)) +# define DMAC_CHER_KEEP2 (1 << (DMAC_CHER_KEEP_SHIFT+2)) +# define DMAC_CHER_KEEP3 (1 << (DMAC_CHER_KEEP_SHIFT+3)) + +/* DMAC Channel Handler Disable Register */ + +#define DMAC_CHDR_DIS_SHIFT (0) /* Bits 0-3: Disable DMAC channel */ +#define DMAC_CHDR_DIS_MASK (15 << DMAC_CHDR_DIS_SHIFT) +# define DMAC_CHDR_DIS(n) (1 << (DMAC_CHDR_DIS_SHIFT+(n))) +# define DMAC_CHDR_DIS0 (1 << (DMAC_CHDR_DIS_SHIFT+0)) +# define DMAC_CHDR_DIS1 (1 << (DMAC_CHDR_DIS_SHIFT+1)) +# define DMAC_CHDR_DIS2 (1 << (DMAC_CHDR_DIS_SHIFT+2)) +# define DMAC_CHDR_DIS3 (1 << (DMAC_CHDR_DIS_SHIFT+3)) +# define DMAC_CHDR_DIS_ALL DMAC_CHDR_DIS_MASK +#define DMAC_CHDR_RES_SHIFT (8) /* Bits 8-11: Resume trasnfer, restoring context */ +#define DMAC_CHDR_RES_MASK (15 << DMAC_CHDR_RES_SHIFT) +# define DMAC_CHDR_RES(n) (1 << (DMAC_CHDR_RES_SHIFT+(n))) +# define DMAC_CHDR_RES0 (1 << (DMAC_CHDR_RES_SHIFT+0)) +# define DMAC_CHDR_RES1 (1 << (DMAC_CHDR_RES_SHIFT+1)) +# define DMAC_CHDR_RES2 (1 << (DMAC_CHDR_RES_SHIFT+2)) +# define DMAC_CHDR_RES3 (1 << (DMAC_CHDR_RES_SHIFT+3)) + +/* DMAC Channel Handler Status Register */ + +#define DMAC_CHSR_ENA_SHIFT (0) /* Bits 0-3: Indicates that the channel is stalling */ +#define DMAC_CHSR_ENA_MASK (15 << DMAC_CHSR_ENA_SHIFT) +# define DMAC_CHSR_ENA(n) (1 << (DMAC_CHSR_ENA_SHIFT+(n))) +# define DMAC_CHSR_ENA0 (1 << (DMAC_CHSR_ENA_SHIFT+0)) +# define DMAC_CHSR_ENA1 (1 << (DMAC_CHSR_ENA_SHIFT+1)) +# define DMAC_CHSR_ENA2 (1 << (DMAC_CHSR_ENA_SHIFT+2)) +# define DMAC_CHSR_ENA3 (1 << (DMAC_CHSR_ENA_SHIFT+3)) +#define DMAC_CHSR_SUSP_SHIFT (8) /* Bits 8-11: Indicates that the channel is empty */ +#define DMAC_CHSR_SUSP_MASK (15 << DMAC_CHSR_SUSP_SHIFT) +# define DMAC_CHSR_SUSP(n) (1 << (DMAC_CHSR_SUSP_SHIFT+(n))) +# define DMAC_CHSR_SUSP0 (1 << (DMAC_CHSR_SUSP_SHIFT+0)) +# define DMAC_CHSR_SUSP1 (1 << (DMAC_CHSR_SUSP_SHIFT+1)) +# define DMAC_CHSR_SUSP2 (1 << (DMAC_CHSR_SUSP_SHIFT+2)) +# define DMAC_CHSR_SUSP3 (1 << (DMAC_CHSR_SUSP_SHIFT+3)) +#define DMAC_CHSR_EMPT_SHIFT (16) /* Bits 16-19: Access Error Interrupt Enable */ +#define DMAC_CHSR_EMPT_MASK (15 << DMAC_CHSR_EMPT_SHIFT) +# define DMAC_CHSR_EMPT(n) (1 << (DMAC_CHSR_EMPT_SHIFT+(n))) +# define DMAC_CHSR_EMPT0 (1 << (DMAC_CHSR_EMPT_SHIFT+0)) +# define DMAC_CHSR_EMPT1 (1 << (DMAC_CHSR_EMPT_SHIFT+1)) +# define DMAC_CHSR_EMPT2 (1 << (DMAC_CHSR_EMPT_SHIFT+2)) +# define DMAC_CHSR_EMPT3 (1 << (DMAC_CHSR_EMPT_SHIFT+3)) +#define DMAC_CHSR_STAL_SHIFT (24) /* Bits 24-27: Access Error Interrupt Enable */ +#define DMAC_CHSR_STAL_MASK (15 << DMAC_CHSR_STAL_SHIFT) +# define DMAC_CHSR_STAL(n) (1 << (DMAC_CHSR_STAL_SHIFT+(n))) +# define DMAC_CHSR_STAL0 (1 << (DMAC_CHSR_STAL_SHIFT+0)) +# define DMAC_CHSR_STAL1 (1 << (DMAC_CHSR_STAL_SHIFT+1)) +# define DMAC_CHSR_STAL2 (1 << (DMAC_CHSR_STAL_SHIFT+2)) +# define DMAC_CHSR_STAL3 (1 << (DMAC_CHSR_STAL_SHIFT+3)) + +/* DMA channel registers */ +/* DMAC Channel n [n = 0..3] Control A Register */ + +#define DMACHAN_CTRLA_BTSIZE_MAX (0xfff) +#define DMACHAN_CTRLA_BTSIZE_SHIFT (0) /* Bits 0-11: Buffer Transfer Size */ +#define DMACHAN_CTRLA_BTSIZE_MASK (DMACHAN_CTRLA_BTSIZE_MAX << DMACHAN_CTRLA_BTSIZE_SHIFT) +#define DMACHAN_CTRLA_SCSIZE (1 << 16) /* Bit 16: Source Chunk Transfer Size */ +# define DMACHAN_CTRLA_SCSIZE_1 (0) +# define DMACHAN_CTRLA_SCSIZE_4 DMACHAN_CTRLA_SCSIZE +#define DMACHAN_CTRLA_DCSIZE (1 << 20) /* Bit 20: Destination Chunk Transfer size */ +# define DMACHAN_CTRLA_DCSIZE_1 (0) +# define DMACHAN_CTRLA_DCSIZE_4 DMACHAN_CTRLA_DCSIZE +#define DMACHAN_CTRLA_SRCWIDTH_SHIFT (24) /* Bits 24-25 */ +#define DMACHAN_CTRLA_SRCWIDTH_MASK (3 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) +# define DMACHAN_CTRLA_SRCWIDTH_BYTE (0 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) +# define DMACHAN_CTRLA_SRCWIDTH_HWORD (1 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) +# define DMACHAN_CTRLA_SRCWIDTH_WORD (2 << DMACHAN_CTRLA_SRCWIDTH_SHIFT) +#define DMACHAN_CTRLA_DSTWIDTH_SHIFT (28) /* Bits 28-29 */ +#define DMACHAN_CTRLA_DSTWIDTH_MASK (3 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) +# define DMACHAN_CTRLA_DSTWIDTH_BYTE (0 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) +# define DMACHAN_CTRLA_DSTWIDTH_HWORD (1 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) +# define DMACHAN_CTRLA_DSTWIDTH_WORD (2 << DMACHAN_CTRLA_DSTWIDTH_SHIFT) +#define DMACHAN_CTRLA_DONE (1 << 31) /* Bit 31: Auto disable DMAC */ + +/* DMAC Channel n [n = 0..3] Control B Register */ + +#define DMACHAN_CTRLB_SRCDSCR (1 << 16) /* Bit 16: Source buffer descriptor fetch operation disabled */ +#define DMACHAN_CTRLB_DSTDSCR (1 << 20) /* Bit 20: Dest buffer descriptor fetch operation disabled */ +#define DMACHAN_CTRLB_FC_SHIFT (21) /* Bits 21-22: Flow controller */ +#define DMACHAN_CTRLB_FC_MASK (3 << DMACHAN_CTRLB_FC_SHIFT) +# define DMACHAN_CTRLB_FC_M2M (0 << DMACHAN_CTRLB_FC_SHIFT) /* Memory-to-Memory */ +# define DMACHAN_CTRLB_FC_M2P (1 << DMACHAN_CTRLB_FC_SHIFT) /* Memory-to-Peripheral */ +# define DMACHAN_CTRLB_FC_P2M (2 << DMACHAN_CTRLB_FC_SHIFT) /* Peripheral-to-Memory */ +# define DMACHAN_CTRLB_FC_P2P (3 << DMACHAN_CTRLB_FC_SHIFT) /* Peripheral-to-Peripheral */ +#define DMACHAN_CTRLB_SRCINCR_SHIFT (24) /* Bits 24-25 */ +#define DMACHAN_CTRLB_SRCINCR_MASK (3 << DMACHAN_CTRLB_SRCINCR_SHIFT) +# define DMACHAN_CTRLB_SRCINCR_INCR (0 << DMACHAN_CTRLB_SRCINCR_SHIFT) /* Incrementing address */ +# define DMACHAN_CTRLB_SRCINCR_FIXED (2 << DMACHAN_CTRLB_SRCINCR_SHIFT) /* Fixed address */ +#define DMACHAN_CTRLB_DSTINCR_SHIFT (28) /* Bits 28-29 */ +#define DMACHAN_CTRLB_DSTINCR_MASK (3 << DMACHAN_CTRLB_DSTINCR_SHIFT) +# define DMACHAN_CTRLB_DSTINCR_INCR (0 << DMACHAN_CTRLB_DSTINCR_SHIFT) /* Incrementing address */ +# define DMACHAN_CTRLB_DSTINCR_FIXED (2 << DMACHAN_CTRLB_DSTINCR_SHIFT) /* Fixed address */ +#define DMACHAN_CTRLB_IEN (1 << 30) /* Bit 30: Clear sets BTC[n] flag in EBCISR */ + +/* DMAC Channel n [n = 0..3] Configuration Register */ + +#define DMACHAN_CFG_SRCPER_SHIFT (0) /* Bits 0-3: Channel source associated with peripheral ID */ +#define DMACHAN_CFG_SRCPER_MASK (15 << DMACHAN_CFG_SRCPER_SHIFT) +#define DMACHAN_CFG_DSTPER_SHIFT (4) /* Bits 4-7: Channel dest associated with peripheral ID */ +#define DMACHAN_CFG_DSTPER_MASK (15 << DMACHAN_CFG_DSTPER_SHIFT) +#define DMACHAN_CFG_SRCH2SEL (1 << 9) /* Bit 9: HW handshake triggers transfer */ +#define DMACHAN_CFG_DSTH2SEL (1 << 13) /* Bit 13: HW handshake trigger transfer */ +#define DMACHAN_CFG_SOD (1 << 16) /* Bit 16: Stop on done */ +#define DMACHAN_CFG_LOCKIF (1 << 20) /* Bit 20: Enable lock interface capability */ +#define DMACHAN_CFG_LOCKB (1 << 21) /* Bit 21: Enable AHB Bus Locking capability */ +#define DMACHAN_CFG_LOCKIFL (1 << 22) /* Bit 22: Lock Master Interface Arbiter */ +#define DMACHAN_CFG_AHBPRO_SHIFT (24) /* Bits 24-26: Bus access privilege */ +#define DMACHAN_CFG_AHBPRO_MASK (7 << DMACHAN_CFG_AHBPRO_SHIFT) +# define DMACHAN_CFG_AHBPRO_PRIV (1 << DMACHAN_CFG_AHBPRO_SHIFT) +# define DMACHAN_CFG_AHBPRO_BUFF (2 << DMACHAN_CFG_AHBPRO_SHIFT) +# define DMACHAN_CFG_AHBPRO_CACHE (4 << DMACHAN_CFG_AHBPRO_SHIFT) +#define DMACHAN_CFG_FIFOCFG_SHIFT (28) /* Bits 28-29 */ +#define DMACHAN_CFG_FIFOCFG_MASK (3 << DMACHAN_CFG_FIFOCFG_SHIFT) +# define DMACHAN_CFG_FIFOCFG_LARGEST (0 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Largest length AHB burst */ +# define DMACHAN_CFG_FIFOCFG_HALF (1 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Half FIFO size */ +# define DMACHAN_CFG_FIFOCFG_SINGLE (2 << DMACHAN_CFG_FIFOCFG_SHIFT) /* Single AHB access */ + +/* DMA Peripheral IDs *******************************************************************/ + +#define DMACHAN_PID_MCI0 0 +#define DMACHAN_PID_SSC 3 +#define DMACHAN_PID_MCI1 13 + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/* DMA multi buffer transfer link list entry structure */ + +struct dma_linklist_s +{ + uint32_t src; /* Source address */ + uint32_t dest; /* Destination address */ + uint32_t ctrla; /* Control A value */ + uint32_t ctrlb; /* Control B value */ + uint32_t next; /* Next descriptor address */ +}; + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_DMAC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_eefc.h b/nuttx/arch/arm/src/sam3u/sam3u_eefc.h index ed88a0134f..d32c6670b7 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_eefc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_eefc.h @@ -1,120 +1,120 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_eefc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* EEFC register offsets ****************************************************************/ - -#define SAM3U_EEFC_FMR_OFFSET 0x00 /* EEFC Flash Mode Register */ -#define SAM3U_EEFC_FCR_OFFSET 0x04 /* EEFC Flash Command Register */ -#define SAM3U_EEFC_FSR_OFFSET 0x08 /* EEFC Flash Status Register */ -#define SAM3U_EEFC_FRR_OFFSET 0x0c /* EEFC Flash Result Register */ - -/* EEFC register adresses ***************************************************************/ - -#define SAM3U_EEFC_FMR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FMR_OFFSET) -#define SAM3U_EEFC_FCR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FCR_OFFSET) -#define SAM3U_EEFC_FSR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FSR_OFFSET) -#define SAM3U_EEFC_FRR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FRR_OFFSET) - -#define SAM3U_EEFC0_FMR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FMR_OFFSET) -#define SAM3U_EEFC0_FCR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FCR_OFFSET) -#define SAM3U_EEFC0_FSR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FSR_OFFSET) -#define SAM3U_EEFC0_FRR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FRR_OFFSET) - -#define SAM3U_EEFC1_FMR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FMR_OFFSET) -#define SAM3U_EEFC1_FCR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FCR_OFFSET) -#define SAM3U_EEFC1_FSR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FSR_OFFSET) -#define SAM3U_EEFC1_FRR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FRR_OFFSET) - -/* EEFC register bit definitions ********************************************************/ - -#define EEFC_FMR_FRDY (1 << 0) /* Bit 0: Ready Interrupt Enable */ -#define EEFC_FMR_FWS_SHIFT (8) /* Bits 8-11: Flash Wait State */ -#define EEFC_FMR_FWS_MASK (15 << EEFC_FMR_FWS_SHIFT) -#define EEFC_FMR_FAM (1 << 24) /* Bit 24: Flash Access Mode */ - -#define EEFC_FCR_FCMD_SHIFT (0) /* Bits 0-7: Flash Command */ -#define EEFC_FCR_FCMD_MASK (0xff << EEFC_FCR_FCMD_SHIFT) -# define EEFC_FCR_FCMD_GETD (0 << EEFC_FCR_FCMD_SHIFT) /* Get Flash Descriptor */ -# define EEFC_FCR_FCMD_WP (1 << EEFC_FCR_FCMD_SHIFT) /* Write page */ -# define EEFC_FCR_FCMD_WPL (2 << EEFC_FCR_FCMD_SHIFT) /* Write page and lock */ -# define EEFC_FCR_FCMD_EWP (3 << EEFC_FCR_FCMD_SHIFT) /* Erase page and write page */ -# define EEFC_FCR_FCMD_EWPL (4 << EEFC_FCR_FCMD_SHIFT) /* Erase page and write page then lock */ -# define EEFC_FCR_FCMD_EA (5 << EEFC_FCR_FCMD_SHIFT) /* Erase all */ -# define EEFC_FCR_FCMD_SLB (8 << EEFC_FCR_FCMD_SHIFT) /* Set Lock Bit */ -# define EEFC_FCR_FCMD_CLB (9 << EEFC_FCR_FCMD_SHIFT) /* Clear Lock Bit */ -# define EEFC_FCR_FCMD_GLB (10 << EEFC_FCR_FCMD_SHIFT) /* Get Lock Bit */ -# define EEFC_FCR_FCMD_SGPB (11 << EEFC_FCR_FCMD_SHIFT) /* Set GPNVM Bit */ -# define EEFC_FCR_FCMD_CGPB (12 << EEFC_FCR_FCMD_SHIFT) /* Clear GPNVM Bit */ -# define EEFC_FCR_FCMD_GGPB (13 << EEFC_FCR_FCMD_SHIFT) /* Get GPNVM Bit */ -# define EEFC_FCR_FCMD_STUI (14 << EEFC_FCR_FCMD_SHIFT) /* Start Read Unique Identifier */ -# define EEFC_FCR_FCMD_SPUI (15 << EEFC_FCR_FCMD_SHIFT) /* Stop Read Unique Identifier */ -#define EEFC_FCR_FARG_SHIFT (8) /* Bits 8-23: Flash Command Argument */ -#define EEFC_FCR_FARG_MASK (0xffff << EEFC_FCR_FARG_SHIFT) -#define EEFC_FCR_FKEY_SHIFT (24) /* Bits 24-31: Flash Writing Protection Key */ -#define EEFC_FCR_FKEY__MASK (0xff << EEFC_FCR_FKEY_SHIFT) - -#define EEFC_FSR_FRDY (1 << 0) /* Bit 0: Flash Ready Status */ -#define EEFC_FSR_FCMDE (1 << 1) /* Bit 1: Flash Command Error Status */ -#define EEFC_FSR_FLOCKE (1 << 2) /* Bit 2: Flash Lock Error Status */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_eefc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* EEFC register offsets ****************************************************************/ + +#define SAM3U_EEFC_FMR_OFFSET 0x00 /* EEFC Flash Mode Register */ +#define SAM3U_EEFC_FCR_OFFSET 0x04 /* EEFC Flash Command Register */ +#define SAM3U_EEFC_FSR_OFFSET 0x08 /* EEFC Flash Status Register */ +#define SAM3U_EEFC_FRR_OFFSET 0x0c /* EEFC Flash Result Register */ + +/* EEFC register adresses ***************************************************************/ + +#define SAM3U_EEFC_FMR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FMR_OFFSET) +#define SAM3U_EEFC_FCR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FCR_OFFSET) +#define SAM3U_EEFC_FSR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FSR_OFFSET) +#define SAM3U_EEFC_FRR(n) (SAM3U_EEFCN_BASE(n)+SAM3U_EEFC_FRR_OFFSET) + +#define SAM3U_EEFC0_FMR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FMR_OFFSET) +#define SAM3U_EEFC0_FCR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FCR_OFFSET) +#define SAM3U_EEFC0_FSR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FSR_OFFSET) +#define SAM3U_EEFC0_FRR (SAM3U_EEFC0_BASE+SAM3U_EEFC_FRR_OFFSET) + +#define SAM3U_EEFC1_FMR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FMR_OFFSET) +#define SAM3U_EEFC1_FCR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FCR_OFFSET) +#define SAM3U_EEFC1_FSR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FSR_OFFSET) +#define SAM3U_EEFC1_FRR (SAM3U_EEFC1_BASE+SAM3U_EEFC_FRR_OFFSET) + +/* EEFC register bit definitions ********************************************************/ + +#define EEFC_FMR_FRDY (1 << 0) /* Bit 0: Ready Interrupt Enable */ +#define EEFC_FMR_FWS_SHIFT (8) /* Bits 8-11: Flash Wait State */ +#define EEFC_FMR_FWS_MASK (15 << EEFC_FMR_FWS_SHIFT) +#define EEFC_FMR_FAM (1 << 24) /* Bit 24: Flash Access Mode */ + +#define EEFC_FCR_FCMD_SHIFT (0) /* Bits 0-7: Flash Command */ +#define EEFC_FCR_FCMD_MASK (0xff << EEFC_FCR_FCMD_SHIFT) +# define EEFC_FCR_FCMD_GETD (0 << EEFC_FCR_FCMD_SHIFT) /* Get Flash Descriptor */ +# define EEFC_FCR_FCMD_WP (1 << EEFC_FCR_FCMD_SHIFT) /* Write page */ +# define EEFC_FCR_FCMD_WPL (2 << EEFC_FCR_FCMD_SHIFT) /* Write page and lock */ +# define EEFC_FCR_FCMD_EWP (3 << EEFC_FCR_FCMD_SHIFT) /* Erase page and write page */ +# define EEFC_FCR_FCMD_EWPL (4 << EEFC_FCR_FCMD_SHIFT) /* Erase page and write page then lock */ +# define EEFC_FCR_FCMD_EA (5 << EEFC_FCR_FCMD_SHIFT) /* Erase all */ +# define EEFC_FCR_FCMD_SLB (8 << EEFC_FCR_FCMD_SHIFT) /* Set Lock Bit */ +# define EEFC_FCR_FCMD_CLB (9 << EEFC_FCR_FCMD_SHIFT) /* Clear Lock Bit */ +# define EEFC_FCR_FCMD_GLB (10 << EEFC_FCR_FCMD_SHIFT) /* Get Lock Bit */ +# define EEFC_FCR_FCMD_SGPB (11 << EEFC_FCR_FCMD_SHIFT) /* Set GPNVM Bit */ +# define EEFC_FCR_FCMD_CGPB (12 << EEFC_FCR_FCMD_SHIFT) /* Clear GPNVM Bit */ +# define EEFC_FCR_FCMD_GGPB (13 << EEFC_FCR_FCMD_SHIFT) /* Get GPNVM Bit */ +# define EEFC_FCR_FCMD_STUI (14 << EEFC_FCR_FCMD_SHIFT) /* Start Read Unique Identifier */ +# define EEFC_FCR_FCMD_SPUI (15 << EEFC_FCR_FCMD_SHIFT) /* Stop Read Unique Identifier */ +#define EEFC_FCR_FARG_SHIFT (8) /* Bits 8-23: Flash Command Argument */ +#define EEFC_FCR_FARG_MASK (0xffff << EEFC_FCR_FARG_SHIFT) +#define EEFC_FCR_FKEY_SHIFT (24) /* Bits 24-31: Flash Writing Protection Key */ +#define EEFC_FCR_FKEY__MASK (0xff << EEFC_FCR_FKEY_SHIFT) + +#define EEFC_FSR_FRDY (1 << 0) /* Bit 0: Flash Ready Status */ +#define EEFC_FSR_FCMDE (1 << 1) /* Bit 1: Flash Command Error Status */ +#define EEFC_FSR_FLOCKE (1 << 2) /* Bit 2: Flash Lock Error Status */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_EEFC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_gpbr.h b/nuttx/arch/arm/src/sam3u/sam3u_gpbr.h index e3ac0c1281..7e9853180b 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_gpbr.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_gpbr.h @@ -1,90 +1,90 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_gpbr.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* GPBR register offsets ****************************************************************/ - -#define SAM3U_GPBR_OFFSET(n) ((n)<<2) /* General purpose back-up registers */ -#define SAM3U_GPBR0_OFFSET 0x00 -#define SAM3U_GPBR1_OFFSET 0x04 -#define SAM3U_GPBR2_OFFSET 0x08 -#define SAM3U_GPBR3_OFFSET 0x0c -#define SAM3U_GPBR4_OFFSET 0x10 -#define SAM3U_GPBR5_OFFSET 0x14 -#define SAM3U_GPBR6_OFFSET 0x18 -#define SAM3U_GPBR7_OFFSET 0x1c - -/* GPBR register adresses ***************************************************************/ - -#define SAM3U_GPBR(n)) (SAM3U_GPBR_BASE+SAM3U_GPBR_OFFSET(n)) -#define SAM3U_GPBR0 (SAM3U_GPBR_BASE+SAM3U_GPBR0_OFFSET) -#define SAM3U_GPBR1 (SAM3U_GPBR_BASE+SAM3U_GPBR1_OFFSET) -#define SAM3U_GPBR2 (SAM3U_GPBR_BASE+SAM3U_GPBR2_OFFSET) -#define SAM3U_GPBR3 (SAM3U_GPBR_BASE+SAM3U_GPBR3_OFFSET) -#define SAM3U_GPBR4 (SAM3U_GPBR_BASE+SAM3U_GPBR4_OFFSET) -#define SAM3U_GPBR5 (SAM3U_GPBR_BASE+SAM3U_GPBR5_OFFSET) -#define SAM3U_GPBR6 (SAM3U_GPBR_BASE+SAM3U_GPBR6_OFFSET) -#define SAM3U_GPBR7 (SAM3U_GPBR_BASE+SAM3U_GPBR7_OFFSET) - -/* GPBR register bit definitions ********************************************************/ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_gpbr.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* GPBR register offsets ****************************************************************/ + +#define SAM3U_GPBR_OFFSET(n) ((n)<<2) /* General purpose back-up registers */ +#define SAM3U_GPBR0_OFFSET 0x00 +#define SAM3U_GPBR1_OFFSET 0x04 +#define SAM3U_GPBR2_OFFSET 0x08 +#define SAM3U_GPBR3_OFFSET 0x0c +#define SAM3U_GPBR4_OFFSET 0x10 +#define SAM3U_GPBR5_OFFSET 0x14 +#define SAM3U_GPBR6_OFFSET 0x18 +#define SAM3U_GPBR7_OFFSET 0x1c + +/* GPBR register adresses ***************************************************************/ + +#define SAM3U_GPBR(n)) (SAM3U_GPBR_BASE+SAM3U_GPBR_OFFSET(n)) +#define SAM3U_GPBR0 (SAM3U_GPBR_BASE+SAM3U_GPBR0_OFFSET) +#define SAM3U_GPBR1 (SAM3U_GPBR_BASE+SAM3U_GPBR1_OFFSET) +#define SAM3U_GPBR2 (SAM3U_GPBR_BASE+SAM3U_GPBR2_OFFSET) +#define SAM3U_GPBR3 (SAM3U_GPBR_BASE+SAM3U_GPBR3_OFFSET) +#define SAM3U_GPBR4 (SAM3U_GPBR_BASE+SAM3U_GPBR4_OFFSET) +#define SAM3U_GPBR5 (SAM3U_GPBR_BASE+SAM3U_GPBR5_OFFSET) +#define SAM3U_GPBR6 (SAM3U_GPBR_BASE+SAM3U_GPBR6_OFFSET) +#define SAM3U_GPBR7 (SAM3U_GPBR_BASE+SAM3U_GPBR7_OFFSET) + +/* GPBR register bit definitions ********************************************************/ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_GPBR_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_gpioirq.c b/nuttx/arch/arm/src/sam3u/sam3u_gpioirq.c index bcc597b860..dc01374a9f 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_gpioirq.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_gpioirq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/sam3u_gpioirq.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_hsmci.h b/nuttx/arch/arm/src/sam3u/sam3u_hsmci.h index 3923adf5a0..1667789a6b 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_hsmci.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_hsmci.h @@ -1,297 +1,297 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_hsmci.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* HSMCI register offsets ***************************************************************/ - -#define SAM3U_HSMCI_CR_OFFSET 0x0000 /* Control Register */ -#define SAM3U_HSMCI_MR_OFFSET 0x0004 /* Mode Register */ -#define SAM3U_HSMCI_DTOR_OFFSET 0x0008 /* Data Timeout Register */ -#define SAM3U_HSMCI_SDCR_OFFSET 0x000c /* SD/SDIO Card Register */ -#define SAM3U_HSMCI_ARGR_OFFSET 0x0010 /* Argument Register */ -#define SAM3U_HSMCI_CMDR_OFFSET 0x0014 /* Command Register */ -#define SAM3U_HSMCI_BLKR_OFFSET 0x0018 /* Block Register */ -#define SAM3U_HSMCI_CSTOR_OFFSET 0x001c /* Completion Signal Timeout Register */ -#define SAM3U_HSMCI_RSPR0_OFFSET 0x0020 /* Response Register 0 */ -#define SAM3U_HSMCI_RSPR1_OFFSET 0x0024 /* Response Register 1 */ -#define SAM3U_HSMCI_RSPR2_OFFSET 0x0028 /* Response Register 2 */ -#define SAM3U_HSMCI_RSPR3_OFFSET 0x002c /* Response Register 3 */ -#define SAM3U_HSMCI_RDR_OFFSET 0x0030 /* Receive Data Register */ -#define SAM3U_HSMCI_TDR_OFFSET 0x0034 /* Transmit Data Register */ - /* 0x0038-0x003c: Reserved */ -#define SAM3U_HSMCI_SR_OFFSET 0x0040 /* Status Register */ -#define SAM3U_HSMCI_IER_OFFSET 0x0044 /* Interrupt Enable Register */ -#define SAM3U_HSMCI_IDR_OFFSET 0x0048 /* Interrupt Disable Register */ -#define SAM3U_HSMCI_IMR_OFFSET 0x004c /* Interrupt Mask Register */ -#define SAM3U_HSMCI_DMA_OFFSET 0x0050 /* DMA Configuration Register */ -#define SAM3U_HSMCI_CFG_OFFSET 0x0054 /* Configuration Register */ - /* 0x0058-0x00e0: Reserved */ -#define SAM3U_HSMCI_WPMR_OFFSET 0x00e4 /* Write Protection Mode Register */ -#define SAM3U_HSMCI_WPSR_OFFSET 0x00e8 /* Write Protection Status Register */ - /* 0x00ec-0x00fc: Reserved */ - /* 0x0100-0x0124: Reserved */ -#define SAM3U_HSMCI_FIFO_OFFSET 0x0200 /* 0x0200-0x3ffc FIFO Memory Aperture */ - -/* HSMCI register adresses **************************************************************/ - -#define SAM3U_HSMCI_CR (SAM3U_MCI_BASE+SAM3U_HSMCI_CR_OFFSET) -#define SAM3U_HSMCI_MR (SAM3U_MCI_BASE+SAM3U_HSMCI_MR_OFFSET) -#define SAM3U_HSMCI_DTOR (SAM3U_MCI_BASE+SAM3U_HSMCI_DTOR_OFFSET) -#define SAM3U_HSMCI_SDCR (SAM3U_MCI_BASE+SAM3U_HSMCI_SDCR_OFFSET) -#define SAM3U_HSMCI_ARGR (SAM3U_MCI_BASE+SAM3U_HSMCI_ARGR_OFFSET) -#define SAM3U_HSMCI_CMDR (SAM3U_MCI_BASE+SAM3U_HSMCI_CMDR_OFFSET) -#define SAM3U_HSMCI_BLKR (SAM3U_MCI_BASE+SAM3U_HSMCI_BLKR_OFFSET) -#define SAM3U_HSMCI_CSTOR (SAM3U_MCI_BASE+SAM3U_HSMCI_CSTOR_OFFSET) -#define SAM3U_HSMCI_RSPR0 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR0_OFFSET) -#define SAM3U_HSMCI_RSPR1 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR1_OFFSET) -#define SAM3U_HSMCI_RSPR2 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR2_OFFSET) -#define SAM3U_HSMCI_RSPR3 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR3_OFFSET) -#define SAM3U_HSMCI_RDR (SAM3U_MCI_BASE+SAM3U_HSMCI_RDR_OFFSET) -#define SAM3U_HSMCI_TDR (SAM3U_MCI_BASE+SAM3U_HSMCI_TDR_OFFSET) -#define SAM3U_HSMCI_SR (SAM3U_MCI_BASE+SAM3U_HSMCI_SR_OFFSET) -#define SAM3U_HSMCI_IER (SAM3U_MCI_BASE+SAM3U_HSMCI_IER_OFFSET) -#define SAM3U_HSMCI_IDR (SAM3U_MCI_BASE+SAM3U_HSMCI_IDR_OFFSET) -#define SAM3U_HSMCI_IMR (SAM3U_MCI_BASE+SAM3U_HSMCI_IMR_OFFSET) -#define SAM3U_HSMCI_DMA (SAM3U_MCI_BASE+SAM3U_HSMCI_DMA_OFFSET) -#define SAM3U_HSMCI_CFG (SAM3U_MCI_BASE+SAM3U_HSMCI_CFG_OFFSET) -#define SAM3U_HSMCI_WPMR (SAM3U_MCI_BASE+SAM3U_HSMCI_WPMR_OFFSET) -#define SAM3U_HSMCI_WPSR (SAM3U_MCI_BASE+SAM3U_HSMCI_WPSR_OFFSET) -#define SAM3U_HSMCI_FIFO (SAM3U_MCI_BASE+SAM3U_HSMCI_FIFO_OFFSET) - -/* HSMCI register bit definitions *******************************************************/ - -/* HSMCI Control Register */ - -#define HSMCI_CR_MCIEN (1 << 0) /* Bit 0: Multi-Media Interface Enable */ -#define HSMCI_CR_MCIDIS (1 << 1) /* Bit 1: Multi-Media Interface Disable */ -#define HSMCI_CR_PWSEN (1 << 2) /* Bit 2: Power Save Mode Enable */ -#define HSMCI_CR_PWSDIS (1 << 3) /* Bit 3: Power Save Mode Disable */ -#define HSMCI_CR_SWRST (1 << 7) /* Bit 7: Software Reset */ - -/* HSMCI Mode Register */ - -#define HSMCI_MR_CLKDIV_SHIFT (0) /* Bits 0-7: Clock Divider */ -#define HSMCI_MR_CLKDIV_MASK (0xff << HSMCI_MR_CLKDIV_SHIFT) -#define HSMCI_MR_PWSDIV_SHIFT (8) /* Bits 8-10: Power Saving Divider */ -#define HSMCI_MR_PWSDIV_MASK (7 << HSMCI_MR_PWSDIV_SHIFT) -# define HSMCI_MR_PWSDIV_MAX (7 << HSMCI_MR_PWSDIV_SHIFT) -#define HSMCI_MR_RDPROOF (1 << 11) /* Bit 11: Read Proof Enable */ -#define HSMCI_MR_WRPROOF (1 << 12) /* Bit 12: Write Proof Enable */ -#define HSMCI_MR_FBYTE (1 << 13) /* Bit 13: Force Byte Transfer */ -#define HSMCI_MR_PADV (1 << 14) /* Bit 14: Padding Value */ -#define HSMCI_MR_BLKLEN_SHIFT (16) /* Bits 16-31: Data Block Length */ -#define HSMCI_MR_BLKLEN_MASK (0xffff << HSMCI_MR_BLKLEN_SHIFT) - -/* HSMCI Data Timeout Register */ - -#define HSMCI_DTOR_DTOCYC_SHIFT (0) /* Bits 0-3: Data Timeout Cycle Number */ -#define HSMCI_DTOR_DTOCYC_MASK (15 << HSMCI_DTOR_DTOCYC_SHIFT) -# define HSMCI_DTOR_DTOCYC_MAX (15 << HSMCI_DTOR_DTOCYC_SHIFT) -#define HSMCI_DTOR_DTOMUL_SHIFT (4) /* Bits 4-6: Data Timeout Multiplier */ -#define HSMCI_DTOR_DTOMUL_MASK (7 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_1 (0 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_16 (1 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_128 (2 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_256 (3 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_1024 (4 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_4096 (5 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_65536 (6 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_1048576 (7 << HSMCI_DTOR_DTOMUL_SHIFT) -# define HSMCI_DTOR_DTOMUL_MAX (7 << HSMCI_DTOR_DTOMUL_SHIFT) - -/* HSMCI SDCard/SDIO Register */ - -#define HSMCI_SDCR_SDCSEL_SHIFT (0) /* Bits 0-1: SDCard/SDIO Slot */ -#define HSMCI_SDCR_SDCSEL_MASK (3 << HSMCI_SDCR_SDCSEL_SHIFT) -# define HSMCI_SDCR_SDCSEL_SLOTA (0 << HSMCI_SDCR_SDCSEL_SHIFT) -#define HSMCI_SDCR_SDCBUS_SHIFT (6) /* Bits 6-7: SDCard/SDIO Bus Width */ -#define HSMCI_SDCR_SDCBUS_MASK (3 << HSMCI_SDCR_SDCBUS_SHIFT) -# define HSMCI_SDCR_SDCBUS_1BIT (0 << HSMCI_SDCR_SDCBUS_SHIFT) -# define HSMCI_SDCR_SDCBUS_4BIT (2 << HSMCI_SDCR_SDCBUS_SHIFT) -# define HSMCI_SDCR_SDCBUS_8BIT (3 << HSMCI_SDCR_SDCBUS_SHIFT) - -/* HSMCI Command Register */ - -#define HSMCI_CMDR_CMDNB_SHIFT (0) /* Bits 0-5: Command Number */ -#define HSMCI_CMDR_CMDNB_MASK (63 << HSMCI_CMDR_CMDNB_SHIFT) -#define HSMCI_CMDR_RSPTYP_SHIFT (6) /* Bits 6-7: Response Type */ -#define HSMCI_CMDR_RSPTYP_MASK (3 << HSMCI_CMDR_RSPTYP_SHIFT) -# define HSMCI_CMDR_RSPTYP_NONE (0 << HSMCI_CMDR_RSPTYP_SHIFT) /* No response */ -# define HSMCI_CMDR_RSPTYP_48BIT (1 << HSMCI_CMDR_RSPTYP_SHIFT) /* 48-bit response */ -# define HSMCI_CMDR_RSPTYP_136BIT (2 << HSMCI_CMDR_RSPTYP_SHIFT) /* 136-bit response */ -# define HSMCI_CMDR_RSPTYP_R1B (3 << HSMCI_CMDR_RSPTYP_SHIFT) /* R1b response type */ -#define HSMCI_CMDR_SPCMD_SHIFT (8) /* Bits 8-10: Special Command */ -#define HSMCI_CMDR_SPCMD_MASK (7 << HSMCI_CMDR_SPCMD_SHIFT) -# define HSMCI_CMDR_SPCMD_NORMAL (0 << HSMCI_CMDR_SPCMD_SHIFT) /* Not a special CMD */ -# define HSMCI_CMDR_SPCMD_INIT (1 << HSMCI_CMDR_SPCMD_SHIFT) /* Initialization CMD */ -# define HSMCI_CMDR_SPCMD_SYNC (2 << HSMCI_CMDR_SPCMD_SHIFT) /* Synchronized CMD */ -# define HSMCI_CMDR_SPCMD_CEATAC (3 << HSMCI_CMDR_SPCMD_SHIFT) /* CE-ATA Completion Signal disable CMD */ -# define HSMCI_CMDR_SPCMD_INTCMD (4 << HSMCI_CMDR_SPCMD_SHIFT) /* Interrupt command */ -# define HSMCI_CMDR_SPCMD_INTRESP (5 << HSMCI_CMDR_SPCMD_SHIFT) /* Interrupt response */ -# define HSMCI_CMDR_SPCMD_BOOTOP (6 << HSMCI_CMDR_SPCMD_SHIFT) /* Boot Operation Request */ -# define HSMCI_CMDR_SPCMD_BOOTEND (7 << HSMCI_CMDR_SPCMD_SHIFT) /* End Boot Operation */ -#define HSMCI_CMDR_OPDCMD (1 << 11) /* Bit 11: Open Drain Command */ -#define HSMCI_CMDR_MAXLAT (1 << 12) /* Bit 12: Max Latency for Command to Response */ -#define HSMCI_CMDR_TRCMD_SHIFT (16) /* Bits 16-17: Transfer Command */ -#define HSMCI_CMDR_TRCMD_MASK (3 << HSMCI_CMDR_TRCMD_SHIFT) -# define HSMCI_CMDR_TRCMD_NONE (0 << HSMCI_CMDR_TRCMD_SHIFT) /* No data transfer */ -# define HSMCI_CMDR_TRCMD_START (1 << HSMCI_CMDR_TRCMD_SHIFT) /* Start data transfer */ -# define HSMCI_CMDR_TRCMD_STOP (2 << HSMCI_CMDR_TRCMD_SHIFT) /* Stop data transfer */ -#define HSMCI_CMDR_TRDIR (1 << 18) /* Bit 18: Transfer Direction */ -# define HSMCI_CMDR_TRDIR_WRITE (0 << 18) -# define HSMCI_CMDR_TRDIR_READ (1 << 18) -#define HSMCI_CMDR_TRTYP_SHIFT (19) /* Bits 19-21: Transfer Type */ -#define HSMCI_CMDR_TRTYP_MASK (7 << HSMCI_CMDR_TRTYP_SHIFT) -# define HSMCI_CMDR_TRTYP_SINGLE (0 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC/SDCard Single Block */ -# define HSMCI_CMDR_TRTYP_MULTI (1 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC/SDCard Multiple Block */ -# define HSMCI_CMDR_TRTYP_STREAM (2 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC Stream */ -# define HSMCI_CMDR_TRTYP_SDIOBYTE (4 << HSMCI_CMDR_TRTYP_SHIFT) /* SDIO Byte */ -# define HSMCI_CMDR_TRTYP_SDIOBLK (5 << HSMCI_CMDR_TRTYP_SHIFT) /* SDIO Block */ -#define HSMCI_CMDR_IOSPCMD_SHIFT (24) /* Bits 24-25: SDIO Special Command */ -#define HSMCI_CMDR_IOSPCMD_MASK (3 << HSMCI_CMDR_IOSPCMD_SHIFT) -# define HSMCI_CMDR_IOSPCMD_NORMAL (0 << HSMCI_CMDR_IOSPCMD_SHIFT) /* Not an SDIO Special Command */ -# define HSMCI_CMDR_IOSPCMD_SUSP (1 << HSMCI_CMDR_IOSPCMD_SHIFT) /* SDIO Suspend Command */ -# define HSMCI_CMDR_IOSPCMD_RESUME (2 << HSMCI_CMDR_IOSPCMD_SHIFT) /* SDIO Resume Command */ -#define HSMCI_CMDR_ATACS (1 << 26) /* Bit 26: ATA with Command Completion Signal */ -#define HSMCI_CMDR_BOOTACK (1 << 17) /* Bit 27: Boot Operation Acknowledge */ - -/* HSMCI Block Register */ - -#define HSMCI_BLKR_BCNT_SHIFT (0) /* Bits 0-15: MMC/SDIO Block Count - SDIO Byte Count */ -#define HSMCI_BLKR_BCNT_MASK (0xffff << HSMCI_BLKR_BCNT_SHIFT) -#define HSMCI_BLKR_BLKLEN_SHIFT (16) /* Bits 16-31: Data Block Length */ -#define HSMCI_BLKR_BLKLEN_MASK (0xffff << HSMCI_BLKR_BLKLEN_SHIFT) - -/* HSMCI Completion Signal Timeout Register */ - -#define HSMCI_CSTOR_CSTOCYC_SHIFT (0) /* Bits 0-3: Completion Signal Timeout Cycle Number */ -#define HSMCI_CSTOR_CSTOCYC_MASK (15 << HSMCI_CSTOR_CSTOCYC_SHIFT) -#define HSMCI_CSTOR_CSTOMUL_SHIFT (4) /* Bits 4-6: Completion Signal Timeout Multiplier */ -#define HSMCI_CSTOR_CSTOMUL_MASK (7 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_1 (0 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_16 (1 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_128 (2 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_256 (3 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_1024 (4 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_4096 (5 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_65536 (6 << HSMCI_CSTOR_CSTOMUL_SHIFT) -# define HSMCI_CSTOR_CSTOMUL_1048576 (7 << HSMCI_CSTOR_CSTOMUL_SHIFT) - -/* HSMCI Status Register, HSMCI Interrupt Enable Register, HSMCI Interrupt Disable - * Register, and HSMCI Interrupt Mask Register common bit-field definitions - */ - -#define HSMCI_INT_CMDRDY (1 << 0) /* Bit 0: Command Ready */ -#define HSMCI_INT_RXRDY (1 << 1) /* Bit 1: Receiver Ready */ -#define HSMCI_INT_TXRDY (1 << 2) /* Bit 2: Transmit Ready */ -#define HSMCI_INT_BLKE (1 << 3) /* Bit 3: Data Block Ended */ -#define HSMCI_INT_DTIP (1 << 4) /* Bit 4: Data Transfer in Progress */ -#define HSMCI_INT_NOTBUSY (1 << 5) /* Bit 6: HSMCI Not Busy */ -#define HSMCI_INT_SDIOIRQA (1 << 8) /* Bit 8: SDIO Interrupt for Slot A */ -#define HSMCI_INT_SDIOWAIT (1 << 12) /* Bit 12: SDIO Read Wait Operation Status */ -#define HSMCI_INT_CSRCV (1 << 13) /* Bit 13: CE-ATA Completion Signal Received */ -#define HSMCI_INT_RINDE (1 << 16) /* Bit 16: Response Index Error */ -#define HSMCI_INT_RDIRE (1 << 17) /* Bit 17: Response Direction Error */ -#define HSMCI_INT_RCRCE (1 << 18) /* Bit 18: Response CRC Error */ -#define HSMCI_INT_RENDE (1 << 19) /* Bit 19: Response End Bit Error */ -#define HSMCI_INT_RTOE (1 << 20) /* Bit 20: Response Time-out */ -#define HSMCI_INT_DCRCE (1 << 21) /* Bit 21: Data CRC Error */ -#define HSMCI_INT_DTOE (1 << 22) /* Bit 22: Data Time-out Error */ -#define HSMCI_INT_CSTOE (1 << 23) /* Bit 23: Completion Signal Time-out Error */ -#define HSMCI_INT_BLKOVRE (1 << 24) /* Bit 24: DMA Block Overrun Error */ -#define HSMCI_INT_DMADONE (1 << 25) /* Bit 25: DMA Transfer done */ -#define HSMCI_INT_FIFOEMPTY (1 << 26) /* Bit 26: FIFO empty flag */ -#define HSMCI_INT_XFRDONE (1 << 27) /* Bit 27: Transfer Done flag */ -#define HSMCI_INT_ACKRCV (1 << 28) /* Bit 28: Boot Operation Acknowledge Received */ -#define HSMCI_INT_ACKRCVE (1 << 29) /* Bit 29: Boot Operation Acknowledge Error */ -#define HSMCI_INT_OVRE (1 << 30) /* Bit 30: Overrun */ -#define HSMCI_INT_UNRE (1 << 31) /* Bit 31: Underrun */ - -/* HSMCI DMA Configuration Register */ - -#define HSMCI_DMA_OFFSET_SHIFT (0) /* Bits 0-1: DMA Write Buffer Offset */ -#define HSMCI_DMA_OFFSET_MASK (3 << HSMCI_DMA_OFFSET_SHIFT) -#define HSMCI_DMA_CHKSIZE (1 << 4) /* Bit 4: DMA Channel Read and Write Chunk Size */ -#define HSMCI_DMA_DMAEN (1 << 8) /* Bit 8: DMA Hardware Handshaking Enable */ -#define HSMCI_DMA_ROPT (1 << 12) /* Bit 12: Read Optimization with padding */ - -/* HSMCI Configuration Register */ - -#define HSMCI_CFG_FIFOMODE (1 << 0) /* Bit 0: HSMCI Internal FIFO control mode */ -#define HSMCI_CFG_FERRCTRL (1 << 4) /* Bit 4: Flow Error flag reset control mode */ -#define HSMCI_CFG_HSMODE (1 << 8) /* Bit 8: High Speed Mode */ -#define HSMCI_CFG_LSYNC (1 << 12) /* Bit 12: Synchronize on the last block */ - -/* HSMCI Write Protect Mode Register */ - -#define HSMCI_WPMR_WP_EN (1 << 0) /* Bit 0: Write Protection Enable */ -#define HSMCI_WPMR_WP_KEY_SHIFT (8) /* Bits 8-31: Write Protection Key password */ -#define HSMCI_WPMR_WP_KEY_MASK (0x00ffffff << HSMCI_WPMR_WP_KEY_SHIFT) - -/* HSMCI Write Protect Status Register */ - -#define HSMCI_WPSR_WP_VS_SHIFT (0) /* Bits 0-3: Write Protection Violation Status */ -#define HSMCI_WPSR_WP_VS_MASK (15 << HSMCI_WPSR_WP_VS_SHIFT) -#define HSMCI_WPSR_WP_VSRC_SHIFT (8) /* Bits 8-23: Write Protection Violation Source */ -#define HSMCI_WPSR_WP_VSRC_MASK (0xffff << HSMCI_WPSR_WP_VSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_hsmci.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* HSMCI register offsets ***************************************************************/ + +#define SAM3U_HSMCI_CR_OFFSET 0x0000 /* Control Register */ +#define SAM3U_HSMCI_MR_OFFSET 0x0004 /* Mode Register */ +#define SAM3U_HSMCI_DTOR_OFFSET 0x0008 /* Data Timeout Register */ +#define SAM3U_HSMCI_SDCR_OFFSET 0x000c /* SD/SDIO Card Register */ +#define SAM3U_HSMCI_ARGR_OFFSET 0x0010 /* Argument Register */ +#define SAM3U_HSMCI_CMDR_OFFSET 0x0014 /* Command Register */ +#define SAM3U_HSMCI_BLKR_OFFSET 0x0018 /* Block Register */ +#define SAM3U_HSMCI_CSTOR_OFFSET 0x001c /* Completion Signal Timeout Register */ +#define SAM3U_HSMCI_RSPR0_OFFSET 0x0020 /* Response Register 0 */ +#define SAM3U_HSMCI_RSPR1_OFFSET 0x0024 /* Response Register 1 */ +#define SAM3U_HSMCI_RSPR2_OFFSET 0x0028 /* Response Register 2 */ +#define SAM3U_HSMCI_RSPR3_OFFSET 0x002c /* Response Register 3 */ +#define SAM3U_HSMCI_RDR_OFFSET 0x0030 /* Receive Data Register */ +#define SAM3U_HSMCI_TDR_OFFSET 0x0034 /* Transmit Data Register */ + /* 0x0038-0x003c: Reserved */ +#define SAM3U_HSMCI_SR_OFFSET 0x0040 /* Status Register */ +#define SAM3U_HSMCI_IER_OFFSET 0x0044 /* Interrupt Enable Register */ +#define SAM3U_HSMCI_IDR_OFFSET 0x0048 /* Interrupt Disable Register */ +#define SAM3U_HSMCI_IMR_OFFSET 0x004c /* Interrupt Mask Register */ +#define SAM3U_HSMCI_DMA_OFFSET 0x0050 /* DMA Configuration Register */ +#define SAM3U_HSMCI_CFG_OFFSET 0x0054 /* Configuration Register */ + /* 0x0058-0x00e0: Reserved */ +#define SAM3U_HSMCI_WPMR_OFFSET 0x00e4 /* Write Protection Mode Register */ +#define SAM3U_HSMCI_WPSR_OFFSET 0x00e8 /* Write Protection Status Register */ + /* 0x00ec-0x00fc: Reserved */ + /* 0x0100-0x0124: Reserved */ +#define SAM3U_HSMCI_FIFO_OFFSET 0x0200 /* 0x0200-0x3ffc FIFO Memory Aperture */ + +/* HSMCI register adresses **************************************************************/ + +#define SAM3U_HSMCI_CR (SAM3U_MCI_BASE+SAM3U_HSMCI_CR_OFFSET) +#define SAM3U_HSMCI_MR (SAM3U_MCI_BASE+SAM3U_HSMCI_MR_OFFSET) +#define SAM3U_HSMCI_DTOR (SAM3U_MCI_BASE+SAM3U_HSMCI_DTOR_OFFSET) +#define SAM3U_HSMCI_SDCR (SAM3U_MCI_BASE+SAM3U_HSMCI_SDCR_OFFSET) +#define SAM3U_HSMCI_ARGR (SAM3U_MCI_BASE+SAM3U_HSMCI_ARGR_OFFSET) +#define SAM3U_HSMCI_CMDR (SAM3U_MCI_BASE+SAM3U_HSMCI_CMDR_OFFSET) +#define SAM3U_HSMCI_BLKR (SAM3U_MCI_BASE+SAM3U_HSMCI_BLKR_OFFSET) +#define SAM3U_HSMCI_CSTOR (SAM3U_MCI_BASE+SAM3U_HSMCI_CSTOR_OFFSET) +#define SAM3U_HSMCI_RSPR0 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR0_OFFSET) +#define SAM3U_HSMCI_RSPR1 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR1_OFFSET) +#define SAM3U_HSMCI_RSPR2 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR2_OFFSET) +#define SAM3U_HSMCI_RSPR3 (SAM3U_MCI_BASE+SAM3U_HSMCI_RSPR3_OFFSET) +#define SAM3U_HSMCI_RDR (SAM3U_MCI_BASE+SAM3U_HSMCI_RDR_OFFSET) +#define SAM3U_HSMCI_TDR (SAM3U_MCI_BASE+SAM3U_HSMCI_TDR_OFFSET) +#define SAM3U_HSMCI_SR (SAM3U_MCI_BASE+SAM3U_HSMCI_SR_OFFSET) +#define SAM3U_HSMCI_IER (SAM3U_MCI_BASE+SAM3U_HSMCI_IER_OFFSET) +#define SAM3U_HSMCI_IDR (SAM3U_MCI_BASE+SAM3U_HSMCI_IDR_OFFSET) +#define SAM3U_HSMCI_IMR (SAM3U_MCI_BASE+SAM3U_HSMCI_IMR_OFFSET) +#define SAM3U_HSMCI_DMA (SAM3U_MCI_BASE+SAM3U_HSMCI_DMA_OFFSET) +#define SAM3U_HSMCI_CFG (SAM3U_MCI_BASE+SAM3U_HSMCI_CFG_OFFSET) +#define SAM3U_HSMCI_WPMR (SAM3U_MCI_BASE+SAM3U_HSMCI_WPMR_OFFSET) +#define SAM3U_HSMCI_WPSR (SAM3U_MCI_BASE+SAM3U_HSMCI_WPSR_OFFSET) +#define SAM3U_HSMCI_FIFO (SAM3U_MCI_BASE+SAM3U_HSMCI_FIFO_OFFSET) + +/* HSMCI register bit definitions *******************************************************/ + +/* HSMCI Control Register */ + +#define HSMCI_CR_MCIEN (1 << 0) /* Bit 0: Multi-Media Interface Enable */ +#define HSMCI_CR_MCIDIS (1 << 1) /* Bit 1: Multi-Media Interface Disable */ +#define HSMCI_CR_PWSEN (1 << 2) /* Bit 2: Power Save Mode Enable */ +#define HSMCI_CR_PWSDIS (1 << 3) /* Bit 3: Power Save Mode Disable */ +#define HSMCI_CR_SWRST (1 << 7) /* Bit 7: Software Reset */ + +/* HSMCI Mode Register */ + +#define HSMCI_MR_CLKDIV_SHIFT (0) /* Bits 0-7: Clock Divider */ +#define HSMCI_MR_CLKDIV_MASK (0xff << HSMCI_MR_CLKDIV_SHIFT) +#define HSMCI_MR_PWSDIV_SHIFT (8) /* Bits 8-10: Power Saving Divider */ +#define HSMCI_MR_PWSDIV_MASK (7 << HSMCI_MR_PWSDIV_SHIFT) +# define HSMCI_MR_PWSDIV_MAX (7 << HSMCI_MR_PWSDIV_SHIFT) +#define HSMCI_MR_RDPROOF (1 << 11) /* Bit 11: Read Proof Enable */ +#define HSMCI_MR_WRPROOF (1 << 12) /* Bit 12: Write Proof Enable */ +#define HSMCI_MR_FBYTE (1 << 13) /* Bit 13: Force Byte Transfer */ +#define HSMCI_MR_PADV (1 << 14) /* Bit 14: Padding Value */ +#define HSMCI_MR_BLKLEN_SHIFT (16) /* Bits 16-31: Data Block Length */ +#define HSMCI_MR_BLKLEN_MASK (0xffff << HSMCI_MR_BLKLEN_SHIFT) + +/* HSMCI Data Timeout Register */ + +#define HSMCI_DTOR_DTOCYC_SHIFT (0) /* Bits 0-3: Data Timeout Cycle Number */ +#define HSMCI_DTOR_DTOCYC_MASK (15 << HSMCI_DTOR_DTOCYC_SHIFT) +# define HSMCI_DTOR_DTOCYC_MAX (15 << HSMCI_DTOR_DTOCYC_SHIFT) +#define HSMCI_DTOR_DTOMUL_SHIFT (4) /* Bits 4-6: Data Timeout Multiplier */ +#define HSMCI_DTOR_DTOMUL_MASK (7 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_1 (0 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_16 (1 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_128 (2 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_256 (3 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_1024 (4 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_4096 (5 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_65536 (6 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_1048576 (7 << HSMCI_DTOR_DTOMUL_SHIFT) +# define HSMCI_DTOR_DTOMUL_MAX (7 << HSMCI_DTOR_DTOMUL_SHIFT) + +/* HSMCI SDCard/SDIO Register */ + +#define HSMCI_SDCR_SDCSEL_SHIFT (0) /* Bits 0-1: SDCard/SDIO Slot */ +#define HSMCI_SDCR_SDCSEL_MASK (3 << HSMCI_SDCR_SDCSEL_SHIFT) +# define HSMCI_SDCR_SDCSEL_SLOTA (0 << HSMCI_SDCR_SDCSEL_SHIFT) +#define HSMCI_SDCR_SDCBUS_SHIFT (6) /* Bits 6-7: SDCard/SDIO Bus Width */ +#define HSMCI_SDCR_SDCBUS_MASK (3 << HSMCI_SDCR_SDCBUS_SHIFT) +# define HSMCI_SDCR_SDCBUS_1BIT (0 << HSMCI_SDCR_SDCBUS_SHIFT) +# define HSMCI_SDCR_SDCBUS_4BIT (2 << HSMCI_SDCR_SDCBUS_SHIFT) +# define HSMCI_SDCR_SDCBUS_8BIT (3 << HSMCI_SDCR_SDCBUS_SHIFT) + +/* HSMCI Command Register */ + +#define HSMCI_CMDR_CMDNB_SHIFT (0) /* Bits 0-5: Command Number */ +#define HSMCI_CMDR_CMDNB_MASK (63 << HSMCI_CMDR_CMDNB_SHIFT) +#define HSMCI_CMDR_RSPTYP_SHIFT (6) /* Bits 6-7: Response Type */ +#define HSMCI_CMDR_RSPTYP_MASK (3 << HSMCI_CMDR_RSPTYP_SHIFT) +# define HSMCI_CMDR_RSPTYP_NONE (0 << HSMCI_CMDR_RSPTYP_SHIFT) /* No response */ +# define HSMCI_CMDR_RSPTYP_48BIT (1 << HSMCI_CMDR_RSPTYP_SHIFT) /* 48-bit response */ +# define HSMCI_CMDR_RSPTYP_136BIT (2 << HSMCI_CMDR_RSPTYP_SHIFT) /* 136-bit response */ +# define HSMCI_CMDR_RSPTYP_R1B (3 << HSMCI_CMDR_RSPTYP_SHIFT) /* R1b response type */ +#define HSMCI_CMDR_SPCMD_SHIFT (8) /* Bits 8-10: Special Command */ +#define HSMCI_CMDR_SPCMD_MASK (7 << HSMCI_CMDR_SPCMD_SHIFT) +# define HSMCI_CMDR_SPCMD_NORMAL (0 << HSMCI_CMDR_SPCMD_SHIFT) /* Not a special CMD */ +# define HSMCI_CMDR_SPCMD_INIT (1 << HSMCI_CMDR_SPCMD_SHIFT) /* Initialization CMD */ +# define HSMCI_CMDR_SPCMD_SYNC (2 << HSMCI_CMDR_SPCMD_SHIFT) /* Synchronized CMD */ +# define HSMCI_CMDR_SPCMD_CEATAC (3 << HSMCI_CMDR_SPCMD_SHIFT) /* CE-ATA Completion Signal disable CMD */ +# define HSMCI_CMDR_SPCMD_INTCMD (4 << HSMCI_CMDR_SPCMD_SHIFT) /* Interrupt command */ +# define HSMCI_CMDR_SPCMD_INTRESP (5 << HSMCI_CMDR_SPCMD_SHIFT) /* Interrupt response */ +# define HSMCI_CMDR_SPCMD_BOOTOP (6 << HSMCI_CMDR_SPCMD_SHIFT) /* Boot Operation Request */ +# define HSMCI_CMDR_SPCMD_BOOTEND (7 << HSMCI_CMDR_SPCMD_SHIFT) /* End Boot Operation */ +#define HSMCI_CMDR_OPDCMD (1 << 11) /* Bit 11: Open Drain Command */ +#define HSMCI_CMDR_MAXLAT (1 << 12) /* Bit 12: Max Latency for Command to Response */ +#define HSMCI_CMDR_TRCMD_SHIFT (16) /* Bits 16-17: Transfer Command */ +#define HSMCI_CMDR_TRCMD_MASK (3 << HSMCI_CMDR_TRCMD_SHIFT) +# define HSMCI_CMDR_TRCMD_NONE (0 << HSMCI_CMDR_TRCMD_SHIFT) /* No data transfer */ +# define HSMCI_CMDR_TRCMD_START (1 << HSMCI_CMDR_TRCMD_SHIFT) /* Start data transfer */ +# define HSMCI_CMDR_TRCMD_STOP (2 << HSMCI_CMDR_TRCMD_SHIFT) /* Stop data transfer */ +#define HSMCI_CMDR_TRDIR (1 << 18) /* Bit 18: Transfer Direction */ +# define HSMCI_CMDR_TRDIR_WRITE (0 << 18) +# define HSMCI_CMDR_TRDIR_READ (1 << 18) +#define HSMCI_CMDR_TRTYP_SHIFT (19) /* Bits 19-21: Transfer Type */ +#define HSMCI_CMDR_TRTYP_MASK (7 << HSMCI_CMDR_TRTYP_SHIFT) +# define HSMCI_CMDR_TRTYP_SINGLE (0 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC/SDCard Single Block */ +# define HSMCI_CMDR_TRTYP_MULTI (1 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC/SDCard Multiple Block */ +# define HSMCI_CMDR_TRTYP_STREAM (2 << HSMCI_CMDR_TRTYP_SHIFT) /* MMC Stream */ +# define HSMCI_CMDR_TRTYP_SDIOBYTE (4 << HSMCI_CMDR_TRTYP_SHIFT) /* SDIO Byte */ +# define HSMCI_CMDR_TRTYP_SDIOBLK (5 << HSMCI_CMDR_TRTYP_SHIFT) /* SDIO Block */ +#define HSMCI_CMDR_IOSPCMD_SHIFT (24) /* Bits 24-25: SDIO Special Command */ +#define HSMCI_CMDR_IOSPCMD_MASK (3 << HSMCI_CMDR_IOSPCMD_SHIFT) +# define HSMCI_CMDR_IOSPCMD_NORMAL (0 << HSMCI_CMDR_IOSPCMD_SHIFT) /* Not an SDIO Special Command */ +# define HSMCI_CMDR_IOSPCMD_SUSP (1 << HSMCI_CMDR_IOSPCMD_SHIFT) /* SDIO Suspend Command */ +# define HSMCI_CMDR_IOSPCMD_RESUME (2 << HSMCI_CMDR_IOSPCMD_SHIFT) /* SDIO Resume Command */ +#define HSMCI_CMDR_ATACS (1 << 26) /* Bit 26: ATA with Command Completion Signal */ +#define HSMCI_CMDR_BOOTACK (1 << 17) /* Bit 27: Boot Operation Acknowledge */ + +/* HSMCI Block Register */ + +#define HSMCI_BLKR_BCNT_SHIFT (0) /* Bits 0-15: MMC/SDIO Block Count - SDIO Byte Count */ +#define HSMCI_BLKR_BCNT_MASK (0xffff << HSMCI_BLKR_BCNT_SHIFT) +#define HSMCI_BLKR_BLKLEN_SHIFT (16) /* Bits 16-31: Data Block Length */ +#define HSMCI_BLKR_BLKLEN_MASK (0xffff << HSMCI_BLKR_BLKLEN_SHIFT) + +/* HSMCI Completion Signal Timeout Register */ + +#define HSMCI_CSTOR_CSTOCYC_SHIFT (0) /* Bits 0-3: Completion Signal Timeout Cycle Number */ +#define HSMCI_CSTOR_CSTOCYC_MASK (15 << HSMCI_CSTOR_CSTOCYC_SHIFT) +#define HSMCI_CSTOR_CSTOMUL_SHIFT (4) /* Bits 4-6: Completion Signal Timeout Multiplier */ +#define HSMCI_CSTOR_CSTOMUL_MASK (7 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_1 (0 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_16 (1 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_128 (2 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_256 (3 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_1024 (4 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_4096 (5 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_65536 (6 << HSMCI_CSTOR_CSTOMUL_SHIFT) +# define HSMCI_CSTOR_CSTOMUL_1048576 (7 << HSMCI_CSTOR_CSTOMUL_SHIFT) + +/* HSMCI Status Register, HSMCI Interrupt Enable Register, HSMCI Interrupt Disable + * Register, and HSMCI Interrupt Mask Register common bit-field definitions + */ + +#define HSMCI_INT_CMDRDY (1 << 0) /* Bit 0: Command Ready */ +#define HSMCI_INT_RXRDY (1 << 1) /* Bit 1: Receiver Ready */ +#define HSMCI_INT_TXRDY (1 << 2) /* Bit 2: Transmit Ready */ +#define HSMCI_INT_BLKE (1 << 3) /* Bit 3: Data Block Ended */ +#define HSMCI_INT_DTIP (1 << 4) /* Bit 4: Data Transfer in Progress */ +#define HSMCI_INT_NOTBUSY (1 << 5) /* Bit 6: HSMCI Not Busy */ +#define HSMCI_INT_SDIOIRQA (1 << 8) /* Bit 8: SDIO Interrupt for Slot A */ +#define HSMCI_INT_SDIOWAIT (1 << 12) /* Bit 12: SDIO Read Wait Operation Status */ +#define HSMCI_INT_CSRCV (1 << 13) /* Bit 13: CE-ATA Completion Signal Received */ +#define HSMCI_INT_RINDE (1 << 16) /* Bit 16: Response Index Error */ +#define HSMCI_INT_RDIRE (1 << 17) /* Bit 17: Response Direction Error */ +#define HSMCI_INT_RCRCE (1 << 18) /* Bit 18: Response CRC Error */ +#define HSMCI_INT_RENDE (1 << 19) /* Bit 19: Response End Bit Error */ +#define HSMCI_INT_RTOE (1 << 20) /* Bit 20: Response Time-out */ +#define HSMCI_INT_DCRCE (1 << 21) /* Bit 21: Data CRC Error */ +#define HSMCI_INT_DTOE (1 << 22) /* Bit 22: Data Time-out Error */ +#define HSMCI_INT_CSTOE (1 << 23) /* Bit 23: Completion Signal Time-out Error */ +#define HSMCI_INT_BLKOVRE (1 << 24) /* Bit 24: DMA Block Overrun Error */ +#define HSMCI_INT_DMADONE (1 << 25) /* Bit 25: DMA Transfer done */ +#define HSMCI_INT_FIFOEMPTY (1 << 26) /* Bit 26: FIFO empty flag */ +#define HSMCI_INT_XFRDONE (1 << 27) /* Bit 27: Transfer Done flag */ +#define HSMCI_INT_ACKRCV (1 << 28) /* Bit 28: Boot Operation Acknowledge Received */ +#define HSMCI_INT_ACKRCVE (1 << 29) /* Bit 29: Boot Operation Acknowledge Error */ +#define HSMCI_INT_OVRE (1 << 30) /* Bit 30: Overrun */ +#define HSMCI_INT_UNRE (1 << 31) /* Bit 31: Underrun */ + +/* HSMCI DMA Configuration Register */ + +#define HSMCI_DMA_OFFSET_SHIFT (0) /* Bits 0-1: DMA Write Buffer Offset */ +#define HSMCI_DMA_OFFSET_MASK (3 << HSMCI_DMA_OFFSET_SHIFT) +#define HSMCI_DMA_CHKSIZE (1 << 4) /* Bit 4: DMA Channel Read and Write Chunk Size */ +#define HSMCI_DMA_DMAEN (1 << 8) /* Bit 8: DMA Hardware Handshaking Enable */ +#define HSMCI_DMA_ROPT (1 << 12) /* Bit 12: Read Optimization with padding */ + +/* HSMCI Configuration Register */ + +#define HSMCI_CFG_FIFOMODE (1 << 0) /* Bit 0: HSMCI Internal FIFO control mode */ +#define HSMCI_CFG_FERRCTRL (1 << 4) /* Bit 4: Flow Error flag reset control mode */ +#define HSMCI_CFG_HSMODE (1 << 8) /* Bit 8: High Speed Mode */ +#define HSMCI_CFG_LSYNC (1 << 12) /* Bit 12: Synchronize on the last block */ + +/* HSMCI Write Protect Mode Register */ + +#define HSMCI_WPMR_WP_EN (1 << 0) /* Bit 0: Write Protection Enable */ +#define HSMCI_WPMR_WP_KEY_SHIFT (8) /* Bits 8-31: Write Protection Key password */ +#define HSMCI_WPMR_WP_KEY_MASK (0x00ffffff << HSMCI_WPMR_WP_KEY_SHIFT) + +/* HSMCI Write Protect Status Register */ + +#define HSMCI_WPSR_WP_VS_SHIFT (0) /* Bits 0-3: Write Protection Violation Status */ +#define HSMCI_WPSR_WP_VS_MASK (15 << HSMCI_WPSR_WP_VS_SHIFT) +#define HSMCI_WPSR_WP_VSRC_SHIFT (8) /* Bits 8-23: Write Protection Violation Source */ +#define HSMCI_WPSR_WP_VSRC_MASK (0xffff << HSMCI_WPSR_WP_VSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_HSMCI_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_irq.c b/nuttx/arch/arm/src/sam3u/sam3u_irq.c index 156cba3199..db79314c00 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_irq.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/sam3u_irq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_lowputc.c b/nuttx/arch/arm/src/sam3u/sam3u_lowputc.c index a0e0f99265..7a1e74248a 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_lowputc.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_lowputc.c @@ -2,7 +2,7 @@ * arch/arm/src/sam3u/sam3u_lowputc.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_matrix.h b/nuttx/arch/arm/src/sam3u/sam3u_matrix.h index e9d41a658a..52232bfa51 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_matrix.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_matrix.h @@ -1,214 +1,214 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_matric.h - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* MATRIX register offsets **************************************************************/ - -#define SAM3U_MATRIX_MCFG_OFFSET(n) ((n)<<2) -#define SAM3U_MATRIX_MCFG0_OFFSET 0x0000 /* Master Configuration Register 0 */ -#define SAM3U_MATRIX_MCFG1_OFFSET 0x0004 /* Master Configuration Register 1 */ -#define SAM3U_MATRIX_MCFG2_OFFSET 0x0008 /* Master Configuration Register 2 */ -#define SAM3U_MATRIX_MCFG3_OFFSET 0x000c /* Master Configuration Register 3 */ -#define SAM3U_MATRIX_MCFG4_OFFSET 0x0010 /* Master Configuration Register 4 */ - /* 0x0014-0x003c: Reserved */ -#define SAM3U_MATRIX_SCFG_OFFSET(n) (0x0040+((n)<<2)) -#define SAM3U_MATRIX_SCFG0_OFFSET 0x0040 /* Slave Configuration Register 0 */ -#define SAM3U_MATRIX_SCFG1_OFFSET 0x0044 /* Slave Configuration Register 1 */ -#define SAM3U_MATRIX_SCFG2_OFFSET 0x0048 /* Slave Configuration Register 2 */ -#define SAM3U_MATRIX_SCFG3_OFFSET 0x004c /* Slave Configuration Register 3 */ -#define SAM3U_MATRIX_SCFG4_OFFSET 0x0050 /* Slave Configuration Register 4 */ -#define SAM3U_MATRIX_SCFG5_OFFSET 0x0054 /* Slave Configuration Register 5 */ -#define SAM3U_MATRIX_SCFG6_OFFSET 0x0058 /* Slave Configuration Register 6 */ -#define SAM3U_MATRIX_SCFG7_OFFSET 0x005c /* Slave Configuration Register 7 */ -#define SAM3U_MATRIX_SCFG8_OFFSET 0x0060 /* Slave Configuration Register 8 */ -#define SAM3U_MATRIX_SCFG9_OFFSET 0x0064 /* Slave Configuration Register 9 */ - /* 0x0068-0x007c: Reserved */ -#define SAM3U_MATRIX_PRAS_OFFSET(n) (0x0080+((n)<<3)) -#define SAM3U_MATRIX_PRAS0_OFFSET 0x0080 /* Priority Register A for Slave 0 */ - /* 0x0084: Reserved */ -#define SAM3U_MATRIX_PRAS1_OFFSET 0x0088 /* Priority Register A for Slave 1 */ - /* 0x008c: Reserved */ -#define SAM3U_MATRIX_PRAS2_OFFSET 0x0090 /* Priority Register A for Slave 2 */ - /* 0x0094: Reserved */ -#define SAM3U_MATRIX_PRAS3_OFFSET 0x0098 /* Priority Register A for Slave 3 */ - /* 0x009c: Reserved */ -#define SAM3U_MATRIX_PRAS4_OFFSET 0x00a0 /* Priority Register A for Slave 4 */ - /* 0x00a4: Reserved */ -#define SAM3U_MATRIX_PRAS5_OFFSET 0x00a8 /* Priority Register A for Slave 5 */ - /* 0x00ac: Reserved */ -#define SAM3U_MATRIX_PRAS6_OFFSET 0x00b0 /* Priority Register A for Slave 6 */ - /* 0x00b4: Reserved */ -#define SAM3U_MATRIX_PRAS7_OFFSET 0x00b8 /* Priority Register A for Slave 7 */ - /* 0x00bc: Reserved */ -#define SAM3U_MATRIX_PRAS8_OFFSET 0x00c0 /* Priority Register A for Slave 8 */ - /* 0x00c4: Reserved */ -#define SAM3U_MATRIX_PRAS9_OFFSET 0x00c8 /* Priority Register A for Slave 9 */ - /* 0x00cc-0x00fc: Reserved */ -#define SAM3U_MATRIX_MRCR_OFFSET 0x0100 /* Master Remap Control Register */ - /* 0x0104-0x010c: Reserved */ -#define SAM3U_MATRIX_WPMR_OFFSET 0x01e4 /* Write Protect Mode Register */ -#define SAM3U_MATRIX_WPSR_OFFSET 0x01e8 /* Write Protect Status Register */ - /* 0x0110 - 0x01fc: Reserved */ - -/* MATRIX register adresses *************************************************************/ - -#define SAM3U_MATRIX_MCFG(n)) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG_OFFSET(n)) -#define SAM3U_MATRIX_MCFG0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG0_OFFSET) -#define SAM3U_MATRIX_MCFG1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG1_OFFSET) -#define SAM3U_MATRIX_MCFG2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG2_OFFSET) -#define SAM3U_MATRIX_MCFG3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG3_OFFSET) -#define SAM3U_MATRIX_MCFG4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG4_OFFSET) - -#define SAM3U_MATRIX_SCFG(n) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG_OFFSET(n)) -#define SAM3U_MATRIX_SCFG0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG0_OFFSET) -#define SAM3U_MATRIX_SCFG1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG1_OFFSET) -#define SAM3U_MATRIX_SCFG2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG2_OFFSET) -#define SAM3U_MATRIX_SCFG3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG3_OFFSET) -#define SAM3U_MATRIX_SCFG4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG4_OFFSET) -#define SAM3U_MATRIX_SCFG5 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG5_OFFSET) -#define SAM3U_MATRIX_SCFG6 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG6_OFFSET) -#define SAM3U_MATRIX_SCFG7 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG7_OFFSET) -#define SAM3U_MATRIX_SCFG8 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG8_OFFSET) -#define SAM3U_MATRIX_SCFG9 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG9_OFFSET) - -#define SAM3U_MATRIX_PRAS(n) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS_OFFSET(n)) -#define SAM3U_MATRIX_PRAS0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS0_OFFSET) -#define SAM3U_MATRIX_PRAS1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS1_OFFSET) -#define SAM3U_MATRIX_PRAS2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS2_OFFSET) -#define SAM3U_MATRIX_PRAS3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS3_OFFSET) -#define SAM3U_MATRIX_PRAS4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS4_OFFSET) -#define SAM3U_MATRIX_PRAS5 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS5_OFFSET) -#define SAM3U_MATRIX_PRAS6 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS6_OFFSET) -#define SAM3U_MATRIX_PRAS7 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS7_OFFSET) -#define SAM3U_MATRIX_PRAS8 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS8_OFFSET) -#define SAM3U_MATRIX_PRAS9 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS9_OFFSET) - -#define SAM3U_MATRIX_MRCR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MRCR_OFFSET) -#define SAM3U_MATRIX_WPMR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_WPMR_OFFSET) -#define SAM3U_MATRIX_WPSR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_WPSR_OFFSET) - -/* MATRIX register bit definitions ******************************************************/ - -#define MATRIX_MCFG_ULBT_SHIFT (0) /* Bits 0-2: Undefined Length Burst Type */ -#define MATRIX_MCFG_ULBT_MASK (7 << MATRIX_MCFG_ULBT_SHIFT) -# define MATRIX_MCFG_ULBT_INF (0 << MATRIX_MCFG_ULBT_SHIFT) /* Infinite Length Burst */ -# define MATRIX_MCFG_ULBT_SINGLE (1 << MATRIX_MCFG_ULBT_SHIFT) /* Single Access */ -# define MATRIX_MCFG_ULBT_4BEAT (2 << MATRIX_MCFG_ULBT_SHIFT) /* Four Beat Burst */ -# define MATRIX_MCFG_ULBT_8BEAT (3 << MATRIX_MCFG_ULBT_SHIFT) /* Eight Beat Burst */ -# define MATRIX_MCFG_ULBT_16BEAT (4 << MATRIX_MCFG_ULBT_SHIFT) /* Sixteen Beat Burst */ - -#define MATRIX_SCFG_SLOTCYCLE_SHIFT (0) /* Bits 0-7: Maximum Number of Allowed Cycles for a Burst */ -#define MATRIX_SCFG_SLOTCYCLE_MASK (0xff << MATRIX_SCFG_SLOTCYCLE_SHIFT) -#define MATRIX_SCFG_DEFMSTRTYPE_SHIFT (16) /* Bits 16-17: Default Master Type */ -#define MATRIX_SCFG_DEFMSTRTYPE_MASK (3 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) -# define MATRIX_SCFG_DEFMSTRTYPE_NONE (0 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) -# define MATRIX_SCFG_DEFMSTRTYPE_LAST (1 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) -# define MATRIX_SCFG_DEFMSTRTYPE_FIXED (2 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) -#define MATRIX_SCFG_FIXEDDEFMSTR_SHIFT (18) /* Bits 18-20: Fixed Default Master */ -#define MATRIX_SCFG_FIXEDDEFMSTR_MASK (7 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG0_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG1_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG2_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG3_FIXEDDEFMSTR_ARMC (0 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG4_FIXEDDEFMSTR_ARMC (0 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG5_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG6_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG7_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG8_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG8_FIXEDDEFMSTR_HDMA (4 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG9_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) -# define MATRIX_SCFG9_FIXEDDEFMSTR_HDMA (4 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) - -#define MATRIX_SCFG_ARBT_SHIFT (24) /* Bits 24-25: Arbitration Type */ -#define MATRIX_SCFG_ARBT_MASK (3 << MATRIX_SCFG_ARBT_SHIFT) -# define MATRIX_SCFG_ARBT_RR (0 << MATRIX_SCFG_ARBT_SHIFT) /* Round-Robin Arbitration */ -# define MATRIX_SCFG_ARBT_FIXED (1 << MATRIX_SCFG_ARBT_SHIFT) /* Fixed Priority Arbitration */ - -#define MATRIX_PRAS_MPR_SHIFT(x) ((n)<<2) -#define MATRIX_PRAS_MPR_MASK(x) (3 << MATRIX_PRAS_MPR_SHIFT(x)) -#define MATRIX_PRAS_M0PR_SHIFT (0) /* Bits 0-1: Master 0 Priority */ -#define MATRIX_PRAS_M0PR_MASK (3 << MATRIX_PRAS_M0PR_SHIFT) -#define MATRIX_PRAS_M1PR_SHIFT (4) /* Bits 4-5: Master 1 Priority */ -#define MATRIX_PRAS_M1PR_MASK (3 << MATRIX_PRAS_M1PR_SHIFT) -#define MATRIX_PRAS_M2PR_SHIFT (8) /* Bits 8-9: Master 2 Priority */ -#define MATRIX_PRAS_M2PR_MASK (3 << MATRIX_PRAS_M2PR_SHIFT) -#define MATRIX_PRAS_M3PR_SHIFT (12) /* Bits 12-13: Master 3 Priority */ -#define MATRIX_PRAS_M3PR_MASK (3 << MATRIX_PRAS_M3PR_SHIFT) -#define MATRIX_PRAS_M4PR_SHIFT (16) /* Bits 16-17 Master 4 Priority */ -#define MATRIX_PRAS_M4PR_MASK (3 << MATRIX_PRAS_M4PR_SHIFT) - -#define MATRIX_MRCR_RCB(x) (1 << (x)) -#define MATRIX_MRCR_RCB0 (1 << 0) /* Bit 0: Remap Command Bit for AHB Master 0 */ -#define MATRIX_MRCR_RCB1 (1 << 1) /* Bit 1: Remap Command Bit for AHB Master 1 */ -#define MATRIX_MRCR_RCB2 (1 << 2) /* Bit 2: Remap Command Bit for AHB Master 2 */ -#define MATRIX_MRCR_RCB3 (1 << 3) /* Bit 3: Remap Command Bit for AHB Master 3 */ -#define MATRIX_MRCR_RCB4 (1 << 4) /* Bit 4: Remap Command Bit for AHB Master 4 */ - -#define MATRIX_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ -#define MATRIX_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY (Write-only) */ -#define MATRIX_WPMR_WPKEY_MASK (0x00ffffff << MATRIX_WPMR_WPKEY_SHIFT) - -#define MATRIX_WPSR_WPVS (1 << 0) /* Bit 0: Enable Write Protect */ -#define MATRIX_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ -#define MATRIX_WPSR_WPVSRC_MASK (0xffff << MATRIX_WPSR_WPVSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_matric.h + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* MATRIX register offsets **************************************************************/ + +#define SAM3U_MATRIX_MCFG_OFFSET(n) ((n)<<2) +#define SAM3U_MATRIX_MCFG0_OFFSET 0x0000 /* Master Configuration Register 0 */ +#define SAM3U_MATRIX_MCFG1_OFFSET 0x0004 /* Master Configuration Register 1 */ +#define SAM3U_MATRIX_MCFG2_OFFSET 0x0008 /* Master Configuration Register 2 */ +#define SAM3U_MATRIX_MCFG3_OFFSET 0x000c /* Master Configuration Register 3 */ +#define SAM3U_MATRIX_MCFG4_OFFSET 0x0010 /* Master Configuration Register 4 */ + /* 0x0014-0x003c: Reserved */ +#define SAM3U_MATRIX_SCFG_OFFSET(n) (0x0040+((n)<<2)) +#define SAM3U_MATRIX_SCFG0_OFFSET 0x0040 /* Slave Configuration Register 0 */ +#define SAM3U_MATRIX_SCFG1_OFFSET 0x0044 /* Slave Configuration Register 1 */ +#define SAM3U_MATRIX_SCFG2_OFFSET 0x0048 /* Slave Configuration Register 2 */ +#define SAM3U_MATRIX_SCFG3_OFFSET 0x004c /* Slave Configuration Register 3 */ +#define SAM3U_MATRIX_SCFG4_OFFSET 0x0050 /* Slave Configuration Register 4 */ +#define SAM3U_MATRIX_SCFG5_OFFSET 0x0054 /* Slave Configuration Register 5 */ +#define SAM3U_MATRIX_SCFG6_OFFSET 0x0058 /* Slave Configuration Register 6 */ +#define SAM3U_MATRIX_SCFG7_OFFSET 0x005c /* Slave Configuration Register 7 */ +#define SAM3U_MATRIX_SCFG8_OFFSET 0x0060 /* Slave Configuration Register 8 */ +#define SAM3U_MATRIX_SCFG9_OFFSET 0x0064 /* Slave Configuration Register 9 */ + /* 0x0068-0x007c: Reserved */ +#define SAM3U_MATRIX_PRAS_OFFSET(n) (0x0080+((n)<<3)) +#define SAM3U_MATRIX_PRAS0_OFFSET 0x0080 /* Priority Register A for Slave 0 */ + /* 0x0084: Reserved */ +#define SAM3U_MATRIX_PRAS1_OFFSET 0x0088 /* Priority Register A for Slave 1 */ + /* 0x008c: Reserved */ +#define SAM3U_MATRIX_PRAS2_OFFSET 0x0090 /* Priority Register A for Slave 2 */ + /* 0x0094: Reserved */ +#define SAM3U_MATRIX_PRAS3_OFFSET 0x0098 /* Priority Register A for Slave 3 */ + /* 0x009c: Reserved */ +#define SAM3U_MATRIX_PRAS4_OFFSET 0x00a0 /* Priority Register A for Slave 4 */ + /* 0x00a4: Reserved */ +#define SAM3U_MATRIX_PRAS5_OFFSET 0x00a8 /* Priority Register A for Slave 5 */ + /* 0x00ac: Reserved */ +#define SAM3U_MATRIX_PRAS6_OFFSET 0x00b0 /* Priority Register A for Slave 6 */ + /* 0x00b4: Reserved */ +#define SAM3U_MATRIX_PRAS7_OFFSET 0x00b8 /* Priority Register A for Slave 7 */ + /* 0x00bc: Reserved */ +#define SAM3U_MATRIX_PRAS8_OFFSET 0x00c0 /* Priority Register A for Slave 8 */ + /* 0x00c4: Reserved */ +#define SAM3U_MATRIX_PRAS9_OFFSET 0x00c8 /* Priority Register A for Slave 9 */ + /* 0x00cc-0x00fc: Reserved */ +#define SAM3U_MATRIX_MRCR_OFFSET 0x0100 /* Master Remap Control Register */ + /* 0x0104-0x010c: Reserved */ +#define SAM3U_MATRIX_WPMR_OFFSET 0x01e4 /* Write Protect Mode Register */ +#define SAM3U_MATRIX_WPSR_OFFSET 0x01e8 /* Write Protect Status Register */ + /* 0x0110 - 0x01fc: Reserved */ + +/* MATRIX register adresses *************************************************************/ + +#define SAM3U_MATRIX_MCFG(n)) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG_OFFSET(n)) +#define SAM3U_MATRIX_MCFG0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG0_OFFSET) +#define SAM3U_MATRIX_MCFG1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG1_OFFSET) +#define SAM3U_MATRIX_MCFG2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG2_OFFSET) +#define SAM3U_MATRIX_MCFG3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG3_OFFSET) +#define SAM3U_MATRIX_MCFG4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MCFG4_OFFSET) + +#define SAM3U_MATRIX_SCFG(n) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG_OFFSET(n)) +#define SAM3U_MATRIX_SCFG0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG0_OFFSET) +#define SAM3U_MATRIX_SCFG1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG1_OFFSET) +#define SAM3U_MATRIX_SCFG2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG2_OFFSET) +#define SAM3U_MATRIX_SCFG3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG3_OFFSET) +#define SAM3U_MATRIX_SCFG4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG4_OFFSET) +#define SAM3U_MATRIX_SCFG5 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG5_OFFSET) +#define SAM3U_MATRIX_SCFG6 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG6_OFFSET) +#define SAM3U_MATRIX_SCFG7 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG7_OFFSET) +#define SAM3U_MATRIX_SCFG8 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG8_OFFSET) +#define SAM3U_MATRIX_SCFG9 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_SCFG9_OFFSET) + +#define SAM3U_MATRIX_PRAS(n) (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS_OFFSET(n)) +#define SAM3U_MATRIX_PRAS0 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS0_OFFSET) +#define SAM3U_MATRIX_PRAS1 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS1_OFFSET) +#define SAM3U_MATRIX_PRAS2 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS2_OFFSET) +#define SAM3U_MATRIX_PRAS3 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS3_OFFSET) +#define SAM3U_MATRIX_PRAS4 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS4_OFFSET) +#define SAM3U_MATRIX_PRAS5 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS5_OFFSET) +#define SAM3U_MATRIX_PRAS6 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS6_OFFSET) +#define SAM3U_MATRIX_PRAS7 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS7_OFFSET) +#define SAM3U_MATRIX_PRAS8 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS8_OFFSET) +#define SAM3U_MATRIX_PRAS9 (SAM3U_MATRIX_BASE+SAM3U_MATRIX_PRAS9_OFFSET) + +#define SAM3U_MATRIX_MRCR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_MRCR_OFFSET) +#define SAM3U_MATRIX_WPMR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_WPMR_OFFSET) +#define SAM3U_MATRIX_WPSR (SAM3U_MATRIX_BASE+SAM3U_MATRIX_WPSR_OFFSET) + +/* MATRIX register bit definitions ******************************************************/ + +#define MATRIX_MCFG_ULBT_SHIFT (0) /* Bits 0-2: Undefined Length Burst Type */ +#define MATRIX_MCFG_ULBT_MASK (7 << MATRIX_MCFG_ULBT_SHIFT) +# define MATRIX_MCFG_ULBT_INF (0 << MATRIX_MCFG_ULBT_SHIFT) /* Infinite Length Burst */ +# define MATRIX_MCFG_ULBT_SINGLE (1 << MATRIX_MCFG_ULBT_SHIFT) /* Single Access */ +# define MATRIX_MCFG_ULBT_4BEAT (2 << MATRIX_MCFG_ULBT_SHIFT) /* Four Beat Burst */ +# define MATRIX_MCFG_ULBT_8BEAT (3 << MATRIX_MCFG_ULBT_SHIFT) /* Eight Beat Burst */ +# define MATRIX_MCFG_ULBT_16BEAT (4 << MATRIX_MCFG_ULBT_SHIFT) /* Sixteen Beat Burst */ + +#define MATRIX_SCFG_SLOTCYCLE_SHIFT (0) /* Bits 0-7: Maximum Number of Allowed Cycles for a Burst */ +#define MATRIX_SCFG_SLOTCYCLE_MASK (0xff << MATRIX_SCFG_SLOTCYCLE_SHIFT) +#define MATRIX_SCFG_DEFMSTRTYPE_SHIFT (16) /* Bits 16-17: Default Master Type */ +#define MATRIX_SCFG_DEFMSTRTYPE_MASK (3 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) +# define MATRIX_SCFG_DEFMSTRTYPE_NONE (0 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) +# define MATRIX_SCFG_DEFMSTRTYPE_LAST (1 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) +# define MATRIX_SCFG_DEFMSTRTYPE_FIXED (2 << MATRIX_SCFG_DEFMSTRTYPE_SHIFT) +#define MATRIX_SCFG_FIXEDDEFMSTR_SHIFT (18) /* Bits 18-20: Fixed Default Master */ +#define MATRIX_SCFG_FIXEDDEFMSTR_MASK (7 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG0_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG1_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG2_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG3_FIXEDDEFMSTR_ARMC (0 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG4_FIXEDDEFMSTR_ARMC (0 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG5_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG6_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG7_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG8_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG8_FIXEDDEFMSTR_HDMA (4 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG9_FIXEDDEFMSTR_ARMS (1 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) +# define MATRIX_SCFG9_FIXEDDEFMSTR_HDMA (4 << MATRIX_SCFG_FIXEDDEFMSTR_SHIFT) + +#define MATRIX_SCFG_ARBT_SHIFT (24) /* Bits 24-25: Arbitration Type */ +#define MATRIX_SCFG_ARBT_MASK (3 << MATRIX_SCFG_ARBT_SHIFT) +# define MATRIX_SCFG_ARBT_RR (0 << MATRIX_SCFG_ARBT_SHIFT) /* Round-Robin Arbitration */ +# define MATRIX_SCFG_ARBT_FIXED (1 << MATRIX_SCFG_ARBT_SHIFT) /* Fixed Priority Arbitration */ + +#define MATRIX_PRAS_MPR_SHIFT(x) ((n)<<2) +#define MATRIX_PRAS_MPR_MASK(x) (3 << MATRIX_PRAS_MPR_SHIFT(x)) +#define MATRIX_PRAS_M0PR_SHIFT (0) /* Bits 0-1: Master 0 Priority */ +#define MATRIX_PRAS_M0PR_MASK (3 << MATRIX_PRAS_M0PR_SHIFT) +#define MATRIX_PRAS_M1PR_SHIFT (4) /* Bits 4-5: Master 1 Priority */ +#define MATRIX_PRAS_M1PR_MASK (3 << MATRIX_PRAS_M1PR_SHIFT) +#define MATRIX_PRAS_M2PR_SHIFT (8) /* Bits 8-9: Master 2 Priority */ +#define MATRIX_PRAS_M2PR_MASK (3 << MATRIX_PRAS_M2PR_SHIFT) +#define MATRIX_PRAS_M3PR_SHIFT (12) /* Bits 12-13: Master 3 Priority */ +#define MATRIX_PRAS_M3PR_MASK (3 << MATRIX_PRAS_M3PR_SHIFT) +#define MATRIX_PRAS_M4PR_SHIFT (16) /* Bits 16-17 Master 4 Priority */ +#define MATRIX_PRAS_M4PR_MASK (3 << MATRIX_PRAS_M4PR_SHIFT) + +#define MATRIX_MRCR_RCB(x) (1 << (x)) +#define MATRIX_MRCR_RCB0 (1 << 0) /* Bit 0: Remap Command Bit for AHB Master 0 */ +#define MATRIX_MRCR_RCB1 (1 << 1) /* Bit 1: Remap Command Bit for AHB Master 1 */ +#define MATRIX_MRCR_RCB2 (1 << 2) /* Bit 2: Remap Command Bit for AHB Master 2 */ +#define MATRIX_MRCR_RCB3 (1 << 3) /* Bit 3: Remap Command Bit for AHB Master 3 */ +#define MATRIX_MRCR_RCB4 (1 << 4) /* Bit 4: Remap Command Bit for AHB Master 4 */ + +#define MATRIX_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ +#define MATRIX_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY (Write-only) */ +#define MATRIX_WPMR_WPKEY_MASK (0x00ffffff << MATRIX_WPMR_WPKEY_SHIFT) + +#define MATRIX_WPSR_WPVS (1 << 0) /* Bit 0: Enable Write Protect */ +#define MATRIX_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ +#define MATRIX_WPSR_WPVSRC_MASK (0xffff << MATRIX_WPSR_WPVSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_MATRIX_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_memorymap.h b/nuttx/arch/arm/src/sam3u/sam3u_memorymap.h index b38864ae5b..81027f7b43 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_memorymap.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_memorymap.h @@ -1,145 +1,145 @@ -/************************************************************************************************ - * arch/arm/src/sam3u/sam3u_memorymap.h - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H - -/************************************************************************************************ - * Included Files - ************************************************************************************************/ - -#include -#include "chip.h" - -/************************************************************************************************ - * Pre-processor Definitions - ************************************************************************************************/ - -#define SAM3U_CODE_BASE 0x00000000 /* 0x00000000-0x1fffffff: Code space */ -# define SAM3U_BOOTMEMORY_BASE 0x00000000 /* 0x00000000-0x0007ffff: Boot Memory */ -# define SAM3U_INTFLASH0_BASE 0x00080000 /* 0x00080000-0x000fffff: Internal FLASH 0 */ -# define SAM3U_INTFLASH1_BASE 0x00100000 /* 0x00100000-0x0017ffff: Internal FLASH 1 */ -# define SAM3U_INTROM_BASE 0x00180000 /* 0x00180000-0x001fffff: Internal ROM */ - /* 0x00200000-0x1fffffff: Reserved */ -#define SAM3U_INTSRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: Internal SRAM */ -# define SAM3U_INTSRAM0_BASE 0x20000000 /* 0x20000000-0x2007ffff: SRAM0 (see chip.h) */ -# define SAM3U_INTSRAM1_BASE 0x20080000 /* 0x20080000-0x200fffff: SRAM1 (see chip.h) */ -# define SAM3U_NFCSRAM_BASE 0x20100000 /* 0x20100000-0x207fffff: NAND FLASH controller (SRAM) */ -# define SAM3U_UDPHPSDMS_BASE 0x20180000 /* 0x20180000-0x201fffff: USB Device High Speed (DMA) */ - /* 0x20200000-0x2fffffff: Undefined */ -# define SAM3U_BBSRAM_BASE 0x22000000 /* 0x22000000-0x23ffffff: 32Mb bit-band alias */ - /* 0x24000000-0x3fffffff: Undefined */ -#define SAM3U_PERIPHERALS_BASE 0x40000000 /* 0x40000000-0x5fffffff: Peripherals */ -# define SAM3U_MCI_BASE 0x40000000 /* 0x40000000-0x400003ff: High Speed Multimedia Card Interface */ -# define SAM3U_SSC_BASE 0x40004000 /* 0x40004000-0x40007fff: Synchronous Serial Controller */ -# define SAM3U_SPI_BASE 0x40008000 /* 0x40008000-0x4000bfff: Serial Peripheral Interface */ - /* 0x4000c000-0x4007ffff: Reserved */ -# define SAM3U_TC_BASE 0x40080000 /* 0x40080000-0x40083fff: Timer Counters */ -# define SAM3U_TCN_BASE(n) (0x40080000+((n)<<6)) -# define SAM3U_TC0_BASE 0x40080000 /* 0x40080000-0x4008003f: Timer Counter 0 */ -# define SAM3U_TC1_BASE 0x40080040 /* 0x40080040-0x4008007f: Timer Counter 1 */ -# define SAM3U_TC2_BASE 0x40080080 /* 0x40080080-0x400800bf: Timer Counter 2 */ -# define SAM3U_TWI_BASE 0x40084000 /* 0x40084000-0x4008ffff: Two-Wire Interface */ -# define SAM3U_TWIN_BASE(n) (0x40084000+((n)<<14)) -# define SAM3U_TWI0_BASE 0x40084000 /* 0x40084000-0x40087fff: Two-Wire Interface 0 */ -# define SAM3U_TWI1_BASE 0x40088000 /* 0x40088000-0x4008bfff: Two-Wire Interface 1 */ -# define SAM3U_PWM_BASE 0x4008c000 /* 0x4008c000-0x4008ffff: Pulse Width Modulation Controller */ -# define SAM3U_USART_BASE 0x40090000 /* 0x40090000-0x4009ffff: USART */ -# define SAM3U_USARTN_BASE(n) (0x40090000+((n)<<14)) -# define SAM3U_USART0_BASE 0x40090000 /* 0x40090000-0x40093fff: USART0 */ -# define SAM3U_USART1_BASE 0x40094000 /* 0x40094000-0x40097fff: USART1 */ -# define SAM3U_USART2_BASE 0x40098000 /* 0x40098000-0x4009bfff: USART2 */ -# define SAM3U_USART3_BASE 0x4009c000 /* 0x4009c000-0x4009ffff: USART3 */ - /* 0x400a0000-0x400a3fff: Reserved */ -# define SAM3U_UDPHS_BASE 0x400a4000 /* 0x400a4000-0x400a7fff: USB Device High Speed */ -# define SAM3U_ADC12B_BASE 0x400a8000 /* 0x400a8000-0x400abfff: 12-bit ADC Controller */ -# define SAM3U_ADC_BASE 0x400ac000 /* 0x400ac000-0x400affff: 10-bit ADC Controller */ -# define SAM3U_DMAC_BASE 0x400b0000 /* 0x400b0000-0x400b3fff: DMA controller */ - /* 0x400b4000-0x400dffff: Reserved */ -# define SAM3U_SYSCTRLR_BASE 0x400e0000 /* 0x400e0000-0x400e25ff: System controller */ - /* 0x400e2600-0x400fffff: Reserved */ - /* 0x40100000-0x41ffffff: Reserved */ -# define SAM3U_BBPERIPH__BASE 0x42000000 /* 0x42000000-0x43ffffff: 32Mb bit-band alias */ - /* 0x44000000-0x5fffffff: Reserved */ -#define SAM3U_EXTSRAM_BASE 0x60000000 /* 0x60000000-0x9fffffff: External SRAM */ -# define SAM3U_EXTCS_BASE 0x60000000 /* 0x60000000-0x63ffffff: Chip selects */ -# define SAM3U_EXTCSN_BASE(n) (0x60000000*((n)<<24)) -# define SAM3U_EXTCS0_BASE 0x60000000 /* 0x60000000-0x60ffffff: Chip select 0 */ -# define SAM3U_EXTCS1_BASE 0x61000000 /* 0x61000000-0x601fffff: Chip select 1 */ -# define SAM3U_EXTCS2_BASE 0x62000000 /* 0x62000000-0x62ffffff: Chip select 2 */ -# define SAM3U_EXTCS3_BASE 0x63000000 /* 0x63000000-0x63ffffff: Chip select 3 */ - /* 0x64000000-0x67ffffff: Reserved */ -# define SAM3U_NFC_BASE 0x68000000 /* 0x68000000-0x68ffffff: NAND FLASH controller */ - /* 0x69000000-0x9fffffff: Reserved */ - /* 0xa0000000-0xdfffffff: Reserved */ -#define SAM3U_SYSTEM_BASE 0xe0000000 /* 0xe0000000-0xffffffff: System */ - -/* System Controller Register Blocks: 0x400e0000-0x4007ffff */ - -#define SAM3U_SMC_BASE 0x400e0000 /* 0x400e0000-0x400e01ff: Static Memory Controller */ -#define SAM3U_MATRIX_BASE 0x400e0200 /* 0x400e0200-0x400e03ff: MATRIX */ -#define SAM3U_PMC_BASE 0x400e0400 /* 0x400e0400-0x400e05ff: Power Management Controller */ -#define SAM3U_UART_BASE 0x400e0600 /* 0x400e0600-0x400e073f: UART */ -#define SAM3U_CHIPID_BASE 0x400e0740 /* 0x400e0740-0x400e07ff: CHIP ID */ -#define SAM3U_EEFC_BASE 0x400e0800 /* 0x400e0800-0x400e0bff: Enhanced Embedded Flash Controllers*/ -# define SAM3U_EEFCN_BASE(n) (0x400e0800+((n)<<9)) -# define SAM3U_EEFC0_BASE 0x400e0800 /* 0x400e0800-0x400e09ff: Enhanced Embedded Flash Controller 0 */ -# define SAM3U_EEFC1_BASE 0x400e0a00 /* 0x400e0a00-0x400e0bff: Enhanced Embedded Flash Controller 1 */ -#define SAM3U_PIO_BASE 0x400e0c00 /* 0x400e0c00-0x400e11ff: Parallel I/O Controllers */ -# define SAM3U_PION_BASE(n) (0x400e0c00+((n)<<9)) -# define SAM3U_PIOA_BASE 0x400e0c00 /* 0x400e0c00-0x400e0dff: Parallel I/O Controller A */ -# define SAM3U_PIOB_BASE 0x400e0e00 /* 0x400e0e00-0x400e0fff: Parallel I/O Controller B */ -# define SAM3U_PIOC_BASE 0x400e1000 /* 0x400e1000-0x400e11ff: Parallel I/O Controller C */ -#define SAM3U_RSTC_BASE 0x400e1200 /* 0x400e1200-0x400e120f: Reset Controller */ -#define SAM3U_SUPC_BASE 0x400e1210 /* 0x400e1210-0x400e122f: Supply Controller */ -#define SAM3U_RTT_BASE 0x400e1230 /* 0x400e1230-0x400e124f: Real Time Timer */ -#define SAM3U_WDT_BASE 0x400e1250 /* 0x400e1250-0x400e125f: Watchdog Timer */ -#define SAM3U_RTC_BASE 0x400e1260 /* 0x400e1260-0x400e128f: Real Time Clock */ -#define SAM3U_GPBR_BASE 0x400e1290 /* 0x400e1290-0x400e13ff: GPBR */ - /* 0x490e1400-0x4007ffff: Reserved */ - -/************************************************************************************************ - * Public Types - ************************************************************************************************/ - -/************************************************************************************************ - * Public Data - ************************************************************************************************/ - -/************************************************************************************************ - * Public Functions - ************************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H */ +/************************************************************************************************ + * arch/arm/src/sam3u/sam3u_memorymap.h + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H + +/************************************************************************************************ + * Included Files + ************************************************************************************************/ + +#include +#include "chip.h" + +/************************************************************************************************ + * Pre-processor Definitions + ************************************************************************************************/ + +#define SAM3U_CODE_BASE 0x00000000 /* 0x00000000-0x1fffffff: Code space */ +# define SAM3U_BOOTMEMORY_BASE 0x00000000 /* 0x00000000-0x0007ffff: Boot Memory */ +# define SAM3U_INTFLASH0_BASE 0x00080000 /* 0x00080000-0x000fffff: Internal FLASH 0 */ +# define SAM3U_INTFLASH1_BASE 0x00100000 /* 0x00100000-0x0017ffff: Internal FLASH 1 */ +# define SAM3U_INTROM_BASE 0x00180000 /* 0x00180000-0x001fffff: Internal ROM */ + /* 0x00200000-0x1fffffff: Reserved */ +#define SAM3U_INTSRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: Internal SRAM */ +# define SAM3U_INTSRAM0_BASE 0x20000000 /* 0x20000000-0x2007ffff: SRAM0 (see chip.h) */ +# define SAM3U_INTSRAM1_BASE 0x20080000 /* 0x20080000-0x200fffff: SRAM1 (see chip.h) */ +# define SAM3U_NFCSRAM_BASE 0x20100000 /* 0x20100000-0x207fffff: NAND FLASH controller (SRAM) */ +# define SAM3U_UDPHPSDMS_BASE 0x20180000 /* 0x20180000-0x201fffff: USB Device High Speed (DMA) */ + /* 0x20200000-0x2fffffff: Undefined */ +# define SAM3U_BBSRAM_BASE 0x22000000 /* 0x22000000-0x23ffffff: 32Mb bit-band alias */ + /* 0x24000000-0x3fffffff: Undefined */ +#define SAM3U_PERIPHERALS_BASE 0x40000000 /* 0x40000000-0x5fffffff: Peripherals */ +# define SAM3U_MCI_BASE 0x40000000 /* 0x40000000-0x400003ff: High Speed Multimedia Card Interface */ +# define SAM3U_SSC_BASE 0x40004000 /* 0x40004000-0x40007fff: Synchronous Serial Controller */ +# define SAM3U_SPI_BASE 0x40008000 /* 0x40008000-0x4000bfff: Serial Peripheral Interface */ + /* 0x4000c000-0x4007ffff: Reserved */ +# define SAM3U_TC_BASE 0x40080000 /* 0x40080000-0x40083fff: Timer Counters */ +# define SAM3U_TCN_BASE(n) (0x40080000+((n)<<6)) +# define SAM3U_TC0_BASE 0x40080000 /* 0x40080000-0x4008003f: Timer Counter 0 */ +# define SAM3U_TC1_BASE 0x40080040 /* 0x40080040-0x4008007f: Timer Counter 1 */ +# define SAM3U_TC2_BASE 0x40080080 /* 0x40080080-0x400800bf: Timer Counter 2 */ +# define SAM3U_TWI_BASE 0x40084000 /* 0x40084000-0x4008ffff: Two-Wire Interface */ +# define SAM3U_TWIN_BASE(n) (0x40084000+((n)<<14)) +# define SAM3U_TWI0_BASE 0x40084000 /* 0x40084000-0x40087fff: Two-Wire Interface 0 */ +# define SAM3U_TWI1_BASE 0x40088000 /* 0x40088000-0x4008bfff: Two-Wire Interface 1 */ +# define SAM3U_PWM_BASE 0x4008c000 /* 0x4008c000-0x4008ffff: Pulse Width Modulation Controller */ +# define SAM3U_USART_BASE 0x40090000 /* 0x40090000-0x4009ffff: USART */ +# define SAM3U_USARTN_BASE(n) (0x40090000+((n)<<14)) +# define SAM3U_USART0_BASE 0x40090000 /* 0x40090000-0x40093fff: USART0 */ +# define SAM3U_USART1_BASE 0x40094000 /* 0x40094000-0x40097fff: USART1 */ +# define SAM3U_USART2_BASE 0x40098000 /* 0x40098000-0x4009bfff: USART2 */ +# define SAM3U_USART3_BASE 0x4009c000 /* 0x4009c000-0x4009ffff: USART3 */ + /* 0x400a0000-0x400a3fff: Reserved */ +# define SAM3U_UDPHS_BASE 0x400a4000 /* 0x400a4000-0x400a7fff: USB Device High Speed */ +# define SAM3U_ADC12B_BASE 0x400a8000 /* 0x400a8000-0x400abfff: 12-bit ADC Controller */ +# define SAM3U_ADC_BASE 0x400ac000 /* 0x400ac000-0x400affff: 10-bit ADC Controller */ +# define SAM3U_DMAC_BASE 0x400b0000 /* 0x400b0000-0x400b3fff: DMA controller */ + /* 0x400b4000-0x400dffff: Reserved */ +# define SAM3U_SYSCTRLR_BASE 0x400e0000 /* 0x400e0000-0x400e25ff: System controller */ + /* 0x400e2600-0x400fffff: Reserved */ + /* 0x40100000-0x41ffffff: Reserved */ +# define SAM3U_BBPERIPH__BASE 0x42000000 /* 0x42000000-0x43ffffff: 32Mb bit-band alias */ + /* 0x44000000-0x5fffffff: Reserved */ +#define SAM3U_EXTSRAM_BASE 0x60000000 /* 0x60000000-0x9fffffff: External SRAM */ +# define SAM3U_EXTCS_BASE 0x60000000 /* 0x60000000-0x63ffffff: Chip selects */ +# define SAM3U_EXTCSN_BASE(n) (0x60000000*((n)<<24)) +# define SAM3U_EXTCS0_BASE 0x60000000 /* 0x60000000-0x60ffffff: Chip select 0 */ +# define SAM3U_EXTCS1_BASE 0x61000000 /* 0x61000000-0x601fffff: Chip select 1 */ +# define SAM3U_EXTCS2_BASE 0x62000000 /* 0x62000000-0x62ffffff: Chip select 2 */ +# define SAM3U_EXTCS3_BASE 0x63000000 /* 0x63000000-0x63ffffff: Chip select 3 */ + /* 0x64000000-0x67ffffff: Reserved */ +# define SAM3U_NFC_BASE 0x68000000 /* 0x68000000-0x68ffffff: NAND FLASH controller */ + /* 0x69000000-0x9fffffff: Reserved */ + /* 0xa0000000-0xdfffffff: Reserved */ +#define SAM3U_SYSTEM_BASE 0xe0000000 /* 0xe0000000-0xffffffff: System */ + +/* System Controller Register Blocks: 0x400e0000-0x4007ffff */ + +#define SAM3U_SMC_BASE 0x400e0000 /* 0x400e0000-0x400e01ff: Static Memory Controller */ +#define SAM3U_MATRIX_BASE 0x400e0200 /* 0x400e0200-0x400e03ff: MATRIX */ +#define SAM3U_PMC_BASE 0x400e0400 /* 0x400e0400-0x400e05ff: Power Management Controller */ +#define SAM3U_UART_BASE 0x400e0600 /* 0x400e0600-0x400e073f: UART */ +#define SAM3U_CHIPID_BASE 0x400e0740 /* 0x400e0740-0x400e07ff: CHIP ID */ +#define SAM3U_EEFC_BASE 0x400e0800 /* 0x400e0800-0x400e0bff: Enhanced Embedded Flash Controllers*/ +# define SAM3U_EEFCN_BASE(n) (0x400e0800+((n)<<9)) +# define SAM3U_EEFC0_BASE 0x400e0800 /* 0x400e0800-0x400e09ff: Enhanced Embedded Flash Controller 0 */ +# define SAM3U_EEFC1_BASE 0x400e0a00 /* 0x400e0a00-0x400e0bff: Enhanced Embedded Flash Controller 1 */ +#define SAM3U_PIO_BASE 0x400e0c00 /* 0x400e0c00-0x400e11ff: Parallel I/O Controllers */ +# define SAM3U_PION_BASE(n) (0x400e0c00+((n)<<9)) +# define SAM3U_PIOA_BASE 0x400e0c00 /* 0x400e0c00-0x400e0dff: Parallel I/O Controller A */ +# define SAM3U_PIOB_BASE 0x400e0e00 /* 0x400e0e00-0x400e0fff: Parallel I/O Controller B */ +# define SAM3U_PIOC_BASE 0x400e1000 /* 0x400e1000-0x400e11ff: Parallel I/O Controller C */ +#define SAM3U_RSTC_BASE 0x400e1200 /* 0x400e1200-0x400e120f: Reset Controller */ +#define SAM3U_SUPC_BASE 0x400e1210 /* 0x400e1210-0x400e122f: Supply Controller */ +#define SAM3U_RTT_BASE 0x400e1230 /* 0x400e1230-0x400e124f: Real Time Timer */ +#define SAM3U_WDT_BASE 0x400e1250 /* 0x400e1250-0x400e125f: Watchdog Timer */ +#define SAM3U_RTC_BASE 0x400e1260 /* 0x400e1260-0x400e128f: Real Time Clock */ +#define SAM3U_GPBR_BASE 0x400e1290 /* 0x400e1290-0x400e13ff: GPBR */ + /* 0x490e1400-0x4007ffff: Reserved */ + +/************************************************************************************************ + * Public Types + ************************************************************************************************/ + +/************************************************************************************************ + * Public Data + ************************************************************************************************/ + +/************************************************************************************************ + * Public Functions + ************************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_MEMORYMAP_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_mpuinit.c b/nuttx/arch/arm/src/sam3u/sam3u_mpuinit.c index beff4d43bd..c6788d3b54 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_mpuinit.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_mpuinit.c @@ -2,7 +2,7 @@ * arch/arm/src/common/sam3u_mpuinit.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_pdc.h b/nuttx/arch/arm/src/sam3u/sam3u_pdc.h index 3520d74c3b..106b2cd917 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_pdc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_pdc.h @@ -1,103 +1,103 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_pdc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* PDC register offsets *****************************************************************/ - -#define SAM3U_PDC_RPR_OFFSET 0x100 /* Receive Pointer Register */ -#define SAM3U_PDC_RCR_OFFSET 0x104 /* Receive Counter Register */ -#define SAM3U_PDC_TPR_OFFSET 0x108 /* Transmit Pointer Register */ -#define SAM3U_PDC_TCR_OFFSET 0x10c /* Transmit Counter Register */ -#define SAM3U_PDC_RNPR_OFFSET 0x110 /* Receive Next Pointer Register */ -#define SAM3U_PDC_RNCR_OFFSET 0x114 /* Receive Next Counter Register */ -#define SAM3U_PDC_TNPR_OFFSET 0x118 /* Transmit Next Pointer Register */ -#define SAM3U_PDC_TNCR_OFFSET 0x11c /* Transmit Next Counter Register */ -#define SAM3U_PDC_PTCR_OFFSET 0x120 /* Transfer Control Register */ -#define SAM3U_PDC_PTSR_OFFSET 0x124 /* Transfer Status Register */ - -/* PDC register adresses ****************************************************************/ - -/* These 10 registers are mapped in the peripheral memory space at the same offset. */ - -/* PDC register bit definitions *********************************************************/ - -#define PDC_RCR_RXCTR_SHIFT (0) /* Bits 0-15: Receive Counter Register */ -#define PDC_RCR_RXCTR_MASK (0xffff << PDC_RCR_RXCTR_SHIFT) - -#define PDC_TCR_TXCTR_SHIFT (0) /* Bits 0-15: Transmit Counter Register */ -#define PDC_TCR_TXCTR_MASK (0xffff << PDC_TCR_TXCTR_SHIFT) - -#define PDC_RNCR_RXNCTR_SHIFT (0) /* Bits 0-15: Receive Next Counter */ -#define PDC_RNCR_RXNCTR_MASK (0xffff << PDC_RNCR_RXNCTR_SHIFT) - -#define PDC_TNCR_TXNCTR_SHIFT (0) /* Bits 0-15: Transmit Counter Next */ -#define PDC_TNCR_TXNCTR_MASK (0xffff << PDC_TNCR_TXNCTR_SHIFT) - -#define PDC_PTCR_RXTEN (1 << 0) /* Bit 0: Receiver Transfer Enable */ -#define PDC_PTCR_RXTDIS (1 << 1) /* Bit 1: Receiver Transfer Disable */ -#define PDC_PTCR_TXTEN (1 << 8) /* Bit 8: Transmitter Transfer Enable */ -#define PDC_PTCR_TXTDIS (1 << 9) /* Bit 9: Transmitter Transfer Disable */ - -#define PDC_PTSR_RXTEN (1 << 0) /* Bit 0: Receiver Transfer Enable */ -#define PDC_PTSR_TXTEN (1 << 8) /* Bit 8: Transmitter Transfer Enable */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_pdc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* PDC register offsets *****************************************************************/ + +#define SAM3U_PDC_RPR_OFFSET 0x100 /* Receive Pointer Register */ +#define SAM3U_PDC_RCR_OFFSET 0x104 /* Receive Counter Register */ +#define SAM3U_PDC_TPR_OFFSET 0x108 /* Transmit Pointer Register */ +#define SAM3U_PDC_TCR_OFFSET 0x10c /* Transmit Counter Register */ +#define SAM3U_PDC_RNPR_OFFSET 0x110 /* Receive Next Pointer Register */ +#define SAM3U_PDC_RNCR_OFFSET 0x114 /* Receive Next Counter Register */ +#define SAM3U_PDC_TNPR_OFFSET 0x118 /* Transmit Next Pointer Register */ +#define SAM3U_PDC_TNCR_OFFSET 0x11c /* Transmit Next Counter Register */ +#define SAM3U_PDC_PTCR_OFFSET 0x120 /* Transfer Control Register */ +#define SAM3U_PDC_PTSR_OFFSET 0x124 /* Transfer Status Register */ + +/* PDC register adresses ****************************************************************/ + +/* These 10 registers are mapped in the peripheral memory space at the same offset. */ + +/* PDC register bit definitions *********************************************************/ + +#define PDC_RCR_RXCTR_SHIFT (0) /* Bits 0-15: Receive Counter Register */ +#define PDC_RCR_RXCTR_MASK (0xffff << PDC_RCR_RXCTR_SHIFT) + +#define PDC_TCR_TXCTR_SHIFT (0) /* Bits 0-15: Transmit Counter Register */ +#define PDC_TCR_TXCTR_MASK (0xffff << PDC_TCR_TXCTR_SHIFT) + +#define PDC_RNCR_RXNCTR_SHIFT (0) /* Bits 0-15: Receive Next Counter */ +#define PDC_RNCR_RXNCTR_MASK (0xffff << PDC_RNCR_RXNCTR_SHIFT) + +#define PDC_TNCR_TXNCTR_SHIFT (0) /* Bits 0-15: Transmit Counter Next */ +#define PDC_TNCR_TXNCTR_MASK (0xffff << PDC_TNCR_TXNCTR_SHIFT) + +#define PDC_PTCR_RXTEN (1 << 0) /* Bit 0: Receiver Transfer Enable */ +#define PDC_PTCR_RXTDIS (1 << 1) /* Bit 1: Receiver Transfer Disable */ +#define PDC_PTCR_TXTEN (1 << 8) /* Bit 8: Transmitter Transfer Enable */ +#define PDC_PTCR_TXTDIS (1 << 9) /* Bit 9: Transmitter Transfer Disable */ + +#define PDC_PTSR_RXTEN (1 << 0) /* Bit 0: Receiver Transfer Enable */ +#define PDC_PTSR_TXTEN (1 << 8) /* Bit 8: Transmitter Transfer Enable */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PDC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_pio.h b/nuttx/arch/arm/src/sam3u/sam3u_pio.h index ab20ace9b9..b55197ae1f 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_pio.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_pio.h @@ -1,324 +1,324 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_pio.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* PIO register offsets *****************************************************************/ - -#define SAM3U_PIO_PER_OFFSET 0x0000 /* PIO Enable Register */ -#define SAM3U_PIO_PDR_OFFSET 0x0004 /* PIO Disable Register */ -#define SAM3U_PIO_PSR_OFFSET 0x0008 /* PIO Status Register */ - /* 0x000c: Reserved */ -#define SAM3U_PIO_OER_OFFSET 0x0010 /* Output Enable Register */ -#define SAM3U_PIO_ODR_OFFSET 0x0014 /* Output Disable Register */ -#define SAM3U_PIO_OSR_OFFSET 0x0018 /* utput Status Register */ - /* 0x001c: Reserved */ -#define SAM3U_PIO_IFER_OFFSET 0x0020 /* Glitch Input Filter Enable Register */ -#define SAM3U_PIO_IFDR_OFFSET 0x0024 /* Glitch Input Filter Disable Register */ -#define SAM3U_PIO_IFSR_OFFSET 0x0028 /* Glitch Input Filter Status Register */ - /* 0x002c: Reserved */ -#define SAM3U_PIO_SODR_OFFSET 0x0030 /* Set Output Data Register */ -#define SAM3U_PIO_CODR_OFFSET 0x0034 /* Clear Output Data Register */ -#define SAM3U_PIO_ODSR_OFFSET 0x0038 /* Output Data Status Register */ -#define SAM3U_PIO_PDSR_OFFSET 0x003c /* Pin Data Status Register */ -#define SAM3U_PIO_IER_OFFSET 0x0040 /* Interrupt Enable Register */ -#define SAM3U_PIO_IDR_OFFSET 0x0044 /* Interrupt Disable Register */ -#define SAM3U_PIO_IMR_OFFSET 0x0048 /* Interrupt Mask Register */ -#define SAM3U_PIO_ISR_OFFSET 0x004c /* Interrupt Status Register */ -#define SAM3U_PIO_MDER_OFFSET 0x0050 /* Multi-driver Enable Register */ -#define SAM3U_PIO_MDDR_OFFSET 0x0054 /* Multi-driver Disable Register */ -#define SAM3U_PIO_MDSR_OFFSET 0x0058 /* Multi-driver Status Register */ - /* 0x005c: Reserved */ -#define SAM3U_PIO_PUDR_OFFSET 0x0060 /* Pull-up Disable Register */ -#define SAM3U_PIO_PUER_OFFSET 0x0064 /* Pull-up Enable Register */ -#define SAM3U_PIO_PUSR_OFFSET 0x0068 /* Pad Pull-up Status Register */ - /* 0x006c: Reserved */ -#define SAM3U_PIO_ABSR_OFFSET 0x0070 /* Peripheral AB Select Register */ - /* 0x0074-0x007c: Reserved */ -#define SAM3U_PIO_SCIFSR_OFFSET 0x0080 /* System Clock Glitch Input Filter Select Register */ -#define SAM3U_PIO_DIFSR_OFFSET 0x0084 /* Debouncing Input Filter Select Register */ -#define SAM3U_PIO_IFDGSR_OFFSET 0x0088 /* Glitch or Debouncing Input Filter Clock Selection Status Register */ -#define SAM3U_PIO_SCDR_OFFSET 0x008c /* Slow Clock Divider Debouncing Register */ - /* 0x0090-0x009c: Reserved */ -#define SAM3U_PIO_OWER_OFFSET 0x00a0 /* Output Write Enable */ -#define SAM3U_PIO_OWDR_OFFSET 0x00a4 /* Output Write Disable */ -#define SAM3U_PIO_OWSR_OFFSET 0x00a8 /* Output Write Status Register */ - /* 0x00ac: Reserved */ -#define SAM3U_PIO_AIMER_OFFSET 0x00b0 /* Additional Interrupt Modes Enable Register */ -#define SAM3U_PIO_AIMDR_OFFSET 0x00b4 /* Additional Interrupt Modes Disables Register */ -#define SAM3U_PIO_AIMMR_OFFSET 0x00b8 /* Additional Interrupt Modes Mask Register */ - /* 0x00bc: Reserved */ -#define SAM3U_PIO_ESR_OFFSET 0x00c0 /* Edge Select Register */ -#define SAM3U_PIO_LSR_OFFSET 0x00c4 /* Level Select Register */ -#define SAM3U_PIO_ELSR_OFFSET 0x00c8 /* Edge/Level Status Register */ - /* 0x00cc: Reserved */ -#define SAM3U_PIO_FELLSR_OFFSET 0x00d0 /* Falling Edge/Low Level Select Register */ -#define SAM3U_PIO_REHLSR_OFFSET 0x00d4 /* Rising Edge/ High Level Select Register */ -#define SAM3U_PIO_FRLHSR_OFFSET 0x00d8 /* Fall/Rise - Low/High Status Register */ - /* 0x00dc: Reserved */ -#define SAM3U_PIO_LOCKSR_OFFSET 0x00e0 /* Lock Status */ -#define SAM3U_PIO_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register */ -#define SAM3U_PIO_WPSR_OFFSET 0x00e8 /* Write Protect Status Register */ - /* 0x00ec-0x00f8: Reserved */ - /* 0x0100-0x0144: Reserved */ - -/* PIO register adresses ****************************************************************/ - -#define PIOA (0) -#define PIOB (1) -#define PIOC (2) -#define NPIO (3) - -#define SAM3U_PIO_PER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PER_OFFSET) -#define SAM3U_PIO_PDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PDR_OFFSET) -#define SAM3U_PIO_PSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PSR_OFFSET) -#define SAM3U_PIO_OER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OER_OFFSET) -#define SAM3U_PIO_ODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ODR_OFFSET) -#define SAM3U_PIO_OSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OSR_OFFSET) -#define SAM3U_PIO_IFER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFER_OFFSET) -#define SAM3U_PIO_IFDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFDR_OFFSET) -#define SAM3U_PIO_IFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFSR_OFFSET) -#define SAM3U_PIO_SODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SODR_OFFSET) -#define SAM3U_PIO_CODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_CODR_OFFSET) -#define SAM3U_PIO_ODSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ODSR_OFFSET) -#define SAM3U_PIO_PDSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PDSR_OFFSET) -#define SAM3U_PIO_IER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IER_OFFSET) -#define SAM3U_PIO_IDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IDR_OFFSET) -#define SAM3U_PIO_IMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IMR_OFFSET) -#define SAM3U_PIO_ISR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ISR_OFFSET) -#define SAM3U_PIO_MDER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDER_OFFSET) -#define SAM3U_PIO_MDDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDDR_OFFSET) -#define SAM3U_PIO_MDSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDSR_OFFSET) -#define SAM3U_PIO_PUDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUDR_OFFSET) -#define SAM3U_PIO_PUER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUER_OFFSET) -#define SAM3U_PIO_PUSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUSR_OFFSET) -#define SAM3U_PIO_ABSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ABSR_OFFSET) -#define SAM3U_PIO_SCIFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SCIFSR_OFFSET) -#define SAM3U_PIO_DIFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_DIFSR_OFFSET) -#define SAM3U_PIO_IFDGSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFDGSR_OFFSET) -#define SAM3U_PIO_SCDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SCDR_OFFSET) -#define SAM3U_PIO_OWER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWER_OFFSET) -#define SAM3U_PIO_OWDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWDR_OFFSET) -#define SAM3U_PIO_OWSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWSR_OFFSET) -#define SAM3U_PIO_AIMER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMER_OFFSET) -#define SAM3U_PIO_AIMDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMDR_OFFSET) -#define SAM3U_PIO_AIMMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMMR_OFFSET) -#define SAM3U_PIO_ESR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ESR_OFFSET) -#define SAM3U_PIO_LSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_LSR_OFFSET) -#define SAM3U_PIO_ELSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ELSR_OFFSET) -#define SAM3U_PIO_FELLSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_FELLSR_OFFSET) -#define SAM3U_PIO_REHLSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_REHLSR_OFFSET) -#define SAM3U_PIO_FRLHSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_FRLHSR_OFFSET) -#define SAM3U_PIO_LOCKSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_LOCKSR_OFFSET) -#define SAM3U_PIO_WPMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_WPMR_OFFSET) -#define SAM3U_PIO_WPSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_WPSR_OFFSET) - -#define SAM3U_PIOA_PER (SAM3U_PIOA_BASE+SAM3U_PIO_PER_OFFSET) -#define SAM3U_PIOA_PDR_ (SAM3U_PIOA_BASE+SAM3U_PIO_PDR_OFFSET) -#define SAM3U_PIOA_PSR (SAM3U_PIOA_BASE+SAM3U_PIO_PSR_OFFSET) -#define SAM3U_PIOA_OER (SAM3U_PIOA_BASE+SAM3U_PIO_OER_OFFSET) -#define SAM3U_PIOA_ODR (SAM3U_PIOA_BASE+SAM3U_PIO_ODR_OFFSET) -#define SAM3U_PIOA_OSR (SAM3U_PIOA_BASE+SAM3U_PIO_OSR_OFFSET) -#define SAM3U_PIOA_IFER (SAM3U_PIOA_BASE+SAM3U_PIO_IFER_OFFSET) -#define SAM3U_PIOA_IFDR (SAM3U_PIOA_BASE+SAM3U_PIO_IFDR_OFFSET) -#define SAM3U_PIOA_IFSR (SAM3U_PIOA_BASE+SAM3U_PIO_IFSR_OFFSET) -#define SAM3U_PIOA_SODR (SAM3U_PIOA_BASE+SAM3U_PIO_SODR_OFFSET) -#define SAM3U_PIOA_CODR (SAM3U_PIOA_BASE+SAM3U_PIO_CODR_OFFSET) -#define SAM3U_PIOA_ODSR (SAM3U_PIOA_BASE+SAM3U_PIO_ODSR_OFFSET) -#define SAM3U_PIOA_PDSR (SAM3U_PIOA_BASE+SAM3U_PIO_PDSR_OFFSET) -#define SAM3U_PIOA_IER (SAM3U_PIOA_BASE+SAM3U_PIO_IER_OFFSET) -#define SAM3U_PIOA_IDR (SAM3U_PIOA_BASE+SAM3U_PIO_IDR_OFFSET) -#define SAM3U_PIOA_IMR (SAM3U_PIOA_BASE+SAM3U_PIO_IMR_OFFSET) -#define SAM3U_PIOA_ISR (SAM3U_PIOA_BASE+SAM3U_PIO_ISR_OFFSET) -#define SAM3U_PIOA_MDER (SAM3U_PIOA_BASE+SAM3U_PIO_MDER_OFFSET) -#define SAM3U_PIOA_MDDR (SAM3U_PIOA_BASE+SAM3U_PIO_MDDR_OFFSET) -#define SAM3U_PIOA_MDSR (SAM3U_PIOA_BASE+SAM3U_PIO_MDSR_OFFSET) -#define SAM3U_PIOA_PUDR (SAM3U_PIOA_BASE+SAM3U_PIO_PUDR_OFFSET) -#define SAM3U_PIOA_PUER (SAM3U_PIOA_BASE+SAM3U_PIO_PUER_OFFSET) -#define SAM3U_PIOA_PUSR (SAM3U_PIOA_BASE+SAM3U_PIO_PUSR_OFFSET) -#define SAM3U_PIOA_ABSR (SAM3U_PIOA_BASE+SAM3U_PIO_ABSR_OFFSET) -#define SAM3U_PIOA_SCIFSR (SAM3U_PIOA_BASE+SAM3U_PIO_SCIFSR_OFFSET) -#define SAM3U_PIOA_DIFSR (SAM3U_PIOA_BASE+SAM3U_PIO_DIFSR_OFFSET) -#define SAM3U_PIOA_IFDGSR (SAM3U_PIOA_BASE+SAM3U_PIO_IFDGSR_OFFSET) -#define SAM3U_PIOA_SCDR (SAM3U_PIOA_BASE+SAM3U_PIO_SCDR_OFFSET) -#define SAM3U_PIOA_OWER (SAM3U_PIOA_BASE+SAM3U_PIO_OWER_OFFSET) -#define SAM3U_PIOA_OWDR (SAM3U_PIOA_BASE+SAM3U_PIO_OWDR_OFFSET) -#define SAM3U_PIOA_OWSR (SAM3U_PIOA_BASE+SAM3U_PIO_OWSR_OFFSET) -#define SAM3U_PIOA_AIMER (SAM3U_PIOA_BASE+SAM3U_PIO_AIMER_OFFSET) -#define SAM3U_PIOA_AIMDR (SAM3U_PIOA_BASE+SAM3U_PIO_AIMDR_OFFSET) -#define SAM3U_PIOA_AIMMR (SAM3U_PIOA_BASE+SAM3U_PIO_AIMMR_OFFSET) -#define SAM3U_PIOA_ESR (SAM3U_PIOA_BASE+SAM3U_PIO_ESR_OFFSET) -#define SAM3U_PIOA_LSR (SAM3U_PIOA_BASE+SAM3U_PIO_LSR_OFFSET) -#define SAM3U_PIOA_ELSR (SAM3U_PIOA_BASE+SAM3U_PIO_ELSR_OFFSET) -#define SAM3U_PIOA_FELLSR (SAM3U_PIOA_BASE+SAM3U_PIO_FELLSR_OFFSET) -#define SAM3U_PIOA_REHLSR (SAM3U_PIOA_BASE+SAM3U_PIO_REHLSR_OFFSET) -#define SAM3U_PIOA_FRLHSR (SAM3U_PIOA_BASE+SAM3U_PIO_FRLHSR_OFFSET) -#define SAM3U_PIOA_LOCKSR (SAM3U_PIOA_BASE+SAM3U_PIO_LOCKSR_OFFSET) -#define SAM3U_PIOA_WPMR (SAM3U_PIOA_BASE+SAM3U_PIO_WPMR_OFFSET) -#define SAM3U_PIOA_WPSR (SAM3U_PIOA_BASE+SAM3U_PIO_WPSR_OFFSET) - -#define SAM3U_PIOB_PER (SAM3U_PIOB_BASE+SAM3U_PIO_PER_OFFSET) -#define SAM3U_PIOB_PDR_ (SAM3U_PIOB_BASE+SAM3U_PIO_PDR_OFFSET) -#define SAM3U_PIOB_PSR (SAM3U_PIOB_BASE+SAM3U_PIO_PSR_OFFSET) -#define SAM3U_PIOB_OER (SAM3U_PIOB_BASE+SAM3U_PIO_OER_OFFSET) -#define SAM3U_PIOB_ODR (SAM3U_PIOB_BASE+SAM3U_PIO_ODR_OFFSET) -#define SAM3U_PIOB_OSR (SAM3U_PIOB_BASE+SAM3U_PIO_OSR_OFFSET) -#define SAM3U_PIOB_IFER (SAM3U_PIOB_BASE+SAM3U_PIO_IFER_OFFSET) -#define SAM3U_PIOB_IFDR (SAM3U_PIOB_BASE+SAM3U_PIO_IFDR_OFFSET) -#define SAM3U_PIOB_IFSR (SAM3U_PIOB_BASE+SAM3U_PIO_IFSR_OFFSET) -#define SAM3U_PIOB_SODR (SAM3U_PIOB_BASE+SAM3U_PIO_SODR_OFFSET) -#define SAM3U_PIOB_CODR (SAM3U_PIOB_BASE+SAM3U_PIO_CODR_OFFSET) -#define SAM3U_PIOB_ODSR (SAM3U_PIOB_BASE+SAM3U_PIO_ODSR_OFFSET) -#define SAM3U_PIOB_PDSR (SAM3U_PIOB_BASE+SAM3U_PIO_PDSR_OFFSET) -#define SAM3U_PIOB_IER (SAM3U_PIOB_BASE+SAM3U_PIO_IER_OFFSET) -#define SAM3U_PIOB_IDR (SAM3U_PIOB_BASE+SAM3U_PIO_IDR_OFFSET) -#define SAM3U_PIOB_IMR (SAM3U_PIOB_BASE+SAM3U_PIO_IMR_OFFSET) -#define SAM3U_PIOB_ISR (SAM3U_PIOB_BASE+SAM3U_PIO_ISR_OFFSET) -#define SAM3U_PIOB_MDER (SAM3U_PIOB_BASE+SAM3U_PIO_MDER_OFFSET) -#define SAM3U_PIOB_MDDR (SAM3U_PIOB_BASE+SAM3U_PIO_MDDR_OFFSET) -#define SAM3U_PIOB_MDSR (SAM3U_PIOB_BASE+SAM3U_PIO_MDSR_OFFSET) -#define SAM3U_PIOB_PUDR (SAM3U_PIOB_BASE+SAM3U_PIO_PUDR_OFFSET) -#define SAM3U_PIOB_PUER (SAM3U_PIOB_BASE+SAM3U_PIO_PUER_OFFSET) -#define SAM3U_PIOB_PUSR (SAM3U_PIOB_BASE+SAM3U_PIO_PUSR_OFFSET) -#define SAM3U_PIOB_ABSR (SAM3U_PIOB_BASE+SAM3U_PIO_ABSR_OFFSET) -#define SAM3U_PIOB_SCIFSR (SAM3U_PIOB_BASE+SAM3U_PIO_SCIFSR_OFFSET) -#define SAM3U_PIOB_DIFSR (SAM3U_PIOB_BASE+SAM3U_PIO_DIFSR_OFFSET) -#define SAM3U_PIOB_IFDGSR (SAM3U_PIOB_BASE+SAM3U_PIO_IFDGSR_OFFSET) -#define SAM3U_PIOB_SCDR (SAM3U_PIOB_BASE+SAM3U_PIO_SCDR_OFFSET) -#define SAM3U_PIOB_OWER (SAM3U_PIOB_BASE+SAM3U_PIO_OWER_OFFSET) -#define SAM3U_PIOB_OWDR (SAM3U_PIOB_BASE+SAM3U_PIO_OWDR_OFFSET) -#define SAM3U_PIOB_OWSR (SAM3U_PIOB_BASE+SAM3U_PIO_OWSR_OFFSET) -#define SAM3U_PIOB_AIMER (SAM3U_PIOB_BASE+SAM3U_PIO_AIMER_OFFSET) -#define SAM3U_PIOB_AIMDR (SAM3U_PIOB_BASE+SAM3U_PIO_AIMDR_OFFSET) -#define SAM3U_PIOB_AIMMR (SAM3U_PIOB_BASE+SAM3U_PIO_AIMMR_OFFSET) -#define SAM3U_PIOB_ESR (SAM3U_PIOB_BASE+SAM3U_PIO_ESR_OFFSET) -#define SAM3U_PIOB_LSR (SAM3U_PIOB_BASE+SAM3U_PIO_LSR_OFFSET) -#define SAM3U_PIOB_ELSR (SAM3U_PIOB_BASE+SAM3U_PIO_ELSR_OFFSET) -#define SAM3U_PIOB_FELLSR (SAM3U_PIOB_BASE+SAM3U_PIO_FELLSR_OFFSET) -#define SAM3U_PIOB_REHLSR (SAM3U_PIOB_BASE+SAM3U_PIO_REHLSR_OFFSET) -#define SAM3U_PIOB_FRLHSR (SAM3U_PIOB_BASE+SAM3U_PIO_FRLHSR_OFFSET) -#define SAM3U_PIOB_LOCKSR (SAM3U_PIOB_BASE+SAM3U_PIO_LOCKSR_OFFSET) -#define SAM3U_PIOB_WPMR (SAM3U_PIOB_BASE+SAM3U_PIO_WPMR_OFFSET) -#define SAM3U_PIOB_WPSR (SAM3U_PIOB_BASE+SAM3U_PIO_WPSR_OFFSET) - -#define SAM3U_PIOC_PER (SAM3U_PIOC_BASE+SAM3U_PIO_PER_OFFSET) -#define SAM3U_PIOC_PDR_ (SAM3U_PIOC_BASE+SAM3U_PIO_PDR_OFFSET) -#define SAM3U_PIOC_PSR (SAM3U_PIOC_BASE+SAM3U_PIO_PSR_OFFSET) -#define SAM3U_PIOC_OER (SAM3U_PIOC_BASE+SAM3U_PIO_OER_OFFSET) -#define SAM3U_PIOC_ODR (SAM3U_PIOC_BASE+SAM3U_PIO_ODR_OFFSET) -#define SAM3U_PIOC_OSR (SAM3U_PIOC_BASE+SAM3U_PIO_OSR_OFFSET) -#define SAM3U_PIOC_IFER (SAM3U_PIOC_BASE+SAM3U_PIO_IFER_OFFSET) -#define SAM3U_PIOC_IFDR (SAM3U_PIOC_BASE+SAM3U_PIO_IFDR_OFFSET) -#define SAM3U_PIOC_IFSR (SAM3U_PIOC_BASE+SAM3U_PIO_IFSR_OFFSET) -#define SAM3U_PIOC_SODR (SAM3U_PIOC_BASE+SAM3U_PIO_SODR_OFFSET) -#define SAM3U_PIOC_CODR (SAM3U_PIOC_BASE+SAM3U_PIO_CODR_OFFSET) -#define SAM3U_PIOC_ODSR (SAM3U_PIOC_BASE+SAM3U_PIO_ODSR_OFFSET) -#define SAM3U_PIOC_PDSR (SAM3U_PIOC_BASE+SAM3U_PIO_PDSR_OFFSET) -#define SAM3U_PIOC_IER (SAM3U_PIOC_BASE+SAM3U_PIO_IER_OFFSET) -#define SAM3U_PIOC_IDR (SAM3U_PIOC_BASE+SAM3U_PIO_IDR_OFFSET) -#define SAM3U_PIOC_IMR (SAM3U_PIOC_BASE+SAM3U_PIO_IMR_OFFSET) -#define SAM3U_PIOC_ISR (SAM3U_PIOC_BASE+SAM3U_PIO_ISR_OFFSET) -#define SAM3U_PIOC_MDER (SAM3U_PIOC_BASE+SAM3U_PIO_MDER_OFFSET) -#define SAM3U_PIOC_MDDR (SAM3U_PIOC_BASE+SAM3U_PIO_MDDR_OFFSET) -#define SAM3U_PIOC_MDSR (SAM3U_PIOC_BASE+SAM3U_PIO_MDSR_OFFSET) -#define SAM3U_PIOC_PUDR (SAM3U_PIOC_BASE+SAM3U_PIO_PUDR_OFFSET) -#define SAM3U_PIOC_PUER (SAM3U_PIOC_BASE+SAM3U_PIO_PUER_OFFSET) -#define SAM3U_PIOC_PUSR (SAM3U_PIOC_BASE+SAM3U_PIO_PUSR_OFFSET) -#define SAM3U_PIOC_ABSR (SAM3U_PIOC_BASE+SAM3U_PIO_ABSR_OFFSET) -#define SAM3U_PIOC_SCIFSR (SAM3U_PIOC_BASE+SAM3U_PIO_SCIFSR_OFFSET) -#define SAM3U_PIOC_DIFSR (SAM3U_PIOC_BASE+SAM3U_PIO_DIFSR_OFFSET) -#define SAM3U_PIOC_IFDGSR (SAM3U_PIOC_BASE+SAM3U_PIO_IFDGSR_OFFSET) -#define SAM3U_PIOC_SCDR (SAM3U_PIOC_BASE+SAM3U_PIO_SCDR_OFFSET) -#define SAM3U_PIOC_OWER (SAM3U_PIOC_BASE+SAM3U_PIO_OWER_OFFSET) -#define SAM3U_PIOC_OWDR (SAM3U_PIOC_BASE+SAM3U_PIO_OWDR_OFFSET) -#define SAM3U_PIOC_OWSR (SAM3U_PIOC_BASE+SAM3U_PIO_OWSR_OFFSET) -#define SAM3U_PIOC_AIMER (SAM3U_PIOC_BASE+SAM3U_PIO_AIMER_OFFSET) -#define SAM3U_PIOC_AIMDR (SAM3U_PIOC_BASE+SAM3U_PIO_AIMDR_OFFSET) -#define SAM3U_PIOC_AIMMR (SAM3U_PIOC_BASE+SAM3U_PIO_AIMMR_OFFSET) -#define SAM3U_PIOC_ESR (SAM3U_PIOC_BASE+SAM3U_PIO_ESR_OFFSET) -#define SAM3U_PIOC_LSR (SAM3U_PIOC_BASE+SAM3U_PIO_LSR_OFFSET) -#define SAM3U_PIOC_ELSR (SAM3U_PIOC_BASE+SAM3U_PIO_ELSR_OFFSET) -#define SAM3U_PIOC_FELLSR (SAM3U_PIOC_BASE+SAM3U_PIO_FELLSR_OFFSET) -#define SAM3U_PIOC_REHLSR (SAM3U_PIOC_BASE+SAM3U_PIO_REHLSR_OFFSET) -#define SAM3U_PIOC_FRLHSR (SAM3U_PIOC_BASE+SAM3U_PIO_FRLHSR_OFFSET) -#define SAM3U_PIOC_LOCKSR (SAM3U_PIOC_BASE+SAM3U_PIO_LOCKSR_OFFSET) -#define SAM3U_PIOC_WPMR (SAM3U_PIOC_BASE+SAM3U_PIO_WPMR_OFFSET) -#define SAM3U_PIOC_WPSR (SAM3U_PIOC_BASE+SAM3U_PIO_WPSR_OFFSET) - -/* PIO register bit definitions *********************************************************/ - -/* Common bit definitions for ALMOST all IO registers (exceptions follow) */ - -#define PIO(n) (1<<(n)) /* Bit n: PIO n */ - -/* PIO Write Protect Mode Register */ - -#define PIO_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ -#define PIO_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ -#define PIO_WPMR_WPKEY_MASK (0xffffff << PIO_WPMR_WPKEY_SHIFT) - -/* PIO Write Protect Status Register */ - -#define PIO_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ -#define PIO_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ -#define PIO_WPSR_WPVSRC_MASK (0xffff << PIO_WPSR_WPVSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_pio.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* PIO register offsets *****************************************************************/ + +#define SAM3U_PIO_PER_OFFSET 0x0000 /* PIO Enable Register */ +#define SAM3U_PIO_PDR_OFFSET 0x0004 /* PIO Disable Register */ +#define SAM3U_PIO_PSR_OFFSET 0x0008 /* PIO Status Register */ + /* 0x000c: Reserved */ +#define SAM3U_PIO_OER_OFFSET 0x0010 /* Output Enable Register */ +#define SAM3U_PIO_ODR_OFFSET 0x0014 /* Output Disable Register */ +#define SAM3U_PIO_OSR_OFFSET 0x0018 /* utput Status Register */ + /* 0x001c: Reserved */ +#define SAM3U_PIO_IFER_OFFSET 0x0020 /* Glitch Input Filter Enable Register */ +#define SAM3U_PIO_IFDR_OFFSET 0x0024 /* Glitch Input Filter Disable Register */ +#define SAM3U_PIO_IFSR_OFFSET 0x0028 /* Glitch Input Filter Status Register */ + /* 0x002c: Reserved */ +#define SAM3U_PIO_SODR_OFFSET 0x0030 /* Set Output Data Register */ +#define SAM3U_PIO_CODR_OFFSET 0x0034 /* Clear Output Data Register */ +#define SAM3U_PIO_ODSR_OFFSET 0x0038 /* Output Data Status Register */ +#define SAM3U_PIO_PDSR_OFFSET 0x003c /* Pin Data Status Register */ +#define SAM3U_PIO_IER_OFFSET 0x0040 /* Interrupt Enable Register */ +#define SAM3U_PIO_IDR_OFFSET 0x0044 /* Interrupt Disable Register */ +#define SAM3U_PIO_IMR_OFFSET 0x0048 /* Interrupt Mask Register */ +#define SAM3U_PIO_ISR_OFFSET 0x004c /* Interrupt Status Register */ +#define SAM3U_PIO_MDER_OFFSET 0x0050 /* Multi-driver Enable Register */ +#define SAM3U_PIO_MDDR_OFFSET 0x0054 /* Multi-driver Disable Register */ +#define SAM3U_PIO_MDSR_OFFSET 0x0058 /* Multi-driver Status Register */ + /* 0x005c: Reserved */ +#define SAM3U_PIO_PUDR_OFFSET 0x0060 /* Pull-up Disable Register */ +#define SAM3U_PIO_PUER_OFFSET 0x0064 /* Pull-up Enable Register */ +#define SAM3U_PIO_PUSR_OFFSET 0x0068 /* Pad Pull-up Status Register */ + /* 0x006c: Reserved */ +#define SAM3U_PIO_ABSR_OFFSET 0x0070 /* Peripheral AB Select Register */ + /* 0x0074-0x007c: Reserved */ +#define SAM3U_PIO_SCIFSR_OFFSET 0x0080 /* System Clock Glitch Input Filter Select Register */ +#define SAM3U_PIO_DIFSR_OFFSET 0x0084 /* Debouncing Input Filter Select Register */ +#define SAM3U_PIO_IFDGSR_OFFSET 0x0088 /* Glitch or Debouncing Input Filter Clock Selection Status Register */ +#define SAM3U_PIO_SCDR_OFFSET 0x008c /* Slow Clock Divider Debouncing Register */ + /* 0x0090-0x009c: Reserved */ +#define SAM3U_PIO_OWER_OFFSET 0x00a0 /* Output Write Enable */ +#define SAM3U_PIO_OWDR_OFFSET 0x00a4 /* Output Write Disable */ +#define SAM3U_PIO_OWSR_OFFSET 0x00a8 /* Output Write Status Register */ + /* 0x00ac: Reserved */ +#define SAM3U_PIO_AIMER_OFFSET 0x00b0 /* Additional Interrupt Modes Enable Register */ +#define SAM3U_PIO_AIMDR_OFFSET 0x00b4 /* Additional Interrupt Modes Disables Register */ +#define SAM3U_PIO_AIMMR_OFFSET 0x00b8 /* Additional Interrupt Modes Mask Register */ + /* 0x00bc: Reserved */ +#define SAM3U_PIO_ESR_OFFSET 0x00c0 /* Edge Select Register */ +#define SAM3U_PIO_LSR_OFFSET 0x00c4 /* Level Select Register */ +#define SAM3U_PIO_ELSR_OFFSET 0x00c8 /* Edge/Level Status Register */ + /* 0x00cc: Reserved */ +#define SAM3U_PIO_FELLSR_OFFSET 0x00d0 /* Falling Edge/Low Level Select Register */ +#define SAM3U_PIO_REHLSR_OFFSET 0x00d4 /* Rising Edge/ High Level Select Register */ +#define SAM3U_PIO_FRLHSR_OFFSET 0x00d8 /* Fall/Rise - Low/High Status Register */ + /* 0x00dc: Reserved */ +#define SAM3U_PIO_LOCKSR_OFFSET 0x00e0 /* Lock Status */ +#define SAM3U_PIO_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register */ +#define SAM3U_PIO_WPSR_OFFSET 0x00e8 /* Write Protect Status Register */ + /* 0x00ec-0x00f8: Reserved */ + /* 0x0100-0x0144: Reserved */ + +/* PIO register adresses ****************************************************************/ + +#define PIOA (0) +#define PIOB (1) +#define PIOC (2) +#define NPIO (3) + +#define SAM3U_PIO_PER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PER_OFFSET) +#define SAM3U_PIO_PDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PDR_OFFSET) +#define SAM3U_PIO_PSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PSR_OFFSET) +#define SAM3U_PIO_OER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OER_OFFSET) +#define SAM3U_PIO_ODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ODR_OFFSET) +#define SAM3U_PIO_OSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OSR_OFFSET) +#define SAM3U_PIO_IFER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFER_OFFSET) +#define SAM3U_PIO_IFDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFDR_OFFSET) +#define SAM3U_PIO_IFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFSR_OFFSET) +#define SAM3U_PIO_SODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SODR_OFFSET) +#define SAM3U_PIO_CODR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_CODR_OFFSET) +#define SAM3U_PIO_ODSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ODSR_OFFSET) +#define SAM3U_PIO_PDSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PDSR_OFFSET) +#define SAM3U_PIO_IER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IER_OFFSET) +#define SAM3U_PIO_IDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IDR_OFFSET) +#define SAM3U_PIO_IMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IMR_OFFSET) +#define SAM3U_PIO_ISR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ISR_OFFSET) +#define SAM3U_PIO_MDER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDER_OFFSET) +#define SAM3U_PIO_MDDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDDR_OFFSET) +#define SAM3U_PIO_MDSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_MDSR_OFFSET) +#define SAM3U_PIO_PUDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUDR_OFFSET) +#define SAM3U_PIO_PUER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUER_OFFSET) +#define SAM3U_PIO_PUSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_PUSR_OFFSET) +#define SAM3U_PIO_ABSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ABSR_OFFSET) +#define SAM3U_PIO_SCIFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SCIFSR_OFFSET) +#define SAM3U_PIO_DIFSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_DIFSR_OFFSET) +#define SAM3U_PIO_IFDGSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_IFDGSR_OFFSET) +#define SAM3U_PIO_SCDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_SCDR_OFFSET) +#define SAM3U_PIO_OWER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWER_OFFSET) +#define SAM3U_PIO_OWDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWDR_OFFSET) +#define SAM3U_PIO_OWSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_OWSR_OFFSET) +#define SAM3U_PIO_AIMER(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMER_OFFSET) +#define SAM3U_PIO_AIMDR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMDR_OFFSET) +#define SAM3U_PIO_AIMMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_AIMMR_OFFSET) +#define SAM3U_PIO_ESR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ESR_OFFSET) +#define SAM3U_PIO_LSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_LSR_OFFSET) +#define SAM3U_PIO_ELSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_ELSR_OFFSET) +#define SAM3U_PIO_FELLSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_FELLSR_OFFSET) +#define SAM3U_PIO_REHLSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_REHLSR_OFFSET) +#define SAM3U_PIO_FRLHSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_FRLHSR_OFFSET) +#define SAM3U_PIO_LOCKSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_LOCKSR_OFFSET) +#define SAM3U_PIO_WPMR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_WPMR_OFFSET) +#define SAM3U_PIO_WPSR(n) (SAM3U_PIO_BASE(n)+SAM3U_PIO_WPSR_OFFSET) + +#define SAM3U_PIOA_PER (SAM3U_PIOA_BASE+SAM3U_PIO_PER_OFFSET) +#define SAM3U_PIOA_PDR_ (SAM3U_PIOA_BASE+SAM3U_PIO_PDR_OFFSET) +#define SAM3U_PIOA_PSR (SAM3U_PIOA_BASE+SAM3U_PIO_PSR_OFFSET) +#define SAM3U_PIOA_OER (SAM3U_PIOA_BASE+SAM3U_PIO_OER_OFFSET) +#define SAM3U_PIOA_ODR (SAM3U_PIOA_BASE+SAM3U_PIO_ODR_OFFSET) +#define SAM3U_PIOA_OSR (SAM3U_PIOA_BASE+SAM3U_PIO_OSR_OFFSET) +#define SAM3U_PIOA_IFER (SAM3U_PIOA_BASE+SAM3U_PIO_IFER_OFFSET) +#define SAM3U_PIOA_IFDR (SAM3U_PIOA_BASE+SAM3U_PIO_IFDR_OFFSET) +#define SAM3U_PIOA_IFSR (SAM3U_PIOA_BASE+SAM3U_PIO_IFSR_OFFSET) +#define SAM3U_PIOA_SODR (SAM3U_PIOA_BASE+SAM3U_PIO_SODR_OFFSET) +#define SAM3U_PIOA_CODR (SAM3U_PIOA_BASE+SAM3U_PIO_CODR_OFFSET) +#define SAM3U_PIOA_ODSR (SAM3U_PIOA_BASE+SAM3U_PIO_ODSR_OFFSET) +#define SAM3U_PIOA_PDSR (SAM3U_PIOA_BASE+SAM3U_PIO_PDSR_OFFSET) +#define SAM3U_PIOA_IER (SAM3U_PIOA_BASE+SAM3U_PIO_IER_OFFSET) +#define SAM3U_PIOA_IDR (SAM3U_PIOA_BASE+SAM3U_PIO_IDR_OFFSET) +#define SAM3U_PIOA_IMR (SAM3U_PIOA_BASE+SAM3U_PIO_IMR_OFFSET) +#define SAM3U_PIOA_ISR (SAM3U_PIOA_BASE+SAM3U_PIO_ISR_OFFSET) +#define SAM3U_PIOA_MDER (SAM3U_PIOA_BASE+SAM3U_PIO_MDER_OFFSET) +#define SAM3U_PIOA_MDDR (SAM3U_PIOA_BASE+SAM3U_PIO_MDDR_OFFSET) +#define SAM3U_PIOA_MDSR (SAM3U_PIOA_BASE+SAM3U_PIO_MDSR_OFFSET) +#define SAM3U_PIOA_PUDR (SAM3U_PIOA_BASE+SAM3U_PIO_PUDR_OFFSET) +#define SAM3U_PIOA_PUER (SAM3U_PIOA_BASE+SAM3U_PIO_PUER_OFFSET) +#define SAM3U_PIOA_PUSR (SAM3U_PIOA_BASE+SAM3U_PIO_PUSR_OFFSET) +#define SAM3U_PIOA_ABSR (SAM3U_PIOA_BASE+SAM3U_PIO_ABSR_OFFSET) +#define SAM3U_PIOA_SCIFSR (SAM3U_PIOA_BASE+SAM3U_PIO_SCIFSR_OFFSET) +#define SAM3U_PIOA_DIFSR (SAM3U_PIOA_BASE+SAM3U_PIO_DIFSR_OFFSET) +#define SAM3U_PIOA_IFDGSR (SAM3U_PIOA_BASE+SAM3U_PIO_IFDGSR_OFFSET) +#define SAM3U_PIOA_SCDR (SAM3U_PIOA_BASE+SAM3U_PIO_SCDR_OFFSET) +#define SAM3U_PIOA_OWER (SAM3U_PIOA_BASE+SAM3U_PIO_OWER_OFFSET) +#define SAM3U_PIOA_OWDR (SAM3U_PIOA_BASE+SAM3U_PIO_OWDR_OFFSET) +#define SAM3U_PIOA_OWSR (SAM3U_PIOA_BASE+SAM3U_PIO_OWSR_OFFSET) +#define SAM3U_PIOA_AIMER (SAM3U_PIOA_BASE+SAM3U_PIO_AIMER_OFFSET) +#define SAM3U_PIOA_AIMDR (SAM3U_PIOA_BASE+SAM3U_PIO_AIMDR_OFFSET) +#define SAM3U_PIOA_AIMMR (SAM3U_PIOA_BASE+SAM3U_PIO_AIMMR_OFFSET) +#define SAM3U_PIOA_ESR (SAM3U_PIOA_BASE+SAM3U_PIO_ESR_OFFSET) +#define SAM3U_PIOA_LSR (SAM3U_PIOA_BASE+SAM3U_PIO_LSR_OFFSET) +#define SAM3U_PIOA_ELSR (SAM3U_PIOA_BASE+SAM3U_PIO_ELSR_OFFSET) +#define SAM3U_PIOA_FELLSR (SAM3U_PIOA_BASE+SAM3U_PIO_FELLSR_OFFSET) +#define SAM3U_PIOA_REHLSR (SAM3U_PIOA_BASE+SAM3U_PIO_REHLSR_OFFSET) +#define SAM3U_PIOA_FRLHSR (SAM3U_PIOA_BASE+SAM3U_PIO_FRLHSR_OFFSET) +#define SAM3U_PIOA_LOCKSR (SAM3U_PIOA_BASE+SAM3U_PIO_LOCKSR_OFFSET) +#define SAM3U_PIOA_WPMR (SAM3U_PIOA_BASE+SAM3U_PIO_WPMR_OFFSET) +#define SAM3U_PIOA_WPSR (SAM3U_PIOA_BASE+SAM3U_PIO_WPSR_OFFSET) + +#define SAM3U_PIOB_PER (SAM3U_PIOB_BASE+SAM3U_PIO_PER_OFFSET) +#define SAM3U_PIOB_PDR_ (SAM3U_PIOB_BASE+SAM3U_PIO_PDR_OFFSET) +#define SAM3U_PIOB_PSR (SAM3U_PIOB_BASE+SAM3U_PIO_PSR_OFFSET) +#define SAM3U_PIOB_OER (SAM3U_PIOB_BASE+SAM3U_PIO_OER_OFFSET) +#define SAM3U_PIOB_ODR (SAM3U_PIOB_BASE+SAM3U_PIO_ODR_OFFSET) +#define SAM3U_PIOB_OSR (SAM3U_PIOB_BASE+SAM3U_PIO_OSR_OFFSET) +#define SAM3U_PIOB_IFER (SAM3U_PIOB_BASE+SAM3U_PIO_IFER_OFFSET) +#define SAM3U_PIOB_IFDR (SAM3U_PIOB_BASE+SAM3U_PIO_IFDR_OFFSET) +#define SAM3U_PIOB_IFSR (SAM3U_PIOB_BASE+SAM3U_PIO_IFSR_OFFSET) +#define SAM3U_PIOB_SODR (SAM3U_PIOB_BASE+SAM3U_PIO_SODR_OFFSET) +#define SAM3U_PIOB_CODR (SAM3U_PIOB_BASE+SAM3U_PIO_CODR_OFFSET) +#define SAM3U_PIOB_ODSR (SAM3U_PIOB_BASE+SAM3U_PIO_ODSR_OFFSET) +#define SAM3U_PIOB_PDSR (SAM3U_PIOB_BASE+SAM3U_PIO_PDSR_OFFSET) +#define SAM3U_PIOB_IER (SAM3U_PIOB_BASE+SAM3U_PIO_IER_OFFSET) +#define SAM3U_PIOB_IDR (SAM3U_PIOB_BASE+SAM3U_PIO_IDR_OFFSET) +#define SAM3U_PIOB_IMR (SAM3U_PIOB_BASE+SAM3U_PIO_IMR_OFFSET) +#define SAM3U_PIOB_ISR (SAM3U_PIOB_BASE+SAM3U_PIO_ISR_OFFSET) +#define SAM3U_PIOB_MDER (SAM3U_PIOB_BASE+SAM3U_PIO_MDER_OFFSET) +#define SAM3U_PIOB_MDDR (SAM3U_PIOB_BASE+SAM3U_PIO_MDDR_OFFSET) +#define SAM3U_PIOB_MDSR (SAM3U_PIOB_BASE+SAM3U_PIO_MDSR_OFFSET) +#define SAM3U_PIOB_PUDR (SAM3U_PIOB_BASE+SAM3U_PIO_PUDR_OFFSET) +#define SAM3U_PIOB_PUER (SAM3U_PIOB_BASE+SAM3U_PIO_PUER_OFFSET) +#define SAM3U_PIOB_PUSR (SAM3U_PIOB_BASE+SAM3U_PIO_PUSR_OFFSET) +#define SAM3U_PIOB_ABSR (SAM3U_PIOB_BASE+SAM3U_PIO_ABSR_OFFSET) +#define SAM3U_PIOB_SCIFSR (SAM3U_PIOB_BASE+SAM3U_PIO_SCIFSR_OFFSET) +#define SAM3U_PIOB_DIFSR (SAM3U_PIOB_BASE+SAM3U_PIO_DIFSR_OFFSET) +#define SAM3U_PIOB_IFDGSR (SAM3U_PIOB_BASE+SAM3U_PIO_IFDGSR_OFFSET) +#define SAM3U_PIOB_SCDR (SAM3U_PIOB_BASE+SAM3U_PIO_SCDR_OFFSET) +#define SAM3U_PIOB_OWER (SAM3U_PIOB_BASE+SAM3U_PIO_OWER_OFFSET) +#define SAM3U_PIOB_OWDR (SAM3U_PIOB_BASE+SAM3U_PIO_OWDR_OFFSET) +#define SAM3U_PIOB_OWSR (SAM3U_PIOB_BASE+SAM3U_PIO_OWSR_OFFSET) +#define SAM3U_PIOB_AIMER (SAM3U_PIOB_BASE+SAM3U_PIO_AIMER_OFFSET) +#define SAM3U_PIOB_AIMDR (SAM3U_PIOB_BASE+SAM3U_PIO_AIMDR_OFFSET) +#define SAM3U_PIOB_AIMMR (SAM3U_PIOB_BASE+SAM3U_PIO_AIMMR_OFFSET) +#define SAM3U_PIOB_ESR (SAM3U_PIOB_BASE+SAM3U_PIO_ESR_OFFSET) +#define SAM3U_PIOB_LSR (SAM3U_PIOB_BASE+SAM3U_PIO_LSR_OFFSET) +#define SAM3U_PIOB_ELSR (SAM3U_PIOB_BASE+SAM3U_PIO_ELSR_OFFSET) +#define SAM3U_PIOB_FELLSR (SAM3U_PIOB_BASE+SAM3U_PIO_FELLSR_OFFSET) +#define SAM3U_PIOB_REHLSR (SAM3U_PIOB_BASE+SAM3U_PIO_REHLSR_OFFSET) +#define SAM3U_PIOB_FRLHSR (SAM3U_PIOB_BASE+SAM3U_PIO_FRLHSR_OFFSET) +#define SAM3U_PIOB_LOCKSR (SAM3U_PIOB_BASE+SAM3U_PIO_LOCKSR_OFFSET) +#define SAM3U_PIOB_WPMR (SAM3U_PIOB_BASE+SAM3U_PIO_WPMR_OFFSET) +#define SAM3U_PIOB_WPSR (SAM3U_PIOB_BASE+SAM3U_PIO_WPSR_OFFSET) + +#define SAM3U_PIOC_PER (SAM3U_PIOC_BASE+SAM3U_PIO_PER_OFFSET) +#define SAM3U_PIOC_PDR_ (SAM3U_PIOC_BASE+SAM3U_PIO_PDR_OFFSET) +#define SAM3U_PIOC_PSR (SAM3U_PIOC_BASE+SAM3U_PIO_PSR_OFFSET) +#define SAM3U_PIOC_OER (SAM3U_PIOC_BASE+SAM3U_PIO_OER_OFFSET) +#define SAM3U_PIOC_ODR (SAM3U_PIOC_BASE+SAM3U_PIO_ODR_OFFSET) +#define SAM3U_PIOC_OSR (SAM3U_PIOC_BASE+SAM3U_PIO_OSR_OFFSET) +#define SAM3U_PIOC_IFER (SAM3U_PIOC_BASE+SAM3U_PIO_IFER_OFFSET) +#define SAM3U_PIOC_IFDR (SAM3U_PIOC_BASE+SAM3U_PIO_IFDR_OFFSET) +#define SAM3U_PIOC_IFSR (SAM3U_PIOC_BASE+SAM3U_PIO_IFSR_OFFSET) +#define SAM3U_PIOC_SODR (SAM3U_PIOC_BASE+SAM3U_PIO_SODR_OFFSET) +#define SAM3U_PIOC_CODR (SAM3U_PIOC_BASE+SAM3U_PIO_CODR_OFFSET) +#define SAM3U_PIOC_ODSR (SAM3U_PIOC_BASE+SAM3U_PIO_ODSR_OFFSET) +#define SAM3U_PIOC_PDSR (SAM3U_PIOC_BASE+SAM3U_PIO_PDSR_OFFSET) +#define SAM3U_PIOC_IER (SAM3U_PIOC_BASE+SAM3U_PIO_IER_OFFSET) +#define SAM3U_PIOC_IDR (SAM3U_PIOC_BASE+SAM3U_PIO_IDR_OFFSET) +#define SAM3U_PIOC_IMR (SAM3U_PIOC_BASE+SAM3U_PIO_IMR_OFFSET) +#define SAM3U_PIOC_ISR (SAM3U_PIOC_BASE+SAM3U_PIO_ISR_OFFSET) +#define SAM3U_PIOC_MDER (SAM3U_PIOC_BASE+SAM3U_PIO_MDER_OFFSET) +#define SAM3U_PIOC_MDDR (SAM3U_PIOC_BASE+SAM3U_PIO_MDDR_OFFSET) +#define SAM3U_PIOC_MDSR (SAM3U_PIOC_BASE+SAM3U_PIO_MDSR_OFFSET) +#define SAM3U_PIOC_PUDR (SAM3U_PIOC_BASE+SAM3U_PIO_PUDR_OFFSET) +#define SAM3U_PIOC_PUER (SAM3U_PIOC_BASE+SAM3U_PIO_PUER_OFFSET) +#define SAM3U_PIOC_PUSR (SAM3U_PIOC_BASE+SAM3U_PIO_PUSR_OFFSET) +#define SAM3U_PIOC_ABSR (SAM3U_PIOC_BASE+SAM3U_PIO_ABSR_OFFSET) +#define SAM3U_PIOC_SCIFSR (SAM3U_PIOC_BASE+SAM3U_PIO_SCIFSR_OFFSET) +#define SAM3U_PIOC_DIFSR (SAM3U_PIOC_BASE+SAM3U_PIO_DIFSR_OFFSET) +#define SAM3U_PIOC_IFDGSR (SAM3U_PIOC_BASE+SAM3U_PIO_IFDGSR_OFFSET) +#define SAM3U_PIOC_SCDR (SAM3U_PIOC_BASE+SAM3U_PIO_SCDR_OFFSET) +#define SAM3U_PIOC_OWER (SAM3U_PIOC_BASE+SAM3U_PIO_OWER_OFFSET) +#define SAM3U_PIOC_OWDR (SAM3U_PIOC_BASE+SAM3U_PIO_OWDR_OFFSET) +#define SAM3U_PIOC_OWSR (SAM3U_PIOC_BASE+SAM3U_PIO_OWSR_OFFSET) +#define SAM3U_PIOC_AIMER (SAM3U_PIOC_BASE+SAM3U_PIO_AIMER_OFFSET) +#define SAM3U_PIOC_AIMDR (SAM3U_PIOC_BASE+SAM3U_PIO_AIMDR_OFFSET) +#define SAM3U_PIOC_AIMMR (SAM3U_PIOC_BASE+SAM3U_PIO_AIMMR_OFFSET) +#define SAM3U_PIOC_ESR (SAM3U_PIOC_BASE+SAM3U_PIO_ESR_OFFSET) +#define SAM3U_PIOC_LSR (SAM3U_PIOC_BASE+SAM3U_PIO_LSR_OFFSET) +#define SAM3U_PIOC_ELSR (SAM3U_PIOC_BASE+SAM3U_PIO_ELSR_OFFSET) +#define SAM3U_PIOC_FELLSR (SAM3U_PIOC_BASE+SAM3U_PIO_FELLSR_OFFSET) +#define SAM3U_PIOC_REHLSR (SAM3U_PIOC_BASE+SAM3U_PIO_REHLSR_OFFSET) +#define SAM3U_PIOC_FRLHSR (SAM3U_PIOC_BASE+SAM3U_PIO_FRLHSR_OFFSET) +#define SAM3U_PIOC_LOCKSR (SAM3U_PIOC_BASE+SAM3U_PIO_LOCKSR_OFFSET) +#define SAM3U_PIOC_WPMR (SAM3U_PIOC_BASE+SAM3U_PIO_WPMR_OFFSET) +#define SAM3U_PIOC_WPSR (SAM3U_PIOC_BASE+SAM3U_PIO_WPSR_OFFSET) + +/* PIO register bit definitions *********************************************************/ + +/* Common bit definitions for ALMOST all IO registers (exceptions follow) */ + +#define PIO(n) (1<<(n)) /* Bit n: PIO n */ + +/* PIO Write Protect Mode Register */ + +#define PIO_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ +#define PIO_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ +#define PIO_WPMR_WPKEY_MASK (0xffffff << PIO_WPMR_WPKEY_SHIFT) + +/* PIO Write Protect Status Register */ + +#define PIO_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ +#define PIO_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ +#define PIO_WPSR_WPVSRC_MASK (0xffff << PIO_WPSR_WPVSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PIO_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_pmc.h b/nuttx/arch/arm/src/sam3u/sam3u_pmc.h index 3fde5b642b..75545f2394 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_pmc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_pmc.h @@ -1,316 +1,316 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_pmc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* PMC register offsets *****************************************************************/ - -#define SAM3U_PMC_SCER_OFFSET 0x0000 /* System Clock Enable Register */ -#define SAM3U_PMC_SCDR_OFFSET 0x0004 /* System Clock Disable Register */ -#define SAM3U_PMC_SCSR_OFFSET 0x0008 /* System Clock Status Register */ - /* 0x000c: Reserved */ -#define SAM3U_PMC_PCER_OFFSET 0x0010 /* Peripheral Clock Enable Register */ -#define SAM3U_PMC_PCDR_OFFSET 0x0014 /* Peripheral Clock Disable Register */ -#define SAM3U_PMC_PCSR_OFFSET 0x0018 /* Peripheral Clock Status Register */ -#define SAM3U_CKGR_UCKR_OFFSET 0x001c /* UTMI Clock Register */ -#define SAM3U_CKGR_MOR_OFFSET 0x0020 /* Main Oscillator Register */ -#define SAM3U_CKGR_MCFR_OFFSET 0x0024 /* Main Clock Frequency Register */ -#define SAM3U_CKGR_PLLAR_OFFSET 0x0028 /* PLLA Register */ - /* 0x002c: Reserved */ -#define SAM3U_PMC_MCKR_OFFSET 0x0030 /* Master Clock Register */ - /* 0x0034-0x003C Reserved */ -#define SAM3U_PMC_PCK_OFFSET(n) (0x0040+((n)<<2)) -#define SAM3U_PMC_PCK0_OFFSET 0x0040 /* Programmable Clock 0 Register */ -#define SAM3U_PMC_PCK1_OFFSET 0x0044 /* Programmable Clock 1 Register */ -#define SAM3U_PMC_PCK2_OFFSET 0x0048 /* Programmable Clock 2 Register */ - /* 0x004c-0x005c: Reserved */ -#define SAM3U_PMC_IER_OFFSET 0x0060 /* Interrupt Enable Register */ -#define SAM3U_PMC_IDR_OFFSET 0x0064 /* Interrupt Disable Register */ -#define SAM3U_PMC_SR_OFFSET 0x0068 /* Status Register */ -#define SAM3U_PMC_IMR_OFFSET 0x006c /* Interrupt Mask Register */ -#define SAM3U_PMC_FSMR_OFFSET 0x0070 /* Fast Startup Mode Register */ -#define SAM3U_PMC_FSPR_OFFSET 0x0074 /* Fast Startup Polarity Register */ -#define SAM3U_PMC_FOCR_OFFSET 0x0078 /* Fault Output Clear Register */ - /* 0x007c-0x00fc: Reserved */ -#define SAM3U_PMC_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register */ -#define SAM3U_PMC_WPSR_OFFSET 0x00e8 /* Write Protect Status Register */ - -/* PMC register adresses ****************************************************************/ - -#define SAM3U_PMC_SCER (SAM3U_PMC_BASE+SAM3U_PMC_SCER_OFFSET) -#define SAM3U_PMC_SCDR (SAM3U_PMC_BASE+SAM3U_PMC_SCDR_OFFSET) -#define SAM3U_PMC_SCSR (SAM3U_PMC_BASE+SAM3U_PMC_SCSR_OFFSET) -#define SAM3U_PMC_PCER (SAM3U_PMC_BASE+SAM3U_PMC_PCER_OFFSET) -#define SAM3U_PMC_PCDR (SAM3U_PMC_BASE+SAM3U_PMC_PCDR_OFFSET) -#define SAM3U_PMC_PCSR (SAM3U_PMC_BASE+SAM3U_PMC_PCSR_OFFSET) -#define SAM3U_CKGR_UCKR (SAM3U_PMC_BASE+SAM3U_CKGR_UCKR_OFFSET) -#define SAM3U_CKGR_MOR (SAM3U_PMC_BASE+SAM3U_CKGR_MOR_OFFSET) -#define SAM3U_CKGR_MCFR (SAM3U_PMC_BASE+SAM3U_CKGR_MCFR_OFFSET) -#define SAM3U_CKGR_PLLAR (SAM3U_PMC_BASE+SAM3U_CKGR_PLLAR_OFFSET) -#define SAM3U_PMC_MCKR (SAM3U_PMC_BASE+SAM3U_PMC_MCKR_OFFSET) -#define SAM3U_PMC_PCK(n) (SAM3U_PMC_BASE+SAM3U_PMC_PCK_OFFSET(n)) -#define SAM3U_PMC_PCK0 (SAM3U_PMC_BASE+SAM3U_PMC_PCK0_OFFSET) -#define SAM3U_PMC_PCK1 (SAM3U_PMC_BASE+SAM3U_PMC_PCK1_OFFSET) -#define SAM3U_PMC_PCK2 (SAM3U_PMC_BASE+SAM3U_PMC_PCK2_OFFSET) -#define SAM3U_PMC_IER (SAM3U_PMC_BASE+SAM3U_PMC_IER_OFFSET) -#define SAM3U_PMC_IDR (SAM3U_PMC_BASE+SAM3U_PMC_IDR_OFFSET) -#define SAM3U_PMC_SR (SAM3U_PMC_BASE+SAM3U_PMC_SR_OFFSET) -#define SAM3U_PMC_IMR (SAM3U_PMC_BASE+SAM3U_PMC_IMR_OFFSET) -#define SAM3U_PMC_FSMR (SAM3U_PMC_BASE+SAM3U_PMC_FSMR_OFFSET) -#define SAM3U_PMC_FSPR (SAM3U_PMC_BASE+SAM3U_PMC_FSPR_OFFSET) -#define SAM3U_PMC_FOCR (SAM3U_PMC_BASE+SAM3U_PMC_FOCR_OFFSET) -#define SAM3U_PMC_WPMR (SAM3U_PMC_BASE+SAM3U_PMC_WPMR_OFFSET) -#define SAM3U_PMC_WPSR (SAM3U_PMC_BASE+SAM3U_PMC_WPSR_OFFSET) - -/* PMC register bit definitions *********************************************************/ - -/* PMC System Clock Enable Register, PMC System Clock Disable Register, and PMC System - * Clock Status Register common bit-field definitions - */ - -#define PMC_PCK(n) (1 <<((n)+8) -#define PMC_PCK0 (1 << 8) /* Bit 8: Programmable Clock 0 Output Enable */ -#define PMC_PCK1 (1 << 9) /* Bit 9: Programmable Clock 1 Output Enable */ -#define PMC_PCK2 (1 << 10) /* Bit 10: Programmable Clock 2 Output Enable */ - -/* PMC Peripheral Clock Enable Register, PMC Peripheral Clock Disable Register, and PMC - * Peripheral Clock Status Register common bit-field definitions. - */ - -#define PMC_PID(n) (1<<(n)) -#define PMC_PID2 (1 << 2) /* Bit 2: Peripheral Clock 2 Enable */ -#define PMC_PID3 (1 << 3) /* Bit 3: Peripheral Clock 3 Enable */ -#define PMC_PID4 (1 << 4) /* Bit 4: Peripheral Clock 4 Enable */ -#define PMC_PID5 (1 << 5) /* Bit 5: Peripheral Clock 5 Enable */ -#define PMC_PID6 (1 << 6) /* Bit 6: Peripheral Clock 6 Enable */ -#define PMC_PID7 (1 << 7) /* Bit 7: Peripheral Clock 7 Enable */ -#define PMC_PID8 (1 << 8) /* Bit 8: Peripheral Clock 8 Enable */ -#define PMC_PID9 (1 << 9) /* Bit 9: Peripheral Clock 9 Enable */ -#define PMC_PID10 (1 << 10) /* Bit 10: Peripheral Clock 10 Enable */ -#define PMC_PID11 (1 << 11) /* Bit 11: Peripheral Clock 11 Enable */ -#define PMC_PID12 (1 << 12) /* Bit 12: Peripheral Clock 12 Enable */ -#define PMC_PID13 (1 << 13) /* Bit 13: Peripheral Clock 13 Enable */ -#define PMC_PID14 (1 << 14) /* Bit 14: Peripheral Clock 14 Enable */ -#define PMC_PID15 (1 << 15) /* Bit 15: Peripheral Clock 15 Enable */ -#define PMC_PID16 (1 << 16) /* Bit 16: Peripheral Clock 16 Enable */ -#define PMC_PID17 (1 << 17) /* Bit 17: Peripheral Clock 17 Enable */ -#define PMC_PID18 (1 << 18) /* Bit 18: Peripheral Clock 18 Enable */ -#define PMC_PID19 (1 << 19) /* Bit 19: Peripheral Clock 19 Enable */ -#define PMC_PID20 (1 << 20) /* Bit 20: Peripheral Clock 20 Enable */ -#define PMC_PID21 (1 << 21) /* Bit 21: Peripheral Clock 21 Enable */ -#define PMC_PID22 (1 << 22) /* Bit 22: Peripheral Clock 22 Enable */ -#define PMC_PID23 (1 << 23) /* Bit 23: Peripheral Clock 23 Enable */ -#define PMC_PID24 (1 << 24) /* Bit 24: Peripheral Clock 24 Enable */ -#define PMC_PID25 (1 << 25) /* Bit 25: Peripheral Clock 25 Enable */ -#define PMC_PID26 (1 << 26) /* Bit 26: Peripheral Clock 26 Enable */ -#define PMC_PID27 (1 << 27) /* Bit 27: Peripheral Clock 27 Enable */ -#define PMC_PID28 (1 << 28) /* Bit 28: Peripheral Clock 28 Enable */ -#define PMC_PID29 (1 << 29) /* Bit 29: Peripheral Clock 29 Enable */ -#define PMC_PID30 (1 << 30) /* Bit 30: Peripheral Clock 30 Enable */ -#define PMC_PID31 (1 << 31) /* Bit 31: Peripheral Clock 31 Enable */ - -/* PMC UTMI Clock Configuration Register */ - -#define CKGR_UCKR_UPLLEN (1 << 16) /* Bit 16: UTMI PLL Enable */ -#define CKGR_UCKR_UPLLCOUNT_SHIFT (20) /* Bits 20-23: UTMI PLL Start-up Time */ -#define CKGR_UCKR_UPLLCOUNT_MASK (15 << CKGR_UCKR_UPLLCOUNT_SHIFT) - -/* PMC Clock Generator Main Oscillator Register */ - -#define CKGR_MOR_MOSCXTEN (1 << 0) /* Bit 0: Main Crystal Oscillator Enable */ -#define CKGR_MOR_MOSCXTBY (1 << 1) /* Bit 1: Main Crystal Oscillator Bypass */ -#define CKGR_MOR_WAITMODE (1 << 2) /* Bit 2: Wait Mode Command */ -#define CKGR_MOR_MOSCRCEN (1 << 3) /* Bit 3: Main On-Chip RC Oscillator Enable */ -#define CKGR_MOR_MOSCRCF_SHIFT (4) /* Bits 4-6: Main On-Chip RC Oscillator Frequency Selection */ -#define CKGR_MOR_MOSCRCF_MASK (7 << CKGR_MOR_MOSCRCF_SHIFT) -#define CKGR_MOR_MOSCXTST_SHIFT (8) /* Bits 8-16: Main Crystal Oscillator Start-up Time */ -#define CKGR_MOR_MOSCXTST_MASK (0x1ff << CKGR_MOR_MOSCXTST_SHIFT) -#define CKGR_MOR_KEY_SHIFT (16) /* Bits 16-23: Password */ -#define CKGR_MOR_KEY_MASK (0xff << CKGR_MOR_KEY_SHIFT) -#define CKGR_MOR_MOSCSEL (1 << 24) /* Bit 24: Main Oscillator Selection */ -#define CKGR_MOR_CFDEN (1 << 25) /* Bit 25: Clock Failure Detector Enable */ - - -/* PMC Clock Generator Main Clock Frequency Register */ - -#define CKGR_MCFR_MAINF_SHIFT (0) /* Bits 0-15: Main Clock Frequency */ -#define CKGR_MCFR_MAINF_MASK (0xffff << CKGR_MCFR_MAINF_SHIFT) -#define CKGR_MCFR_MAINFRDY (1 << 16) /* Bit 16: Main Clock Ready */ - -/* PMC Clock Generator PLLA Register */ - -#define CKGR_PLLAR_DIVA_SHIFT (0) /* Bits 0-7: Divider */ -#define CKGR_PLLAR_DIVA_MASK (0xff << CKGR_PLLAR_DIVA_SHIFT) -# define CKGR_PLLAR_DIVA_ZERO (0 << CKGR_PLLAR_DIVA_SHIFT) /* Divider output is 0 */ -# define CKGR_PLLAR_DIVA_BYPASS (1 << CKGR_PLLAR_DIVA_SHIFT) /* Divider is bypassed (DIVA=1) */ -# define CKGR_PLLAR_DIVA(n) ((n) << CKGR_PLLAR_DIVA_SHIFT) /* Divider output is DIVA=n, n=2..255 */ -#define CKGR_PLLAR_PLLACOUNT_SHIFT (8) /* Bits 8-13: PLLA Counter */ -#define CKGR_PLLAR_PLLACOUNT_MASK (63 << CKGR_PLLAR_PLLACOUNT_SHIFT) -#define CKGR_PLLAR_STMODE_SHIFT (14) /* Bits 14-15: Start Mode */ -#define CKGR_PLLAR_STMODE_MASK (3 << CKGR_PLLAR_STMODE_SHIFT) -# define CKGR_PLLAR_STMODE_FAST (0 << CKGR_PLLAR_STMODE_SHIFT) /* Fast Startup */ -# define CKGR_PLLAR_STMODE_NORMAL (2 << CKGR_PLLAR_STMODE_SHIFT) /* Normal Startup */ -#define CKGR_PLLAR_MULA_SHIFT (16) /* Bits 16-26: PLLA Multiplier */ -#define CKGR_PLLAR_MULA_MASK (0x7ff << CKGR_PLLAR_MULA_SHIFT) -#define CKGR_PLLAR_ONE (1 << 29) /* Bit 29: Always one */ - -/* PMC Master Clock Register */ - -#define PMC_MCKR_CSS_SHIFT (0) /* Bits 0-1: Master Clock Source Selection */ -#define PMC_MCKR_CSS_MASK (3 << PMC_MCKR_CSS_SHIFT) -# define PMC_MCKR_CSS_SLOW (0 << PMC_MCKR_CSS_SHIFT) /* Slow Clock */ -# define PMC_MCKR_CSS_MAIN (1 << PMC_MCKR_CSS_SHIFT) /* Main Clock */ -# define PMC_MCKR_CSS_PLLA (2 << PMC_MCKR_CSS_SHIFT) /* PLLA Clock */ -# define PMC_MCKR_CSS_UPLL (3 << PMC_MCKR_CSS_SHIFT) /* UPLL Clock */ -#define PMC_MCKR_PRES_SHIFT (4) /* Bits 4-6: Processor Clock Prescaler */ -#define PMC_MCKR_PRES_MASK (7 << PMC_MCKR_PRES_SHIFT) -# define PMC_MCKR_PRES_DIV1 (0 << PMC_MCKR_PRES_SHIFT) /* Selected clock */ -# define PMC_MCKR_PRES_DIV2 (1 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 2 */ -# define PMC_MCKR_PRES_DIV4 (2 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 4 */ -# define PMC_MCKR_PRES_DIV8 (3 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 8 */ -# define PMC_MCKR_PRES_DIV16 (4 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 16 */ -# define PMC_MCKR_PRES_DIV32K (5 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 32 */ -# define PMC_MCKR_PRES_DIV64 (6 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 64 */ -# define PMC_MCKR_PRES_DIV3 (7 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 3 */ -#define PMC_MCKR_UPLLDIV (1 << 13) /* Bit 13: UPLL Divider */ - -/* PMC Programmable Clock Register (0,1,2) */ - -#define PMC_PCK_CSS_SHIFT (0) /* Bits 0-2: Master Clock Source Selection */ -#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_MASK) -# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_MASK) /* Slow Clock */ -# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_MASK) /* Main Clock */ -# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_MASK) /* PLLA Clock */ -# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_MASK) /* UPLL Clock */ -# define PMC_PCK_CSS_MASTER (4 << PMC_PCK_CSS_MASK) /* Master Clock */ -#define PMC_PCK_PRES_SHIFT (4) /* Bits 4-6: Programmable Clock Prescaler */ -#define PMC_PCK_PRES_MASK (7 << PMC_PCK_PRES_SHIFT) -# define PMC_PCK_PRES_DIV1 (0 << PMC_PCK_PRES_SHIFT) /* Selected clock */ -# define PMC_PCK_PRES_DIV2 (1 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 2 */ -# define PMC_PCK_PRES_DIV4 (2 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 4 */ -# define PMC_PCK_PRES_DIV8 (3 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 8 */ -# define PMC_PCK_PRES_DIV16 (4 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 16 */ -# define PMC_PCK_PRES_DIV32K (5 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 32 */ -# define PMC_PCK_PRES_DIV64 (6 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 64 */ - -/* PMC Interrupt Enable Register, PMC Interrupt Disable Register, PMC Status Register, - * and PMC Interrupt Mask Register common bit-field definitions - */ - -#define PMC_INT_MOSCXTS (1 << 0) /* Bit 0: Main Crystal Oscillator Status Interrupt */ -#define PMC_INT_LOCKA (1 << 1) /* Bit 1: PLL A Lock Interrupt */ -#define PMC_INT_MCKRDY (1 << 3) /* Bit 3: Master Clock Ready Interrupt */ -#define PMC_INT_LOCKU (1 << 6) /* Bit 6: UTMI PLL Lock Interrupt */ -#define PMC_SR_OSCSELS (1 << 7) /* Bit 7: Slow Clock Oscillator Selection (SR only) */ -#define PMC_INT_PCKRDY(n) (1<<((n)+8) -#define PMC_INT_PCKRDY0 (1 << 8) /* Bit 8: Programmable Clock Ready 0 Interrupt */ -#define PMC_INT_PCKRDY1 (1 << 9) /* Bit 9: Programmable Clock Ready 1 Interrupt */ -#define PMC_INT_PCKRDY2 (1 << 10) /* Bit 10: Programmable Clock Ready 2 Interrupt */ -#define PMC_INT_MOSCSELS (1 << 16) /* Bit 16: Main Oscillator Selection Status Interrupt */ -#define PMC_INT_MOSCRCS (1 << 17) /* Bit 17: Main On-Chip RC Status Interrupt */ -#define PMC_INT_CFDEV (1 << 18) /* Bit 18: Clock Failure Detector Event Interrupt */ -#define PMC_SR_CFDS (1 << 19) /* Bit 19: Clock Failure Detector Status (SR only) */ -#define PMC_SR_FOS (1 << 20) /* Bit 20: Clock Failure Detector Fault Output Status (SR only) */ - -/* PMC Fast Startup Mode Register and PMC Fast Startup Polarity Register common bit-field - * definitions - */ - -#define PMC_FSTI(n) (1<<(n)) -#define PMC_FSTI0 (1 << 0) /* Bit 0: Fast Startup Input 0 */ -#define PMC_FSTI1 (1 << 1) /* Bit 1: Fast Startup Input 1 */ -#define PMC_FSTI2 (1 << 2) /* Bit 2: Fast Startup Input 2 */ -#define PMC_FSTI3 (1 << 3) /* Bit 3: Fast Startup Input 3 */ -#define PMC_FSTI4 (1 << 4) /* Bit 4: Fast Startup Input 4 */ -#define PMC_FSTI5 (1 << 5) /* Bit 5: Fast Startup Input 5 */ -#define PMC_FSTI6 (1 << 6) /* Bit 6: Fast Startup Input 6 */ -#define PMC_FSTI7 (1 << 7) /* Bit 7: Fast Startup Input 7 */ -#define PMC_FSTI8 (1 << 8) /* Bit 8: Fast Startup Input 8 */ -#define PMC_FSTI9 (1 << 9) /* Bit 9: Fast Startup Input 9 */ -#define PMC_FSTI10 (1 << 10) /* Bit 10: Fast Startup Input 10 */ -#define PMC_FSTI11 (1 << 11) /* Bit 11: Fast Startup Input 11 */ -#define PMC_FSTI12 (1 << 12) /* Bit 12: Fast Startup Input 12 */ -#define PMC_FSTI13 (1 << 13) /* Bit 13: Fast Startup Input 13 */ -#define PMC_FSTI14 (1 << 14) /* Bit 14: Fast Startup Input 14 */ -#define PMC_FSTI15 (1 << 15) /* Bit 15: Fast Startup Input 15 */ - -#define PMC_FSMR_RTTAL (1 << 16) /* Bit 16: RTT Alarm Enable (MR only) */ -#define PMC_FSMR_RTCAL (1 << 17) /* Bit 17: RTC Alarm Enable (MR only) */ -#define PMC_FSMR_USBAL (1 << 18) /* Bit 18: USB Alarm Enable (MR only) */ -#define PMC_FSMR_LPM (1 << 20) /* Bit 20: Low Power Mode (MR only) */ - -/* PMC Fault Output Clear Register */ - -#define PMC_FOCLR (1 << 0) /* Bit 0: Fault Output Clear */ - -/* PMC Write Protect Mode Register */ - -#define PMC_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ -#define PMC_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ -#define PMC_WPMR_WPKEY_MASK (0x00ffffff << PMC_WPMR_WPKEY_SHIFT) - -/* PMC Write Protect Status Register */ - -#define PMC_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ -#define PMC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ -#define PMC_WPSR_WPVSRC_MASK (0xffff << PMC_WPSR_WPVSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_pmc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* PMC register offsets *****************************************************************/ + +#define SAM3U_PMC_SCER_OFFSET 0x0000 /* System Clock Enable Register */ +#define SAM3U_PMC_SCDR_OFFSET 0x0004 /* System Clock Disable Register */ +#define SAM3U_PMC_SCSR_OFFSET 0x0008 /* System Clock Status Register */ + /* 0x000c: Reserved */ +#define SAM3U_PMC_PCER_OFFSET 0x0010 /* Peripheral Clock Enable Register */ +#define SAM3U_PMC_PCDR_OFFSET 0x0014 /* Peripheral Clock Disable Register */ +#define SAM3U_PMC_PCSR_OFFSET 0x0018 /* Peripheral Clock Status Register */ +#define SAM3U_CKGR_UCKR_OFFSET 0x001c /* UTMI Clock Register */ +#define SAM3U_CKGR_MOR_OFFSET 0x0020 /* Main Oscillator Register */ +#define SAM3U_CKGR_MCFR_OFFSET 0x0024 /* Main Clock Frequency Register */ +#define SAM3U_CKGR_PLLAR_OFFSET 0x0028 /* PLLA Register */ + /* 0x002c: Reserved */ +#define SAM3U_PMC_MCKR_OFFSET 0x0030 /* Master Clock Register */ + /* 0x0034-0x003C Reserved */ +#define SAM3U_PMC_PCK_OFFSET(n) (0x0040+((n)<<2)) +#define SAM3U_PMC_PCK0_OFFSET 0x0040 /* Programmable Clock 0 Register */ +#define SAM3U_PMC_PCK1_OFFSET 0x0044 /* Programmable Clock 1 Register */ +#define SAM3U_PMC_PCK2_OFFSET 0x0048 /* Programmable Clock 2 Register */ + /* 0x004c-0x005c: Reserved */ +#define SAM3U_PMC_IER_OFFSET 0x0060 /* Interrupt Enable Register */ +#define SAM3U_PMC_IDR_OFFSET 0x0064 /* Interrupt Disable Register */ +#define SAM3U_PMC_SR_OFFSET 0x0068 /* Status Register */ +#define SAM3U_PMC_IMR_OFFSET 0x006c /* Interrupt Mask Register */ +#define SAM3U_PMC_FSMR_OFFSET 0x0070 /* Fast Startup Mode Register */ +#define SAM3U_PMC_FSPR_OFFSET 0x0074 /* Fast Startup Polarity Register */ +#define SAM3U_PMC_FOCR_OFFSET 0x0078 /* Fault Output Clear Register */ + /* 0x007c-0x00fc: Reserved */ +#define SAM3U_PMC_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register */ +#define SAM3U_PMC_WPSR_OFFSET 0x00e8 /* Write Protect Status Register */ + +/* PMC register adresses ****************************************************************/ + +#define SAM3U_PMC_SCER (SAM3U_PMC_BASE+SAM3U_PMC_SCER_OFFSET) +#define SAM3U_PMC_SCDR (SAM3U_PMC_BASE+SAM3U_PMC_SCDR_OFFSET) +#define SAM3U_PMC_SCSR (SAM3U_PMC_BASE+SAM3U_PMC_SCSR_OFFSET) +#define SAM3U_PMC_PCER (SAM3U_PMC_BASE+SAM3U_PMC_PCER_OFFSET) +#define SAM3U_PMC_PCDR (SAM3U_PMC_BASE+SAM3U_PMC_PCDR_OFFSET) +#define SAM3U_PMC_PCSR (SAM3U_PMC_BASE+SAM3U_PMC_PCSR_OFFSET) +#define SAM3U_CKGR_UCKR (SAM3U_PMC_BASE+SAM3U_CKGR_UCKR_OFFSET) +#define SAM3U_CKGR_MOR (SAM3U_PMC_BASE+SAM3U_CKGR_MOR_OFFSET) +#define SAM3U_CKGR_MCFR (SAM3U_PMC_BASE+SAM3U_CKGR_MCFR_OFFSET) +#define SAM3U_CKGR_PLLAR (SAM3U_PMC_BASE+SAM3U_CKGR_PLLAR_OFFSET) +#define SAM3U_PMC_MCKR (SAM3U_PMC_BASE+SAM3U_PMC_MCKR_OFFSET) +#define SAM3U_PMC_PCK(n) (SAM3U_PMC_BASE+SAM3U_PMC_PCK_OFFSET(n)) +#define SAM3U_PMC_PCK0 (SAM3U_PMC_BASE+SAM3U_PMC_PCK0_OFFSET) +#define SAM3U_PMC_PCK1 (SAM3U_PMC_BASE+SAM3U_PMC_PCK1_OFFSET) +#define SAM3U_PMC_PCK2 (SAM3U_PMC_BASE+SAM3U_PMC_PCK2_OFFSET) +#define SAM3U_PMC_IER (SAM3U_PMC_BASE+SAM3U_PMC_IER_OFFSET) +#define SAM3U_PMC_IDR (SAM3U_PMC_BASE+SAM3U_PMC_IDR_OFFSET) +#define SAM3U_PMC_SR (SAM3U_PMC_BASE+SAM3U_PMC_SR_OFFSET) +#define SAM3U_PMC_IMR (SAM3U_PMC_BASE+SAM3U_PMC_IMR_OFFSET) +#define SAM3U_PMC_FSMR (SAM3U_PMC_BASE+SAM3U_PMC_FSMR_OFFSET) +#define SAM3U_PMC_FSPR (SAM3U_PMC_BASE+SAM3U_PMC_FSPR_OFFSET) +#define SAM3U_PMC_FOCR (SAM3U_PMC_BASE+SAM3U_PMC_FOCR_OFFSET) +#define SAM3U_PMC_WPMR (SAM3U_PMC_BASE+SAM3U_PMC_WPMR_OFFSET) +#define SAM3U_PMC_WPSR (SAM3U_PMC_BASE+SAM3U_PMC_WPSR_OFFSET) + +/* PMC register bit definitions *********************************************************/ + +/* PMC System Clock Enable Register, PMC System Clock Disable Register, and PMC System + * Clock Status Register common bit-field definitions + */ + +#define PMC_PCK(n) (1 <<((n)+8) +#define PMC_PCK0 (1 << 8) /* Bit 8: Programmable Clock 0 Output Enable */ +#define PMC_PCK1 (1 << 9) /* Bit 9: Programmable Clock 1 Output Enable */ +#define PMC_PCK2 (1 << 10) /* Bit 10: Programmable Clock 2 Output Enable */ + +/* PMC Peripheral Clock Enable Register, PMC Peripheral Clock Disable Register, and PMC + * Peripheral Clock Status Register common bit-field definitions. + */ + +#define PMC_PID(n) (1<<(n)) +#define PMC_PID2 (1 << 2) /* Bit 2: Peripheral Clock 2 Enable */ +#define PMC_PID3 (1 << 3) /* Bit 3: Peripheral Clock 3 Enable */ +#define PMC_PID4 (1 << 4) /* Bit 4: Peripheral Clock 4 Enable */ +#define PMC_PID5 (1 << 5) /* Bit 5: Peripheral Clock 5 Enable */ +#define PMC_PID6 (1 << 6) /* Bit 6: Peripheral Clock 6 Enable */ +#define PMC_PID7 (1 << 7) /* Bit 7: Peripheral Clock 7 Enable */ +#define PMC_PID8 (1 << 8) /* Bit 8: Peripheral Clock 8 Enable */ +#define PMC_PID9 (1 << 9) /* Bit 9: Peripheral Clock 9 Enable */ +#define PMC_PID10 (1 << 10) /* Bit 10: Peripheral Clock 10 Enable */ +#define PMC_PID11 (1 << 11) /* Bit 11: Peripheral Clock 11 Enable */ +#define PMC_PID12 (1 << 12) /* Bit 12: Peripheral Clock 12 Enable */ +#define PMC_PID13 (1 << 13) /* Bit 13: Peripheral Clock 13 Enable */ +#define PMC_PID14 (1 << 14) /* Bit 14: Peripheral Clock 14 Enable */ +#define PMC_PID15 (1 << 15) /* Bit 15: Peripheral Clock 15 Enable */ +#define PMC_PID16 (1 << 16) /* Bit 16: Peripheral Clock 16 Enable */ +#define PMC_PID17 (1 << 17) /* Bit 17: Peripheral Clock 17 Enable */ +#define PMC_PID18 (1 << 18) /* Bit 18: Peripheral Clock 18 Enable */ +#define PMC_PID19 (1 << 19) /* Bit 19: Peripheral Clock 19 Enable */ +#define PMC_PID20 (1 << 20) /* Bit 20: Peripheral Clock 20 Enable */ +#define PMC_PID21 (1 << 21) /* Bit 21: Peripheral Clock 21 Enable */ +#define PMC_PID22 (1 << 22) /* Bit 22: Peripheral Clock 22 Enable */ +#define PMC_PID23 (1 << 23) /* Bit 23: Peripheral Clock 23 Enable */ +#define PMC_PID24 (1 << 24) /* Bit 24: Peripheral Clock 24 Enable */ +#define PMC_PID25 (1 << 25) /* Bit 25: Peripheral Clock 25 Enable */ +#define PMC_PID26 (1 << 26) /* Bit 26: Peripheral Clock 26 Enable */ +#define PMC_PID27 (1 << 27) /* Bit 27: Peripheral Clock 27 Enable */ +#define PMC_PID28 (1 << 28) /* Bit 28: Peripheral Clock 28 Enable */ +#define PMC_PID29 (1 << 29) /* Bit 29: Peripheral Clock 29 Enable */ +#define PMC_PID30 (1 << 30) /* Bit 30: Peripheral Clock 30 Enable */ +#define PMC_PID31 (1 << 31) /* Bit 31: Peripheral Clock 31 Enable */ + +/* PMC UTMI Clock Configuration Register */ + +#define CKGR_UCKR_UPLLEN (1 << 16) /* Bit 16: UTMI PLL Enable */ +#define CKGR_UCKR_UPLLCOUNT_SHIFT (20) /* Bits 20-23: UTMI PLL Start-up Time */ +#define CKGR_UCKR_UPLLCOUNT_MASK (15 << CKGR_UCKR_UPLLCOUNT_SHIFT) + +/* PMC Clock Generator Main Oscillator Register */ + +#define CKGR_MOR_MOSCXTEN (1 << 0) /* Bit 0: Main Crystal Oscillator Enable */ +#define CKGR_MOR_MOSCXTBY (1 << 1) /* Bit 1: Main Crystal Oscillator Bypass */ +#define CKGR_MOR_WAITMODE (1 << 2) /* Bit 2: Wait Mode Command */ +#define CKGR_MOR_MOSCRCEN (1 << 3) /* Bit 3: Main On-Chip RC Oscillator Enable */ +#define CKGR_MOR_MOSCRCF_SHIFT (4) /* Bits 4-6: Main On-Chip RC Oscillator Frequency Selection */ +#define CKGR_MOR_MOSCRCF_MASK (7 << CKGR_MOR_MOSCRCF_SHIFT) +#define CKGR_MOR_MOSCXTST_SHIFT (8) /* Bits 8-16: Main Crystal Oscillator Start-up Time */ +#define CKGR_MOR_MOSCXTST_MASK (0x1ff << CKGR_MOR_MOSCXTST_SHIFT) +#define CKGR_MOR_KEY_SHIFT (16) /* Bits 16-23: Password */ +#define CKGR_MOR_KEY_MASK (0xff << CKGR_MOR_KEY_SHIFT) +#define CKGR_MOR_MOSCSEL (1 << 24) /* Bit 24: Main Oscillator Selection */ +#define CKGR_MOR_CFDEN (1 << 25) /* Bit 25: Clock Failure Detector Enable */ + + +/* PMC Clock Generator Main Clock Frequency Register */ + +#define CKGR_MCFR_MAINF_SHIFT (0) /* Bits 0-15: Main Clock Frequency */ +#define CKGR_MCFR_MAINF_MASK (0xffff << CKGR_MCFR_MAINF_SHIFT) +#define CKGR_MCFR_MAINFRDY (1 << 16) /* Bit 16: Main Clock Ready */ + +/* PMC Clock Generator PLLA Register */ + +#define CKGR_PLLAR_DIVA_SHIFT (0) /* Bits 0-7: Divider */ +#define CKGR_PLLAR_DIVA_MASK (0xff << CKGR_PLLAR_DIVA_SHIFT) +# define CKGR_PLLAR_DIVA_ZERO (0 << CKGR_PLLAR_DIVA_SHIFT) /* Divider output is 0 */ +# define CKGR_PLLAR_DIVA_BYPASS (1 << CKGR_PLLAR_DIVA_SHIFT) /* Divider is bypassed (DIVA=1) */ +# define CKGR_PLLAR_DIVA(n) ((n) << CKGR_PLLAR_DIVA_SHIFT) /* Divider output is DIVA=n, n=2..255 */ +#define CKGR_PLLAR_PLLACOUNT_SHIFT (8) /* Bits 8-13: PLLA Counter */ +#define CKGR_PLLAR_PLLACOUNT_MASK (63 << CKGR_PLLAR_PLLACOUNT_SHIFT) +#define CKGR_PLLAR_STMODE_SHIFT (14) /* Bits 14-15: Start Mode */ +#define CKGR_PLLAR_STMODE_MASK (3 << CKGR_PLLAR_STMODE_SHIFT) +# define CKGR_PLLAR_STMODE_FAST (0 << CKGR_PLLAR_STMODE_SHIFT) /* Fast Startup */ +# define CKGR_PLLAR_STMODE_NORMAL (2 << CKGR_PLLAR_STMODE_SHIFT) /* Normal Startup */ +#define CKGR_PLLAR_MULA_SHIFT (16) /* Bits 16-26: PLLA Multiplier */ +#define CKGR_PLLAR_MULA_MASK (0x7ff << CKGR_PLLAR_MULA_SHIFT) +#define CKGR_PLLAR_ONE (1 << 29) /* Bit 29: Always one */ + +/* PMC Master Clock Register */ + +#define PMC_MCKR_CSS_SHIFT (0) /* Bits 0-1: Master Clock Source Selection */ +#define PMC_MCKR_CSS_MASK (3 << PMC_MCKR_CSS_SHIFT) +# define PMC_MCKR_CSS_SLOW (0 << PMC_MCKR_CSS_SHIFT) /* Slow Clock */ +# define PMC_MCKR_CSS_MAIN (1 << PMC_MCKR_CSS_SHIFT) /* Main Clock */ +# define PMC_MCKR_CSS_PLLA (2 << PMC_MCKR_CSS_SHIFT) /* PLLA Clock */ +# define PMC_MCKR_CSS_UPLL (3 << PMC_MCKR_CSS_SHIFT) /* UPLL Clock */ +#define PMC_MCKR_PRES_SHIFT (4) /* Bits 4-6: Processor Clock Prescaler */ +#define PMC_MCKR_PRES_MASK (7 << PMC_MCKR_PRES_SHIFT) +# define PMC_MCKR_PRES_DIV1 (0 << PMC_MCKR_PRES_SHIFT) /* Selected clock */ +# define PMC_MCKR_PRES_DIV2 (1 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 2 */ +# define PMC_MCKR_PRES_DIV4 (2 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 4 */ +# define PMC_MCKR_PRES_DIV8 (3 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 8 */ +# define PMC_MCKR_PRES_DIV16 (4 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 16 */ +# define PMC_MCKR_PRES_DIV32K (5 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 32 */ +# define PMC_MCKR_PRES_DIV64 (6 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 64 */ +# define PMC_MCKR_PRES_DIV3 (7 << PMC_MCKR_PRES_SHIFT) /* Selected clock divided by 3 */ +#define PMC_MCKR_UPLLDIV (1 << 13) /* Bit 13: UPLL Divider */ + +/* PMC Programmable Clock Register (0,1,2) */ + +#define PMC_PCK_CSS_SHIFT (0) /* Bits 0-2: Master Clock Source Selection */ +#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_MASK) +# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_MASK) /* Slow Clock */ +# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_MASK) /* Main Clock */ +# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_MASK) /* PLLA Clock */ +# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_MASK) /* UPLL Clock */ +# define PMC_PCK_CSS_MASTER (4 << PMC_PCK_CSS_MASK) /* Master Clock */ +#define PMC_PCK_PRES_SHIFT (4) /* Bits 4-6: Programmable Clock Prescaler */ +#define PMC_PCK_PRES_MASK (7 << PMC_PCK_PRES_SHIFT) +# define PMC_PCK_PRES_DIV1 (0 << PMC_PCK_PRES_SHIFT) /* Selected clock */ +# define PMC_PCK_PRES_DIV2 (1 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 2 */ +# define PMC_PCK_PRES_DIV4 (2 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 4 */ +# define PMC_PCK_PRES_DIV8 (3 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 8 */ +# define PMC_PCK_PRES_DIV16 (4 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 16 */ +# define PMC_PCK_PRES_DIV32K (5 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 32 */ +# define PMC_PCK_PRES_DIV64 (6 << PMC_PCK_PRES_SHIFT) /* Selected clock divided by 64 */ + +/* PMC Interrupt Enable Register, PMC Interrupt Disable Register, PMC Status Register, + * and PMC Interrupt Mask Register common bit-field definitions + */ + +#define PMC_INT_MOSCXTS (1 << 0) /* Bit 0: Main Crystal Oscillator Status Interrupt */ +#define PMC_INT_LOCKA (1 << 1) /* Bit 1: PLL A Lock Interrupt */ +#define PMC_INT_MCKRDY (1 << 3) /* Bit 3: Master Clock Ready Interrupt */ +#define PMC_INT_LOCKU (1 << 6) /* Bit 6: UTMI PLL Lock Interrupt */ +#define PMC_SR_OSCSELS (1 << 7) /* Bit 7: Slow Clock Oscillator Selection (SR only) */ +#define PMC_INT_PCKRDY(n) (1<<((n)+8) +#define PMC_INT_PCKRDY0 (1 << 8) /* Bit 8: Programmable Clock Ready 0 Interrupt */ +#define PMC_INT_PCKRDY1 (1 << 9) /* Bit 9: Programmable Clock Ready 1 Interrupt */ +#define PMC_INT_PCKRDY2 (1 << 10) /* Bit 10: Programmable Clock Ready 2 Interrupt */ +#define PMC_INT_MOSCSELS (1 << 16) /* Bit 16: Main Oscillator Selection Status Interrupt */ +#define PMC_INT_MOSCRCS (1 << 17) /* Bit 17: Main On-Chip RC Status Interrupt */ +#define PMC_INT_CFDEV (1 << 18) /* Bit 18: Clock Failure Detector Event Interrupt */ +#define PMC_SR_CFDS (1 << 19) /* Bit 19: Clock Failure Detector Status (SR only) */ +#define PMC_SR_FOS (1 << 20) /* Bit 20: Clock Failure Detector Fault Output Status (SR only) */ + +/* PMC Fast Startup Mode Register and PMC Fast Startup Polarity Register common bit-field + * definitions + */ + +#define PMC_FSTI(n) (1<<(n)) +#define PMC_FSTI0 (1 << 0) /* Bit 0: Fast Startup Input 0 */ +#define PMC_FSTI1 (1 << 1) /* Bit 1: Fast Startup Input 1 */ +#define PMC_FSTI2 (1 << 2) /* Bit 2: Fast Startup Input 2 */ +#define PMC_FSTI3 (1 << 3) /* Bit 3: Fast Startup Input 3 */ +#define PMC_FSTI4 (1 << 4) /* Bit 4: Fast Startup Input 4 */ +#define PMC_FSTI5 (1 << 5) /* Bit 5: Fast Startup Input 5 */ +#define PMC_FSTI6 (1 << 6) /* Bit 6: Fast Startup Input 6 */ +#define PMC_FSTI7 (1 << 7) /* Bit 7: Fast Startup Input 7 */ +#define PMC_FSTI8 (1 << 8) /* Bit 8: Fast Startup Input 8 */ +#define PMC_FSTI9 (1 << 9) /* Bit 9: Fast Startup Input 9 */ +#define PMC_FSTI10 (1 << 10) /* Bit 10: Fast Startup Input 10 */ +#define PMC_FSTI11 (1 << 11) /* Bit 11: Fast Startup Input 11 */ +#define PMC_FSTI12 (1 << 12) /* Bit 12: Fast Startup Input 12 */ +#define PMC_FSTI13 (1 << 13) /* Bit 13: Fast Startup Input 13 */ +#define PMC_FSTI14 (1 << 14) /* Bit 14: Fast Startup Input 14 */ +#define PMC_FSTI15 (1 << 15) /* Bit 15: Fast Startup Input 15 */ + +#define PMC_FSMR_RTTAL (1 << 16) /* Bit 16: RTT Alarm Enable (MR only) */ +#define PMC_FSMR_RTCAL (1 << 17) /* Bit 17: RTC Alarm Enable (MR only) */ +#define PMC_FSMR_USBAL (1 << 18) /* Bit 18: USB Alarm Enable (MR only) */ +#define PMC_FSMR_LPM (1 << 20) /* Bit 20: Low Power Mode (MR only) */ + +/* PMC Fault Output Clear Register */ + +#define PMC_FOCLR (1 << 0) /* Bit 0: Fault Output Clear */ + +/* PMC Write Protect Mode Register */ + +#define PMC_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ +#define PMC_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ +#define PMC_WPMR_WPKEY_MASK (0x00ffffff << PMC_WPMR_WPKEY_SHIFT) + +/* PMC Write Protect Status Register */ + +#define PMC_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ +#define PMC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ +#define PMC_WPSR_WPVSRC_MASK (0xffff << PMC_WPSR_WPVSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PMC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_pwm.h b/nuttx/arch/arm/src/sam3u/sam3u_pwm.h index 5890d0f676..e8278d7955 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_pwm.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_pwm.h @@ -1,633 +1,633 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_pwm.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* PWM register offsets *****************************************************************/ - -#define SAM3U_PWM_CLK_OFFSET 0x000 /* PWM Clock Register */ -#define SAM3U_PWM_ENA_OFFSET 0x004 /* PWM Enable Register */ -#define SAM3U_PWM_DIS_OFFSET 0x008 /* PWM Disable Register */ -#define SAM3U_PWM_SR_OFFSET 0x00c /* PWM Status Register */ -#define SAM3U_PWM_IER1_OFFSET 0x010 /* PWM Interrupt Enable Register 1 */ -#define SAM3U_PWM_IDR1_OFFSET 0x014 /* PWM Interrupt Disable Register 1 */ -#define SAM3U_PWM_IMR1_OFFSET 0x018 /* PWM Interrupt Mask Register 1 */ -#define SAM3U_PWM_ISR1_OFFSET 0x01c /* PWM Interrupt Status Register 1 */ -#define SAM3U_PWM_SCM_OFFSET 0x020 /* PWM Sync Channels Mode Register */ - /* 0x024: Reserved */ -#define SAM3U_PWM_SCUC_OFFSET 0x028 /* PWM Sync Channels Update Control Register */ -#define SAM3U_PWM_SCUP_OFFSET 0x02c /* PWM Sync Channels Update Period Register */ -#define SAM3U_PWM_SCUPUPD_OFFSET 0x030 /* PWM Sync Channels Update Period Update Register */ -#define SAM3U_PWM_IER2_OFFSET 0x034 /* PWM Interrupt Enable Register 2 */ -#define SAM3U_PWM_IDR2_OFFSET 0x038 /* PWM Interrupt Disable Register 2 */ -#define SAM3U_PWM_IMR2_OFFSET 0x03c /* PWM Interrupt Mask Register 2 */ -#define SAM3U_PWM_ISR2_OFFSET 0x040 /* PWM Interrupt Status Register 2 */ -#define SAM3U_PWM_OOV_OFFSET 0x044 /* PWM Output Override Value Register */ -#define SAM3U_PWM_OS_OFFSET 0x048 /* PWM Output Selection Register */ -#define SAM3U_PWM_OSS_OFFSET 0x04c /* PWM Output Selection Set Register */ -#define SAM3U_PWM_OSC_OFFSET 0x050 /* PWM Output Selection Clear Register */ -#define SAM3U_PWM_OSSUPD_OFFSET 0x054 /* PWM Output Selection Set Update Register */ -#define SAM3U_PWM_OSCUPD_OFFSET 0x058 /* PWM Output Selection Clear Update Register */ -#define SAM3U_PWM_FMR_OFFSET 0x05c /* PWM Fault Mode Register */ -#define SAM3U_PWM_FSR_OFFSET 0x060 /* PWM Fault Status Register */ -#define SAM3U_PWM_FCR_OFFSET 0x064 /* PWM Fault Clear Register */ -#define SAM3U_PWM_FPV_OFFSET 0x068 /* PWM Fault Protection Value Register */ -#define SAM3U_PWM_FPE_OFFSET 0x06c /* PWM Fault Protection Enable Register */ - /* 0x070-0x078: Reserved */ -#define SAM3U_PWM_EL0MR_OFFSET 0x07c /* PWM Event Line 0 Mode Register */ -#define SAM3U_PWM_EL1MR_OFFSET 0x080 /* PWM Event Line 1 Mode Register */ - /* 0x084-0x0ac: Reserved */ - /* 0x0b4-0x0e0: Reserved */ -#define SAM3U_PWM_WPCR_OFFSET 0x0e4 /* PWM Write Protect Control Register */ -#define SAM3U_PWM_WPSR_OFFSET 0x0e8 /* PWM Write Protect Status Register */ - /* 0x100-0x128: Reserved for PDC registers */ - /* 0x12c: Reserved */ -/* PWM Comparison Registers */ - -#define SAM3U_PWMCMP_OFFSET(n) (0x130+((n)<<4)) -#define SAM3U_PWMCMP_V_OFFSET 0x00 /* PWM Comparison Value Register */ -#define SAM3U_PWMCMP_VUPD_OFFSET 0x04 /* PWM Comparison Value Update Register */ -#define SAM3U_PWMCMP_M_OFFSET 0x08 /* PWM Comparison Mode Register */ -#define SAM3U_PWMCMP_MUPD_OFFSET 0x0c /* PWM Comparison Mode Update Register */ - -#define SAM3U_PWMCMP0_V_OFFSET 0x130 /* PWM Comparison 0 Value Register */ -#define SAM3U_PWMCMP0_VUPD_OFFSET 0x134 /* PWM Comparison 0 Value Update Register */ -#define SAM3U_PWMCMP0_M_OFFSET 0x138 /* PWM Comparison 0 Mode Register */ -#define SAM3U_PWMCMP0_MUPD_OFFSET 0x13c /* PWM Comparison 0 Mode Update Register */ - -#define SAM3U_PWMCMP1_V_OFFSET 0x140 /* PWM Comparison 1 Value Register */ -#define SAM3U_PWMCMP1_VUPD_OFFSET 0x144 /* PWM Comparison 1 Value Update Register */ -#define SAM3U_PWMCMP1_M_OFFSET 0x148 /* PWM Comparison 1 Mode Register */ -#define SAM3U_PWMCMP1_MUPD_OFFSET 0x14c /* PWM Comparison 1 Mode Update Register */ - -#define SAM3U_PWMCMP2_V_OFFSET 0x150 /* PWM Comparison 2 Value Register */ -#define SAM3U_PWMCMP2_VUPD_OFFSET 0x154 /* PWM Comparison 2 Value Update Register */ -#define SAM3U_PWMCMP2_M_OFFSET 0x158 /* PWM Comparison 2 Mode Register */ -#define SAM3U_PWMCMP2_MUPD_OFFSET 0x15c /* PWM Comparison 2 Mode Update Register */ - -#define SAM3U_PWMCMP3_V_OFFSET 0x160 /* PWM Comparison 3 Value Register */ -#define SAM3U_PWMCMP3_VUPD_OFFSET 0x164 /* PWM Comparison 3 Value Update Register */ -#define SAM3U_PWMCMP3_M_OFFSET 0x168 /* PWM Comparison 3 Mode Register */ -#define SAM3U_PWMCMP3_MUPD_OFFSET 0x16c /* PWM Comparison 3 Mode Update Register */ - -#define SAM3U_PWMCMP4_V_OFFSET 0x170 /* PWM Comparison 4 Value Register */ -#define SAM3U_PWMCMP4_VUPD_OFFSET 0x174 /* PWM Comparison 4 Value Update Register */ -#define SAM3U_PWMCMP4_M_OFFSET 0x178 /* PWM Comparison 4 Mode Register */ -#define SAM3U_PWMCMP4_MUPD_OFFSET 0x17c /* PWM Comparison 4 Mode Update Register */ - -#define SAM3U_PWMCMP5_V_OFFSET 0x180 /* PWM Comparison 5 Value Register */ -#define SAM3U_PWMCMP5_VUPD_OFFSET 0x184 /* PWM Comparison 5 Value Update Register */ -#define SAM3U_PWMCMP5_M_OFFSET 0x188 /* PWM Comparison 5 Mode Register */ -#define SAM3U_PWMCMP5_MUPD_OFFSET 0x18c /* PWM Comparison 5 Mode Update Register */ - -#define SAM3U_PWMCMP6_V_OFFSET 0x190 /* PWM Comparison 6 Value Register */ -#define SAM3U_PWMCMP6_VUPD_OFFSET 0x194 /* PWM Comparison 6 Value Update Register */ -#define SAM3U_PWMCMP6_M_OFFSET 0x198 /* PWM Comparison 6 Mode Register */ -#define SAM3U_PWMCMP6_MUPD_OFFSET 0x19c /* PWM Comparison 6 Mode Update Register */ - -#define SAM3U_PWMCMP7_V_OFFSET 0x1a0 /* PWM Comparison 7 Value Register */ -#define SAM3U_PWMCMP7_VUPD_OFFSET 0x1a4 /* PWM Comparison 7 Value Update Register */ -#define SAM3U_PWMCMP7_M_OFFSET 0x1a8 /* PWM Comparison 7 Mode Register */ -#define SAM3U_PWMCMP7_MUPD_OFFSET 0x1ac /* PWM Comparison 7 Mode Update Register */ - /* 0x1b0-0x1fc: Reserved */ -/* PWM Channel Registers */ - -#define SAM3U_PWMCH_OFFSET(n) (0x200+((n)<< 5)) -#define SAM3U_PWMCH_MR_OFFSET 0x00 /* PWM Channel Mode Register */ -#define SAM3U_PWMCH_DTY_OFFSET 0x04 /* PWM Channel Duty Cycle Register */ -#define SAM3U_PWMCH_DTYUPD_OFFSET 0x08 /* PWM Channel Duty Cycle Update Register */ -#define SAM3U_PWMCH_PRD_OFFSET 0x0c /* PWM Channel Period Register */ -#define SAM3U_PWMCH_PRDUPD_OFFSET 0x10 /* PWM Channel Period Update Register */ -#define SAM3U_PWMCH_CCNT_OFFSET 0x14 /* PWM Channel Counter Register */ -#define SAM3U_PWMCH_DT_OFFSET 0x18 /* PWM Channel Dead Time Register */ -#define SAM3U_PWMCH_DTUPD_OFFSET 0x1c /* PWM Channel Dead Time Update Register */ - -#define SAM3U_PWMCH0_MR_OFFSET 0x200 /* PWM Channel 0 Mode Register */ -#define SAM3U_PWMCH0_DTY_OFFSET 0x204 /* PWM Channel 0 Duty Cycle Register */ -#define SAM3U_PWMCH0_DTYUPD_OFFSET 0x208 /* PWM Channel 0 Duty Cycle Update Register */ -#define SAM3U_PWMCH0_PRD_OFFSET 0x20c /* PWM Channel 0 Period Register */ -#define SAM3U_PWMCH0_PRDUPD_OFFSET 0x210 /* PWM Channel 0 Period Update Register */ -#define SAM3U_PWMCH0_CCNT_OFFSET 0x214 /* PWM Channel 0 Counter Register */ -#define SAM3U_PWMCH0_DT_OFFSET 0x218 /* PWM Channel 0 Dead Time Register */ -#define SAM3U_PWMCH0_DTUPD_OFFSET 0x21c /* PWM Channel 0 Dead Time Update Register */ - -#define SAM3U_PWMCH1_MR_OFFSET 0x220 /* PWM Channel 1 Mode Register */ -#define SAM3U_PWMCH1_DTY_OFFSET 0x224 /* PWM Channel 1 Duty Cycle Register */ -#define SAM3U_PWMCH1_DTYUPD_OFFSET 0x228 /* PWM Channel 1 Duty Cycle Update Register */ -#define SAM3U_PWMCH1_PRD_OFFSET 0x22c /* PWM Channel 1 Period Register */ -#define SAM3U_PWMCH1_PRDUPD_OFFSET 0x230 /* PWM Channel 1 Period Update Register */ -#define SAM3U_PWMCH1_CCNT_OFFSET 0x234 /* PWM Channel 1 Counter Register */ -#define SAM3U_PWMCH1_DT_OFFSET 0x238 /* PWM Channel 1 Dead Time Register */ -#define SAM3U_PWMCH1_DTUPD_OFFSET 0x23c /* PWM Channel 1 Dead Time Update Register */ - -#define SAM3U_PWMCH2_MR_OFFSET 0x240 /* PWM Channel 2 Mode Register */ -#define SAM3U_PWMCH2_DTY_OFFSET 0x244 /* PWM Channel 2 Duty Cycle Register */ -#define SAM3U_PWMCH2_DTYUPD_OFFSET 0x248 /* PWM Channel 2 Duty Cycle Update Register */ -#define SAM3U_PWMCH2_PRD_OFFSET 0x24c /* PWM Channel 2 Period Register */ -#define SAM3U_PWMCH2_PRDUPD_OFFSET 0x250 /* PWM Channel 2 Period Update Register */ -#define SAM3U_PWMCH2_CCNT_OFFSET 0x254 /* PWM Channel 2 Counter Register */ -#define SAM3U_PWMCH2_DT_OFFSET 0x258 /* PWM Channel 2 Dead Time Register */ -#define SAM3U_PWMCH2_DTUPD_OFFSET 0x25c /* PWM Channel 2 Dead Time Update Register */ - -#define SAM3U_PWMCH3_MR_OFFSET 0x260 /* PWM Channel 3 Mode Register */ -#define SAM3U_PWMCH3_DTY_OFFSET 0x264 /* PWM Channel 3 Duty Cycle Register */ -#define SAM3U_PWMCH3_DTYUPD_OFFSET 0x268 /* PWM Channel 3 Duty Cycle Update Register */ -#define SAM3U_PWMCH3_PRD_OFFSET 0x26c /* PWM Channel 3 Period Register */ -#define SAM3U_PWMCH3_PRDUPD_OFFSET 0x270 /* PWM Channel 3 Period Update Register */ -#define SAM3U_PWMCH3_CCNT_OFFSET 0x274 /* PWM Channel 3 Counter Register */ -#define SAM3U_PWMCH3_DT_OFFSET 0x278 /* PWM Channel 3 Dead Time Register */ -#define SAM3U_PWMCH3_DTUPD_OFFSET 0x27c /* PWM Channel 3 Dead Time Update Register */ - -/* PWM register adresses ****************************************************************/ - -#define SAM3U_PWM_CLK (SAM3U_PWM_BASE+SAM3U_PWM_CLK_OFFSET) -#define SAM3U_PWM_ENA (SAM3U_PWM_BASE+SAM3U_PWM_ENA_OFFSET) -#define SAM3U_PWM_DIS (SAM3U_PWM_BASE+SAM3U_PWM_DIS_OFFSET) -#define SAM3U_PWM_SR (SAM3U_PWM_BASE+SAM3U_PWM_SR_OFFSET) -#define SAM3U_PWM_IER1 (SAM3U_PWM_BASE+SAM3U_PWM_IER1_OFFSET) -#define SAM3U_PWM_IDR1 (SAM3U_PWM_BASE+SAM3U_PWM_IDR1_OFFSET) -#define SAM3U_PWM_IMR1 (SAM3U_PWM_BASE+SAM3U_PWM_IMR1_OFFSET) -#define SAM3U_PWM_ISR1 (SAM3U_PWM_BASE+SAM3U_PWM_ISR1_OFFSET) -#define SAM3U_PWM_SCM (SAM3U_PWM_BASE+SAM3U_PWM_SCM_OFFSET) -#define SAM3U_PWM_SCUC (SAM3U_PWM_BASE+SAM3U_PWM_SCUC_OFFSET) -#define SAM3U_PWM_SCUP (SAM3U_PWM_BASE+SAM3U_PWM_SCUP_OFFSET) -#define SAM3U_PWM_SCUPUPD (SAM3U_PWM_BASE+SAM3U_PWM_SCUPUPD_OFFSET) -#define SAM3U_PWM_IER2 (SAM3U_PWM_BASE+SAM3U_PWM_IER2_OFFSET) -#define SAM3U_PWM_IDR2 (SAM3U_PWM_BASE+SAM3U_PWM_IDR2_OFFSET) -#define SAM3U_PWM_IMR2 (SAM3U_PWM_BASE+SAM3U_PWM_IMR2_OFFSET) -#define SAM3U_PWM_ISR2 (SAM3U_PWM_BASE+SAM3U_PWM_ISR2_OFFSET) -#define SAM3U_PWM_OOV (SAM3U_PWM_BASE+SAM3U_PWM_OOV_OFFSET) -#define SAM3U_PWM_OS (SAM3U_PWM_BASE+SAM3U_PWM_OS_OFFSET) -#define SAM3U_PWM_OSS (SAM3U_PWM_BASE+SAM3U_PWM_OSS_OFFSET) -#define SAM3U_PWM_OSC (SAM3U_PWM_BASE+SAM3U_PWM_OSC_OFFSET) -#define SAM3U_PWM_OSSUPD (SAM3U_PWM_BASE+SAM3U_PWM_OSSUPD_OFFSET) -#define SAM3U_PWM_OSCUPD (SAM3U_PWM_BASE+SAM3U_PWM_OSCUPD_OFFSET) -#define SAM3U_PWM_FMR (SAM3U_PWM_BASE+SAM3U_PWM_FMR_OFFSET) -#define SAM3U_PWM_FSR (SAM3U_PWM_BASE+SAM3U_PWM_FSR_OFFSET) -#define SAM3U_PWM_FCR (SAM3U_PWM_BASE+SAM3U_PWM_FCR_OFFSET) -#define SAM3U_PWM_FPV (SAM3U_PWM_BASE+SAM3U_PWM_FPV_OFFSET) -#define SAM3U_PWM_FPE (SAM3U_PWM_BASE+SAM3U_PWM_FPE_OFFSET) -#define SAM3U_PWM_EL0MR (SAM3U_PWM_BASE+SAM3U_PWM_EL0MR_OFFSET) -#define SAM3U_PWM_EL1MR (SAM3U_PWM_BASE+SAM3U_PWM_EL1MR_OFFSET) -#define SAM3U_PWM_WPCR (SAM3U_PWM_BASE+SAM3U_PWM_WPCR_OFFSET) -#define SAM3U_PWM_WPSR (SAM3U_PWM_BASE+SAM3U_PWM_WPSR_OFFSET) - -/* PWM Comparison Registers */ - -#define SAM3U_PWCMP_BASE(n) (SAM3U_PWM_BASE+SAM3U_PWCMP_OFFSET(n)) -#define SAM3U_PWMCMP0_BASE (SAM3U_PWM_BASE+0x0130) -#define SAM3U_PWMCMP1_BASE (SAM3U_PWM_BASE+0x0140) -#define SAM3U_PWMCMP2_BASE (SAM3U_PWM_BASE+0x0150) -#define SAM3U_PWMCMP3_BASE (SAM3U_PWM_BASE+0x0160) -#define SAM3U_PWMCMP4_BASE (SAM3U_PWM_BASE+0x0170) -#define SAM3U_PWMCMP5_BASE (SAM3U_PWM_BASE+0x0180) -#define SAM3U_PWMCMP6_BASE (SAM3U_PWM_BASE+0x0190) -#define SAM3U_PWMCMP7_BASE (SAM3U_PWM_BASE+0x01a0) - -#define SAM3U_PWMCMP0_V (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP0_VUPD (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP0_M (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP0_MUPD (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP1_V (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP1_VUPD (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP1_M (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP1_MUPD (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP2_V (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP2_VUPD (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP2_M (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP2_MUPD (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP3_V (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP3_VUPD (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP3_M (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP3_MUPD (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP4_V (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP4_VUPD (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP4_M (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP4_MUPD (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP5_V (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP5_VUPD (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP5_M (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP5_MUPD (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP6_V (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP6_VUPD (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP6_M (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP6_MUPD (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -#define SAM3U_PWMCMP7_V (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_V_OFFSET) -#define SAM3U_PWMCMP7_VUPD (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_VUPD_OFFSET) -#define SAM3U_PWMCMP7_M (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_M_OFFSET) -#define SAM3U_PWMCMP7_MUPD (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_MUPD_OFFSET) - -/* PWM Channel Registers */ - -#define SAM3U_PWCH_BASE(n) (SAM3U_PWM_BASE+SAM3U_PWCH_OFFSET(n)) -#define SAM3U_PWMCH0_BASE (SAM3U_PWM_BASE+0x0200) -#define SAM3U_PWMCH1_BASE (SAM3U_PWM_BASE+0x0220) -#define SAM3U_PWMCH2_BASE (SAM3U_PWM_BASE+0x0240) -#define SAM3U_PWMCH3_BASE (SAM3U_PWM_BASE+0x0260) - -#define SAM3U_PWMCH0_MR (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_MR_OFFSET) -#define SAM3U_PWMCH0_DTY (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTY_OFFSET) -#define SAM3U_PWMCH0_DTYUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) -#define SAM3U_PWMCH0_PRD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_PRD_OFFSET) -#define SAM3U_PWMCH0_PRDUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) -#define SAM3U_PWMCH0_CCNT (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_CCNT_OFFSET) -#define SAM3U_PWMCH0_DT (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DT_OFFSET) -#define SAM3U_PWMCH0_DTUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTUPD_OFFSET) - -#define SAM3U_PWMCH1_MR (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_MR_OFFSET) -#define SAM3U_PWMCH1_DTY (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTY_OFFSET) -#define SAM3U_PWMCH1_DTYUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) -#define SAM3U_PWMCH1_PRD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_PRD_OFFSET) -#define SAM3U_PWMCH1_PRDUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) -#define SAM3U_PWMCH1_CCNT (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_CCNT_OFFSET) -#define SAM3U_PWMCH1_DT (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DT_OFFSET) -#define SAM3U_PWMCH1_DTUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTUPD_OFFSET) - -#define SAM3U_PWMCH2_MR (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_MR_OFFSET) -#define SAM3U_PWMCH2_DTY (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTY_OFFSET) -#define SAM3U_PWMCH2_DTYUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) -#define SAM3U_PWMCH2_PRD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_PRD_OFFSET) -#define SAM3U_PWMCH2_PRDUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) -#define SAM3U_PWMCH2_CCNT (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_CCNT_OFFSET) -#define SAM3U_PWMCH2_DT (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DT_OFFSET) -#define SAM3U_PWMCH2_DTUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTUPD_OFFSET) - -#define SAM3U_PWMCH3_MR (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_MR_OFFSET) -#define SAM3U_PWMCH3_DTY (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTY_OFFSET) -#define SAM3U_PWMCH3_DTYUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) -#define SAM3U_PWMCH3_PRD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_PRD_OFFSET) -#define SAM3U_PWMCH3_PRDUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) -#define SAM3U_PWMCH3_CCNT (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_CCNT_OFFSET) -#define SAM3U_PWMCH3_DT (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DT_OFFSET) -#define SAM3U_PWMCH3_DTUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTUPD_OFFSET) - -/* PWM register bit definitions *********************************************************/ - -/* PWM Clock Register */ - -#define PWM_CLK_DIVA_SHIFT (0) /* Bits 0-7: CLKA Divide Factor */ -#define PWM_CLK_DIVA_MASK (0xff << PWM_CLK_DIVA_SHIFT) -#define PWM_CLK_PREA_SHIFT (8) /* Bits 8-11: CLKA Source Clock Selection */ -#define PWM_CLK_PREA_MASK (15 << PWM_CLK_PREA_SHIFT) -# define PWM_CLK_PREA_MCK (0 << PWM_CLK_PREA_SHIFT) /* MCK */ -# define PWM_CLK_PREA_MCKDIV2 (1 << PWM_CLK_PREA_SHIFT) /* MCK/2 */ -# define PWM_CLK_PREA_MCKDIV4 (2 << PWM_CLK_PREA_SHIFT) /* MCK/4 */ -# define PWM_CLK_PREA_MCKDIV8 (3 << PWM_CLK_PREA_SHIFT) /* MCK/8 */ -# define PWM_CLK_PREA_MCKDIV16 (4 << PWM_CLK_PREA_SHIFT) /* MCK/16 */ -# define PWM_CLK_PREA_MCKDIV32 (5 << PWM_CLK_PREA_SHIFT) /* MCK/32 */ -# define PWM_CLK_PREA_MCKDIV64 (6 << PWM_CLK_PREA_SHIFT) /* MCK/64 */ -# define PWM_CLK_PREA_MCKDIV128 (7 << PWM_CLK_PREA_SHIFT) /* MCK/128 */ -# define PWM_CLK_PREA_MCKDIV256 (8 << PWM_CLK_PREA_SHIFT) /* MCK/256 */ -# define PWM_CLK_PREA_MCKDIV512 (9 << PWM_CLK_PREA_SHIFT) /* MCK/512 */ -# define PWM_CLK_PREA_MCKDIV1024 (10 << PWM_CLK_PREA_SHIFT) /* MCK/1024 */ -#define PWM_CLK_DIVB_SHIFT (16) /* Bits 16-23: CLKB Divide Factor */ -#define PWM_CLK_DIVB_MASK (0xff << PWM_CLK_DIVB_SHIFT) -#define PWM_CLK_PREB_SHIFT (24) /* Bit 24-27: CLKB Source Clock Selection */ -#define PWM_CLK_PREB_MASK (15 << PWM_CLK_PREB_SHIFT) -# define PWM_CLK_PREB_MCK (0 << PWM_CLK_PREB_SHIFT) /* MCK */ -# define PWM_CLK_PREB_MCKDIV2 (1 << PWM_CLK_PREB_SHIFT) /* MCK/2 */ -# define PWM_CLK_PREB_MCKDIV4 (2 << PWM_CLK_PREB_SHIFT) /* MCK/4 */ -# define PWM_CLK_PREB_MCKDIV8 (3 << PWM_CLK_PREB_SHIFT) /* MCK/8 */ -# define PWM_CLK_PREB_MCKDIV16 (4 << PWM_CLK_PREB_SHIFT) /* MCK/16 */ -# define PWM_CLK_PREB_MCKDIV32 (5 << PWM_CLK_PREB_SHIFT) /* MCK/32 */ -# define PWM_CLK_PREB_MCKDIV64 (6 << PWM_CLK_PREB_SHIFT) /* MCK/64 */ -# define PWM_CLK_PREB_MCKDIV128 (7 << PWM_CLK_PREB_SHIFT) /* MCK/128 */ -# define PWM_CLK_PREB_MCKDIV256 (8 << PWM_CLK_PREB_SHIFT) /* MCK/256 */ -# define PWM_CLK_PREB_MCKDIV512 (9 << PWM_CLK_PREB_SHIFT) /* MCK/512 */ -# define PWM_CLK_PREB_MCKDIV1024 (10 << PWM_CLK_PREB_SHIFT) /* MCK/1024 */ - -/* PWM Enable Register, PWM Disable Register, and PWM Status Register common bit-field definitions */ - -#define SAM3U_ENAB_CHID(n) (1 << ((n)) -#define SAM3U_ENAB_CHID0 (1 << 0) /* Bit 0: Counter Event Channel 0 Interrupt */ -#define SAM3U_ENAB_CHID1 (1 << 1) /* Bit 1: Counter Event Channel 1 Interrupt */ -#define SAM3U_ENAB_CHID2 (1 << 2) /* Bit 2: Counter Event Channel 2 Interrupt */ -#define SAM3U_ENAB_CHID3 (1 << 3) /* Bit 3: Counter Event Channel 3 Interrupt */ - -/* PWM Interrupt Enable Register 1, PWM Interrupt Disable Register 1, PWM Interrupt - * Mask Register 1, and PWM Interrupt Status Register 1 common bit definitions - */ - -#define SAM3U_INT_CHID(n) (1 << (n)) -#define SAM3U_INT_CHID0 (1 << 0) /* Bit 0: Counter Event Channel 0 Interrupt */ -#define SAM3U_INT_CHID1 (1 << 1) /* Bit 1: Counter Event Channel 1 Interrupt */ -#define SAM3U_INT_CHID2 (1 << 2) /* Bit 2: Counter Event Channel 2 Interrupt */ -#define SAM3U_INT_CHID3 (1 << 3) /* Bit 3: Counter Event Channel 3 Interrupt */ -#define SAM3U_INT_FCHID(n) (1 << ((n)+16)) -#define SAM3U_INT_FCHID0 (1 << 16) /* Bit 16: Fault Protection Trigger Channel 0 Interrupt */ -#define SAM3U_INT_FCHID1 (1 << 17) /* Bit 17: Fault Protection Trigger Channel 1 Interrupt */ -#define SAM3U_INT_FCHID2 (1 << 18) /* Bit 18: Fault Protection Trigger Channel 2 Interrupt */ -#define SAM3U_INT_FCHID3 (1 << 19) /* Bit 19: Fault Protection Trigger Channel 3 Interrupt */ - -/* PWM Sync Channels Mode Register */ - -#define PWM_SCM_SYNC(n) (1 << (n)) -#define PWM_SCM_SYNC0 (1 << 0) /* Bit 0: Synchronous Channel 0 */ -#define PWM_SCM_SYNC1 (1 << 1) /* Bit 1: Synchronous Channel 1 */ -#define PWM_SCM_SYNC2 (1 << 2) /* Bit 2: Synchronous Channel 2 */ -#define PWM_SCM_SYNC3 (1 << 3) /* Bit 3: Synchronous Channel 3 */ -#define PWM_SCM_UPDM_SHIFT (16) /* Bits 16-17: Synchronous Channels Update Mode */ -#define PWM_SCM_UPDM_MASK (3 << PWM_SCM_UPDM_SHIFT) -# define PWM_SCM_UPDM_MANMAN (0 << PWM_SCM_UPDM_SHIFT) /* Manual write/manual update */ -# define PWM_SCM_UPDM_MANAUTO (1 << PWM_SCM_UPDM_SHIFT) /* Manual write/automatic update */ -# define PWM_SCM_UPDM_AUTOAUTO (2 << PWM_SCM_UPDM_SHIFT) /* Auto write/automatic update */ -#define PWM_SCM_PTRM (1 << 20) /* Bit 20: PDC Transfer Request Mode */ -#define PWM_SCM_PTRCS_SHIFT (21) /* Bits 21-23: PDC Transfer Request Comparison Selection */ -#define PWM_SCM_PTRCS_MASK (7 << PWM_SCM_PTRCS_SHIFT) - -/* PWM Sync Channels Update Control Register */ - -#define PWM_SCUC_UPDULOCK (1 << 0) /* Bit 0: Synchronous Channels Update Unlock */ - -/* PWM Sync Channels Update Period Register */ - -#define PWM_SCUP_UPR_SHIFT (0) /* Bits 0-3: Update Period */ -#define PWM_SCUP_UPR_MASK (15 << PWM_SCUP_UPR_MASK) -#define PWM_SCUP_UPRCNT_SHIFT (4) /* Bits 4-7: Update Period Counter */ -#define PWM_SCUP_UPRCNT_MASK (15 << PWM_SCUP_UPRCNT_SHIFT) - -/* PWM Sync Channels Update Period Update Register */ - -#define PWM_SCUPUPD_SHIFT (0) /* Bits 0-3: Update Period Update */ -#define PWM_SCUPUPD_MASK (15 << PWM_SCUPUPD_SHIFT) - -/* PWM Interrupt Enable Register 2, PWM Interrupt Disable Register 2, PWM Interrupt Mask Register 2, and PWM Interrupt Status Register 2 common bit-field definitions */ - -#define SAM3U_INT_WRDY (1 << 0) /* Bit 0: Write Ready Update Interrupt */ -#define SAM3U_INT_ENDTX (1 << 1) /* Bit 1: PDC End of TX Buffer Interrupt */ -#define SAM3U_INT_TXBUFE (1 << 2) /* Bit 2: PDC TX Buffer Empty Interrupt */ -#define SAM3U_INT_UNRE (1 << 3) /* Bit 3: Synch Update Underrun Error Interrupt */ -#define SAM3U_INT_CMPM(n) (1 << ((n)+8)) -#define SAM3U_INT_CMPM0 (1 << 8) /* Bit 8: Comparison 0 Match Interrupt */ -#define SAM3U_INT_CMPM1 (1 << 9) /* Bit 9: Comparison 1 Match Interrupt */ -#define SAM3U_INT_CMPM2 (1 << 10) /* Bit 10: Comparison 2 Match Interrupt */ -#define SAM3U_INT_CMPM3 (1 << 11) /* Bit 11: Comparison 3 Match Interrupt */ -#define SAM3U_INT_CMPM4 (1 << 12) /* Bit 12: Comparison 4 Match Interrupt */ -#define SAM3U_INT_CMPM5 (1 << 13) /* Bit 13: Comparison 5 Match Interrupt */ -#define SAM3U_INT_CMPM6 (1 << 14) /* Bit 14: Comparison 6 Match Interrupt */ -#define SAM3U_INT_CMPM7 (1 << 15) /* Bit 15: Comparison 7 Match Interrupt */ -#define SAM3U_INT_CMPU(n) (1 << ((n)+16)) -#define SAM3U_INT_CMPU0 (1 << 16) /* Bit 16: Comparison o Update Interrupt */ -#define SAM3U_INT_CMPU1 (1 << 17) /* Bit 17: Comparison 1 Update Interrupt */ -#define SAM3U_INT_CMPU2 (1 << 18) /* Bit 18: Comparison 2 Update Interrupt */ -#define SAM3U_INT_CMPU3 (1 << 19) /* Bit 19: Comparison 3 Update Interrupt */ -#define SAM3U_INT_CMPU4 (1 << 20) /* Bit 20: Comparison 4 Update Interrupt */ -#define SAM3U_INT_CMPU5 (1 << 21) /* Bit 21: Comparison 5 Update Interrupt */ -#define SAM3U_INT_CMPU6 (1 << 22) /* Bit 22: Comparison 6 Update Interrupt */ -#define SAM3U_INT_CMPU7 (1 << 23) /* Bit 23: Comparison 7 Update Interrupt */ - -/* PWM Output Override Value Register, PWM Output Selection Register, PWM Output - * Selection Set Register, PWM Output Selection Clear Register, PWM Output Selection - * Set Update Register, and PWM Output Selection Clear Update Register common bit-field - * definitions - */ - -#define PWM_OUT_OH(n) (1 << (n)) -#define PWM_OUT_OH0 (1 << 0) /* Bit 0: Value for PWMH output of the channel 0 */ -#define PWM_OUT_OH1 (1 << 1) /* Bit 1: Value for PWMH output of the channel 1 */ -#define PWM_OUT_OH2 (1 << 2) /* Bit 2: Value for PWMH output of the channel 2 */ -#define PWM_OUT_OH3 (1 << 3) /* Bit 3: Value for PWMH output of the channel 3 */ -#define PWM_OUT_OL(n) (1 << ((n)+16)) -#define PWM_OUT_OL0 (1 << 16) /* Bit 16: Value for PWML output of the channel 0 */ -#define PWM_OUT_OL1 (1 << 17) /* Bit 17: Value for PWML output of the channel 1 */ -#define PWM_OUT_OL2 (1 << 18) /* Bit 18: Value for PWML output of the channel 2 */ -#define PWM_OUT_OL3 (1 << 19) /* Bit 19: Value for PWML output of the channel 3 */ - -/* PWM Fault Mode Register */ - -#define PWM_FMR_FPOL(n) (1 << (n)) -#define PWM_FMR_FPOL0 (1 << 0) /* Bit 0: Fault 0 Polarity */ -#define PWM_FMR_FPOL1 (1 << 1) /* Bit 1: Fault 1 Polarity */ -#define PWM_FMR_FPOL2 (1 << 2) /* Bit 2: Fault 2 Polarity */ -#define PWM_FMR_FPOL3 (1 << 3) /* Bit 3: Fault 3 Polarity */ -#define PWM_FMR_FMOD(n) (1 << ((n)+8)) -#define PWM_FMR_FMOD0 (1 << 8) /* Bit 8: Fault 0 Activation Mode */ -#define PWM_FMR_FMOD1 (1 << 9) /* Bit 9: Fault 1 Activation Mode */ -#define PWM_FMR_FMOD2 (1 << 10) /* Bit 10: Fault 2 Activation Mode */ -#define PWM_FMR_FMOD3 (1 << 11) /* Bit 11: Fault 3 Activation Mode */ -#define PWM_FMR_FFIL(n) (1 << ((n)+16)) -#define PWM_FMR_FFIL0 (1 << 16) /* Bit 16: Fault 0 Filter */ -#define PWM_FMR_FFIL1 (1 << 17) /* Bit 17: Fault 1 Filter */ -#define PWM_FMR_FFIL2 (1 << 18) /* Bit 18: Fault 2 Filter */ -#define PWM_FMR_FFIL3 (1 << 19) /* Bit 19: Fault 3 Filter */ - -/* PWM Fault Status Register */ - -#define PWM_FSR_FIV(n) (1 << (n)) -#define PWM_FSR_FIV0 (1 << 0) /* Bit 0: Fault Input 0 Value */ -#define PWM_FSR_FIV1 (1 << 1) /* Bit 1: Fault Input 1 Value */ -#define PWM_FSR_FIV2 (1 << 2) /* Bit 2: Fault Input 2 Value */ -#define PWM_FSR_FIV3 (1 << 3) /* Bit 3: Fault Input 3 Value */ -#define PWM_FSR_FS(n) (1 << ((n)+8)) -#define PWM_FSR_FS0 (1 << 8) /* Bit 8: Fault 0 Status */ -#define PWM_FSR_FS1 (1 << 9) /* Bit 9: Fault 1 Status */ -#define PWM_FSR_FS2 (1 << 10) /* Bit 10: Fault 2 Status */ -#define PWM_FSR_FS3 (1 << 11) /* Bit 11: Fault 3 Status */ - -/* PWM Fault Clear Register */ - -#define PWM_FCR_FCLR(n) (1 << (n)) -#define PWM_FCR_FCLR0 (1 << 0) /* Bit 0: Fault 0 Clear */ -#define PWM_FCR_FCLR1 (1 << 1) /* Bit 1: Fault 1 Clear */ -#define PWM_FCR_FCLR2 (1 << 2) /* Bit 2: Fault 2 Clear */ -#define PWM_FCR_FCLR3 (1 << 3) /* Bit 3: Fault 3 Clear */ - -/* PWM Fault Protection Value Register */ - -#define PWM_FPV_FPVH(n) (1 << (n)) -#define PWM_FPV_FPVH0 (1 << 0) /* Bit 0: Fault Protection Value PWMH output channel 0 */ -#define PWM_FPV_FPVH1 (1 << 1) /* Bit 1: Fault Protection Value PWMH output channel 1 */ -#define PWM_FPV_FPVH2 (1 << 2) /* Bit 2: Fault Protection Value PWMH output channel 2 */ -#define PWM_FPV_FPVH3 (1 << 3) /* Bit 3: Fault Protection Value PWMH output channel 3 */ -#define PWM_FPV_FPVL(n) (1 << ((n)+16)) -#define PWM_FPV_FPVL0 (1 << 16) /* Bit 16: Fault Protection Value PWML output channel 0 */ -#define PWM_FPV_FPVL1 (1 << 17) /* Bit 17: Fault Protection Value PWML output channel 1 */ -#define PWM_FPV_FPVL2 (1 << 18) /* Bit 18: Fault Protection Value PWML output channel 2 */ -#define PWM_FPV_FPVL3 (1 << 19) /* Bit 19: Fault Protection Value PWML output channel 3 */ - -/* PWM Fault Protection Enable Register */ - -#define PWM_FPE_FPEN(n,y) (1 << (((n)<<8)+y)) -#define PWM_FPE_FPE0(y) (1 << (y)) /* Bits 0-7: Fault Protection Enable Fault=y chan=0 */ -#define PWM_FPE_FPE1(y) (1 << ((y)+8)) /* Bits 8-15: Fault Protection Enable Fault=y chan=1 */ -#define PWM_FPE_FPE2(y) (1 << ((y)+16)) /* Bits 16-23: Fault Protection Enable Fault=y chan=2 */ -#define PWM_FPE_FPE3(y) (1 << ((y)+24) /* Bits 24-31: Fault Protection Enable Fault=y chan=3 */ - -/* PWM Event Line 1/2 Register */ - -#define PWM_ELMR_CSEL(n) (1 << (n)) -#define PWM_ELMR_CSEL0 (1 << 0) /* Bit 0: Comparison 0 Selection */ -#define PWM_ELMR_CSEL1 (1 << 1) /* Bit 1: Comparison 1 Selection */ -#define PWM_ELMR_CSEL2 (1 << 2) /* Bit 2: Comparison 2 Selection */ -#define PWM_ELMR_CSEL3 (1 << 3) /* Bit 3: Comparison 3 Selection */ -#define PWM_ELMR_CSEL4 (1 << 4) /* Bit 4: Comparison 4 Selection */ -#define PWM_ELMR_CSEL5 (1 << 5) /* Bit 5: Comparison 5 Selection */ -#define PWM_ELMR_CSEL6 (1 << 6) /* Bit 6: Comparison 6 Selection */ -#define PWM_ELMR_CSEL7 (1 << 7) /* Bit 7: Comparison 7 Selection */ - -/* PWM Write Protect Control Register */ - -#define PWM_WPCR_WPCMD_SHIFT (0) /* Bits 0-1: Write Protect Command */ -#define PWM_WPCR_WPCMD_MASK (3 << PWM_WPCR_WPCMD_SHIFT) -#define PWM_WPCR_WPRG(n) (1 << ((n)+2)) -#define PWM_WPCR_WPRG0 (1 << 2) /* Bit 2: Write Protect Register Group 0 */ -#define PWM_WPCR_WPRG1 (1 << 3) /* Bit 3: Write Protect Register Group 1 */ -#define PWM_WPCR_WPRG2 (1 << 4) /* Bit 4: Write Protect Register Group 2 */ -#define PWM_WPCR_WPRG3 (1 << 5) /* Bit 5: Write Protect Register Group 3 */ -#define PWM_WPCR_WPRG4 (1 << 6) /* Bit 6: Write Protect Register Group 4 */ -#define PWM_WPCR_WPRG5 (1 << 7) /* Bit 7: Write Protect Register Group 5 */ -#define PWM_WPCR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect Key */ -#define PWM_WPCR_WPKEY_MASK (0x00ffffff << PWM_WPCR_WPKEY_SHIFT) - -/* PWM Write Protect Status Register */ - -#define PWM_WPSR_WPSWS(n) (1 << (n)) -#define PWM_WPSR_WPSWS0 (1 << 0) /* Bit 0: Write Protect SW Status */ -#define PWM_WPSR_WPSWS1 (1 << 1) /* Bit 1: Write Protect SW Status */ -#define PWM_WPSR_WPSWS2 (1 << 2) /* Bit 2: Write Protect SW Status */ -#define PWM_WPSR_WPSWS3 (1 << 3) /* Bit 3: Write Protect SW Status */ -#define PWM_WPSR_WPSWS4 (1 << 4) /* Bit 4: Write Protect SW Status */ -#define PWM_WPSR_WPSWS5 (1 << 5) /* Bit 5: Write Protect SW Status */ -#define PWM_WPSR_WPVS (1 << 7) /* Bit 7: Write Protect Violation Status */ -#define PWM_WPSR_WPHWS(n) (1 << ((n)+8)) -#define PWM_WPSR_WPHWS0 (1 << 8) /* Bit 8: Write Protect HW Status */ -#define PWM_WPSR_WPHWS1 (1 << 9) /* Bit 9: Write Protect HW Status */ -#define PWM_WPSR_WPHWS2 (1 << 10) /* Bit 10: Write Protect HW Status */ -#define PWM_WPSR_WPHWS3 (1 << 11) /* Bit 11: Write Protect HW Status */ -#define PWM_WPSR_WPHWS4 (1 << 12) /* Bit 12: Write Protect HW Status */ -#define PWM_WPSR_WPHWS5 (1 << 13) /* Bit 13: Write Protect HW Status */ -#define PWM_WPSR_WPVSRC_SHIFT (16) /* Bits 16-31: Write Protect Violation Source */ -#define PWM_WPSR_WPVSRC_MASK (0xffff << PWM_WPSR_WPVSRC_SHIFT) - -/* PWM Comparison x Value Register and PWM Comparison x Value Update Register */ - -#define PWMCMP_CV_SHIFT (0) /* Bits 0-23: Comparison x Value */ -#define PWMCMP_CV_MASK (0x00ffffff << PWMCMP_CV_SHIFT) -#define PWMCMP_CVM (1 << 24) /* Bit 24: Comparison x Value Mode */ - -/* PWM Comparison x Mode Register and PWM Comparison x Mode Update Register */ - -#define PWMCMP_CEN (1 << 0) /* Bit 0: Comparison x Enable */ -#define PWMCMP_CTR_SHIFT (4) /* Bits 4-7: Comparison x Trigger */ -#define PWMCMP_CTR_MASK (15 << PWMCMP_CTR_SHIFT) -#define PWMCMP_CPR_SHIFT (8) /* Bits 8-11: Comparison x Period */ -#define PWMCMP_CPR_MASK (15 << PWMCMP_CPR_SHIFT) -#define PWMCMP_M_CPRCNT_SHIFT (12) /* Bits 12-15: Comparison x Period Count (M only) */ -#define PWMCMP_M_CPRCNT_MASK (15 << PWMCMP_M_CPRCNT_SHIFT) -#define PWMCMP_CUPR_SHIFT (16) /* Bits 16-19: Comparison x Update Period */ -#define PWMCMP_CUPR_MASK (15 << PWMCMP_CUPR_SHIFT) -#define PWMCMP_M_CUPRCNT_SHIFT (20) /* Bits 20-23: Comparison x Update Period Counter (M only) */ -#define PWMCMP_M_CUPRCNT_MASK (15 << PWMCMP_M_CUPRCNT_SHIFT) - -/* PWM Channel Mode Register */ - -#define PWMCH_MR_CPRE_SHIFT (0) /* Bits 0-3: Channel Pre-scaler */ -#define PWMCH_MR_CPRE_MASK (15 << PWMCH_MR_CPRE_SHIFT) -# define PWMCH_MR_CPRE_MCK (0 << PWMCH_MR_CPRE_SHIFT) /* MCK */ -# define PWMCH_MR_CPRE_MCKDIV2 (1 << PWMCH_MR_CPRE_SHIFT) /* MCK/2 */ -# define PWMCH_MR_CPRE_MCKDIV4 (2 << PWMCH_MR_CPRE_SHIFT) /* MCK/4 */ -# define PWMCH_MR_CPRE_MCKDIV8 (3 << PWMCH_MR_CPRE_SHIFT) /* MCK/8 */ -# define PWMCH_MR_CPRE_MCKDIV16 (4 << PWMCH_MR_CPRE_SHIFT) /* MCK/16 */ -# define PWMCH_MR_CPRE_MCKDIV32 (5 << PWMCH_MR_CPRE_SHIFT) /* MCK/32 */ -# define PWMCH_MR_CPRE_MCKDIV64 (6 << PWMCH_MR_CPRE_SHIFT) /* MCK/64 */ -# define PWMCH_MR_CPRE_MCKDIV128 (7 << PWMCH_MR_CPRE_SHIFT) /* MCK/128 */ -# define PWMCH_MR_CPRE_MCKDIV256 (8 << PWMCH_MR_CPRE_SHIFT) /* MCK/256 */ -# define PWMCH_MR_CPRE_MCKDIV512 (9 << PWMCH_MR_CPRE_SHIFT) /* MCK/512 */ -# define PWMCH_MR_CPRE_MCKDIV1024 (10 << PWMCH_MR_CPRE_SHIFT) /* MCK/1024 */ -# define PWMCH_MR_CPRE_CLKA (11 << PWMCH_MR_CPRE_SHIFT) /*CLKA */ -# define PWMCH_MR_CPRE_CLKB (12 << PWMCH_MR_CPRE_SHIFT) /* CLKB */ -#define PWMCH_MR_CALG (1 << 8) /* Bit 8: Channel Alignment */ -#define PWMCH_MR_CPOL (1 << 9) /* Bit 9: Channel Polarity */ -#define PWMCH_MR_CES (1 << 10) /* Bit 10: Counter Event Selection */ -#define PWMCH_MR_DTE (1 << 16) /* Bit 16: Dead-Time Generator Enable */ -#define PWMCH_MR_DTHI (1 << 17) /* Bit 17: Dead-Time PWMHx Output Inverted */ -#define PWMCH_MR_DTLI (1 << 18) /* Bit 18: Dead-Time PWMLx Output Inverted */ - -/* PWM Channel Duty Cycle Register and PWM Channel Duty Cycle Update Register common bit-field definitions */ - -#define PWMCH_DTY_SHIFT (0) /* Bits 0-23: Channel Duty-Cycle */ -#define PWMCH_DTY_MASK (0x00ffffff << PWMCH_DTY_SHIFT) - -/* PWM Channel Period Register and PWM Channel Period Update Register common bit-field definitions */ - -#define PWMCH_PRD_SHIFT (0) /* Bits 0-23: Channel Period */ -#define PWMCH_PRD_MASK (0x00ffffff << PWMCH_PRD_SHIFT) - -/* PWM Channel Counter Register */ - -#define PWMCH_CCNT_SHIFT (0) /* Bits 0-23: Channel Counter Register */ -#define PWMCH_CCNT_MASK (0x00ffffff << PWMCH_CCNT_SHIFT) - -/* PWM Channel Dead Time Register and PWM Channel Dead Time Update Register common bit-field definitions */ - -#define PWMCH_DTH_SHIFT (0) /* Bits 0-15: Dead-Time Value for PWMHx Output */ -#define PWMCH_DTH_MASK (0xffff << PWMCH_DTH_SHIFT) -#define PWMCH_DTL_SHIFT (16) /* Bits 16-31: Dead-Time Value for PWMLx Output */ -#define PWMCH_DTL_MASK (0xffff << PWMCH_DTL_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_pwm.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* PWM register offsets *****************************************************************/ + +#define SAM3U_PWM_CLK_OFFSET 0x000 /* PWM Clock Register */ +#define SAM3U_PWM_ENA_OFFSET 0x004 /* PWM Enable Register */ +#define SAM3U_PWM_DIS_OFFSET 0x008 /* PWM Disable Register */ +#define SAM3U_PWM_SR_OFFSET 0x00c /* PWM Status Register */ +#define SAM3U_PWM_IER1_OFFSET 0x010 /* PWM Interrupt Enable Register 1 */ +#define SAM3U_PWM_IDR1_OFFSET 0x014 /* PWM Interrupt Disable Register 1 */ +#define SAM3U_PWM_IMR1_OFFSET 0x018 /* PWM Interrupt Mask Register 1 */ +#define SAM3U_PWM_ISR1_OFFSET 0x01c /* PWM Interrupt Status Register 1 */ +#define SAM3U_PWM_SCM_OFFSET 0x020 /* PWM Sync Channels Mode Register */ + /* 0x024: Reserved */ +#define SAM3U_PWM_SCUC_OFFSET 0x028 /* PWM Sync Channels Update Control Register */ +#define SAM3U_PWM_SCUP_OFFSET 0x02c /* PWM Sync Channels Update Period Register */ +#define SAM3U_PWM_SCUPUPD_OFFSET 0x030 /* PWM Sync Channels Update Period Update Register */ +#define SAM3U_PWM_IER2_OFFSET 0x034 /* PWM Interrupt Enable Register 2 */ +#define SAM3U_PWM_IDR2_OFFSET 0x038 /* PWM Interrupt Disable Register 2 */ +#define SAM3U_PWM_IMR2_OFFSET 0x03c /* PWM Interrupt Mask Register 2 */ +#define SAM3U_PWM_ISR2_OFFSET 0x040 /* PWM Interrupt Status Register 2 */ +#define SAM3U_PWM_OOV_OFFSET 0x044 /* PWM Output Override Value Register */ +#define SAM3U_PWM_OS_OFFSET 0x048 /* PWM Output Selection Register */ +#define SAM3U_PWM_OSS_OFFSET 0x04c /* PWM Output Selection Set Register */ +#define SAM3U_PWM_OSC_OFFSET 0x050 /* PWM Output Selection Clear Register */ +#define SAM3U_PWM_OSSUPD_OFFSET 0x054 /* PWM Output Selection Set Update Register */ +#define SAM3U_PWM_OSCUPD_OFFSET 0x058 /* PWM Output Selection Clear Update Register */ +#define SAM3U_PWM_FMR_OFFSET 0x05c /* PWM Fault Mode Register */ +#define SAM3U_PWM_FSR_OFFSET 0x060 /* PWM Fault Status Register */ +#define SAM3U_PWM_FCR_OFFSET 0x064 /* PWM Fault Clear Register */ +#define SAM3U_PWM_FPV_OFFSET 0x068 /* PWM Fault Protection Value Register */ +#define SAM3U_PWM_FPE_OFFSET 0x06c /* PWM Fault Protection Enable Register */ + /* 0x070-0x078: Reserved */ +#define SAM3U_PWM_EL0MR_OFFSET 0x07c /* PWM Event Line 0 Mode Register */ +#define SAM3U_PWM_EL1MR_OFFSET 0x080 /* PWM Event Line 1 Mode Register */ + /* 0x084-0x0ac: Reserved */ + /* 0x0b4-0x0e0: Reserved */ +#define SAM3U_PWM_WPCR_OFFSET 0x0e4 /* PWM Write Protect Control Register */ +#define SAM3U_PWM_WPSR_OFFSET 0x0e8 /* PWM Write Protect Status Register */ + /* 0x100-0x128: Reserved for PDC registers */ + /* 0x12c: Reserved */ +/* PWM Comparison Registers */ + +#define SAM3U_PWMCMP_OFFSET(n) (0x130+((n)<<4)) +#define SAM3U_PWMCMP_V_OFFSET 0x00 /* PWM Comparison Value Register */ +#define SAM3U_PWMCMP_VUPD_OFFSET 0x04 /* PWM Comparison Value Update Register */ +#define SAM3U_PWMCMP_M_OFFSET 0x08 /* PWM Comparison Mode Register */ +#define SAM3U_PWMCMP_MUPD_OFFSET 0x0c /* PWM Comparison Mode Update Register */ + +#define SAM3U_PWMCMP0_V_OFFSET 0x130 /* PWM Comparison 0 Value Register */ +#define SAM3U_PWMCMP0_VUPD_OFFSET 0x134 /* PWM Comparison 0 Value Update Register */ +#define SAM3U_PWMCMP0_M_OFFSET 0x138 /* PWM Comparison 0 Mode Register */ +#define SAM3U_PWMCMP0_MUPD_OFFSET 0x13c /* PWM Comparison 0 Mode Update Register */ + +#define SAM3U_PWMCMP1_V_OFFSET 0x140 /* PWM Comparison 1 Value Register */ +#define SAM3U_PWMCMP1_VUPD_OFFSET 0x144 /* PWM Comparison 1 Value Update Register */ +#define SAM3U_PWMCMP1_M_OFFSET 0x148 /* PWM Comparison 1 Mode Register */ +#define SAM3U_PWMCMP1_MUPD_OFFSET 0x14c /* PWM Comparison 1 Mode Update Register */ + +#define SAM3U_PWMCMP2_V_OFFSET 0x150 /* PWM Comparison 2 Value Register */ +#define SAM3U_PWMCMP2_VUPD_OFFSET 0x154 /* PWM Comparison 2 Value Update Register */ +#define SAM3U_PWMCMP2_M_OFFSET 0x158 /* PWM Comparison 2 Mode Register */ +#define SAM3U_PWMCMP2_MUPD_OFFSET 0x15c /* PWM Comparison 2 Mode Update Register */ + +#define SAM3U_PWMCMP3_V_OFFSET 0x160 /* PWM Comparison 3 Value Register */ +#define SAM3U_PWMCMP3_VUPD_OFFSET 0x164 /* PWM Comparison 3 Value Update Register */ +#define SAM3U_PWMCMP3_M_OFFSET 0x168 /* PWM Comparison 3 Mode Register */ +#define SAM3U_PWMCMP3_MUPD_OFFSET 0x16c /* PWM Comparison 3 Mode Update Register */ + +#define SAM3U_PWMCMP4_V_OFFSET 0x170 /* PWM Comparison 4 Value Register */ +#define SAM3U_PWMCMP4_VUPD_OFFSET 0x174 /* PWM Comparison 4 Value Update Register */ +#define SAM3U_PWMCMP4_M_OFFSET 0x178 /* PWM Comparison 4 Mode Register */ +#define SAM3U_PWMCMP4_MUPD_OFFSET 0x17c /* PWM Comparison 4 Mode Update Register */ + +#define SAM3U_PWMCMP5_V_OFFSET 0x180 /* PWM Comparison 5 Value Register */ +#define SAM3U_PWMCMP5_VUPD_OFFSET 0x184 /* PWM Comparison 5 Value Update Register */ +#define SAM3U_PWMCMP5_M_OFFSET 0x188 /* PWM Comparison 5 Mode Register */ +#define SAM3U_PWMCMP5_MUPD_OFFSET 0x18c /* PWM Comparison 5 Mode Update Register */ + +#define SAM3U_PWMCMP6_V_OFFSET 0x190 /* PWM Comparison 6 Value Register */ +#define SAM3U_PWMCMP6_VUPD_OFFSET 0x194 /* PWM Comparison 6 Value Update Register */ +#define SAM3U_PWMCMP6_M_OFFSET 0x198 /* PWM Comparison 6 Mode Register */ +#define SAM3U_PWMCMP6_MUPD_OFFSET 0x19c /* PWM Comparison 6 Mode Update Register */ + +#define SAM3U_PWMCMP7_V_OFFSET 0x1a0 /* PWM Comparison 7 Value Register */ +#define SAM3U_PWMCMP7_VUPD_OFFSET 0x1a4 /* PWM Comparison 7 Value Update Register */ +#define SAM3U_PWMCMP7_M_OFFSET 0x1a8 /* PWM Comparison 7 Mode Register */ +#define SAM3U_PWMCMP7_MUPD_OFFSET 0x1ac /* PWM Comparison 7 Mode Update Register */ + /* 0x1b0-0x1fc: Reserved */ +/* PWM Channel Registers */ + +#define SAM3U_PWMCH_OFFSET(n) (0x200+((n)<< 5)) +#define SAM3U_PWMCH_MR_OFFSET 0x00 /* PWM Channel Mode Register */ +#define SAM3U_PWMCH_DTY_OFFSET 0x04 /* PWM Channel Duty Cycle Register */ +#define SAM3U_PWMCH_DTYUPD_OFFSET 0x08 /* PWM Channel Duty Cycle Update Register */ +#define SAM3U_PWMCH_PRD_OFFSET 0x0c /* PWM Channel Period Register */ +#define SAM3U_PWMCH_PRDUPD_OFFSET 0x10 /* PWM Channel Period Update Register */ +#define SAM3U_PWMCH_CCNT_OFFSET 0x14 /* PWM Channel Counter Register */ +#define SAM3U_PWMCH_DT_OFFSET 0x18 /* PWM Channel Dead Time Register */ +#define SAM3U_PWMCH_DTUPD_OFFSET 0x1c /* PWM Channel Dead Time Update Register */ + +#define SAM3U_PWMCH0_MR_OFFSET 0x200 /* PWM Channel 0 Mode Register */ +#define SAM3U_PWMCH0_DTY_OFFSET 0x204 /* PWM Channel 0 Duty Cycle Register */ +#define SAM3U_PWMCH0_DTYUPD_OFFSET 0x208 /* PWM Channel 0 Duty Cycle Update Register */ +#define SAM3U_PWMCH0_PRD_OFFSET 0x20c /* PWM Channel 0 Period Register */ +#define SAM3U_PWMCH0_PRDUPD_OFFSET 0x210 /* PWM Channel 0 Period Update Register */ +#define SAM3U_PWMCH0_CCNT_OFFSET 0x214 /* PWM Channel 0 Counter Register */ +#define SAM3U_PWMCH0_DT_OFFSET 0x218 /* PWM Channel 0 Dead Time Register */ +#define SAM3U_PWMCH0_DTUPD_OFFSET 0x21c /* PWM Channel 0 Dead Time Update Register */ + +#define SAM3U_PWMCH1_MR_OFFSET 0x220 /* PWM Channel 1 Mode Register */ +#define SAM3U_PWMCH1_DTY_OFFSET 0x224 /* PWM Channel 1 Duty Cycle Register */ +#define SAM3U_PWMCH1_DTYUPD_OFFSET 0x228 /* PWM Channel 1 Duty Cycle Update Register */ +#define SAM3U_PWMCH1_PRD_OFFSET 0x22c /* PWM Channel 1 Period Register */ +#define SAM3U_PWMCH1_PRDUPD_OFFSET 0x230 /* PWM Channel 1 Period Update Register */ +#define SAM3U_PWMCH1_CCNT_OFFSET 0x234 /* PWM Channel 1 Counter Register */ +#define SAM3U_PWMCH1_DT_OFFSET 0x238 /* PWM Channel 1 Dead Time Register */ +#define SAM3U_PWMCH1_DTUPD_OFFSET 0x23c /* PWM Channel 1 Dead Time Update Register */ + +#define SAM3U_PWMCH2_MR_OFFSET 0x240 /* PWM Channel 2 Mode Register */ +#define SAM3U_PWMCH2_DTY_OFFSET 0x244 /* PWM Channel 2 Duty Cycle Register */ +#define SAM3U_PWMCH2_DTYUPD_OFFSET 0x248 /* PWM Channel 2 Duty Cycle Update Register */ +#define SAM3U_PWMCH2_PRD_OFFSET 0x24c /* PWM Channel 2 Period Register */ +#define SAM3U_PWMCH2_PRDUPD_OFFSET 0x250 /* PWM Channel 2 Period Update Register */ +#define SAM3U_PWMCH2_CCNT_OFFSET 0x254 /* PWM Channel 2 Counter Register */ +#define SAM3U_PWMCH2_DT_OFFSET 0x258 /* PWM Channel 2 Dead Time Register */ +#define SAM3U_PWMCH2_DTUPD_OFFSET 0x25c /* PWM Channel 2 Dead Time Update Register */ + +#define SAM3U_PWMCH3_MR_OFFSET 0x260 /* PWM Channel 3 Mode Register */ +#define SAM3U_PWMCH3_DTY_OFFSET 0x264 /* PWM Channel 3 Duty Cycle Register */ +#define SAM3U_PWMCH3_DTYUPD_OFFSET 0x268 /* PWM Channel 3 Duty Cycle Update Register */ +#define SAM3U_PWMCH3_PRD_OFFSET 0x26c /* PWM Channel 3 Period Register */ +#define SAM3U_PWMCH3_PRDUPD_OFFSET 0x270 /* PWM Channel 3 Period Update Register */ +#define SAM3U_PWMCH3_CCNT_OFFSET 0x274 /* PWM Channel 3 Counter Register */ +#define SAM3U_PWMCH3_DT_OFFSET 0x278 /* PWM Channel 3 Dead Time Register */ +#define SAM3U_PWMCH3_DTUPD_OFFSET 0x27c /* PWM Channel 3 Dead Time Update Register */ + +/* PWM register adresses ****************************************************************/ + +#define SAM3U_PWM_CLK (SAM3U_PWM_BASE+SAM3U_PWM_CLK_OFFSET) +#define SAM3U_PWM_ENA (SAM3U_PWM_BASE+SAM3U_PWM_ENA_OFFSET) +#define SAM3U_PWM_DIS (SAM3U_PWM_BASE+SAM3U_PWM_DIS_OFFSET) +#define SAM3U_PWM_SR (SAM3U_PWM_BASE+SAM3U_PWM_SR_OFFSET) +#define SAM3U_PWM_IER1 (SAM3U_PWM_BASE+SAM3U_PWM_IER1_OFFSET) +#define SAM3U_PWM_IDR1 (SAM3U_PWM_BASE+SAM3U_PWM_IDR1_OFFSET) +#define SAM3U_PWM_IMR1 (SAM3U_PWM_BASE+SAM3U_PWM_IMR1_OFFSET) +#define SAM3U_PWM_ISR1 (SAM3U_PWM_BASE+SAM3U_PWM_ISR1_OFFSET) +#define SAM3U_PWM_SCM (SAM3U_PWM_BASE+SAM3U_PWM_SCM_OFFSET) +#define SAM3U_PWM_SCUC (SAM3U_PWM_BASE+SAM3U_PWM_SCUC_OFFSET) +#define SAM3U_PWM_SCUP (SAM3U_PWM_BASE+SAM3U_PWM_SCUP_OFFSET) +#define SAM3U_PWM_SCUPUPD (SAM3U_PWM_BASE+SAM3U_PWM_SCUPUPD_OFFSET) +#define SAM3U_PWM_IER2 (SAM3U_PWM_BASE+SAM3U_PWM_IER2_OFFSET) +#define SAM3U_PWM_IDR2 (SAM3U_PWM_BASE+SAM3U_PWM_IDR2_OFFSET) +#define SAM3U_PWM_IMR2 (SAM3U_PWM_BASE+SAM3U_PWM_IMR2_OFFSET) +#define SAM3U_PWM_ISR2 (SAM3U_PWM_BASE+SAM3U_PWM_ISR2_OFFSET) +#define SAM3U_PWM_OOV (SAM3U_PWM_BASE+SAM3U_PWM_OOV_OFFSET) +#define SAM3U_PWM_OS (SAM3U_PWM_BASE+SAM3U_PWM_OS_OFFSET) +#define SAM3U_PWM_OSS (SAM3U_PWM_BASE+SAM3U_PWM_OSS_OFFSET) +#define SAM3U_PWM_OSC (SAM3U_PWM_BASE+SAM3U_PWM_OSC_OFFSET) +#define SAM3U_PWM_OSSUPD (SAM3U_PWM_BASE+SAM3U_PWM_OSSUPD_OFFSET) +#define SAM3U_PWM_OSCUPD (SAM3U_PWM_BASE+SAM3U_PWM_OSCUPD_OFFSET) +#define SAM3U_PWM_FMR (SAM3U_PWM_BASE+SAM3U_PWM_FMR_OFFSET) +#define SAM3U_PWM_FSR (SAM3U_PWM_BASE+SAM3U_PWM_FSR_OFFSET) +#define SAM3U_PWM_FCR (SAM3U_PWM_BASE+SAM3U_PWM_FCR_OFFSET) +#define SAM3U_PWM_FPV (SAM3U_PWM_BASE+SAM3U_PWM_FPV_OFFSET) +#define SAM3U_PWM_FPE (SAM3U_PWM_BASE+SAM3U_PWM_FPE_OFFSET) +#define SAM3U_PWM_EL0MR (SAM3U_PWM_BASE+SAM3U_PWM_EL0MR_OFFSET) +#define SAM3U_PWM_EL1MR (SAM3U_PWM_BASE+SAM3U_PWM_EL1MR_OFFSET) +#define SAM3U_PWM_WPCR (SAM3U_PWM_BASE+SAM3U_PWM_WPCR_OFFSET) +#define SAM3U_PWM_WPSR (SAM3U_PWM_BASE+SAM3U_PWM_WPSR_OFFSET) + +/* PWM Comparison Registers */ + +#define SAM3U_PWCMP_BASE(n) (SAM3U_PWM_BASE+SAM3U_PWCMP_OFFSET(n)) +#define SAM3U_PWMCMP0_BASE (SAM3U_PWM_BASE+0x0130) +#define SAM3U_PWMCMP1_BASE (SAM3U_PWM_BASE+0x0140) +#define SAM3U_PWMCMP2_BASE (SAM3U_PWM_BASE+0x0150) +#define SAM3U_PWMCMP3_BASE (SAM3U_PWM_BASE+0x0160) +#define SAM3U_PWMCMP4_BASE (SAM3U_PWM_BASE+0x0170) +#define SAM3U_PWMCMP5_BASE (SAM3U_PWM_BASE+0x0180) +#define SAM3U_PWMCMP6_BASE (SAM3U_PWM_BASE+0x0190) +#define SAM3U_PWMCMP7_BASE (SAM3U_PWM_BASE+0x01a0) + +#define SAM3U_PWMCMP0_V (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP0_VUPD (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP0_M (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP0_MUPD (SAM3U_PWMCMP0_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP1_V (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP1_VUPD (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP1_M (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP1_MUPD (SAM3U_PWMCMP1_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP2_V (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP2_VUPD (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP2_M (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP2_MUPD (SAM3U_PWMCMP2_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP3_V (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP3_VUPD (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP3_M (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP3_MUPD (SAM3U_PWMCMP3_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP4_V (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP4_VUPD (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP4_M (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP4_MUPD (SAM3U_PWMCMP4_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP5_V (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP5_VUPD (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP5_M (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP5_MUPD (SAM3U_PWMCMP5_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP6_V (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP6_VUPD (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP6_M (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP6_MUPD (SAM3U_PWMCMP6_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +#define SAM3U_PWMCMP7_V (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_V_OFFSET) +#define SAM3U_PWMCMP7_VUPD (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_VUPD_OFFSET) +#define SAM3U_PWMCMP7_M (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_M_OFFSET) +#define SAM3U_PWMCMP7_MUPD (SAM3U_PWMCMP7_BASE+SAM3U_PWMCMP_MUPD_OFFSET) + +/* PWM Channel Registers */ + +#define SAM3U_PWCH_BASE(n) (SAM3U_PWM_BASE+SAM3U_PWCH_OFFSET(n)) +#define SAM3U_PWMCH0_BASE (SAM3U_PWM_BASE+0x0200) +#define SAM3U_PWMCH1_BASE (SAM3U_PWM_BASE+0x0220) +#define SAM3U_PWMCH2_BASE (SAM3U_PWM_BASE+0x0240) +#define SAM3U_PWMCH3_BASE (SAM3U_PWM_BASE+0x0260) + +#define SAM3U_PWMCH0_MR (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_MR_OFFSET) +#define SAM3U_PWMCH0_DTY (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTY_OFFSET) +#define SAM3U_PWMCH0_DTYUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) +#define SAM3U_PWMCH0_PRD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_PRD_OFFSET) +#define SAM3U_PWMCH0_PRDUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) +#define SAM3U_PWMCH0_CCNT (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_CCNT_OFFSET) +#define SAM3U_PWMCH0_DT (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DT_OFFSET) +#define SAM3U_PWMCH0_DTUPD (SAM3U_PWMCH0_BASE+SAM3U_PWMCH_DTUPD_OFFSET) + +#define SAM3U_PWMCH1_MR (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_MR_OFFSET) +#define SAM3U_PWMCH1_DTY (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTY_OFFSET) +#define SAM3U_PWMCH1_DTYUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) +#define SAM3U_PWMCH1_PRD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_PRD_OFFSET) +#define SAM3U_PWMCH1_PRDUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) +#define SAM3U_PWMCH1_CCNT (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_CCNT_OFFSET) +#define SAM3U_PWMCH1_DT (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DT_OFFSET) +#define SAM3U_PWMCH1_DTUPD (SAM3U_PWMCH1_BASE+SAM3U_PWMCH_DTUPD_OFFSET) + +#define SAM3U_PWMCH2_MR (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_MR_OFFSET) +#define SAM3U_PWMCH2_DTY (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTY_OFFSET) +#define SAM3U_PWMCH2_DTYUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) +#define SAM3U_PWMCH2_PRD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_PRD_OFFSET) +#define SAM3U_PWMCH2_PRDUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) +#define SAM3U_PWMCH2_CCNT (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_CCNT_OFFSET) +#define SAM3U_PWMCH2_DT (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DT_OFFSET) +#define SAM3U_PWMCH2_DTUPD (SAM3U_PWMCH2_BASE+SAM3U_PWMCH_DTUPD_OFFSET) + +#define SAM3U_PWMCH3_MR (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_MR_OFFSET) +#define SAM3U_PWMCH3_DTY (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTY_OFFSET) +#define SAM3U_PWMCH3_DTYUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTYUPD_OFFSET) +#define SAM3U_PWMCH3_PRD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_PRD_OFFSET) +#define SAM3U_PWMCH3_PRDUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_PRDUPD_OFFSET) +#define SAM3U_PWMCH3_CCNT (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_CCNT_OFFSET) +#define SAM3U_PWMCH3_DT (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DT_OFFSET) +#define SAM3U_PWMCH3_DTUPD (SAM3U_PWMCH3_BASE+SAM3U_PWMCH_DTUPD_OFFSET) + +/* PWM register bit definitions *********************************************************/ + +/* PWM Clock Register */ + +#define PWM_CLK_DIVA_SHIFT (0) /* Bits 0-7: CLKA Divide Factor */ +#define PWM_CLK_DIVA_MASK (0xff << PWM_CLK_DIVA_SHIFT) +#define PWM_CLK_PREA_SHIFT (8) /* Bits 8-11: CLKA Source Clock Selection */ +#define PWM_CLK_PREA_MASK (15 << PWM_CLK_PREA_SHIFT) +# define PWM_CLK_PREA_MCK (0 << PWM_CLK_PREA_SHIFT) /* MCK */ +# define PWM_CLK_PREA_MCKDIV2 (1 << PWM_CLK_PREA_SHIFT) /* MCK/2 */ +# define PWM_CLK_PREA_MCKDIV4 (2 << PWM_CLK_PREA_SHIFT) /* MCK/4 */ +# define PWM_CLK_PREA_MCKDIV8 (3 << PWM_CLK_PREA_SHIFT) /* MCK/8 */ +# define PWM_CLK_PREA_MCKDIV16 (4 << PWM_CLK_PREA_SHIFT) /* MCK/16 */ +# define PWM_CLK_PREA_MCKDIV32 (5 << PWM_CLK_PREA_SHIFT) /* MCK/32 */ +# define PWM_CLK_PREA_MCKDIV64 (6 << PWM_CLK_PREA_SHIFT) /* MCK/64 */ +# define PWM_CLK_PREA_MCKDIV128 (7 << PWM_CLK_PREA_SHIFT) /* MCK/128 */ +# define PWM_CLK_PREA_MCKDIV256 (8 << PWM_CLK_PREA_SHIFT) /* MCK/256 */ +# define PWM_CLK_PREA_MCKDIV512 (9 << PWM_CLK_PREA_SHIFT) /* MCK/512 */ +# define PWM_CLK_PREA_MCKDIV1024 (10 << PWM_CLK_PREA_SHIFT) /* MCK/1024 */ +#define PWM_CLK_DIVB_SHIFT (16) /* Bits 16-23: CLKB Divide Factor */ +#define PWM_CLK_DIVB_MASK (0xff << PWM_CLK_DIVB_SHIFT) +#define PWM_CLK_PREB_SHIFT (24) /* Bit 24-27: CLKB Source Clock Selection */ +#define PWM_CLK_PREB_MASK (15 << PWM_CLK_PREB_SHIFT) +# define PWM_CLK_PREB_MCK (0 << PWM_CLK_PREB_SHIFT) /* MCK */ +# define PWM_CLK_PREB_MCKDIV2 (1 << PWM_CLK_PREB_SHIFT) /* MCK/2 */ +# define PWM_CLK_PREB_MCKDIV4 (2 << PWM_CLK_PREB_SHIFT) /* MCK/4 */ +# define PWM_CLK_PREB_MCKDIV8 (3 << PWM_CLK_PREB_SHIFT) /* MCK/8 */ +# define PWM_CLK_PREB_MCKDIV16 (4 << PWM_CLK_PREB_SHIFT) /* MCK/16 */ +# define PWM_CLK_PREB_MCKDIV32 (5 << PWM_CLK_PREB_SHIFT) /* MCK/32 */ +# define PWM_CLK_PREB_MCKDIV64 (6 << PWM_CLK_PREB_SHIFT) /* MCK/64 */ +# define PWM_CLK_PREB_MCKDIV128 (7 << PWM_CLK_PREB_SHIFT) /* MCK/128 */ +# define PWM_CLK_PREB_MCKDIV256 (8 << PWM_CLK_PREB_SHIFT) /* MCK/256 */ +# define PWM_CLK_PREB_MCKDIV512 (9 << PWM_CLK_PREB_SHIFT) /* MCK/512 */ +# define PWM_CLK_PREB_MCKDIV1024 (10 << PWM_CLK_PREB_SHIFT) /* MCK/1024 */ + +/* PWM Enable Register, PWM Disable Register, and PWM Status Register common bit-field definitions */ + +#define SAM3U_ENAB_CHID(n) (1 << ((n)) +#define SAM3U_ENAB_CHID0 (1 << 0) /* Bit 0: Counter Event Channel 0 Interrupt */ +#define SAM3U_ENAB_CHID1 (1 << 1) /* Bit 1: Counter Event Channel 1 Interrupt */ +#define SAM3U_ENAB_CHID2 (1 << 2) /* Bit 2: Counter Event Channel 2 Interrupt */ +#define SAM3U_ENAB_CHID3 (1 << 3) /* Bit 3: Counter Event Channel 3 Interrupt */ + +/* PWM Interrupt Enable Register 1, PWM Interrupt Disable Register 1, PWM Interrupt + * Mask Register 1, and PWM Interrupt Status Register 1 common bit definitions + */ + +#define SAM3U_INT_CHID(n) (1 << (n)) +#define SAM3U_INT_CHID0 (1 << 0) /* Bit 0: Counter Event Channel 0 Interrupt */ +#define SAM3U_INT_CHID1 (1 << 1) /* Bit 1: Counter Event Channel 1 Interrupt */ +#define SAM3U_INT_CHID2 (1 << 2) /* Bit 2: Counter Event Channel 2 Interrupt */ +#define SAM3U_INT_CHID3 (1 << 3) /* Bit 3: Counter Event Channel 3 Interrupt */ +#define SAM3U_INT_FCHID(n) (1 << ((n)+16)) +#define SAM3U_INT_FCHID0 (1 << 16) /* Bit 16: Fault Protection Trigger Channel 0 Interrupt */ +#define SAM3U_INT_FCHID1 (1 << 17) /* Bit 17: Fault Protection Trigger Channel 1 Interrupt */ +#define SAM3U_INT_FCHID2 (1 << 18) /* Bit 18: Fault Protection Trigger Channel 2 Interrupt */ +#define SAM3U_INT_FCHID3 (1 << 19) /* Bit 19: Fault Protection Trigger Channel 3 Interrupt */ + +/* PWM Sync Channels Mode Register */ + +#define PWM_SCM_SYNC(n) (1 << (n)) +#define PWM_SCM_SYNC0 (1 << 0) /* Bit 0: Synchronous Channel 0 */ +#define PWM_SCM_SYNC1 (1 << 1) /* Bit 1: Synchronous Channel 1 */ +#define PWM_SCM_SYNC2 (1 << 2) /* Bit 2: Synchronous Channel 2 */ +#define PWM_SCM_SYNC3 (1 << 3) /* Bit 3: Synchronous Channel 3 */ +#define PWM_SCM_UPDM_SHIFT (16) /* Bits 16-17: Synchronous Channels Update Mode */ +#define PWM_SCM_UPDM_MASK (3 << PWM_SCM_UPDM_SHIFT) +# define PWM_SCM_UPDM_MANMAN (0 << PWM_SCM_UPDM_SHIFT) /* Manual write/manual update */ +# define PWM_SCM_UPDM_MANAUTO (1 << PWM_SCM_UPDM_SHIFT) /* Manual write/automatic update */ +# define PWM_SCM_UPDM_AUTOAUTO (2 << PWM_SCM_UPDM_SHIFT) /* Auto write/automatic update */ +#define PWM_SCM_PTRM (1 << 20) /* Bit 20: PDC Transfer Request Mode */ +#define PWM_SCM_PTRCS_SHIFT (21) /* Bits 21-23: PDC Transfer Request Comparison Selection */ +#define PWM_SCM_PTRCS_MASK (7 << PWM_SCM_PTRCS_SHIFT) + +/* PWM Sync Channels Update Control Register */ + +#define PWM_SCUC_UPDULOCK (1 << 0) /* Bit 0: Synchronous Channels Update Unlock */ + +/* PWM Sync Channels Update Period Register */ + +#define PWM_SCUP_UPR_SHIFT (0) /* Bits 0-3: Update Period */ +#define PWM_SCUP_UPR_MASK (15 << PWM_SCUP_UPR_MASK) +#define PWM_SCUP_UPRCNT_SHIFT (4) /* Bits 4-7: Update Period Counter */ +#define PWM_SCUP_UPRCNT_MASK (15 << PWM_SCUP_UPRCNT_SHIFT) + +/* PWM Sync Channels Update Period Update Register */ + +#define PWM_SCUPUPD_SHIFT (0) /* Bits 0-3: Update Period Update */ +#define PWM_SCUPUPD_MASK (15 << PWM_SCUPUPD_SHIFT) + +/* PWM Interrupt Enable Register 2, PWM Interrupt Disable Register 2, PWM Interrupt Mask Register 2, and PWM Interrupt Status Register 2 common bit-field definitions */ + +#define SAM3U_INT_WRDY (1 << 0) /* Bit 0: Write Ready Update Interrupt */ +#define SAM3U_INT_ENDTX (1 << 1) /* Bit 1: PDC End of TX Buffer Interrupt */ +#define SAM3U_INT_TXBUFE (1 << 2) /* Bit 2: PDC TX Buffer Empty Interrupt */ +#define SAM3U_INT_UNRE (1 << 3) /* Bit 3: Synch Update Underrun Error Interrupt */ +#define SAM3U_INT_CMPM(n) (1 << ((n)+8)) +#define SAM3U_INT_CMPM0 (1 << 8) /* Bit 8: Comparison 0 Match Interrupt */ +#define SAM3U_INT_CMPM1 (1 << 9) /* Bit 9: Comparison 1 Match Interrupt */ +#define SAM3U_INT_CMPM2 (1 << 10) /* Bit 10: Comparison 2 Match Interrupt */ +#define SAM3U_INT_CMPM3 (1 << 11) /* Bit 11: Comparison 3 Match Interrupt */ +#define SAM3U_INT_CMPM4 (1 << 12) /* Bit 12: Comparison 4 Match Interrupt */ +#define SAM3U_INT_CMPM5 (1 << 13) /* Bit 13: Comparison 5 Match Interrupt */ +#define SAM3U_INT_CMPM6 (1 << 14) /* Bit 14: Comparison 6 Match Interrupt */ +#define SAM3U_INT_CMPM7 (1 << 15) /* Bit 15: Comparison 7 Match Interrupt */ +#define SAM3U_INT_CMPU(n) (1 << ((n)+16)) +#define SAM3U_INT_CMPU0 (1 << 16) /* Bit 16: Comparison o Update Interrupt */ +#define SAM3U_INT_CMPU1 (1 << 17) /* Bit 17: Comparison 1 Update Interrupt */ +#define SAM3U_INT_CMPU2 (1 << 18) /* Bit 18: Comparison 2 Update Interrupt */ +#define SAM3U_INT_CMPU3 (1 << 19) /* Bit 19: Comparison 3 Update Interrupt */ +#define SAM3U_INT_CMPU4 (1 << 20) /* Bit 20: Comparison 4 Update Interrupt */ +#define SAM3U_INT_CMPU5 (1 << 21) /* Bit 21: Comparison 5 Update Interrupt */ +#define SAM3U_INT_CMPU6 (1 << 22) /* Bit 22: Comparison 6 Update Interrupt */ +#define SAM3U_INT_CMPU7 (1 << 23) /* Bit 23: Comparison 7 Update Interrupt */ + +/* PWM Output Override Value Register, PWM Output Selection Register, PWM Output + * Selection Set Register, PWM Output Selection Clear Register, PWM Output Selection + * Set Update Register, and PWM Output Selection Clear Update Register common bit-field + * definitions + */ + +#define PWM_OUT_OH(n) (1 << (n)) +#define PWM_OUT_OH0 (1 << 0) /* Bit 0: Value for PWMH output of the channel 0 */ +#define PWM_OUT_OH1 (1 << 1) /* Bit 1: Value for PWMH output of the channel 1 */ +#define PWM_OUT_OH2 (1 << 2) /* Bit 2: Value for PWMH output of the channel 2 */ +#define PWM_OUT_OH3 (1 << 3) /* Bit 3: Value for PWMH output of the channel 3 */ +#define PWM_OUT_OL(n) (1 << ((n)+16)) +#define PWM_OUT_OL0 (1 << 16) /* Bit 16: Value for PWML output of the channel 0 */ +#define PWM_OUT_OL1 (1 << 17) /* Bit 17: Value for PWML output of the channel 1 */ +#define PWM_OUT_OL2 (1 << 18) /* Bit 18: Value for PWML output of the channel 2 */ +#define PWM_OUT_OL3 (1 << 19) /* Bit 19: Value for PWML output of the channel 3 */ + +/* PWM Fault Mode Register */ + +#define PWM_FMR_FPOL(n) (1 << (n)) +#define PWM_FMR_FPOL0 (1 << 0) /* Bit 0: Fault 0 Polarity */ +#define PWM_FMR_FPOL1 (1 << 1) /* Bit 1: Fault 1 Polarity */ +#define PWM_FMR_FPOL2 (1 << 2) /* Bit 2: Fault 2 Polarity */ +#define PWM_FMR_FPOL3 (1 << 3) /* Bit 3: Fault 3 Polarity */ +#define PWM_FMR_FMOD(n) (1 << ((n)+8)) +#define PWM_FMR_FMOD0 (1 << 8) /* Bit 8: Fault 0 Activation Mode */ +#define PWM_FMR_FMOD1 (1 << 9) /* Bit 9: Fault 1 Activation Mode */ +#define PWM_FMR_FMOD2 (1 << 10) /* Bit 10: Fault 2 Activation Mode */ +#define PWM_FMR_FMOD3 (1 << 11) /* Bit 11: Fault 3 Activation Mode */ +#define PWM_FMR_FFIL(n) (1 << ((n)+16)) +#define PWM_FMR_FFIL0 (1 << 16) /* Bit 16: Fault 0 Filter */ +#define PWM_FMR_FFIL1 (1 << 17) /* Bit 17: Fault 1 Filter */ +#define PWM_FMR_FFIL2 (1 << 18) /* Bit 18: Fault 2 Filter */ +#define PWM_FMR_FFIL3 (1 << 19) /* Bit 19: Fault 3 Filter */ + +/* PWM Fault Status Register */ + +#define PWM_FSR_FIV(n) (1 << (n)) +#define PWM_FSR_FIV0 (1 << 0) /* Bit 0: Fault Input 0 Value */ +#define PWM_FSR_FIV1 (1 << 1) /* Bit 1: Fault Input 1 Value */ +#define PWM_FSR_FIV2 (1 << 2) /* Bit 2: Fault Input 2 Value */ +#define PWM_FSR_FIV3 (1 << 3) /* Bit 3: Fault Input 3 Value */ +#define PWM_FSR_FS(n) (1 << ((n)+8)) +#define PWM_FSR_FS0 (1 << 8) /* Bit 8: Fault 0 Status */ +#define PWM_FSR_FS1 (1 << 9) /* Bit 9: Fault 1 Status */ +#define PWM_FSR_FS2 (1 << 10) /* Bit 10: Fault 2 Status */ +#define PWM_FSR_FS3 (1 << 11) /* Bit 11: Fault 3 Status */ + +/* PWM Fault Clear Register */ + +#define PWM_FCR_FCLR(n) (1 << (n)) +#define PWM_FCR_FCLR0 (1 << 0) /* Bit 0: Fault 0 Clear */ +#define PWM_FCR_FCLR1 (1 << 1) /* Bit 1: Fault 1 Clear */ +#define PWM_FCR_FCLR2 (1 << 2) /* Bit 2: Fault 2 Clear */ +#define PWM_FCR_FCLR3 (1 << 3) /* Bit 3: Fault 3 Clear */ + +/* PWM Fault Protection Value Register */ + +#define PWM_FPV_FPVH(n) (1 << (n)) +#define PWM_FPV_FPVH0 (1 << 0) /* Bit 0: Fault Protection Value PWMH output channel 0 */ +#define PWM_FPV_FPVH1 (1 << 1) /* Bit 1: Fault Protection Value PWMH output channel 1 */ +#define PWM_FPV_FPVH2 (1 << 2) /* Bit 2: Fault Protection Value PWMH output channel 2 */ +#define PWM_FPV_FPVH3 (1 << 3) /* Bit 3: Fault Protection Value PWMH output channel 3 */ +#define PWM_FPV_FPVL(n) (1 << ((n)+16)) +#define PWM_FPV_FPVL0 (1 << 16) /* Bit 16: Fault Protection Value PWML output channel 0 */ +#define PWM_FPV_FPVL1 (1 << 17) /* Bit 17: Fault Protection Value PWML output channel 1 */ +#define PWM_FPV_FPVL2 (1 << 18) /* Bit 18: Fault Protection Value PWML output channel 2 */ +#define PWM_FPV_FPVL3 (1 << 19) /* Bit 19: Fault Protection Value PWML output channel 3 */ + +/* PWM Fault Protection Enable Register */ + +#define PWM_FPE_FPEN(n,y) (1 << (((n)<<8)+y)) +#define PWM_FPE_FPE0(y) (1 << (y)) /* Bits 0-7: Fault Protection Enable Fault=y chan=0 */ +#define PWM_FPE_FPE1(y) (1 << ((y)+8)) /* Bits 8-15: Fault Protection Enable Fault=y chan=1 */ +#define PWM_FPE_FPE2(y) (1 << ((y)+16)) /* Bits 16-23: Fault Protection Enable Fault=y chan=2 */ +#define PWM_FPE_FPE3(y) (1 << ((y)+24) /* Bits 24-31: Fault Protection Enable Fault=y chan=3 */ + +/* PWM Event Line 1/2 Register */ + +#define PWM_ELMR_CSEL(n) (1 << (n)) +#define PWM_ELMR_CSEL0 (1 << 0) /* Bit 0: Comparison 0 Selection */ +#define PWM_ELMR_CSEL1 (1 << 1) /* Bit 1: Comparison 1 Selection */ +#define PWM_ELMR_CSEL2 (1 << 2) /* Bit 2: Comparison 2 Selection */ +#define PWM_ELMR_CSEL3 (1 << 3) /* Bit 3: Comparison 3 Selection */ +#define PWM_ELMR_CSEL4 (1 << 4) /* Bit 4: Comparison 4 Selection */ +#define PWM_ELMR_CSEL5 (1 << 5) /* Bit 5: Comparison 5 Selection */ +#define PWM_ELMR_CSEL6 (1 << 6) /* Bit 6: Comparison 6 Selection */ +#define PWM_ELMR_CSEL7 (1 << 7) /* Bit 7: Comparison 7 Selection */ + +/* PWM Write Protect Control Register */ + +#define PWM_WPCR_WPCMD_SHIFT (0) /* Bits 0-1: Write Protect Command */ +#define PWM_WPCR_WPCMD_MASK (3 << PWM_WPCR_WPCMD_SHIFT) +#define PWM_WPCR_WPRG(n) (1 << ((n)+2)) +#define PWM_WPCR_WPRG0 (1 << 2) /* Bit 2: Write Protect Register Group 0 */ +#define PWM_WPCR_WPRG1 (1 << 3) /* Bit 3: Write Protect Register Group 1 */ +#define PWM_WPCR_WPRG2 (1 << 4) /* Bit 4: Write Protect Register Group 2 */ +#define PWM_WPCR_WPRG3 (1 << 5) /* Bit 5: Write Protect Register Group 3 */ +#define PWM_WPCR_WPRG4 (1 << 6) /* Bit 6: Write Protect Register Group 4 */ +#define PWM_WPCR_WPRG5 (1 << 7) /* Bit 7: Write Protect Register Group 5 */ +#define PWM_WPCR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect Key */ +#define PWM_WPCR_WPKEY_MASK (0x00ffffff << PWM_WPCR_WPKEY_SHIFT) + +/* PWM Write Protect Status Register */ + +#define PWM_WPSR_WPSWS(n) (1 << (n)) +#define PWM_WPSR_WPSWS0 (1 << 0) /* Bit 0: Write Protect SW Status */ +#define PWM_WPSR_WPSWS1 (1 << 1) /* Bit 1: Write Protect SW Status */ +#define PWM_WPSR_WPSWS2 (1 << 2) /* Bit 2: Write Protect SW Status */ +#define PWM_WPSR_WPSWS3 (1 << 3) /* Bit 3: Write Protect SW Status */ +#define PWM_WPSR_WPSWS4 (1 << 4) /* Bit 4: Write Protect SW Status */ +#define PWM_WPSR_WPSWS5 (1 << 5) /* Bit 5: Write Protect SW Status */ +#define PWM_WPSR_WPVS (1 << 7) /* Bit 7: Write Protect Violation Status */ +#define PWM_WPSR_WPHWS(n) (1 << ((n)+8)) +#define PWM_WPSR_WPHWS0 (1 << 8) /* Bit 8: Write Protect HW Status */ +#define PWM_WPSR_WPHWS1 (1 << 9) /* Bit 9: Write Protect HW Status */ +#define PWM_WPSR_WPHWS2 (1 << 10) /* Bit 10: Write Protect HW Status */ +#define PWM_WPSR_WPHWS3 (1 << 11) /* Bit 11: Write Protect HW Status */ +#define PWM_WPSR_WPHWS4 (1 << 12) /* Bit 12: Write Protect HW Status */ +#define PWM_WPSR_WPHWS5 (1 << 13) /* Bit 13: Write Protect HW Status */ +#define PWM_WPSR_WPVSRC_SHIFT (16) /* Bits 16-31: Write Protect Violation Source */ +#define PWM_WPSR_WPVSRC_MASK (0xffff << PWM_WPSR_WPVSRC_SHIFT) + +/* PWM Comparison x Value Register and PWM Comparison x Value Update Register */ + +#define PWMCMP_CV_SHIFT (0) /* Bits 0-23: Comparison x Value */ +#define PWMCMP_CV_MASK (0x00ffffff << PWMCMP_CV_SHIFT) +#define PWMCMP_CVM (1 << 24) /* Bit 24: Comparison x Value Mode */ + +/* PWM Comparison x Mode Register and PWM Comparison x Mode Update Register */ + +#define PWMCMP_CEN (1 << 0) /* Bit 0: Comparison x Enable */ +#define PWMCMP_CTR_SHIFT (4) /* Bits 4-7: Comparison x Trigger */ +#define PWMCMP_CTR_MASK (15 << PWMCMP_CTR_SHIFT) +#define PWMCMP_CPR_SHIFT (8) /* Bits 8-11: Comparison x Period */ +#define PWMCMP_CPR_MASK (15 << PWMCMP_CPR_SHIFT) +#define PWMCMP_M_CPRCNT_SHIFT (12) /* Bits 12-15: Comparison x Period Count (M only) */ +#define PWMCMP_M_CPRCNT_MASK (15 << PWMCMP_M_CPRCNT_SHIFT) +#define PWMCMP_CUPR_SHIFT (16) /* Bits 16-19: Comparison x Update Period */ +#define PWMCMP_CUPR_MASK (15 << PWMCMP_CUPR_SHIFT) +#define PWMCMP_M_CUPRCNT_SHIFT (20) /* Bits 20-23: Comparison x Update Period Counter (M only) */ +#define PWMCMP_M_CUPRCNT_MASK (15 << PWMCMP_M_CUPRCNT_SHIFT) + +/* PWM Channel Mode Register */ + +#define PWMCH_MR_CPRE_SHIFT (0) /* Bits 0-3: Channel Pre-scaler */ +#define PWMCH_MR_CPRE_MASK (15 << PWMCH_MR_CPRE_SHIFT) +# define PWMCH_MR_CPRE_MCK (0 << PWMCH_MR_CPRE_SHIFT) /* MCK */ +# define PWMCH_MR_CPRE_MCKDIV2 (1 << PWMCH_MR_CPRE_SHIFT) /* MCK/2 */ +# define PWMCH_MR_CPRE_MCKDIV4 (2 << PWMCH_MR_CPRE_SHIFT) /* MCK/4 */ +# define PWMCH_MR_CPRE_MCKDIV8 (3 << PWMCH_MR_CPRE_SHIFT) /* MCK/8 */ +# define PWMCH_MR_CPRE_MCKDIV16 (4 << PWMCH_MR_CPRE_SHIFT) /* MCK/16 */ +# define PWMCH_MR_CPRE_MCKDIV32 (5 << PWMCH_MR_CPRE_SHIFT) /* MCK/32 */ +# define PWMCH_MR_CPRE_MCKDIV64 (6 << PWMCH_MR_CPRE_SHIFT) /* MCK/64 */ +# define PWMCH_MR_CPRE_MCKDIV128 (7 << PWMCH_MR_CPRE_SHIFT) /* MCK/128 */ +# define PWMCH_MR_CPRE_MCKDIV256 (8 << PWMCH_MR_CPRE_SHIFT) /* MCK/256 */ +# define PWMCH_MR_CPRE_MCKDIV512 (9 << PWMCH_MR_CPRE_SHIFT) /* MCK/512 */ +# define PWMCH_MR_CPRE_MCKDIV1024 (10 << PWMCH_MR_CPRE_SHIFT) /* MCK/1024 */ +# define PWMCH_MR_CPRE_CLKA (11 << PWMCH_MR_CPRE_SHIFT) /*CLKA */ +# define PWMCH_MR_CPRE_CLKB (12 << PWMCH_MR_CPRE_SHIFT) /* CLKB */ +#define PWMCH_MR_CALG (1 << 8) /* Bit 8: Channel Alignment */ +#define PWMCH_MR_CPOL (1 << 9) /* Bit 9: Channel Polarity */ +#define PWMCH_MR_CES (1 << 10) /* Bit 10: Counter Event Selection */ +#define PWMCH_MR_DTE (1 << 16) /* Bit 16: Dead-Time Generator Enable */ +#define PWMCH_MR_DTHI (1 << 17) /* Bit 17: Dead-Time PWMHx Output Inverted */ +#define PWMCH_MR_DTLI (1 << 18) /* Bit 18: Dead-Time PWMLx Output Inverted */ + +/* PWM Channel Duty Cycle Register and PWM Channel Duty Cycle Update Register common bit-field definitions */ + +#define PWMCH_DTY_SHIFT (0) /* Bits 0-23: Channel Duty-Cycle */ +#define PWMCH_DTY_MASK (0x00ffffff << PWMCH_DTY_SHIFT) + +/* PWM Channel Period Register and PWM Channel Period Update Register common bit-field definitions */ + +#define PWMCH_PRD_SHIFT (0) /* Bits 0-23: Channel Period */ +#define PWMCH_PRD_MASK (0x00ffffff << PWMCH_PRD_SHIFT) + +/* PWM Channel Counter Register */ + +#define PWMCH_CCNT_SHIFT (0) /* Bits 0-23: Channel Counter Register */ +#define PWMCH_CCNT_MASK (0x00ffffff << PWMCH_CCNT_SHIFT) + +/* PWM Channel Dead Time Register and PWM Channel Dead Time Update Register common bit-field definitions */ + +#define PWMCH_DTH_SHIFT (0) /* Bits 0-15: Dead-Time Value for PWMHx Output */ +#define PWMCH_DTH_MASK (0xffff << PWMCH_DTH_SHIFT) +#define PWMCH_DTL_SHIFT (16) /* Bits 16-31: Dead-Time Value for PWMLx Output */ +#define PWMCH_DTL_MASK (0xffff << PWMCH_DTL_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_PWM_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_rstc.h b/nuttx/arch/arm/src/sam3u/sam3u_rstc.h index 4241eeba46..688631fb61 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_rstc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_rstc.h @@ -1,102 +1,102 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_rstc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* RSTC register offsets ****************************************************************/ - -#define SAM3U_RSTC_CR_OFFSET 0x00 /* Control Register */ -#define SAM3U_RSTC_SR_OFFSET 0x04 /* Status Register */ -#define SAM3U_RSTC_MR_OFFSET 0x08 /* Mode Register */ - -/* RSTC register adresses ***************************************************************/ - -#define SAM3U_RSTC_CR (SAM3U_RSTC_BASE+SAM3U_RSTC_CR_OFFSET) -#define SAM3U_RSTC_SR (SAM3U_RSTC_BASE+SAM3U_RSTC_SR_OFFSET) -#define SAM3U_RSTC_MR (SAM3U_RSTC_BASE+SAM3U_RSTC_MR_OFFSET) - -/* RSTC register bit definitions ********************************************************/ - -#define RSTC_CR_PROCRST (1 << 0) /* Bit 0: Processor Reset */ -#define RSTC_CR_PERRST (1 << 2) /* Bit 2: Peripheral Reset */ -#define RSTC_CR_EXTRST (1 << 3) /* Bit 3: External Reset */ -#define RSTC_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ -#define RSTC_CR_KEY_MASK (0xff << RSTC_CR_KEY_SHIFT) - -#define RSTC_SR_URSTS (1 << 0) /* Bit 0: User Reset Status */ -#define RSTC_SR_RSTTYP_SHIFT (8) /* Bits 8-10: Reset Type */ -#define RSTC_SR_RSTTYP_MASK (7 << RSTC_SR_RSTTYP_SHIFT) -# define RSTC_SR_RSTTYP_PWRUP (0 << RSTC_SR_RSTTYP_SHIFT) /* General Reset */ -# define RSTC_SR_RSTTYP_BACKUP (1 << RSTC_SR_RSTTYP_SHIFT) /* Backup Reset */ -# define RSTC_SR_RSTTYP_WDOG (2 << RSTC_SR_RSTTYP_SHIFT) /* Watchdog Reset */ -# define RSTC_SR_RSTTYP_SWRST (3 << RSTC_SR_RSTTYP_SHIFT) /* Software Reset */ -# define RSTC_SR_RSTTYP_NRST (4 << RSTC_SR_RSTTYP_SHIFT) /* User Reset NRST pin */ -#define RSTC_SR_NRSTL (1 << 16) /* Bit 16: NRST Pin Level */ -#define RSTC_SR_SRCMP (1 << 17) /* Bit 17: Software Reset Command in Progress */ - -#define RSTC_MR_URSTEN (1 << 0) /* Bit 0: User Reset Enable */ -#define RSTC_MR_URSTIEN (1 << 4) /* Bit 4: User Reset Interrupt Enable */ -#define RSTC_MR_ERSTL_SHIFT (8) /* Bits 8-11: External Reset Length */ -#define RSTC_MR_ERSTL_MASK (15 << RSTC_MR_ERSTL_SHIFT) -#define RSTC_MR_KEY_SHIFT (24) /* Bits 24-31: Password */ -#define RSTC_MR_KEY_MASK (0xff << RSTC_CR_KEY_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_rstc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* RSTC register offsets ****************************************************************/ + +#define SAM3U_RSTC_CR_OFFSET 0x00 /* Control Register */ +#define SAM3U_RSTC_SR_OFFSET 0x04 /* Status Register */ +#define SAM3U_RSTC_MR_OFFSET 0x08 /* Mode Register */ + +/* RSTC register adresses ***************************************************************/ + +#define SAM3U_RSTC_CR (SAM3U_RSTC_BASE+SAM3U_RSTC_CR_OFFSET) +#define SAM3U_RSTC_SR (SAM3U_RSTC_BASE+SAM3U_RSTC_SR_OFFSET) +#define SAM3U_RSTC_MR (SAM3U_RSTC_BASE+SAM3U_RSTC_MR_OFFSET) + +/* RSTC register bit definitions ********************************************************/ + +#define RSTC_CR_PROCRST (1 << 0) /* Bit 0: Processor Reset */ +#define RSTC_CR_PERRST (1 << 2) /* Bit 2: Peripheral Reset */ +#define RSTC_CR_EXTRST (1 << 3) /* Bit 3: External Reset */ +#define RSTC_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ +#define RSTC_CR_KEY_MASK (0xff << RSTC_CR_KEY_SHIFT) + +#define RSTC_SR_URSTS (1 << 0) /* Bit 0: User Reset Status */ +#define RSTC_SR_RSTTYP_SHIFT (8) /* Bits 8-10: Reset Type */ +#define RSTC_SR_RSTTYP_MASK (7 << RSTC_SR_RSTTYP_SHIFT) +# define RSTC_SR_RSTTYP_PWRUP (0 << RSTC_SR_RSTTYP_SHIFT) /* General Reset */ +# define RSTC_SR_RSTTYP_BACKUP (1 << RSTC_SR_RSTTYP_SHIFT) /* Backup Reset */ +# define RSTC_SR_RSTTYP_WDOG (2 << RSTC_SR_RSTTYP_SHIFT) /* Watchdog Reset */ +# define RSTC_SR_RSTTYP_SWRST (3 << RSTC_SR_RSTTYP_SHIFT) /* Software Reset */ +# define RSTC_SR_RSTTYP_NRST (4 << RSTC_SR_RSTTYP_SHIFT) /* User Reset NRST pin */ +#define RSTC_SR_NRSTL (1 << 16) /* Bit 16: NRST Pin Level */ +#define RSTC_SR_SRCMP (1 << 17) /* Bit 17: Software Reset Command in Progress */ + +#define RSTC_MR_URSTEN (1 << 0) /* Bit 0: User Reset Enable */ +#define RSTC_MR_URSTIEN (1 << 4) /* Bit 4: User Reset Interrupt Enable */ +#define RSTC_MR_ERSTL_SHIFT (8) /* Bits 8-11: External Reset Length */ +#define RSTC_MR_ERSTL_MASK (15 << RSTC_MR_ERSTL_SHIFT) +#define RSTC_MR_KEY_SHIFT (24) /* Bits 24-31: Password */ +#define RSTC_MR_KEY_MASK (0xff << RSTC_CR_KEY_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RSTC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_rtc.h b/nuttx/arch/arm/src/sam3u/sam3u_rtc.h index 479afb0454..61e6bb68ed 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_rtc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_rtc.h @@ -1,184 +1,184 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_rtc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* RTC register offsets *****************************************************************/ - -#define SAM3U_RTC_CR_OFFSET 0x00 /* Control Register */ -#define SAM3U_RTC_MR_OFFSET 0x04 /* Mode Register */ -#define SAM3U_RTC_TIMR_OFFSET 0x08 /* Time Register */ -#define SAM3U_RTC_CALR_OFFSET 0x0c /* Calendar Register */ -#define SAM3U_RTC_TIMALR_OFFSET 0x10 /* Time Alarm Register */ -#define SAM3U_RTC_CALALR_OFFSET 0x14 /* Calendar Alarm Register */ -#define SAM3U_RTC_SR_OFFSET 0x18 /* Status Register */ -#define SAM3U_RTC_SCCR_OFFSET 0x1c /* Status Clear Command Register */ -#define SAM3U_RTC_IER_OFFSET 0x20 /* Interrupt Enable Register */ -#define SAM3U_RTC_IDR_OFFSET 0x24 /* Interrupt Disable Register */ -#define SAM3U_RTC_IMR_OFFSET 0x28 /* Interrupt Mask Register */ -#define SAM3U_RTC_VER_OFFSET 0x2c /* Valid Entry Register */ - -/* RTC register adresses ****************************************************************/ - -#define SAM3U_RTC_CR (SAM3U_RTC_BASE+SAM3U_RTC_CR_OFFSET) -#define SAM3U_RTC_MR (SAM3U_RTC_BASE+SAM3U_RTC_MR_OFFSET) -#define SAM3U_RTC_TIMR (SAM3U_RTC_BASE+SAM3U_RTC_TIMR_OFFSET) -#define SAM3U_RTC_CALR (SAM3U_RTC_BASE+SAM3U_RTC_CALR_OFFSET) -#define SAM3U_RTC_TIMALR (SAM3U_RTC_BASE+SAM3U_RTC_TIMALR_OFFSET) -#define SAM3U_RTC_CALALR (SAM3U_RTC_BASE+SAM3U_RTC_CALALR_OFFSET) -#define SAM3U_RTC_SR (SAM3U_RTC_BASE+SAM3U_RTC_SR_OFFSET) -#define SAM3U_RTC_SCCR (SAM3U_RTC_BASE+SAM3U_RTC_SCCR_OFFSET) -#define SAM3U_RTC_IER (SAM3U_RTC_BASE+SAM3U_RTC_IER_OFFSET) -#define SAM3U_RTC_IDR (SAM3U_RTC_BASE+SAM3U_RTC_IDR_OFFSET) -#define SAM3U_RTC_IMR (SAM3U_RTC_BASE+SAM3U_RTC_IMR_OFFSET) -#define SAM3U_RTC_VER (SAM3U_RTC_BASE+SAM3U_RTC_VER_OFFSET) - -/* RTC register bit definitions *********************************************************/ - -#define RTC_CR_UPDTIM (1 << 0) /* Bit 0: Update Request Time Register */ -#define RTC_CR_UPDCAL (1 << 1) /* Bit 1: Update Request Calendar Register */ -#define RTC_CR_TIMEVSEL_SHIFT (8) /* Bits 8-9: Time Event Selection */ -#define RTC_CR_TIMEVSEL_MASK (3 << RTC_CR_TIMEVSEL_SHIFT) -# define RTC_CR_TIMEVSEL_MIN (0 << RTC_CR_TIMEVSEL_SHIFT) -# define RTC_CR_TIMEVSEL_HOUR (1 << RTC_CR_TIMEVSEL_SHIFT) -# define RTC_CR_TIMEVSEL_MIDNIGHT (2 << RTC_CR_TIMEVSEL_SHIFT) -# define RTC_CR_TIMEVSEL_NOON (3 << RTC_CR_TIMEVSEL_SHIFT) -#define RTC_CR_CALEVSEL_SHIFT (16) /* Bits 16-17: Calendar Event Selection */ -#define RTC_CR_CALEVSEL_MASK (3 << RTC_CR_CALEVSEL_SHIFT) -# define RTC_CR_CALEVSEL_WEEK (0 << RTC_CR_CALEVSEL_SHIFT) -# define RTC_CR_CALEVSEL_MONTH (1 << RTC_CR_CALEVSEL_SHIFT) -# define RTC_CR_CALEVSEL_YEAR (2 << RTC_CR_CALEVSEL_SHIFT) - -#define RTC_MR_HRMOD (1 << 0) /* Bit 0: 12-/24-hour Mode */ - -#define RTC_TIMR_SEC_SHIFT (0) /* Bits 0-6: Current Second */ -#define RTC_TIMR_SEC_MASK (0x7f << RTC_TIMR_SEC_SHIFT) -#define RTC_TIMR_MIN_SHIFT (8) /* Bits 8-14: Current Minute */ -#define RTC_TIMR_MIN_MASK (0x7f << RTC_TIMR_MIN_SHIFT) -#define RTC_TIMR_HOUR_SHIFT (16) /* Bits 16-21: Current Hour */ -#define RTC_TIMR_HOUR_MASK (0x3f << RTC_TIMR_HOUR_SHIFT) -#define RTC_TIMR_AMPM (1 << 22) /* Bit 22: Ante Meridiem Post Meridiem Indicator */ - -#define RTC_CALR_CENT_SHIFT (0) /* Bits 0-6: Current Century */ -#define RTC_CALR_CENT_MASK (0x7f << RTC_TIMR_HOUR_SHIFT) -#define RTC_CALR_YEAR_SHIFT (8) /* Bits 8-15: Current Year */ -#define RTC_CALR_YEAR_MASK (0xff << RTC_CALR_YEAR_SHIFT) -#define RTC_CALR_MONTH_SHIFT (16) /* Bits 16-20: Current Month */ -#define RTC_CALR_MONTH_MASK (0x1f << RTC_CALR_MONTH_SHIFT) -#define RTC_CALR_DAY_SHIFT (21) /* Bits 21-23: Current Day in Current Week */ -#define RTC_CALR_DAY_MASK (7 << RTC_CALR_DAY_SHIFT) -#define RTC_CALR_DATE_SHIFT (24) /* Bits 24-29: Current Day in Current Month */ -#define RTC_CALR_DATE_MASK (0x3f << RTC_CALR_DATE_SHIFT) - -#define RTC_TIMALR_SEC_SHIFT (0) /* Bits 0-6: Second Alarm */ -#define RTC_TIMALR_SEC_MASK (0x7f << RTC_TIMALR_SEC_SHIFT) -#define RTC_TIMALR_SECEN (1 << 7) /* Bit 7: Second Alarm Enable */ -#define RTC_TIMALR_MIN_SHIFT (8) /* Bits 8-14: Minute Alarm */ -#define RTC_TIMALR_MIN_MASK (0x7f << RTC_TIMALR_MIN_SHIFT) -#define RTC_TIMALR_MINEN (1 << 15) /* Bit 15: Minute Alarm Enable */ -#define RTC_TIMALR_HOUR_SHIFT (16) /* Bits 16-21: Hour Alarm */ -#define RTC_TIMALR_HOUR_MASK (0x3f << RTC_TIMALR_HOUR_SHIFT) -#define RTC_TIMALR_AMPM (1 << 22) /* Bit 22: AM/PM Indicator */ -#define RTC_TIMALR_HOUREN (1 << 23) /* Bit 23: Hour Alarm Enable */ - -#define RTC_CALALR_MONTH_SHIFT (16) /* Bits 16-20: Month Alarm */ -#define RTC_CALALR_MONTH_MASK (0x1f << RTC_CALALR_MONTH_SHIFT) -#define RTC_CALALR_MTHEN (1 << 23) /* Bit 23: Month Alarm Enable */ -#define RTC_CALALR_DATE_SHIFT (24) /* Bits 24-29: Date Alarm */ -#define RTC_CALALR_DATE_MASK (0x3c << RTC_CALALR_DATE_SHIFT) -#define RTC_CALALR_DATEEN (1 << 31) /* Bit 31: Date Alarm Enable */ - -#define RTC_SR_ACKUPD (1 << 0) /* Bit 0: Acknowledge for Update */ -#define RTC_SR_ALARM (1 << 1) /* Bit 1: Alarm Flag */ -#define RTC_SR_SEC (1 << 2) /* Bit 2: Second Event */ -#define RTC_SR_TIMEV (1 << 3) /* Bit 3: Time Event */ -#define RTC_SR_CALEV (1 << 4) /* Bit 4: Calendar Event */ - -#define RTC_SCCR_ACKCLR (1 << 0) /* Bit 0: Acknowledge Clear */ -#define RTC_SCCR_ALRCLR (1 << 1) /* Bit 1: Alarm Clear */ -#define RTC_SCCR_SECCLR (1 << 2) /* Bit 2: Second Clear */ -#define RTC_SCCR_TIMCLR (1 << 3) /* Bit 3: Time Clear */ -#define RTC_SCCR_CALCLR (1 << 4) /* Bit 4: Calendar Clear */ - -#define RTC_IER_ACKEN (1 << 0) /* Bit 0: Acknowledge Update Interrupt Enable */ -#define RTC_IER_ALREN (1 << 1) /* Bit 1: Alarm Interrupt Enable */ -#define RTC_IER_SECEN (1 << 2) /* Bit 2: Second Event Interrupt Enable */ -#define RTC_IER_TIMEN (1 << 3) /* Bit 3: Time Event Interrupt Enable */ -#define RTC_IER_CALEN (1 << 4) /* Bit 4: Calendar Event Interrupt Enable */ - -#define RTC_IDR_ACKDIS (1 << 0) /* Bit 0: Acknowledge Update Interrupt Disable */ -#define RTC_IDR_ALRDIS (1 << 1) /* Bit 1: Alarm Interrupt Disable */ -#define RTC_IDR_SECDIS (1 << 2) /* Bit 2: Second Event Interrupt Disable */ -#define RTC_IDR_TIMDIS (1 << 3) /* Bit 3: Time Event Interrupt Disable */ -#define RTC_IDR_CALDIS (1 << 4) /* Bit 4: Calendar Event Interrupt Disable */ - -#define RTC_IMR_ACK (1 << 0) /* Bit 0: Acknowledge Update Interrupt Mask */ -#define RTC_IMR_ALR (1 << 1) /* Bit 1: Alarm Interrupt Mask */ -#define RTC_IMR_SEC (1 << 2) /* Bit 2: Second Event Interrupt Mask */ -#define RTC_IMR_TIM (1 << 3) /* Bit 3: Time Event Interrupt Mask */ -#define RTC_IMR_CAL (1 << 4) /* Bit 4: Calendar Event Interrupt Mask */ - -#define RTC_VER_NVTIM (1 << 0) /* Bit 0: Non-valid Time */ -#define RTC_VER_NVCAL (1 << 1) /* Bit 1: Non-valid Calendar */ -#define RTC_VER_NVTIMALR (1 << 2) /* Bit 2: Non-valid Time Alarm */ -#define RTC_VER_NVCALALR (1 << 3) /* Bit 3: Non-valid Calendar Alarm */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_rtc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* RTC register offsets *****************************************************************/ + +#define SAM3U_RTC_CR_OFFSET 0x00 /* Control Register */ +#define SAM3U_RTC_MR_OFFSET 0x04 /* Mode Register */ +#define SAM3U_RTC_TIMR_OFFSET 0x08 /* Time Register */ +#define SAM3U_RTC_CALR_OFFSET 0x0c /* Calendar Register */ +#define SAM3U_RTC_TIMALR_OFFSET 0x10 /* Time Alarm Register */ +#define SAM3U_RTC_CALALR_OFFSET 0x14 /* Calendar Alarm Register */ +#define SAM3U_RTC_SR_OFFSET 0x18 /* Status Register */ +#define SAM3U_RTC_SCCR_OFFSET 0x1c /* Status Clear Command Register */ +#define SAM3U_RTC_IER_OFFSET 0x20 /* Interrupt Enable Register */ +#define SAM3U_RTC_IDR_OFFSET 0x24 /* Interrupt Disable Register */ +#define SAM3U_RTC_IMR_OFFSET 0x28 /* Interrupt Mask Register */ +#define SAM3U_RTC_VER_OFFSET 0x2c /* Valid Entry Register */ + +/* RTC register adresses ****************************************************************/ + +#define SAM3U_RTC_CR (SAM3U_RTC_BASE+SAM3U_RTC_CR_OFFSET) +#define SAM3U_RTC_MR (SAM3U_RTC_BASE+SAM3U_RTC_MR_OFFSET) +#define SAM3U_RTC_TIMR (SAM3U_RTC_BASE+SAM3U_RTC_TIMR_OFFSET) +#define SAM3U_RTC_CALR (SAM3U_RTC_BASE+SAM3U_RTC_CALR_OFFSET) +#define SAM3U_RTC_TIMALR (SAM3U_RTC_BASE+SAM3U_RTC_TIMALR_OFFSET) +#define SAM3U_RTC_CALALR (SAM3U_RTC_BASE+SAM3U_RTC_CALALR_OFFSET) +#define SAM3U_RTC_SR (SAM3U_RTC_BASE+SAM3U_RTC_SR_OFFSET) +#define SAM3U_RTC_SCCR (SAM3U_RTC_BASE+SAM3U_RTC_SCCR_OFFSET) +#define SAM3U_RTC_IER (SAM3U_RTC_BASE+SAM3U_RTC_IER_OFFSET) +#define SAM3U_RTC_IDR (SAM3U_RTC_BASE+SAM3U_RTC_IDR_OFFSET) +#define SAM3U_RTC_IMR (SAM3U_RTC_BASE+SAM3U_RTC_IMR_OFFSET) +#define SAM3U_RTC_VER (SAM3U_RTC_BASE+SAM3U_RTC_VER_OFFSET) + +/* RTC register bit definitions *********************************************************/ + +#define RTC_CR_UPDTIM (1 << 0) /* Bit 0: Update Request Time Register */ +#define RTC_CR_UPDCAL (1 << 1) /* Bit 1: Update Request Calendar Register */ +#define RTC_CR_TIMEVSEL_SHIFT (8) /* Bits 8-9: Time Event Selection */ +#define RTC_CR_TIMEVSEL_MASK (3 << RTC_CR_TIMEVSEL_SHIFT) +# define RTC_CR_TIMEVSEL_MIN (0 << RTC_CR_TIMEVSEL_SHIFT) +# define RTC_CR_TIMEVSEL_HOUR (1 << RTC_CR_TIMEVSEL_SHIFT) +# define RTC_CR_TIMEVSEL_MIDNIGHT (2 << RTC_CR_TIMEVSEL_SHIFT) +# define RTC_CR_TIMEVSEL_NOON (3 << RTC_CR_TIMEVSEL_SHIFT) +#define RTC_CR_CALEVSEL_SHIFT (16) /* Bits 16-17: Calendar Event Selection */ +#define RTC_CR_CALEVSEL_MASK (3 << RTC_CR_CALEVSEL_SHIFT) +# define RTC_CR_CALEVSEL_WEEK (0 << RTC_CR_CALEVSEL_SHIFT) +# define RTC_CR_CALEVSEL_MONTH (1 << RTC_CR_CALEVSEL_SHIFT) +# define RTC_CR_CALEVSEL_YEAR (2 << RTC_CR_CALEVSEL_SHIFT) + +#define RTC_MR_HRMOD (1 << 0) /* Bit 0: 12-/24-hour Mode */ + +#define RTC_TIMR_SEC_SHIFT (0) /* Bits 0-6: Current Second */ +#define RTC_TIMR_SEC_MASK (0x7f << RTC_TIMR_SEC_SHIFT) +#define RTC_TIMR_MIN_SHIFT (8) /* Bits 8-14: Current Minute */ +#define RTC_TIMR_MIN_MASK (0x7f << RTC_TIMR_MIN_SHIFT) +#define RTC_TIMR_HOUR_SHIFT (16) /* Bits 16-21: Current Hour */ +#define RTC_TIMR_HOUR_MASK (0x3f << RTC_TIMR_HOUR_SHIFT) +#define RTC_TIMR_AMPM (1 << 22) /* Bit 22: Ante Meridiem Post Meridiem Indicator */ + +#define RTC_CALR_CENT_SHIFT (0) /* Bits 0-6: Current Century */ +#define RTC_CALR_CENT_MASK (0x7f << RTC_TIMR_HOUR_SHIFT) +#define RTC_CALR_YEAR_SHIFT (8) /* Bits 8-15: Current Year */ +#define RTC_CALR_YEAR_MASK (0xff << RTC_CALR_YEAR_SHIFT) +#define RTC_CALR_MONTH_SHIFT (16) /* Bits 16-20: Current Month */ +#define RTC_CALR_MONTH_MASK (0x1f << RTC_CALR_MONTH_SHIFT) +#define RTC_CALR_DAY_SHIFT (21) /* Bits 21-23: Current Day in Current Week */ +#define RTC_CALR_DAY_MASK (7 << RTC_CALR_DAY_SHIFT) +#define RTC_CALR_DATE_SHIFT (24) /* Bits 24-29: Current Day in Current Month */ +#define RTC_CALR_DATE_MASK (0x3f << RTC_CALR_DATE_SHIFT) + +#define RTC_TIMALR_SEC_SHIFT (0) /* Bits 0-6: Second Alarm */ +#define RTC_TIMALR_SEC_MASK (0x7f << RTC_TIMALR_SEC_SHIFT) +#define RTC_TIMALR_SECEN (1 << 7) /* Bit 7: Second Alarm Enable */ +#define RTC_TIMALR_MIN_SHIFT (8) /* Bits 8-14: Minute Alarm */ +#define RTC_TIMALR_MIN_MASK (0x7f << RTC_TIMALR_MIN_SHIFT) +#define RTC_TIMALR_MINEN (1 << 15) /* Bit 15: Minute Alarm Enable */ +#define RTC_TIMALR_HOUR_SHIFT (16) /* Bits 16-21: Hour Alarm */ +#define RTC_TIMALR_HOUR_MASK (0x3f << RTC_TIMALR_HOUR_SHIFT) +#define RTC_TIMALR_AMPM (1 << 22) /* Bit 22: AM/PM Indicator */ +#define RTC_TIMALR_HOUREN (1 << 23) /* Bit 23: Hour Alarm Enable */ + +#define RTC_CALALR_MONTH_SHIFT (16) /* Bits 16-20: Month Alarm */ +#define RTC_CALALR_MONTH_MASK (0x1f << RTC_CALALR_MONTH_SHIFT) +#define RTC_CALALR_MTHEN (1 << 23) /* Bit 23: Month Alarm Enable */ +#define RTC_CALALR_DATE_SHIFT (24) /* Bits 24-29: Date Alarm */ +#define RTC_CALALR_DATE_MASK (0x3c << RTC_CALALR_DATE_SHIFT) +#define RTC_CALALR_DATEEN (1 << 31) /* Bit 31: Date Alarm Enable */ + +#define RTC_SR_ACKUPD (1 << 0) /* Bit 0: Acknowledge for Update */ +#define RTC_SR_ALARM (1 << 1) /* Bit 1: Alarm Flag */ +#define RTC_SR_SEC (1 << 2) /* Bit 2: Second Event */ +#define RTC_SR_TIMEV (1 << 3) /* Bit 3: Time Event */ +#define RTC_SR_CALEV (1 << 4) /* Bit 4: Calendar Event */ + +#define RTC_SCCR_ACKCLR (1 << 0) /* Bit 0: Acknowledge Clear */ +#define RTC_SCCR_ALRCLR (1 << 1) /* Bit 1: Alarm Clear */ +#define RTC_SCCR_SECCLR (1 << 2) /* Bit 2: Second Clear */ +#define RTC_SCCR_TIMCLR (1 << 3) /* Bit 3: Time Clear */ +#define RTC_SCCR_CALCLR (1 << 4) /* Bit 4: Calendar Clear */ + +#define RTC_IER_ACKEN (1 << 0) /* Bit 0: Acknowledge Update Interrupt Enable */ +#define RTC_IER_ALREN (1 << 1) /* Bit 1: Alarm Interrupt Enable */ +#define RTC_IER_SECEN (1 << 2) /* Bit 2: Second Event Interrupt Enable */ +#define RTC_IER_TIMEN (1 << 3) /* Bit 3: Time Event Interrupt Enable */ +#define RTC_IER_CALEN (1 << 4) /* Bit 4: Calendar Event Interrupt Enable */ + +#define RTC_IDR_ACKDIS (1 << 0) /* Bit 0: Acknowledge Update Interrupt Disable */ +#define RTC_IDR_ALRDIS (1 << 1) /* Bit 1: Alarm Interrupt Disable */ +#define RTC_IDR_SECDIS (1 << 2) /* Bit 2: Second Event Interrupt Disable */ +#define RTC_IDR_TIMDIS (1 << 3) /* Bit 3: Time Event Interrupt Disable */ +#define RTC_IDR_CALDIS (1 << 4) /* Bit 4: Calendar Event Interrupt Disable */ + +#define RTC_IMR_ACK (1 << 0) /* Bit 0: Acknowledge Update Interrupt Mask */ +#define RTC_IMR_ALR (1 << 1) /* Bit 1: Alarm Interrupt Mask */ +#define RTC_IMR_SEC (1 << 2) /* Bit 2: Second Event Interrupt Mask */ +#define RTC_IMR_TIM (1 << 3) /* Bit 3: Time Event Interrupt Mask */ +#define RTC_IMR_CAL (1 << 4) /* Bit 4: Calendar Event Interrupt Mask */ + +#define RTC_VER_NVTIM (1 << 0) /* Bit 0: Non-valid Time */ +#define RTC_VER_NVCAL (1 << 1) /* Bit 1: Non-valid Calendar */ +#define RTC_VER_NVTIMALR (1 << 2) /* Bit 2: Non-valid Time Alarm */ +#define RTC_VER_NVCALALR (1 << 3) /* Bit 3: Non-valid Calendar Alarm */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RTC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_rtt.h b/nuttx/arch/arm/src/sam3u/sam3u_rtt.h index ea25fbc4ab..9cbb69b0a3 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_rtt.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_rtt.h @@ -1,89 +1,89 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_rtt.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* RTT register offsets *****************************************************************/ - -#define SAM3U_RTT_MR_OFFSET 0x00 /* Mode Register */ -#define SAM3U_RTT_AR_OFFSET 0x04 /* Alarm Register */ -#define SAM3U_RTT_VR_OFFSET 0x08 /* Value Register */ -#define SAM3U_RTT_SR_OFFSET 0x0c /* Status Register */ - -/* RTT register adresses ***************************************************************/ - -#define SAM3U_RTT_MR (SAM3U_RTT_BASE+SAM3U_RTT_MR_OFFSET) -#define SAM3U_RTT_AR (SAM3U_RTT_BASE+SAM3U_RTT_AR_OFFSET) -#define SAM3U_RTT_VR (SAM3U_RTT_BASE+SAM3U_RTT_VR_OFFSET) -#define SAM3U_RTT_SR (SAM3U_RTT_BASE+SAM3U_RTT_SR_OFFSET) - -/* RTT register bit definitions ********************************************************/ - -#define RTT_MR_RTPRES_SHIFT (0) /* Bits 0-15: Real-time Timer Prescaler Value */ -#define RTT_MR_RTPRES__MASK (0xffff << RTT_MR_RTPRES_SHIFT) -#define RTT_MR_ALMIEN (1 << 16) /* Bit 16: Alarm Interrupt Enable */ -#define RTT_MR_RTTINCIEN (1 << 17) /* Bit 17: Real-time Timer Increment Int Enable */ -#define RTT_MR_RTTRST (1 << 18) /* Bit 18: Real-time Timer Restart */ - -#define RTT_SR_ALMS (1 << 0) /* Bit 0: Real-time Alarm Status */ -#define RTT_SR_RTTINC (1 << 1) /* Bit 1: Real-time Timer Increment */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_rtt.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* RTT register offsets *****************************************************************/ + +#define SAM3U_RTT_MR_OFFSET 0x00 /* Mode Register */ +#define SAM3U_RTT_AR_OFFSET 0x04 /* Alarm Register */ +#define SAM3U_RTT_VR_OFFSET 0x08 /* Value Register */ +#define SAM3U_RTT_SR_OFFSET 0x0c /* Status Register */ + +/* RTT register adresses ***************************************************************/ + +#define SAM3U_RTT_MR (SAM3U_RTT_BASE+SAM3U_RTT_MR_OFFSET) +#define SAM3U_RTT_AR (SAM3U_RTT_BASE+SAM3U_RTT_AR_OFFSET) +#define SAM3U_RTT_VR (SAM3U_RTT_BASE+SAM3U_RTT_VR_OFFSET) +#define SAM3U_RTT_SR (SAM3U_RTT_BASE+SAM3U_RTT_SR_OFFSET) + +/* RTT register bit definitions ********************************************************/ + +#define RTT_MR_RTPRES_SHIFT (0) /* Bits 0-15: Real-time Timer Prescaler Value */ +#define RTT_MR_RTPRES__MASK (0xffff << RTT_MR_RTPRES_SHIFT) +#define RTT_MR_ALMIEN (1 << 16) /* Bit 16: Alarm Interrupt Enable */ +#define RTT_MR_RTTINCIEN (1 << 17) /* Bit 17: Real-time Timer Increment Int Enable */ +#define RTT_MR_RTTRST (1 << 18) /* Bit 18: Real-time Timer Restart */ + +#define RTT_SR_ALMS (1 << 0) /* Bit 0: Real-time Alarm Status */ +#define RTT_SR_RTTINC (1 << 1) /* Bit 1: Real-time Timer Increment */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_RTT_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_smc.h b/nuttx/arch/arm/src/sam3u/sam3u_smc.h index f8b6e837e1..c831a91cde 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_smc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_smc.h @@ -1,432 +1,432 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_smc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* SMC register offsets *****************************************************************/ - -#define SAM3U_SMC_CFG_OFFSET 0x000 /* SMC NFC Configuration Register */ -#define SAM3U_SMC_CTRL_OFFSET 0x004 /* SMC NFC Control Register */ -#define SAM3U_SMC_SR_OFFSET 0x008 /* SMC NFC Status Register */ -#define SAM3U_SMC_IER_OFFSET 0x00c /* SMC NFC Interrupt Enable Register */ -#define SAM3U_SMC_IDR_OFFSET 0x010 /* SMC NFC Interrupt Disable Register */ -#define SAM3U_SMC_IMR_OFFSET 0x014 /* SMC NFC Interrupt Mask Register */ -#define SAM3U_SMC_ADDR_OFFSET 0x018 /* SMC NFC Address Cycle Zero Register */ -#define SAM3U_SMC_BANK_OFFSET 0x01c /* SMC Bank Address Register */ -#define SAM3U_SMC_ECCCTRL_OFFSET 0x020 /* SMC ECC Control Register */ -#define SAM3U_SMC_ECCMD_OFFSET 0x024 /* SMC ECC Mode Register */ -#define SAM3U_SMC_ECCSR1_OFFSET 0x028 /* SMC ECC Status 1 Register */ -#define SAM3U_SMC_ECCPR0_OFFSET 0x02c /* SMC ECC parity 0 Register */ -#define SAM3U_SMC_ECCPR1_OFFSET 0x030 /* SMC ECC parity 1 Register */ -#define SAM3U_SMC_ECCSR2_OFFSET 0x034 /* SMC ECC status 2 Register */ -#define SAM3U_SMC_ECCPR2_OFFSET 0x038 /* SMC ECC parity 2 Register */ -#define SAM3U_SMC_ECCPR3_OFFSET 0x03c /* SMC ECC parity 3 Register */ -#define SAM3U_SMC_ECCPR4_OFFSET 0x040 /* SMC ECC parity 4 Register */ -#define SAM3U_SMC_ECCPR5_OFFSET 0x044 /* SMC ECC parity 5 Register */ -#define SAM3U_SMC_ECCPR6_OFFSET 0x048 /* SMC ECC parity 6 Register */ -#define SAM3U_SMC_ECCPR7_OFFSET 0x04c /* SMC ECC parity 7 Register */ -#define SAM3U_SMC_ECCPR8_OFFSET 0x050 /* SMC ECC parity 8 Register */ -#define SAM3U_SMC_ECCPR9_OFFSET 0x054 /* SMC ECC parity 9 Register */ -#define SAM3U_SMC_ECCPR10_OFFSET 0x058 /* SMC ECC parity 10 Register */ -#define SAM3U_SMC_ECCPR11_OFFSET 0x05c /* SMC ECC parity 11 Register */ -#define SAM3U_SMC_ECCPR12_OFFSET 0x060 /* SMC ECC parity 12 Register */ -#define SAM3U_SMC_ECCPR13_OFFSET 0x064 /* SMC ECC parity 13 Register */ -#define SAM3U_SMC_ECCPR14_OFFSET 0x068 /* SMC ECC parity 14 Register */ -#define SAM3U_SMC_ECCPR15_OFFSET 0x06c /* SMC ECC parity 15 Register */ - -#define SAM3U_SMCCS_OFFSET(n) (0x070+((n)*0x014)) -#define SAM3U_SMCCS_SETUP_OFFSET 0x000 /* SMC SETUP Register */ -#define SAM3U_SMCCS_PULSE_OFFSET 0x004 /* SMC PULSE Register */ -#define SAM3U_SMCCS_CYCLE_OFFSET 0x008 /* SMC CYCLE Register */ -#define SAM3U_SMCCS_TIMINGS_OFFSET 0x00c /* SMC TIMINGS Register */ -#define SAM3U_SMCCS_MODE_OFFSET 0x010 /* SMC MODE Register */ - -#define SAM3U_SMC_OCMS_OFFSET 0x110 /* SMC OCMS MODE Register */ -#define SAM3U_SMC_KEY1_OFFSET 0x114 /* SMC KEY1 Register */ -#define SAM3U_SMC_KEY2_OFFSET 0x118 /* SMC KEY2 Register */ -#define SAM3U_SMC_WPCR_OFFSET 0x1e4 /* Write Protection Control Register */ -#define SAM3U_SMC_WPSR_OFFSET 0x1e8 /* Write Protection Status Register */ - -/* SMC register adresses ****************************************************************/ - -#define SAM3U_SMC_CFG (SAM3U_SMC_BASE+SAM3U_SMC_CFG_OFFSET) -#define SAM3U_SMC_CTRL (SAM3U_SMC_BASE+SAM3U_SMC_CTRL_OFFSET) -#define SAM3U_SMC_SR (SAM3U_SMC_BASE+SAM3U_SMC_SR_OFFSET) -#define SAM3U_SMC_IER (SAM3U_SMC_BASE+SAM3U_SMC_IER_OFFSET) -#define SAM3U_SMC_IDR (SAM3U_SMC_BASE+SAM3U_SMC_IDR_OFFSET) -#define SAM3U_SMC_IMR (SAM3U_SMC_BASE+SAM3U_SMC_IMR_OFFSET) -#define SAM3U_SMC_ADDR (SAM3U_SMC_BASE+SAM3U_SMC_ADDR_OFFSET) -#define SAM3U_SMC_BANK (SAM3U_SMC_BASE+SAM3U_SMC_BANK_OFFSET) -#define SAM3U_SMC_ECCCTRL (SAM3U_SMC_BASE+SAM3U_SMC_ECCCTRL_OFFSET) -#define SAM3U_SMC_ECCMD (SAM3U_SMC_BASE+SAM3U_SMC_ECCMD_OFFSET) -#define SAM3U_SMC_ECCSR1 (SAM3U_SMC_BASE+SAM3U_SMC_ECCSR1_OFFSET) -#define SAM3U_SMC_ECCPR0 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR0_OFFSET) -#define SAM3U_SMC_ECCPR1 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR1_OFFSET) -#define SAM3U_SMC_ECCSR2 (SAM3U_SMC_BASE+SAM3U_SMC_ECCSR2_OFFSET) -#define SAM3U_SMC_ECCPR2 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR2_OFFSET) -#define SAM3U_SMC_ECCPR3 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR3_OFFSET) -#define SAM3U_SMC_ECCPR4 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR4_OFFSET) -#define SAM3U_SMC_ECCPR5 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR5_OFFSET) -#define SAM3U_SMC_ECCPR6 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR6_OFFSET) -#define SAM3U_SMC_ECCPR7 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR7_OFFSET) -#define SAM3U_SMC_ECCPR8 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR8_OFFSET) -#define SAM3U_SMC_ECCPR9 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR9_OFFSET) -#define SAM3U_SMC_ECCPR10 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR10_OFFSET) -#define SAM3U_SMC_ECCPR11 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR11_OFFSET) -#define SAM3U_SMC_ECCPR12 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR12_OFFSET) -#define SAM3U_SMC_ECCPR13 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR13_OFFSET) -#define SAM3U_SMC_ECCPR14 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR14_OFFSET) -#define SAM3U_SMC_ECCPR15 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR15_OFFSET) - -#define SAM3U_SMCCS_BASE(n) (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(n)) -# define SAM3U_SMC_CS0_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(0)) -# define SAM3U_SMC_CS1_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(1)) -# define SAM3U_SMC_CS2_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(2)) -# define SAM3U_SMC_CS3_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(3)) -#define SAM3U_SMCCS_SETUP(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_SETUP_OFFSET) -#define SAM3U_SMCCS_PULSE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_PULSE_OFFSET) -#define SAM3U_SMCCS_CYCLE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_CYCLE_OFFSET) -#define SAM3U_SMCCS_TIMINGS(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_TIMINGS_OFFSET) -#define SAM3U_SMCCS_MODE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_MODE_OFFSET) - -#define SAM3U_SMC_OCMS (SAM3U_SMC_BASE+SAM3U_SMC_OCMS_OFFSET) -#define SAM3U_SMC_KEY1 (SAM3U_SMC_BASE+SAM3U_SMC_KEY1_OFFSET) -#define SAM3U_SMC_KEY2 (SAM3U_SMC_BASE+SAM3U_SMC_KEY2_OFFSET) -#define SAM3U_SMC_WPCR (SAM3U_SMC_BASE+SAM3U_SMC_WPCR_OFFSET) -#define SAM3U_SMC_WPSR (SAM3U_SMC_BASE+SAM3U_SMC_WPSR_OFFSET) - -/* SMC register bit definitions *********************************************************/ - -/* SMC NFC Configuration Register */ - -#define SMC_CFG_PAGESIZE_SHIFT (0) /* Bits 0-1: Page size of NAND Flash device */ -#define SMC_CFG_PAGESIZE_MASK (3 << SMC_CFG_PAGESIZE_SHIFT) -# define SMC_CFG_PAGESIZE_16 BYTES (0 << SMC_CFG_PAGESIZE_SHIFT) /* 528 Bytes 16 byte */ -# define SMC_CFG_PAGESIZE_ 2 BYTES (1 << SMC_CFG_PAGESIZE_SHIFT) /* 1056 Bytes 32 bytes */ -# define SMC_CFG_PAGESIZE_64 BYTES (2 << SMC_CFG_PAGESIZE_SHIFT) /* 2112 Bytes 64 bytes */ -# define SMC_CFG_PAGESIZE_128 BYTES (3 << SMC_CFG_PAGESIZE_SHIFT) /* 4224 Bytes 128 bytes */ -#define SMC_CFG_WSPARE (1 << 8) /* Bit 8: Write Spare Area */ -#define SMC_CFG_RSPARE (1 << 9) /* Bit 9: Read Spare Area */ -#define SMC_CFG_EDGECTRL (1 << 12) /* Bit 12: Rising/Falling Edge Detection Control */ -#define SMC_CFG_RBEDGE (1 << 13) /* Bit 13: Ready/Busy Signal Edge Detection */ -#define SMC_CFG_DTOCYC_SHIFT (16) /* Bits 16-19: Data Timeout Cycle Number */ -#define SMC_CFG_DTOCYC_MASK (15 << SMC_CFG_DTOCYC_SHIFT) -#define SMC_CFG_DTOMUL_SHIFT (20) /* Bits 20-22: Data Timeout Multiplier */ -#define SMC_CFG_DTOMUL_MASK (7 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_1 (0 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_16 (1 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_128 (2 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_256 (3 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_1024 (4 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_4096 (5 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_65536 (6 << SMC_CFG_DTOMUL_SHIFT) -# define SMC_CFG_DTOMUL_1048576 (7 << SMC_CFG_DTOMUL_SHIFT) - -/* SMC NFC Control Register */ - -#define SMC_CTRL_NFCEN (1 << 0) /* Bit 0: NAND Flash Controller Enable */ -#define SMC_CTRL_NFCDIS (1 << 1) /* Bit 1: NAND Flash Controller Disable */ - -/* SMC NFC Status Register, SMC NFC Interrupt Enable Register, SMC NFC Interrupt - * Disable Register, and SMC NFC Interrupt Mask Register common bit-field definitions - */ - -#define SMC_SR_SMCSTS (1 << 0) /* Bit 0: NAND Flash Controller status (SR only) */ -#define SMC_INT_RBRISE (1 << 4) /* Bit 4: Ready Busy Rising Edge Detection Interrupt */ -#define SMC_INT_RBFALL (1 << 5) /* Bit 5: Ready Busy Falling Edge Detection Interrupt */ -#define SMC_SR_NFCBUSY (1 << 8) /* Bit 8: NFC Busy (SR only) */ -#define SMC_SR_NFCWR (1 << 11) /* Bit 11: NFC Write/Read Operation (SR only) */ -#define SMC_SR_NFCSID (1 << 12) /* Bit 13: NFC Chip Select ID (SR only) */ -#define SMC_INT_XFRDONE (1 << 16) /* Bit 16: Transfer Done Interrupt */ -#define SMC_INT_CMDDONE (1 << 17) /* Bit 17: Command Done Interrupt */ -#define SMC_INT_DTOE (1 << 20) /* Bit 20: Data Timeout Error Interrupt */ -#define SMC_INT_UNDEF (1 << 21) /* Bit 21: Undefined Area Access Interrupt */ -#define SMC_INT_AWB (1 << 22) /* Bit 22: Accessing While Busy Interrupt */ -#define SMC_INT_NFCASE (1 << 23) /* Bit 23: NFC Access Size Error Interrupt */ -#define SMC_INT_RBEDGE(n) (1<<((n)+24)) -#define SMC_INT_RB_EDGE0 (1 << 24) /* Bit 24: Ready/Busy Line 0 Interrupt */ -#define SMC_INT_RB_EDGE1 (1 << 25) /* Bit 25: Ready/Busy Line 1 Interrupt */ -#define SMC_INT_RB_EDGE2 (1 << 26) /* Bit 26: Ready/Busy Line 2 Interrupt */ -#define SMC_INT_RB_EDGE3 (1 << 27) /* Bit 27: Ready/Busy Line 3 Interrupt */ -#define SMC_INT_RB_EDGE4 (1 << 28) /* Bit 28: Ready/Busy Line 4 Interrupt */ -#define SMC_INT_RB_EDGE5 (1 << 29) /* Bit 29: Ready/Busy Line 5 Interrupt */ -#define SMC_INT_RB_EDGE6 (1 << 30) /* Bit 30: Ready/Busy Line 6 Interrupt */ -#define SMC_INT_RB_EDGE7 (1 << 31) /* Bit 31: Ready/Busy Line 7 Interrupt */ - -/* SMC NFC Address Cycle Zero Register */ - -#define SMC_ADDR_ADDR_CYCLE0_SHIFT (3) /* Bits 0-7: NAND Flash Array Address cycle 0 */ -#define SMC_ADDR_ADDR_CYCLE0_SHIFT (3) /* Bits 0-7: NAND Flash Array Address cycle 0 */ - -/* SMC NFC Bank Register */ - -#define SMC_BANK_SHIFT (0) /* Bits 0-2: Bank identifier */ -#define SMC_BANK_MASK (7 << SMC_BANK_SHIFT) - -/* SMC ECC Control Register */ - -#define SMC_ECCCTRL_RST (1 << 0) /* Bit 0: Reset ECC */ -#define SMC_ECCCTRL_SWRST (1 << 1) /* Bit 1: Software Reset */ - -/* SMC ECC MODE Register */ - -#define SMC_ECCMD_ECC_PAGESIZE_SHIFT (0) /* Bits 0-1 */ -#define SMC_ECCMD_ECC_PAGESIZE_MASK (3 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) -# define SMC_ECCMD_ECC_PAGESIZE_528 (0 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) -# define SMC_ECCMD_ECC_PAGESIZE_1056 (1 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) -# define SMC_ECCMD_ECC_PAGESIZE_2112 (2 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) -# define SMC_ECCMD_ECC_PAGESIZE_4224 (3 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) -#define SMC_ECCMD_TYPCORREC_SHIFT (4) /* Bits 4-5: type of correction */ -#define SMC_ECCMD_TYPCORREC_MASK (3 << SMC_ECCMD_TYPCORREC_SHIFT) -# define SMC_ECCMD_TYPCORREC_PAGE (0 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for a page */ -# define SMC_ECCMD_TYPCORREC_256 (1 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for 256 bytes */ -# define SMC_ECCMD_TYPCORREC_512 (2 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for 512 bytes */ - -/* SMC ECC Status Register 1 */ - -#define _RECERR (0) /* Recoverable Error */ -#define _ECCERR (1) /* ECC Error */ -#define _MULERR (2) /* Multiple Error */ - -#define SMC_ECCSR1_RECERR(n) (1 << (((n)<<4)+_RECERR)) -#define SMC_ECCSR1_ECCERR(n) (1 << (((n)<<4)+_ECCERR)) -#define SMC_ECCSR1_MULERR(n) (1 << (((n)<<4)+_MULERR)) - -#define SMC_ECCSR1_RECERR0 SMC_ECCSR1_RECERR(0) -#define SMC_ECCSR1_ECCERR0 SMC_ECCSR1_ECCERR(0) -#define SMC_ECCSR1_MULERR0 SMC_ECCSR1_MULERR(0) -#define SMC_ECCSR1_RECERR1 SMC_ECCSR1_RECERR(1) -#define SMC_ECCSR1_ECCERR1 SMC_ECCSR1_ECCERR(1) -#define SMC_ECCSR1_MULERR1 SMC_ECCSR1_MULERR(1) -#define SMC_ECCSR1_RECERR2 SMC_ECCSR1_RECERR(2) -#define SMC_ECCSR1_ECCERR2 SMC_ECCSR1_ECCERR(2) -#define SMC_ECCSR1_MULERR2 SMC_ECCSR1_MULERR(2) -#define SMC_ECCSR1_RECERR3 SMC_ECCSR1_RECERR(3) -#define SMC_ECCSR1_ECCERR3 SMC_ECCSR1_ECCERR(3) -#define SMC_ECCSR1_MULERR3 SMC_ECCSR1_MULERR(3) -#define SMC_ECCSR1_RECERR4 SMC_ECCSR1_RECERR(4) -#define SMC_ECCSR1_ECCERR4 SMC_ECCSR1_ECCERR(4) -#define SMC_ECCSR1_MULERR4 SMC_ECCSR1_MULERR(4) -#define SMC_ECCSR1_RECERR5 SMC_ECCSR1_RECERR(5) -#define SMC_ECCSR1_ECCERR5 SMC_ECCSR1_ECCERR(5) -#define SMC_ECCSR1_MULERR5 SMC_ECCSR1_MULERR(5) -#define SMC_ECCSR1_RECERR6 SMC_ECCSR1_RECERR(6) -#define SMC_ECCSR1_ECCERR6 SMC_ECCSR1_ECCERR(6) -#define SMC_ECCSR1_MULERR6 SMC_ECCSR1_MULERR(6) -#define SMC_ECCSR1_RECERR7 SMC_ECCSR1_RECERR(7) -#define SMC_ECCSR1_ECCERR7 SMC_ECCSR1_ECCERR(7) -#define SMC_ECCSR1_MULERR7 SMC_ECCSR1_MULERR(7) - -/* SMC ECC Status Register 2 */ - -#define SMC_ECCSR2_RECERR(n) (1 << ((((n)-8)<<4)+_RECERR)) -#define SMC_ECCSR2_ECCERR(n) (1 << ((((n)-8)<<4)+_ECCERR)) -#define SMC_ECCSR2_MULERR(n) (1 << ((((n)-8)<<4)+_MULERR)) - -#define SMC_ECCSR2_RECERR8 SMC_ECCSR2_RECERR(8) -#define SMC_ECCSR2_ECCERR8 SMC_ECCSR2_ECCERR(8) -#define SMC_ECCSR2_MULERR8 SMC_ECCSR2_MULERR(8) -#define SMC_ECCSR2_RECERR9 SMC_ECCSR2_RECERR(9) -#define SMC_ECCSR2_ECCERR9 SMC_ECCSR2_ECCERR(9) -#define SMC_ECCSR2_MULERR9 SMC_ECCSR2_MULERR(9) -#define SMC_ECCSR2_RECERR10 SMC_ECCSR2_RECERR(10) -#define SMC_ECCSR2_ECCERR10 SMC_ECCSR2_ECCERR(10) -#define SMC_ECCSR2_MULERR10 SMC_ECCSR2_MULERR(10) -#define SMC_ECCSR2_RECERR11 SMC_ECCSR2_RECERR(11) -#define SMC_ECCSR2_ECCERR11 SMC_ECCSR2_ECCERR(11) -#define SMC_ECCSR2_MULERR11 SMC_ECCSR2_MULERR(11) -#define SMC_ECCSR2_RECERR12 SMC_ECCSR2_RECERR(12) -#define SMC_ECCSR2_ECCERR12 SMC_ECCSR2_ECCERR(12) -#define SMC_ECCSR2_MULERR12 SMC_ECCSR2_MULERR(12) -#define SMC_ECCSR2_RECERR13 SMC_ECCSR2_RECERR(13) -#define SMC_ECCSR2_ECCERR13 SMC_ECCSR2_ECCERR(13) -#define SMC_ECCSR2_MULERR13 SMC_ECCSR2_MULERR(13) -#define SMC_ECCSR1_RECERR14 SMC_ECCSR2_RECERR(14) -#define SMC_ECCSR1_ECCERR14 SMC_ECCSR2_ECCERR(14) -#define SMC_ECCSR1_MULERR14 SMC_ECCSR2_MULERR(14) -#define SMC_ECCSR1_RECERR15 SMC_ECCSR2_RECERR(15) -#define SMC_ECCSR1_ECCERR15 SMC_ECCSR2_ECCERR(15) -#define SMC_ECCSR1_MULERR15 SMC_ECCSR2_MULERR(15) - -/* Registers for 1 ECC for a page of 512/1024/2048/4096 bytes */ -/* SMC_ECC_PR0 */ - -#define SMC_ECCPR0_BITADDR_SHIFT (0) /* Bits 0-3: Bit Address */ -#define SMC_ECCPR0_BITADDR_MASK (15 << SMC_ECCPR0_BITADDR_SHIFT) -#define SMC_ECCPR0_WORDADDR_SHIFT (4) /* Bits 4-15: Word Address */ -#define SMC_ECCPR0_WORDADDR_MASK (0xfff << SMC_ECCPR0_WORDADDR_SHIFT) - -#define SMC_ECCPR1_NPARITY_SHIFT (0) /* Bits 0-15 */ -#define SMC_ECCPR1_NPARITY_MASK (0xffff << SMC_ECCPR1_NPARITY_SHIFT) - -/* Registers for 1 ECC per 512 bytes for a page of 512/2048/4096 bytes, 8-bit word */ - -#define SMC_ECCPR512_BITADDR_SHIFT (0) /* Bits 0-3: Bit Address */ -#define SMC_ECCPR512_BITADDR_MASK (15 << SMC_ECCPR512_BITADDR_SHIFT) -#define SMC_ECCPR512_WORDADDR_SHIFT (4) /* Bits 4-15: Word Address */ -#define SMC_ECCPR512_WORDADDR_MASK (0xfff << SMC_ECCPR512_WORDADDR_SHIFT) -#define SMC_ECCPR512_NPARITY_SHIFT (12) /* Bits 12-23 (or is it 31?) */ -#define SMC_ECCPR512_NPARITY_MASK (0xfff << SMC_ECCPR512_NPARITY_SHIFT) - -/* Registers for 1 ECC per 256 bytes for a page of 512/2048/4096 bytes, 8-bit word */ - -#define SMC_ECCPR256_BITADDR_SHIFT (0) /* Bits 0-2: Bit Address */ -#define SMC_ECCPR256_BITADDR_MASK (7 << SMC_ECCPR256_BITADDR_SHIFT) -#define SMC_ECCPR256_WORDADDR_SHIFT (4) /* Bits 4-10: Word Address */ -#define SMC_ECCPR256_WORDADDR_MASK (0x7f << SMC_ECCPR256_WORDADDR_SHIFT) -#define SMC_ECCPR256_NPARITY_SHIFT (12) /* Bits 12-22 */ -#define SMC_ECCPR256_NPARITY_MASK (0x7ff << SMC_ECCPR256_NPARITY_SHIFT) - -/* SMC Setup Register */ - -#define SMCCS_SETUP_NWESETUP_SHIFT (0) /* Bits 0-5: NWE Setup length */ -#define SMCCS_SETUP_NWESETUP_MASK (63 << SMCCS_SETUP_NWESETUP_SHIFT) -#define SMCCS_SETUP_NCSWRSETUP_SHIFT (8) /* Bits 8-13: NCS Setup length in Write access */ -#define SMCCS_SETUP_NCSWRSETUP_MASK (63 << SMCCS_SETUP_NCSWRSETUP_SHIFT) -#define SMCCS_SETUP_NRDSETUP_SHIFT (16) /* Bits 16-21: NRD Setup length */ -#define SMCCS_SETUP_NRDSETUP_MASK (63 << SMCCS_SETUP_NRDSETUP_SHIFT) -#define SMCCS_SETUP_NCSRDSETUP_SHIFT (24) /* Bits 24-29: NCS Setup length in Read access */ -#define SMCCS_SETUP_NCSRDSETUP_MASK (63 << SMCCS_SETUP_NCSRDSETUP_SHIFT) - -/* SMC Pulse Register */ - -#define SMCCS_PULSE_NWEPULSE_SHIFT (0) /* Bits 0-5: NWE Pulse Length */ -#define SMCCS_PULSE_NWEPULSE_MASK (63 << SMCCS_PULSE_NWEPULSE_SHIFT) -#define SMCCS_PULSE_NCSWRPULSE_SHIFT (8) /* Bits 8-13: NCS Pulse Length in WRITE Access */ -#define SMCCS_PULSE_NCSWRPULSE_MASK (63 << SMCCS_PULSE_NCSWRPULSE_SHIFT) -#define SMCCS_PULSE_RDPULSE_SHIFT (16) /* Bits 16-21: NRD Pulse Length */ -#define SMCCS_PULSE_RDPULSE_MASK (63 << SMCCS_PULSE_RDPULSE_SHIFT) -#define SMCCS_PULSE_NCSRDPULSE_SHIFT (24) /* Bits 24-29: NCS Pulse Length in READ Access */ -#define SMCCS_PULSE_NCSRDPULSE_MASK (63 << SMCCS_PULSE_NCSRDPULSE_SHIFT) - -/* SMC Cycle Register */ - -#define SMCCS_CYCLE_NWECYCLE_SHIFT (0) /* Bits 0-8: Total Write Cycle Length */ -#define SMCCS_CYCLE_NWECYCLE_MASK (0x1ff << SMCCS_CYCLE_NWECYCLE_SHIFT) -#define SMCCS_CYCLE_NRDCYCLE_SHIFT (16) /* Bits 16-24: Total Read Cycle Length */ -#define SMCCS_CYCLE_NRDCYCLE_MASK (0x1ff << SMCCS_CYCLE_NRDCYCLE_SHIFT) - -/* SMC Timings Register */ - -#define SMCCS_TIMINGS_TCLR_SHIFT (0) /* Bits 0-3: CLE to REN Low Delay */ -#define SMCCS_TIMINGS_TCLR_MASK (15 << SMCCS_TIMINGS_TCLR_SHIFT) -#define SMCCS_TIMINGS_TADL_SHIFT (4) /* Bits 4-7: ALE to Data Start */ -#define SMCCS_TIMINGS_TADL_MASK (15 << SMCCS_TIMINGS_TADL_SHIFT) -#define SMCCS_TIMINGS_TAR_SHIFT (8) /* Bits 8-11: ALE to REN Low Delay */ -#define SMCCS_TIMINGS_TAR_MASK (15 << SMCCS_TIMINGS_TAR_SHIFT) -#define SMCCS_TIMINGS_OCMS (1 << 12) /* Bit 12: Off Chip Memory Scrambling Enable */ -#define SMCCS_TIMINGS_TRR_SHIFT (16) /* Bits 16-19: Ready to REN Low Delay */ -#define SMCCS_TIMINGS_TRR_MASK (15 << SMCCS_TIMINGS_TRR_SHIFT) -#define SMCCS_TIMINGS_TWB_SHIFT (24) /* Bits 24-27: WEN High to REN to Busy */ -#define SMCCS_TIMINGS_TWB_MASK (15 << SMCCS_TIMINGS_TWB_SHIFT) -#define SMCCS_TIMINGS_RBNSEL_SHIFT (28) /* Bits 28-30: Ready/Busy Line Selection */ -#define SMCCS_TIMINGS_RBNSEL_MASK (7 << SMCCS_TIMINGS_RBNSEL_SHIFT) -#define SMCCS_TIMINGS_NFSEL (1 << 31) /* Bit 31: NAND Flash Selection */ - -/* SMC Mode Register */ - -#define SMCCS_MODE_READMODE (1 << 0) /* Bit 0: Read mode */ -#define SMCCS_MODE_WRITEMODE (1 << 1) /* Bit 1: Write mode */ -#define SMCCS_MODE_EXNWMODE_SHIFT (4) /* Bits 4-5: NWAIT Mode */ -#define SMCCS_MODE_EXNWMODE_MASK (3 << SMCCS_MODE_EXNWMODE_SHIFT) -# define SMCCS_EXNWMODE_DISABLED (0 << SMCCS_MODE_EXNWMODE_SHIFT) -# define SMCCS_EXNWMODE_FROZEN (2 << SMCCS_MODE_EXNWMODE_SHIFT) -# define SMCCS_EXNWMODE_READY (3 << SMCCS_MODE_EXNWMODE_SHIFT) -#define SMCCS_MODE_BAT (1 << 8) /* Bit 8: Byte Access Type */ -#define SMCCS_MODE_DBW_SHIFT (12) /* Bits 12-13: Data Bus Width */ -#define SMCCS_MODE_DBW_MASK (3 << SMCCS_MODE_DBW_SHIFT) -# define SMCCS_MODE_DBW_8BITS (0 << 12) /* 8 bits */ -# define SMCCS_MODE_DBW_16BITS (1 << 12) /* 16 bits */ -# define SMCCS_MODE_DBW_32BITS (2 << 12) /* 32 bits */ -#define SMCCS_MODE_TDFCYCLES_SHIFT (16) /* Bits 16-19: Data Float Time */ -#define SMCCS_MODE_TDFCYCLES_MASK (15 << SMCCS_MODE_TDFCYCLES_SHIFT) -#define SMCCS_MODE_TDFMODE (1 << 20) /* Bit 20: TDF Optimization */ -#define SMCCS_MODE_PMEN (1 << 24) /* Bit 24: Page Mode Enabled */ -#define SMCCS_MODE_PS_SHIFT (28) /* Bits 28-29: Page Size */ -#define SMCCS_MODE_PS_MASK (3 << SMCCS_MODE_PS_SHIFT) -# define SMCCS_MODE_PS_SIZE_4BYTES (0 << SMCCS_MODE_PS_SHIFT) /* 4 bytes */ -# define SMCCS_MODE_PS_SIZE_8BYTES (1 << SMCCS_MODE_PS_SHIFT) /* 8 bytes */ -# define SMCCS_MODE_PS_SIZE_16BYTES (2 << SMCCS_MODE_PS_SHIFT) /* 16 bytes */ -# define SMCCS_MODE_PS_SIZE_32BYTES (3 << SMCCS_MODE_PS_SHIFT) /* 32 bytes */ - -/* SMC OCMS Register */ - -#define SMC_OCMS_SMSE (1 << 0) /* Bit 0: Static Memory Controller Scrambling Enable */ -#define SMC_OCMS_SRSE (1 << 1) /* Bit 1: SRAM Scrambling Enable */ - -/* SMC Write Protection Control */ - -#define SMC_WPCR_WPPEN (1 << 9) /* Bit 9: Write Protection Enable */ -#define SMC_WPCR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protection KEY password */ -#define SMC_WPCR_WPKEY_MASK (0x00ffffff << SMC_WPCR_WPKEY_SHIFT) - -/* SMC Write Protection Status */ - -#define SMC_WPSR_PVS_SHIFT (0) /* Bits 0-3: Write Protection Violation Status */ -#define SMC_WPSR_PVS_MASK (15 << SMC_WPSR_PVS_SHIFT) -# define SMC_WPSR_PVS_NONE (0 << SMC_WPSR_PVS_SHIFT) /* No Write Protection Violation */ -# define SMC_WPSR_PVS_ RCREG (1 << SMC_WPSR_PVS_SHIFT) /* Attempt to write a control reg */ -# define SMC_WPSR_PVS_RESET (2 << SMC_WPSR_PVS_SHIFT) /* Software reset */ -# define SMC_WPSR_PVS_BOTH (3 << SMC_WPSR_PVS_SHIFT) /* Write + reset */ -#define SMC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protection Violation Source */ -#define SMC_WPSR_WPVSRC_MASK (0xffff << SMC_WPSR_WPVSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_smc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* SMC register offsets *****************************************************************/ + +#define SAM3U_SMC_CFG_OFFSET 0x000 /* SMC NFC Configuration Register */ +#define SAM3U_SMC_CTRL_OFFSET 0x004 /* SMC NFC Control Register */ +#define SAM3U_SMC_SR_OFFSET 0x008 /* SMC NFC Status Register */ +#define SAM3U_SMC_IER_OFFSET 0x00c /* SMC NFC Interrupt Enable Register */ +#define SAM3U_SMC_IDR_OFFSET 0x010 /* SMC NFC Interrupt Disable Register */ +#define SAM3U_SMC_IMR_OFFSET 0x014 /* SMC NFC Interrupt Mask Register */ +#define SAM3U_SMC_ADDR_OFFSET 0x018 /* SMC NFC Address Cycle Zero Register */ +#define SAM3U_SMC_BANK_OFFSET 0x01c /* SMC Bank Address Register */ +#define SAM3U_SMC_ECCCTRL_OFFSET 0x020 /* SMC ECC Control Register */ +#define SAM3U_SMC_ECCMD_OFFSET 0x024 /* SMC ECC Mode Register */ +#define SAM3U_SMC_ECCSR1_OFFSET 0x028 /* SMC ECC Status 1 Register */ +#define SAM3U_SMC_ECCPR0_OFFSET 0x02c /* SMC ECC parity 0 Register */ +#define SAM3U_SMC_ECCPR1_OFFSET 0x030 /* SMC ECC parity 1 Register */ +#define SAM3U_SMC_ECCSR2_OFFSET 0x034 /* SMC ECC status 2 Register */ +#define SAM3U_SMC_ECCPR2_OFFSET 0x038 /* SMC ECC parity 2 Register */ +#define SAM3U_SMC_ECCPR3_OFFSET 0x03c /* SMC ECC parity 3 Register */ +#define SAM3U_SMC_ECCPR4_OFFSET 0x040 /* SMC ECC parity 4 Register */ +#define SAM3U_SMC_ECCPR5_OFFSET 0x044 /* SMC ECC parity 5 Register */ +#define SAM3U_SMC_ECCPR6_OFFSET 0x048 /* SMC ECC parity 6 Register */ +#define SAM3U_SMC_ECCPR7_OFFSET 0x04c /* SMC ECC parity 7 Register */ +#define SAM3U_SMC_ECCPR8_OFFSET 0x050 /* SMC ECC parity 8 Register */ +#define SAM3U_SMC_ECCPR9_OFFSET 0x054 /* SMC ECC parity 9 Register */ +#define SAM3U_SMC_ECCPR10_OFFSET 0x058 /* SMC ECC parity 10 Register */ +#define SAM3U_SMC_ECCPR11_OFFSET 0x05c /* SMC ECC parity 11 Register */ +#define SAM3U_SMC_ECCPR12_OFFSET 0x060 /* SMC ECC parity 12 Register */ +#define SAM3U_SMC_ECCPR13_OFFSET 0x064 /* SMC ECC parity 13 Register */ +#define SAM3U_SMC_ECCPR14_OFFSET 0x068 /* SMC ECC parity 14 Register */ +#define SAM3U_SMC_ECCPR15_OFFSET 0x06c /* SMC ECC parity 15 Register */ + +#define SAM3U_SMCCS_OFFSET(n) (0x070+((n)*0x014)) +#define SAM3U_SMCCS_SETUP_OFFSET 0x000 /* SMC SETUP Register */ +#define SAM3U_SMCCS_PULSE_OFFSET 0x004 /* SMC PULSE Register */ +#define SAM3U_SMCCS_CYCLE_OFFSET 0x008 /* SMC CYCLE Register */ +#define SAM3U_SMCCS_TIMINGS_OFFSET 0x00c /* SMC TIMINGS Register */ +#define SAM3U_SMCCS_MODE_OFFSET 0x010 /* SMC MODE Register */ + +#define SAM3U_SMC_OCMS_OFFSET 0x110 /* SMC OCMS MODE Register */ +#define SAM3U_SMC_KEY1_OFFSET 0x114 /* SMC KEY1 Register */ +#define SAM3U_SMC_KEY2_OFFSET 0x118 /* SMC KEY2 Register */ +#define SAM3U_SMC_WPCR_OFFSET 0x1e4 /* Write Protection Control Register */ +#define SAM3U_SMC_WPSR_OFFSET 0x1e8 /* Write Protection Status Register */ + +/* SMC register adresses ****************************************************************/ + +#define SAM3U_SMC_CFG (SAM3U_SMC_BASE+SAM3U_SMC_CFG_OFFSET) +#define SAM3U_SMC_CTRL (SAM3U_SMC_BASE+SAM3U_SMC_CTRL_OFFSET) +#define SAM3U_SMC_SR (SAM3U_SMC_BASE+SAM3U_SMC_SR_OFFSET) +#define SAM3U_SMC_IER (SAM3U_SMC_BASE+SAM3U_SMC_IER_OFFSET) +#define SAM3U_SMC_IDR (SAM3U_SMC_BASE+SAM3U_SMC_IDR_OFFSET) +#define SAM3U_SMC_IMR (SAM3U_SMC_BASE+SAM3U_SMC_IMR_OFFSET) +#define SAM3U_SMC_ADDR (SAM3U_SMC_BASE+SAM3U_SMC_ADDR_OFFSET) +#define SAM3U_SMC_BANK (SAM3U_SMC_BASE+SAM3U_SMC_BANK_OFFSET) +#define SAM3U_SMC_ECCCTRL (SAM3U_SMC_BASE+SAM3U_SMC_ECCCTRL_OFFSET) +#define SAM3U_SMC_ECCMD (SAM3U_SMC_BASE+SAM3U_SMC_ECCMD_OFFSET) +#define SAM3U_SMC_ECCSR1 (SAM3U_SMC_BASE+SAM3U_SMC_ECCSR1_OFFSET) +#define SAM3U_SMC_ECCPR0 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR0_OFFSET) +#define SAM3U_SMC_ECCPR1 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR1_OFFSET) +#define SAM3U_SMC_ECCSR2 (SAM3U_SMC_BASE+SAM3U_SMC_ECCSR2_OFFSET) +#define SAM3U_SMC_ECCPR2 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR2_OFFSET) +#define SAM3U_SMC_ECCPR3 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR3_OFFSET) +#define SAM3U_SMC_ECCPR4 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR4_OFFSET) +#define SAM3U_SMC_ECCPR5 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR5_OFFSET) +#define SAM3U_SMC_ECCPR6 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR6_OFFSET) +#define SAM3U_SMC_ECCPR7 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR7_OFFSET) +#define SAM3U_SMC_ECCPR8 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR8_OFFSET) +#define SAM3U_SMC_ECCPR9 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR9_OFFSET) +#define SAM3U_SMC_ECCPR10 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR10_OFFSET) +#define SAM3U_SMC_ECCPR11 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR11_OFFSET) +#define SAM3U_SMC_ECCPR12 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR12_OFFSET) +#define SAM3U_SMC_ECCPR13 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR13_OFFSET) +#define SAM3U_SMC_ECCPR14 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR14_OFFSET) +#define SAM3U_SMC_ECCPR15 (SAM3U_SMC_BASE+SAM3U_SMC_ECCPR15_OFFSET) + +#define SAM3U_SMCCS_BASE(n) (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(n)) +# define SAM3U_SMC_CS0_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(0)) +# define SAM3U_SMC_CS1_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(1)) +# define SAM3U_SMC_CS2_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(2)) +# define SAM3U_SMC_CS3_BASE (SAM3U_SMC_BASE+SAM3U_SMCCS_OFFSET(3)) +#define SAM3U_SMCCS_SETUP(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_SETUP_OFFSET) +#define SAM3U_SMCCS_PULSE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_PULSE_OFFSET) +#define SAM3U_SMCCS_CYCLE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_CYCLE_OFFSET) +#define SAM3U_SMCCS_TIMINGS(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_TIMINGS_OFFSET) +#define SAM3U_SMCCS_MODE(n) (SAM3U_SMCCS_BASE(n)+SAM3U_SMCCS_MODE_OFFSET) + +#define SAM3U_SMC_OCMS (SAM3U_SMC_BASE+SAM3U_SMC_OCMS_OFFSET) +#define SAM3U_SMC_KEY1 (SAM3U_SMC_BASE+SAM3U_SMC_KEY1_OFFSET) +#define SAM3U_SMC_KEY2 (SAM3U_SMC_BASE+SAM3U_SMC_KEY2_OFFSET) +#define SAM3U_SMC_WPCR (SAM3U_SMC_BASE+SAM3U_SMC_WPCR_OFFSET) +#define SAM3U_SMC_WPSR (SAM3U_SMC_BASE+SAM3U_SMC_WPSR_OFFSET) + +/* SMC register bit definitions *********************************************************/ + +/* SMC NFC Configuration Register */ + +#define SMC_CFG_PAGESIZE_SHIFT (0) /* Bits 0-1: Page size of NAND Flash device */ +#define SMC_CFG_PAGESIZE_MASK (3 << SMC_CFG_PAGESIZE_SHIFT) +# define SMC_CFG_PAGESIZE_16 BYTES (0 << SMC_CFG_PAGESIZE_SHIFT) /* 528 Bytes 16 byte */ +# define SMC_CFG_PAGESIZE_ 2 BYTES (1 << SMC_CFG_PAGESIZE_SHIFT) /* 1056 Bytes 32 bytes */ +# define SMC_CFG_PAGESIZE_64 BYTES (2 << SMC_CFG_PAGESIZE_SHIFT) /* 2112 Bytes 64 bytes */ +# define SMC_CFG_PAGESIZE_128 BYTES (3 << SMC_CFG_PAGESIZE_SHIFT) /* 4224 Bytes 128 bytes */ +#define SMC_CFG_WSPARE (1 << 8) /* Bit 8: Write Spare Area */ +#define SMC_CFG_RSPARE (1 << 9) /* Bit 9: Read Spare Area */ +#define SMC_CFG_EDGECTRL (1 << 12) /* Bit 12: Rising/Falling Edge Detection Control */ +#define SMC_CFG_RBEDGE (1 << 13) /* Bit 13: Ready/Busy Signal Edge Detection */ +#define SMC_CFG_DTOCYC_SHIFT (16) /* Bits 16-19: Data Timeout Cycle Number */ +#define SMC_CFG_DTOCYC_MASK (15 << SMC_CFG_DTOCYC_SHIFT) +#define SMC_CFG_DTOMUL_SHIFT (20) /* Bits 20-22: Data Timeout Multiplier */ +#define SMC_CFG_DTOMUL_MASK (7 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_1 (0 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_16 (1 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_128 (2 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_256 (3 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_1024 (4 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_4096 (5 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_65536 (6 << SMC_CFG_DTOMUL_SHIFT) +# define SMC_CFG_DTOMUL_1048576 (7 << SMC_CFG_DTOMUL_SHIFT) + +/* SMC NFC Control Register */ + +#define SMC_CTRL_NFCEN (1 << 0) /* Bit 0: NAND Flash Controller Enable */ +#define SMC_CTRL_NFCDIS (1 << 1) /* Bit 1: NAND Flash Controller Disable */ + +/* SMC NFC Status Register, SMC NFC Interrupt Enable Register, SMC NFC Interrupt + * Disable Register, and SMC NFC Interrupt Mask Register common bit-field definitions + */ + +#define SMC_SR_SMCSTS (1 << 0) /* Bit 0: NAND Flash Controller status (SR only) */ +#define SMC_INT_RBRISE (1 << 4) /* Bit 4: Ready Busy Rising Edge Detection Interrupt */ +#define SMC_INT_RBFALL (1 << 5) /* Bit 5: Ready Busy Falling Edge Detection Interrupt */ +#define SMC_SR_NFCBUSY (1 << 8) /* Bit 8: NFC Busy (SR only) */ +#define SMC_SR_NFCWR (1 << 11) /* Bit 11: NFC Write/Read Operation (SR only) */ +#define SMC_SR_NFCSID (1 << 12) /* Bit 13: NFC Chip Select ID (SR only) */ +#define SMC_INT_XFRDONE (1 << 16) /* Bit 16: Transfer Done Interrupt */ +#define SMC_INT_CMDDONE (1 << 17) /* Bit 17: Command Done Interrupt */ +#define SMC_INT_DTOE (1 << 20) /* Bit 20: Data Timeout Error Interrupt */ +#define SMC_INT_UNDEF (1 << 21) /* Bit 21: Undefined Area Access Interrupt */ +#define SMC_INT_AWB (1 << 22) /* Bit 22: Accessing While Busy Interrupt */ +#define SMC_INT_NFCASE (1 << 23) /* Bit 23: NFC Access Size Error Interrupt */ +#define SMC_INT_RBEDGE(n) (1<<((n)+24)) +#define SMC_INT_RB_EDGE0 (1 << 24) /* Bit 24: Ready/Busy Line 0 Interrupt */ +#define SMC_INT_RB_EDGE1 (1 << 25) /* Bit 25: Ready/Busy Line 1 Interrupt */ +#define SMC_INT_RB_EDGE2 (1 << 26) /* Bit 26: Ready/Busy Line 2 Interrupt */ +#define SMC_INT_RB_EDGE3 (1 << 27) /* Bit 27: Ready/Busy Line 3 Interrupt */ +#define SMC_INT_RB_EDGE4 (1 << 28) /* Bit 28: Ready/Busy Line 4 Interrupt */ +#define SMC_INT_RB_EDGE5 (1 << 29) /* Bit 29: Ready/Busy Line 5 Interrupt */ +#define SMC_INT_RB_EDGE6 (1 << 30) /* Bit 30: Ready/Busy Line 6 Interrupt */ +#define SMC_INT_RB_EDGE7 (1 << 31) /* Bit 31: Ready/Busy Line 7 Interrupt */ + +/* SMC NFC Address Cycle Zero Register */ + +#define SMC_ADDR_ADDR_CYCLE0_SHIFT (3) /* Bits 0-7: NAND Flash Array Address cycle 0 */ +#define SMC_ADDR_ADDR_CYCLE0_SHIFT (3) /* Bits 0-7: NAND Flash Array Address cycle 0 */ + +/* SMC NFC Bank Register */ + +#define SMC_BANK_SHIFT (0) /* Bits 0-2: Bank identifier */ +#define SMC_BANK_MASK (7 << SMC_BANK_SHIFT) + +/* SMC ECC Control Register */ + +#define SMC_ECCCTRL_RST (1 << 0) /* Bit 0: Reset ECC */ +#define SMC_ECCCTRL_SWRST (1 << 1) /* Bit 1: Software Reset */ + +/* SMC ECC MODE Register */ + +#define SMC_ECCMD_ECC_PAGESIZE_SHIFT (0) /* Bits 0-1 */ +#define SMC_ECCMD_ECC_PAGESIZE_MASK (3 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) +# define SMC_ECCMD_ECC_PAGESIZE_528 (0 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) +# define SMC_ECCMD_ECC_PAGESIZE_1056 (1 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) +# define SMC_ECCMD_ECC_PAGESIZE_2112 (2 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) +# define SMC_ECCMD_ECC_PAGESIZE_4224 (3 << SMC_ECCMD_ECC_PAGESIZE_SHIFT) +#define SMC_ECCMD_TYPCORREC_SHIFT (4) /* Bits 4-5: type of correction */ +#define SMC_ECCMD_TYPCORREC_MASK (3 << SMC_ECCMD_TYPCORREC_SHIFT) +# define SMC_ECCMD_TYPCORREC_PAGE (0 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for a page */ +# define SMC_ECCMD_TYPCORREC_256 (1 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for 256 bytes */ +# define SMC_ECCMD_TYPCORREC_512 (2 << SMC_ECCMD_TYPCORREC_SHIFT) /* 1 bit correction for 512 bytes */ + +/* SMC ECC Status Register 1 */ + +#define _RECERR (0) /* Recoverable Error */ +#define _ECCERR (1) /* ECC Error */ +#define _MULERR (2) /* Multiple Error */ + +#define SMC_ECCSR1_RECERR(n) (1 << (((n)<<4)+_RECERR)) +#define SMC_ECCSR1_ECCERR(n) (1 << (((n)<<4)+_ECCERR)) +#define SMC_ECCSR1_MULERR(n) (1 << (((n)<<4)+_MULERR)) + +#define SMC_ECCSR1_RECERR0 SMC_ECCSR1_RECERR(0) +#define SMC_ECCSR1_ECCERR0 SMC_ECCSR1_ECCERR(0) +#define SMC_ECCSR1_MULERR0 SMC_ECCSR1_MULERR(0) +#define SMC_ECCSR1_RECERR1 SMC_ECCSR1_RECERR(1) +#define SMC_ECCSR1_ECCERR1 SMC_ECCSR1_ECCERR(1) +#define SMC_ECCSR1_MULERR1 SMC_ECCSR1_MULERR(1) +#define SMC_ECCSR1_RECERR2 SMC_ECCSR1_RECERR(2) +#define SMC_ECCSR1_ECCERR2 SMC_ECCSR1_ECCERR(2) +#define SMC_ECCSR1_MULERR2 SMC_ECCSR1_MULERR(2) +#define SMC_ECCSR1_RECERR3 SMC_ECCSR1_RECERR(3) +#define SMC_ECCSR1_ECCERR3 SMC_ECCSR1_ECCERR(3) +#define SMC_ECCSR1_MULERR3 SMC_ECCSR1_MULERR(3) +#define SMC_ECCSR1_RECERR4 SMC_ECCSR1_RECERR(4) +#define SMC_ECCSR1_ECCERR4 SMC_ECCSR1_ECCERR(4) +#define SMC_ECCSR1_MULERR4 SMC_ECCSR1_MULERR(4) +#define SMC_ECCSR1_RECERR5 SMC_ECCSR1_RECERR(5) +#define SMC_ECCSR1_ECCERR5 SMC_ECCSR1_ECCERR(5) +#define SMC_ECCSR1_MULERR5 SMC_ECCSR1_MULERR(5) +#define SMC_ECCSR1_RECERR6 SMC_ECCSR1_RECERR(6) +#define SMC_ECCSR1_ECCERR6 SMC_ECCSR1_ECCERR(6) +#define SMC_ECCSR1_MULERR6 SMC_ECCSR1_MULERR(6) +#define SMC_ECCSR1_RECERR7 SMC_ECCSR1_RECERR(7) +#define SMC_ECCSR1_ECCERR7 SMC_ECCSR1_ECCERR(7) +#define SMC_ECCSR1_MULERR7 SMC_ECCSR1_MULERR(7) + +/* SMC ECC Status Register 2 */ + +#define SMC_ECCSR2_RECERR(n) (1 << ((((n)-8)<<4)+_RECERR)) +#define SMC_ECCSR2_ECCERR(n) (1 << ((((n)-8)<<4)+_ECCERR)) +#define SMC_ECCSR2_MULERR(n) (1 << ((((n)-8)<<4)+_MULERR)) + +#define SMC_ECCSR2_RECERR8 SMC_ECCSR2_RECERR(8) +#define SMC_ECCSR2_ECCERR8 SMC_ECCSR2_ECCERR(8) +#define SMC_ECCSR2_MULERR8 SMC_ECCSR2_MULERR(8) +#define SMC_ECCSR2_RECERR9 SMC_ECCSR2_RECERR(9) +#define SMC_ECCSR2_ECCERR9 SMC_ECCSR2_ECCERR(9) +#define SMC_ECCSR2_MULERR9 SMC_ECCSR2_MULERR(9) +#define SMC_ECCSR2_RECERR10 SMC_ECCSR2_RECERR(10) +#define SMC_ECCSR2_ECCERR10 SMC_ECCSR2_ECCERR(10) +#define SMC_ECCSR2_MULERR10 SMC_ECCSR2_MULERR(10) +#define SMC_ECCSR2_RECERR11 SMC_ECCSR2_RECERR(11) +#define SMC_ECCSR2_ECCERR11 SMC_ECCSR2_ECCERR(11) +#define SMC_ECCSR2_MULERR11 SMC_ECCSR2_MULERR(11) +#define SMC_ECCSR2_RECERR12 SMC_ECCSR2_RECERR(12) +#define SMC_ECCSR2_ECCERR12 SMC_ECCSR2_ECCERR(12) +#define SMC_ECCSR2_MULERR12 SMC_ECCSR2_MULERR(12) +#define SMC_ECCSR2_RECERR13 SMC_ECCSR2_RECERR(13) +#define SMC_ECCSR2_ECCERR13 SMC_ECCSR2_ECCERR(13) +#define SMC_ECCSR2_MULERR13 SMC_ECCSR2_MULERR(13) +#define SMC_ECCSR1_RECERR14 SMC_ECCSR2_RECERR(14) +#define SMC_ECCSR1_ECCERR14 SMC_ECCSR2_ECCERR(14) +#define SMC_ECCSR1_MULERR14 SMC_ECCSR2_MULERR(14) +#define SMC_ECCSR1_RECERR15 SMC_ECCSR2_RECERR(15) +#define SMC_ECCSR1_ECCERR15 SMC_ECCSR2_ECCERR(15) +#define SMC_ECCSR1_MULERR15 SMC_ECCSR2_MULERR(15) + +/* Registers for 1 ECC for a page of 512/1024/2048/4096 bytes */ +/* SMC_ECC_PR0 */ + +#define SMC_ECCPR0_BITADDR_SHIFT (0) /* Bits 0-3: Bit Address */ +#define SMC_ECCPR0_BITADDR_MASK (15 << SMC_ECCPR0_BITADDR_SHIFT) +#define SMC_ECCPR0_WORDADDR_SHIFT (4) /* Bits 4-15: Word Address */ +#define SMC_ECCPR0_WORDADDR_MASK (0xfff << SMC_ECCPR0_WORDADDR_SHIFT) + +#define SMC_ECCPR1_NPARITY_SHIFT (0) /* Bits 0-15 */ +#define SMC_ECCPR1_NPARITY_MASK (0xffff << SMC_ECCPR1_NPARITY_SHIFT) + +/* Registers for 1 ECC per 512 bytes for a page of 512/2048/4096 bytes, 8-bit word */ + +#define SMC_ECCPR512_BITADDR_SHIFT (0) /* Bits 0-3: Bit Address */ +#define SMC_ECCPR512_BITADDR_MASK (15 << SMC_ECCPR512_BITADDR_SHIFT) +#define SMC_ECCPR512_WORDADDR_SHIFT (4) /* Bits 4-15: Word Address */ +#define SMC_ECCPR512_WORDADDR_MASK (0xfff << SMC_ECCPR512_WORDADDR_SHIFT) +#define SMC_ECCPR512_NPARITY_SHIFT (12) /* Bits 12-23 (or is it 31?) */ +#define SMC_ECCPR512_NPARITY_MASK (0xfff << SMC_ECCPR512_NPARITY_SHIFT) + +/* Registers for 1 ECC per 256 bytes for a page of 512/2048/4096 bytes, 8-bit word */ + +#define SMC_ECCPR256_BITADDR_SHIFT (0) /* Bits 0-2: Bit Address */ +#define SMC_ECCPR256_BITADDR_MASK (7 << SMC_ECCPR256_BITADDR_SHIFT) +#define SMC_ECCPR256_WORDADDR_SHIFT (4) /* Bits 4-10: Word Address */ +#define SMC_ECCPR256_WORDADDR_MASK (0x7f << SMC_ECCPR256_WORDADDR_SHIFT) +#define SMC_ECCPR256_NPARITY_SHIFT (12) /* Bits 12-22 */ +#define SMC_ECCPR256_NPARITY_MASK (0x7ff << SMC_ECCPR256_NPARITY_SHIFT) + +/* SMC Setup Register */ + +#define SMCCS_SETUP_NWESETUP_SHIFT (0) /* Bits 0-5: NWE Setup length */ +#define SMCCS_SETUP_NWESETUP_MASK (63 << SMCCS_SETUP_NWESETUP_SHIFT) +#define SMCCS_SETUP_NCSWRSETUP_SHIFT (8) /* Bits 8-13: NCS Setup length in Write access */ +#define SMCCS_SETUP_NCSWRSETUP_MASK (63 << SMCCS_SETUP_NCSWRSETUP_SHIFT) +#define SMCCS_SETUP_NRDSETUP_SHIFT (16) /* Bits 16-21: NRD Setup length */ +#define SMCCS_SETUP_NRDSETUP_MASK (63 << SMCCS_SETUP_NRDSETUP_SHIFT) +#define SMCCS_SETUP_NCSRDSETUP_SHIFT (24) /* Bits 24-29: NCS Setup length in Read access */ +#define SMCCS_SETUP_NCSRDSETUP_MASK (63 << SMCCS_SETUP_NCSRDSETUP_SHIFT) + +/* SMC Pulse Register */ + +#define SMCCS_PULSE_NWEPULSE_SHIFT (0) /* Bits 0-5: NWE Pulse Length */ +#define SMCCS_PULSE_NWEPULSE_MASK (63 << SMCCS_PULSE_NWEPULSE_SHIFT) +#define SMCCS_PULSE_NCSWRPULSE_SHIFT (8) /* Bits 8-13: NCS Pulse Length in WRITE Access */ +#define SMCCS_PULSE_NCSWRPULSE_MASK (63 << SMCCS_PULSE_NCSWRPULSE_SHIFT) +#define SMCCS_PULSE_RDPULSE_SHIFT (16) /* Bits 16-21: NRD Pulse Length */ +#define SMCCS_PULSE_RDPULSE_MASK (63 << SMCCS_PULSE_RDPULSE_SHIFT) +#define SMCCS_PULSE_NCSRDPULSE_SHIFT (24) /* Bits 24-29: NCS Pulse Length in READ Access */ +#define SMCCS_PULSE_NCSRDPULSE_MASK (63 << SMCCS_PULSE_NCSRDPULSE_SHIFT) + +/* SMC Cycle Register */ + +#define SMCCS_CYCLE_NWECYCLE_SHIFT (0) /* Bits 0-8: Total Write Cycle Length */ +#define SMCCS_CYCLE_NWECYCLE_MASK (0x1ff << SMCCS_CYCLE_NWECYCLE_SHIFT) +#define SMCCS_CYCLE_NRDCYCLE_SHIFT (16) /* Bits 16-24: Total Read Cycle Length */ +#define SMCCS_CYCLE_NRDCYCLE_MASK (0x1ff << SMCCS_CYCLE_NRDCYCLE_SHIFT) + +/* SMC Timings Register */ + +#define SMCCS_TIMINGS_TCLR_SHIFT (0) /* Bits 0-3: CLE to REN Low Delay */ +#define SMCCS_TIMINGS_TCLR_MASK (15 << SMCCS_TIMINGS_TCLR_SHIFT) +#define SMCCS_TIMINGS_TADL_SHIFT (4) /* Bits 4-7: ALE to Data Start */ +#define SMCCS_TIMINGS_TADL_MASK (15 << SMCCS_TIMINGS_TADL_SHIFT) +#define SMCCS_TIMINGS_TAR_SHIFT (8) /* Bits 8-11: ALE to REN Low Delay */ +#define SMCCS_TIMINGS_TAR_MASK (15 << SMCCS_TIMINGS_TAR_SHIFT) +#define SMCCS_TIMINGS_OCMS (1 << 12) /* Bit 12: Off Chip Memory Scrambling Enable */ +#define SMCCS_TIMINGS_TRR_SHIFT (16) /* Bits 16-19: Ready to REN Low Delay */ +#define SMCCS_TIMINGS_TRR_MASK (15 << SMCCS_TIMINGS_TRR_SHIFT) +#define SMCCS_TIMINGS_TWB_SHIFT (24) /* Bits 24-27: WEN High to REN to Busy */ +#define SMCCS_TIMINGS_TWB_MASK (15 << SMCCS_TIMINGS_TWB_SHIFT) +#define SMCCS_TIMINGS_RBNSEL_SHIFT (28) /* Bits 28-30: Ready/Busy Line Selection */ +#define SMCCS_TIMINGS_RBNSEL_MASK (7 << SMCCS_TIMINGS_RBNSEL_SHIFT) +#define SMCCS_TIMINGS_NFSEL (1 << 31) /* Bit 31: NAND Flash Selection */ + +/* SMC Mode Register */ + +#define SMCCS_MODE_READMODE (1 << 0) /* Bit 0: Read mode */ +#define SMCCS_MODE_WRITEMODE (1 << 1) /* Bit 1: Write mode */ +#define SMCCS_MODE_EXNWMODE_SHIFT (4) /* Bits 4-5: NWAIT Mode */ +#define SMCCS_MODE_EXNWMODE_MASK (3 << SMCCS_MODE_EXNWMODE_SHIFT) +# define SMCCS_EXNWMODE_DISABLED (0 << SMCCS_MODE_EXNWMODE_SHIFT) +# define SMCCS_EXNWMODE_FROZEN (2 << SMCCS_MODE_EXNWMODE_SHIFT) +# define SMCCS_EXNWMODE_READY (3 << SMCCS_MODE_EXNWMODE_SHIFT) +#define SMCCS_MODE_BAT (1 << 8) /* Bit 8: Byte Access Type */ +#define SMCCS_MODE_DBW_SHIFT (12) /* Bits 12-13: Data Bus Width */ +#define SMCCS_MODE_DBW_MASK (3 << SMCCS_MODE_DBW_SHIFT) +# define SMCCS_MODE_DBW_8BITS (0 << 12) /* 8 bits */ +# define SMCCS_MODE_DBW_16BITS (1 << 12) /* 16 bits */ +# define SMCCS_MODE_DBW_32BITS (2 << 12) /* 32 bits */ +#define SMCCS_MODE_TDFCYCLES_SHIFT (16) /* Bits 16-19: Data Float Time */ +#define SMCCS_MODE_TDFCYCLES_MASK (15 << SMCCS_MODE_TDFCYCLES_SHIFT) +#define SMCCS_MODE_TDFMODE (1 << 20) /* Bit 20: TDF Optimization */ +#define SMCCS_MODE_PMEN (1 << 24) /* Bit 24: Page Mode Enabled */ +#define SMCCS_MODE_PS_SHIFT (28) /* Bits 28-29: Page Size */ +#define SMCCS_MODE_PS_MASK (3 << SMCCS_MODE_PS_SHIFT) +# define SMCCS_MODE_PS_SIZE_4BYTES (0 << SMCCS_MODE_PS_SHIFT) /* 4 bytes */ +# define SMCCS_MODE_PS_SIZE_8BYTES (1 << SMCCS_MODE_PS_SHIFT) /* 8 bytes */ +# define SMCCS_MODE_PS_SIZE_16BYTES (2 << SMCCS_MODE_PS_SHIFT) /* 16 bytes */ +# define SMCCS_MODE_PS_SIZE_32BYTES (3 << SMCCS_MODE_PS_SHIFT) /* 32 bytes */ + +/* SMC OCMS Register */ + +#define SMC_OCMS_SMSE (1 << 0) /* Bit 0: Static Memory Controller Scrambling Enable */ +#define SMC_OCMS_SRSE (1 << 1) /* Bit 1: SRAM Scrambling Enable */ + +/* SMC Write Protection Control */ + +#define SMC_WPCR_WPPEN (1 << 9) /* Bit 9: Write Protection Enable */ +#define SMC_WPCR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protection KEY password */ +#define SMC_WPCR_WPKEY_MASK (0x00ffffff << SMC_WPCR_WPKEY_SHIFT) + +/* SMC Write Protection Status */ + +#define SMC_WPSR_PVS_SHIFT (0) /* Bits 0-3: Write Protection Violation Status */ +#define SMC_WPSR_PVS_MASK (15 << SMC_WPSR_PVS_SHIFT) +# define SMC_WPSR_PVS_NONE (0 << SMC_WPSR_PVS_SHIFT) /* No Write Protection Violation */ +# define SMC_WPSR_PVS_ RCREG (1 << SMC_WPSR_PVS_SHIFT) /* Attempt to write a control reg */ +# define SMC_WPSR_PVS_RESET (2 << SMC_WPSR_PVS_SHIFT) /* Software reset */ +# define SMC_WPSR_PVS_BOTH (3 << SMC_WPSR_PVS_SHIFT) /* Write + reset */ +#define SMC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protection Violation Source */ +#define SMC_WPSR_WPVSRC_MASK (0xffff << SMC_WPSR_WPVSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SMC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_ssc.h b/nuttx/arch/arm/src/sam3u/sam3u_ssc.h index d4f848c138..5a5df824b1 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_ssc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_ssc.h @@ -1,292 +1,292 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_ssc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* SSC register offsets *****************************************************************/ - -#define SAM3U_SSC_CR_OFFSET 0x000 /* Control Register */ -#define SAM3U_SSC_CMR_OFFSET 0x004 /* Clock Mode Register */ - /* 0x008: Reserved */ - /* 0x00c: Reserved */ -#define SAM3U_SSC_RCMR_OFFSET 0x010 /* Receive Clock Mode Register */ -#define SAM3U_SSC_RFMR_OFFSET 0x014 /* Receive Frame Mode Register */ -#define SAM3U_SSC_TCMR_OFFSET 0x018 /* Transmit Clock Mode Register */ -#define SAM3U_SSC_TFMR_OFFSET 0x01c /* Transmit Frame Mode Register */ -#define SAM3U_SSC_RHR_OFFSET 0x020 /* Receive Holding Register */ -#define SAM3U_SSC_THR_OFFSET 0x024 /* Transmit Holding Register */ - /* 0x028: Reserved */ - /* 0x02c: Reserved */ -#define SAM3U_SSC_RSHR_OFFSET 0x030 /* Receive Sync. Holding Register */ -#define SAM3U_SSC_TSHR_OFFSET 0x034 /* Transmit Sync. Holding Register */ -#define SAM3U_SSC_RC0R_OFFSET 0x038 /* Receive Compare 0 Register */ -#define SAM3U_SSC_RC1R_OFFSET 0x03c /* Receive Compare 1 Register */ -#define SAM3U_SSC_SR_OFFSET 0x040 /* Status Register */ -#define SAM3U_SSC_IER_OFFSET 0x044 /* Interrupt Enable Register */ -#define SAM3U_SSC_IDR_OFFSET 0x048 /* Interrupt Disable Register */ -#define SAM3U_SSC_IMR_OFFSET 0x04c /* Interrupt Mask Register */ -#define SAM3U_SSC_WPMR_OFFSET 0x0e4 /* Write Protect Mode Register */ -#define SAM3U_SSC_WPSR_OFFSET 0x0e8 /* Write Protect Status Register */ - /* 0x050-0x0fc: Reserved */ - /* 0x100-0x124: Reserved */ - -/* SSC register adresses ****************************************************************/ - -#define SAM3U_SSC_CR (SAM3U_SSC_BASE+SAM3U_SSC_CR_OFFSET) -#define SAM3U_SSC_CMR (SAM3U_SSC_BASE+SAM3U_SSC_CMR_OFFSET) -#define SAM3U_SSC_RCMR (SAM3U_SSC_BASE+SAM3U_SSC_RCMR_OFFSET) -#define SAM3U_SSC_RFMR (SAM3U_SSC_BASE+SAM3U_SSC_RFMR_OFFSET) -#define SAM3U_SSC_TCMR (SAM3U_SSC_BASE+SAM3U_SSC_TCMR_OFFSET) -#define SAM3U_SSC_TFMR (SAM3U_SSC_BASE+SAM3U_SSC_TFMR_OFFSET) -#define SAM3U_SSC_RHR (SAM3U_SSC_BASE+SAM3U_SSC_RHR_OFFSET) -#define SAM3U_SSC_THR (SAM3U_SSC_BASE+SAM3U_SSC_THR_OFFSET) -#define SAM3U_SSC_RSHR (SAM3U_SSC_BASE+SAM3U_SSC_RSHR_OFFSET) -#define SAM3U_SSC_TSHR (SAM3U_SSC_BASE+SAM3U_SSC_TSHR_OFFSET) -#define SAM3U_SSC_RC0R (SAM3U_SSC_BASE+SAM3U_SSC_RC0R_OFFSET) -#define SAM3U_SSC_RC1R (SAM3U_SSC_BASE+SAM3U_SSC_RC1R_OFFSET) -#define SAM3U_SSC_SR (SAM3U_SSC_BASE+SAM3U_SSC_SR_OFFSET) -#define SAM3U_SSC_IER (SAM3U_SSC_BASE+SAM3U_SSC_IER_OFFSET) -#define SAM3U_SSC_IDR (SAM3U_SSC_BASE+SAM3U_SSC_IDR_OFFSET) -#define SAM3U_SSC_IMR (SAM3U_SSC_BASE+SAM3U_SSC_IMR_OFFSET) -#define SAM3U_SSC_WPMR (SAM3U_SSC_BASE+SAM3U_SSC_WPMR_OFFSET) -#define SAM3U_SSC_WPSR (SAM3U_SSC_BASE+SAM3U_SSC_WPSR_OFFSET) - -/* SSC register bit definitions *********************************************************/ - -/* SSC Control Register */ - -#define SSC_CR_RXEN (1 << 0) /* Bit 0: Receive Enable */ -#define SSC_CR_RXDIS (1 << 1) /* Bit 1: Receive Disable */ -#define SSC_CR_TXEN (1 << 8) /* Bit 8: Transmit Enable */ -#define SSC_CR_TXDIS (1 << 9) /* Bit 9: Transmit Disable */ -#define SSC_CR_SWRST (1 << 15) /* Bit 15: Software Reset */ - -/* SSC Clock Mode Register */ - -#define SSC_CMR_DIV_SHIFT (0) /* Bits 0-11: Clock Divider */ -#define SSC_CMR_DIV_MASK (0xfff << SSC_CMR_DIV_SHIFT) - -/* SSC Receive Clock Mode Register */ - -#define SSC_RCMR_CKS_SHIFT (0) /* Bits 0-1: Receive Clock Selection */ -#define SSC_RCMR_CKS_MASK (3 << SSC_RCMR_CKS_SHIFT) -# define SSC_RCMR_CKS_DIVIDED (0 << SSC_RCMR_CKS_SHIFT) /* Divided Clock */ -# define SSC_RCMR_CKS_TK (1 << SSC_RCMR_CKS_SHIFT) /* TK Clock signal */ -# define SSC_RCMR_CKS_RK (2 << SSC_RCMR_CKS_SHIFT) /* RK pin */ -#define SSC_RCMR_CKO_SHIFT (2) /* Bits 2-4: Receive Clock Output Mode Selection */ -#define SSC_RCMR_CKO_MASK (7 << SSC_RCMR_CKO_SHIFT) -# define SSC_RCMR_CKO_ NONE (0 << SSC_RCMR_CKO_SHIFT) /* None */ -# define SSC_RCMR_CKO_CONTINUOUS (1 << SSC_RCMR_CKO_SHIFT) /* Continuous Receive Clock */ -# define SSC_RCMR_CKO_XFERS (2 << SSC_RCMR_CKO_SHIFT) /* Receive Clock only during data transfers */ -#define SSC_RCMR_CKI (1 << 5) /* Bit 5: Receive Clock Inversion */ -#define SSC_RCMR_CKG_SHIFT (6) /* Bits 6-7: Receive Clock Gating Selection */ -#define SSC_RCMR_CKG_MASK (3 << SSC_RCMR_CKG_SHIFT) -# define SSC_RCMR_CKG_NONE (0 << SSC_RCMR_CKG_SHIFT) /* None, continuous clock */ -# define SSC_RCMR_CKG_RFLOW (1 << SSC_RCMR_CKG_SHIFT) /* Receive Clock enabled only if RF Low */ -# define SSC_RCMR_CKG_RFHIGH (2 << SSC_RCMR_CKG_SHIFT) /* Receive Clock enabled only if RF High */ -#define SSC_RCMR_START_SHIFT (8) /* Bits 8-11: Receive Start Selection */ -#define SSC_RCMR_START_MASK (15 << SSC_RCMR_START_SHIFT) -# define SSC_RCMR_START_CONTINOUS (0 << SSC_RCMR_START_SHIFT) /* Continuous */ -# define SSC_RCMR_START_START (1 << SSC_RCMR_START_SHIFT) /* Transmit start */ -# define SSC_RCMR_START_RFLOW (2 << SSC_RCMR_START_SHIFT) /* Low level on RF signal */ -# define SSC_RCMR_START_RFHIGH (3 << SSC_RCMR_START_SHIFT) /* High level on RF signal */ -# define SSC_RCMR_START_RFFALL (4 << SSC_RCMR_START_SHIFT) /* Falling edge on RF signal */ -# define SSC_RCMR_START_RFRISE (5 << SSC_RCMR_START_SHIFT) /* Rising edge on RF signal */ -# define SSC_RCMR_START_ANYLEVEL (6 << SSC_RCMR_START_SHIFT) /* Any level change on RF signal */ -# define SSC_RCMR_START_ANYEDGE (7 << SSC_RCMR_START_SHIFT) /* Any edge on RF signal */ -# define SSC_RCMR_START_CMP0 (8 << SSC_RCMR_START_SHIFT) /* Compare 0 */ -#define SSC_RCMR_STOP (1 << 12) /* Bit 12: Receive Stop Select */ -#define SSC_RCMR_STTDLY_SHIFT (15) /* Bits 16-23: Receive Start Delay */ -#define SSC_RCMR_STTDLY_MASK (0xff << SSC_RCMR_STTDLY_SHIFT) -#define SSC_RCMR_PERIOD_SHIFT (24) /* Bits 24-31: Receive Period Divider Selection */ -#define SSC_RCMR_PERIOD_MASK (0xff << SSC_RCMR_PERIOD_SHIFT) - - -/* SSC Receive Frame Mode Register */ - -#define SSC_RFMR_DATLEN_SHIFT (0) /* Bits 0-4: Data Length */ -#define SSC_RFMR_DATLEN_MASK (31 << SSC_RFMR_DATLEN_SHIFT) -#define SSC_RFMR_LOOP (1 << 5) /* Bit 5: Loop Mode */ -#define SSC_RFMR_MSBF (1 << 7) /* Bit 7: Most Significant Bit First */ -#define SSC_RFMR_DATNB_SHIFT (8) /* Bits 8-11: Data Number per Frame */ -#define SSC_RFMR_DATNB_MASK (15 << SSC_RFMR_DATNB_SHIFT) -#define SSC_RFMR_FSLEN_SHIFT (16) /* Bits 16-19: Receive Frame Sync Length */ -#define SSC_RFMR_FSLEN_MASK (15 << SSC_RFMR_FSLEN_SHIFT) -#define SSC_RFMR_FSOS_SHIFT (20) /* Bits 20-22: Receive Frame Sync Output Selection */ -#define SSC_RFMR_FSOS_MASK (7 << SSC_RFMR_FSOS_SHIFT) -# define SSC_RFMR_FSOS_NONE (0 << SSC_RFMR_FSOS_SHIFT) /* None */ -# define SSC_RFMR_FSOS_NEG (1 << SSC_RFMR_FSOS_SHIFT) /* 0x1 Negative Pulse */ -# define SSC_RFMR_FSOS_POW (2 << SSC_RFMR_FSOS_SHIFT) /* 0x2 Positive Pulse */ -# define SSC_RFMR_FSOS_LOW (3 << SSC_RFMR_FSOS_SHIFT) /* 0x3 Driven Low during data transfer */ -# define SSC_RFMR_FSOS_HIGH (4 << SSC_RFMR_FSOS_SHIFT) /* 0x4 Driven High during data transfer */ -# define SSC_RFMR_FSOS_TOGGLE (5 << SSC_RFMR_FSOS_SHIFT) /* 0x5 Toggling at each start of data transfer */ -#define SSC_RFMR_FSEDGE (1 << 24) /* Bit 24: Frame Sync Edge Detect */ -#define SSC_RFMR_FSLENEXT_SHIFT (28) /* Bits 28-31: FSLEN Field Extension */ -#define SSC_RFMR_FSLENEXT_MASK (15 << SSC_RFMR_FSLENEXT_SHIFT) - -/* SSC Transmit Clock Mode Register */ - -#define SSC_TCMR_CKS_SHIFT (0) /* Bits 0-1: Transmit Clock Selection */ -#define SSC_TCMR_CKS_MASK (3 << SSC_TCMR_CKS_SHIFT) -# define SSC_TCMR_CKS_DIVIDED (0 << SSC_TCMR_CKS_SHIFT) /* Divided Clock */ -# define SSC_TCMR_CKS_TK (1 << SSC_TCMR_CKS_SHIFT) /* TK Clock signal */ -# define SSC_TCMR_CKS_RK (2 << SSC_TCMR_CKS_SHIFT) /* RK pin */ -#define SSC_TCMR_CKO_SHIFT (2) /* Bits 2-4: Transmit Clock Output Mode Selection */ -#define SSC_TCMR_CKO_MASK (7 << SSC_TCMR_CKO_SHIFT) -# define SSC_TCMR_CKO_ NONE (0 << SSC_TCMR_CKO_SHIFT) /* None */ -# define SSC_TCMR_CKO_CONTINUOUS (1 << SSC_TCMR_CKO_SHIFT) /* Continuous Transmit Clock */ -# define SSC_TCMR_CKO_XFERS (2 << SSC_TCMR_CKO_SHIFT) /* Transmit Clock only during data transfers */ -#define SSC_TCMR_CKI (1 << 5) /* Bit 5: Transmit Clock Inversion */ -#define SSC_TCMR_CKG_SHIFT (6) /* Bits 6-7: Transmit Clock Gating Selection */ -#define SSC_TCMR_CKG_MASK (3 << SSC_TCMR_CKG_SHIFT) -# define SSC_TCMR_CKG_NONE (0 << SSC_TCMR_CKG_SHIFT) /* None, continuous clock */ -# define SSC_tCMR_CKG_TFLOW (1 << SSC_TCMR_CKG_SHIFT) /* Receive Clock enabled only if TF Low */ -# define SSC_TCMR_CKG_TFHIGH (2 << SSC_TCMR_CKG_SHIFT) /* Receive Clock enabled only if TF High */ -#define SSC_TCMR_START_SHIFT (8) /* Bits 8-11: Transmit Start Selection */ -#define SSC_TCMR_START_MASK (15 << SSC_TCMR_START_SHIFT) -# define SSC_TCMR_START_CONTINOUS (0 << SSC_TCMR_START_SHIFT) /* Continuous */ -# define SSC_TCMR_START_START (1 << SSC_TCMR_START_SHIFT) /* Receive start */ -# define SSC_TCMR_START_TFLOW (2 << SSC_TCMR_START_SHIFT) /* Low level on TF signal */ -# define SSC_TCMR_START_TFHIGH (3 << SSC_TCMR_START_SHIFT) /* High level on TF signal */ -# define SSC_TCMR_START_TFFALL (4 << SSC_TCMR_START_SHIFT) /* Falling edge on TF signal */ -# define SSC_TCMR_START_TFRISE (5 << SSC_TCMR_START_SHIFT) /* Rising edge on TF signal */ -# define SSC_TCMR_START_ANYLEVEL (6 << SSC_TCMR_START_SHIFT) /* Any level change on TF signal */ -# define SSC_TCMR_START_ANYEDGE (7 << SSC_TCMR_START_SHIFT) /* Any edge on TF signal */ -#define SSC_TCMR_STTDLY_SHIFT (16) /* Bits 16-23: Transmit Start Delay */ -#define SSC_TCMR_STTDLY_MASK (0xff << SSC_TCMR_STTDLY_SHIFT) -#define SSC_TCMR_PERIOD_SHIFT (24) /* Bits 24-31: Transmit Period Divider Selection */ -#define SSC_TCMR_PERIOD_MASK (0xff << SSC_TCMR_PERIOD_SHIFT) - -/* SSC Transmit Frame Mode Register */ - -#define SSC_TFMR_DATLEN_SHIFT (0) /* Bits 0-4: Data Length */ -#define SSC_TFMR_DATLEN_MASK (31 << SSC_TFMR_DATLEN_SHIFT) -#define SSC_TFMR_DATDEF (1 << 5) /* Bit 5: Data Default Value */ -#define SSC_TFMR_MSBF (1 << 7) /* Bit 7: Most Significant Bit First */ -#define SSC_TFMR_DATNB_SHIFT (8) /* Bits 8-11: Data Number per frame */ -#define SSC_TFMR_DATNB_MASK (15 << SSC_TFMR_DATNB_SHIFT) -#define SSC_TFMR_FSLEN_SHIFT (16) /* Bits 16-19: Transmit Frame Syn Length */ -#define SSC_TFMR_FSLEN_MASK (15 << SSC_TFMR_FSLEN_SHIFT) -#define SSC_TFMR_FSOS_SHIFT (20) /* Bits 20-22: Transmit Frame Sync Output Selection */ -#define SSC_TFMR_FSOS_MASK (7 << SSC_TFMR_FSOS_SHIFT) -# define SSC_TFMR_FSOS_NONE (0 << SSC_TFMR_FSOS_SHIFT) /* None */ -# define SSC_TFMR_FSOS_NEG (1 << SSC_TFMR_FSOS_SHIFT) /* 0x1 Negative Pulse */ -# define SSC_TFMR_FSOS_POW (2 << SSC_TFMR_FSOS_SHIFT) /* 0x2 Positive Pulse */ -# define SSC_TFMR_FSOS_LOW (3 << SSC_TFMR_FSOS_SHIFT) /* 0x3 Driven Low during data transfer */ -# define SSC_TFMR_FSOS_HIGH (4 << SSC_TFMR_FSOS_SHIFT) /* 0x4 Driven High during data transfer */ -# define SSC_TFMR_FSOS_TOGGLE (5 << SSC_TFMR_FSOS_SHIFT) /* 0x5 Toggling at each start of data transfer */ -#define SSC_TFMR_FSDEN (1 << 23) /* Bit 23: Frame Sync Data Enable */ -#define SSC_TFMR_FSEDGE (1 << 24) /* Bit 24: Frame Sync Edge Detection */ -#define SSC_TFMR_FSLENEXT_SHIFT (28) /* Bits 28-31: FSLEN Field Extension */ -#define SSC_TFMR_FSLENEXT_MASK (15 << SSC_TFMR_FSLENEXT_SHIFT) - -/* SSC Receive Synchronization Holding Register */ - -#define SSC_RSHR_RSDAT_SHIFT (0) /* Bits 0-15: Receive Synchronization Data */ -#define SSC_RSHR_RSDAT_MASK (0xffff << SSC_RSHR_RSDAT_SHIFT) - -/* SSC Transmit Synchronization Holding Register */ - -#define SSC_TSHR_TSDAT_SHIFT (0) /* Bits 0-15: Transmit Synchronization Data */ -#define SSC_TSHR_TSDAT_MASK (0xffff << SSC_TSHR_TSDAT_SHIFT) - -/* SSC Receive Compare 0 Register */ - -#define SSC_RC0R_CP0_SHIFT (0) /* Bits 0-15: Receive Compare Data 0 */ -#define SSC_RC0R_CP0_MASK (0xffff << SSC_RC0R_CP0_SHIFT) - -/* SSC Receive Compare 1 Register */ - -#define SSC_RC1R_CP1_SHIFT (0) /* Bits 0-15: Receive Compare Data 1 */ -#define SSC_RC1R_CP1_MASK (0xffff << SSC_RC1R_CP1_SHIFT) - -/* SSC Status Register, SSC Interrupt Enable Register, SSC Interrupt Disable - * Register, and SSC Interrupt Mask Register commin bit-field definitions - */ - -#define SSC_INT_TXRDY (1 << 0) /* Bit 0: Transmit Ready */ -#define SSC_INT_TXEMPTY (1 << 1) /* Bit 1: Transmit Empty */ -#define SSC_INT_ENDTX (1 << 2) /* Bit 2: End of Transmission */ -#define SSC_INT_TXBUFE (1 << 3) /* Bit 3: Transmit Buffer Empty */ -#define SSC_INT_RXRDY (1 << 4) /* Bit 4: Receive Ready */ -#define SSC_INT_OVRUN (1 << 5) /* Bit 5: Receive Overrun */ -#define SSC_INT_ENDRX (1 << 6) /* Bit 6: End of Reception */ -#define SSC_INT_RXBUFF (1 << 7) /* Bit 7: Receive Buffer Full */ -#define SSC_INT_CP0 (1 << 8) /* Bit 8: Compare 0 */ -#define SSC_INT_CP1 (1 << 9) /* Bit 9: Compare 1 */ -#define SSC_INT_TXSYN (1 << 10) /* Bit 10: Transmit Sync */ -#define SSC_INT_RXSYN (1 << 11) /* Bit 11: Receive Sync */ -#define SSC_SR_TXEN (1 << 16) /* Bit 16: Transmit Enable (SR only) */ -#define SSC_SR_RXEN (1 << 17) /* Bit 17: Receive Enable (SR only) */ - -/* SSC Write Protect Mode Register */ - -#define SSC_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ -#define SSC_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ -#define SSC_WPMR_WPKEY_MASK (0x00ffffff << SSC_WPMR_WPKEY_SHIFT) - -/* SSC Write Protect Status Register */ - -#define SSC_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ -#define SSC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ -#define SSC_WPSR_WPVSRC_MASK (0xffff << SSC_WPSR_WPVSRC_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_ssc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* SSC register offsets *****************************************************************/ + +#define SAM3U_SSC_CR_OFFSET 0x000 /* Control Register */ +#define SAM3U_SSC_CMR_OFFSET 0x004 /* Clock Mode Register */ + /* 0x008: Reserved */ + /* 0x00c: Reserved */ +#define SAM3U_SSC_RCMR_OFFSET 0x010 /* Receive Clock Mode Register */ +#define SAM3U_SSC_RFMR_OFFSET 0x014 /* Receive Frame Mode Register */ +#define SAM3U_SSC_TCMR_OFFSET 0x018 /* Transmit Clock Mode Register */ +#define SAM3U_SSC_TFMR_OFFSET 0x01c /* Transmit Frame Mode Register */ +#define SAM3U_SSC_RHR_OFFSET 0x020 /* Receive Holding Register */ +#define SAM3U_SSC_THR_OFFSET 0x024 /* Transmit Holding Register */ + /* 0x028: Reserved */ + /* 0x02c: Reserved */ +#define SAM3U_SSC_RSHR_OFFSET 0x030 /* Receive Sync. Holding Register */ +#define SAM3U_SSC_TSHR_OFFSET 0x034 /* Transmit Sync. Holding Register */ +#define SAM3U_SSC_RC0R_OFFSET 0x038 /* Receive Compare 0 Register */ +#define SAM3U_SSC_RC1R_OFFSET 0x03c /* Receive Compare 1 Register */ +#define SAM3U_SSC_SR_OFFSET 0x040 /* Status Register */ +#define SAM3U_SSC_IER_OFFSET 0x044 /* Interrupt Enable Register */ +#define SAM3U_SSC_IDR_OFFSET 0x048 /* Interrupt Disable Register */ +#define SAM3U_SSC_IMR_OFFSET 0x04c /* Interrupt Mask Register */ +#define SAM3U_SSC_WPMR_OFFSET 0x0e4 /* Write Protect Mode Register */ +#define SAM3U_SSC_WPSR_OFFSET 0x0e8 /* Write Protect Status Register */ + /* 0x050-0x0fc: Reserved */ + /* 0x100-0x124: Reserved */ + +/* SSC register adresses ****************************************************************/ + +#define SAM3U_SSC_CR (SAM3U_SSC_BASE+SAM3U_SSC_CR_OFFSET) +#define SAM3U_SSC_CMR (SAM3U_SSC_BASE+SAM3U_SSC_CMR_OFFSET) +#define SAM3U_SSC_RCMR (SAM3U_SSC_BASE+SAM3U_SSC_RCMR_OFFSET) +#define SAM3U_SSC_RFMR (SAM3U_SSC_BASE+SAM3U_SSC_RFMR_OFFSET) +#define SAM3U_SSC_TCMR (SAM3U_SSC_BASE+SAM3U_SSC_TCMR_OFFSET) +#define SAM3U_SSC_TFMR (SAM3U_SSC_BASE+SAM3U_SSC_TFMR_OFFSET) +#define SAM3U_SSC_RHR (SAM3U_SSC_BASE+SAM3U_SSC_RHR_OFFSET) +#define SAM3U_SSC_THR (SAM3U_SSC_BASE+SAM3U_SSC_THR_OFFSET) +#define SAM3U_SSC_RSHR (SAM3U_SSC_BASE+SAM3U_SSC_RSHR_OFFSET) +#define SAM3U_SSC_TSHR (SAM3U_SSC_BASE+SAM3U_SSC_TSHR_OFFSET) +#define SAM3U_SSC_RC0R (SAM3U_SSC_BASE+SAM3U_SSC_RC0R_OFFSET) +#define SAM3U_SSC_RC1R (SAM3U_SSC_BASE+SAM3U_SSC_RC1R_OFFSET) +#define SAM3U_SSC_SR (SAM3U_SSC_BASE+SAM3U_SSC_SR_OFFSET) +#define SAM3U_SSC_IER (SAM3U_SSC_BASE+SAM3U_SSC_IER_OFFSET) +#define SAM3U_SSC_IDR (SAM3U_SSC_BASE+SAM3U_SSC_IDR_OFFSET) +#define SAM3U_SSC_IMR (SAM3U_SSC_BASE+SAM3U_SSC_IMR_OFFSET) +#define SAM3U_SSC_WPMR (SAM3U_SSC_BASE+SAM3U_SSC_WPMR_OFFSET) +#define SAM3U_SSC_WPSR (SAM3U_SSC_BASE+SAM3U_SSC_WPSR_OFFSET) + +/* SSC register bit definitions *********************************************************/ + +/* SSC Control Register */ + +#define SSC_CR_RXEN (1 << 0) /* Bit 0: Receive Enable */ +#define SSC_CR_RXDIS (1 << 1) /* Bit 1: Receive Disable */ +#define SSC_CR_TXEN (1 << 8) /* Bit 8: Transmit Enable */ +#define SSC_CR_TXDIS (1 << 9) /* Bit 9: Transmit Disable */ +#define SSC_CR_SWRST (1 << 15) /* Bit 15: Software Reset */ + +/* SSC Clock Mode Register */ + +#define SSC_CMR_DIV_SHIFT (0) /* Bits 0-11: Clock Divider */ +#define SSC_CMR_DIV_MASK (0xfff << SSC_CMR_DIV_SHIFT) + +/* SSC Receive Clock Mode Register */ + +#define SSC_RCMR_CKS_SHIFT (0) /* Bits 0-1: Receive Clock Selection */ +#define SSC_RCMR_CKS_MASK (3 << SSC_RCMR_CKS_SHIFT) +# define SSC_RCMR_CKS_DIVIDED (0 << SSC_RCMR_CKS_SHIFT) /* Divided Clock */ +# define SSC_RCMR_CKS_TK (1 << SSC_RCMR_CKS_SHIFT) /* TK Clock signal */ +# define SSC_RCMR_CKS_RK (2 << SSC_RCMR_CKS_SHIFT) /* RK pin */ +#define SSC_RCMR_CKO_SHIFT (2) /* Bits 2-4: Receive Clock Output Mode Selection */ +#define SSC_RCMR_CKO_MASK (7 << SSC_RCMR_CKO_SHIFT) +# define SSC_RCMR_CKO_ NONE (0 << SSC_RCMR_CKO_SHIFT) /* None */ +# define SSC_RCMR_CKO_CONTINUOUS (1 << SSC_RCMR_CKO_SHIFT) /* Continuous Receive Clock */ +# define SSC_RCMR_CKO_XFERS (2 << SSC_RCMR_CKO_SHIFT) /* Receive Clock only during data transfers */ +#define SSC_RCMR_CKI (1 << 5) /* Bit 5: Receive Clock Inversion */ +#define SSC_RCMR_CKG_SHIFT (6) /* Bits 6-7: Receive Clock Gating Selection */ +#define SSC_RCMR_CKG_MASK (3 << SSC_RCMR_CKG_SHIFT) +# define SSC_RCMR_CKG_NONE (0 << SSC_RCMR_CKG_SHIFT) /* None, continuous clock */ +# define SSC_RCMR_CKG_RFLOW (1 << SSC_RCMR_CKG_SHIFT) /* Receive Clock enabled only if RF Low */ +# define SSC_RCMR_CKG_RFHIGH (2 << SSC_RCMR_CKG_SHIFT) /* Receive Clock enabled only if RF High */ +#define SSC_RCMR_START_SHIFT (8) /* Bits 8-11: Receive Start Selection */ +#define SSC_RCMR_START_MASK (15 << SSC_RCMR_START_SHIFT) +# define SSC_RCMR_START_CONTINOUS (0 << SSC_RCMR_START_SHIFT) /* Continuous */ +# define SSC_RCMR_START_START (1 << SSC_RCMR_START_SHIFT) /* Transmit start */ +# define SSC_RCMR_START_RFLOW (2 << SSC_RCMR_START_SHIFT) /* Low level on RF signal */ +# define SSC_RCMR_START_RFHIGH (3 << SSC_RCMR_START_SHIFT) /* High level on RF signal */ +# define SSC_RCMR_START_RFFALL (4 << SSC_RCMR_START_SHIFT) /* Falling edge on RF signal */ +# define SSC_RCMR_START_RFRISE (5 << SSC_RCMR_START_SHIFT) /* Rising edge on RF signal */ +# define SSC_RCMR_START_ANYLEVEL (6 << SSC_RCMR_START_SHIFT) /* Any level change on RF signal */ +# define SSC_RCMR_START_ANYEDGE (7 << SSC_RCMR_START_SHIFT) /* Any edge on RF signal */ +# define SSC_RCMR_START_CMP0 (8 << SSC_RCMR_START_SHIFT) /* Compare 0 */ +#define SSC_RCMR_STOP (1 << 12) /* Bit 12: Receive Stop Select */ +#define SSC_RCMR_STTDLY_SHIFT (15) /* Bits 16-23: Receive Start Delay */ +#define SSC_RCMR_STTDLY_MASK (0xff << SSC_RCMR_STTDLY_SHIFT) +#define SSC_RCMR_PERIOD_SHIFT (24) /* Bits 24-31: Receive Period Divider Selection */ +#define SSC_RCMR_PERIOD_MASK (0xff << SSC_RCMR_PERIOD_SHIFT) + + +/* SSC Receive Frame Mode Register */ + +#define SSC_RFMR_DATLEN_SHIFT (0) /* Bits 0-4: Data Length */ +#define SSC_RFMR_DATLEN_MASK (31 << SSC_RFMR_DATLEN_SHIFT) +#define SSC_RFMR_LOOP (1 << 5) /* Bit 5: Loop Mode */ +#define SSC_RFMR_MSBF (1 << 7) /* Bit 7: Most Significant Bit First */ +#define SSC_RFMR_DATNB_SHIFT (8) /* Bits 8-11: Data Number per Frame */ +#define SSC_RFMR_DATNB_MASK (15 << SSC_RFMR_DATNB_SHIFT) +#define SSC_RFMR_FSLEN_SHIFT (16) /* Bits 16-19: Receive Frame Sync Length */ +#define SSC_RFMR_FSLEN_MASK (15 << SSC_RFMR_FSLEN_SHIFT) +#define SSC_RFMR_FSOS_SHIFT (20) /* Bits 20-22: Receive Frame Sync Output Selection */ +#define SSC_RFMR_FSOS_MASK (7 << SSC_RFMR_FSOS_SHIFT) +# define SSC_RFMR_FSOS_NONE (0 << SSC_RFMR_FSOS_SHIFT) /* None */ +# define SSC_RFMR_FSOS_NEG (1 << SSC_RFMR_FSOS_SHIFT) /* 0x1 Negative Pulse */ +# define SSC_RFMR_FSOS_POW (2 << SSC_RFMR_FSOS_SHIFT) /* 0x2 Positive Pulse */ +# define SSC_RFMR_FSOS_LOW (3 << SSC_RFMR_FSOS_SHIFT) /* 0x3 Driven Low during data transfer */ +# define SSC_RFMR_FSOS_HIGH (4 << SSC_RFMR_FSOS_SHIFT) /* 0x4 Driven High during data transfer */ +# define SSC_RFMR_FSOS_TOGGLE (5 << SSC_RFMR_FSOS_SHIFT) /* 0x5 Toggling at each start of data transfer */ +#define SSC_RFMR_FSEDGE (1 << 24) /* Bit 24: Frame Sync Edge Detect */ +#define SSC_RFMR_FSLENEXT_SHIFT (28) /* Bits 28-31: FSLEN Field Extension */ +#define SSC_RFMR_FSLENEXT_MASK (15 << SSC_RFMR_FSLENEXT_SHIFT) + +/* SSC Transmit Clock Mode Register */ + +#define SSC_TCMR_CKS_SHIFT (0) /* Bits 0-1: Transmit Clock Selection */ +#define SSC_TCMR_CKS_MASK (3 << SSC_TCMR_CKS_SHIFT) +# define SSC_TCMR_CKS_DIVIDED (0 << SSC_TCMR_CKS_SHIFT) /* Divided Clock */ +# define SSC_TCMR_CKS_TK (1 << SSC_TCMR_CKS_SHIFT) /* TK Clock signal */ +# define SSC_TCMR_CKS_RK (2 << SSC_TCMR_CKS_SHIFT) /* RK pin */ +#define SSC_TCMR_CKO_SHIFT (2) /* Bits 2-4: Transmit Clock Output Mode Selection */ +#define SSC_TCMR_CKO_MASK (7 << SSC_TCMR_CKO_SHIFT) +# define SSC_TCMR_CKO_ NONE (0 << SSC_TCMR_CKO_SHIFT) /* None */ +# define SSC_TCMR_CKO_CONTINUOUS (1 << SSC_TCMR_CKO_SHIFT) /* Continuous Transmit Clock */ +# define SSC_TCMR_CKO_XFERS (2 << SSC_TCMR_CKO_SHIFT) /* Transmit Clock only during data transfers */ +#define SSC_TCMR_CKI (1 << 5) /* Bit 5: Transmit Clock Inversion */ +#define SSC_TCMR_CKG_SHIFT (6) /* Bits 6-7: Transmit Clock Gating Selection */ +#define SSC_TCMR_CKG_MASK (3 << SSC_TCMR_CKG_SHIFT) +# define SSC_TCMR_CKG_NONE (0 << SSC_TCMR_CKG_SHIFT) /* None, continuous clock */ +# define SSC_tCMR_CKG_TFLOW (1 << SSC_TCMR_CKG_SHIFT) /* Receive Clock enabled only if TF Low */ +# define SSC_TCMR_CKG_TFHIGH (2 << SSC_TCMR_CKG_SHIFT) /* Receive Clock enabled only if TF High */ +#define SSC_TCMR_START_SHIFT (8) /* Bits 8-11: Transmit Start Selection */ +#define SSC_TCMR_START_MASK (15 << SSC_TCMR_START_SHIFT) +# define SSC_TCMR_START_CONTINOUS (0 << SSC_TCMR_START_SHIFT) /* Continuous */ +# define SSC_TCMR_START_START (1 << SSC_TCMR_START_SHIFT) /* Receive start */ +# define SSC_TCMR_START_TFLOW (2 << SSC_TCMR_START_SHIFT) /* Low level on TF signal */ +# define SSC_TCMR_START_TFHIGH (3 << SSC_TCMR_START_SHIFT) /* High level on TF signal */ +# define SSC_TCMR_START_TFFALL (4 << SSC_TCMR_START_SHIFT) /* Falling edge on TF signal */ +# define SSC_TCMR_START_TFRISE (5 << SSC_TCMR_START_SHIFT) /* Rising edge on TF signal */ +# define SSC_TCMR_START_ANYLEVEL (6 << SSC_TCMR_START_SHIFT) /* Any level change on TF signal */ +# define SSC_TCMR_START_ANYEDGE (7 << SSC_TCMR_START_SHIFT) /* Any edge on TF signal */ +#define SSC_TCMR_STTDLY_SHIFT (16) /* Bits 16-23: Transmit Start Delay */ +#define SSC_TCMR_STTDLY_MASK (0xff << SSC_TCMR_STTDLY_SHIFT) +#define SSC_TCMR_PERIOD_SHIFT (24) /* Bits 24-31: Transmit Period Divider Selection */ +#define SSC_TCMR_PERIOD_MASK (0xff << SSC_TCMR_PERIOD_SHIFT) + +/* SSC Transmit Frame Mode Register */ + +#define SSC_TFMR_DATLEN_SHIFT (0) /* Bits 0-4: Data Length */ +#define SSC_TFMR_DATLEN_MASK (31 << SSC_TFMR_DATLEN_SHIFT) +#define SSC_TFMR_DATDEF (1 << 5) /* Bit 5: Data Default Value */ +#define SSC_TFMR_MSBF (1 << 7) /* Bit 7: Most Significant Bit First */ +#define SSC_TFMR_DATNB_SHIFT (8) /* Bits 8-11: Data Number per frame */ +#define SSC_TFMR_DATNB_MASK (15 << SSC_TFMR_DATNB_SHIFT) +#define SSC_TFMR_FSLEN_SHIFT (16) /* Bits 16-19: Transmit Frame Syn Length */ +#define SSC_TFMR_FSLEN_MASK (15 << SSC_TFMR_FSLEN_SHIFT) +#define SSC_TFMR_FSOS_SHIFT (20) /* Bits 20-22: Transmit Frame Sync Output Selection */ +#define SSC_TFMR_FSOS_MASK (7 << SSC_TFMR_FSOS_SHIFT) +# define SSC_TFMR_FSOS_NONE (0 << SSC_TFMR_FSOS_SHIFT) /* None */ +# define SSC_TFMR_FSOS_NEG (1 << SSC_TFMR_FSOS_SHIFT) /* 0x1 Negative Pulse */ +# define SSC_TFMR_FSOS_POW (2 << SSC_TFMR_FSOS_SHIFT) /* 0x2 Positive Pulse */ +# define SSC_TFMR_FSOS_LOW (3 << SSC_TFMR_FSOS_SHIFT) /* 0x3 Driven Low during data transfer */ +# define SSC_TFMR_FSOS_HIGH (4 << SSC_TFMR_FSOS_SHIFT) /* 0x4 Driven High during data transfer */ +# define SSC_TFMR_FSOS_TOGGLE (5 << SSC_TFMR_FSOS_SHIFT) /* 0x5 Toggling at each start of data transfer */ +#define SSC_TFMR_FSDEN (1 << 23) /* Bit 23: Frame Sync Data Enable */ +#define SSC_TFMR_FSEDGE (1 << 24) /* Bit 24: Frame Sync Edge Detection */ +#define SSC_TFMR_FSLENEXT_SHIFT (28) /* Bits 28-31: FSLEN Field Extension */ +#define SSC_TFMR_FSLENEXT_MASK (15 << SSC_TFMR_FSLENEXT_SHIFT) + +/* SSC Receive Synchronization Holding Register */ + +#define SSC_RSHR_RSDAT_SHIFT (0) /* Bits 0-15: Receive Synchronization Data */ +#define SSC_RSHR_RSDAT_MASK (0xffff << SSC_RSHR_RSDAT_SHIFT) + +/* SSC Transmit Synchronization Holding Register */ + +#define SSC_TSHR_TSDAT_SHIFT (0) /* Bits 0-15: Transmit Synchronization Data */ +#define SSC_TSHR_TSDAT_MASK (0xffff << SSC_TSHR_TSDAT_SHIFT) + +/* SSC Receive Compare 0 Register */ + +#define SSC_RC0R_CP0_SHIFT (0) /* Bits 0-15: Receive Compare Data 0 */ +#define SSC_RC0R_CP0_MASK (0xffff << SSC_RC0R_CP0_SHIFT) + +/* SSC Receive Compare 1 Register */ + +#define SSC_RC1R_CP1_SHIFT (0) /* Bits 0-15: Receive Compare Data 1 */ +#define SSC_RC1R_CP1_MASK (0xffff << SSC_RC1R_CP1_SHIFT) + +/* SSC Status Register, SSC Interrupt Enable Register, SSC Interrupt Disable + * Register, and SSC Interrupt Mask Register commin bit-field definitions + */ + +#define SSC_INT_TXRDY (1 << 0) /* Bit 0: Transmit Ready */ +#define SSC_INT_TXEMPTY (1 << 1) /* Bit 1: Transmit Empty */ +#define SSC_INT_ENDTX (1 << 2) /* Bit 2: End of Transmission */ +#define SSC_INT_TXBUFE (1 << 3) /* Bit 3: Transmit Buffer Empty */ +#define SSC_INT_RXRDY (1 << 4) /* Bit 4: Receive Ready */ +#define SSC_INT_OVRUN (1 << 5) /* Bit 5: Receive Overrun */ +#define SSC_INT_ENDRX (1 << 6) /* Bit 6: End of Reception */ +#define SSC_INT_RXBUFF (1 << 7) /* Bit 7: Receive Buffer Full */ +#define SSC_INT_CP0 (1 << 8) /* Bit 8: Compare 0 */ +#define SSC_INT_CP1 (1 << 9) /* Bit 9: Compare 1 */ +#define SSC_INT_TXSYN (1 << 10) /* Bit 10: Transmit Sync */ +#define SSC_INT_RXSYN (1 << 11) /* Bit 11: Receive Sync */ +#define SSC_SR_TXEN (1 << 16) /* Bit 16: Transmit Enable (SR only) */ +#define SSC_SR_RXEN (1 << 17) /* Bit 17: Receive Enable (SR only) */ + +/* SSC Write Protect Mode Register */ + +#define SSC_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ +#define SSC_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ +#define SSC_WPMR_WPKEY_MASK (0x00ffffff << SSC_WPMR_WPKEY_SHIFT) + +/* SSC Write Protect Status Register */ + +#define SSC_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status */ +#define SSC_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source */ +#define SSC_WPSR_WPVSRC_MASK (0xffff << SSC_WPSR_WPVSRC_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SSC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_supc.h b/nuttx/arch/arm/src/sam3u/sam3u_supc.h index 8cde5389e7..5bd28de504 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_supc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_supc.h @@ -1,164 +1,164 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_supc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* SUPC register offsets ****************************************************************/ - -#define SAM3U_SUPC_CR_OFFSET 0x00 /* Supply Controller Control Register */ -#define SAM3U_SUPC_SMMR_OFFSET 0x04 /* Supply Controller Supply Monitor Mode Register */ -#define SAM3U_SUPC_MR_OFFSET 0x08 /* Supply Controller Mode Register */ -#define SAM3U_SUPC_WUMR_OFFSET 0x0c /* Supply Controller Wake Up Mode Register */ -#define SAM3U_SUPC_WUIR_OFFSET 0x10 /* Supply Controller Wake Up Inputs Register */ -#define SAM3U_SUPC_SR_OFFSET 0x14 /* Supply Controller Status Register */ - -/* SUPC register adresses ***************************************************************/ - -#define SAM3U_SUPC_CR (SAM3U_SUPC_BASE+SAM3U_SUPC_CR_OFFSET) -#define SAM3U_SUPC_SMMR (SAM3U_SUPC_BASE+SAM3U_SUPC_SMMR_OFFSET) -#define SAM3U_SUPC_MR (SAM3U_SUPC_BASE+SAM3U_SUPC_MR_OFFSET) -#define SAM3U_SUPC_WUMR (SAM3U_SUPC_BASE+SAM3U_SUPC_WUMR_OFFSET) -#define SAM3U_SUPC_WUIR (SAM3U_SUPC_BASE+SAM3U_SUPC_WUIR_OFFSET) -#define SAM3U_SUPC_SR (SAM3U_SUPC_BASE+SAM3U_SUPC_SR_OFFSET) - -/* SUPC register bit definitions ********************************************************/ - -#define SUPC_CR_VROFF (1 << 2) /* Bit 2: Voltage Regulator Off */ -#define SUPC_CR_XTALSEL (1 << 3) /* Bit 3: Crystal Oscillator Select */ -#define SUPC_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ -#define SUPC_CR_KEY_MASK (0xff << SUPC_CR_KEY_SHIFT) - -#define SUPC_SMMR_SMTH_SHIFT (0) /* Bits 0-3: Supply Monitor Threshold */ -#define SUPC_SMMR_SMTH_MASK (15 << SUPC_SMMR_SMTH_SHIFT) -# define SUPC_SMMR_SMTH_1p9V (0 << SUPC_SMMR_SMTH_SHIFT) /* 1.9V */ -# define SUPC_SMMR_SMTH_2p0V (1 << SUPC_SMMR_SMTH_SHIFT) /* 2.0V */ -# define SUPC_SMMR_SMTH_2p1V (2 << SUPC_SMMR_SMTH_SHIFT) /* 2.1V */ -# define SUPC_SMMR_SMTH_2p2V (3 << SUPC_SMMR_SMTH_SHIFT) /* 2.2V */ -# define SUPC_SMMR_SMTH_2p3V (4 << SUPC_SMMR_SMTH_SHIFT) /* 2.3V */ -# define SUPC_SMMR_SMTH_2p4V (5 << SUPC_SMMR_SMTH_SHIFT) /* 2.4V */ -# define SUPC_SMMR_SMTH_2p5V (6 << SUPC_SMMR_SMTH_SHIFT) /* 2.5V */ -# define SUPC_SMMR_SMTH_2p6V (7 << SUPC_SMMR_SMTH_SHIFT) /* 2.6V */ -# define SUPC_SMMR_SMTH_2p7V (8 << SUPC_SMMR_SMTH_SHIFT) /* 2.7V */ -# define SUPC_SMMR_SMTH_2p8V (9 << SUPC_SMMR_SMTH_SHIFT) /* 2.8V */ -# define SUPC_SMMR_SMTH_2p9V (10 << SUPC_SMMR_SMTH_SHIFT) /* 2.9V */ -# define SUPC_SMMR_SMTH_3p0V (11 << SUPC_SMMR_SMTH_SHIFT) /* 3.0V */ -# define SUPC_SMMR_SMTH_3p1V (12 << SUPC_SMMR_SMTH_SHIFT) /* 3.1V */ -# define SUPC_SMMR_SMTH_3p2V (13 << SUPC_SMMR_SMTH_SHIFT) /* 3.2V */ -# define SUPC_SMMR_SMTH_3p3V (14 << SUPC_SMMR_SMTH_SHIFT) /* 3.3V */ -# define SUPC_SMMR_SMTH_3p4V (15 << SUPC_SMMR_SMTH_SHIFT) /* 3.4V */ -#define SUPC_SMMR_SMSMPL_SHIFT (8) /* Bits 8-10: Supply Monitor Sampling Period */ -#define SUPC_SMMR_SMSMPL_MASK (7 << SUPC_SMMR_SMSMPL_SHIFT) -# define SUPC_SMMR_SMSMPL_SMD (0 << SUPC_SMMR_SMSMPL_SHIFT) /* Supply Monitor disabled */ -# define SUPC_SMMR_SMSMPL_CSM (1 << SUPC_SMMR_SMSMPL_SHIFT) /* Continuous Supply Monitor */ -# define SUPC_SMMR_SMSMPL_32SLCK (2 << SUPC_SMMR_SMSMPL_SHIFT) /* Eevery 32 SLCK periods */ -# define SUPC_SMMR_SMSMPL_256SLCK (3 << SUPC_SMMR_SMSMPL_SHIFT) /* Every 256 SLCK periods */ -# define SUPC_SMMR_SMSMPL_2048SLCK (4 << SUPC_SMMR_SMSMPL_SHIFT) /* Every 2,048 SLCK periods */ -#define SUPC_SMMR_SMRSTEN (1 << 12) /* Bit 12: Supply Monitor Reset Enable */ -#define SUPC_SMMR_SMIEN (1 << 13) /* Bit 13: Supply Monitor Interrupt Enable */ - -#define SUPC_MR_BODRSTEN (1 << 12) /* Bit 12: Brownout Detector Reset Enable */ -#define SUPC_MR_BODDIS (1 << 13) /* Bit 13: Brownout Detector Disable */ -#define SUPC_MR_VDDIORDY (1 << 14) /* Bit 14: VDDIO Ready */ -#define SUPC_MR_OSCBYPASS (1 << 20) /* Bit 20: Oscillator Bypass */ -#define SUPC_MR_KEY_SHIFT (24) /* Bits 24-31: Password Key */ -#define SUPC_MR_KEY_MASK (0xff << SUPC_MR_KEY_SHIFT) - -#define SUPC_WUMR_FWUPEN (1 << 0) /* Bit 0: Force Wake Up Enable */ -#define SUPC_WUMR_SMEN (1 << 1) /* Bit 1: Supply Monitor Wake Up Enable */ -#define SUPC_WUMR_RTTEN (1 << 2) /* Bit 2: Real Time Timer Wake Up Enable */ -#define SUPC_WUMR_RTCEN (1 << 3) /* Bit 3: Real Time Clock Wake Up Enable */ -#define SUPC_WUMR_FWUPDBC_SHIFT (8) /* Bits 8-10: Force Wake Up Debouncer */ -#define SUPC_WUMR_FWUPDBC_MASK (7 << SUPC_WUMR_FWUPDBC_SHIFT) - #define SUPC_WUMR_FWUPDBC_1SCLK (0 << SUPC_WUMR_FWUPDBC_SHIFT) /* Immediate, no debouncing */ - #define SUPC_WUMR_FWUPDBC_3SCLK (1 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 3 SLCK periods */ - #define SUPC_WUMR_FWUPDBC_32SCLK (2 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 32 SLCK periods */ - #define SUPC_WUMR_FWUPDBC_512SCLK (3 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 512 SLCK periods */ - #define SUPC_WUMR_FWUPDBC_4096SCLK (4 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 4096 SLCK periods */ - #define SUPC_WUMR_FWUPDBC_32768SCLK (5 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 32768 SLCK periods */ -#define SUPC_WUMR_WKUPDBC_SHIFT (12) /* Bits 12-14: Wake Up Inputs Debouncer */ -#define SUPC_WUMR_WKUPDBC_MASK (7 << SUPC_WUMR_WKUPDBC_SHIFT) -# define SUPC_WUMR_WKUPDBC_1SCLK (0 << SUPC_WUMR_WKUPDBC_SHIFT) /* Immediate, no debouncing */ -# define SUPC_WUMR_WKUPDBC_3SCLK (1 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 3 SLCK periods */ -# define SUPC_WUMR_WKUPDBC_32SCLK (2 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 32 SLCK periods */ -# define SUPC_WUMR_WKUPDBC_512SCLK (3 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 512 SLCK periods */ -# define SUPC_WUMR_WKUPDBC_4096SCLK (4 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 4096 SLCK periods */ -# define SUPC_WUMR_WKUPDBC_32768SCLK (5 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 32768 SLCK periods */ - -#define SUPC_WUIR_WKUPEN_SHIFT (0) /* Bits 0-15: Wake Up Input Enable 0 to 15 */ -#define SUPC_WUIR_WKUPEN_MASK (0xffff << SUPC_WUIR_WKUPEN_SHIFT) -#define SUPC_WUIR_WKUPEN(n) ((1 << (n)) << SUPC_WUIR_WKUPEN_SHIFT) -#define SUPC_WUIR_WKUPT_SHIFT (16) /* Bits 16-31 Wake Up Input Transition 0 to 15 */ -#define SUPC_WUIR_WKUPT_MASK (0xffff << SUPC_WUIR_WKUPT_SHIFT) -#define SUPC_WUIR_WKUPT(n) ((1 << (n)) << SUPC_WUIR_WKUPT_SHIFT) - -#define SUPC_SR_FWUPS (1 << 0) /* Bit 0: FWUP Wake Up Status */ -#define SUPC_SR_WKUPS (1 << 1) /* Bit 1: WKUP Wake Up Status */ -#define SUPC_SR_SMWS (1 << 2) /* Bit 2: Supply Monitor Detection Wake Up Status */ -#define SUPC_SR_BODRSTS (1 << 3) /* Bit 3: Brownout Detector Reset Status */ -#define SUPC_SR_SMRSTS (1 << 4) /* Bit 4: Supply Monitor Reset Status */ -#define SUPC_SR_SMS (1 << 5) /* Bit 5: Supply Monitor Status */ -#define SUPC_SR_SMOS (1 << 6) /* Bit 6: Supply Monitor Output Status */ -#define SUPC_SR_OSCSEL (1 << 7) /* Bit 7: 32-kHz Oscillator Selection Status */ -#define SUPC_SR_FWUPIS (1 << 12) /* Bit 12: FWUP Input Status */ -#define SUPC_SR_WKUPIS_SHIFT (16) /* Bits 16-31: WKUP Input Status 0 to 15 */ -#define SUPC_SR_WKUPIS_MASK (0xffff << SUPC_SR_WKUPIS_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_supc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* SUPC register offsets ****************************************************************/ + +#define SAM3U_SUPC_CR_OFFSET 0x00 /* Supply Controller Control Register */ +#define SAM3U_SUPC_SMMR_OFFSET 0x04 /* Supply Controller Supply Monitor Mode Register */ +#define SAM3U_SUPC_MR_OFFSET 0x08 /* Supply Controller Mode Register */ +#define SAM3U_SUPC_WUMR_OFFSET 0x0c /* Supply Controller Wake Up Mode Register */ +#define SAM3U_SUPC_WUIR_OFFSET 0x10 /* Supply Controller Wake Up Inputs Register */ +#define SAM3U_SUPC_SR_OFFSET 0x14 /* Supply Controller Status Register */ + +/* SUPC register adresses ***************************************************************/ + +#define SAM3U_SUPC_CR (SAM3U_SUPC_BASE+SAM3U_SUPC_CR_OFFSET) +#define SAM3U_SUPC_SMMR (SAM3U_SUPC_BASE+SAM3U_SUPC_SMMR_OFFSET) +#define SAM3U_SUPC_MR (SAM3U_SUPC_BASE+SAM3U_SUPC_MR_OFFSET) +#define SAM3U_SUPC_WUMR (SAM3U_SUPC_BASE+SAM3U_SUPC_WUMR_OFFSET) +#define SAM3U_SUPC_WUIR (SAM3U_SUPC_BASE+SAM3U_SUPC_WUIR_OFFSET) +#define SAM3U_SUPC_SR (SAM3U_SUPC_BASE+SAM3U_SUPC_SR_OFFSET) + +/* SUPC register bit definitions ********************************************************/ + +#define SUPC_CR_VROFF (1 << 2) /* Bit 2: Voltage Regulator Off */ +#define SUPC_CR_XTALSEL (1 << 3) /* Bit 3: Crystal Oscillator Select */ +#define SUPC_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ +#define SUPC_CR_KEY_MASK (0xff << SUPC_CR_KEY_SHIFT) + +#define SUPC_SMMR_SMTH_SHIFT (0) /* Bits 0-3: Supply Monitor Threshold */ +#define SUPC_SMMR_SMTH_MASK (15 << SUPC_SMMR_SMTH_SHIFT) +# define SUPC_SMMR_SMTH_1p9V (0 << SUPC_SMMR_SMTH_SHIFT) /* 1.9V */ +# define SUPC_SMMR_SMTH_2p0V (1 << SUPC_SMMR_SMTH_SHIFT) /* 2.0V */ +# define SUPC_SMMR_SMTH_2p1V (2 << SUPC_SMMR_SMTH_SHIFT) /* 2.1V */ +# define SUPC_SMMR_SMTH_2p2V (3 << SUPC_SMMR_SMTH_SHIFT) /* 2.2V */ +# define SUPC_SMMR_SMTH_2p3V (4 << SUPC_SMMR_SMTH_SHIFT) /* 2.3V */ +# define SUPC_SMMR_SMTH_2p4V (5 << SUPC_SMMR_SMTH_SHIFT) /* 2.4V */ +# define SUPC_SMMR_SMTH_2p5V (6 << SUPC_SMMR_SMTH_SHIFT) /* 2.5V */ +# define SUPC_SMMR_SMTH_2p6V (7 << SUPC_SMMR_SMTH_SHIFT) /* 2.6V */ +# define SUPC_SMMR_SMTH_2p7V (8 << SUPC_SMMR_SMTH_SHIFT) /* 2.7V */ +# define SUPC_SMMR_SMTH_2p8V (9 << SUPC_SMMR_SMTH_SHIFT) /* 2.8V */ +# define SUPC_SMMR_SMTH_2p9V (10 << SUPC_SMMR_SMTH_SHIFT) /* 2.9V */ +# define SUPC_SMMR_SMTH_3p0V (11 << SUPC_SMMR_SMTH_SHIFT) /* 3.0V */ +# define SUPC_SMMR_SMTH_3p1V (12 << SUPC_SMMR_SMTH_SHIFT) /* 3.1V */ +# define SUPC_SMMR_SMTH_3p2V (13 << SUPC_SMMR_SMTH_SHIFT) /* 3.2V */ +# define SUPC_SMMR_SMTH_3p3V (14 << SUPC_SMMR_SMTH_SHIFT) /* 3.3V */ +# define SUPC_SMMR_SMTH_3p4V (15 << SUPC_SMMR_SMTH_SHIFT) /* 3.4V */ +#define SUPC_SMMR_SMSMPL_SHIFT (8) /* Bits 8-10: Supply Monitor Sampling Period */ +#define SUPC_SMMR_SMSMPL_MASK (7 << SUPC_SMMR_SMSMPL_SHIFT) +# define SUPC_SMMR_SMSMPL_SMD (0 << SUPC_SMMR_SMSMPL_SHIFT) /* Supply Monitor disabled */ +# define SUPC_SMMR_SMSMPL_CSM (1 << SUPC_SMMR_SMSMPL_SHIFT) /* Continuous Supply Monitor */ +# define SUPC_SMMR_SMSMPL_32SLCK (2 << SUPC_SMMR_SMSMPL_SHIFT) /* Eevery 32 SLCK periods */ +# define SUPC_SMMR_SMSMPL_256SLCK (3 << SUPC_SMMR_SMSMPL_SHIFT) /* Every 256 SLCK periods */ +# define SUPC_SMMR_SMSMPL_2048SLCK (4 << SUPC_SMMR_SMSMPL_SHIFT) /* Every 2,048 SLCK periods */ +#define SUPC_SMMR_SMRSTEN (1 << 12) /* Bit 12: Supply Monitor Reset Enable */ +#define SUPC_SMMR_SMIEN (1 << 13) /* Bit 13: Supply Monitor Interrupt Enable */ + +#define SUPC_MR_BODRSTEN (1 << 12) /* Bit 12: Brownout Detector Reset Enable */ +#define SUPC_MR_BODDIS (1 << 13) /* Bit 13: Brownout Detector Disable */ +#define SUPC_MR_VDDIORDY (1 << 14) /* Bit 14: VDDIO Ready */ +#define SUPC_MR_OSCBYPASS (1 << 20) /* Bit 20: Oscillator Bypass */ +#define SUPC_MR_KEY_SHIFT (24) /* Bits 24-31: Password Key */ +#define SUPC_MR_KEY_MASK (0xff << SUPC_MR_KEY_SHIFT) + +#define SUPC_WUMR_FWUPEN (1 << 0) /* Bit 0: Force Wake Up Enable */ +#define SUPC_WUMR_SMEN (1 << 1) /* Bit 1: Supply Monitor Wake Up Enable */ +#define SUPC_WUMR_RTTEN (1 << 2) /* Bit 2: Real Time Timer Wake Up Enable */ +#define SUPC_WUMR_RTCEN (1 << 3) /* Bit 3: Real Time Clock Wake Up Enable */ +#define SUPC_WUMR_FWUPDBC_SHIFT (8) /* Bits 8-10: Force Wake Up Debouncer */ +#define SUPC_WUMR_FWUPDBC_MASK (7 << SUPC_WUMR_FWUPDBC_SHIFT) + #define SUPC_WUMR_FWUPDBC_1SCLK (0 << SUPC_WUMR_FWUPDBC_SHIFT) /* Immediate, no debouncing */ + #define SUPC_WUMR_FWUPDBC_3SCLK (1 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 3 SLCK periods */ + #define SUPC_WUMR_FWUPDBC_32SCLK (2 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 32 SLCK periods */ + #define SUPC_WUMR_FWUPDBC_512SCLK (3 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 512 SLCK periods */ + #define SUPC_WUMR_FWUPDBC_4096SCLK (4 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 4096 SLCK periods */ + #define SUPC_WUMR_FWUPDBC_32768SCLK (5 << SUPC_WUMR_FWUPDBC_SHIFT) /* FWUP at least 32768 SLCK periods */ +#define SUPC_WUMR_WKUPDBC_SHIFT (12) /* Bits 12-14: Wake Up Inputs Debouncer */ +#define SUPC_WUMR_WKUPDBC_MASK (7 << SUPC_WUMR_WKUPDBC_SHIFT) +# define SUPC_WUMR_WKUPDBC_1SCLK (0 << SUPC_WUMR_WKUPDBC_SHIFT) /* Immediate, no debouncing */ +# define SUPC_WUMR_WKUPDBC_3SCLK (1 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 3 SLCK periods */ +# define SUPC_WUMR_WKUPDBC_32SCLK (2 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 32 SLCK periods */ +# define SUPC_WUMR_WKUPDBC_512SCLK (3 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 512 SLCK periods */ +# define SUPC_WUMR_WKUPDBC_4096SCLK (4 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 4096 SLCK periods */ +# define SUPC_WUMR_WKUPDBC_32768SCLK (5 << SUPC_WUMR_WKUPDBC_SHIFT) /* Input active at least 32768 SLCK periods */ + +#define SUPC_WUIR_WKUPEN_SHIFT (0) /* Bits 0-15: Wake Up Input Enable 0 to 15 */ +#define SUPC_WUIR_WKUPEN_MASK (0xffff << SUPC_WUIR_WKUPEN_SHIFT) +#define SUPC_WUIR_WKUPEN(n) ((1 << (n)) << SUPC_WUIR_WKUPEN_SHIFT) +#define SUPC_WUIR_WKUPT_SHIFT (16) /* Bits 16-31 Wake Up Input Transition 0 to 15 */ +#define SUPC_WUIR_WKUPT_MASK (0xffff << SUPC_WUIR_WKUPT_SHIFT) +#define SUPC_WUIR_WKUPT(n) ((1 << (n)) << SUPC_WUIR_WKUPT_SHIFT) + +#define SUPC_SR_FWUPS (1 << 0) /* Bit 0: FWUP Wake Up Status */ +#define SUPC_SR_WKUPS (1 << 1) /* Bit 1: WKUP Wake Up Status */ +#define SUPC_SR_SMWS (1 << 2) /* Bit 2: Supply Monitor Detection Wake Up Status */ +#define SUPC_SR_BODRSTS (1 << 3) /* Bit 3: Brownout Detector Reset Status */ +#define SUPC_SR_SMRSTS (1 << 4) /* Bit 4: Supply Monitor Reset Status */ +#define SUPC_SR_SMS (1 << 5) /* Bit 5: Supply Monitor Status */ +#define SUPC_SR_SMOS (1 << 6) /* Bit 6: Supply Monitor Output Status */ +#define SUPC_SR_OSCSEL (1 << 7) /* Bit 7: 32-kHz Oscillator Selection Status */ +#define SUPC_SR_FWUPIS (1 << 12) /* Bit 12: FWUP Input Status */ +#define SUPC_SR_WKUPIS_SHIFT (16) /* Bits 16-31: WKUP Input Status 0 to 15 */ +#define SUPC_SR_WKUPIS_MASK (0xffff << SUPC_SR_WKUPIS_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_SUPC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_tc.h b/nuttx/arch/arm/src/sam3u/sam3u_tc.h index 1c330d38b6..0fb36da97e 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_tc.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_tc.h @@ -1,347 +1,347 @@ -/************************************************************************************************ - * arch/arm/src/sam3u/sam3u_tc.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H - -/************************************************************************************************ - * Included Files - ************************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/************************************************************************************************ - * Pre-processor Definitions - ************************************************************************************************/ - -/* TC register offsets **************************************************************************/ - -/* Timer channel offsets (with respect to timer base offset 0f 0x00, 0x40, or 0x80 */ - -#define SAM3U_TCN_OFFSET(n) (0x00 + ((n)<<6)) /* 0x00, 0x40, 0x80 */ -#define SAM3U_TCN_CCR_OFFSET 0x00 /* Channel Control Register */ -#define SAM3U_TCN_CMR_OFFSET 0x04 /* Channel Mode Register */ - /* 0x08 Reserved */ - /* 0x0c Reserved */ -#define SAM3U_TCN_CV_OFFSET 0x10 /* Counter Value */ -#define SAM3U_TCN_RA_OFFSET 0x14 /* Register A */ -#define SAM3U_TCN_RB_OFFSET 0x18 /* Register B */ -#define SAM3U_TCN_RC_OFFSET 0x1c /* Register C */ -#define SAM3U_TCN_SR_OFFSET 0x20 /* Status Register */ -#define SAM3U_TCN_IER_OFFSET 0x24 /* Interrupt Enable Register */ -#define SAM3U_TCN_IDR_OFFSET 0x28 /* Interrupt Disable Register */ -#define SAM3U_TCN_IMR_OFFSET 0x2c /* Interrupt Mask Register */ - -/* Timer common registers */ - -#define SAM3U_TC_BCR_OFFSET 0xc0 /* Block Control Register */ -#define SAM3U_TC_BMR_OFFSET 0xc4 /* Block Mode Register */ -#define SAM3U_TC_QIER_OFFSET 0xc8 /* QDEC Interrupt Enable Register */ -#define SAM3U_TC_QIDR_OFFSET 0xcc /* QDEC Interrupt Disable Register */ -#define SAM3U_TC_QIMR_OFFSET 0xd0 /* QDEC Interrupt Mask Register */ -#define SAM3U_TC_QISR_OFFSET 0xd4 /* QDEC Interrupt Status Register */ - /* 0xd8 Reserved */ - /* 0xe4 Reserved */ - -/* TC register adresses *************************************************************************/ - -/* Timer channel offsets (with respect to timer base offset 0f 0x00, 0x40, or 0x80 */ - -#define SAM3U_TC_CCR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CCR_OFFSET) -#define SAM3U_TC_CMR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CMR_OFFSET) -#define SAM3U_TC_CV(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CV_OFFSET) -#define SAM3U_TC_RA(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RA_OFFSET) -#define SAM3U_TC_RB(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RB_OFFSET) -#define SAM3U_TC_RC(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RC_OFFSET) -#define SAM3U_TC_SR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_SR_OFFSET) -#define SAM3U_TC_IER(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IER_OFFSET) -#define SAM3U_TC_IDR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IDR_OFFSET) -#define SAM3U_TC_IMR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IMR_OFFSET) - -#define SAM3U_TC0_CCR (SAM3U_TC0_BASE+SAM3U_TCN_CCR_OFFSET) -#define SAM3U_TC0_CMR (SAM3U_TC0_BASE+SAM3U_TCN_CMR_OFFSET) -#define SAM3U_TC0_CV (SAM3U_TC0_BASE+SAM3U_TCN_CV_OFFSET) -#define SAM3U_TC0_RA (SAM3U_TC0_BASE+SAM3U_TCN_RA_OFFSET) -#define SAM3U_TC0_RB (SAM3U_TC0_BASE+SAM3U_TCN_RB_OFFSET) -#define SAM3U_TC0_RC (SAM3U_TC0_BASE+SAM3U_TCN_RC_OFFSET) -#define SAM3U_TC0_SR (SAM3U_TC0_BASE+SAM3U_TCN_SR_OFFSET) -#define SAM3U_TC0_IER (SAM3U_TC0_BASE+SAM3U_TCN_IER_OFFSET) -#define SAM3U_TC0_IDR (SAM3U_TC0_BASE+SAM3U_TCN_IDR_OFFSET) -#define SAM3U_TC0_IMR (SAM3U_TC0_BASE+SAM3U_TCN_IMR_OFFSET) - -#define SAM3U_TC1_CCR (SAM3U_TC1_BASE+SAM3U_TCN_CCR_OFFSET) -#define SAM3U_TC1_CMR (SAM3U_TC1_BASE+SAM3U_TCN_CMR_OFFSET) -#define SAM3U_TC1_CV (SAM3U_TC1_BASE+SAM3U_TCN_CV_OFFSET) -#define SAM3U_TC1_RA (SAM3U_TC1_BASE+SAM3U_TCN_RA_OFFSET) -#define SAM3U_TC1_RB (SAM3U_TC1_BASE+SAM3U_TCN_RB_OFFSET) -#define SAM3U_TC1_RC (SAM3U_TC1_BASE+SAM3U_TCN_RC_OFFSET) -#define SAM3U_TC1_SR (SAM3U_TC1_BASE+SAM3U_TCN_SR_OFFSET) -#define SAM3U_TC1_IER (SAM3U_TC1_BASE+SAM3U_TCN_IER_OFFSET) -#define SAM3U_TC1_IDR (SAM3U_TC1_BASE+SAM3U_TCN_IDR_OFFSET) -#define SAM3U_TC1_IMR (SAM3U_TC1_BASE+SAM3U_TCN_IMR_OFFSET) - -#define SAM3U_TC2_CCR (SAM3U_TC2_BASE+SAM3U_TCN_CCR_OFFSET) -#define SAM3U_TC2_CMR (SAM3U_TC2_BASE+SAM3U_TCN_CMR_OFFSET) -#define SAM3U_TC2_CV (SAM3U_TC2_BASE+SAM3U_TCN_CV_OFFSET) -#define SAM3U_TC2_RA (SAM3U_TC2_BASE+SAM3U_TCN_RA_OFFSET) -#define SAM3U_TC2_RB (SAM3U_TC2_BASE+SAM3U_TCN_RB_OFFSET) -#define SAM3U_TC2_RC (SAM3U_TC2_BASE+SAM3U_TCN_RC_OFFSET) -#define SAM3U_TC2_SR (SAM3U_TC2_BASE+SAM3U_TCN_SR_OFFSET) -#define SAM3U_TC2_IER (SAM3U_TC2_BASE+SAM3U_TCN_IER_OFFSET) -#define SAM3U_TC2_IDR (SAM3U_TC2_BASE+SAM3U_TCN_IDR_OFFSET) -#define SAM3U_TC2_IMR (SAM3U_TC2_BASE+SAM3U_TCN_IMR_OFFSET) - -/* Timer common registers */ - -#define SAM3U_TC_BCR (SAM3U_TC_BASE+SAM3U_TC_BCR_OFFSET) -#define SAM3U_TC_BMR (SAM3U_TC_BASE+SAM3U_TC_BMR_OFFSET) -#define SAM3U_TC_QIER (SAM3U_TC_BASE+SAM3U_TC_QIER_OFFSET) -#define SAM3U_TC_QIDR (SAM3U_TC_BASE+SAM3U_TC_QIDR_OFFSET) -#define SAM3U_TC_QIMR (SAM3U_TC_BASE+SAM3U_TC_QIMR_OFFSET) -#define SAM3U_TC_QISR (SAM3U_TC_BASE+SAM3U_TC_QISR_OFFSET) - -/* TC register bit definitions ******************************************************************/ - -/* Timer common registers */ -/* TC Block Control Register */ - -#define TC_BCR_SYNC (1 << 0) /* Bit 0: Synchro Command - -/* TC Block Mode Register */ - -#define TC_BMR_TC0XC0S_SHIFT (0) /* Bits 0-1: External Clock Signal 0 Selection */ -#define TC_BMR_TC0XC0S_MASK (3 << TC_BMR_TC0XC0S_SHIFT) -# define TC_BMR_TC0XC0S_TCLK0 (0 << TC_BMR_TC0XC0S_SHIFT) -# define TC_BMR_TC0XC0S_NONE (1 << TC_BMR_TC0XC0S_SHIFT) -# define TC_BMR_TC0XC0S_TIOA1 (2 << TC_BMR_TC0XC0S_SHIFT) -# define TC_BMR_TC0XC0S_TIOA2 (3 << TC_BMR_TC0XC0S_SHIFT) -#define TC_BMR_TC1XC1S_SHIFT (2) /* Bits 2-3: External Clock Signal 1 Selection */ -#define TC_BMR_TC1XC1S_MASK (3 << TC_BMR_TC1XC1S_MASK) -# define TC_BMR_TC1XC1S_TCLK1 (0 << TC_BMR_TC1XC1S_SHIFT) -# define TC_BMR_TC1XC1S_NONE (1 << TC_BMR_TC1XC1S_SHIFT) -# define TC_BMR_TC1XC1S_TIOA0 (2 << TC_BMR_TC1XC1S_SHIFT) -# define TC_BMR_TC1XC1S_TIOA2 (3 << TC_BMR_TC1XC1S_SHIFT) -#define TC_BMR_TC2XC2S_SHIFT (4) /* Bits 4-5: External Clock Signal 2 Selection */ -#define TC_BMR_TC2XC2S_MASK (3 << TC_BMR_TC2XC2S_SHIFT) -# define TC_BMR_TC2XC2S_TCLK2 (0 << TC_BMR_TC2XC2S_SHIFT) -# define TC_BMR_TC2XC2S_NONE (1 << TC_BMR_TC2XC2S_SHIFT) -# define TC_BMR_TC2XC2S_TIOA0 (2 << TC_BMR_TC2XC2S_SHIFT) -# define TC_BMR_TC2XC2S_TIOA1 (3 << TC_BMR_TC2XC2S_SHIFT) -#define TC_BMR_QDEN (1 << 8) /* Bit 8: Quadrature Decoder Enabled */ -#define TC_BMR_POSEN (1 << 9) /* Bit 9: Position Enabled */ -#define TC_BMR_SPEEDEN (1 << 10) /* Bit 10: Speed Enabled */ -#define TC_BMR_QDTRANS (1 << 11) /* Bit 11: Quadrature Decoding Transparent */ -#define TC_BMR_EDGPHA (1 << 12) /* Bit 12: Edge on PHA count mode */ -#define TC_BMR_INVA (1 << 13) /* Bit 13: Inverted PHA */ -#define TC_BMR_INVB (1 << 14) /* Bit 14: Inverted PHB */ -#define TC_BMR_SWAP (1 << 15) /* Bit 15: Swap PHA and PHB */ -#define TC_BMR_INVIDX (1 << 16) /* Bit 16: Inverted Index */ -#define TC_BMR_IDXPHB (1 << 17) /* Bit 17: Index pin is PHB pin */ -#define TC_BMR_FILTER (1 << 19) /* Bit 19 */ -#define TC_BMR_MAXFILT_SHIFT (20) /* Bits 20-25: Maximum Filter */ -#define TC_BMR_MAXFILT_MASK (63 << TC_BMR_MAXFILT_SHIFT) - -/* TC QDEC Interrupt Enable Register, TC QDEC Interrupt Disable Register, - * TC QDEC Interrupt Mask Register, TC QDEC Interrupt Status Register common - * bit field definitions - */ - -#define TC_QINT_IDX (1 << 0) /* Bit 0: Index (Common) */ -#define TC_QINT_DIRCHG (1 << 1) /* Bit 1: Direction Change (Common) */ -#define TC_QINT_QERR (1 << 2) /* Bit 2: Quadrature Error (Common) */ -#define TC_QISR_DIR (1 << 8) /* Bit 8: Direction (QISR only) */ - -/* Timer Channel Registers */ -/* TC Channel Control Register */ - -#define TCN_CCR_CLKEN (1 << 0) /* Bit 0: Counter Clock Enable Command */ -#define TCN_CCR_CLKDIS (1 << 1) /* Bit 1: Counter Clock Disable Command */ -#define TCN_CCR_SWTRG (1 << 2) /* Bit 2: Software Trigger Command */ - -/* TC Channel Mode Register */ - -#define TCN_CMR_TCCLKS_SHIFT (0) /* Bits 0-2: Clock Selection (Common) */ -#define TCN_CMR_TCCLKS_MASK (7 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_TIMERCLOCK1 (0 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_TIMERCLOCK2 (1 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_TIMERCLOCK3 (2 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_TIMERCLOCK4 (3 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_TIMERCLOCK5 (4 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_XC0 (5 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_XC1 (6 << TCN_CMR_TCCLKS_SHIFT) -# define TCN_CMR_TCCLKS_XC2 (7 << TCN_CMR_TCCLKS_SHIFT) -#define TCN_CMR_CLKI (1 << 3) /* Bit 3: Clock Invert (Common) */ -#define TCN_CMR_BURST_SHIFT (4) /* Bits 4-5: Burst Signal Selection (Common) */ -#define TCN_CMR_BURST_MASK (3 << TCN_CMR_BURST_MASK) -#define TCN_CMR_BURST_MASK (3 << TCN_CMR_BURST_MASK) -# define TCN_CMR_BURST_NOTGATED (0 << TCN_CMR_BURST_MASK) /* Nott gated by external signal */ -# define TCN_CMR_BURST_XC0 (1 << TCN_CMR_BURST_MASK) /* XC0 ANDed with selected clock */ -# define TCN_CMR_BURST_XC1 (2 << TCN_CMR_BURST_MASK) /* XC1 ANDed with selected clock */ -# define TCN_CMR_BURST_XC2 (3 << TCN_CMR_BURST_MASK) /* XC2 ANDed with selected clock */ -#define TCN_CMR_WAVE (1 << 15) /* Bit 15: (Common) */ - -#define TCN_CMR_LDBSTOP (1 << 6) /* Bit 6: Counter stopped with RB Loading (Capture mode) */ -#define TCN_CMR_LDBDIS (1 << 7) /* Bit 7: Counter disable with RB Loading (Capture mode) */ -#define TCN_CMR_ETRGEDG_SHIFT (8) /* Bits 8-9: External Trigger Edge Selection (Capture mode) */ -#define TCN_CMR_ETRGEDG_MASK (3 << TCN_CMR_ETRGEDG_SHIFT) -# define TCN_CMR_ETRGEDG_NONE (0 << TCN_CMR_ETRGEDG_SHIFT) /* None */ -# define TCN_CMR_ETRGEDG_REDGE (1 << TCN_CMR_ETRGEDG_SHIFT) /* Rising edge */ -# define TCN_CMR_ETRGEDG_FEDGE (2 << TCN_CMR_ETRGEDG_SHIFT) /* Falling edge */ -# define TCN_CMR_ETRGEDG_EACH (3 << TCN_CMR_ETRGEDG_SHIFT) /* Each */ -#define TCN_CMR_ABETRG (1 << 10) /* Bit 10: TIOA or TIOB External Trigger Selection (Capture mode) */ -#define TCN_CMR_CPCTRG (1 << 14) /* Bit 14: RC Compare Trigger Enable (Capture mode) */ -#define TCN_CMR_LDRA_SHIFT (16) /* Bits 16-17: RA Loading Selection (Capture mode) */ -#define TCN_CMR_LDRA_MASK (3 << TCN_CMR_LDRA_SHIFT) -# define TCN_CMR_LDRA_NONE (0 << TCN_CMR_LDRA_SHIFT) /* None */ -# define TCN_CMR_LDRA_REDGE (1 << TCN_CMR_LDRA_SHIFT) /* Rising edge of TIOA */ -# define TCN_CMR_LDRA_FEDGE (2 << TCN_CMR_LDRA_SHIFT) /* Falling edge of TIOA */ -# define TCN_CMR_LDRA_EACH (3 << TCN_CMR_LDRA_SHIFT) /* Each edge of TIOA */ -#define TCN_CMR_LDRB_SHIFT (18) /* Bits 18-19: RB Loading Selection (Capture mode) */ -#define TCN_CMR_LDRB_MASK (3 << TCN_CMR_LDRB_SHIFT) -# define TCN_CMR_LDRB_NONE (0 << TCN_CMR_LDRB_SHIFT) /* None */ -# define TCN_CMR_LDRB_REDGE (1 << TCN_CMR_LDRB_SHIFT) /* Rising edge of TIOB */ -# define TCN_CMR_LDRB_FEDGE (2 << TCN_CMR_LDRB_SHIFT) /* Falling edge of TIOB */ -# define TCN_CMR_LDRB_EACH (3 << TCN_CMR_LDRB_SHIFT) /* Each edge of TIOB */ - -#define TCN_CMR_CPCSTOP (1 << 6) /* Bit 6: Counter Clock Stopped with RC Compare (Waveform mode) */ -#define TCN_CMR_CPCDIS (1 << 7) /* Bit 7: Counter Clock Disable with RC Compare (Waveform mode) */ -#define TCN_CMR_EEVTEDG_SHIFT (8) /* Bits 8-9: External Event Edge Selection (Waveform mode) */ -#define TCN_CMR_EEVTEDG_MASK (3 << TCN_CMR_EEVTEDG_SHIFT) -# define TCN_CMR_EEVTEDG_NONE (0 << TCN_CMR_EEVTEDG_SHIFT) /* None */ -# define TCN_CMR_EEVTEDG_REDGE (1 << TCN_CMR_EEVTEDG_SHIFT) /* Rising edge */ -# define TCN_CMR_EEVTEDG_FEDGE (2 << TCN_CMR_EEVTEDG_SHIFT) /* Falling edge */ -# define TCN_CMR_EEVTEDG_EACH (3 << TCN_CMR_EEVTEDG_SHIFT) /* Each edge */ -#define TCN_CMR_EEVT_SHIFT (10) /* Bits 10-11: External Event Selection (Waveform mode) */ -#define TCN_CMR_EEVT_MASK (3 << TCN_CMR_EEVT_SHIFT) -# define TCN_CMR_EEVT_TIOB (0 << TCN_CMR_EEVT_SHIFT) /* TIOB input */ -# define TCN_CMR_EEVT_XC0 (1 << TCN_CMR_EEVT_SHIFT) /* XC0 output */ -# define TCN_CMR_EEVT_XC1 (2 << TCN_CMR_EEVT_SHIFT) /* XC1 output */ -# define TCN_CMR_EEVT_XC2 (3 << TCN_CMR_EEVT_SHIFT) /* XC2 output */ -#define TCN_CMR_ENETRG (1 << 12) /* Bit 12: External Event Trigger Enable (Waveform mode) */ -#define TCN_CMR_WAVSEL_SHIFT (13) /* Bits 13-14: Waveform Selection (Waveform mode) */ -#define TCN_CMR_WAVSEL_MASK (3 << TCN_CMR_WAVSEL_SHIFT) -# define TCN_CMR_WAVSEL_UP (0 << TCN_CMR_WAVSEL_SHIFT) /* UP mode w/o auto trigger (Waveform mode) */ -# define TCN_CMR_WAVSEL_UPAUTO (1 << TCN_CMR_WAVSEL_SHIFT) /* UP mode with auto trigger (Waveform mode) */ -# define TCN_CMR_WAVSEL_UPDWN (2 << TCN_CMR_WAVSEL_SHIFT) /* UPDOWN mode w/o auto trigger (Waveform mode) */ -# define TCN_CMR_WAVSEL_UPDWNAUTO (3 << TCN_CMR_WAVSEL_SHIFT) /* UPDOWN mode with auto trigger (Waveform mode) */ -#define TCN_CMR_ACPA_SHIFT (16) /* Bits 16-17: RA Compare Effect on TIOA (Waveform mode) */ -#define TCN_CMR_ACPA_MASK (3 << TCN_CMR_ACPA_SHIFT) -# define TCN_CMR_ACPA_NONE (0 << TCN_CMR_ACPA_SHIFT) -# define TCN_CMR_ACPA_SET (1 << TCN_CMR_ACPA_SHIFT) -# define TCN_CMR_ACPA_CLEAR (2 << TCN_CMR_ACPA_SHIFT) -# define TCN_CMR_ACPA_TOGGLE (3 << TCN_CMR_ACPA_SHIFT) -#define TCN_CMR_ACPC_SHIFT (18) /* Bits 18-19: RC Compare Effect on TIOA (Waveform mode) */ -#define TCN_CMR_ACPC_MASK (3 << TCN_CMR_ACPC_SHIFT) -# define TCN_CMR_ACPC_NONE (0 << TCN_CMR_ACPC_SHIFT) -# define TCN_CMR_ACPC_SET (1 << TCN_CMR_ACPC_SHIFT) -# define TCN_CMR_ACPC_CLEAR (2 << TCN_CMR_ACPC_SHIFT) -# define TCN_CMR_ACPC_TOGGLE (3 << TCN_CMR_ACPC_SHIFT) -#define TCN_CMR_AEEVT_SHIFT (20) /* Bits 20-21: External Event Effect on TIOA (Waveform mode) */ -#define TCN_CMR_AEEVT_MASK (3 << TCN_CMR_AEEVT_SHIFT) -# define TCN_CMR_AEEVT_NONE (0 << TCN_CMR_AEEVT_SHIFT) -# define TCN_CMR_AEEVT_SET (1 << TCN_CMR_AEEVT_SHIFT) -# define TCN_CMR_AEEVT_CLEAR (2 << TCN_CMR_AEEVT_SHIFT) -# define TCN_CMR_AEEVT_TOGGLE (3 << TCN_CMR_AEEVT_SHIFT) -#define TCN_CMR_ASWTRG_SHIFT (22) /* Bits 22-23: Software Trigger Effect on TIOA (Waveform mode) */ -#define TCN_CMR_ASWTRG_MASK (3 << TCN_CMR_ASWTRG_SHIFT) -# define TCN_CMR_ASWTRG_NONE (0 << TCN_CMR_ASWTRG_SHIFT) -# define TCN_CMR_ASWTRG_SET (1 << TCN_CMR_ASWTRG_SHIFT) -# define TCN_CMR_ASWTRG_CLEAR (2 << TCN_CMR_ASWTRG_SHIFT) -# define TCN_CMR_ASWTRG_TOGGLE (3 << TCN_CMR_ASWTRG_SHIFT) -#define TCN_CMR_BCPB_SHIFT (24) /* Bits 24-25: RB Compare Effect on TIOB (Waveform mode) */ -#define TCN_CMR_BCPB_MASK (3 << TCN_CMR_BCPB_SHIFT) -# define TCN_CMR_BCPB_NONE (0 << TCN_CMR_BCPB_SHIFT) -# define TCN_CMR_BCPB_SET (1 << TCN_CMR_BCPB_SHIFT) -# define TCN_CMR_BCPB_CLEAR (2 << TCN_CMR_BCPB_SHIFT) -# define TCN_CMR_BCPB_TOGGLE (3 << TCN_CMR_BCPB_SHIFT) -#define TCN_CMR_BCPC_SHIFT (26) /* Bits 26-27: RC Compare Effect on TIOB (Waveform mode) */ -#define TCN_CMR_BCPC_MASK (3 << TCN_CMR_BCPC_SHIFT) -# define TCN_CMR_BCPC_NONE (0 << TCN_CMR_BCPC_SHIFT) -# define TCN_CMR_BCPC_SET (1 << TCN_CMR_BCPC_SHIFT) -# define TCN_CMR_BCPC_CLEAR (2 << TCN_CMR_BCPC_SHIFT) -# define TCN_CMR_BCPC_TOGGLE (3 << TCN_CMR_BCPC_SHIFT) -#define TCN_CMR_BEEVT_SHIFT (28) /* Bits 28-29: External Event Effect on TIOB (Waveform mode) */ -#define TCN_CMR_BEEVT_MASK (3 << TCN_CMR_BEEVT_SHIFT) -# define TCN_CMR_BEEVT_NONE (0 << TCN_CMR_BEEVT_SHIFT) -# define TCN_CMR_BEEVT_SET (1 << TCN_CMR_BEEVT_SHIFT) -# define TCN_CMR_BEEVT_CLEAR (2 << TCN_CMR_BEEVT_SHIFT) -# define TCN_CMR_BEEVT_TOGGLE (3 << TCN_CMR_BEEVT_SHIFT) -#define TCN_CMR_BSWTRG_SHIFT (30) /* Bits 30-31: Software Trigger Effect on TIOB (Waveform mode) */ -#define TCN_CMR_BSWTRG_MASK (3 << TCN_CMR_BSWTRG_SHIFT) -# define TCN_CMR_BSWTRG_NONE (0 << TCN_CMR_BSWTRG_SHIFT) -# define TCN_CMR_BSWTRG_SET (1 << TCN_CMR_BSWTRG_SHIFT) -# define TCN_CMR_BSWTRG_CLEAR (2 << TCN_CMR_BSWTRG_SHIFT) -# define TCN_CMR_BSWTRG_TOGGLE (3 << TCN_CMR_BSWTRG_SHIFT) - -/* TC Counter Value Register */ - -#define TCN_CV_SHIFT (0) /* Bits 0-15: Counter Value */ -#define TCN_CV_MASK (0xffff << TCN_CV_SHIFT) - -/* TC Register A, B, C */ - -#define TCN_RVALUE_SHIFT (0) /* Bits 0-15: Register A, B, or C value */ -#define TCN_RVALUE_MASK (0xffff << TCN_RVALUE_SHIFT) - -/* TC Status Register, TC Interrupt Enable Register, TC Interrupt Disable Register, and TC Interrupt Mask Register common bit-field definitions */ - -#define TCN_INT_COVFS (1 << 0) /* Bit 0: Counter Overflow */ -#define TCN_INT_LOVRS (1 << 1) /* Bit 1: Load Overrun */ -#define TCN_INT_CPAS (1 << 2) /* Bit 2: RA Compare */ -#define TCN_INT_CPBS (1 << 3) /* Bit 3: RB Compare */ -#define TCN_INT_CPCS (1 << 4) /* Bit 4: RC Compare */ -#define TCN_INT_LDRAS (1 << 5) /* Bit 5: RA Loading */ -#define TCN_INT_LDRBS (1 << 6) /* Bit 6: RB Loading */ -#define TCN_INT_ETRGS (1 << 7) /* Bit 7: External Trigger */ -#define TCN_INT_CLKSTA (1 << 16) /* Bit 16: Clock Enabling (SR only) */ -#define TCN_SR_MTIOA (1 << 17) /* Bit 17: TIOA Mirror (SR only) */ -#define TCN_SR_MTIOB (1 << 18) /* Bit 18: TIOB Mirror (SR only)*/ - -/************************************************************************************************ - * Public Types - ************************************************************************************************/ - -/************************************************************************************************ - * Public Data - ************************************************************************************************/ - -/************************************************************************************************ - * Public Functions - ************************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H */ +/************************************************************************************************ + * arch/arm/src/sam3u/sam3u_tc.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H + +/************************************************************************************************ + * Included Files + ************************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/************************************************************************************************ + * Pre-processor Definitions + ************************************************************************************************/ + +/* TC register offsets **************************************************************************/ + +/* Timer channel offsets (with respect to timer base offset 0f 0x00, 0x40, or 0x80 */ + +#define SAM3U_TCN_OFFSET(n) (0x00 + ((n)<<6)) /* 0x00, 0x40, 0x80 */ +#define SAM3U_TCN_CCR_OFFSET 0x00 /* Channel Control Register */ +#define SAM3U_TCN_CMR_OFFSET 0x04 /* Channel Mode Register */ + /* 0x08 Reserved */ + /* 0x0c Reserved */ +#define SAM3U_TCN_CV_OFFSET 0x10 /* Counter Value */ +#define SAM3U_TCN_RA_OFFSET 0x14 /* Register A */ +#define SAM3U_TCN_RB_OFFSET 0x18 /* Register B */ +#define SAM3U_TCN_RC_OFFSET 0x1c /* Register C */ +#define SAM3U_TCN_SR_OFFSET 0x20 /* Status Register */ +#define SAM3U_TCN_IER_OFFSET 0x24 /* Interrupt Enable Register */ +#define SAM3U_TCN_IDR_OFFSET 0x28 /* Interrupt Disable Register */ +#define SAM3U_TCN_IMR_OFFSET 0x2c /* Interrupt Mask Register */ + +/* Timer common registers */ + +#define SAM3U_TC_BCR_OFFSET 0xc0 /* Block Control Register */ +#define SAM3U_TC_BMR_OFFSET 0xc4 /* Block Mode Register */ +#define SAM3U_TC_QIER_OFFSET 0xc8 /* QDEC Interrupt Enable Register */ +#define SAM3U_TC_QIDR_OFFSET 0xcc /* QDEC Interrupt Disable Register */ +#define SAM3U_TC_QIMR_OFFSET 0xd0 /* QDEC Interrupt Mask Register */ +#define SAM3U_TC_QISR_OFFSET 0xd4 /* QDEC Interrupt Status Register */ + /* 0xd8 Reserved */ + /* 0xe4 Reserved */ + +/* TC register adresses *************************************************************************/ + +/* Timer channel offsets (with respect to timer base offset 0f 0x00, 0x40, or 0x80 */ + +#define SAM3U_TC_CCR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CCR_OFFSET) +#define SAM3U_TC_CMR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CMR_OFFSET) +#define SAM3U_TC_CV(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_CV_OFFSET) +#define SAM3U_TC_RA(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RA_OFFSET) +#define SAM3U_TC_RB(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RB_OFFSET) +#define SAM3U_TC_RC(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_RC_OFFSET) +#define SAM3U_TC_SR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_SR_OFFSET) +#define SAM3U_TC_IER(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IER_OFFSET) +#define SAM3U_TC_IDR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IDR_OFFSET) +#define SAM3U_TC_IMR(n) (SAM3U_TCN_BASE(n)+SAM3U_TCN_IMR_OFFSET) + +#define SAM3U_TC0_CCR (SAM3U_TC0_BASE+SAM3U_TCN_CCR_OFFSET) +#define SAM3U_TC0_CMR (SAM3U_TC0_BASE+SAM3U_TCN_CMR_OFFSET) +#define SAM3U_TC0_CV (SAM3U_TC0_BASE+SAM3U_TCN_CV_OFFSET) +#define SAM3U_TC0_RA (SAM3U_TC0_BASE+SAM3U_TCN_RA_OFFSET) +#define SAM3U_TC0_RB (SAM3U_TC0_BASE+SAM3U_TCN_RB_OFFSET) +#define SAM3U_TC0_RC (SAM3U_TC0_BASE+SAM3U_TCN_RC_OFFSET) +#define SAM3U_TC0_SR (SAM3U_TC0_BASE+SAM3U_TCN_SR_OFFSET) +#define SAM3U_TC0_IER (SAM3U_TC0_BASE+SAM3U_TCN_IER_OFFSET) +#define SAM3U_TC0_IDR (SAM3U_TC0_BASE+SAM3U_TCN_IDR_OFFSET) +#define SAM3U_TC0_IMR (SAM3U_TC0_BASE+SAM3U_TCN_IMR_OFFSET) + +#define SAM3U_TC1_CCR (SAM3U_TC1_BASE+SAM3U_TCN_CCR_OFFSET) +#define SAM3U_TC1_CMR (SAM3U_TC1_BASE+SAM3U_TCN_CMR_OFFSET) +#define SAM3U_TC1_CV (SAM3U_TC1_BASE+SAM3U_TCN_CV_OFFSET) +#define SAM3U_TC1_RA (SAM3U_TC1_BASE+SAM3U_TCN_RA_OFFSET) +#define SAM3U_TC1_RB (SAM3U_TC1_BASE+SAM3U_TCN_RB_OFFSET) +#define SAM3U_TC1_RC (SAM3U_TC1_BASE+SAM3U_TCN_RC_OFFSET) +#define SAM3U_TC1_SR (SAM3U_TC1_BASE+SAM3U_TCN_SR_OFFSET) +#define SAM3U_TC1_IER (SAM3U_TC1_BASE+SAM3U_TCN_IER_OFFSET) +#define SAM3U_TC1_IDR (SAM3U_TC1_BASE+SAM3U_TCN_IDR_OFFSET) +#define SAM3U_TC1_IMR (SAM3U_TC1_BASE+SAM3U_TCN_IMR_OFFSET) + +#define SAM3U_TC2_CCR (SAM3U_TC2_BASE+SAM3U_TCN_CCR_OFFSET) +#define SAM3U_TC2_CMR (SAM3U_TC2_BASE+SAM3U_TCN_CMR_OFFSET) +#define SAM3U_TC2_CV (SAM3U_TC2_BASE+SAM3U_TCN_CV_OFFSET) +#define SAM3U_TC2_RA (SAM3U_TC2_BASE+SAM3U_TCN_RA_OFFSET) +#define SAM3U_TC2_RB (SAM3U_TC2_BASE+SAM3U_TCN_RB_OFFSET) +#define SAM3U_TC2_RC (SAM3U_TC2_BASE+SAM3U_TCN_RC_OFFSET) +#define SAM3U_TC2_SR (SAM3U_TC2_BASE+SAM3U_TCN_SR_OFFSET) +#define SAM3U_TC2_IER (SAM3U_TC2_BASE+SAM3U_TCN_IER_OFFSET) +#define SAM3U_TC2_IDR (SAM3U_TC2_BASE+SAM3U_TCN_IDR_OFFSET) +#define SAM3U_TC2_IMR (SAM3U_TC2_BASE+SAM3U_TCN_IMR_OFFSET) + +/* Timer common registers */ + +#define SAM3U_TC_BCR (SAM3U_TC_BASE+SAM3U_TC_BCR_OFFSET) +#define SAM3U_TC_BMR (SAM3U_TC_BASE+SAM3U_TC_BMR_OFFSET) +#define SAM3U_TC_QIER (SAM3U_TC_BASE+SAM3U_TC_QIER_OFFSET) +#define SAM3U_TC_QIDR (SAM3U_TC_BASE+SAM3U_TC_QIDR_OFFSET) +#define SAM3U_TC_QIMR (SAM3U_TC_BASE+SAM3U_TC_QIMR_OFFSET) +#define SAM3U_TC_QISR (SAM3U_TC_BASE+SAM3U_TC_QISR_OFFSET) + +/* TC register bit definitions ******************************************************************/ + +/* Timer common registers */ +/* TC Block Control Register */ + +#define TC_BCR_SYNC (1 << 0) /* Bit 0: Synchro Command + +/* TC Block Mode Register */ + +#define TC_BMR_TC0XC0S_SHIFT (0) /* Bits 0-1: External Clock Signal 0 Selection */ +#define TC_BMR_TC0XC0S_MASK (3 << TC_BMR_TC0XC0S_SHIFT) +# define TC_BMR_TC0XC0S_TCLK0 (0 << TC_BMR_TC0XC0S_SHIFT) +# define TC_BMR_TC0XC0S_NONE (1 << TC_BMR_TC0XC0S_SHIFT) +# define TC_BMR_TC0XC0S_TIOA1 (2 << TC_BMR_TC0XC0S_SHIFT) +# define TC_BMR_TC0XC0S_TIOA2 (3 << TC_BMR_TC0XC0S_SHIFT) +#define TC_BMR_TC1XC1S_SHIFT (2) /* Bits 2-3: External Clock Signal 1 Selection */ +#define TC_BMR_TC1XC1S_MASK (3 << TC_BMR_TC1XC1S_MASK) +# define TC_BMR_TC1XC1S_TCLK1 (0 << TC_BMR_TC1XC1S_SHIFT) +# define TC_BMR_TC1XC1S_NONE (1 << TC_BMR_TC1XC1S_SHIFT) +# define TC_BMR_TC1XC1S_TIOA0 (2 << TC_BMR_TC1XC1S_SHIFT) +# define TC_BMR_TC1XC1S_TIOA2 (3 << TC_BMR_TC1XC1S_SHIFT) +#define TC_BMR_TC2XC2S_SHIFT (4) /* Bits 4-5: External Clock Signal 2 Selection */ +#define TC_BMR_TC2XC2S_MASK (3 << TC_BMR_TC2XC2S_SHIFT) +# define TC_BMR_TC2XC2S_TCLK2 (0 << TC_BMR_TC2XC2S_SHIFT) +# define TC_BMR_TC2XC2S_NONE (1 << TC_BMR_TC2XC2S_SHIFT) +# define TC_BMR_TC2XC2S_TIOA0 (2 << TC_BMR_TC2XC2S_SHIFT) +# define TC_BMR_TC2XC2S_TIOA1 (3 << TC_BMR_TC2XC2S_SHIFT) +#define TC_BMR_QDEN (1 << 8) /* Bit 8: Quadrature Decoder Enabled */ +#define TC_BMR_POSEN (1 << 9) /* Bit 9: Position Enabled */ +#define TC_BMR_SPEEDEN (1 << 10) /* Bit 10: Speed Enabled */ +#define TC_BMR_QDTRANS (1 << 11) /* Bit 11: Quadrature Decoding Transparent */ +#define TC_BMR_EDGPHA (1 << 12) /* Bit 12: Edge on PHA count mode */ +#define TC_BMR_INVA (1 << 13) /* Bit 13: Inverted PHA */ +#define TC_BMR_INVB (1 << 14) /* Bit 14: Inverted PHB */ +#define TC_BMR_SWAP (1 << 15) /* Bit 15: Swap PHA and PHB */ +#define TC_BMR_INVIDX (1 << 16) /* Bit 16: Inverted Index */ +#define TC_BMR_IDXPHB (1 << 17) /* Bit 17: Index pin is PHB pin */ +#define TC_BMR_FILTER (1 << 19) /* Bit 19 */ +#define TC_BMR_MAXFILT_SHIFT (20) /* Bits 20-25: Maximum Filter */ +#define TC_BMR_MAXFILT_MASK (63 << TC_BMR_MAXFILT_SHIFT) + +/* TC QDEC Interrupt Enable Register, TC QDEC Interrupt Disable Register, + * TC QDEC Interrupt Mask Register, TC QDEC Interrupt Status Register common + * bit field definitions + */ + +#define TC_QINT_IDX (1 << 0) /* Bit 0: Index (Common) */ +#define TC_QINT_DIRCHG (1 << 1) /* Bit 1: Direction Change (Common) */ +#define TC_QINT_QERR (1 << 2) /* Bit 2: Quadrature Error (Common) */ +#define TC_QISR_DIR (1 << 8) /* Bit 8: Direction (QISR only) */ + +/* Timer Channel Registers */ +/* TC Channel Control Register */ + +#define TCN_CCR_CLKEN (1 << 0) /* Bit 0: Counter Clock Enable Command */ +#define TCN_CCR_CLKDIS (1 << 1) /* Bit 1: Counter Clock Disable Command */ +#define TCN_CCR_SWTRG (1 << 2) /* Bit 2: Software Trigger Command */ + +/* TC Channel Mode Register */ + +#define TCN_CMR_TCCLKS_SHIFT (0) /* Bits 0-2: Clock Selection (Common) */ +#define TCN_CMR_TCCLKS_MASK (7 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_TIMERCLOCK1 (0 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_TIMERCLOCK2 (1 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_TIMERCLOCK3 (2 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_TIMERCLOCK4 (3 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_TIMERCLOCK5 (4 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_XC0 (5 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_XC1 (6 << TCN_CMR_TCCLKS_SHIFT) +# define TCN_CMR_TCCLKS_XC2 (7 << TCN_CMR_TCCLKS_SHIFT) +#define TCN_CMR_CLKI (1 << 3) /* Bit 3: Clock Invert (Common) */ +#define TCN_CMR_BURST_SHIFT (4) /* Bits 4-5: Burst Signal Selection (Common) */ +#define TCN_CMR_BURST_MASK (3 << TCN_CMR_BURST_MASK) +#define TCN_CMR_BURST_MASK (3 << TCN_CMR_BURST_MASK) +# define TCN_CMR_BURST_NOTGATED (0 << TCN_CMR_BURST_MASK) /* Nott gated by external signal */ +# define TCN_CMR_BURST_XC0 (1 << TCN_CMR_BURST_MASK) /* XC0 ANDed with selected clock */ +# define TCN_CMR_BURST_XC1 (2 << TCN_CMR_BURST_MASK) /* XC1 ANDed with selected clock */ +# define TCN_CMR_BURST_XC2 (3 << TCN_CMR_BURST_MASK) /* XC2 ANDed with selected clock */ +#define TCN_CMR_WAVE (1 << 15) /* Bit 15: (Common) */ + +#define TCN_CMR_LDBSTOP (1 << 6) /* Bit 6: Counter stopped with RB Loading (Capture mode) */ +#define TCN_CMR_LDBDIS (1 << 7) /* Bit 7: Counter disable with RB Loading (Capture mode) */ +#define TCN_CMR_ETRGEDG_SHIFT (8) /* Bits 8-9: External Trigger Edge Selection (Capture mode) */ +#define TCN_CMR_ETRGEDG_MASK (3 << TCN_CMR_ETRGEDG_SHIFT) +# define TCN_CMR_ETRGEDG_NONE (0 << TCN_CMR_ETRGEDG_SHIFT) /* None */ +# define TCN_CMR_ETRGEDG_REDGE (1 << TCN_CMR_ETRGEDG_SHIFT) /* Rising edge */ +# define TCN_CMR_ETRGEDG_FEDGE (2 << TCN_CMR_ETRGEDG_SHIFT) /* Falling edge */ +# define TCN_CMR_ETRGEDG_EACH (3 << TCN_CMR_ETRGEDG_SHIFT) /* Each */ +#define TCN_CMR_ABETRG (1 << 10) /* Bit 10: TIOA or TIOB External Trigger Selection (Capture mode) */ +#define TCN_CMR_CPCTRG (1 << 14) /* Bit 14: RC Compare Trigger Enable (Capture mode) */ +#define TCN_CMR_LDRA_SHIFT (16) /* Bits 16-17: RA Loading Selection (Capture mode) */ +#define TCN_CMR_LDRA_MASK (3 << TCN_CMR_LDRA_SHIFT) +# define TCN_CMR_LDRA_NONE (0 << TCN_CMR_LDRA_SHIFT) /* None */ +# define TCN_CMR_LDRA_REDGE (1 << TCN_CMR_LDRA_SHIFT) /* Rising edge of TIOA */ +# define TCN_CMR_LDRA_FEDGE (2 << TCN_CMR_LDRA_SHIFT) /* Falling edge of TIOA */ +# define TCN_CMR_LDRA_EACH (3 << TCN_CMR_LDRA_SHIFT) /* Each edge of TIOA */ +#define TCN_CMR_LDRB_SHIFT (18) /* Bits 18-19: RB Loading Selection (Capture mode) */ +#define TCN_CMR_LDRB_MASK (3 << TCN_CMR_LDRB_SHIFT) +# define TCN_CMR_LDRB_NONE (0 << TCN_CMR_LDRB_SHIFT) /* None */ +# define TCN_CMR_LDRB_REDGE (1 << TCN_CMR_LDRB_SHIFT) /* Rising edge of TIOB */ +# define TCN_CMR_LDRB_FEDGE (2 << TCN_CMR_LDRB_SHIFT) /* Falling edge of TIOB */ +# define TCN_CMR_LDRB_EACH (3 << TCN_CMR_LDRB_SHIFT) /* Each edge of TIOB */ + +#define TCN_CMR_CPCSTOP (1 << 6) /* Bit 6: Counter Clock Stopped with RC Compare (Waveform mode) */ +#define TCN_CMR_CPCDIS (1 << 7) /* Bit 7: Counter Clock Disable with RC Compare (Waveform mode) */ +#define TCN_CMR_EEVTEDG_SHIFT (8) /* Bits 8-9: External Event Edge Selection (Waveform mode) */ +#define TCN_CMR_EEVTEDG_MASK (3 << TCN_CMR_EEVTEDG_SHIFT) +# define TCN_CMR_EEVTEDG_NONE (0 << TCN_CMR_EEVTEDG_SHIFT) /* None */ +# define TCN_CMR_EEVTEDG_REDGE (1 << TCN_CMR_EEVTEDG_SHIFT) /* Rising edge */ +# define TCN_CMR_EEVTEDG_FEDGE (2 << TCN_CMR_EEVTEDG_SHIFT) /* Falling edge */ +# define TCN_CMR_EEVTEDG_EACH (3 << TCN_CMR_EEVTEDG_SHIFT) /* Each edge */ +#define TCN_CMR_EEVT_SHIFT (10) /* Bits 10-11: External Event Selection (Waveform mode) */ +#define TCN_CMR_EEVT_MASK (3 << TCN_CMR_EEVT_SHIFT) +# define TCN_CMR_EEVT_TIOB (0 << TCN_CMR_EEVT_SHIFT) /* TIOB input */ +# define TCN_CMR_EEVT_XC0 (1 << TCN_CMR_EEVT_SHIFT) /* XC0 output */ +# define TCN_CMR_EEVT_XC1 (2 << TCN_CMR_EEVT_SHIFT) /* XC1 output */ +# define TCN_CMR_EEVT_XC2 (3 << TCN_CMR_EEVT_SHIFT) /* XC2 output */ +#define TCN_CMR_ENETRG (1 << 12) /* Bit 12: External Event Trigger Enable (Waveform mode) */ +#define TCN_CMR_WAVSEL_SHIFT (13) /* Bits 13-14: Waveform Selection (Waveform mode) */ +#define TCN_CMR_WAVSEL_MASK (3 << TCN_CMR_WAVSEL_SHIFT) +# define TCN_CMR_WAVSEL_UP (0 << TCN_CMR_WAVSEL_SHIFT) /* UP mode w/o auto trigger (Waveform mode) */ +# define TCN_CMR_WAVSEL_UPAUTO (1 << TCN_CMR_WAVSEL_SHIFT) /* UP mode with auto trigger (Waveform mode) */ +# define TCN_CMR_WAVSEL_UPDWN (2 << TCN_CMR_WAVSEL_SHIFT) /* UPDOWN mode w/o auto trigger (Waveform mode) */ +# define TCN_CMR_WAVSEL_UPDWNAUTO (3 << TCN_CMR_WAVSEL_SHIFT) /* UPDOWN mode with auto trigger (Waveform mode) */ +#define TCN_CMR_ACPA_SHIFT (16) /* Bits 16-17: RA Compare Effect on TIOA (Waveform mode) */ +#define TCN_CMR_ACPA_MASK (3 << TCN_CMR_ACPA_SHIFT) +# define TCN_CMR_ACPA_NONE (0 << TCN_CMR_ACPA_SHIFT) +# define TCN_CMR_ACPA_SET (1 << TCN_CMR_ACPA_SHIFT) +# define TCN_CMR_ACPA_CLEAR (2 << TCN_CMR_ACPA_SHIFT) +# define TCN_CMR_ACPA_TOGGLE (3 << TCN_CMR_ACPA_SHIFT) +#define TCN_CMR_ACPC_SHIFT (18) /* Bits 18-19: RC Compare Effect on TIOA (Waveform mode) */ +#define TCN_CMR_ACPC_MASK (3 << TCN_CMR_ACPC_SHIFT) +# define TCN_CMR_ACPC_NONE (0 << TCN_CMR_ACPC_SHIFT) +# define TCN_CMR_ACPC_SET (1 << TCN_CMR_ACPC_SHIFT) +# define TCN_CMR_ACPC_CLEAR (2 << TCN_CMR_ACPC_SHIFT) +# define TCN_CMR_ACPC_TOGGLE (3 << TCN_CMR_ACPC_SHIFT) +#define TCN_CMR_AEEVT_SHIFT (20) /* Bits 20-21: External Event Effect on TIOA (Waveform mode) */ +#define TCN_CMR_AEEVT_MASK (3 << TCN_CMR_AEEVT_SHIFT) +# define TCN_CMR_AEEVT_NONE (0 << TCN_CMR_AEEVT_SHIFT) +# define TCN_CMR_AEEVT_SET (1 << TCN_CMR_AEEVT_SHIFT) +# define TCN_CMR_AEEVT_CLEAR (2 << TCN_CMR_AEEVT_SHIFT) +# define TCN_CMR_AEEVT_TOGGLE (3 << TCN_CMR_AEEVT_SHIFT) +#define TCN_CMR_ASWTRG_SHIFT (22) /* Bits 22-23: Software Trigger Effect on TIOA (Waveform mode) */ +#define TCN_CMR_ASWTRG_MASK (3 << TCN_CMR_ASWTRG_SHIFT) +# define TCN_CMR_ASWTRG_NONE (0 << TCN_CMR_ASWTRG_SHIFT) +# define TCN_CMR_ASWTRG_SET (1 << TCN_CMR_ASWTRG_SHIFT) +# define TCN_CMR_ASWTRG_CLEAR (2 << TCN_CMR_ASWTRG_SHIFT) +# define TCN_CMR_ASWTRG_TOGGLE (3 << TCN_CMR_ASWTRG_SHIFT) +#define TCN_CMR_BCPB_SHIFT (24) /* Bits 24-25: RB Compare Effect on TIOB (Waveform mode) */ +#define TCN_CMR_BCPB_MASK (3 << TCN_CMR_BCPB_SHIFT) +# define TCN_CMR_BCPB_NONE (0 << TCN_CMR_BCPB_SHIFT) +# define TCN_CMR_BCPB_SET (1 << TCN_CMR_BCPB_SHIFT) +# define TCN_CMR_BCPB_CLEAR (2 << TCN_CMR_BCPB_SHIFT) +# define TCN_CMR_BCPB_TOGGLE (3 << TCN_CMR_BCPB_SHIFT) +#define TCN_CMR_BCPC_SHIFT (26) /* Bits 26-27: RC Compare Effect on TIOB (Waveform mode) */ +#define TCN_CMR_BCPC_MASK (3 << TCN_CMR_BCPC_SHIFT) +# define TCN_CMR_BCPC_NONE (0 << TCN_CMR_BCPC_SHIFT) +# define TCN_CMR_BCPC_SET (1 << TCN_CMR_BCPC_SHIFT) +# define TCN_CMR_BCPC_CLEAR (2 << TCN_CMR_BCPC_SHIFT) +# define TCN_CMR_BCPC_TOGGLE (3 << TCN_CMR_BCPC_SHIFT) +#define TCN_CMR_BEEVT_SHIFT (28) /* Bits 28-29: External Event Effect on TIOB (Waveform mode) */ +#define TCN_CMR_BEEVT_MASK (3 << TCN_CMR_BEEVT_SHIFT) +# define TCN_CMR_BEEVT_NONE (0 << TCN_CMR_BEEVT_SHIFT) +# define TCN_CMR_BEEVT_SET (1 << TCN_CMR_BEEVT_SHIFT) +# define TCN_CMR_BEEVT_CLEAR (2 << TCN_CMR_BEEVT_SHIFT) +# define TCN_CMR_BEEVT_TOGGLE (3 << TCN_CMR_BEEVT_SHIFT) +#define TCN_CMR_BSWTRG_SHIFT (30) /* Bits 30-31: Software Trigger Effect on TIOB (Waveform mode) */ +#define TCN_CMR_BSWTRG_MASK (3 << TCN_CMR_BSWTRG_SHIFT) +# define TCN_CMR_BSWTRG_NONE (0 << TCN_CMR_BSWTRG_SHIFT) +# define TCN_CMR_BSWTRG_SET (1 << TCN_CMR_BSWTRG_SHIFT) +# define TCN_CMR_BSWTRG_CLEAR (2 << TCN_CMR_BSWTRG_SHIFT) +# define TCN_CMR_BSWTRG_TOGGLE (3 << TCN_CMR_BSWTRG_SHIFT) + +/* TC Counter Value Register */ + +#define TCN_CV_SHIFT (0) /* Bits 0-15: Counter Value */ +#define TCN_CV_MASK (0xffff << TCN_CV_SHIFT) + +/* TC Register A, B, C */ + +#define TCN_RVALUE_SHIFT (0) /* Bits 0-15: Register A, B, or C value */ +#define TCN_RVALUE_MASK (0xffff << TCN_RVALUE_SHIFT) + +/* TC Status Register, TC Interrupt Enable Register, TC Interrupt Disable Register, and TC Interrupt Mask Register common bit-field definitions */ + +#define TCN_INT_COVFS (1 << 0) /* Bit 0: Counter Overflow */ +#define TCN_INT_LOVRS (1 << 1) /* Bit 1: Load Overrun */ +#define TCN_INT_CPAS (1 << 2) /* Bit 2: RA Compare */ +#define TCN_INT_CPBS (1 << 3) /* Bit 3: RB Compare */ +#define TCN_INT_CPCS (1 << 4) /* Bit 4: RC Compare */ +#define TCN_INT_LDRAS (1 << 5) /* Bit 5: RA Loading */ +#define TCN_INT_LDRBS (1 << 6) /* Bit 6: RB Loading */ +#define TCN_INT_ETRGS (1 << 7) /* Bit 7: External Trigger */ +#define TCN_INT_CLKSTA (1 << 16) /* Bit 16: Clock Enabling (SR only) */ +#define TCN_SR_MTIOA (1 << 17) /* Bit 17: TIOA Mirror (SR only) */ +#define TCN_SR_MTIOB (1 << 18) /* Bit 18: TIOB Mirror (SR only)*/ + +/************************************************************************************************ + * Public Types + ************************************************************************************************/ + +/************************************************************************************************ + * Public Data + ************************************************************************************************/ + +/************************************************************************************************ + * Public Functions + ************************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_TC_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_timerisr.c b/nuttx/arch/arm/src/sam3u/sam3u_timerisr.c index 225af25f6a..5ff6dea699 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_timerisr.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/sam3u/sam3u_timerisr.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_twi.h b/nuttx/arch/arm/src/sam3u/sam3u_twi.h index 4a26ecdc4e..66d1f23b36 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_twi.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_twi.h @@ -1,192 +1,192 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_twi.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* TWI register offsets *****************************************************************/ - -#define SAM3U_TWI_CR_OFFSET 0x00 /* Control Register */ -#define SAM3U_TWI_MMR_OFFSET 0x04 /* Master Mode Register */ -#define SAM3U_TWI_SMR_OFFSET 0x08 /* Slave Mode Register */ -#define SAM3U_TWI_IADR_OFFSET 0x0c /* Internal Address Register */ -#define SAM3U_TWI_CWGR_OFFSET 0x10 /* Clock Waveform Generator Register */ -#define SAM3U_TWI_SR_OFFSET 0x20 /* Status Register */ -#define SAM3U_TWI_IER_OFFSET 0x24 /* Interrupt Enable Register */ -#define SAM3U_TWI_IDR_OFFSET 0x28 /* Interrupt Disable Register */ -#define SAM3U_TWI_IMR_OFFSET 0x2c /* Interrupt Mask Register */ -#define SAM3U_TWI_RHR_OFFSET 0x30 /* Receive Holding Register */ -#define SAM3U_TWI_THR_OFFSET 0x34 /* Transmit Holding Register */ - /* 0x38-0xfc: Reserved */ - /* 0x100-0x124: Reserved for the PDC */ - -/* TWI register adresses ****************************************************************/ - -#define SAM3U_TWI_CR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_CR_OFFSET) -#define SAM3U_TWI_MMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_MMR_OFFSET) -#define SAM3U_TWI_SMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_SMR_OFFSET) -#define SAM3U_TWI_IADR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IADR_OFFSET) -#define SAM3U_TWI_CWGR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_CWGR_OFFSET) -#define SAM3U_TWI_SR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_SR_OFFSET) -#define SAM3U_TWI_IER(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IER_OFFSET) -#define SAM3U_TWI_IDR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IDR_OFFSET) -#define SAM3U_TWI_IMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IMR_OFFSET) -#define SAM3U_TWI_RHR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_RHR_OFFSET) -#define SAM3U_TWI_THR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_THR_OFFSET) - -#define SAM3U_TWI0_CR (SAM3U_TWI0_BASE+SAM3U_TWI_CR_OFFSET) -#define SAM3U_TWI0_MMR (SAM3U_TWI0_BASE+SAM3U_TWI_MMR_OFFSET) -#define SAM3U_TWI0_SMR (SAM3U_TWI0_BASE+SAM3U_TWI_SMR_OFFSET) -#define SAM3U_TWI0_IADR (SAM3U_TWI0_BASE+SAM3U_TWI_IADR_OFFSET) -#define SAM3U_TWI0_CWGR (SAM3U_TWI0_BASE+SAM3U_TWI_CWGR_OFFSET) -#define SAM3U_TWI0_SR (SAM3U_TWI0_BASE+SAM3U_TWI_SR_OFFSET) -#define SAM3U_TWI0_IER (SAM3U_TWI0_BASE+SAM3U_TWI_IER_OFFSET) -#define SAM3U_TWI0_IDR (SAM3U_TWI0_BASE+SAM3U_TWI_IDR_OFFSET) -#define SAM3U_TWI0_IMR (SAM3U_TWI0_BASE+SAM3U_TWI_IMR_OFFSET) -#define SAM3U_TWI0_RHR (SAM3U_TWI0_BASE+SAM3U_TWI_RHR_OFFSET) -#define SAM3U_TWI0_THR (SAM3U_TWI0_BASE+SAM3U_TWI_THR_OFFSET) - -#define SAM3U_TWI1_CR (SAM3U_TWI1_BASE+SAM3U_TWI_CR_OFFSET) -#define SAM3U_TWI1_MMR (SAM3U_TWI1_BASE+SAM3U_TWI_MMR_OFFSET) -#define SAM3U_TWI1_SMR (SAM3U_TWI1_BASE+SAM3U_TWI_SMR_OFFSET) -#define SAM3U_TWI1_IADR (SAM3U_TWI1_BASE+SAM3U_TWI_IADR_OFFSET) -#define SAM3U_TWI1_CWGR (SAM3U_TWI1_BASE+SAM3U_TWI_CWGR_OFFSET) -#define SAM3U_TWI1_SR (SAM3U_TWI1_BASE+SAM3U_TWI_SR_OFFSET) -#define SAM3U_TWI1_IER (SAM3U_TWI1_BASE+SAM3U_TWI_IER_OFFSET) -#define SAM3U_TWI1_IDR (SAM3U_TWI1_BASE+SAM3U_TWI_IDR_OFFSET) -#define SAM3U_TWI1_IMR (SAM3U_TWI1_BASE+SAM3U_TWI_IMR_OFFSET) -#define SAM3U_TWI1_RHR (SAM3U_TWI1_BASE+SAM3U_TWI_RHR_OFFSET) -#define SAM3U_TWI1_THR (SAM3U_TWI1_BASE+SAM3U_TWI_THR_OFFSET) - -/* TWI register bit definitions *********************************************************/ - -/* TWI Control Register */ - -#define TWI_CR_START (1 << 0) /* Bit 0: Send a START Condition */ -#define TWI_CR_STOP (1 << 1) /* Bit 1: Send a STOP Condition */ -#define TWI_CR_MSEN (1 << 2) /* Bit 2: TWI Master Mode Enabled */ -#define TWI_CR_MSDIS (1 << 3) /* Bit 3: TWI Master Mode Disabled */ -#define TWI_CR_SVEN (1 << 4) /* Bit 4: TWI Slave Mode Enabled */ -#define TWI_CR_SVDIS (1 << 5) /* Bit 5: TWI Slave Mode Disabled */ -#define TWI_CR_QUICK (1 << 6) /* Bit 6: SMBUS Quick Command */ -#define TWI_CR_SWRST (1 << 7) /* Bit 7: Software Reset */ - -/* TWI Master Mode Register */' - -#define TWI_MMR_IADRSZ_SHIFT (8) /* Bits 8-9: Internal Device Address Size */ -#define TWI_MMR_IADRSZ_MASK (3 << TWI_MMR_IADRSZ_SHIFT) -# define TWI_MMR_IADRSZ_NONE (0 << TWI_MMR_IADRSZ_SHIFT) /* No internal device address */ -# define TWI_MMR_IADRSZ_1BYTE (1 << TWI_MMR_IADRSZ_SHIFT) /* One-byte internal device address */ -# define TWI_MMR_IADRSZ_3BYTE (2 << TWI_MMR_IADRSZ_SHIFT) /* Two-byte internal device address */ -# define TWI_MMR_IADRSZ_3BYTE (3 << TWI_MMR_IADRSZ_SHIFT) /* Three-byte internal device address */ -#define TWI_MMR_MREAD (1 << 12) /* Bit 12: Master Read Direction */ -#define TWI_MMR_DADR_SHIFT (16) /* Bits 16-23: Device Address */ -#define TWI_MMR_DADR_MASK (0xff << TWI_MMR_DADR_SHIFT) - -/* TWI Slave Mode Register */ - -#define TWI_SMR_SADR_SHIFT (16) /* Bits 16-23: Slave Address */ -#define TWI_SMR_SADR_MASK (0xff << TWI_SMR_SADR_SHIFT) - -/* TWI Internal Address Register */ - -#define TWI_IADR_SHIFT (0) /* Bits 0-23: Internal Address */ -#define TWI_IADR_MASK (0x00ffffff << TWI_IADR_SHIFT) - -/* TWI Clock Waveform Generator Register */ - -#define TWI_CWGR_CLDIV_SHIFT (0) /* Bits 0-7: Clock Low Divider */ -#define TWI_CWGR_CLDIV_MASK (0xff << TWI_CWGR_CLDIV_SHIFT) -#define TWI_CWGR_CHDIV_SHIFT (8) /* Bits 8-15: Clock High Divider */ -#define TWI_CWGR_CHDIV_MASK (0xff << TWI_CWGR_CLDIV_SHIFT) -#define TWI_CWGR_CKDIV_SHIFT (16) /* Bits 16-18: Clock Divider */ -#define TWI_CWGR_CKDIV_MASK (7 << TWI_CWGR_CLDIV_SHIFT) - -/* TWI Status Register, TWI Interrupt Enable Register, TWI Interrupt Disable - * Register, and TWI Interrupt Mask Register common bit fields. - */ - -#define TWI_INT_TXCOMP (1 << 0) /* Bit 0: Transmission Completed */ -#define TWI_INT_RXRDY (1 << 1) /* Bit 1: Receive Holding Register */ -#define TWI_INT_TXRDY (1 << 2) /* Bit 2: Transmit Holding Register Ready */ -#define TWI_SR_SVREAD (1 << 3) /* Bit 3: Slave Read (SR only) */ -#define TWI_INT_SVACC (1 << 4) /* Bit 4: Slave Access */ -#define TWI_INT_GACC (1 << 5) /* Bit 5: General Call Access */ -#define TWI_INT_OVRE (1 << 6) /* Bit 6: Overrun Error */ -#define TWI_INT_NACK (1 << 8) /* Bit 8: Not Acknowledged */ -#define TWI_INT_ARBLST (1 << 9) /* Bit 9: Arbitration Lost */ -#define TWI_INT_SCLWS (1 << 10) /* Bit 10: Clock Wait State */ -#define TWI_INT_EOSACC (1 << 11) /* Bit 11: End Of Slave Access */ -#define TWI_INT_ENDRX (1 << 12) /* Bit 12: End of RX buffer */ -#define TWI_INT_ENDTX (1 << 13) /* Bit 13: End of TX buffer */ -#define TWI_INT_RXBUFF (1 << 14) /* Bit 14: RX Buffer */ -#define TWI_INT_TXBUFE (1 << 15) /* Bit 15: TX Buffer Empty */ - -/* TWI Receive Holding Register */ - -#define TWI_RHR_RXDATA_SHIFT (0) /* Bits 0-7: Master or Slave Receive Holding Data */ -#define TWI_RHR_RXDATA_MASK (0xff << TWI_RHR_RXDATA_SHIFT) - -/* TWI Transmit Holding Register */ - -#define TWI_THR_TXDATA_SHIFT (0) /* Bits 0-7: Master or Slave Transmit Holding Data */ -#define TWI_THR_TXDATA_MASK (0xff << TWI_THR_TXDATA_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_twi.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* TWI register offsets *****************************************************************/ + +#define SAM3U_TWI_CR_OFFSET 0x00 /* Control Register */ +#define SAM3U_TWI_MMR_OFFSET 0x04 /* Master Mode Register */ +#define SAM3U_TWI_SMR_OFFSET 0x08 /* Slave Mode Register */ +#define SAM3U_TWI_IADR_OFFSET 0x0c /* Internal Address Register */ +#define SAM3U_TWI_CWGR_OFFSET 0x10 /* Clock Waveform Generator Register */ +#define SAM3U_TWI_SR_OFFSET 0x20 /* Status Register */ +#define SAM3U_TWI_IER_OFFSET 0x24 /* Interrupt Enable Register */ +#define SAM3U_TWI_IDR_OFFSET 0x28 /* Interrupt Disable Register */ +#define SAM3U_TWI_IMR_OFFSET 0x2c /* Interrupt Mask Register */ +#define SAM3U_TWI_RHR_OFFSET 0x30 /* Receive Holding Register */ +#define SAM3U_TWI_THR_OFFSET 0x34 /* Transmit Holding Register */ + /* 0x38-0xfc: Reserved */ + /* 0x100-0x124: Reserved for the PDC */ + +/* TWI register adresses ****************************************************************/ + +#define SAM3U_TWI_CR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_CR_OFFSET) +#define SAM3U_TWI_MMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_MMR_OFFSET) +#define SAM3U_TWI_SMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_SMR_OFFSET) +#define SAM3U_TWI_IADR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IADR_OFFSET) +#define SAM3U_TWI_CWGR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_CWGR_OFFSET) +#define SAM3U_TWI_SR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_SR_OFFSET) +#define SAM3U_TWI_IER(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IER_OFFSET) +#define SAM3U_TWI_IDR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IDR_OFFSET) +#define SAM3U_TWI_IMR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_IMR_OFFSET) +#define SAM3U_TWI_RHR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_RHR_OFFSET) +#define SAM3U_TWI_THR(n) (SAM3U_TWIN_BASE(n)+SAM3U_TWI_THR_OFFSET) + +#define SAM3U_TWI0_CR (SAM3U_TWI0_BASE+SAM3U_TWI_CR_OFFSET) +#define SAM3U_TWI0_MMR (SAM3U_TWI0_BASE+SAM3U_TWI_MMR_OFFSET) +#define SAM3U_TWI0_SMR (SAM3U_TWI0_BASE+SAM3U_TWI_SMR_OFFSET) +#define SAM3U_TWI0_IADR (SAM3U_TWI0_BASE+SAM3U_TWI_IADR_OFFSET) +#define SAM3U_TWI0_CWGR (SAM3U_TWI0_BASE+SAM3U_TWI_CWGR_OFFSET) +#define SAM3U_TWI0_SR (SAM3U_TWI0_BASE+SAM3U_TWI_SR_OFFSET) +#define SAM3U_TWI0_IER (SAM3U_TWI0_BASE+SAM3U_TWI_IER_OFFSET) +#define SAM3U_TWI0_IDR (SAM3U_TWI0_BASE+SAM3U_TWI_IDR_OFFSET) +#define SAM3U_TWI0_IMR (SAM3U_TWI0_BASE+SAM3U_TWI_IMR_OFFSET) +#define SAM3U_TWI0_RHR (SAM3U_TWI0_BASE+SAM3U_TWI_RHR_OFFSET) +#define SAM3U_TWI0_THR (SAM3U_TWI0_BASE+SAM3U_TWI_THR_OFFSET) + +#define SAM3U_TWI1_CR (SAM3U_TWI1_BASE+SAM3U_TWI_CR_OFFSET) +#define SAM3U_TWI1_MMR (SAM3U_TWI1_BASE+SAM3U_TWI_MMR_OFFSET) +#define SAM3U_TWI1_SMR (SAM3U_TWI1_BASE+SAM3U_TWI_SMR_OFFSET) +#define SAM3U_TWI1_IADR (SAM3U_TWI1_BASE+SAM3U_TWI_IADR_OFFSET) +#define SAM3U_TWI1_CWGR (SAM3U_TWI1_BASE+SAM3U_TWI_CWGR_OFFSET) +#define SAM3U_TWI1_SR (SAM3U_TWI1_BASE+SAM3U_TWI_SR_OFFSET) +#define SAM3U_TWI1_IER (SAM3U_TWI1_BASE+SAM3U_TWI_IER_OFFSET) +#define SAM3U_TWI1_IDR (SAM3U_TWI1_BASE+SAM3U_TWI_IDR_OFFSET) +#define SAM3U_TWI1_IMR (SAM3U_TWI1_BASE+SAM3U_TWI_IMR_OFFSET) +#define SAM3U_TWI1_RHR (SAM3U_TWI1_BASE+SAM3U_TWI_RHR_OFFSET) +#define SAM3U_TWI1_THR (SAM3U_TWI1_BASE+SAM3U_TWI_THR_OFFSET) + +/* TWI register bit definitions *********************************************************/ + +/* TWI Control Register */ + +#define TWI_CR_START (1 << 0) /* Bit 0: Send a START Condition */ +#define TWI_CR_STOP (1 << 1) /* Bit 1: Send a STOP Condition */ +#define TWI_CR_MSEN (1 << 2) /* Bit 2: TWI Master Mode Enabled */ +#define TWI_CR_MSDIS (1 << 3) /* Bit 3: TWI Master Mode Disabled */ +#define TWI_CR_SVEN (1 << 4) /* Bit 4: TWI Slave Mode Enabled */ +#define TWI_CR_SVDIS (1 << 5) /* Bit 5: TWI Slave Mode Disabled */ +#define TWI_CR_QUICK (1 << 6) /* Bit 6: SMBUS Quick Command */ +#define TWI_CR_SWRST (1 << 7) /* Bit 7: Software Reset */ + +/* TWI Master Mode Register */' + +#define TWI_MMR_IADRSZ_SHIFT (8) /* Bits 8-9: Internal Device Address Size */ +#define TWI_MMR_IADRSZ_MASK (3 << TWI_MMR_IADRSZ_SHIFT) +# define TWI_MMR_IADRSZ_NONE (0 << TWI_MMR_IADRSZ_SHIFT) /* No internal device address */ +# define TWI_MMR_IADRSZ_1BYTE (1 << TWI_MMR_IADRSZ_SHIFT) /* One-byte internal device address */ +# define TWI_MMR_IADRSZ_3BYTE (2 << TWI_MMR_IADRSZ_SHIFT) /* Two-byte internal device address */ +# define TWI_MMR_IADRSZ_3BYTE (3 << TWI_MMR_IADRSZ_SHIFT) /* Three-byte internal device address */ +#define TWI_MMR_MREAD (1 << 12) /* Bit 12: Master Read Direction */ +#define TWI_MMR_DADR_SHIFT (16) /* Bits 16-23: Device Address */ +#define TWI_MMR_DADR_MASK (0xff << TWI_MMR_DADR_SHIFT) + +/* TWI Slave Mode Register */ + +#define TWI_SMR_SADR_SHIFT (16) /* Bits 16-23: Slave Address */ +#define TWI_SMR_SADR_MASK (0xff << TWI_SMR_SADR_SHIFT) + +/* TWI Internal Address Register */ + +#define TWI_IADR_SHIFT (0) /* Bits 0-23: Internal Address */ +#define TWI_IADR_MASK (0x00ffffff << TWI_IADR_SHIFT) + +/* TWI Clock Waveform Generator Register */ + +#define TWI_CWGR_CLDIV_SHIFT (0) /* Bits 0-7: Clock Low Divider */ +#define TWI_CWGR_CLDIV_MASK (0xff << TWI_CWGR_CLDIV_SHIFT) +#define TWI_CWGR_CHDIV_SHIFT (8) /* Bits 8-15: Clock High Divider */ +#define TWI_CWGR_CHDIV_MASK (0xff << TWI_CWGR_CLDIV_SHIFT) +#define TWI_CWGR_CKDIV_SHIFT (16) /* Bits 16-18: Clock Divider */ +#define TWI_CWGR_CKDIV_MASK (7 << TWI_CWGR_CLDIV_SHIFT) + +/* TWI Status Register, TWI Interrupt Enable Register, TWI Interrupt Disable + * Register, and TWI Interrupt Mask Register common bit fields. + */ + +#define TWI_INT_TXCOMP (1 << 0) /* Bit 0: Transmission Completed */ +#define TWI_INT_RXRDY (1 << 1) /* Bit 1: Receive Holding Register */ +#define TWI_INT_TXRDY (1 << 2) /* Bit 2: Transmit Holding Register Ready */ +#define TWI_SR_SVREAD (1 << 3) /* Bit 3: Slave Read (SR only) */ +#define TWI_INT_SVACC (1 << 4) /* Bit 4: Slave Access */ +#define TWI_INT_GACC (1 << 5) /* Bit 5: General Call Access */ +#define TWI_INT_OVRE (1 << 6) /* Bit 6: Overrun Error */ +#define TWI_INT_NACK (1 << 8) /* Bit 8: Not Acknowledged */ +#define TWI_INT_ARBLST (1 << 9) /* Bit 9: Arbitration Lost */ +#define TWI_INT_SCLWS (1 << 10) /* Bit 10: Clock Wait State */ +#define TWI_INT_EOSACC (1 << 11) /* Bit 11: End Of Slave Access */ +#define TWI_INT_ENDRX (1 << 12) /* Bit 12: End of RX buffer */ +#define TWI_INT_ENDTX (1 << 13) /* Bit 13: End of TX buffer */ +#define TWI_INT_RXBUFF (1 << 14) /* Bit 14: RX Buffer */ +#define TWI_INT_TXBUFE (1 << 15) /* Bit 15: TX Buffer Empty */ + +/* TWI Receive Holding Register */ + +#define TWI_RHR_RXDATA_SHIFT (0) /* Bits 0-7: Master or Slave Receive Holding Data */ +#define TWI_RHR_RXDATA_MASK (0xff << TWI_RHR_RXDATA_SHIFT) + +/* TWI Transmit Holding Register */ + +#define TWI_THR_TXDATA_SHIFT (0) /* Bits 0-7: Master or Slave Transmit Holding Data */ +#define TWI_THR_TXDATA_MASK (0xff << TWI_THR_TXDATA_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_TWI_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_uart.h b/nuttx/arch/arm/src/sam3u/sam3u_uart.h index b784677946..1103cbfad5 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_uart.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_uart.h @@ -1,391 +1,391 @@ -/************************************************************************************************ - * arch/arm/src/sam3u/sam3u_uart.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H - -/************************************************************************************************ - * Included Files - ************************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/************************************************************************************************ - * Pre-processor Definitions - ************************************************************************************************/ - -/* UART register offsets ************************************************************************/ - -#define SAM3U_UART_CR_OFFSET 0x0000 /* Control Register (Common) */ -#define SAM3U_UART_MR_OFFSET 0x0004 /* Mode Register (Common) */ -#define SAM3U_UART_IER_OFFSET 0x0008 /* Interrupt Enable Register (Common) */ -#define SAM3U_UART_IDR_OFFSET 0x000c /* Interrupt Disable Register (Common) */ -#define SAM3U_UART_IMR_OFFSET 0x0010 /* Interrupt Mask Register (Common) */ -#define SAM3U_UART_SR_OFFSET 0x0014 /* Status Register (Common) */ -#define SAM3U_UART_RHR_OFFSET 0x0018 /* Receive Holding Register (Common) */ -#define SAM3U_UART_THR_OFFSET 0x001c /* Transmit Holding Register (Common) */ -#define SAM3U_UART_BRGR_OFFSET 0x0020 /* Baud Rate Generator Register (Common) */ - /* 0x0024-0x003c: Reserved (UART) */ -#define SAM3U_USART_RTOR_OFFSET 0x0024 /* Receiver Time-out Register (USART only) */ -#define SAM3U_USART_TTGR_OFFSET 0x0028 /* Transmitter Timeguard Register (USART only) */ - /* 0x002c-0x003c: Reserved (UART) */ -#define SAM3U_USART_FIDI_OFFSET 0x0040 /* FI DI Ratio Register (USART only) */ -#define SAM3U_USART_NER_OFFSET 0x0044 /* Number of Errors Register ((USART only) */ - /* 0x0048: Reserved (USART) */ -#define SAM3U_USART_IF_OFFSET 0x004c /* IrDA Filter Register (USART only) */ -#define SAM3U_USART_MAN_OFFSET 0x0050 /* Manchester Encoder Decoder Register (USART only) */ -#define SAM3U_USART_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register (USART only) */ -#define SAM3U_USART_WPSR_OFFSET 0x00e8 /* Write Protect Status Register (USART only) */ - /* 0x005c-0xf008: Reserved (USART) */ -#define SAM3U_USART_VERSION_OFFSET 0x00fc /* Version Register (USART only) */ - /* 0x0100-0x0124: PDC Area (Common) */ - -/* UART register adresses ***********************************************************************/ - -#define SAM3U_UART_CR (SAM3U_UART_BASE+SAM3U_UART_CR_OFFSET) -#define SAM3U_UART_MR (SAM3U_UART_BASE+SAM3U_UART_MR_OFFSET) -#define SAM3U_UART_IER (SAM3U_UART_BASE+SAM3U_UART_IER_OFFSET) -#define SAM3U_UART_IDR (SAM3U_UART_BASE+SAM3U_UART_IDR_OFFSET) -#define SAM3U_UART_IMR (SAM3U_UART_BASE+SAM3U_UART_IMR_OFFSET) -#define SAM3U_UART_SR (SAM3U_UART_BASE+SAM3U_UART_SR_OFFSET) -#define SAM3U_UART_RHR (SAM3U_UART_BASE+SAM3U_UART_RHR_OFFSET) -#define SAM3U_UART_THR (SAM3U_UART_BASE+SAM3U_UART_THR_OFFSET) -#define SAM3U_UART_BRGR (SAM3U_UART_BASE+SAM3U_UART_BRGR_OFFSET) - -#define SAM3U_USART_CR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_CR_OFFSET) -#define SAM3U_USART_MR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_MR_OFFSET) -#define SAM3U_USART_IER(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IER_OFFSET) -#define SAM3U_USART_IDR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IDR_OFFSET) -#define SAM3U_USART_IMR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IMR_OFFSET) -#define SAM3U_USART_SR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_SR_OFFSET) -#define SAM3U_USART_RHR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_RHR_OFFSET) -#define SAM3U_USART_THR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_THR_OFFSET) -#define SAM3U_USART_BRGR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_BRGR_OFFSET) -#define SAM3U_USART_RTOR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_RTOR_OFFSET) -#define SAM3U_USART_TTGR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_TTGR_OFFSET) -#define SAM3U_USART_FIDI(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_FIDI_OFFSET) -#define SAM3U_USART_NER(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_NER_OFFSET) -#define SAM3U_USART_IF(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_IF_OFFSET) -#define SAM3U_USART_MAN(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_MAN_OFFSET) -#define SAM3U_USART_WPMR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_WPMR_OFFSET) -#define SAM3U_USART_WPSR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_WPSR_OFFSET) -#define SAM3U_USART_VERSION(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_VERSION_OFFSET) - -#define SAM3U_USART0_CR (SAM3U_USART0_BASE+SAM3U_UART_CR_OFFSET) -#define SAM3U_USART0_MR_ (SAM3U_USART0_BASE+SAM3U_UART_MR_OFFSET) -#define SAM3U_USART0_IER (SAM3U_USART0_BASE+SAM3U_UART_IER_OFFSET) -#define SAM3U_USART0_IDR (SAM3U_USART0_BASE+SAM3U_UART_IDR_OFFSET) -#define SAM3U_USART0_IMR (SAM3U_USART0_BASE+SAM3U_UART_IMR_OFFSET) -#define SAM3U_USART0_SR (SAM3U_USART0_BASE+SAM3U_UART_SR_OFFSET) -#define SAM3U_USART0_RHR (SAM3U_USART0_BASE+SAM3U_UART_RHR_OFFSET) -#define SAM3U_USART0_THR (SAM3U_USART0_BASE+SAM3U_UART_THR_OFFSET) -#define SAM3U_USART0_BRGR (SAM3U_USART0_BASE+SAM3U_UART_BRGR_OFFSET) -#define SAM3U_USART0_RTOR (SAM3U_USART0_BASE+SAM3U_USART_RTOR_OFFSET) -#define SAM3U_USART0_TTGR (SAM3U_USART0_BASE+SAM3U_USART_TTGR_OFFSET) -#define SAM3U_USART0_FIDI (SAM3U_USART0_BASE+SAM3U_USART_FIDI_OFFSET) -#define SAM3U_USART0_NER (SAM3U_USART0_BASE+SAM3U_USART_NER_OFFSET) -#define SAM3U_USART0_IF (SAM3U_USART0_BASE+SAM3U_USART_IF_OFFSET) -#define SAM3U_USART0_MAN (SAM3U_USART0_BASE+SAM3U_USART_MAN_OFFSET) -#define SAM3U_USART0_WPMR (SAM3U_USART0_BASE+SAM3U_USART_WPMR_OFFSET) -#define SAM3U_USART0_WPSR (SAM3U_USART0_BASE+SAM3U_USART_WPSR_OFFSET) -#define SAM3U_USART0_VERSION (SAM3U_USART0_BASE+SAM3U_USART_VERSION_OFFSET) - -#define SAM3U_USART1_CR (SAM3U_USART1_BASE+SAM3U_UART_CR_OFFSET) -#define SAM3U_USART1_MR_ (SAM3U_USART1_BASE+SAM3U_UART_MR_OFFSET) -#define SAM3U_USART1_IER (SAM3U_USART1_BASE+SAM3U_UART_IER_OFFSET) -#define SAM3U_USART1_IDR (SAM3U_USART1_BASE+SAM3U_UART_IDR_OFFSET) -#define SAM3U_USART1_IMR (SAM3U_USART1_BASE+SAM3U_UART_IMR_OFFSET) -#define SAM3U_USART1_SR (SAM3U_USART1_BASE+SAM3U_UART_SR_OFFSET) -#define SAM3U_USART1_RHR (SAM3U_USART1_BASE+SAM3U_UART_RHR_OFFSET) -#define SAM3U_USART1_THR (SAM3U_USART1_BASE+SAM3U_UART_THR_OFFSET) -#define SAM3U_USART1_BRGR (SAM3U_USART1_BASE+SAM3U_UART_BRGR_OFFSET) -#define SAM3U_USART1_RTOR (SAM3U_USART1_BASE+SAM3U_USART_RTOR_OFFSET) -#define SAM3U_USART1_TTGR (SAM3U_USART1_BASE+SAM3U_USART_TTGR_OFFSET) -#define SAM3U_USART1_FIDI (SAM3U_USART1_BASE+SAM3U_USART_FIDI_OFFSET) -#define SAM3U_USART1_NER (SAM3U_USART1_BASE+SAM3U_USART_NER_OFFSET) -#define SAM3U_USART1_IF (SAM3U_USART1_BASE+SAM3U_USART_IF_OFFSET) -#define SAM3U_USART1_MAN (SAM3U_USART1_BASE+SAM3U_USART_MAN_OFFSET) -#define SAM3U_USART1_WPMR (SAM3U_USART1_BASE+SAM3U_USART_WPMR_OFFSET) -#define SAM3U_USART1_WPSR (SAM3U_USART1_BASE+SAM3U_USART_WPSR_OFFSET) -#define SAM3U_USART1_VERSION (SAM3U_USART1_BASE+SAM3U_USART_VERSION_OFFSET) - -#define SAM3U_USART2_CR (SAM3U_USART2_BASE+SAM3U_UART_CR_OFFSET) -#define SAM3U_USART2_MR_ (SAM3U_USART2_BASE+SAM3U_UART_MR_OFFSET) -#define SAM3U_USART2_IER (SAM3U_USART2_BASE+SAM3U_UART_IER_OFFSET) -#define SAM3U_USART2_IDR (SAM3U_USART2_BASE+SAM3U_UART_IDR_OFFSET) -#define SAM3U_USART2_IMR (SAM3U_USART2_BASE+SAM3U_UART_IMR_OFFSET) -#define SAM3U_USART2_SR (SAM3U_USART2_BASE+SAM3U_UART_SR_OFFSET) -#define SAM3U_USART2_RHR (SAM3U_USART2_BASE+SAM3U_UART_RHR_OFFSET) -#define SAM3U_USART2_THR (SAM3U_USART2_BASE+SAM3U_UART_THR_OFFSET) -#define SAM3U_USART2_BRGR (SAM3U_USART2_BASE+SAM3U_UART_BRGR_OFFSET) -#define SAM3U_USART2_RTOR (SAM3U_USART2_BASE+SAM3U_USART_RTOR_OFFSET) -#define SAM3U_USART2_TTGR (SAM3U_USART2_BASE+SAM3U_USART_TTGR_OFFSET) -#define SAM3U_USART2_FIDI (SAM3U_USART2_BASE+SAM3U_USART_FIDI_OFFSET) -#define SAM3U_USART2_NER (SAM3U_USART2_BASE+SAM3U_USART_NER_OFFSET) -#define SAM3U_USART2_IF (SAM3U_USART2_BASE+SAM3U_USART_IF_OFFSET) -#define SAM3U_USART2_MAN (SAM3U_USART2_BASE+SAM3U_USART_MAN_OFFSET) -#define SAM3U_USART2_WPMR (SAM3U_USART2_BASE+SAM3U_USART_WPMR_OFFSET) -#define SAM3U_USART2_WPSR (SAM3U_USART2_BASE+SAM3U_USART_WPSR_OFFSET) -#define SAM3U_USART2_VERSION (SAM3U_USART2_BASE+SAM3U_USART_VERSION_OFFSET) - -#define SAM3U_USART3_CR (SAM3U_USART3_BASE+SAM3U_UART_CR_OFFSET) -#define SAM3U_USART3_MR_ (SAM3U_USART3_BASE+SAM3U_UART_MR_OFFSET) -#define SAM3U_USART3_IER (SAM3U_USART3_BASE+SAM3U_UART_IER_OFFSET) -#define SAM3U_USART3_IDR (SAM3U_USART3_BASE+SAM3U_UART_IDR_OFFSET) -#define SAM3U_USART3_IMR (SAM3U_USART3_BASE+SAM3U_UART_IMR_OFFSET) -#define SAM3U_USART3_SR (SAM3U_USART3_BASE+SAM3U_UART_SR_OFFSET) -#define SAM3U_USART3_RHR (SAM3U_USART3_BASE+SAM3U_UART_RHR_OFFSET) -#define SAM3U_USART3_THR (SAM3U_USART3_BASE+SAM3U_UART_THR_OFFSET) -#define SAM3U_USART3_BRGR (SAM3U_USART3_BASE+SAM3U_UART_BRGR_OFFSET) -#define SAM3U_USART3_RTOR (SAM3U_USART3_BASE+SAM3U_USART_RTOR_OFFSET) -#define SAM3U_USART3_TTGR (SAM3U_USART3_BASE+SAM3U_USART_TTGR_OFFSET) -#define SAM3U_USART3_FIDI (SAM3U_USART3_BASE+SAM3U_USART_FIDI_OFFSET) -#define SAM3U_USART3_NER (SAM3U_USART3_BASE+SAM3U_USART_NER_OFFSET) -#define SAM3U_USART3_IF (SAM3U_USART3_BASE+SAM3U_USART_IF_OFFSET) -#define SAM3U_USART3_MAN (SAM3U_USART3_BASE+SAM3U_USART_MAN_OFFSET) -#define SAM3U_USART3_WPMR (SAM3U_USART3_BASE+SAM3U_USART_WPMR_OFFSET) -#define SAM3U_USART3_WPSR (SAM3U_USART3_BASE+SAM3U_USART_WPSR_OFFSET) -#define SAM3U_USART3_VERSION (SAM3U_USART3_BASE+SAM3U_USART_VERSION_OFFSET) - -/* UART register bit definitions ****************************************************************/ - -/* UART Control Register */ - -#define UART_CR_RSTRX (1 << 2) /* Bit 2: Reset Receiver (Common) */ -#define UART_CR_RSTTX (1 << 3) /* Bit 3: Reset Transmitter (Common) */ -#define UART_CR_RXEN (1 << 4) /* Bit 4: Receiver Enable (Common) */ -#define UART_CR_RXDIS (1 << 5) /* Bit 5: Receiver Disable (Common) */ -#define UART_CR_TXEN (1 << 6) /* Bit 6: Transmitter Enable (Common) */ -#define UART_CR_TXDIS (1 << 7) /* Bit 7: Transmitter Disable (Common) */ -#define UART_CR_RSTSTA (1 << 8) /* Bit 8: Reset Status Bits (Common) */ -#define USART_CR_STTBRK (1 << 9) /* Bit 9: Start Break (USART only) */ -#define USART_CR_STPBRK (1 << 10) /* Bit 10: Stop Break (USART only) */ -#define USART_CR_STTTO (1 << 11) /* Bit 11: Start Time-out (USART only) */ -#define USART_CR_SENDA (1 << 12) /* Bit 12: Send Address (USART only) */ -#define USART_CR_RSTIT (1 << 13) /* Bit 13: Reset Iterations (USART only) */ -#define USART_CR_RSTNACK (1 << 14) /* Bit 14: Reset Non Acknowledge (USART only) */ -#define USART_CR_RETTO (1 << 15) /* Bit 15: Rearm Time-out (USART only) */ -#define USART_CR_RTSEN (1 << 18) /* Bit 18: Request to Send Enable (USART only) */ -#define USART_CR_FCS (1 << 18) /* Bit 18: Force SPI Chip Select (USART only) */ -#define USART_CR_RTSDIS (1 << 19) /* Bit 19: Request to Send Disable (USART only) */ -#define USART_CR_RCS (1 << 19) /* Bit 19: Release SPI Chip Select (USART only) */ - -/* UART Mode Register */ - -#define USART_MR_MODE_SHIFT (0) /* Bits 0-3: (USART only) */ -#define USART_MR_MODE_MASK (15 << USART_MR_MODE_SHIFT) -# define USART_MR_MODE_NORMAL (0 << USART_MR_MODE_SHIFT) /* Normal */ -# define USART_MR_MODE_RS485 (1 << USART_MR_MODE_SHIFT) /* RS485 */ -# define USART_MR_MODE_HWHS (2 << USART_MR_MODE_SHIFT) /* Hardware Handshaking */ -# define USART_MR_MODE_ISO7816_0 (4 << USART_MR_MODE_SHIFT) /* IS07816 Protocol: T = 0 */ -# define USART_MR_MODE_ISO7816_1 (6 << USART_MR_MODE_SHIFT) /* IS07816 Protocol: T = 1 */ -# define USART_MR_MODE_IRDA (8 << USART_MR_MODE_SHIFT) /* IrDA */ -# define USART_MR_MODE_SPIMSTR (14 << USART_MR_MODE_SHIFT) /* SPI Master */ -# define USART_MR_MODE_SPISLV (15 << USART_MR_MODE_SHIFT) /* SPI Slave */ -#define USART_MR_USCLKS_SHIFT (4) /* Bits 4-5: Clock Selection (USART only) */ -#define USART_MR_USCLKS_MASK (3 << USART_MR_USCLKS_SHIFT) -# define USART_MR_USCLKS_MCK (0 << USART_MR_USCLKS_SHIFT) /* MCK */ -# define USART_MR_USCLKS_MCKDIV (1 << USART_MR_USCLKS_SHIFT) /* MCK/DIV (DIV = 8) */ -# define USART_MR_USCLKS_SCK (3 << USART_MR_USCLKS_SHIFT) /* SCK */ -#define USART_MR_CHRL_SHIFT (6) /* Bits 6-7: Character Length (USART only) */ -#define USART_MR_CHRL_MASK (3 << USART_MR_CHRL_SHIFT) -# define USART_MR_CHRL_5BITS (0 << USART_MR_CHRL_SHIFT) /* 5 bits */ -# define USART_MR_CHRL_6BITS (1 << USART_MR_CHRL_SHIFT) /* 6 bits */ -# define USART_MR_CHRL_7BITS (2 << USART_MR_CHRL_SHIFT) /* 7 bits */ -# define USART_MR_CHRL_8BITS (3 << USART_MR_CHRL_SHIFT) /* 8 bits */ -#define USART_MR_YNC (1 << 8) /* Bit 8: Synchronous Mode Select (USART only) */ -#define USART_MR_CPHA (1 << 8) /* Bit 8: SPI Clock Phase (USART only) */ -#define UART_MR_PAR_SHIFT (9) /* Bits 9-11: Parity Type (Common) */ -#define UART_MR_PAR_MASK (7 << UART_MR_PAR_SHIFT) -# define UART_MR_PAR_EVEN (0 << UART_MR_PAR_SHIFT) /* Even parity (Common) */ -# define UART_MR_PAR_ODD (1 << UART_MR_PAR_SHIFT) /* Odd parity (Common) */ -# define UART_MR_PAR_SPACE (2 << UART_MR_PAR_SHIFT) /* Space: parity forced to 0 (Common) */ -# define UART_MR_PAR_MARK (3 << UART_MR_PAR_SHIFT) /* Mark: parity forced to 1 (Common) */ -# define UART_MR_PAR_NONE (4 << UART_MR_PAR_SHIFT) /* No parity (Common) */ -# define UART_MR_PAR_MULTIDROP (6 << UART_MR_PAR_SHIFT) /* Multidrop mode (USART only) */ -#define USART_MR_NBSTOP_SHIFT (12) /* Bits 12-13: Number of Stop Bits (USART only) */ -#define USART_MR_NBSTOP_MASK (3 << USART_MR_NBSTOP_SHIFT) -# define USART_MR_NBSTOP_1 (0 << USART_MR_NBSTOP_SHIFT) /* 1 stop bit 1 stop bit */ -# define USART_MR_NBSTOP_1p5 (1 << USART_MR_NBSTOP_SHIFT) /* 1.5 stop bits */ -# define USART_MR_NBSTOP_2 (2 << USART_MR_NBSTOP_SHIFT) /* 2 stop bits 2 stop bits */ -#define UART_MR_CHMODE_SHIFT (14) /* Bits 14-15: Channel Mode (Common) */ -#define UART_MR_CHMODE_MASK (3 << UART_MR_CHMODE_SHIFT) -# define UART_MR_CHMODE_NORMAL (0 << UART_MR_CHMODE_SHIFT) /* Normal Mode */ -# define UART_MR_CHMODE_ECHO (1 << UART_MR_CHMODE_SHIFT) /* Automatic Echo */ -# define UART_MR_CHMODE_LLPBK (2 << UART_MR_CHMODE_SHIFT) /* Local Loopback */ -# define UART_MR_CHMODE_RLPBK (3 << UART_MR_CHMODE_SHIFT) /* Remote Loopback */ -#define USART_MR_MSBF (1 << 16) /* Bit 16: Bit Order or SPI Clock Polarity (USART only) */ -#define USART_MR_CPOL (1 << 16) -#define USART_MR_MODE9 (1 << 17) /* Bit 17: 9-bit Character Length (USART only) */ -#define USART_MR_CLKO (1 << 18) /* Bit 18: Clock Output Select (USART only) */ -#define USART_MR_OVER (1 << 19) /* Bit 19: Oversampling Mode (USART only) */ -#define USART_MR_INACK (1 << 20) /* Bit 20: Inhibit Non Acknowledge (USART only) */ -#define USART_MR_DSNACK (1 << 21) /* Bit 21: Disable Successive NACK (USART only) */ -#define USART_MR_VARSYNC (1 << 22) /* Bit 22: Variable Synchronization of Command/Data Sync Start Frame Delimiter (USART only) */ -#define USART_MR_INVDATA (1 << 23) /* Bit 23: INverted Data (USART only) */ -#define USART_MR_MAXITER_SHIFT (24) /* Bits 24-26: Max iterations (ISO7816 T=0 (USART only) */ -#define USART_MR_MAXITER_MASK (7 << USART_MR_MAXITER_SHIFT) -#define USART_MR_FILTER (1 << 28) /* Bit 28: Infrared Receive Line Filter (USART only) */ -#define USART_MR_MAN (1 << 29) /* Bit 29: Manchester Encoder/Decoder Enable (USART only) */ -#define USART_MR_MODSYNC (1 << 30) /* Bit 30: Manchester Synchronization Mode (USART only) */ -#define USART_MR_ONEBIT (1 << 31) /* Bit 31: Start Frame Delimiter Selector (USART only) */ - -/* UART Interrupt Enable Register, UART Interrupt Disable Register, UART Interrupt Mask - * Register, and UART Status Register common bit field definitions - */ - -#define UART_INT_RXRDY (1 << 0) /* Bit 0: RXRDY Interrupt (Common) */ -#define UART_INT_TXRDY (1 << 1) /* Bit 1: TXRDY Interrupt (Common) */ -#define UART_INT_RXBRK (1 << 2) /* Bit 2: Break Received/End of Break */ -#define UART_INT_ENDRX (1 << 3) /* Bit 3: End of Receive Transfer Interrupt (Common) */ -#define UART_INT_ENDTX (1 << 4) /* Bit 4: End of Transmit Interrupt (Common) */ -#define UART_INT_OVRE (1 << 5) /* Bit 5: Overrun Error Interrupt (Common) */ -#define UART_INT_FRAME (1 << 6) /* Bit 6: Framing Error Interrupt (Common) */ -#define UART_INT_PARE (1 << 7) /* Bit 7: Parity Error Interrupt (Common) */ -#define USART_INT_TIMEOUT (1 << 8) /* Bit 8: Time-out Interrupt (USART only) */ -#define UART_INT_TXEMPTY (1 << 9) /* Bit 9: TXEMPTY Interrupt (Common) */ -#define USART_INT_ITER (1 << 10) /* Bit 10: Iteration Interrupt (USART only) */ -#define USART_INT_UNRE (1 << 10) /* Bit 10: SPI Underrun Error Interrupt (USART only) */ -#define UART_INT_TXBUFE (1 << 11) /* Bit 11: Buffer Empty Interrupt (Common) */ -#define UART_INT_RXBUFF (1 << 12) /* Bit 12: Buffer Full Interrupt (Common) */ -#define USART_INT_NACK (1 << 13) /* Bit 13: Non Acknowledge Interrupt (USART only) */ -#define USART_INT_CTSIC (1 << 19) /* Bit 19: Clear to Send Input Change Interrupt (USART only) */ -#define USART_INT_MANE (1 << 24) /* Bit 24: Manchester Error Interrupt (USART only) */ - -/* UART Receiver Holding Register */ - -#define UART_RHR_RXCHR_SHIFT (0) /* Bits 0-7: Received Character (UART only) */ -#define UART_RHR_RXCHR_MASK (0xff << UART_RHR_RXCHR_SHIFT) -#define USART_RHR_RXCHR_SHIFT (0) /* Bits 0-8: Received Character (USART only) */ -#define USART_RHR_RXCHR_MASK (0x1ff << UART_RHR_RXCHR_SHIFT) -#define USART_RHR_RXSYNH (1 << 15) /* Bit 15: Received Sync (USART only) */ - -/* UART Transmit Holding Register */ - -#define UART_THR_TXCHR_SHIFT (0) /* Bits 0-7: Character to be Transmitted (UART only) */ -#define UART_THR_TXCHR_MASK (0xff << UART_THR_TXCHR_SHIFT) -#define USART_THR_TXCHR_SHIFT (0) /* Bits 0-8: Character to be Transmitted (USART only) */ -#define USART_THR_TXCHR_MASK (0x1ff << USART_THR_TXCHR_SHIFT) -#define USART_THR_TXSYNH (1 << 15) /* Bit 15: Sync Field to be tran (USART only) */ - -/* UART Baud Rate Generator Register */ - -#define UART_BRGR_CD_SHIFT (0) /* Bits 0-15: Clock Divisor (Common) */ -#define UART_BRGR_CD_MASK (0xffff << UART_BRGR_CD_SHIFT) -#define UART_BRGR_FP_SHIFT (16) /* Bits 16-18: Fractional Part (USART only) */ -#define UART_BRGR_FP_MASK (7 << UART_BRGR_FP_SHIFT) - -/* USART Receiver Time-out Register (USART only) */ - -#define USART_RTOR_TO_SHIFT (0) /* Bits 0-15: Time-out Value (USART only) */ -#define USART_RTOR_TO_MASK (0xffff << USART_RTOR_TO_SHIFT) - -/* USART Transmitter Timeguard Register (USART only) */ - -#define USART_TTGR_TG_SHIFT (0) /* Bits 0-7: Timeguard Value (USART only) */ -#define USART_TTGR_TG_MASK (0xff << USART_TTGR_TG_SHIFT) - -/* USART FI DI RATIO Register (USART only) */ - -#define USART_FIDI_RATIO_SHIFT (0) /* Bits 0-10: FI Over DI Ratio Value (USART only) */ -#define USART_FIDI_RATIO_MASK (0x7ff << USART_FIDI_RATIO_SHIFT) - -/* USART Number of Errors Register (USART only) */ - -#define USART_NER_NBERRORS_SHIFT (0) /* Bits 0-7: Number of Errrors (USART only) */ -#define USART_NER_NBERRORS_MASK (0xff << USART_NER_NBERRORS_SHIFT) - -/* USART IrDA FILTER Register (USART only) */ - -#define USART_IF_IRDAFILTER_SHIFT (0) /* Bits 0-7: IrDA Filter (USART only) */ -#define USART_IF_IRDAFILTER_MASK (0xff << USART_IF_IRDAFILTER_SHIFT) - -/* USART Manchester Configuration Register (USART only) */ - -#define USART_MAN_TXPL_SHIFT (0) /* Bits 0-3: Transmitter Preamble Length (USART only) */ -#define USART_MAN_TXPL_MASK (15 << USART_MAN_TXPL_SHIFT) -#define USART_MAN_TXPP_SHIFT (8) /* Bits 8-9: Transmitter Preamble Pattern (USART only) */ -#define USART_MAN_TXPP_MASK (3 << USART_MAN_TXPP_SHIFT) -# define USART_MAN_TXPP_ALLONE (0 << USART_MAN_TXPP_SHIFT) /* ALL_ONE */ -# define USART_MAN_TXPP_ALLZERO (1 << USART_MAN_TXPP_SHIFT) /* ALL_ZERO */ -# define USART_MAN_TXPP_ZEROONE (2 << USART_MAN_TXPP_SHIFT) /* ZERO_ONE */ -# define USART_MAN_TXPP_ONEZERO (3 << USART_MAN_TXPP_SHIFT) /* ONE_ZERO */ -#define USART_MAN_TXMPOL (1 << 12) /* Bit 12: Transmitter Manchester Polarity (USART only) */ -#define USART_MAN_RXPL_SHIFT (16) /* Bits 16-19: Receiver Preamble Length (USART only) */ -#define USART_MAN_RXPL_MASK (15 << USART_MAN_RXPL_SHIFT) -#define USART_MAN_RXPP_SHIFT (24) /* Bits 24-25: Receiver Preamble Pattern detected (USART only) */ -#define USART_MAN_RXPP_MASK (3 << USART_MAN_RXPP_SHIFT) -# define USART_MAN_RXPP_ALLONE (0 << USART_MAN_RXPP_SHIFT) /* ALL_ONE */ -# define USART_MAN_RXPP_ALLZERO (1 << USART_MAN_RXPP_SHIFT) /* ALL_ZERO */ -# define USART_MAN_RXPP_ZEROONE (2 << USART_MAN_RXPP_SHIFT) /* ZERO_ONE */ -# define USART_MAN_RXPP_ONEZERO (3 << USART_MAN_RXPP_SHIFT) /* ONE_ZERO */ -#define USART_MAN_RXMPOL (1 << 28) /* Bit 28: Receiver Manchester Polarity (USART only) */ -#define USART_MAN_DRIFT (1 << 30) /* Bit 30: Drift compensation (USART only) */ - -/* USART Write Protect Mode Register (USART only) */ - -#define USART_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable (USART only) */ -#define USART_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY (USART only) */ -#define USART_WPMR_WPKEY_MASK (0x00ffffff << USART_WPMR_WPKEY_SHIFT) - -/* USART Write Protect Status Register (USART only) */ - -#define USART_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status (USART only) */ -#define USART_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source (USART only) */ -#define USART_WPSR_WPVSRC_MASK (0xffff << USART_WPSR_WPVSRC_SHIFT) - -/* USART Version Register */ - -#define USART_VERSION_VERSION_SHIFT (0) /* Bits 0-11: Macrocell version number (USART only) */ -#define USART_VERSION_VERSION_MASK (0xfff << USART_VERSION_VERSION_SHIFT) -#define USART_VERSION_MFN_SHIFT (16) /* Bits 16-18: Reserved (USART only) */ -#define USART_VERSION_MFN_MASK (7 << USART_VERSION_MFN_SHIFT) - -/************************************************************************************************ - * Public Types - ************************************************************************************************/ - -/************************************************************************************************ - * Public Data - ************************************************************************************************/ - -/************************************************************************************************ - * Public Functions - ************************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H */ +/************************************************************************************************ + * arch/arm/src/sam3u/sam3u_uart.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H + +/************************************************************************************************ + * Included Files + ************************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/************************************************************************************************ + * Pre-processor Definitions + ************************************************************************************************/ + +/* UART register offsets ************************************************************************/ + +#define SAM3U_UART_CR_OFFSET 0x0000 /* Control Register (Common) */ +#define SAM3U_UART_MR_OFFSET 0x0004 /* Mode Register (Common) */ +#define SAM3U_UART_IER_OFFSET 0x0008 /* Interrupt Enable Register (Common) */ +#define SAM3U_UART_IDR_OFFSET 0x000c /* Interrupt Disable Register (Common) */ +#define SAM3U_UART_IMR_OFFSET 0x0010 /* Interrupt Mask Register (Common) */ +#define SAM3U_UART_SR_OFFSET 0x0014 /* Status Register (Common) */ +#define SAM3U_UART_RHR_OFFSET 0x0018 /* Receive Holding Register (Common) */ +#define SAM3U_UART_THR_OFFSET 0x001c /* Transmit Holding Register (Common) */ +#define SAM3U_UART_BRGR_OFFSET 0x0020 /* Baud Rate Generator Register (Common) */ + /* 0x0024-0x003c: Reserved (UART) */ +#define SAM3U_USART_RTOR_OFFSET 0x0024 /* Receiver Time-out Register (USART only) */ +#define SAM3U_USART_TTGR_OFFSET 0x0028 /* Transmitter Timeguard Register (USART only) */ + /* 0x002c-0x003c: Reserved (UART) */ +#define SAM3U_USART_FIDI_OFFSET 0x0040 /* FI DI Ratio Register (USART only) */ +#define SAM3U_USART_NER_OFFSET 0x0044 /* Number of Errors Register ((USART only) */ + /* 0x0048: Reserved (USART) */ +#define SAM3U_USART_IF_OFFSET 0x004c /* IrDA Filter Register (USART only) */ +#define SAM3U_USART_MAN_OFFSET 0x0050 /* Manchester Encoder Decoder Register (USART only) */ +#define SAM3U_USART_WPMR_OFFSET 0x00e4 /* Write Protect Mode Register (USART only) */ +#define SAM3U_USART_WPSR_OFFSET 0x00e8 /* Write Protect Status Register (USART only) */ + /* 0x005c-0xf008: Reserved (USART) */ +#define SAM3U_USART_VERSION_OFFSET 0x00fc /* Version Register (USART only) */ + /* 0x0100-0x0124: PDC Area (Common) */ + +/* UART register adresses ***********************************************************************/ + +#define SAM3U_UART_CR (SAM3U_UART_BASE+SAM3U_UART_CR_OFFSET) +#define SAM3U_UART_MR (SAM3U_UART_BASE+SAM3U_UART_MR_OFFSET) +#define SAM3U_UART_IER (SAM3U_UART_BASE+SAM3U_UART_IER_OFFSET) +#define SAM3U_UART_IDR (SAM3U_UART_BASE+SAM3U_UART_IDR_OFFSET) +#define SAM3U_UART_IMR (SAM3U_UART_BASE+SAM3U_UART_IMR_OFFSET) +#define SAM3U_UART_SR (SAM3U_UART_BASE+SAM3U_UART_SR_OFFSET) +#define SAM3U_UART_RHR (SAM3U_UART_BASE+SAM3U_UART_RHR_OFFSET) +#define SAM3U_UART_THR (SAM3U_UART_BASE+SAM3U_UART_THR_OFFSET) +#define SAM3U_UART_BRGR (SAM3U_UART_BASE+SAM3U_UART_BRGR_OFFSET) + +#define SAM3U_USART_CR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_CR_OFFSET) +#define SAM3U_USART_MR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_MR_OFFSET) +#define SAM3U_USART_IER(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IER_OFFSET) +#define SAM3U_USART_IDR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IDR_OFFSET) +#define SAM3U_USART_IMR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_IMR_OFFSET) +#define SAM3U_USART_SR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_SR_OFFSET) +#define SAM3U_USART_RHR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_RHR_OFFSET) +#define SAM3U_USART_THR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_THR_OFFSET) +#define SAM3U_USART_BRGR(n) (SAM3U_USARTN_BASE(n)+SAM3U_UART_BRGR_OFFSET) +#define SAM3U_USART_RTOR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_RTOR_OFFSET) +#define SAM3U_USART_TTGR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_TTGR_OFFSET) +#define SAM3U_USART_FIDI(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_FIDI_OFFSET) +#define SAM3U_USART_NER(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_NER_OFFSET) +#define SAM3U_USART_IF(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_IF_OFFSET) +#define SAM3U_USART_MAN(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_MAN_OFFSET) +#define SAM3U_USART_WPMR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_WPMR_OFFSET) +#define SAM3U_USART_WPSR(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_WPSR_OFFSET) +#define SAM3U_USART_VERSION(n) (SAM3U_USARTN_BASE(n)+SAM3U_USART_VERSION_OFFSET) + +#define SAM3U_USART0_CR (SAM3U_USART0_BASE+SAM3U_UART_CR_OFFSET) +#define SAM3U_USART0_MR_ (SAM3U_USART0_BASE+SAM3U_UART_MR_OFFSET) +#define SAM3U_USART0_IER (SAM3U_USART0_BASE+SAM3U_UART_IER_OFFSET) +#define SAM3U_USART0_IDR (SAM3U_USART0_BASE+SAM3U_UART_IDR_OFFSET) +#define SAM3U_USART0_IMR (SAM3U_USART0_BASE+SAM3U_UART_IMR_OFFSET) +#define SAM3U_USART0_SR (SAM3U_USART0_BASE+SAM3U_UART_SR_OFFSET) +#define SAM3U_USART0_RHR (SAM3U_USART0_BASE+SAM3U_UART_RHR_OFFSET) +#define SAM3U_USART0_THR (SAM3U_USART0_BASE+SAM3U_UART_THR_OFFSET) +#define SAM3U_USART0_BRGR (SAM3U_USART0_BASE+SAM3U_UART_BRGR_OFFSET) +#define SAM3U_USART0_RTOR (SAM3U_USART0_BASE+SAM3U_USART_RTOR_OFFSET) +#define SAM3U_USART0_TTGR (SAM3U_USART0_BASE+SAM3U_USART_TTGR_OFFSET) +#define SAM3U_USART0_FIDI (SAM3U_USART0_BASE+SAM3U_USART_FIDI_OFFSET) +#define SAM3U_USART0_NER (SAM3U_USART0_BASE+SAM3U_USART_NER_OFFSET) +#define SAM3U_USART0_IF (SAM3U_USART0_BASE+SAM3U_USART_IF_OFFSET) +#define SAM3U_USART0_MAN (SAM3U_USART0_BASE+SAM3U_USART_MAN_OFFSET) +#define SAM3U_USART0_WPMR (SAM3U_USART0_BASE+SAM3U_USART_WPMR_OFFSET) +#define SAM3U_USART0_WPSR (SAM3U_USART0_BASE+SAM3U_USART_WPSR_OFFSET) +#define SAM3U_USART0_VERSION (SAM3U_USART0_BASE+SAM3U_USART_VERSION_OFFSET) + +#define SAM3U_USART1_CR (SAM3U_USART1_BASE+SAM3U_UART_CR_OFFSET) +#define SAM3U_USART1_MR_ (SAM3U_USART1_BASE+SAM3U_UART_MR_OFFSET) +#define SAM3U_USART1_IER (SAM3U_USART1_BASE+SAM3U_UART_IER_OFFSET) +#define SAM3U_USART1_IDR (SAM3U_USART1_BASE+SAM3U_UART_IDR_OFFSET) +#define SAM3U_USART1_IMR (SAM3U_USART1_BASE+SAM3U_UART_IMR_OFFSET) +#define SAM3U_USART1_SR (SAM3U_USART1_BASE+SAM3U_UART_SR_OFFSET) +#define SAM3U_USART1_RHR (SAM3U_USART1_BASE+SAM3U_UART_RHR_OFFSET) +#define SAM3U_USART1_THR (SAM3U_USART1_BASE+SAM3U_UART_THR_OFFSET) +#define SAM3U_USART1_BRGR (SAM3U_USART1_BASE+SAM3U_UART_BRGR_OFFSET) +#define SAM3U_USART1_RTOR (SAM3U_USART1_BASE+SAM3U_USART_RTOR_OFFSET) +#define SAM3U_USART1_TTGR (SAM3U_USART1_BASE+SAM3U_USART_TTGR_OFFSET) +#define SAM3U_USART1_FIDI (SAM3U_USART1_BASE+SAM3U_USART_FIDI_OFFSET) +#define SAM3U_USART1_NER (SAM3U_USART1_BASE+SAM3U_USART_NER_OFFSET) +#define SAM3U_USART1_IF (SAM3U_USART1_BASE+SAM3U_USART_IF_OFFSET) +#define SAM3U_USART1_MAN (SAM3U_USART1_BASE+SAM3U_USART_MAN_OFFSET) +#define SAM3U_USART1_WPMR (SAM3U_USART1_BASE+SAM3U_USART_WPMR_OFFSET) +#define SAM3U_USART1_WPSR (SAM3U_USART1_BASE+SAM3U_USART_WPSR_OFFSET) +#define SAM3U_USART1_VERSION (SAM3U_USART1_BASE+SAM3U_USART_VERSION_OFFSET) + +#define SAM3U_USART2_CR (SAM3U_USART2_BASE+SAM3U_UART_CR_OFFSET) +#define SAM3U_USART2_MR_ (SAM3U_USART2_BASE+SAM3U_UART_MR_OFFSET) +#define SAM3U_USART2_IER (SAM3U_USART2_BASE+SAM3U_UART_IER_OFFSET) +#define SAM3U_USART2_IDR (SAM3U_USART2_BASE+SAM3U_UART_IDR_OFFSET) +#define SAM3U_USART2_IMR (SAM3U_USART2_BASE+SAM3U_UART_IMR_OFFSET) +#define SAM3U_USART2_SR (SAM3U_USART2_BASE+SAM3U_UART_SR_OFFSET) +#define SAM3U_USART2_RHR (SAM3U_USART2_BASE+SAM3U_UART_RHR_OFFSET) +#define SAM3U_USART2_THR (SAM3U_USART2_BASE+SAM3U_UART_THR_OFFSET) +#define SAM3U_USART2_BRGR (SAM3U_USART2_BASE+SAM3U_UART_BRGR_OFFSET) +#define SAM3U_USART2_RTOR (SAM3U_USART2_BASE+SAM3U_USART_RTOR_OFFSET) +#define SAM3U_USART2_TTGR (SAM3U_USART2_BASE+SAM3U_USART_TTGR_OFFSET) +#define SAM3U_USART2_FIDI (SAM3U_USART2_BASE+SAM3U_USART_FIDI_OFFSET) +#define SAM3U_USART2_NER (SAM3U_USART2_BASE+SAM3U_USART_NER_OFFSET) +#define SAM3U_USART2_IF (SAM3U_USART2_BASE+SAM3U_USART_IF_OFFSET) +#define SAM3U_USART2_MAN (SAM3U_USART2_BASE+SAM3U_USART_MAN_OFFSET) +#define SAM3U_USART2_WPMR (SAM3U_USART2_BASE+SAM3U_USART_WPMR_OFFSET) +#define SAM3U_USART2_WPSR (SAM3U_USART2_BASE+SAM3U_USART_WPSR_OFFSET) +#define SAM3U_USART2_VERSION (SAM3U_USART2_BASE+SAM3U_USART_VERSION_OFFSET) + +#define SAM3U_USART3_CR (SAM3U_USART3_BASE+SAM3U_UART_CR_OFFSET) +#define SAM3U_USART3_MR_ (SAM3U_USART3_BASE+SAM3U_UART_MR_OFFSET) +#define SAM3U_USART3_IER (SAM3U_USART3_BASE+SAM3U_UART_IER_OFFSET) +#define SAM3U_USART3_IDR (SAM3U_USART3_BASE+SAM3U_UART_IDR_OFFSET) +#define SAM3U_USART3_IMR (SAM3U_USART3_BASE+SAM3U_UART_IMR_OFFSET) +#define SAM3U_USART3_SR (SAM3U_USART3_BASE+SAM3U_UART_SR_OFFSET) +#define SAM3U_USART3_RHR (SAM3U_USART3_BASE+SAM3U_UART_RHR_OFFSET) +#define SAM3U_USART3_THR (SAM3U_USART3_BASE+SAM3U_UART_THR_OFFSET) +#define SAM3U_USART3_BRGR (SAM3U_USART3_BASE+SAM3U_UART_BRGR_OFFSET) +#define SAM3U_USART3_RTOR (SAM3U_USART3_BASE+SAM3U_USART_RTOR_OFFSET) +#define SAM3U_USART3_TTGR (SAM3U_USART3_BASE+SAM3U_USART_TTGR_OFFSET) +#define SAM3U_USART3_FIDI (SAM3U_USART3_BASE+SAM3U_USART_FIDI_OFFSET) +#define SAM3U_USART3_NER (SAM3U_USART3_BASE+SAM3U_USART_NER_OFFSET) +#define SAM3U_USART3_IF (SAM3U_USART3_BASE+SAM3U_USART_IF_OFFSET) +#define SAM3U_USART3_MAN (SAM3U_USART3_BASE+SAM3U_USART_MAN_OFFSET) +#define SAM3U_USART3_WPMR (SAM3U_USART3_BASE+SAM3U_USART_WPMR_OFFSET) +#define SAM3U_USART3_WPSR (SAM3U_USART3_BASE+SAM3U_USART_WPSR_OFFSET) +#define SAM3U_USART3_VERSION (SAM3U_USART3_BASE+SAM3U_USART_VERSION_OFFSET) + +/* UART register bit definitions ****************************************************************/ + +/* UART Control Register */ + +#define UART_CR_RSTRX (1 << 2) /* Bit 2: Reset Receiver (Common) */ +#define UART_CR_RSTTX (1 << 3) /* Bit 3: Reset Transmitter (Common) */ +#define UART_CR_RXEN (1 << 4) /* Bit 4: Receiver Enable (Common) */ +#define UART_CR_RXDIS (1 << 5) /* Bit 5: Receiver Disable (Common) */ +#define UART_CR_TXEN (1 << 6) /* Bit 6: Transmitter Enable (Common) */ +#define UART_CR_TXDIS (1 << 7) /* Bit 7: Transmitter Disable (Common) */ +#define UART_CR_RSTSTA (1 << 8) /* Bit 8: Reset Status Bits (Common) */ +#define USART_CR_STTBRK (1 << 9) /* Bit 9: Start Break (USART only) */ +#define USART_CR_STPBRK (1 << 10) /* Bit 10: Stop Break (USART only) */ +#define USART_CR_STTTO (1 << 11) /* Bit 11: Start Time-out (USART only) */ +#define USART_CR_SENDA (1 << 12) /* Bit 12: Send Address (USART only) */ +#define USART_CR_RSTIT (1 << 13) /* Bit 13: Reset Iterations (USART only) */ +#define USART_CR_RSTNACK (1 << 14) /* Bit 14: Reset Non Acknowledge (USART only) */ +#define USART_CR_RETTO (1 << 15) /* Bit 15: Rearm Time-out (USART only) */ +#define USART_CR_RTSEN (1 << 18) /* Bit 18: Request to Send Enable (USART only) */ +#define USART_CR_FCS (1 << 18) /* Bit 18: Force SPI Chip Select (USART only) */ +#define USART_CR_RTSDIS (1 << 19) /* Bit 19: Request to Send Disable (USART only) */ +#define USART_CR_RCS (1 << 19) /* Bit 19: Release SPI Chip Select (USART only) */ + +/* UART Mode Register */ + +#define USART_MR_MODE_SHIFT (0) /* Bits 0-3: (USART only) */ +#define USART_MR_MODE_MASK (15 << USART_MR_MODE_SHIFT) +# define USART_MR_MODE_NORMAL (0 << USART_MR_MODE_SHIFT) /* Normal */ +# define USART_MR_MODE_RS485 (1 << USART_MR_MODE_SHIFT) /* RS485 */ +# define USART_MR_MODE_HWHS (2 << USART_MR_MODE_SHIFT) /* Hardware Handshaking */ +# define USART_MR_MODE_ISO7816_0 (4 << USART_MR_MODE_SHIFT) /* IS07816 Protocol: T = 0 */ +# define USART_MR_MODE_ISO7816_1 (6 << USART_MR_MODE_SHIFT) /* IS07816 Protocol: T = 1 */ +# define USART_MR_MODE_IRDA (8 << USART_MR_MODE_SHIFT) /* IrDA */ +# define USART_MR_MODE_SPIMSTR (14 << USART_MR_MODE_SHIFT) /* SPI Master */ +# define USART_MR_MODE_SPISLV (15 << USART_MR_MODE_SHIFT) /* SPI Slave */ +#define USART_MR_USCLKS_SHIFT (4) /* Bits 4-5: Clock Selection (USART only) */ +#define USART_MR_USCLKS_MASK (3 << USART_MR_USCLKS_SHIFT) +# define USART_MR_USCLKS_MCK (0 << USART_MR_USCLKS_SHIFT) /* MCK */ +# define USART_MR_USCLKS_MCKDIV (1 << USART_MR_USCLKS_SHIFT) /* MCK/DIV (DIV = 8) */ +# define USART_MR_USCLKS_SCK (3 << USART_MR_USCLKS_SHIFT) /* SCK */ +#define USART_MR_CHRL_SHIFT (6) /* Bits 6-7: Character Length (USART only) */ +#define USART_MR_CHRL_MASK (3 << USART_MR_CHRL_SHIFT) +# define USART_MR_CHRL_5BITS (0 << USART_MR_CHRL_SHIFT) /* 5 bits */ +# define USART_MR_CHRL_6BITS (1 << USART_MR_CHRL_SHIFT) /* 6 bits */ +# define USART_MR_CHRL_7BITS (2 << USART_MR_CHRL_SHIFT) /* 7 bits */ +# define USART_MR_CHRL_8BITS (3 << USART_MR_CHRL_SHIFT) /* 8 bits */ +#define USART_MR_YNC (1 << 8) /* Bit 8: Synchronous Mode Select (USART only) */ +#define USART_MR_CPHA (1 << 8) /* Bit 8: SPI Clock Phase (USART only) */ +#define UART_MR_PAR_SHIFT (9) /* Bits 9-11: Parity Type (Common) */ +#define UART_MR_PAR_MASK (7 << UART_MR_PAR_SHIFT) +# define UART_MR_PAR_EVEN (0 << UART_MR_PAR_SHIFT) /* Even parity (Common) */ +# define UART_MR_PAR_ODD (1 << UART_MR_PAR_SHIFT) /* Odd parity (Common) */ +# define UART_MR_PAR_SPACE (2 << UART_MR_PAR_SHIFT) /* Space: parity forced to 0 (Common) */ +# define UART_MR_PAR_MARK (3 << UART_MR_PAR_SHIFT) /* Mark: parity forced to 1 (Common) */ +# define UART_MR_PAR_NONE (4 << UART_MR_PAR_SHIFT) /* No parity (Common) */ +# define UART_MR_PAR_MULTIDROP (6 << UART_MR_PAR_SHIFT) /* Multidrop mode (USART only) */ +#define USART_MR_NBSTOP_SHIFT (12) /* Bits 12-13: Number of Stop Bits (USART only) */ +#define USART_MR_NBSTOP_MASK (3 << USART_MR_NBSTOP_SHIFT) +# define USART_MR_NBSTOP_1 (0 << USART_MR_NBSTOP_SHIFT) /* 1 stop bit 1 stop bit */ +# define USART_MR_NBSTOP_1p5 (1 << USART_MR_NBSTOP_SHIFT) /* 1.5 stop bits */ +# define USART_MR_NBSTOP_2 (2 << USART_MR_NBSTOP_SHIFT) /* 2 stop bits 2 stop bits */ +#define UART_MR_CHMODE_SHIFT (14) /* Bits 14-15: Channel Mode (Common) */ +#define UART_MR_CHMODE_MASK (3 << UART_MR_CHMODE_SHIFT) +# define UART_MR_CHMODE_NORMAL (0 << UART_MR_CHMODE_SHIFT) /* Normal Mode */ +# define UART_MR_CHMODE_ECHO (1 << UART_MR_CHMODE_SHIFT) /* Automatic Echo */ +# define UART_MR_CHMODE_LLPBK (2 << UART_MR_CHMODE_SHIFT) /* Local Loopback */ +# define UART_MR_CHMODE_RLPBK (3 << UART_MR_CHMODE_SHIFT) /* Remote Loopback */ +#define USART_MR_MSBF (1 << 16) /* Bit 16: Bit Order or SPI Clock Polarity (USART only) */ +#define USART_MR_CPOL (1 << 16) +#define USART_MR_MODE9 (1 << 17) /* Bit 17: 9-bit Character Length (USART only) */ +#define USART_MR_CLKO (1 << 18) /* Bit 18: Clock Output Select (USART only) */ +#define USART_MR_OVER (1 << 19) /* Bit 19: Oversampling Mode (USART only) */ +#define USART_MR_INACK (1 << 20) /* Bit 20: Inhibit Non Acknowledge (USART only) */ +#define USART_MR_DSNACK (1 << 21) /* Bit 21: Disable Successive NACK (USART only) */ +#define USART_MR_VARSYNC (1 << 22) /* Bit 22: Variable Synchronization of Command/Data Sync Start Frame Delimiter (USART only) */ +#define USART_MR_INVDATA (1 << 23) /* Bit 23: INverted Data (USART only) */ +#define USART_MR_MAXITER_SHIFT (24) /* Bits 24-26: Max iterations (ISO7816 T=0 (USART only) */ +#define USART_MR_MAXITER_MASK (7 << USART_MR_MAXITER_SHIFT) +#define USART_MR_FILTER (1 << 28) /* Bit 28: Infrared Receive Line Filter (USART only) */ +#define USART_MR_MAN (1 << 29) /* Bit 29: Manchester Encoder/Decoder Enable (USART only) */ +#define USART_MR_MODSYNC (1 << 30) /* Bit 30: Manchester Synchronization Mode (USART only) */ +#define USART_MR_ONEBIT (1 << 31) /* Bit 31: Start Frame Delimiter Selector (USART only) */ + +/* UART Interrupt Enable Register, UART Interrupt Disable Register, UART Interrupt Mask + * Register, and UART Status Register common bit field definitions + */ + +#define UART_INT_RXRDY (1 << 0) /* Bit 0: RXRDY Interrupt (Common) */ +#define UART_INT_TXRDY (1 << 1) /* Bit 1: TXRDY Interrupt (Common) */ +#define UART_INT_RXBRK (1 << 2) /* Bit 2: Break Received/End of Break */ +#define UART_INT_ENDRX (1 << 3) /* Bit 3: End of Receive Transfer Interrupt (Common) */ +#define UART_INT_ENDTX (1 << 4) /* Bit 4: End of Transmit Interrupt (Common) */ +#define UART_INT_OVRE (1 << 5) /* Bit 5: Overrun Error Interrupt (Common) */ +#define UART_INT_FRAME (1 << 6) /* Bit 6: Framing Error Interrupt (Common) */ +#define UART_INT_PARE (1 << 7) /* Bit 7: Parity Error Interrupt (Common) */ +#define USART_INT_TIMEOUT (1 << 8) /* Bit 8: Time-out Interrupt (USART only) */ +#define UART_INT_TXEMPTY (1 << 9) /* Bit 9: TXEMPTY Interrupt (Common) */ +#define USART_INT_ITER (1 << 10) /* Bit 10: Iteration Interrupt (USART only) */ +#define USART_INT_UNRE (1 << 10) /* Bit 10: SPI Underrun Error Interrupt (USART only) */ +#define UART_INT_TXBUFE (1 << 11) /* Bit 11: Buffer Empty Interrupt (Common) */ +#define UART_INT_RXBUFF (1 << 12) /* Bit 12: Buffer Full Interrupt (Common) */ +#define USART_INT_NACK (1 << 13) /* Bit 13: Non Acknowledge Interrupt (USART only) */ +#define USART_INT_CTSIC (1 << 19) /* Bit 19: Clear to Send Input Change Interrupt (USART only) */ +#define USART_INT_MANE (1 << 24) /* Bit 24: Manchester Error Interrupt (USART only) */ + +/* UART Receiver Holding Register */ + +#define UART_RHR_RXCHR_SHIFT (0) /* Bits 0-7: Received Character (UART only) */ +#define UART_RHR_RXCHR_MASK (0xff << UART_RHR_RXCHR_SHIFT) +#define USART_RHR_RXCHR_SHIFT (0) /* Bits 0-8: Received Character (USART only) */ +#define USART_RHR_RXCHR_MASK (0x1ff << UART_RHR_RXCHR_SHIFT) +#define USART_RHR_RXSYNH (1 << 15) /* Bit 15: Received Sync (USART only) */ + +/* UART Transmit Holding Register */ + +#define UART_THR_TXCHR_SHIFT (0) /* Bits 0-7: Character to be Transmitted (UART only) */ +#define UART_THR_TXCHR_MASK (0xff << UART_THR_TXCHR_SHIFT) +#define USART_THR_TXCHR_SHIFT (0) /* Bits 0-8: Character to be Transmitted (USART only) */ +#define USART_THR_TXCHR_MASK (0x1ff << USART_THR_TXCHR_SHIFT) +#define USART_THR_TXSYNH (1 << 15) /* Bit 15: Sync Field to be tran (USART only) */ + +/* UART Baud Rate Generator Register */ + +#define UART_BRGR_CD_SHIFT (0) /* Bits 0-15: Clock Divisor (Common) */ +#define UART_BRGR_CD_MASK (0xffff << UART_BRGR_CD_SHIFT) +#define UART_BRGR_FP_SHIFT (16) /* Bits 16-18: Fractional Part (USART only) */ +#define UART_BRGR_FP_MASK (7 << UART_BRGR_FP_SHIFT) + +/* USART Receiver Time-out Register (USART only) */ + +#define USART_RTOR_TO_SHIFT (0) /* Bits 0-15: Time-out Value (USART only) */ +#define USART_RTOR_TO_MASK (0xffff << USART_RTOR_TO_SHIFT) + +/* USART Transmitter Timeguard Register (USART only) */ + +#define USART_TTGR_TG_SHIFT (0) /* Bits 0-7: Timeguard Value (USART only) */ +#define USART_TTGR_TG_MASK (0xff << USART_TTGR_TG_SHIFT) + +/* USART FI DI RATIO Register (USART only) */ + +#define USART_FIDI_RATIO_SHIFT (0) /* Bits 0-10: FI Over DI Ratio Value (USART only) */ +#define USART_FIDI_RATIO_MASK (0x7ff << USART_FIDI_RATIO_SHIFT) + +/* USART Number of Errors Register (USART only) */ + +#define USART_NER_NBERRORS_SHIFT (0) /* Bits 0-7: Number of Errrors (USART only) */ +#define USART_NER_NBERRORS_MASK (0xff << USART_NER_NBERRORS_SHIFT) + +/* USART IrDA FILTER Register (USART only) */ + +#define USART_IF_IRDAFILTER_SHIFT (0) /* Bits 0-7: IrDA Filter (USART only) */ +#define USART_IF_IRDAFILTER_MASK (0xff << USART_IF_IRDAFILTER_SHIFT) + +/* USART Manchester Configuration Register (USART only) */ + +#define USART_MAN_TXPL_SHIFT (0) /* Bits 0-3: Transmitter Preamble Length (USART only) */ +#define USART_MAN_TXPL_MASK (15 << USART_MAN_TXPL_SHIFT) +#define USART_MAN_TXPP_SHIFT (8) /* Bits 8-9: Transmitter Preamble Pattern (USART only) */ +#define USART_MAN_TXPP_MASK (3 << USART_MAN_TXPP_SHIFT) +# define USART_MAN_TXPP_ALLONE (0 << USART_MAN_TXPP_SHIFT) /* ALL_ONE */ +# define USART_MAN_TXPP_ALLZERO (1 << USART_MAN_TXPP_SHIFT) /* ALL_ZERO */ +# define USART_MAN_TXPP_ZEROONE (2 << USART_MAN_TXPP_SHIFT) /* ZERO_ONE */ +# define USART_MAN_TXPP_ONEZERO (3 << USART_MAN_TXPP_SHIFT) /* ONE_ZERO */ +#define USART_MAN_TXMPOL (1 << 12) /* Bit 12: Transmitter Manchester Polarity (USART only) */ +#define USART_MAN_RXPL_SHIFT (16) /* Bits 16-19: Receiver Preamble Length (USART only) */ +#define USART_MAN_RXPL_MASK (15 << USART_MAN_RXPL_SHIFT) +#define USART_MAN_RXPP_SHIFT (24) /* Bits 24-25: Receiver Preamble Pattern detected (USART only) */ +#define USART_MAN_RXPP_MASK (3 << USART_MAN_RXPP_SHIFT) +# define USART_MAN_RXPP_ALLONE (0 << USART_MAN_RXPP_SHIFT) /* ALL_ONE */ +# define USART_MAN_RXPP_ALLZERO (1 << USART_MAN_RXPP_SHIFT) /* ALL_ZERO */ +# define USART_MAN_RXPP_ZEROONE (2 << USART_MAN_RXPP_SHIFT) /* ZERO_ONE */ +# define USART_MAN_RXPP_ONEZERO (3 << USART_MAN_RXPP_SHIFT) /* ONE_ZERO */ +#define USART_MAN_RXMPOL (1 << 28) /* Bit 28: Receiver Manchester Polarity (USART only) */ +#define USART_MAN_DRIFT (1 << 30) /* Bit 30: Drift compensation (USART only) */ + +/* USART Write Protect Mode Register (USART only) */ + +#define USART_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable (USART only) */ +#define USART_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY (USART only) */ +#define USART_WPMR_WPKEY_MASK (0x00ffffff << USART_WPMR_WPKEY_SHIFT) + +/* USART Write Protect Status Register (USART only) */ + +#define USART_WPSR_WPVS (1 << 0) /* Bit 0: Write Protect Violation Status (USART only) */ +#define USART_WPSR_WPVSRC_SHIFT (8) /* Bits 8-23: Write Protect Violation Source (USART only) */ +#define USART_WPSR_WPVSRC_MASK (0xffff << USART_WPSR_WPVSRC_SHIFT) + +/* USART Version Register */ + +#define USART_VERSION_VERSION_SHIFT (0) /* Bits 0-11: Macrocell version number (USART only) */ +#define USART_VERSION_VERSION_MASK (0xfff << USART_VERSION_VERSION_SHIFT) +#define USART_VERSION_MFN_SHIFT (16) /* Bits 16-18: Reserved (USART only) */ +#define USART_VERSION_MFN_MASK (7 << USART_VERSION_MFN_SHIFT) + +/************************************************************************************************ + * Public Types + ************************************************************************************************/ + +/************************************************************************************************ + * Public Data + ************************************************************************************************/ + +/************************************************************************************************ + * Public Functions + ************************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_UART_H */ diff --git a/nuttx/arch/arm/src/sam3u/sam3u_udphs.h b/nuttx/arch/arm/src/sam3u/sam3u_udphs.h index 1ce901e1d9..e6eb88c779 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_udphs.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_udphs.h @@ -1,370 +1,371 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_udphs.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* UDPHS register offsets ***************************************************************/ - -#define SAM3U_UDPHS_CTRL_OFFSET 0x00 /* UDPHS Control Register */ -#define SAM3U_UDPHS_FNUM_OFFSET 0x04 /* UDPHS Frame Number Register */ - /* 0x08-0x0C: Reserved */ -#define SAM3U_UDPHS_IEN_OFFSET 0x10 /* UDPHS Interrupt Enable Register */ -#define SAM3U_UDPHS_INTSTA_OFFSET 0x14 /* UDPHS Interrupt Status Register */ -#define SAM3U_UDPHS_CLRINT_OFFSET 0x18 /* UDPHS Clear Interrupt Register */ -#define SAM3U_UDPHS_EPTRST_OFFSET 0x1c /* UDPHS Endpoints Reset Register */ - /* 0x20-0xcc: Reserved */ -#define SAM3U_UDPHS_TST_OFFSET 0xe0 /* UDPHS Test Register */ - /* 0xE4-0xE8: Reserved */ -#define SAM3U_UDPHS_IPNAME1_OFFSET 0xf0 /* UDPHS Name1 Register */ -#define SAM3U_UDPHS_IPNAME2_OFFSET 0xf4 /* UDPHS Name2 Register */ -#define SAM3U_UDPHS_IPFEATURES_OFFSET 0xf8 /* UDPHS Features Register */ - -/* Endpoint registers: Offsets for Endpoints 0-6: 0x100, 0x120, 0x140, 0x160, 0x180, - * 0x1a0, and 0x1c0 - */ - -#define SAM3U_UDPHSEP_OFFSET(n) (0x100+((n)<<5)) -#define SAM3U_UDPHSEP_CFG_OFFSET 0x00 /* UDPHS Endpoint Configuration Register */ -#define SAM3U_UDPHSEP_CTLENB_OFFSET 0x04 /* UDPHS Endpoint Control Enable Register */ -#define SAM3U_UDPHSEP_CTLDIS_OFFSET 0x08 /* UDPHS Endpoint Control Disable Register */ -#define SAM3U_UDPHSEP_CTL_OFFSET 0x0c /* UDPHS Endpoint Control Register */ - /* 0x10: Reserved */ -#define SAM3U_UDPHSEP_SETSTA_OFFSET 0x14 /* UDPHS Endpoint Set Status Register */ -#define SAM3U_UDPHSEP_CLRSTA_OFFSET 0x18 /* UDPHS Endpoint Clear Status Register */ -#define SAM3U_UDPHSEP_STA_OFFSET 0x1c /* UDPHS Endpoint Status Register */ - /* 0x1e0-0x300: Reserved */ - /* 0x300-0x30c: Reserved */ -/* DMA Channel Registers: Offsets for DMA channels 1-6 0x320, 0x330, 0x340, 0x350, and - * 0x360. NOTE that there is no DMA channel 0. - */ - -#define SAM3U_UDPHSDMA_OFFSET(n) (0x310+((n)<<4)) -#define SAM3U_UDPHSDMA_NXTDSC_OFFSET 0x00 /* UDPHS DMA Next Descriptor Address Register */ -#define SAM3U_UDPHSDMA_ADDRESS_OFFSET 0x04 /* UDPHS DMA Channel Address Register */ -#define SAM3U_UDPHSDMA_CONTROL_OFFSET 0x08 /* UDPHS DMA Channel Control Register */ -#define SAM3U_UDPHSDMA_STATUS_OFFSET) 0x0c /* UDPHS DMA Channel Status Register */ - -/* UDPHS register adresses **************************************************************/ - -#define SAM3U_UDPHS_CTRL (SAM3U_UDPHS_BASE+SAM3U_UDPHS_CTRL_OFFSET) -#define SAM3U_UDPHS_FNUM (SAM3U_UDPHS_BASE+SAM3U_UDPHS_FNUM_OFFSET) -#define SAM3U_UDPHS_IEN (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IEN_OFFSET) -#define SAM3U_UDPHS_INTSTA (SAM3U_UDPHS_BASE+SAM3U_UDPHS_INTSTA_OFFSET) -#define SAM3U_UDPHS_CLRINT (SAM3U_UDPHS_BASE+ SAM3U_UDPHS_CLRINT_OFFSET) -#define SAM3U_UDPHS_EPTRST (SAM3U_UDPHS_BASE+SAM3U_UDPHS_EPTRST_OFFSET) -#define SAM3U_UDPHS_TST (SAM3U_UDPHS_BASE+SAM3U_UDPHS_TST_OFFSET) -#define SAM3U_UDPHS_IPNAME1 (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPNAME1_OFFSET) -#define SAM3U_UDPHS_IPNAME2 (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPNAME2_OFFSET) -#define SAM3U_UDPHS_IPFEATURES (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPFEATURES_OFFSET) - -/* Endpoint registers */ - -#define SAM3U_UDPHSEP_BASE(n)) (SAM3U_UDPHS_BASE+SAM3U_UDPHSEP_OFFSET(n)) -#define SAM3U_UDPHSEP_CFG(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CFG_OFFSET) -#define SAM3U_UDPHSEP_CTLENB(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTLENB_OFFSET) -#define SAM3U_UDPHSEP_CTLDIS(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTLDIS_OFFSET) -#define SAM3U_UDPHSEP_CTL(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTL_OFFSET) -#define SAM3U_UDPHSEP_SETSTA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_SETSTA_OFFSET) -#define SAM3U_UDPHSEP_CLRSTA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CLRSTA_OFFSET) -#define SAM3U_UDPHSEP_STA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_STA_OFFSET) - -/* DMA Channel Registers*/ - -#define SAM3U_UDPHSDMA_BASE(n) (SAM3U_UDPHS_BASE+SAM3U_UDPHSDMA_OFFSET(n)) -#define SAM3U_UDPHSDMA_NXTDSC(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_NXTDSC_OFFSET) -#define SAM3U_UDPHSDMA_ADDRESS(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_ADDRESS_OFFSET) -#define SAM3U_UDPHSDMA_CONTROL(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_CONTROL_OFFSET) -#define SAM3U_UDPHSDMA_STATUS(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_STATUS_OFFSET) - -/* UDPHS register bit definitions *******************************************************/ -/* UDPHS Control Register */ - -#define UDPHS_CTRL_DEVADDR_SHIFT (0) /* Bits 0-6: UDPHS Address */ -#define UDPHS_CTRL_DEVADDR_MASK (0x7f << UDPHS_CTRL_DEVADDR_SHIFT) -#define UDPHS_CTRL_FADDREN (1 << 7) /* Bit 7: Function Address Enable */ -#define UDPHS_CTRL_ENUDPHS (1 << 8) /* Bit 8: UDPHS Enable */ -#define UDPHS_CTRL_DETACH (1 << 9) /* Bit 9: Detach Command */ -#define UDPHS_CTRL_REWAKEUP (1 << 10) /* Bit 10: Send Remote Wake Up */ -#define UDPHS_CTRL_PULLDDIS (1 << 11) /* Bit 11: Pull-Down Disable */ - -/* UDPHS Frame Number Register */ - -#define UDPHS_FNUM_MICROFRAMENUM_SHIFT (0) /* Bits 0-2: Microframe Num */ -#define UDPHS_FNUM_MICROFRAMENUM_MASK (7 << UDPHS_FNUM_MICROFRAMENUM_SHIFT) -#define UDPHS_FNUM_FRAMENUMBER_SHIFT (3) /* Bits 3-7: Frame Number in Packet Field Formats */ -#define UDPHS_FNUM_FRAMENUMBER_MASK (31 << UDPHS_FNUM_FRAMENUMBER_SHIFT) -#define UDPHS_FNUM_FNUMERR_SHIFT (8) /* Bits 8-13: Frame Number CRC Error */ -#define UDPHS_FNUM_FNUMERR_MASK (63 << UDPHS_FNUM_FNUMERR_SHIFT) - -/* UDPHS Interrupt Enable Register, UDPHS Interrupt Status Register, and UDPHS Clear - * Interrupt Register common bit-field definitions - */ - -#define USBPHS_INT_DETSUSPD (1 << 1) /* Bit 1: Suspend Interrupt (Common) */ -#define USBPHS_INT_MICROSOF (1 << 2) /* Bit 2: Micro-SOF Interrupt (Common) */ -#define USBPHS_INT_INTSOF (1 << 3) /* Bit 3: SOF Interrupt (Common) */ -#define USBPHS_INT_ENDRESET (1 << 4) /* Bit 4: End Of Reset Interrupt (Common) */ -#define USBPHS_INT_WAKEUP (1 << 5) /* Bit 5: Wake Up CPU Interrupt (Common) */ -#define USBPHS_INT_ENDOFRSM (1 << 6) /* Bit 6: End Of Resume Interrupt (Common) */ -#define USBPHS_INT_UPSTRRES (1 << 7) /* Bit 7: Upstream Resume Interrupt (Common) */ -#define USBPHS_INT_EPT(n) (1 << ((n)+8)) -#define USBPHS_INT_EPT0 (1 << 8) /* Bit 8: Endpoint 0 Interrupt (not Clear) */ -#define USBPHS_INT_EPT1 (1 << 9) /* Bit 9: Endpoint 1 Interrupt (not Clear) */ -#define USBPHS_INT_EPT2 (1 << 10) /* Bit 10: Endpoint 2 Interrupt (not Clear) */ -#define USBPHS_INT_EPT3 (1 << 11) /* Bit 11: Endpoint 3 Interrupt (not Clear) */ -#define USBPHS_INT_EPT4 (1 << 12) /* Bit 12: Endpoint 4 Interrupt (not Clear) */ -#define USBPHS_INT_EPT5 (1 << 13) /* Bit 13: Endpoint 5 Interrupt (not Clear) */ -#define USBPHS_INT_EPT6 (1 << 13) /* Bit 14: Endpoint 6 Interrupt (not Clear) */ -#define USBPHS_INT_DMA(n) (1<<((n)+24)) -#define USBPHS_INT_DMA1 (1 << 25) /* Bit 25: DMA Channel 1 Interrupt (not Clear) */ -#define USBPHS_INT_DMA2 (1 << 26) /* Bit 26: DMA Channel 2 Interrupt (not Clear) */ -#define USBPHS_INT_DMA3 (1 << 27) /* Bit 27: DMA Channel 3 Interrupt (not Clear) */ -#define USBPHS_INT_DMA4 (1 << 28) /* Bit 28: DMA Channel 4 Interrupt (not Clear) */ -#define USBPHS_INT_DMA5 (1 << 29) /* Bit 29: DMA Channel 5 Interrupt (not Clear) */ -#define USBPHS_INT_DMA6 (1 << 30) /* Bit 30: DMA Channel 6 Interrupt (not Clear) */ - -/* UDPHS Endpoints Reset Register */ - -#define UDPHS_EPTRST_EPT(n) (1<<(n)) /* Bit 0-6: Endpoint n Reset */ - -/* UDPHS Test Register */ - -#define UDPHS_TST_SPEEDCFG_SHIFT (0) /* Bits 0-1: Speed Configuration */ -#define UDPHS_TST_SPEEDCFG_MASK (3 << UDPHS_TST_SPEEDCFG_SHIFT) -00 Normal Mode -10 Force High Speed -11 Force Full Speed -#define UDPHS_TST_TSTJ (1 << 2) /* Bit 2: Test J Mode */ -#define UDPHS_TST_TSTK (1 << 3) /* Bit 3: Test K Mode */ -#define UDPHS_TST_TSTPKT (1 << 4) /* Bit 4: Test Packet Mo */ -#define UDPHS_TST_OPMODE2 (1 << 5) /* Bit 5: OpMode2 */ - -/* UDPHS Features Register */ - -#define UDPHS_IPFEATURES_EPTNBRMAX_SHIFT (0) /* Bits 0-3: Max Number of Endpoints */ -#define UDPHS_IPFEATURES_EPTNBRMAX_MASK (15 << UDPHS_IPFEATURES_EPTNBRMAX_SHIFT) -#define UDPHS_IPFEATURES_DMACHANNELNBR_SHIFT (4) /* Bits 4-6: Number of DMA Channels */ -#define UDPHS_IPFEATURES_DMACHANNELNBR_MASK (7 << UDPHS_IPFEATURES_DMACHANNELNBR_SHIFT) -#define UDPHS_IPFEATURES_DMABSIZ (1 << 7) /* Bit 7: DMA Buffer Size */ -#define UDPHS_IPFEATURES_DMAFIFOWDDEPTH_SHIFT (8) /* Bits 8-11: DMA FIFO Depth in Words */ -#define UDPHS_IPFEATURES_DMAFIFOWDDEPTH_MASK (15 << UDPHS_IPFEATURES_DMAFIFOWDDEPTH_SHIFT) -# define UDPHS_IPFEATURES_DMAFIFOWDDEPTH(n) ((n)&15) -#define UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT (12) /* Bits 12-14: DPRAM Size */ -#define UDPHS_IPFEATURES_FIFOMAXSIZE_MASK (7 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) -# define UDPHS_IPFEATURES_FIFOMAXSIZE_128b (0 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 128 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_256b (1 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 256 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_512b (2 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 512 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_1Kb (3 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 1024 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_2Kb (4 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 2048 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_4Kb (5 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 4096 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_8Kb (6 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 8192 bytes */ -# define UDPHS_IPFEATURES_FIFOMAXSIZE_16Kb (7 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 16384 bytes */ -#define UDPHS_IPFEATURES_BWDPRAM (1 << 15) /* Bit 15: DPRAM Byte Write Capability */ -#define UDPHS_IPFEATURES_DATAB168 (1 << 15) /* Bit 15: UTMI DataBus16_8 */ -#define UDPHS_IPFEATURES_ISOEPT(n) (1<<((n)+16) -#define UDPHS_IPFEATURES_ISOEPT1 (1 << 17) /* Bit 17: EP1 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT2 (1 << 18) /* Bit 18: EP2 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT3 (1 << 19) /* Bit 19: EP3 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT4 (1 << 20) /* Bit 20: EP4 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT5 (1 << 21) /* Bit 21: EP5 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT6 (1 << 22) /* Bit 22: EP6 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT7 (1 << 23) /* Bit 23: EP7 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT8 (1 << 24) /* Bit 24: EP8 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT9 (1 << 25) /* Bit 25: EP9 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT0 (1 << 26) /* Bit 26: EP10 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT1 (1 << 27) /* Bit 27: EP11 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT2 (1 << 28) /* Bit 28: EP12 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT3 (1 << 29) /* Bit 29: EP13 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT4 (1 << 30) /* Bit 30: EP14 High B/W Isoc Capability */ -#define UDPHS_IPFEATURES_ISOEPT5 (1 << 31) /* Bit 31: EP15 High B/W Isoc Capability */ - -/* UDPHS Endpoint Configuration Register (0-6) */ - -#define UDPHSEP_CFG_SIZE_SHIFT (0) /* Bits 0-2: Endpoint Size */ -#define UDPHSEP_CFG_SIZE_MASK (7 << UDPHSEP_CFG_SIZE_SHIFT) -# define UDPHSEP_CFG_SIZE_8b (0 << UDPHSEP_CFG_SIZE_SHIFT) /* 8 bytes */ -# define UDPHSEP_CFG_SIZE_16b (1 << UDPHSEP_CFG_SIZE_SHIFT) /* 16 bytes */ -# define UDPHSEP_CFG_SIZE_32b (2 << UDPHSEP_CFG_SIZE_SHIFT) /* 32 bytes */ -# define UDPHSEP_CFG_SIZE_16b (3 << UDPHSEP_CFG_SIZE_SHIFT) /* 64 bytes */ -# define UDPHSEP_CFG_SIZE_128b (4 << UDPHSEP_CFG_SIZE_SHIFT) /* 128 bytes */ -# define UDPHSEP_CFG_SIZE_256b (5 << UDPHSEP_CFG_SIZE_SHIFT) /* 256 bytes */ -# define UDPHSEP_CFG_SIZE_512b (6 << UDPHSEP_CFG_SIZE_SHIFT) /* 512 bytes */ -# define UDPHSEP_CFG_SIZE_1Kb (7 << UDPHSEP_CFG_SIZE_SHIFT) /* 1024 bytes */ -#define UDPHSEP_CFG_DIR (1 << 3) /* Bit 3: Endpoint Direction */ -#define UDPHSEP_CFG_TYPE_SHIFT (4) /* Bits 4-5: Endpoint Type */ -#define UDPHSEP_CFG_TYPE_MASK (3 << UDPHSEP_CFG_TYPE_SHIFT) -# define UDPHSEP_CFG_TYPE_CNTRL (0 << UDPHSEP_CFG_TYPE_SHIFT) /* Control endpoint */ -# define UDPHSEP_CFG_TYPE_ISOC (1 << UDPHSEP_CFG_TYPE_SHIFT) /* Isochronous endpoint */ -# define UDPHSEP_CFG_TYPE_BULK (2 << UDPHSEP_CFG_TYPE_SHIFT) /* Bulk endpoint */ -# define UDPHSEP_CFG_TYPE_INTR (3 << UDPHSEP_CFG_TYPE_SHIFT) /* Interrupt endpoint */ -#define UDPHSEP_CFG_BKNUMBER_SHIFT (6) /* Bits 6-7: Number of Banks */ -#define UDPHSEP_CFG_BKNUMBER_MASK (3 << UDPHSEP_CFG_BKNUMBER_SHIFT) -# define UDPHSEP_CFG_BKNUMBER_0BANK (0 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Zero bank (unmapped) */ -# define UDPHSEP_CFG_BKNUMBER_1BANK (1 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* One bank (bank 0) */ -# define UDPHSEP_CFG_BKNUMBER_2BANK (2 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Double bank (bank 0-1) */ -# define UDPHSEP_CFG_BKNUMBER_3BANK (3 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Triple bank (bank 0-2) */ -#define UDPHSEP_CFG_NBTRANS_SHIFT (8) /* Bits 8-9: Number Of Transaction per Microframe */ -#define UDPHSEP_CFG_NBTRANS_MASK (3 << UDPHSEP_CFG_NBTRANS_SHIFT) -#define UDPHSEP_CFG_MAPD (1 << 31) /*Bit 31: Endpoint Mapped */ - -/* UDPHS Endpoint Control Enable Register, UDPHS Endpoint Control Disable Register, - * and UDPHS Endpoint Control Register common bit-field definitions - */ - -#define UDPHSEP_INT_EPT (1 << 0) /* Bit 0: Endpoint Enable/Disable */ -#define UDPHSEP_INT_AUTOVALID (1 << 1) /* Bit 1: Packet Auto-Valid */ -#define UDPHSEP_INT_INTDISDMA (1 << 3) /* Bit 3: Interrupts Disable DMA */ -#define UDPHSEP_INT_NYETDIS (1 << 4) /* Bit 4: NYET Disable (HS Bulk OUT EPs) */ -#define UDPHSEP_INT_DATAXRX (1 << 6) /* Bit 6: DATAx Interrupt Enable (High B/W Isoc OUT EPs) */ -#define UDPHSEP_INT_MDATARX (1 << 7) /* Bit 7: MDATA Interrupt Enable (High B/W Isoc OUT EPs) */ -#define UDPHSEP_INT_ERROVFLW (1 << 8) /* Bit 8: Overflow Error Interrupt */ -#define UDPHSEP_INT_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data Interrupt */ -#define UDPHSEP_INT_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Interrupt */ -#define UDPHSEP_INT_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready Interrupt */ -#define UDPHSEP_INT_ERRTRANS (1 << 11) /* Bit 11: Transaction Error Interrupt */ -#define UDPHSEP_INT_RXSETUP (1 << 12) /* Bit 12: Received SETUP Interrupt */ -#define UDPHSEP_INT_ERRFLISO (1 << 12) /* Bit 12: Error Flow Interrupt */ -#define UDPHSEP_INT_STALLSNT (1 << 13) /* Bit 13: Stall Sent Interrupt */ -#define UDPHSEP_INT_ERRCRISO (1 << 13) /* Bit 13: ISO CRC Error Error Interrupt */ -#define UDPHSEP_INT_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error Interrupt */ -#define UDPHSEP_INT_NAKIN (1 << 14) /* Bit 14: NAKIN Interrupt */ -#define UDPHSEP_INT_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Interrupt */ -#define UDPHSEP_INT_NAKOUT (1 << 15) /* Bit 15: NAKOUT Interrupt */ -#define UDPHSEP_INT_BUSYBANK (1 << 18) /* Bit 18: Busy Bank Interrupt */ -#define UDPHSEP_INT_SHRTPCKT (1 << 31) /* Bit 31: Short Packet Send/Short Packet Interrupt */ - -/* UDPHS Endpoint Set Status Register */ - -#define UDPHSEP_SETSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Set */ -#define UDPHSEP_SETSTA_KILLBANK (1 << 9) /* Bit 9: KILL Bank Set (for IN Endpoint) */ -#define UDPHSEP_SETSTA_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready Set */ - -/* UDPHS Endpoint Clear Status Register */ - -#define UDPHSEP_CLRSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Clear */ -#define UDPHSEP_CLRSTA_TOGGLESQ (1 << 6) /* Bit 6: Data Toggle Clear */ -#define UDPHSEP_CLRSTA_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data Clear */ -#define UDPHSEP_CLRSTA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Clear */ -#define UDPHSEP_CLRSTA_RXSETUP (1 << 12) /* Bit 12: Received SETUP Clear */ -#define UDPHSEP_CLRSTA_ERRFLISO (1 << 12) /* Bit 12: Error Flow Clear */ -#define UDPHSEP_CLRSTA_STALL_NT (1 << 13) /* Bit 13: Stall Sent Clear */ -#define UDPHSEP_CLRSTA_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error Clear */ -#define UDPHSEP_CLRSTA_NAKIN (1 << 14) /* Bit 14: NAKIN Clear */ -#define UDPHSEP_CLRSTA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Clear */ -#define UDPHSEP_CLRSTA_NAKOUT (1 << 15) /* Bit 15: NAKOUT Clear */ - -/* UDPHS Endpoint Status Register */ - -#define UDPHSEP_STA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request */ -#define UDPHSEP_STA_TOGGLESQSTA_SHIFT (6) /* Bits 6-7: Toggle Sequencing */ -#define UDPHSEP_STA_TOGGLESQSTA_MASK (3 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) -# define UDPHSEP_STA_TOGGLESQSTA_DATA0 (0 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data0 */ -# define UDPHSEP_STA_TOGGLESQSTA_DATA1 (1 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data1 */ -# define UDPHSEP_STA_TOGGLESQSTA_DATA2 (2 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data2 (High B/W Isoc EP) */ -# define UDPHSEP_STA_TOGGLESQSTA_MDATA (3 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* MData (High B/W Isoc EP) */ -#define UDPHSEP_STA_ERROVFLW (1 << 8) /* Bit 8: Overflow Error */ -#define UDPHSEP_STA_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data */ -#define UDPHSEP_STA_KILLBANK (1 << 9) /* Bit 9: KILL Bank */ -#define UDPHSEP_STA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete */ -#define UDPHSEP_STA_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready */ -#define UDPHSEP_STA_ERRTRANS (1 << 11) /* Bit 11: Transaction Error */ -#define UDPHSEP_STA_RXSETUP (1 << 12) /* Bit 12: Received SETUP */ -#define UDPHSEP_STA_ERRFLISO (1 << 12) /* Bit 12: Error Flow */ -#define UDPHSEP_STA_STALLSNT (1 << 13) /* Bit 13: Stall Sent */ -#define UDPHSEP_STA_ERRCRISO (1 << 13) /* Bit 13: CRC ISO Error */ -#define UDPHSEP_STA_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error */ -#define UDPHSEP_STA_NAKIN (1 << 14) /* Bit 14: NAK IN */ -#define UDPHSEP_STA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error */ -#define UDPHSEP_STA_NAKOUT (1 << 15) /* Bit 15: NAK OUT */ -#define UDPHSEP_STA_CURRENTBANK_SHIFT (16) /* Bits 16-17: Current Bank */ -#define UDPHSEP_STA_CURRENTBANK_MASK (3 << UDPHSEP_STA_CURRENTBANK_MASK) -#define UDPHSEP_STA_CONTROLDIR_SHIFT (16) /* Bits 16-17: Control Direction */ -#define UDPHSEP_STA_CONTROLDIR_MASK (3 << UDPHSEP_STA_CONTROLDIR_SHIFT) -#define UDPHSEP_STA_BUSYBANKSTA_SHIFT (18) /* Bits 18-19: Busy Bank Number */ -#define UDPHSEP_STA_BUSYBANKSTA_MASK (3 << UDPHSEP_STA_BUSYBANKSTA_SHIFT) -#define UDPHSEP_STA_BYTECOUNT_SHIFT (20) /* Bits 20-23: UDPHS Byte Count */ -#define UDPHSEP_STA_BYTECOUNT_MASK (15 << UDPHSEP_STA_BYTECOUNT_SHIFT) -#define UDPHSEP_STA_SHRTPCKT (1 << 31) /* Bit 31: Short Packet - -/* UDPHS DMA Channel Control Register */ - -#define UDPHSDMA_CONTROL_CHANNENB (1 << 0) /* Bit 0: Channel Enable Command */ -#define UDPHSDMA_CONTROL_LDNXTDSC (1 << 1) /* Bit 1: Load Next Channel Xfr Desc Enable (Command) */ -#define UDPHSDMA_CONTROL_ENDTREN (1 << 2) /* Bit 2: End of Transfer Enable (Control) */ -#define UDPHSDMA_CONTROL_ENDBEN (1 << 3) /* Bit 3: End of Buffer Enable (Control) */ -#define UDPHSDMA_CONTROL_ENDTRIT (1 << 4) /* Bit 4: End of Transfer Interrupt Enable */ -#define UDPHSDMA_CONTROL_ENDBUFFIT (1 << 5) /* Bit 5: End of Buffer Interrupt Enable */ -#define UDPHSDMA_CONTROL_DESCLDIT (1 << 6) /* Bit 6: Descriptor Loaded Interrupt Enab */ -#define UDPHSDMA_CONTROL_BURSTLCK (1 << 7) /* Bit 7: Burst Lock Ena */ -#define UDPHSDMA_CONTROL_BUFFLENGTH_SHIFT (16) /* Bits 16-31: Buffer Byte Length (Write-only) */ -#define UDPHSDMA_CONTROL_BUFFLENGTH_MASK (0xffff << UDPHSDMA_CONTROL_BUFFLENGTH_SHIFT) - -/* UDPHS DMA Channel Status Register */ - -#define UDPHSDMA_STATUS_CHANNENB (1 << 0) /* Bit 0: Channel Enable Status */ -#define UDPHSDMA_STATUS_CHANNACT (1 << 1) /* Bit 1: Channel Active Status */ -#define UDPHSDMA_STATUS_ENDTRST (1 << 4) /* Bit 4: End of Channel Transfer Status */ -#define UDPHSDMA_STATUS_ENDBFST (1 << 5) /* Bit 5: End of Channel Buffer Status */ -#define UDPHSDMA_STATUS_DESCLDST (1 << 6) /* Bit 6: Descriptor Loaded Status */ -#define UDPHSDMA_STATUS_BUFFCOUNT_SHIFT (16) /* Bits 16-31: Buffer Byte Count */ -#define UDPHSDMA_STATUS_BUFFCOUNT_MASK (0xffff << UDPHSDMA_STATUS_BUFFCOUNT_SHIFT) - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_udphs.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* UDPHS register offsets ***************************************************************/ + +#define SAM3U_UDPHS_CTRL_OFFSET 0x00 /* UDPHS Control Register */ +#define SAM3U_UDPHS_FNUM_OFFSET 0x04 /* UDPHS Frame Number Register */ + /* 0x08-0x0C: Reserved */ +#define SAM3U_UDPHS_IEN_OFFSET 0x10 /* UDPHS Interrupt Enable Register */ +#define SAM3U_UDPHS_INTSTA_OFFSET 0x14 /* UDPHS Interrupt Status Register */ +#define SAM3U_UDPHS_CLRINT_OFFSET 0x18 /* UDPHS Clear Interrupt Register */ +#define SAM3U_UDPHS_EPTRST_OFFSET 0x1c /* UDPHS Endpoints Reset Register */ + /* 0x20-0xcc: Reserved */ +#define SAM3U_UDPHS_TST_OFFSET 0xe0 /* UDPHS Test Register */ + /* 0xE4-0xE8: Reserved */ +#define SAM3U_UDPHS_IPNAME1_OFFSET 0xf0 /* UDPHS Name1 Register */ +#define SAM3U_UDPHS_IPNAME2_OFFSET 0xf4 /* UDPHS Name2 Register */ +#define SAM3U_UDPHS_IPFEATURES_OFFSET 0xf8 /* UDPHS Features Register */ + +/* Endpoint registers: Offsets for Endpoints 0-6: 0x100, 0x120, 0x140, 0x160, 0x180, + * 0x1a0, and 0x1c0 + */ + +#define SAM3U_UDPHSEP_OFFSET(n) (0x100+((n)<<5)) +#define SAM3U_UDPHSEP_CFG_OFFSET 0x00 /* UDPHS Endpoint Configuration Register */ +#define SAM3U_UDPHSEP_CTLENB_OFFSET 0x04 /* UDPHS Endpoint Control Enable Register */ +#define SAM3U_UDPHSEP_CTLDIS_OFFSET 0x08 /* UDPHS Endpoint Control Disable Register */ +#define SAM3U_UDPHSEP_CTL_OFFSET 0x0c /* UDPHS Endpoint Control Register */ + /* 0x10: Reserved */ +#define SAM3U_UDPHSEP_SETSTA_OFFSET 0x14 /* UDPHS Endpoint Set Status Register */ +#define SAM3U_UDPHSEP_CLRSTA_OFFSET 0x18 /* UDPHS Endpoint Clear Status Register */ +#define SAM3U_UDPHSEP_STA_OFFSET 0x1c /* UDPHS Endpoint Status Register */ + /* 0x1e0-0x300: Reserved */ + /* 0x300-0x30c: Reserved */ +/* DMA Channel Registers: Offsets for DMA channels 1-6 0x320, 0x330, 0x340, 0x350, and + * 0x360. NOTE that there is no DMA channel 0. + */ + +#define SAM3U_UDPHSDMA_OFFSET(n) (0x310+((n)<<4)) +#define SAM3U_UDPHSDMA_NXTDSC_OFFSET 0x00 /* UDPHS DMA Next Descriptor Address Register */ +#define SAM3U_UDPHSDMA_ADDRESS_OFFSET 0x04 /* UDPHS DMA Channel Address Register */ +#define SAM3U_UDPHSDMA_CONTROL_OFFSET 0x08 /* UDPHS DMA Channel Control Register */ +#define SAM3U_UDPHSDMA_STATUS_OFFSET) 0x0c /* UDPHS DMA Channel Status Register */ + +/* UDPHS register adresses **************************************************************/ + +#define SAM3U_UDPHS_CTRL (SAM3U_UDPHS_BASE+SAM3U_UDPHS_CTRL_OFFSET) +#define SAM3U_UDPHS_FNUM (SAM3U_UDPHS_BASE+SAM3U_UDPHS_FNUM_OFFSET) +#define SAM3U_UDPHS_IEN (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IEN_OFFSET) +#define SAM3U_UDPHS_INTSTA (SAM3U_UDPHS_BASE+SAM3U_UDPHS_INTSTA_OFFSET) +#define SAM3U_UDPHS_CLRINT (SAM3U_UDPHS_BASE+ SAM3U_UDPHS_CLRINT_OFFSET) +#define SAM3U_UDPHS_EPTRST (SAM3U_UDPHS_BASE+SAM3U_UDPHS_EPTRST_OFFSET) +#define SAM3U_UDPHS_TST (SAM3U_UDPHS_BASE+SAM3U_UDPHS_TST_OFFSET) +#define SAM3U_UDPHS_IPNAME1 (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPNAME1_OFFSET) +#define SAM3U_UDPHS_IPNAME2 (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPNAME2_OFFSET) +#define SAM3U_UDPHS_IPFEATURES (SAM3U_UDPHS_BASE+SAM3U_UDPHS_IPFEATURES_OFFSET) + +/* Endpoint registers */ + +#define SAM3U_UDPHSEP_BASE(n)) (SAM3U_UDPHS_BASE+SAM3U_UDPHSEP_OFFSET(n)) +#define SAM3U_UDPHSEP_CFG(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CFG_OFFSET) +#define SAM3U_UDPHSEP_CTLENB(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTLENB_OFFSET) +#define SAM3U_UDPHSEP_CTLDIS(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTLDIS_OFFSET) +#define SAM3U_UDPHSEP_CTL(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CTL_OFFSET) +#define SAM3U_UDPHSEP_SETSTA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_SETSTA_OFFSET) +#define SAM3U_UDPHSEP_CLRSTA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_CLRSTA_OFFSET) +#define SAM3U_UDPHSEP_STA(n) (SAM3U_UDPHSEP_BASE(n)+SAM3U_UDPHSEP_STA_OFFSET) + +/* DMA Channel Registers*/ + +#define SAM3U_UDPHSDMA_BASE(n) (SAM3U_UDPHS_BASE+SAM3U_UDPHSDMA_OFFSET(n)) +#define SAM3U_UDPHSDMA_NXTDSC(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_NXTDSC_OFFSET) +#define SAM3U_UDPHSDMA_ADDRESS(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_ADDRESS_OFFSET) +#define SAM3U_UDPHSDMA_CONTROL(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_CONTROL_OFFSET) +#define SAM3U_UDPHSDMA_STATUS(n) (SAM3U_UDPHSDMA_BASE(n)+SAM3U_UDPHSDMA_STATUS_OFFSET) + +/* UDPHS register bit definitions *******************************************************/ +/* UDPHS Control Register */ + +#define UDPHS_CTRL_DEVADDR_SHIFT (0) /* Bits 0-6: UDPHS Address */ +#define UDPHS_CTRL_DEVADDR_MASK (0x7f << UDPHS_CTRL_DEVADDR_SHIFT) +#define UDPHS_CTRL_FADDREN (1 << 7) /* Bit 7: Function Address Enable */ +#define UDPHS_CTRL_ENUDPHS (1 << 8) /* Bit 8: UDPHS Enable */ +#define UDPHS_CTRL_DETACH (1 << 9) /* Bit 9: Detach Command */ +#define UDPHS_CTRL_REWAKEUP (1 << 10) /* Bit 10: Send Remote Wake Up */ +#define UDPHS_CTRL_PULLDDIS (1 << 11) /* Bit 11: Pull-Down Disable */ + +/* UDPHS Frame Number Register */ + +#define UDPHS_FNUM_MICROFRAMENUM_SHIFT (0) /* Bits 0-2: Microframe Num */ +#define UDPHS_FNUM_MICROFRAMENUM_MASK (7 << UDPHS_FNUM_MICROFRAMENUM_SHIFT) +#define UDPHS_FNUM_FRAMENUMBER_SHIFT (3) /* Bits 3-7: Frame Number in Packet Field Formats */ +#define UDPHS_FNUM_FRAMENUMBER_MASK (31 << UDPHS_FNUM_FRAMENUMBER_SHIFT) +#define UDPHS_FNUM_FNUMERR_SHIFT (8) /* Bits 8-13: Frame Number CRC Error */ +#define UDPHS_FNUM_FNUMERR_MASK (63 << UDPHS_FNUM_FNUMERR_SHIFT) + +/* UDPHS Interrupt Enable Register, UDPHS Interrupt Status Register, and UDPHS Clear + * Interrupt Register common bit-field definitions + */ + +#define USBPHS_INT_DETSUSPD (1 << 1) /* Bit 1: Suspend Interrupt (Common) */ +#define USBPHS_INT_MICROSOF (1 << 2) /* Bit 2: Micro-SOF Interrupt (Common) */ +#define USBPHS_INT_INTSOF (1 << 3) /* Bit 3: SOF Interrupt (Common) */ +#define USBPHS_INT_ENDRESET (1 << 4) /* Bit 4: End Of Reset Interrupt (Common) */ +#define USBPHS_INT_WAKEUP (1 << 5) /* Bit 5: Wake Up CPU Interrupt (Common) */ +#define USBPHS_INT_ENDOFRSM (1 << 6) /* Bit 6: End Of Resume Interrupt (Common) */ +#define USBPHS_INT_UPSTRRES (1 << 7) /* Bit 7: Upstream Resume Interrupt (Common) */ +#define USBPHS_INT_EPT(n) (1 << ((n)+8)) +#define USBPHS_INT_EPT0 (1 << 8) /* Bit 8: Endpoint 0 Interrupt (not Clear) */ +#define USBPHS_INT_EPT1 (1 << 9) /* Bit 9: Endpoint 1 Interrupt (not Clear) */ +#define USBPHS_INT_EPT2 (1 << 10) /* Bit 10: Endpoint 2 Interrupt (not Clear) */ +#define USBPHS_INT_EPT3 (1 << 11) /* Bit 11: Endpoint 3 Interrupt (not Clear) */ +#define USBPHS_INT_EPT4 (1 << 12) /* Bit 12: Endpoint 4 Interrupt (not Clear) */ +#define USBPHS_INT_EPT5 (1 << 13) /* Bit 13: Endpoint 5 Interrupt (not Clear) */ +#define USBPHS_INT_EPT6 (1 << 13) /* Bit 14: Endpoint 6 Interrupt (not Clear) */ +#define USBPHS_INT_DMA(n) (1<<((n)+24)) +#define USBPHS_INT_DMA1 (1 << 25) /* Bit 25: DMA Channel 1 Interrupt (not Clear) */ +#define USBPHS_INT_DMA2 (1 << 26) /* Bit 26: DMA Channel 2 Interrupt (not Clear) */ +#define USBPHS_INT_DMA3 (1 << 27) /* Bit 27: DMA Channel 3 Interrupt (not Clear) */ +#define USBPHS_INT_DMA4 (1 << 28) /* Bit 28: DMA Channel 4 Interrupt (not Clear) */ +#define USBPHS_INT_DMA5 (1 << 29) /* Bit 29: DMA Channel 5 Interrupt (not Clear) */ +#define USBPHS_INT_DMA6 (1 << 30) /* Bit 30: DMA Channel 6 Interrupt (not Clear) */ + +/* UDPHS Endpoints Reset Register */ + +#define UDPHS_EPTRST_EPT(n) (1<<(n)) /* Bit 0-6: Endpoint n Reset */ + +/* UDPHS Test Register */ + +#define UDPHS_TST_SPEEDCFG_SHIFT (0) /* Bits 0-1: Speed Configuration */ +#define UDPHS_TST_SPEEDCFG_MASK (3 << UDPHS_TST_SPEEDCFG_SHIFT) +# define UDPHS_TST_SPEEDCFG_NORMAL (0 << UDPHS_TST_SPEEDCFG_SHIFT) /* Normal Mode */ +# define UDPHS_TST_SPEEDCFG_HIGH (2 << UDPHS_TST_SPEEDCFG_SHIFT) /* Force High Speed */ +# define UDPHS_TST_SPEEDCFG_FULL (3 << UDPHS_TST_SPEEDCFG_SHIFT) /* Force Full Speed */ +#define UDPHS_TST_TSTJ (1 << 2) /* Bit 2: Test J Mode */ +#define UDPHS_TST_TSTK (1 << 3) /* Bit 3: Test K Mode */ +#define UDPHS_TST_TSTPKT (1 << 4) /* Bit 4: Test Packet Mo */ +#define UDPHS_TST_OPMODE2 (1 << 5) /* Bit 5: OpMode2 */ + +/* UDPHS Features Register */ + +#define UDPHS_IPFEATURES_EPTNBRMAX_SHIFT (0) /* Bits 0-3: Max Number of Endpoints */ +#define UDPHS_IPFEATURES_EPTNBRMAX_MASK (15 << UDPHS_IPFEATURES_EPTNBRMAX_SHIFT) +#define UDPHS_IPFEATURES_DMACHANNELNBR_SHIFT (4) /* Bits 4-6: Number of DMA Channels */ +#define UDPHS_IPFEATURES_DMACHANNELNBR_MASK (7 << UDPHS_IPFEATURES_DMACHANNELNBR_SHIFT) +#define UDPHS_IPFEATURES_DMABSIZ (1 << 7) /* Bit 7: DMA Buffer Size */ +#define UDPHS_IPFEATURES_DMAFIFOWDDEPTH_SHIFT (8) /* Bits 8-11: DMA FIFO Depth in Words */ +#define UDPHS_IPFEATURES_DMAFIFOWDDEPTH_MASK (15 << UDPHS_IPFEATURES_DMAFIFOWDDEPTH_SHIFT) +# define UDPHS_IPFEATURES_DMAFIFOWDDEPTH(n) ((n)&15) +#define UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT (12) /* Bits 12-14: DPRAM Size */ +#define UDPHS_IPFEATURES_FIFOMAXSIZE_MASK (7 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) +# define UDPHS_IPFEATURES_FIFOMAXSIZE_128b (0 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 128 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_256b (1 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 256 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_512b (2 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 512 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_1Kb (3 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 1024 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_2Kb (4 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 2048 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_4Kb (5 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 4096 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_8Kb (6 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 8192 bytes */ +# define UDPHS_IPFEATURES_FIFOMAXSIZE_16Kb (7 << UDPHS_IPFEATURES_FIFOMAXSIZE_SHIFT) /* DPRAM 16384 bytes */ +#define UDPHS_IPFEATURES_BWDPRAM (1 << 15) /* Bit 15: DPRAM Byte Write Capability */ +#define UDPHS_IPFEATURES_DATAB168 (1 << 15) /* Bit 15: UTMI DataBus16_8 */ +#define UDPHS_IPFEATURES_ISOEPT(n) (1<<((n)+16) +#define UDPHS_IPFEATURES_ISOEPT1 (1 << 17) /* Bit 17: EP1 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT2 (1 << 18) /* Bit 18: EP2 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT3 (1 << 19) /* Bit 19: EP3 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT4 (1 << 20) /* Bit 20: EP4 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT5 (1 << 21) /* Bit 21: EP5 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT6 (1 << 22) /* Bit 22: EP6 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT7 (1 << 23) /* Bit 23: EP7 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT8 (1 << 24) /* Bit 24: EP8 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT9 (1 << 25) /* Bit 25: EP9 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT0 (1 << 26) /* Bit 26: EP10 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT1 (1 << 27) /* Bit 27: EP11 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT2 (1 << 28) /* Bit 28: EP12 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT3 (1 << 29) /* Bit 29: EP13 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT4 (1 << 30) /* Bit 30: EP14 High B/W Isoc Capability */ +#define UDPHS_IPFEATURES_ISOEPT5 (1 << 31) /* Bit 31: EP15 High B/W Isoc Capability */ + +/* UDPHS Endpoint Configuration Register (0-6) */ + +#define UDPHSEP_CFG_SIZE_SHIFT (0) /* Bits 0-2: Endpoint Size */ +#define UDPHSEP_CFG_SIZE_MASK (7 << UDPHSEP_CFG_SIZE_SHIFT) +# define UDPHSEP_CFG_SIZE_8b (0 << UDPHSEP_CFG_SIZE_SHIFT) /* 8 bytes */ +# define UDPHSEP_CFG_SIZE_16b (1 << UDPHSEP_CFG_SIZE_SHIFT) /* 16 bytes */ +# define UDPHSEP_CFG_SIZE_32b (2 << UDPHSEP_CFG_SIZE_SHIFT) /* 32 bytes */ +# define UDPHSEP_CFG_SIZE_16b (3 << UDPHSEP_CFG_SIZE_SHIFT) /* 64 bytes */ +# define UDPHSEP_CFG_SIZE_128b (4 << UDPHSEP_CFG_SIZE_SHIFT) /* 128 bytes */ +# define UDPHSEP_CFG_SIZE_256b (5 << UDPHSEP_CFG_SIZE_SHIFT) /* 256 bytes */ +# define UDPHSEP_CFG_SIZE_512b (6 << UDPHSEP_CFG_SIZE_SHIFT) /* 512 bytes */ +# define UDPHSEP_CFG_SIZE_1Kb (7 << UDPHSEP_CFG_SIZE_SHIFT) /* 1024 bytes */ +#define UDPHSEP_CFG_DIR (1 << 3) /* Bit 3: Endpoint Direction */ +#define UDPHSEP_CFG_TYPE_SHIFT (4) /* Bits 4-5: Endpoint Type */ +#define UDPHSEP_CFG_TYPE_MASK (3 << UDPHSEP_CFG_TYPE_SHIFT) +# define UDPHSEP_CFG_TYPE_CNTRL (0 << UDPHSEP_CFG_TYPE_SHIFT) /* Control endpoint */ +# define UDPHSEP_CFG_TYPE_ISOC (1 << UDPHSEP_CFG_TYPE_SHIFT) /* Isochronous endpoint */ +# define UDPHSEP_CFG_TYPE_BULK (2 << UDPHSEP_CFG_TYPE_SHIFT) /* Bulk endpoint */ +# define UDPHSEP_CFG_TYPE_INTR (3 << UDPHSEP_CFG_TYPE_SHIFT) /* Interrupt endpoint */ +#define UDPHSEP_CFG_BKNUMBER_SHIFT (6) /* Bits 6-7: Number of Banks */ +#define UDPHSEP_CFG_BKNUMBER_MASK (3 << UDPHSEP_CFG_BKNUMBER_SHIFT) +# define UDPHSEP_CFG_BKNUMBER_0BANK (0 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Zero bank (unmapped) */ +# define UDPHSEP_CFG_BKNUMBER_1BANK (1 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* One bank (bank 0) */ +# define UDPHSEP_CFG_BKNUMBER_2BANK (2 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Double bank (bank 0-1) */ +# define UDPHSEP_CFG_BKNUMBER_3BANK (3 << UDPHSEP_CFG_BKNUMBER_SHIFT) /* Triple bank (bank 0-2) */ +#define UDPHSEP_CFG_NBTRANS_SHIFT (8) /* Bits 8-9: Number Of Transaction per Microframe */ +#define UDPHSEP_CFG_NBTRANS_MASK (3 << UDPHSEP_CFG_NBTRANS_SHIFT) +#define UDPHSEP_CFG_MAPD (1 << 31) /*Bit 31: Endpoint Mapped */ + +/* UDPHS Endpoint Control Enable Register, UDPHS Endpoint Control Disable Register, + * and UDPHS Endpoint Control Register common bit-field definitions + */ + +#define UDPHSEP_INT_EPT (1 << 0) /* Bit 0: Endpoint Enable/Disable */ +#define UDPHSEP_INT_AUTOVALID (1 << 1) /* Bit 1: Packet Auto-Valid */ +#define UDPHSEP_INT_INTDISDMA (1 << 3) /* Bit 3: Interrupts Disable DMA */ +#define UDPHSEP_INT_NYETDIS (1 << 4) /* Bit 4: NYET Disable (HS Bulk OUT EPs) */ +#define UDPHSEP_INT_DATAXRX (1 << 6) /* Bit 6: DATAx Interrupt Enable (High B/W Isoc OUT EPs) */ +#define UDPHSEP_INT_MDATARX (1 << 7) /* Bit 7: MDATA Interrupt Enable (High B/W Isoc OUT EPs) */ +#define UDPHSEP_INT_ERROVFLW (1 << 8) /* Bit 8: Overflow Error Interrupt */ +#define UDPHSEP_INT_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data Interrupt */ +#define UDPHSEP_INT_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Interrupt */ +#define UDPHSEP_INT_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready Interrupt */ +#define UDPHSEP_INT_ERRTRANS (1 << 11) /* Bit 11: Transaction Error Interrupt */ +#define UDPHSEP_INT_RXSETUP (1 << 12) /* Bit 12: Received SETUP Interrupt */ +#define UDPHSEP_INT_ERRFLISO (1 << 12) /* Bit 12: Error Flow Interrupt */ +#define UDPHSEP_INT_STALLSNT (1 << 13) /* Bit 13: Stall Sent Interrupt */ +#define UDPHSEP_INT_ERRCRISO (1 << 13) /* Bit 13: ISO CRC Error Error Interrupt */ +#define UDPHSEP_INT_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error Interrupt */ +#define UDPHSEP_INT_NAKIN (1 << 14) /* Bit 14: NAKIN Interrupt */ +#define UDPHSEP_INT_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Interrupt */ +#define UDPHSEP_INT_NAKOUT (1 << 15) /* Bit 15: NAKOUT Interrupt */ +#define UDPHSEP_INT_BUSYBANK (1 << 18) /* Bit 18: Busy Bank Interrupt */ +#define UDPHSEP_INT_SHRTPCKT (1 << 31) /* Bit 31: Short Packet Send/Short Packet Interrupt */ + +/* UDPHS Endpoint Set Status Register */ + +#define UDPHSEP_SETSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Set */ +#define UDPHSEP_SETSTA_KILLBANK (1 << 9) /* Bit 9: KILL Bank Set (for IN Endpoint) */ +#define UDPHSEP_SETSTA_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready Set */ + +/* UDPHS Endpoint Clear Status Register */ + +#define UDPHSEP_CLRSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Clear */ +#define UDPHSEP_CLRSTA_TOGGLESQ (1 << 6) /* Bit 6: Data Toggle Clear */ +#define UDPHSEP_CLRSTA_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data Clear */ +#define UDPHSEP_CLRSTA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Clear */ +#define UDPHSEP_CLRSTA_RXSETUP (1 << 12) /* Bit 12: Received SETUP Clear */ +#define UDPHSEP_CLRSTA_ERRFLISO (1 << 12) /* Bit 12: Error Flow Clear */ +#define UDPHSEP_CLRSTA_STALL_NT (1 << 13) /* Bit 13: Stall Sent Clear */ +#define UDPHSEP_CLRSTA_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error Clear */ +#define UDPHSEP_CLRSTA_NAKIN (1 << 14) /* Bit 14: NAKIN Clear */ +#define UDPHSEP_CLRSTA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Clear */ +#define UDPHSEP_CLRSTA_NAKOUT (1 << 15) /* Bit 15: NAKOUT Clear */ + +/* UDPHS Endpoint Status Register */ + +#define UDPHSEP_STA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request */ +#define UDPHSEP_STA_TOGGLESQSTA_SHIFT (6) /* Bits 6-7: Toggle Sequencing */ +#define UDPHSEP_STA_TOGGLESQSTA_MASK (3 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) +# define UDPHSEP_STA_TOGGLESQSTA_DATA0 (0 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data0 */ +# define UDPHSEP_STA_TOGGLESQSTA_DATA1 (1 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data1 */ +# define UDPHSEP_STA_TOGGLESQSTA_DATA2 (2 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* Data2 (High B/W Isoc EP) */ +# define UDPHSEP_STA_TOGGLESQSTA_MDATA (3 << UDPHSEP_STA_TOGGLESQSTA_SHIFT) /* MData (High B/W Isoc EP) */ +#define UDPHSEP_STA_ERROVFLW (1 << 8) /* Bit 8: Overflow Error */ +#define UDPHSEP_STA_RXBKRDY (1 << 9) /* Bit 9: Received OUT Data */ +#define UDPHSEP_STA_KILLBANK (1 << 9) /* Bit 9: KILL Bank */ +#define UDPHSEP_STA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete */ +#define UDPHSEP_STA_TXPKRDY (1 << 11) /* Bit 11: TX Packet Ready */ +#define UDPHSEP_STA_ERRTRANS (1 << 11) /* Bit 11: Transaction Error */ +#define UDPHSEP_STA_RXSETUP (1 << 12) /* Bit 12: Received SETUP */ +#define UDPHSEP_STA_ERRFLISO (1 << 12) /* Bit 12: Error Flow */ +#define UDPHSEP_STA_STALLSNT (1 << 13) /* Bit 13: Stall Sent */ +#define UDPHSEP_STA_ERRCRISO (1 << 13) /* Bit 13: CRC ISO Error */ +#define UDPHSEP_STA_ERRNBTRA (1 << 13) /* Bit 13: Number of Transaction Error */ +#define UDPHSEP_STA_NAKIN (1 << 14) /* Bit 14: NAK IN */ +#define UDPHSEP_STA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error */ +#define UDPHSEP_STA_NAKOUT (1 << 15) /* Bit 15: NAK OUT */ +#define UDPHSEP_STA_CURRENTBANK_SHIFT (16) /* Bits 16-17: Current Bank */ +#define UDPHSEP_STA_CURRENTBANK_MASK (3 << UDPHSEP_STA_CURRENTBANK_MASK) +#define UDPHSEP_STA_CONTROLDIR_SHIFT (16) /* Bits 16-17: Control Direction */ +#define UDPHSEP_STA_CONTROLDIR_MASK (3 << UDPHSEP_STA_CONTROLDIR_SHIFT) +#define UDPHSEP_STA_BUSYBANKSTA_SHIFT (18) /* Bits 18-19: Busy Bank Number */ +#define UDPHSEP_STA_BUSYBANKSTA_MASK (3 << UDPHSEP_STA_BUSYBANKSTA_SHIFT) +#define UDPHSEP_STA_BYTECOUNT_SHIFT (20) /* Bits 20-23: UDPHS Byte Count */ +#define UDPHSEP_STA_BYTECOUNT_MASK (15 << UDPHSEP_STA_BYTECOUNT_SHIFT) +#define UDPHSEP_STA_SHRTPCKT (1 << 31) /* Bit 31: Short Packet + +/* UDPHS DMA Channel Control Register */ + +#define UDPHSDMA_CONTROL_CHANNENB (1 << 0) /* Bit 0: Channel Enable Command */ +#define UDPHSDMA_CONTROL_LDNXTDSC (1 << 1) /* Bit 1: Load Next Channel Xfr Desc Enable (Command) */ +#define UDPHSDMA_CONTROL_ENDTREN (1 << 2) /* Bit 2: End of Transfer Enable (Control) */ +#define UDPHSDMA_CONTROL_ENDBEN (1 << 3) /* Bit 3: End of Buffer Enable (Control) */ +#define UDPHSDMA_CONTROL_ENDTRIT (1 << 4) /* Bit 4: End of Transfer Interrupt Enable */ +#define UDPHSDMA_CONTROL_ENDBUFFIT (1 << 5) /* Bit 5: End of Buffer Interrupt Enable */ +#define UDPHSDMA_CONTROL_DESCLDIT (1 << 6) /* Bit 6: Descriptor Loaded Interrupt Enab */ +#define UDPHSDMA_CONTROL_BURSTLCK (1 << 7) /* Bit 7: Burst Lock Ena */ +#define UDPHSDMA_CONTROL_BUFFLENGTH_SHIFT (16) /* Bits 16-31: Buffer Byte Length (Write-only) */ +#define UDPHSDMA_CONTROL_BUFFLENGTH_MASK (0xffff << UDPHSDMA_CONTROL_BUFFLENGTH_SHIFT) + +/* UDPHS DMA Channel Status Register */ + +#define UDPHSDMA_STATUS_CHANNENB (1 << 0) /* Bit 0: Channel Enable Status */ +#define UDPHSDMA_STATUS_CHANNACT (1 << 1) /* Bit 1: Channel Active Status */ +#define UDPHSDMA_STATUS_ENDTRST (1 << 4) /* Bit 4: End of Channel Transfer Status */ +#define UDPHSDMA_STATUS_ENDBFST (1 << 5) /* Bit 5: End of Channel Buffer Status */ +#define UDPHSDMA_STATUS_DESCLDST (1 << 6) /* Bit 6: Descriptor Loaded Status */ +#define UDPHSDMA_STATUS_BUFFCOUNT_SHIFT (16) /* Bits 16-31: Buffer Byte Count */ +#define UDPHSDMA_STATUS_BUFFCOUNT_MASK (0xffff << UDPHSDMA_STATUS_BUFFCOUNT_SHIFT) + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_UDPHS_H */ + diff --git a/nuttx/arch/arm/src/sam3u/sam3u_userspace.c b/nuttx/arch/arm/src/sam3u/sam3u_userspace.c index a62eee7922..e59cc56190 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_userspace.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_userspace.c @@ -2,7 +2,7 @@ * arch/arm/src/common/sam3u_userspace.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_vectors.S b/nuttx/arch/arm/src/sam3u/sam3u_vectors.S index 7e7ad188ee..3ed17f7672 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_vectors.S +++ b/nuttx/arch/arm/src/sam3u/sam3u_vectors.S @@ -3,7 +3,7 @@ * arch/arm/src/chip/sam3u_vectors.S * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/sam3u/sam3u_wdt.h b/nuttx/arch/arm/src/sam3u/sam3u_wdt.h index b885608d7b..50b16d2a85 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_wdt.h +++ b/nuttx/arch/arm/src/sam3u/sam3u_wdt.h @@ -1,96 +1,96 @@ -/**************************************************************************************** - * arch/arm/src/sam3u/sam3u_wdt.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H -#define __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H - -/**************************************************************************************** - * Included Files - ****************************************************************************************/ - -#include - -#include "chip.h" -#include "sam3u_memorymap.h" - -/**************************************************************************************** - * Pre-processor Definitions - ****************************************************************************************/ - -/* WDT register offsets ****************************************************************/ - -#define SAM3U_WDT_CR_OFFSET 0x00 /* Control Register */ -#define SAM3U_WDT_MR_OFFSET 0x04 /* Mode Register */ -#define SAM3U_WDT_SR_OFFSET 0x08 /* Status Register */ - -/* WDT register adresses ***************************************************************/ - -#define SAM3U_WDT_CR (SAM3U_WDT_BASE+SAM3U_WDT_CR_OFFSET) -#define SAM3U_WDT_MR (SAM3U_WDT_BASE+SAM3U_WDT_MR_OFFSET) -#define SAM3U_WDT_SR (SAM3U_WDT_BASE+SAM3U_WDT_SR_OFFSET) - -/* WDT register bit definitions ********************************************************/ - -#define WDT_CR_WDRSTT (1 << 0) /* Bit 0: Watchdog Rest */ -#define WDT_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ -#define WDT_CR_KEY_MASK (0xff << WDT_CR_KEY_SHIFT) - -#define WDT_MR_WDV_SHIFT (0) /* Bits 0-11: Watchdog Counter Value */ -#define WDT_MR_WDV_MASK (0xfff << WDT_MR_WDV_SHIFT) -#define WDT_MR_WDFIEN (1 << 12) /* Bit 12: Watchdog Fault Interrupt Enable */ -#define WDT_MR_WDRSTEN (1 << 13) /* Bit 13: Watchdog Reset Enable */ -#define WDT_MR_WDRPROC (1 << 14) /* Bit 14: Watchdog Reset Processor */ -#define WDT_MR_WDDIS (1 << 15) /* Bit 15: Watchdog Disable */ -#define WDT_MR_WDD_SHIFT (16) /* Bits 16-17: Watchdog Delta Value */ -#define WDT_MR_WDD_MASK (0xfff << WDT_MR_WDD_SHIFT) -#define WDT_MR_WDDBGHLT (1 << 28) /* Bit 28: Watchdog Debug Halt */ -#define WDT_MR_WDIDLEHLT (1 << 29) /* Bit 29: Watchdog Idle Halt */ - -#define WDT_SR_WDUNF (1 << 0) /* Bit 0: Watchdog Underflow */ -#define WDT_SR_WDERR (1 << 1) /* Bit 1: Watchdog Error */ - -/**************************************************************************************** - * Public Types - ****************************************************************************************/ - -/**************************************************************************************** - * Public Data - ****************************************************************************************/ - -/**************************************************************************************** - * Public Functions - ****************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H */ +/**************************************************************************************** + * arch/arm/src/sam3u/sam3u_wdt.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H +#define __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "sam3u_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* WDT register offsets ****************************************************************/ + +#define SAM3U_WDT_CR_OFFSET 0x00 /* Control Register */ +#define SAM3U_WDT_MR_OFFSET 0x04 /* Mode Register */ +#define SAM3U_WDT_SR_OFFSET 0x08 /* Status Register */ + +/* WDT register adresses ***************************************************************/ + +#define SAM3U_WDT_CR (SAM3U_WDT_BASE+SAM3U_WDT_CR_OFFSET) +#define SAM3U_WDT_MR (SAM3U_WDT_BASE+SAM3U_WDT_MR_OFFSET) +#define SAM3U_WDT_SR (SAM3U_WDT_BASE+SAM3U_WDT_SR_OFFSET) + +/* WDT register bit definitions ********************************************************/ + +#define WDT_CR_WDRSTT (1 << 0) /* Bit 0: Watchdog Rest */ +#define WDT_CR_KEY_SHIFT (24) /* Bits 24-31: Password */ +#define WDT_CR_KEY_MASK (0xff << WDT_CR_KEY_SHIFT) + +#define WDT_MR_WDV_SHIFT (0) /* Bits 0-11: Watchdog Counter Value */ +#define WDT_MR_WDV_MASK (0xfff << WDT_MR_WDV_SHIFT) +#define WDT_MR_WDFIEN (1 << 12) /* Bit 12: Watchdog Fault Interrupt Enable */ +#define WDT_MR_WDRSTEN (1 << 13) /* Bit 13: Watchdog Reset Enable */ +#define WDT_MR_WDRPROC (1 << 14) /* Bit 14: Watchdog Reset Processor */ +#define WDT_MR_WDDIS (1 << 15) /* Bit 15: Watchdog Disable */ +#define WDT_MR_WDD_SHIFT (16) /* Bits 16-17: Watchdog Delta Value */ +#define WDT_MR_WDD_MASK (0xfff << WDT_MR_WDD_SHIFT) +#define WDT_MR_WDDBGHLT (1 << 28) /* Bit 28: Watchdog Debug Halt */ +#define WDT_MR_WDIDLEHLT (1 << 29) /* Bit 29: Watchdog Idle Halt */ + +#define WDT_SR_WDUNF (1 << 0) /* Bit 0: Watchdog Underflow */ +#define WDT_SR_WDERR (1 << 1) /* Bit 1: Watchdog Error */ + +/**************************************************************************************** + * Public Types + ****************************************************************************************/ + +/**************************************************************************************** + * Public Data + ****************************************************************************************/ + +/**************************************************************************************** + * Public Functions + ****************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAM3U_SAM3U_WDT_H */ diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h b/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h index 1788bdee08..5bda839a88 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32_bkp.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32_bkp.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_exti.h b/nuttx/arch/arm/src/stm32/chip/stm32_exti.h index 82477db549..5386a260fb 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32_exti.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32_exti.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32_exti.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h index a53c7441cf..36813b5651 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32_memorymap.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h index 18e8435f77..01d6e1ce06 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f100_pinmap.h @@ -4,7 +4,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved. * Copyright (C) 2012 Michael Smith. All Rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h index d0b5a6386b..042f57f74a 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f103re_pinmap.h @@ -3,7 +3,7 @@ * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h index fde8dd9358..7a5ec3381e 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f105vb_pinmap.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h index a7438a70ee..9bbc214798 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f107vc_pinmap.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h index 88eb1ad672..ed1bc26259 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f10xxx_memorymap.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h index c59cd565a2..817e747f71 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f20xxx_pinmap.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h index aa7353ed9d..3a5f8bc6a1 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_gpio.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f40xxx_gpio.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h index fdfa9b3230..a656cfda04 100644 --- a/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h +++ b/nuttx/arch/arm/src/stm32/chip/stm32f40xxx_rtc.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/chip/stm32f40xxx_rtc.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h b/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h index 080f4bec5d..5fb1921866 100644 --- a/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h +++ b/nuttx/arch/arm/src/stm32/stm32_dbgmcu.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_dbgmcu.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.h b/nuttx/arch/arm/src/stm32/stm32_eth.h index 188dc10d36..f0c14b5b1f 100644 --- a/nuttx/arch/arm/src/stm32/stm32_eth.h +++ b/nuttx/arch/arm/src/stm32/stm32_eth.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_eth.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_gpio.h b/nuttx/arch/arm/src/stm32/stm32_gpio.h index 34623c5253..fde564cbbf 100644 --- a/nuttx/arch/arm/src/stm32/stm32_gpio.h +++ b/nuttx/arch/arm/src/stm32/stm32_gpio.h @@ -3,7 +3,7 @@ * * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.h b/nuttx/arch/arm/src/stm32/stm32_i2c.h index 23a06bc051..b914c4247b 100644 --- a/nuttx/arch/arm/src/stm32/stm32_i2c.h +++ b/nuttx/arch/arm/src/stm32/stm32_i2c.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_i2c.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_lowputc.h b/nuttx/arch/arm/src/stm32/stm32_lowputc.h index edcc78d8f1..659de7b1c6 100644 --- a/nuttx/arch/arm/src/stm32/stm32_lowputc.h +++ b/nuttx/arch/arm/src/stm32/stm32_lowputc.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_lowputc.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_pwr.h b/nuttx/arch/arm/src/stm32/stm32_pwr.h index 56aee49b67..7a2751677e 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pwr.h +++ b/nuttx/arch/arm/src/stm32/stm32_pwr.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_pwr.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_spi.h b/nuttx/arch/arm/src/stm32/stm32_spi.h index 268589bf35..6030ddfdd2 100644 --- a/nuttx/arch/arm/src/stm32/stm32_spi.h +++ b/nuttx/arch/arm/src/stm32/stm32_spi.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_spi.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_timerisr.c b/nuttx/arch/arm/src/stm32/stm32_timerisr.c index 93cca02aca..ff64994156 100644 --- a/nuttx/arch/arm/src/stm32/stm32_timerisr.c +++ b/nuttx/arch/arm/src/stm32/stm32_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.h b/nuttx/arch/arm/src/stm32/stm32_usbdev.h index a1af471b25..587107dc8a 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.h +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_usbdev.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/stm32/stm32_wdg.h b/nuttx/arch/arm/src/stm32/stm32_wdg.h index 38af388f92..fbb8128b55 100644 --- a/nuttx/arch/arm/src/stm32/stm32_wdg.h +++ b/nuttx/arch/arm/src/stm32/stm32_wdg.h @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_wdg.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/Make.defs b/nuttx/arch/arm/src/str71x/Make.defs index 4ca4edff41..545ce17352 100644 --- a/nuttx/arch/arm/src/str71x/Make.defs +++ b/nuttx/arch/arm/src/str71x/Make.defs @@ -2,7 +2,7 @@ # arch/arm/src/str71x/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/chip.h b/nuttx/arch/arm/src/str71x/chip.h index 9451419930..af1da9ea86 100644 --- a/nuttx/arch/arm/src/str71x/chip.h +++ b/nuttx/arch/arm/src/str71x/chip.h @@ -2,7 +2,7 @@ * arch/arm/src/str71x/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_adc12.h b/nuttx/arch/arm/src/str71x/str71x_adc12.h index 1f15adfb71..1b982e0b18 100644 --- a/nuttx/arch/arm/src/str71x/str71x_adc12.h +++ b/nuttx/arch/arm/src/str71x/str71x_adc12.h @@ -1,109 +1,109 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_adc12.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H -#define __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* ADC12 registers ******************************************************************/ - -#define STR71X_ADC12_DATA0 (STR71X_ADC12_BASE + 0x0000) /* 16-bits wide */ -#define STR71X_ADC12_DATA1 (STR71X_ADC12_BASE + 0x0008) /* 16-bits wide */ -#define STR71X_ADC12_DATA2 (STR71X_ADC12_BASE + 0x0010) /* 16-bits wide */ -#define STR71X_ADC12_DATA3 (STR71X_ADC12_BASE + 0x0018) /* 16-bits wide */ -#define STR71X_ADC12_CSR (STR71X_ADC12_BASE + 0x0020) /* 16-bits wide */ -#define STR71X_ADC12_CPR (STR71X_ADC12_BASE + 0x0030) /* 16-bits wide */ - -/* Register bit settings ************************************************************/ -/* ADC12 Conversion modes */ - -#define STR71X_ADC12_SINGLE (0) -#define STR71X_ADC12_ROUND (1) - -/* ADC12 Channels */ - -#define STR71X_ADC12_CHANNEL0 (0x00) -#define STR71X_ADC12_CHANNEL1 (0x10) -#define STR71X_ADC12_CHANNEL2 (0x20) -#define STR71X_ADC12_CHANNEL3 (0x30) - -/* ADC12 control status register */ - -#define STR71X_ADC12_DA0 (0x0001) -#define STR71X_ADC12_DA1 (0x0002) -#define STR71X_ADC12_DA2 (0x0004) -#define STR71X_ADC12_DA3 (0x0008) -#define STR71X_ADC12_OR (0x2000) - -/* Interrupt bits for channel n */ - -#define STR71X_ADC12_IT0 (0x0100) -#define STR71X_ADC12_IT1 (0x0200) -#define STR71X_ADC12_IT2 (0x0400) -#define STR71X_ADC12_IT3 (0x0800) -#define STR71X_ADC12_ITALL (0x0f00) - -/* Mode selection */ - -#define STR71X_ADC12_MODE (0x0040) - -/* Converter configuration */ - -#define STR71X_ADC12_START (0x0020) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_adc12.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H +#define __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* ADC12 registers ******************************************************************/ + +#define STR71X_ADC12_DATA0 (STR71X_ADC12_BASE + 0x0000) /* 16-bits wide */ +#define STR71X_ADC12_DATA1 (STR71X_ADC12_BASE + 0x0008) /* 16-bits wide */ +#define STR71X_ADC12_DATA2 (STR71X_ADC12_BASE + 0x0010) /* 16-bits wide */ +#define STR71X_ADC12_DATA3 (STR71X_ADC12_BASE + 0x0018) /* 16-bits wide */ +#define STR71X_ADC12_CSR (STR71X_ADC12_BASE + 0x0020) /* 16-bits wide */ +#define STR71X_ADC12_CPR (STR71X_ADC12_BASE + 0x0030) /* 16-bits wide */ + +/* Register bit settings ************************************************************/ +/* ADC12 Conversion modes */ + +#define STR71X_ADC12_SINGLE (0) +#define STR71X_ADC12_ROUND (1) + +/* ADC12 Channels */ + +#define STR71X_ADC12_CHANNEL0 (0x00) +#define STR71X_ADC12_CHANNEL1 (0x10) +#define STR71X_ADC12_CHANNEL2 (0x20) +#define STR71X_ADC12_CHANNEL3 (0x30) + +/* ADC12 control status register */ + +#define STR71X_ADC12_DA0 (0x0001) +#define STR71X_ADC12_DA1 (0x0002) +#define STR71X_ADC12_DA2 (0x0004) +#define STR71X_ADC12_DA3 (0x0008) +#define STR71X_ADC12_OR (0x2000) + +/* Interrupt bits for channel n */ + +#define STR71X_ADC12_IT0 (0x0100) +#define STR71X_ADC12_IT1 (0x0200) +#define STR71X_ADC12_IT2 (0x0400) +#define STR71X_ADC12_IT3 (0x0800) +#define STR71X_ADC12_ITALL (0x0f00) + +/* Mode selection */ + +#define STR71X_ADC12_MODE (0x0040) + +/* Converter configuration */ + +#define STR71X_ADC12_START (0x0020) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_ADC12_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_apb.h b/nuttx/arch/arm/src/str71x/str71x_apb.h index 4b8efe2a92..5ceee8ec96 100644 --- a/nuttx/arch/arm/src/str71x/str71x_apb.h +++ b/nuttx/arch/arm/src/str71x/str71x_apb.h @@ -1,109 +1,109 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_apb.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_APB_H -#define __ARCH_ARM_SRC_STR71X_STR71X_APB_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* APB register offsets *************************************************************/ - -#define STR71X_APB_CKDIS_OFFSET (0x0010) /* 32-bits wide */ -#define STR71X_APB_SWRES_OFFSET (0x0014) /* 32-bits wide */ - -/* APB register addresses ***********************************************************/ - -#define STR71X_APB1_CKDIS (STR71X_APB1_BASE + STR71X_APB_CKDIS_OFFSET) -#define STR71X_APB1_SWRES (STR71X_APB1_BASE + STR71X_APB_SWRES_OFFSET) - -#define STR71X_APB2_CKDIS (STR71X_APB2_BASE + STR71X_APB_CKDIS_OFFSET) -#define STR71X_APB2_SWRES (STR71X_APB2_BASE + STR71X_APB_SWRES_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* APB1 periperals */ - -#define STR71X_APB1_I2C0 (0x0001) /* Bit 0: I2C0 */ -#define STR71X_APB1_I2C1 (0x0002) /* Bit 1: I2C1 */ -#define STR71X_APB1_UART0 (0x0008) /* Bit 3: UART0 */ -#define STR71X_APB1_UART1 (0x0010) /* Bit 4: UART1 */ -#define STR71X_APB1_UART2 (0x0020) /* Bit 5: UART2 */ -#define STR71X_APB1_UART3 (0x0040) /* Bit 6: UART3 */ -#define STR71X_APB1_USB (0x0080) /* Bit 7: USB */ -#define STR71X_APB1_CAN (0x0100) /* Bit 8: CAN */ -#define STR71X_APB1_BSPI0 (0x0200) /* Bit 9: BSPI0 */ -#define STR71X_APB1_BSPI1 (0x0400) /* Bit 10: BSPI1 */ -#define STR71X_APB1_HDLC (0x2000) /* Bit 13: HDLC */ -#define STR71X_APB1_APB1ALL (0x27fb) - -/* APB2 Peripherals */ - -#define STR71X_APB2_XTI (0x0001) /* Bit 0: XTI */ -#define STR71X_APB2_GPIO0 (0x0004) /* Bit 2: IOPORT0 */ -#define STR71X_APB2_GPIO1 (0x0008) /* Bit 3: IOPORT1 */ -#define STR71X_APB2_GPIO2 (0x0010) /* Bit 4: IOPORT2 */ -#define STR71X_APB2_ADC12 (0x0040) /* Bit 6: ADC */ -#define STR71X_APB2_CKOUT (0x0080) /* Bit 7: CKOUT */ -#define STR71X_APB2_TIM0 (0x0100) /* Bit 8: TIMER0 */ -#define STR71X_APB2_TIM1 (0x0200) /* Bit 9: TIMER1 */ -#define STR71X_APB2_TIM2 (0x0400) /* Bit 10: TIMER2 */ -#define STR71X_APB2_TIM3 (0x0800) /* Bit 11: TIMER3 */ -#define STR71X_APB2_RTC (0x1000) /* Bit 12: RTC */ -#define STR71X_APB2_EIC (0x4000) /* Bit 14: EIC */ -#define STR71X_APB2_APB2ALL (0x5fdd) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_APB_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_apb.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_APB_H +#define __ARCH_ARM_SRC_STR71X_STR71X_APB_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* APB register offsets *************************************************************/ + +#define STR71X_APB_CKDIS_OFFSET (0x0010) /* 32-bits wide */ +#define STR71X_APB_SWRES_OFFSET (0x0014) /* 32-bits wide */ + +/* APB register addresses ***********************************************************/ + +#define STR71X_APB1_CKDIS (STR71X_APB1_BASE + STR71X_APB_CKDIS_OFFSET) +#define STR71X_APB1_SWRES (STR71X_APB1_BASE + STR71X_APB_SWRES_OFFSET) + +#define STR71X_APB2_CKDIS (STR71X_APB2_BASE + STR71X_APB_CKDIS_OFFSET) +#define STR71X_APB2_SWRES (STR71X_APB2_BASE + STR71X_APB_SWRES_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* APB1 periperals */ + +#define STR71X_APB1_I2C0 (0x0001) /* Bit 0: I2C0 */ +#define STR71X_APB1_I2C1 (0x0002) /* Bit 1: I2C1 */ +#define STR71X_APB1_UART0 (0x0008) /* Bit 3: UART0 */ +#define STR71X_APB1_UART1 (0x0010) /* Bit 4: UART1 */ +#define STR71X_APB1_UART2 (0x0020) /* Bit 5: UART2 */ +#define STR71X_APB1_UART3 (0x0040) /* Bit 6: UART3 */ +#define STR71X_APB1_USB (0x0080) /* Bit 7: USB */ +#define STR71X_APB1_CAN (0x0100) /* Bit 8: CAN */ +#define STR71X_APB1_BSPI0 (0x0200) /* Bit 9: BSPI0 */ +#define STR71X_APB1_BSPI1 (0x0400) /* Bit 10: BSPI1 */ +#define STR71X_APB1_HDLC (0x2000) /* Bit 13: HDLC */ +#define STR71X_APB1_APB1ALL (0x27fb) + +/* APB2 Peripherals */ + +#define STR71X_APB2_XTI (0x0001) /* Bit 0: XTI */ +#define STR71X_APB2_GPIO0 (0x0004) /* Bit 2: IOPORT0 */ +#define STR71X_APB2_GPIO1 (0x0008) /* Bit 3: IOPORT1 */ +#define STR71X_APB2_GPIO2 (0x0010) /* Bit 4: IOPORT2 */ +#define STR71X_APB2_ADC12 (0x0040) /* Bit 6: ADC */ +#define STR71X_APB2_CKOUT (0x0080) /* Bit 7: CKOUT */ +#define STR71X_APB2_TIM0 (0x0100) /* Bit 8: TIMER0 */ +#define STR71X_APB2_TIM1 (0x0200) /* Bit 9: TIMER1 */ +#define STR71X_APB2_TIM2 (0x0400) /* Bit 10: TIMER2 */ +#define STR71X_APB2_TIM3 (0x0800) /* Bit 11: TIMER3 */ +#define STR71X_APB2_RTC (0x1000) /* Bit 12: RTC */ +#define STR71X_APB2_EIC (0x4000) /* Bit 14: EIC */ +#define STR71X_APB2_APB2ALL (0x5fdd) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_APB_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_bspi.h b/nuttx/arch/arm/src/str71x/str71x_bspi.h index 537563c3d6..f876ebb2b8 100644 --- a/nuttx/arch/arm/src/str71x/str71x_bspi.h +++ b/nuttx/arch/arm/src/str71x/str71x_bspi.h @@ -1,153 +1,153 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_bspi.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H -#define __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Register Offsets *****************************************************************/ - -#define STR71X_BSPI_RXR_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_BSPI_TXR_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_BSPI_CSR1_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_BSPI_CSR2_OFFSET (0x000c) /* 16-bits wide */ -#define STR71X_BSPI_CLK_OFFSET (0x0010) /* 16-bits wide */ - -/* Registers ************************************************************************/ - -#define STR71X_BSPI_RXR(b) ((b) + STR71X_BSPI_RXR_OFFSET) -#define STR71X_BSPI_TXR(b) ((b) + STR71X_BSPI_TXR_OFFSET) -#define STR71X_BSPI_CSR1(b) ((b) + STR71X_BSPI_CSR1_OFFSET) -#define STR71X_BSPI_CSR2(b) ((b) + STR71X_BSPI_CSR2_OFFSET) -#define STR71X_BSPI_CLK(b) ((b) + STR71X_BSPI_CLK_OFFSET) - -#define STR71X_BSPI0_RXR (STR71X_BSPI0_BASE + STR71X_BSPI_RXR_OFFSET) -#define STR71X_BSPI0_TXR (STR71X_BSPI0_BASE + STR71X_BSPI_TXR_OFFSET) -#define STR71X_BSPI0_CSR1 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR1_OFFSET) -#define STR71X_BSPI0_CSR2 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR2_OFFSET) -#define STR71X_BSPI0_CLK (STR71X_BSPI0_BASE + STR71X_BSPI_CLK_OFFSET) - -#define STR71X_BSPI1_RXR (STR71X_BSPI1_BASE + STR71X_BSPI_RXR_OFFSET) -#define STR71X_BSPI1_TXR (STR71X_BSPI1_BASE + STR71X_BSPI_TXR_OFFSET) -#define STR71X_BSPI1_CSR1 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR1_OFFSET) -#define STR71X_BSPI1_CSR2 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR2_OFFSET) -#define STR71X_BSPI1_CLK (STR71X_BSPI1_BASE + STR71X_BSPI_CLK_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* BSPI control/status register 1 */ - -#define STR71X_BSPICSR1_BSPE (1 << 0) /* Bit 0: BSPI enable */ -#define STR71X_BSPICSR1_MSTR (1 << 1) /* Bit 1: Master/Slave select */ -#define STR71X_BSPICSR1_RIESHIFT 2 /* Bit 2-3: BSPI receive interrupt enable */ -#define STR71X_BSPICSR1_RIEMASK (3 << STR71X_BSPICSR1_RIESHIFT) -#define STR71X_BSPICSR1_RIEDISABLED (0 << STR71X_BSPICSR1_RIESHIFT) /* Disabled */ -#define STR71X_BSPICSR1_RIERFNE (1 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO not empty */ -#define STR71X_BSPICSR1_RIERFF (3 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO full */ -#define STR71X_BSPICSR1_REIE (1 << 4) /* Bit 4: Receive error interrupt enable */ -#define STR71X_BSPICSR1_BEIE (1 << 7) /* Bit 7: Bus error interrupt enable */ -#define STR71X_BSPICSR1_CPOL (1 << 8) /* Bit 8: Clock polarity select */ -#define STR71X_BSPICSR1_CPHA (1 << 9) /* Bit 9: Clock phase select */ -#define STR71X_BSPICSR1_WLSHIFT 10 /* Bits 10-11: Word length */ -#define STR71X_BSPICSR1_WLMASK (3 << STR71X_BSPICSR1_WLSHIFT) -#define STR71X_BSPICSR1_WL8BIT (0 << STR71X_BSPICSR1_WLSHIFT) /* 8-bits */ -#define STR71X_BSPICSR1_WL16BIT (1 << STR71X_BSPICSR1_WLSHIFT) /* 16-bits */ -#define STR71X_BSPICSR1_RFESHIFT 12 /* Bits 12-15: Receive FIFO enable */ -#define STR71X_BSPICSR1_RFEMASK (15 << STR71X_BSPICSR1_RFESHIFT) -#define STR71X_BSPICSR1_RFE1 (0 << STR71X_BSPICSR1_RFESHIFT) /* Word 1 enabled */ -#define STR71X_BSPICSR1_RFE12 (1 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-2 enabled */ -#define STR71X_BSPICSR1_RFE13 (2 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-3 enabled */ -#define STR71X_BSPICSR1_RFE14 (3 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-4 enabled */ -#define STR71X_BSPICSR1_RFE15 (4 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-5 enabled */ -#define STR71X_BSPICSR1_RFE16 (5 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-6 enabled */ -#define STR71X_BSPICSR1_RFE17 (6 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-7 enabled */ -#define STR71X_BSPICSR1_RFE18 (7 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-8 enabled */ -#define STR71X_BSPICSR1_RFE19 (8 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-9 enabled */ -#define STR71X_BSPICSR1_RFE110 (9 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-10 enabled */ - -/* BSPI control/status register 2 */ - -#define STR71X_BSPICSR2_DFIFO (1 << 0) /* Bit 0: FIFO disable */ -#define STR71X_BSPICSR2_BERR (1 << 2) /* Bit 2: Bus error */ -#define STR71X_BSPICSR2_RFNE (1 << 3) /* Bit 3: Receiver FIFO not empty */ -#define STR71X_BSPICSR2_RFF (1 << 4) /* Bit 4: Receiver FIFO full */ -#define STR71X_BSPICSR2_ROFL (1 << 5) /* Bit 5: Receiver overflow */ -#define STR71X_BSPICSR2_TFE (1 << 6) /* Bit 6: Transmit FIFO empty */ -#define STR71X_BSPICSR2_TUFL (1 << 7) /* Bit 7: Transmit FIFO underflow */ -#define STR71X_BSPICSR2_TFF (1 << 8) /* Bit 8: Transmit FIFO full */ -#define STR71X_BSPICSR2_TFNE (1 << 9) /* Bit 9: Transmit FIFO not empty */ -#define STR71X_BSPICSR2_TFESHIFT 10 /* Bits 10-13: Transmit FIFO enable*/ -#define STR71X_BSPICSR2_TFEMASK (15 << STR71X_BSPICSR2_TFESHIFT) -#define STR71X_BSPICSR2_TFE1 (0 << STR71X_BSPICSR2_TFESHIFT) /* Word 1 enabled */ -#define STR71X_BSPICSR2_TFE12 (1 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-2 enabled */ -#define STR71X_BSPICSR2_TFE13 (2 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-3 enabled */ -#define STR71X_BSPICSR2_TFE14 (3 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-4 enabled */ -#define STR71X_BSPICSR2_TFE15 (4 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-5 enabled */ -#define STR71X_BSPICSR2_TFE16 (5 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-6 enabled */ -#define STR71X_BSPICSR2_TFE17 (6 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-7 enabled */ -#define STR71X_BSPICSR2_TFE18 (7 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-8 enabled */ -#define STR71X_BSPICSR2_TFE19 (8 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-9 enabled */ -#define STR71X_BSPICSR2_TFE110 (9 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-10 enabled */ -#define STR71X_BSPICSR2_TIESHIFT 14 /* Bit 14-15: BSPI transmit interrupt enable */ -#define STR71X_BSPICSR2_TIEMASK (3 << STR71X_BSPICSR2_TIESHIFT) -#define STR71X_BSPICSR2_TIEDISABLED (0 << STR71X_BSPICSR2_TIESHIFT) /* Disabled */ -#define STR71X_BSPICSR2_TIETFE (1 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO empty */ -#define STR71X_BSPICSR2_TIETUFL (2 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit underlow */ -#define STR71X_BSPICSR2_TIETFF (3 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO full */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_bspi.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H +#define __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Register Offsets *****************************************************************/ + +#define STR71X_BSPI_RXR_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_BSPI_TXR_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_BSPI_CSR1_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_BSPI_CSR2_OFFSET (0x000c) /* 16-bits wide */ +#define STR71X_BSPI_CLK_OFFSET (0x0010) /* 16-bits wide */ + +/* Registers ************************************************************************/ + +#define STR71X_BSPI_RXR(b) ((b) + STR71X_BSPI_RXR_OFFSET) +#define STR71X_BSPI_TXR(b) ((b) + STR71X_BSPI_TXR_OFFSET) +#define STR71X_BSPI_CSR1(b) ((b) + STR71X_BSPI_CSR1_OFFSET) +#define STR71X_BSPI_CSR2(b) ((b) + STR71X_BSPI_CSR2_OFFSET) +#define STR71X_BSPI_CLK(b) ((b) + STR71X_BSPI_CLK_OFFSET) + +#define STR71X_BSPI0_RXR (STR71X_BSPI0_BASE + STR71X_BSPI_RXR_OFFSET) +#define STR71X_BSPI0_TXR (STR71X_BSPI0_BASE + STR71X_BSPI_TXR_OFFSET) +#define STR71X_BSPI0_CSR1 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR1_OFFSET) +#define STR71X_BSPI0_CSR2 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR2_OFFSET) +#define STR71X_BSPI0_CLK (STR71X_BSPI0_BASE + STR71X_BSPI_CLK_OFFSET) + +#define STR71X_BSPI1_RXR (STR71X_BSPI1_BASE + STR71X_BSPI_RXR_OFFSET) +#define STR71X_BSPI1_TXR (STR71X_BSPI1_BASE + STR71X_BSPI_TXR_OFFSET) +#define STR71X_BSPI1_CSR1 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR1_OFFSET) +#define STR71X_BSPI1_CSR2 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR2_OFFSET) +#define STR71X_BSPI1_CLK (STR71X_BSPI1_BASE + STR71X_BSPI_CLK_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* BSPI control/status register 1 */ + +#define STR71X_BSPICSR1_BSPE (1 << 0) /* Bit 0: BSPI enable */ +#define STR71X_BSPICSR1_MSTR (1 << 1) /* Bit 1: Master/Slave select */ +#define STR71X_BSPICSR1_RIESHIFT 2 /* Bit 2-3: BSPI receive interrupt enable */ +#define STR71X_BSPICSR1_RIEMASK (3 << STR71X_BSPICSR1_RIESHIFT) +#define STR71X_BSPICSR1_RIEDISABLED (0 << STR71X_BSPICSR1_RIESHIFT) /* Disabled */ +#define STR71X_BSPICSR1_RIERFNE (1 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO not empty */ +#define STR71X_BSPICSR1_RIERFF (3 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO full */ +#define STR71X_BSPICSR1_REIE (1 << 4) /* Bit 4: Receive error interrupt enable */ +#define STR71X_BSPICSR1_BEIE (1 << 7) /* Bit 7: Bus error interrupt enable */ +#define STR71X_BSPICSR1_CPOL (1 << 8) /* Bit 8: Clock polarity select */ +#define STR71X_BSPICSR1_CPHA (1 << 9) /* Bit 9: Clock phase select */ +#define STR71X_BSPICSR1_WLSHIFT 10 /* Bits 10-11: Word length */ +#define STR71X_BSPICSR1_WLMASK (3 << STR71X_BSPICSR1_WLSHIFT) +#define STR71X_BSPICSR1_WL8BIT (0 << STR71X_BSPICSR1_WLSHIFT) /* 8-bits */ +#define STR71X_BSPICSR1_WL16BIT (1 << STR71X_BSPICSR1_WLSHIFT) /* 16-bits */ +#define STR71X_BSPICSR1_RFESHIFT 12 /* Bits 12-15: Receive FIFO enable */ +#define STR71X_BSPICSR1_RFEMASK (15 << STR71X_BSPICSR1_RFESHIFT) +#define STR71X_BSPICSR1_RFE1 (0 << STR71X_BSPICSR1_RFESHIFT) /* Word 1 enabled */ +#define STR71X_BSPICSR1_RFE12 (1 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-2 enabled */ +#define STR71X_BSPICSR1_RFE13 (2 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-3 enabled */ +#define STR71X_BSPICSR1_RFE14 (3 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-4 enabled */ +#define STR71X_BSPICSR1_RFE15 (4 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-5 enabled */ +#define STR71X_BSPICSR1_RFE16 (5 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-6 enabled */ +#define STR71X_BSPICSR1_RFE17 (6 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-7 enabled */ +#define STR71X_BSPICSR1_RFE18 (7 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-8 enabled */ +#define STR71X_BSPICSR1_RFE19 (8 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-9 enabled */ +#define STR71X_BSPICSR1_RFE110 (9 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-10 enabled */ + +/* BSPI control/status register 2 */ + +#define STR71X_BSPICSR2_DFIFO (1 << 0) /* Bit 0: FIFO disable */ +#define STR71X_BSPICSR2_BERR (1 << 2) /* Bit 2: Bus error */ +#define STR71X_BSPICSR2_RFNE (1 << 3) /* Bit 3: Receiver FIFO not empty */ +#define STR71X_BSPICSR2_RFF (1 << 4) /* Bit 4: Receiver FIFO full */ +#define STR71X_BSPICSR2_ROFL (1 << 5) /* Bit 5: Receiver overflow */ +#define STR71X_BSPICSR2_TFE (1 << 6) /* Bit 6: Transmit FIFO empty */ +#define STR71X_BSPICSR2_TUFL (1 << 7) /* Bit 7: Transmit FIFO underflow */ +#define STR71X_BSPICSR2_TFF (1 << 8) /* Bit 8: Transmit FIFO full */ +#define STR71X_BSPICSR2_TFNE (1 << 9) /* Bit 9: Transmit FIFO not empty */ +#define STR71X_BSPICSR2_TFESHIFT 10 /* Bits 10-13: Transmit FIFO enable*/ +#define STR71X_BSPICSR2_TFEMASK (15 << STR71X_BSPICSR2_TFESHIFT) +#define STR71X_BSPICSR2_TFE1 (0 << STR71X_BSPICSR2_TFESHIFT) /* Word 1 enabled */ +#define STR71X_BSPICSR2_TFE12 (1 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-2 enabled */ +#define STR71X_BSPICSR2_TFE13 (2 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-3 enabled */ +#define STR71X_BSPICSR2_TFE14 (3 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-4 enabled */ +#define STR71X_BSPICSR2_TFE15 (4 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-5 enabled */ +#define STR71X_BSPICSR2_TFE16 (5 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-6 enabled */ +#define STR71X_BSPICSR2_TFE17 (6 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-7 enabled */ +#define STR71X_BSPICSR2_TFE18 (7 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-8 enabled */ +#define STR71X_BSPICSR2_TFE19 (8 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-9 enabled */ +#define STR71X_BSPICSR2_TFE110 (9 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-10 enabled */ +#define STR71X_BSPICSR2_TIESHIFT 14 /* Bit 14-15: BSPI transmit interrupt enable */ +#define STR71X_BSPICSR2_TIEMASK (3 << STR71X_BSPICSR2_TIESHIFT) +#define STR71X_BSPICSR2_TIEDISABLED (0 << STR71X_BSPICSR2_TIESHIFT) /* Disabled */ +#define STR71X_BSPICSR2_TIETFE (1 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO empty */ +#define STR71X_BSPICSR2_TIETUFL (2 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit underlow */ +#define STR71X_BSPICSR2_TIETFF (3 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO full */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_can.h b/nuttx/arch/arm/src/str71x/str71x_can.h index a38630d660..a891b60dc6 100644 --- a/nuttx/arch/arm/src/str71x/str71x_can.h +++ b/nuttx/arch/arm/src/str71x/str71x_can.h @@ -1,207 +1,207 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_can.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_CAN_H -#define __ARCH_ARM_SRC_STR71X_STR71X_CAN_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Registers ************************************************************************/ - -#define STR71X_CAN_CR (STR71X_CAN_BASE + 0x0000) /* 16-bits wide */ -#define STR71X_CAN_SR (STR71X_CAN_BASE + 0x0004) /* 16-bits wide */ -#define STR71X_CAN_ERR (STR71X_CAN_BASE + 0x0008) /* 16-bits wide */ -#define STR71X_CAN_BTR (STR71X_CAN_BASE + 0x000c) /* 16-bits wide */ -#define STR71X_CAN_IDR (STR71X_CAN_BASE + 0x0010) /* 16-bits wide */ -#define STR71X_CAN_TESTR (STR71X_CAN_BASE + 0x0014) /* 16-bits wide */ -#define STR71X_CAN_BRPR (STR71X_CAN_BASE + 0x0018) /* 16-bits wide */ - -#define STR71X_CAN_IF1BASE (STR71X_CAN_BASE + 0x0020) -#define STR71X_CAN_IF2BASE (STR71X_CAN_BASE + 0x0080) - -#define STR71X_CAN_CRR_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_CAN_CMR_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_CAN_M1R_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_CAN_M2R_OFFSET (0x000c) /* 16-bits wide */ -#define STR71X_CAN_A1R_OFFSET (0x0010) /* 16-bits wide */ -#define STR71X_CAN_A2R_OFFSET (0x0014) /* 16-bits wide */ -#define STR71X_CAN_MCR_OFFSET (0x0018) /* 16-bits wide */ -#define STR71X_CAN_DA1R_OFFSET (0x001c) /* 16-bits wide */ -#define STR71X_CAN_DA2R_OFFSET (0x0020) /* 16-bits wide */ -#define STR71X_CAN_DB1R_OFFSET (0x0024) /* 16-bits wide */ -#define STR71X_CAN_DB2R_OFFSET (0x0028) /* 16-bits wide */ - -#define STR71X_CAN_CRR(b) ((b) + STR71X_CAN_CRR_OFFSET) -#define STR71X_CAN_CMR(b) ((b) + STR71X_CAN_CMR_OFFSET) -#define STR71X_CAN_M1R(b) ((b) + STR71X_CAN_M1R_OFFSET) -#define STR71X_CAN_M2R(b) ((b) + STR71X_CAN_M2R_OFFSET) -#define STR71X_CAN_A1R(b) ((b) + STR71X_CAN_A1R_OFFSET) -#define STR71X_CAN_A2R(b) ((b) + STR71X_CAN_A2R_OFFSET) -#define STR71X_CAN_MCR(b) ((b) + STR71X_CAN_MCR_OFFSET) -#define STR71X_CAN_DA1R(b) ((b) + STR71X_CAN_DA1R_OFFSET) -#define STR71X_CAN_DA2R(b) ((b) + STR71X_CAN_DA2R_OFFSET) -#define STR71X_CAN_DB1R(b) ((b) + STR71X_CAN_DB1R_OFFSET) -#define STR71X_CAN_DB2R(b) ((b) + STR71X_CAN_DB2R_OFFSET) - -#define STR71X_CAN_IF1CRR (STR71X_CAN_IF1BASE + STR71X_CAN_CRR_OFFSET) -#define STR71X_CAN_IF1CMR (STR71X_CAN_IF1BASE + STR71X_CAN_CMR_OFFSET) -#define STR71X_CAN_IF1M1R (STR71X_CAN_IF1BASE + STR71X_CAN_M1R_OFFSET) -#define STR71X_CAN_IF1M2R (STR71X_CAN_IF1BASE + STR71X_CAN_M2R_OFFSET) -#define STR71X_CAN_IF1A1R (STR71X_CAN_IF1BASE + STR71X_CAN_A1R_OFFSET) -#define STR71X_CAN_IF1A2R (STR71X_CAN_IF1BASE + STR71X_CAN_A2R_OFFSET) -#define STR71X_CAN_IF1MCR (STR71X_CAN_IF1BASE + STR71X_CAN_MCR_OFFSET) -#define STR71X_CAN_IF1DA1R (STR71X_CAN_IF1BASE + STR71X_CAN_DA1R_OFFSET) -#define STR71X_CAN_IF1DA2R (STR71X_CAN_IF1BASE + STR71X_CAN_DA2R_OFFSET) -#define STR71X_CAN_IF1DB1R (STR71X_CAN_IF1BASE + STR71X_CAN_DB1R_OFFSET) -#define STR71X_CAN_IF1DB2R (STR71X_CAN_IF1BASE + STR71X_CAN_DB2R_OFFSET) - -#define STR71X_CAN_IF2CRR (STR71X_CAN_IF2BASE + STR71X_CAN_CRR_OFFSET) -#define STR71X_CAN_IF2CMR (STR71X_CAN_IF2BASE + STR71X_CAN_CMR_OFFSET) -#define STR71X_CAN_IF2M1R (STR71X_CAN_IF2BASE + STR71X_CAN_M1R_OFFSET) -#define STR71X_CAN_IF2M2R (STR71X_CAN_IF2BASE + STR71X_CAN_M2R_OFFSET) -#define STR71X_CAN_IF2A1R (STR71X_CAN_IF2BASE + STR71X_CAN_A1R_OFFSET) -#define STR71X_CAN_IF2A2R (STR71X_CAN_IF2BASE + STR71X_CAN_A2R_OFFSET) -#define STR71X_CAN_IF2MCR (STR71X_CAN_IF2BASE + STR71X_CAN_MCR_OFFSET) -#define STR71X_CAN_IF2DA1R (STR71X_CAN_IF2BASE + STR71X_CAN_DA1R_OFFSET) -#define STR71X_CAN_IF2DA2R (STR71X_CAN_IF2BASE + STR71X_CAN_DA2R_OFFSET) -#define STR71X_CAN_IF2DB1R (STR71X_CAN_IF2BASE + STR71X_CAN_DB1R_OFFSET) -#define STR71X_CAN_IF2DB2R (STR71X_CAN_IF2BASE + STR71X_CAN_DB2R_OFFSET) - -#define STR71X_CAN_TR1R (STR71X_CAN_BASE + 0x0100) /* 16-bits wide */ -#define STR71X_CAN_TR2R (STR71X_CAN_BASE + 0x0104) /* 16-bits wide */ -#define STR71X_CAN_ND1R (STR71X_CAN_BASE + 0x0120) /* 16-bits wide */ -#define STR71X_CAN_ND2R (STR71X_CAN_BASE + 0x0124) /* 16-bits wide */ -#define STR71X_CAN_IP1R (STR71X_CAN_BASE + 0x0140) /* 16-bits wide */ -#define STR71X_CAN_IP2R (STR71X_CAN_BASE + 0x0144) /* 16-bits wide */ -#define STR71X_CAN_MV1R (STR71X_CAN_BASE + 0x0160) /* 16-bits wide */ -#define STR71X_CAN_MV2R (STR71X_CAN_BASE + 0x0164) /* 16-bits wide */ - -/* Register bit settings ***********************************************************/ - -/* Control register */ - -#define STR41X_CANCR_INIT (0x0001) -#define STR41X_CANCR_IE (0x0002) -#define STR41X_CANCR_SIE (0x0004) -#define STR41X_CANCR_EIE (0x0008) -#define STR41X_CANCR_DAR (0x0020) -#define STR41X_CANCR_CCE (0x0040) -#define STR41X_CANCR_TEST (0x0080) - -/* Status register */ - -#define STR41X_CANSR_LEC (0x0007) -#define STR41X_CANSR_TXOK (0x0008) -#define STR41X_CANSR_RXOK (0x0010) -#define STR41X_CANSR_EPASS (0x0020) -#define STR41X_CANSR_EWARN (0x0040) -#define STR41X_CANSR_BOFF (0x0080) - -/* Test register */ - -#define STR41X_CANTESTR_BASIC (0x0004) -#define STR41X_CANTESTR_SILENT (0x0008) -#define STR41X_CANTESTR_LBACK (0x0010) -#define STR41X_CANTESTR_TX0 (0x0020) -#define STR41X_CANTESTR_TX1 (0x0040) -#define STR41X_CANTESTR_RX (0x0080) - -/* IFn / Command Request register */ - -#define STR41X_CANCRR_BUSY (0x8000) - -/* IFn / Command Mask register */ - -#define STR41X_CANCMR_DATAB (0x0001) -#define STR41X_CANCMR_DATAA (0x0002) -#define STR41X_CANCMR_TXRQST (0x0004) -#define STR41X_CANCMR_CLRINTPND (0x0008) -#define STR41X_CANCMR_CONTROL (0x0010) -#define STR41X_CANCMR_ARB (0x0020) -#define STR41X_CANCMR_MASK (0x0040) -#define STR41X_CANCMR_WRRD (0x0080) - -/* IFn / Mask 2 register */ - -#define STR41X_CANM2R_MXTD (0x8000) -#define STR41X_CANM2R_MDIR (0x4000) - -/* IFn / Arbitration 2 register */ - -#define STR41X_CANA2R_DIR (0x2000) -#define STR41X_CANA2R_XTD (0x4000) -#define STR41X_CANA2R_MSGVAL (0x8000) - -/* IFn / Message Control register */ - -#define STR41X_CANMCR_EOB (0x0080) -#define STR41X_CANMCR_TXRQST (0x0100) -#define STR41X_CANMCR_RMTEN (0x0200) -#define STR41X_CANMCR_RXIE (0x0400) -#define STR41X_CANMCR_TXIE (0x0800) -#define STR41X_CANMCR_UMASK (0x1000) -#define STR41X_CANMCR_INTPND (0x2000) -#define STR41X_CANMCR_MSGLST (0x4000) -#define STR41X_CANMCR_NEWDAT (0x8000) - -/* Message ID limits */ - -#define STR41X_CAN_LASTSTDID ((1 << 11) - 1) -#define STR41X_CAN_LASTEXTID ((1 << 29) - 1) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_CAN_H */ - +/************************************************************************************ + * arch/arm/src/str71x/str71x_can.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_CAN_H +#define __ARCH_ARM_SRC_STR71X_STR71X_CAN_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Registers ************************************************************************/ + +#define STR71X_CAN_CR (STR71X_CAN_BASE + 0x0000) /* 16-bits wide */ +#define STR71X_CAN_SR (STR71X_CAN_BASE + 0x0004) /* 16-bits wide */ +#define STR71X_CAN_ERR (STR71X_CAN_BASE + 0x0008) /* 16-bits wide */ +#define STR71X_CAN_BTR (STR71X_CAN_BASE + 0x000c) /* 16-bits wide */ +#define STR71X_CAN_IDR (STR71X_CAN_BASE + 0x0010) /* 16-bits wide */ +#define STR71X_CAN_TESTR (STR71X_CAN_BASE + 0x0014) /* 16-bits wide */ +#define STR71X_CAN_BRPR (STR71X_CAN_BASE + 0x0018) /* 16-bits wide */ + +#define STR71X_CAN_IF1BASE (STR71X_CAN_BASE + 0x0020) +#define STR71X_CAN_IF2BASE (STR71X_CAN_BASE + 0x0080) + +#define STR71X_CAN_CRR_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_CAN_CMR_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_CAN_M1R_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_CAN_M2R_OFFSET (0x000c) /* 16-bits wide */ +#define STR71X_CAN_A1R_OFFSET (0x0010) /* 16-bits wide */ +#define STR71X_CAN_A2R_OFFSET (0x0014) /* 16-bits wide */ +#define STR71X_CAN_MCR_OFFSET (0x0018) /* 16-bits wide */ +#define STR71X_CAN_DA1R_OFFSET (0x001c) /* 16-bits wide */ +#define STR71X_CAN_DA2R_OFFSET (0x0020) /* 16-bits wide */ +#define STR71X_CAN_DB1R_OFFSET (0x0024) /* 16-bits wide */ +#define STR71X_CAN_DB2R_OFFSET (0x0028) /* 16-bits wide */ + +#define STR71X_CAN_CRR(b) ((b) + STR71X_CAN_CRR_OFFSET) +#define STR71X_CAN_CMR(b) ((b) + STR71X_CAN_CMR_OFFSET) +#define STR71X_CAN_M1R(b) ((b) + STR71X_CAN_M1R_OFFSET) +#define STR71X_CAN_M2R(b) ((b) + STR71X_CAN_M2R_OFFSET) +#define STR71X_CAN_A1R(b) ((b) + STR71X_CAN_A1R_OFFSET) +#define STR71X_CAN_A2R(b) ((b) + STR71X_CAN_A2R_OFFSET) +#define STR71X_CAN_MCR(b) ((b) + STR71X_CAN_MCR_OFFSET) +#define STR71X_CAN_DA1R(b) ((b) + STR71X_CAN_DA1R_OFFSET) +#define STR71X_CAN_DA2R(b) ((b) + STR71X_CAN_DA2R_OFFSET) +#define STR71X_CAN_DB1R(b) ((b) + STR71X_CAN_DB1R_OFFSET) +#define STR71X_CAN_DB2R(b) ((b) + STR71X_CAN_DB2R_OFFSET) + +#define STR71X_CAN_IF1CRR (STR71X_CAN_IF1BASE + STR71X_CAN_CRR_OFFSET) +#define STR71X_CAN_IF1CMR (STR71X_CAN_IF1BASE + STR71X_CAN_CMR_OFFSET) +#define STR71X_CAN_IF1M1R (STR71X_CAN_IF1BASE + STR71X_CAN_M1R_OFFSET) +#define STR71X_CAN_IF1M2R (STR71X_CAN_IF1BASE + STR71X_CAN_M2R_OFFSET) +#define STR71X_CAN_IF1A1R (STR71X_CAN_IF1BASE + STR71X_CAN_A1R_OFFSET) +#define STR71X_CAN_IF1A2R (STR71X_CAN_IF1BASE + STR71X_CAN_A2R_OFFSET) +#define STR71X_CAN_IF1MCR (STR71X_CAN_IF1BASE + STR71X_CAN_MCR_OFFSET) +#define STR71X_CAN_IF1DA1R (STR71X_CAN_IF1BASE + STR71X_CAN_DA1R_OFFSET) +#define STR71X_CAN_IF1DA2R (STR71X_CAN_IF1BASE + STR71X_CAN_DA2R_OFFSET) +#define STR71X_CAN_IF1DB1R (STR71X_CAN_IF1BASE + STR71X_CAN_DB1R_OFFSET) +#define STR71X_CAN_IF1DB2R (STR71X_CAN_IF1BASE + STR71X_CAN_DB2R_OFFSET) + +#define STR71X_CAN_IF2CRR (STR71X_CAN_IF2BASE + STR71X_CAN_CRR_OFFSET) +#define STR71X_CAN_IF2CMR (STR71X_CAN_IF2BASE + STR71X_CAN_CMR_OFFSET) +#define STR71X_CAN_IF2M1R (STR71X_CAN_IF2BASE + STR71X_CAN_M1R_OFFSET) +#define STR71X_CAN_IF2M2R (STR71X_CAN_IF2BASE + STR71X_CAN_M2R_OFFSET) +#define STR71X_CAN_IF2A1R (STR71X_CAN_IF2BASE + STR71X_CAN_A1R_OFFSET) +#define STR71X_CAN_IF2A2R (STR71X_CAN_IF2BASE + STR71X_CAN_A2R_OFFSET) +#define STR71X_CAN_IF2MCR (STR71X_CAN_IF2BASE + STR71X_CAN_MCR_OFFSET) +#define STR71X_CAN_IF2DA1R (STR71X_CAN_IF2BASE + STR71X_CAN_DA1R_OFFSET) +#define STR71X_CAN_IF2DA2R (STR71X_CAN_IF2BASE + STR71X_CAN_DA2R_OFFSET) +#define STR71X_CAN_IF2DB1R (STR71X_CAN_IF2BASE + STR71X_CAN_DB1R_OFFSET) +#define STR71X_CAN_IF2DB2R (STR71X_CAN_IF2BASE + STR71X_CAN_DB2R_OFFSET) + +#define STR71X_CAN_TR1R (STR71X_CAN_BASE + 0x0100) /* 16-bits wide */ +#define STR71X_CAN_TR2R (STR71X_CAN_BASE + 0x0104) /* 16-bits wide */ +#define STR71X_CAN_ND1R (STR71X_CAN_BASE + 0x0120) /* 16-bits wide */ +#define STR71X_CAN_ND2R (STR71X_CAN_BASE + 0x0124) /* 16-bits wide */ +#define STR71X_CAN_IP1R (STR71X_CAN_BASE + 0x0140) /* 16-bits wide */ +#define STR71X_CAN_IP2R (STR71X_CAN_BASE + 0x0144) /* 16-bits wide */ +#define STR71X_CAN_MV1R (STR71X_CAN_BASE + 0x0160) /* 16-bits wide */ +#define STR71X_CAN_MV2R (STR71X_CAN_BASE + 0x0164) /* 16-bits wide */ + +/* Register bit settings ***********************************************************/ + +/* Control register */ + +#define STR41X_CANCR_INIT (0x0001) +#define STR41X_CANCR_IE (0x0002) +#define STR41X_CANCR_SIE (0x0004) +#define STR41X_CANCR_EIE (0x0008) +#define STR41X_CANCR_DAR (0x0020) +#define STR41X_CANCR_CCE (0x0040) +#define STR41X_CANCR_TEST (0x0080) + +/* Status register */ + +#define STR41X_CANSR_LEC (0x0007) +#define STR41X_CANSR_TXOK (0x0008) +#define STR41X_CANSR_RXOK (0x0010) +#define STR41X_CANSR_EPASS (0x0020) +#define STR41X_CANSR_EWARN (0x0040) +#define STR41X_CANSR_BOFF (0x0080) + +/* Test register */ + +#define STR41X_CANTESTR_BASIC (0x0004) +#define STR41X_CANTESTR_SILENT (0x0008) +#define STR41X_CANTESTR_LBACK (0x0010) +#define STR41X_CANTESTR_TX0 (0x0020) +#define STR41X_CANTESTR_TX1 (0x0040) +#define STR41X_CANTESTR_RX (0x0080) + +/* IFn / Command Request register */ + +#define STR41X_CANCRR_BUSY (0x8000) + +/* IFn / Command Mask register */ + +#define STR41X_CANCMR_DATAB (0x0001) +#define STR41X_CANCMR_DATAA (0x0002) +#define STR41X_CANCMR_TXRQST (0x0004) +#define STR41X_CANCMR_CLRINTPND (0x0008) +#define STR41X_CANCMR_CONTROL (0x0010) +#define STR41X_CANCMR_ARB (0x0020) +#define STR41X_CANCMR_MASK (0x0040) +#define STR41X_CANCMR_WRRD (0x0080) + +/* IFn / Mask 2 register */ + +#define STR41X_CANM2R_MXTD (0x8000) +#define STR41X_CANM2R_MDIR (0x4000) + +/* IFn / Arbitration 2 register */ + +#define STR41X_CANA2R_DIR (0x2000) +#define STR41X_CANA2R_XTD (0x4000) +#define STR41X_CANA2R_MSGVAL (0x8000) + +/* IFn / Message Control register */ + +#define STR41X_CANMCR_EOB (0x0080) +#define STR41X_CANMCR_TXRQST (0x0100) +#define STR41X_CANMCR_RMTEN (0x0200) +#define STR41X_CANMCR_RXIE (0x0400) +#define STR41X_CANMCR_TXIE (0x0800) +#define STR41X_CANMCR_UMASK (0x1000) +#define STR41X_CANMCR_INTPND (0x2000) +#define STR41X_CANMCR_MSGLST (0x4000) +#define STR41X_CANMCR_NEWDAT (0x8000) + +/* Message ID limits */ + +#define STR41X_CAN_LASTSTDID ((1 << 11) - 1) +#define STR41X_CAN_LASTEXTID ((1 << 29) - 1) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_CAN_H */ + diff --git a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c index 8a24ea44d7..326abd763a 100644 --- a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c +++ b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c @@ -2,7 +2,7 @@ * arch/arm/src/str71x/str71x_decodeirq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_eic.h b/nuttx/arch/arm/src/str71x/str71x_eic.h index 7b0301695a..c45cfaa6bc 100644 --- a/nuttx/arch/arm/src/str71x/str71x_eic.h +++ b/nuttx/arch/arm/src/str71x/str71x_eic.h @@ -1,176 +1,176 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_eic.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_EIC_H -#define __ARCH_ARM_SRC_STR71X_STR71X_EIC_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Enhanced Interupt Controller (EIC) register offsets ******************************/ - -#define STR71X_EIC_ICR_OFFSET (0x0000) /* 32-bits wide */ -#define STR71X_EIC_CICR_OFFSET (0x0004) /* 32-bits wide */ -#define STR71X_EIC_CIPR_OFFSET (0x0008) /* 32-bits wide */ -#define STR71X_EIC_IVR_OFFSET (0x0018) /* 32-bits wide */ -#define STR71X_EIC_FIR_OFFSET (0x001c) /* 32-bits wide */ -#define STR71X_EIC_IER_OFFSET (0x0020) /* 32-bits wide */ -#define STR71X_EIC_IPR_OFFSET (0x0040) /* 32-bits wide */ - -#define STR71X_EIC_SIR_OFFSET (0x0060) /* 32 x 32-bits */ -#define STR71X_EIC_SIR0_OFFSET (0x0060) /* 32-bits wide */ -#define STR71X_EIC_SIR1_OFFSET (0x0064) /* 32-bits wide */ -#define STR71X_EIC_SIR2_OFFSET (0x0068) /* 32-bits wide */ -#define STR71X_EIC_SIR3_OFFSET (0x006c) /* 32-bits wide */ -#define STR71X_EIC_SIR4_OFFSET (0x0070) /* 32-bits wide */ -#define STR71X_EIC_SIR5_OFFSET (0x0074) /* 32-bits wide */ -#define STR71X_EIC_SIR6_OFFSET (0x0078) /* 32-bits wide */ -#define STR71X_EIC_SIR7_OFFSET (0x007c) /* 32-bits wide */ -#define STR71X_EIC_SIR8_OFFSET (0x0080) /* 32-bits wide */ -#define STR71X_EIC_SIR9_OFFSET (0x0084) /* 32-bits wide */ -#define STR71X_EIC_SIR10_OFFSET (0x0088) /* 32-bits wide */ -#define STR71X_EIC_SIR11_OFFSET (0x008c) /* 32-bits wide */ -#define STR71X_EIC_SIR12_OFFSET (0x0090) /* 32-bits wide */ -#define STR71X_EIC_SIR13_OFFSET (0x0094) /* 32-bits wide */ -#define STR71X_EIC_SIR14_OFFSET (0x0098) /* 32-bits wide */ -#define STR71X_EIC_SIR15_OFFSET (0x009c) /* 32-bits wide */ -#define STR71X_EIC_SIR16_OFFSET (0x00a0) /* 32-bits wide */ -#define STR71X_EIC_SIR17_OFFSET (0x00a4) /* 32-bits wide */ -#define STR71X_EIC_SIR18_OFFSET (0x00a8) /* 32-bits wide */ -#define STR71X_EIC_SIR19_OFFSET (0x00ac) /* 32-bits wide */ -#define STR71X_EIC_SIR20_OFFSET (0x00b0) /* 32-bits wide */ -#define STR71X_EIC_SIR21_OFFSET (0x00b4) /* 32-bits wide */ -#define STR71X_EIC_SIR22_OFFSET (0x00b8) /* 32-bits wide */ -#define STR71X_EIC_SIR23_OFFSET (0x00bc) /* 32-bits wide */ -#define STR71X_EIC_SIR24_OFFSET (0x00c0) /* 32-bits wide */ -#define STR71X_EIC_SIR25_OFFSET (0x00c4) /* 32-bits wide */ -#define STR71X_EIC_SIR26_OFFSET (0x00c8) /* 32-bits wide */ -#define STR71X_EIC_SIR27_OFFSET (0x00cc) /* 32-bits wide */ -#define STR71X_EIC_SIR28_OFFSET (0x00d0) /* 32-bits wide */ -#define STR71X_EIC_SIR29_OFFSET (0x00d4) /* 32-bits wide */ -#define STR71X_EIC_SIR30_OFFSET (0x00d8) /* 32-bits wide */ -#define STR71X_EIC_SIR31_OFFSET (0x00dc) /* 32-bits wide */ - -#define STR71X_EIC_NCHANNELS (32) -#define STR71X_EIC_SIR_BASE (STR71X_EIC_BASE + STR71X_EIC_SIR_OFFSET) - -/* Enhanced Interupt Controller (EIC) registers *************************************/ - -#define STR71X_EIC_ICR (STR71X_EIC_BASE + STR71X_EIC_ICR_OFFSET) -#define STR71X_EIC_CICR (STR71X_EIC_BASE + STR71X_EIC_CICR_OFFSET) -#define STR71X_EIC_CIPR (STR71X_EIC_BASE + STR71X_EIC_CIPR_OFFSET) -#define STR71X_EIC_IVR (STR71X_EIC_BASE + STR71X_EIC_IVR_OFFSET) -#define STR71X_EIC_FIR (STR71X_EIC_BASE + STR71X_EIC_FIR_OFFSET) -#define STR71X_EIC_IER (STR71X_EIC_BASE + STR71X_EIC_IER_OFFSET) -#define STR71X_EIC_IPR (STR71X_EIC_BASE + STR71X_EIC_IPR_OFFSET) - -#define STR71X_EIC_SIR(n) (STR71X_EIC_SIR_BASE + ((n) << 2)) - -#define STR71X_EIC_SIR0 (STR71X_EIC_BASE + STR71X_EIC_SIR0_OFFSET) -#define STR71X_EIC_SIR1 (STR71X_EIC_BASE + STR71X_EIC_SIR1_OFFSET) -#define STR71X_EIC_SIR2 (STR71X_EIC_BASE + STR71X_EIC_SIR2_OFFSET) -#define STR71X_EIC_SIR3 (STR71X_EIC_BASE + STR71X_EIC_SIR3_OFFSET) -#define STR71X_EIC_SIR4 (STR71X_EIC_BASE + STR71X_EIC_SIR4_OFFSET) -#define STR71X_EIC_SIR5 (STR71X_EIC_BASE + STR71X_EIC_SIR5_OFFSET) -#define STR71X_EIC_SIR6 (STR71X_EIC_BASE + STR71X_EIC_SIR6_OFFSET) -#define STR71X_EIC_SIR7 (STR71X_EIC_BASE + STR71X_EIC_SIR7_OFFSET) -#define STR71X_EIC_SIR8 (STR71X_EIC_BASE + STR71X_EIC_SIR8_OFFSET) -#define STR71X_EIC_SIR9 (STR71X_EIC_BASE + STR71X_EIC_SIR9_OFFSET) -#define STR71X_EIC_SIR10 (STR71X_EIC_BASE + STR71X_EIC_SIR10_OFFSET) -#define STR71X_EIC_SIR11 (STR71X_EIC_BASE + STR71X_EIC_SIR11_OFFSET) -#define STR71X_EIC_SIR12 (STR71X_EIC_BASE + STR71X_EIC_SIR12_OFFSET) -#define STR71X_EIC_SIR13 (STR71X_EIC_BASE + STR71X_EIC_SIR13_OFFSET) -#define STR71X_EIC_SIR14 (STR71X_EIC_BASE + STR71X_EIC_SIR14_OFFSET) -#define STR71X_EIC_SIR15 (STR71X_EIC_BASE + STR71X_EIC_SIR15_OFFSET) -#define STR71X_EIC_SIR16 (STR71X_EIC_BASE + STR71X_EIC_SIR16_OFFSET) -#define STR71X_EIC_SIR17 (STR71X_EIC_BASE + STR71X_EIC_SIR17_OFFSET) -#define STR71X_EIC_SIR18 (STR71X_EIC_BASE + STR71X_EIC_SIR18_OFFSET) -#define STR71X_EIC_SIR19 (STR71X_EIC_BASE + STR71X_EIC_SIR19_OFFSET) -#define STR71X_EIC_SIR20 (STR71X_EIC_BASE + STR71X_EIC_SIR20_OFFSET) -#define STR71X_EIC_SIR21 (STR71X_EIC_BASE + STR71X_EIC_SIR21_OFFSET) -#define STR71X_EIC_SIR22 (STR71X_EIC_BASE + STR71X_EIC_SIR22_OFFSET) -#define STR71X_EIC_SIR23 (STR71X_EIC_BASE + STR71X_EIC_SIR23_OFFSET) -#define STR71X_EIC_SIR24 (STR71X_EIC_BASE + STR71X_EIC_SIR24_OFFSET) -#define STR71X_EIC_SIR25 (STR71X_EIC_BASE + STR71X_EIC_SIR25_OFFSET) -#define STR71X_EIC_SIR26 (STR71X_EIC_BASE + STR71X_EIC_SIR26_OFFSET) -#define STR71X_EIC_SIR27 (STR71X_EIC_BASE + STR71X_EIC_SIR27_OFFSET) -#define STR71X_EIC_SIR28 (STR71X_EIC_BASE + STR71X_EIC_SIR28_OFFSET) -#define STR71X_EIC_SIR29 (STR71X_EIC_BASE + STR71X_EIC_SIR29_OFFSET) -#define STR71X_EIC_SIR30 (STR71X_EIC_BASE + STR71X_EIC_SIR30_OFFSET) -#define STR71X_EIC_SIR31 (STR71X_EIC_BASE + STR71X_EIC_SIR31_OFFSET) - -/* Register bit settings ************************************************************/ - -/* Interrupt control register (ICR) bit definitions */ - -#define STR71X_EICICR_IRQEN (0x00000001) /* Bit 0: IRQ output enable */ -#define STR71X_EICICR_FIQEN (0x00000002) /* Bit 1: FIQ output enable */ - -/* Current interrupt channel register (CICR) bit definitions */ - -#define STR71X_EICCICR_MASK 0x1f /* Bits: 0-4: CIC */ - -/* Fast interrupt register (FIR) bit definitions */ - -#define STR71X_EICFIR_FIE (0x00000001) /* Bit 0: FIQ channel 1/0 enable */ -#define STR71X_EICFIR_FIP (0x00000002) /* Bit 1: channel 1/0 FIQ pending */ - -/* Source interrrupt register definitions */ - -#define STR71X_EICSIR_SIPLMASK (0x0000000f) /* Bits 0-3: Source interrupt priority level */ -#define STR71X_EICSIR_SIVMASK (0xffff0000) /* Bits 16-31: Source interrupt vector */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_EIC_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_eic.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_EIC_H +#define __ARCH_ARM_SRC_STR71X_STR71X_EIC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Enhanced Interupt Controller (EIC) register offsets ******************************/ + +#define STR71X_EIC_ICR_OFFSET (0x0000) /* 32-bits wide */ +#define STR71X_EIC_CICR_OFFSET (0x0004) /* 32-bits wide */ +#define STR71X_EIC_CIPR_OFFSET (0x0008) /* 32-bits wide */ +#define STR71X_EIC_IVR_OFFSET (0x0018) /* 32-bits wide */ +#define STR71X_EIC_FIR_OFFSET (0x001c) /* 32-bits wide */ +#define STR71X_EIC_IER_OFFSET (0x0020) /* 32-bits wide */ +#define STR71X_EIC_IPR_OFFSET (0x0040) /* 32-bits wide */ + +#define STR71X_EIC_SIR_OFFSET (0x0060) /* 32 x 32-bits */ +#define STR71X_EIC_SIR0_OFFSET (0x0060) /* 32-bits wide */ +#define STR71X_EIC_SIR1_OFFSET (0x0064) /* 32-bits wide */ +#define STR71X_EIC_SIR2_OFFSET (0x0068) /* 32-bits wide */ +#define STR71X_EIC_SIR3_OFFSET (0x006c) /* 32-bits wide */ +#define STR71X_EIC_SIR4_OFFSET (0x0070) /* 32-bits wide */ +#define STR71X_EIC_SIR5_OFFSET (0x0074) /* 32-bits wide */ +#define STR71X_EIC_SIR6_OFFSET (0x0078) /* 32-bits wide */ +#define STR71X_EIC_SIR7_OFFSET (0x007c) /* 32-bits wide */ +#define STR71X_EIC_SIR8_OFFSET (0x0080) /* 32-bits wide */ +#define STR71X_EIC_SIR9_OFFSET (0x0084) /* 32-bits wide */ +#define STR71X_EIC_SIR10_OFFSET (0x0088) /* 32-bits wide */ +#define STR71X_EIC_SIR11_OFFSET (0x008c) /* 32-bits wide */ +#define STR71X_EIC_SIR12_OFFSET (0x0090) /* 32-bits wide */ +#define STR71X_EIC_SIR13_OFFSET (0x0094) /* 32-bits wide */ +#define STR71X_EIC_SIR14_OFFSET (0x0098) /* 32-bits wide */ +#define STR71X_EIC_SIR15_OFFSET (0x009c) /* 32-bits wide */ +#define STR71X_EIC_SIR16_OFFSET (0x00a0) /* 32-bits wide */ +#define STR71X_EIC_SIR17_OFFSET (0x00a4) /* 32-bits wide */ +#define STR71X_EIC_SIR18_OFFSET (0x00a8) /* 32-bits wide */ +#define STR71X_EIC_SIR19_OFFSET (0x00ac) /* 32-bits wide */ +#define STR71X_EIC_SIR20_OFFSET (0x00b0) /* 32-bits wide */ +#define STR71X_EIC_SIR21_OFFSET (0x00b4) /* 32-bits wide */ +#define STR71X_EIC_SIR22_OFFSET (0x00b8) /* 32-bits wide */ +#define STR71X_EIC_SIR23_OFFSET (0x00bc) /* 32-bits wide */ +#define STR71X_EIC_SIR24_OFFSET (0x00c0) /* 32-bits wide */ +#define STR71X_EIC_SIR25_OFFSET (0x00c4) /* 32-bits wide */ +#define STR71X_EIC_SIR26_OFFSET (0x00c8) /* 32-bits wide */ +#define STR71X_EIC_SIR27_OFFSET (0x00cc) /* 32-bits wide */ +#define STR71X_EIC_SIR28_OFFSET (0x00d0) /* 32-bits wide */ +#define STR71X_EIC_SIR29_OFFSET (0x00d4) /* 32-bits wide */ +#define STR71X_EIC_SIR30_OFFSET (0x00d8) /* 32-bits wide */ +#define STR71X_EIC_SIR31_OFFSET (0x00dc) /* 32-bits wide */ + +#define STR71X_EIC_NCHANNELS (32) +#define STR71X_EIC_SIR_BASE (STR71X_EIC_BASE + STR71X_EIC_SIR_OFFSET) + +/* Enhanced Interupt Controller (EIC) registers *************************************/ + +#define STR71X_EIC_ICR (STR71X_EIC_BASE + STR71X_EIC_ICR_OFFSET) +#define STR71X_EIC_CICR (STR71X_EIC_BASE + STR71X_EIC_CICR_OFFSET) +#define STR71X_EIC_CIPR (STR71X_EIC_BASE + STR71X_EIC_CIPR_OFFSET) +#define STR71X_EIC_IVR (STR71X_EIC_BASE + STR71X_EIC_IVR_OFFSET) +#define STR71X_EIC_FIR (STR71X_EIC_BASE + STR71X_EIC_FIR_OFFSET) +#define STR71X_EIC_IER (STR71X_EIC_BASE + STR71X_EIC_IER_OFFSET) +#define STR71X_EIC_IPR (STR71X_EIC_BASE + STR71X_EIC_IPR_OFFSET) + +#define STR71X_EIC_SIR(n) (STR71X_EIC_SIR_BASE + ((n) << 2)) + +#define STR71X_EIC_SIR0 (STR71X_EIC_BASE + STR71X_EIC_SIR0_OFFSET) +#define STR71X_EIC_SIR1 (STR71X_EIC_BASE + STR71X_EIC_SIR1_OFFSET) +#define STR71X_EIC_SIR2 (STR71X_EIC_BASE + STR71X_EIC_SIR2_OFFSET) +#define STR71X_EIC_SIR3 (STR71X_EIC_BASE + STR71X_EIC_SIR3_OFFSET) +#define STR71X_EIC_SIR4 (STR71X_EIC_BASE + STR71X_EIC_SIR4_OFFSET) +#define STR71X_EIC_SIR5 (STR71X_EIC_BASE + STR71X_EIC_SIR5_OFFSET) +#define STR71X_EIC_SIR6 (STR71X_EIC_BASE + STR71X_EIC_SIR6_OFFSET) +#define STR71X_EIC_SIR7 (STR71X_EIC_BASE + STR71X_EIC_SIR7_OFFSET) +#define STR71X_EIC_SIR8 (STR71X_EIC_BASE + STR71X_EIC_SIR8_OFFSET) +#define STR71X_EIC_SIR9 (STR71X_EIC_BASE + STR71X_EIC_SIR9_OFFSET) +#define STR71X_EIC_SIR10 (STR71X_EIC_BASE + STR71X_EIC_SIR10_OFFSET) +#define STR71X_EIC_SIR11 (STR71X_EIC_BASE + STR71X_EIC_SIR11_OFFSET) +#define STR71X_EIC_SIR12 (STR71X_EIC_BASE + STR71X_EIC_SIR12_OFFSET) +#define STR71X_EIC_SIR13 (STR71X_EIC_BASE + STR71X_EIC_SIR13_OFFSET) +#define STR71X_EIC_SIR14 (STR71X_EIC_BASE + STR71X_EIC_SIR14_OFFSET) +#define STR71X_EIC_SIR15 (STR71X_EIC_BASE + STR71X_EIC_SIR15_OFFSET) +#define STR71X_EIC_SIR16 (STR71X_EIC_BASE + STR71X_EIC_SIR16_OFFSET) +#define STR71X_EIC_SIR17 (STR71X_EIC_BASE + STR71X_EIC_SIR17_OFFSET) +#define STR71X_EIC_SIR18 (STR71X_EIC_BASE + STR71X_EIC_SIR18_OFFSET) +#define STR71X_EIC_SIR19 (STR71X_EIC_BASE + STR71X_EIC_SIR19_OFFSET) +#define STR71X_EIC_SIR20 (STR71X_EIC_BASE + STR71X_EIC_SIR20_OFFSET) +#define STR71X_EIC_SIR21 (STR71X_EIC_BASE + STR71X_EIC_SIR21_OFFSET) +#define STR71X_EIC_SIR22 (STR71X_EIC_BASE + STR71X_EIC_SIR22_OFFSET) +#define STR71X_EIC_SIR23 (STR71X_EIC_BASE + STR71X_EIC_SIR23_OFFSET) +#define STR71X_EIC_SIR24 (STR71X_EIC_BASE + STR71X_EIC_SIR24_OFFSET) +#define STR71X_EIC_SIR25 (STR71X_EIC_BASE + STR71X_EIC_SIR25_OFFSET) +#define STR71X_EIC_SIR26 (STR71X_EIC_BASE + STR71X_EIC_SIR26_OFFSET) +#define STR71X_EIC_SIR27 (STR71X_EIC_BASE + STR71X_EIC_SIR27_OFFSET) +#define STR71X_EIC_SIR28 (STR71X_EIC_BASE + STR71X_EIC_SIR28_OFFSET) +#define STR71X_EIC_SIR29 (STR71X_EIC_BASE + STR71X_EIC_SIR29_OFFSET) +#define STR71X_EIC_SIR30 (STR71X_EIC_BASE + STR71X_EIC_SIR30_OFFSET) +#define STR71X_EIC_SIR31 (STR71X_EIC_BASE + STR71X_EIC_SIR31_OFFSET) + +/* Register bit settings ************************************************************/ + +/* Interrupt control register (ICR) bit definitions */ + +#define STR71X_EICICR_IRQEN (0x00000001) /* Bit 0: IRQ output enable */ +#define STR71X_EICICR_FIQEN (0x00000002) /* Bit 1: FIQ output enable */ + +/* Current interrupt channel register (CICR) bit definitions */ + +#define STR71X_EICCICR_MASK 0x1f /* Bits: 0-4: CIC */ + +/* Fast interrupt register (FIR) bit definitions */ + +#define STR71X_EICFIR_FIE (0x00000001) /* Bit 0: FIQ channel 1/0 enable */ +#define STR71X_EICFIR_FIP (0x00000002) /* Bit 1: channel 1/0 FIQ pending */ + +/* Source interrrupt register definitions */ + +#define STR71X_EICSIR_SIPLMASK (0x0000000f) /* Bits 0-3: Source interrupt priority level */ +#define STR71X_EICSIR_SIVMASK (0xffff0000) /* Bits 16-31: Source interrupt vector */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_EIC_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_emi.h b/nuttx/arch/arm/src/str71x/str71x_emi.h index 68c35cd07e..ade4d1145b 100644 --- a/nuttx/arch/arm/src/str71x/str71x_emi.h +++ b/nuttx/arch/arm/src/str71x/str71x_emi.h @@ -1,103 +1,103 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_emi.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_EMI_H -#define __ARCH_ARM_SRC_STR71X_STR71X_EMI_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* External Memory Interfac (EMI) register offset ***********************************/ - -#define STR71X_EMI_BCON0_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_EMI_BCON1_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_EMI_BCON2_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_EMI_BCON3_OFFSET (0x000c) /* 16-bits wide */ - -/* External Memory Interfac (EMI) register addresses ********************************/ - -#define STR71X_EMI_BCON0 (STR71X_EMI_BASE + STR71X_EMI_BCON0_OFFSET) -#define STR71X_EMI_BCON1 (STR71X_EMI_BASE + STR71X_EMI_BCON1_OFFSET) -#define STR71X_EMI_BCON2 (STR71X_EMI_BASE + STR71X_EMI_BCON2_OFFSET) -#define STR71X_EMI_BCON3 (STR71X_EMI_BASE + STR71X_EMI_BCON3_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* Bank-N configuration register (BCONn) bit definitions */ - -#define STR71X_EMIBCON_BSIZEMASK (0x0003) /* Bits 0-1: Bank size */ -#define STR71X_EMIBCON_BSIZE8 (0x0000) /* 8-bit */ -#define STR71X_EMIBCON_BSIZE16 (0x0001) /* 16-bit */ -#define STR71X_EMIBCON_WSMASK (0x003c) /* Bits 2-5: Wait states */ -#define STR71X_EMIBCON_WS0 (0x0000) /* 0 waitstates */ -#define STR71X_EMIBCON_WS1 (0x0004) /* 1 waitstates */ -#define STR71X_EMIBCON_WS2 (0x0008) /* 2 waitstates */ -#define STR71X_EMIBCON_WS3 (0x000c) /* 3 waitstates */ -#define STR71X_EMIBCON_WS4 (0x0010) /* 4 waitstates */ -#define STR71X_EMIBCON_WS5 (0x0014) /* 5 waitstates */ -#define STR71X_EMIBCON_WS6 (0x0018) /* 6 waitstates */ -#define STR71X_EMIBCON_WS7 (0x001c) /* 7 waitstates */ -#define STR71X_EMIBCON_WS8 (0x0020) /* 8 waitstates */ -#define STR71X_EMIBCON_WS9 (0x0024) /* 9 waitstates */ -#define STR71X_EMIBCON_WS10 (0x0028) /* 10 waitstates */ -#define STR71X_EMIBCON_WS11 (0x002c) /* 11 waitstates */ -#define STR71X_EMIBCON_WS12 (0x0030) /* 12 waitstates */ -#define STR71X_EMIBCON_WS13 (0x0034) /* 13 waitstates */ -#define STR71X_EMIBCON_WS14 (0x0038) /* 14 waitstates */ -#define STR71X_EMIBCON_WS15 (0x003c) /* 15 waitstates */ -#define STR71X_EMIBCON_ENABLE (0x8000) /* Bit 15: Bank enable */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_EMI_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_emi.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_EMI_H +#define __ARCH_ARM_SRC_STR71X_STR71X_EMI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* External Memory Interfac (EMI) register offset ***********************************/ + +#define STR71X_EMI_BCON0_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_EMI_BCON1_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_EMI_BCON2_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_EMI_BCON3_OFFSET (0x000c) /* 16-bits wide */ + +/* External Memory Interfac (EMI) register addresses ********************************/ + +#define STR71X_EMI_BCON0 (STR71X_EMI_BASE + STR71X_EMI_BCON0_OFFSET) +#define STR71X_EMI_BCON1 (STR71X_EMI_BASE + STR71X_EMI_BCON1_OFFSET) +#define STR71X_EMI_BCON2 (STR71X_EMI_BASE + STR71X_EMI_BCON2_OFFSET) +#define STR71X_EMI_BCON3 (STR71X_EMI_BASE + STR71X_EMI_BCON3_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* Bank-N configuration register (BCONn) bit definitions */ + +#define STR71X_EMIBCON_BSIZEMASK (0x0003) /* Bits 0-1: Bank size */ +#define STR71X_EMIBCON_BSIZE8 (0x0000) /* 8-bit */ +#define STR71X_EMIBCON_BSIZE16 (0x0001) /* 16-bit */ +#define STR71X_EMIBCON_WSMASK (0x003c) /* Bits 2-5: Wait states */ +#define STR71X_EMIBCON_WS0 (0x0000) /* 0 waitstates */ +#define STR71X_EMIBCON_WS1 (0x0004) /* 1 waitstates */ +#define STR71X_EMIBCON_WS2 (0x0008) /* 2 waitstates */ +#define STR71X_EMIBCON_WS3 (0x000c) /* 3 waitstates */ +#define STR71X_EMIBCON_WS4 (0x0010) /* 4 waitstates */ +#define STR71X_EMIBCON_WS5 (0x0014) /* 5 waitstates */ +#define STR71X_EMIBCON_WS6 (0x0018) /* 6 waitstates */ +#define STR71X_EMIBCON_WS7 (0x001c) /* 7 waitstates */ +#define STR71X_EMIBCON_WS8 (0x0020) /* 8 waitstates */ +#define STR71X_EMIBCON_WS9 (0x0024) /* 9 waitstates */ +#define STR71X_EMIBCON_WS10 (0x0028) /* 10 waitstates */ +#define STR71X_EMIBCON_WS11 (0x002c) /* 11 waitstates */ +#define STR71X_EMIBCON_WS12 (0x0030) /* 12 waitstates */ +#define STR71X_EMIBCON_WS13 (0x0034) /* 13 waitstates */ +#define STR71X_EMIBCON_WS14 (0x0038) /* 14 waitstates */ +#define STR71X_EMIBCON_WS15 (0x003c) /* 15 waitstates */ +#define STR71X_EMIBCON_ENABLE (0x8000) /* Bit 15: Bank enable */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_EMI_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_flash.h b/nuttx/arch/arm/src/str71x/str71x_flash.h index 352972d482..9b45fa3e92 100644 --- a/nuttx/arch/arm/src/str71x/str71x_flash.h +++ b/nuttx/arch/arm/src/str71x/str71x_flash.h @@ -1,123 +1,123 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_flash.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H -#define __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Flash registers ******************************************************************/ - -#define STR71X_FLASH_CR0 (STR71X_FLASHREG_BASE + 0x0000) /* 32-bits wide */ -#define STR71X_FLASH_CR1 (STR71X_FLASHREG_BASE + 0x0004) /* 32-bits wide */ -#define STR71X_FLASH_DR0 (STR71X_FLASHREG_BASE + 0x0008) /* 32-bits wide */ -#define STR71X_FLASH_DR1 (STR71X_FLASHREG_BASE + 0x000c) /* 32-bits wide */ -#define STR71X_FLASH_AR (STR71X_FLASHREG_BASE + 0x0010) /* 32-bits wide */ -#define STR71X_FLASH_ER (STR71X_FLASHREG_BASE + 0x0014) /* 32-bits wide */ - -/* Register bit settings ************************************************************/ - -#define STR71X_FLASH_B0F0 (0x00000001) -#define STR71X_FLASH_B0F1 (0x00000002) -#define STR71X_FLASH_B0F2 (0x00000004) -#define STR71X_FLASH_B0F3 (0x00000008) -#define STR71X_FLASH_B0F4 (0x00000010) -#define STR71X_FLASH_B0F5 (0x00000020) -#define STR71X_FLASH_B0F6 (0x00000040) -#define STR71X_FLASH_B0F7 (0x00000080) - -#define STR71X_FLASH_B1F0 (0x00010000) -#define STR71X_FLASH_B1F1 (0x00020000) - -#define STR71X_FLASH_B0 (STR71X_FLASH_B0F0|STR71X_FLASH_B0F1|\ - STR71X_FLASH_B0F2|STR71X_FLASH_B0F3|\ - STR71X_FLASH_B0F4|STR71X_FLASH_B0F5|\ - STR71X_FLASH_B0F6| STR71X_FLASH_B0F7) -#define STR71X_FLASH_B1 (STR71X_FLASH_B1F0|STR71X_FLASH_B1F1) - -#define STR71X_FLASH_BANK0 (0x1000000) -#define STR71X_FLASH_BANK1 (0x2000000) - -#define STR71X_FLASH_BSYA0 (0x01) /* 000-00001 (0000 0001 (0x01 */ /* STR71X_FLASH_CR0.1 */ -#define STR71X_FLASH_BSYA1 (0x02) /* 000-00010 (0000 0010 (0x02 */ /* STR71X_FLASH_CR0.2 */ -#define STR71X_FLASH_LOCK (0x04) /* 000-00100 (0000 0100 (0x04 */ /* STR71X_FLASH_CR0.4 */ -#define STR71X_FLASH_INTP (0x14) /* 000-10100 (0001 0100 (0x14 */ /* STR71X_FLASH_CR0.20 */ -#define STR71X_FLASH_B0S (0x38) /* 001-11000 (0011 1000 (0x38 */ /* STR71X_FLASH_CR1.24 */ -#define STR71X_FLASH_B1S (0x39) /* 001-11001 (0011 1001 (0x39 */ /* STR71X_FLASH_CR1.25 */ -#define STR71X_FLASH_ERR (0xa0) /* 101-00000 (1010 0000 (0xA0 */ /* STR71X_FLASH_ER.0 */ -#define STR71X_FLASH_ERER (0xa1) /* 101-00001 (1010 0001 (0xA1 */ /* STR71X_FLASH_ER.1 */ -#define STR71X_FLASH_PGER (0xa2) /* 101-00010 (1010 0010 (0xA2 */ /* STR71X_FLASH_ER.2 */ -#define STR71X_FLASH_10ER (0xa3) /* 101-00011 (1010 0011 (0xA3 */ /* STR71X_FLASH_ER.3 */ -#define STR71X_FLASH_SEQER (0xa6) /* 101-00110 (1010 0110 (0xA6 */ /* STR71X_FLASH_ER.6 */ -#define STR71X_FLASH_RESER (0xa7) /* 101-00111 (1010 0111 (0xA7 */ /* STR71X_FLASH_ER.7 */ -#define STR71X_FLASH_WPF (0xa8) /* 101-01000 (1010 1000 (0xA8 */ /* STR71X_FLASH_ER.8 */ - -#define STR71X_FLASH_WMS_MASK (0x80000000) -#define STR71X_FLASH_SUSP_MASK (0x40000000) -#define STR71X_FLASH_WPG_MASK (0x20000000) -#define STR71X_FLASH_DWPG_MASK (0x10000000) -#define STR71X_FLASH_SER_MASK (0x08000000) -#define STR71X_FLASH_SPR_MASK (0x01000000) -#define STR71X_FLASH_DBGP_MASK (0x00000002) -#define STR71X_FLASH_ACCP_MASK (0x00000001) - -#define STR71X_FLASH_Reg_Mask (0xe0) -#define STR71X_FLASH_Flag_Mask (0x1f) - -#define STR71X_FLASH_INTM_Mask (0x00200000) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_flash.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H +#define __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Flash registers ******************************************************************/ + +#define STR71X_FLASH_CR0 (STR71X_FLASHREG_BASE + 0x0000) /* 32-bits wide */ +#define STR71X_FLASH_CR1 (STR71X_FLASHREG_BASE + 0x0004) /* 32-bits wide */ +#define STR71X_FLASH_DR0 (STR71X_FLASHREG_BASE + 0x0008) /* 32-bits wide */ +#define STR71X_FLASH_DR1 (STR71X_FLASHREG_BASE + 0x000c) /* 32-bits wide */ +#define STR71X_FLASH_AR (STR71X_FLASHREG_BASE + 0x0010) /* 32-bits wide */ +#define STR71X_FLASH_ER (STR71X_FLASHREG_BASE + 0x0014) /* 32-bits wide */ + +/* Register bit settings ************************************************************/ + +#define STR71X_FLASH_B0F0 (0x00000001) +#define STR71X_FLASH_B0F1 (0x00000002) +#define STR71X_FLASH_B0F2 (0x00000004) +#define STR71X_FLASH_B0F3 (0x00000008) +#define STR71X_FLASH_B0F4 (0x00000010) +#define STR71X_FLASH_B0F5 (0x00000020) +#define STR71X_FLASH_B0F6 (0x00000040) +#define STR71X_FLASH_B0F7 (0x00000080) + +#define STR71X_FLASH_B1F0 (0x00010000) +#define STR71X_FLASH_B1F1 (0x00020000) + +#define STR71X_FLASH_B0 (STR71X_FLASH_B0F0|STR71X_FLASH_B0F1|\ + STR71X_FLASH_B0F2|STR71X_FLASH_B0F3|\ + STR71X_FLASH_B0F4|STR71X_FLASH_B0F5|\ + STR71X_FLASH_B0F6| STR71X_FLASH_B0F7) +#define STR71X_FLASH_B1 (STR71X_FLASH_B1F0|STR71X_FLASH_B1F1) + +#define STR71X_FLASH_BANK0 (0x1000000) +#define STR71X_FLASH_BANK1 (0x2000000) + +#define STR71X_FLASH_BSYA0 (0x01) /* 000-00001 (0000 0001 (0x01 */ /* STR71X_FLASH_CR0.1 */ +#define STR71X_FLASH_BSYA1 (0x02) /* 000-00010 (0000 0010 (0x02 */ /* STR71X_FLASH_CR0.2 */ +#define STR71X_FLASH_LOCK (0x04) /* 000-00100 (0000 0100 (0x04 */ /* STR71X_FLASH_CR0.4 */ +#define STR71X_FLASH_INTP (0x14) /* 000-10100 (0001 0100 (0x14 */ /* STR71X_FLASH_CR0.20 */ +#define STR71X_FLASH_B0S (0x38) /* 001-11000 (0011 1000 (0x38 */ /* STR71X_FLASH_CR1.24 */ +#define STR71X_FLASH_B1S (0x39) /* 001-11001 (0011 1001 (0x39 */ /* STR71X_FLASH_CR1.25 */ +#define STR71X_FLASH_ERR (0xa0) /* 101-00000 (1010 0000 (0xA0 */ /* STR71X_FLASH_ER.0 */ +#define STR71X_FLASH_ERER (0xa1) /* 101-00001 (1010 0001 (0xA1 */ /* STR71X_FLASH_ER.1 */ +#define STR71X_FLASH_PGER (0xa2) /* 101-00010 (1010 0010 (0xA2 */ /* STR71X_FLASH_ER.2 */ +#define STR71X_FLASH_10ER (0xa3) /* 101-00011 (1010 0011 (0xA3 */ /* STR71X_FLASH_ER.3 */ +#define STR71X_FLASH_SEQER (0xa6) /* 101-00110 (1010 0110 (0xA6 */ /* STR71X_FLASH_ER.6 */ +#define STR71X_FLASH_RESER (0xa7) /* 101-00111 (1010 0111 (0xA7 */ /* STR71X_FLASH_ER.7 */ +#define STR71X_FLASH_WPF (0xa8) /* 101-01000 (1010 1000 (0xA8 */ /* STR71X_FLASH_ER.8 */ + +#define STR71X_FLASH_WMS_MASK (0x80000000) +#define STR71X_FLASH_SUSP_MASK (0x40000000) +#define STR71X_FLASH_WPG_MASK (0x20000000) +#define STR71X_FLASH_DWPG_MASK (0x10000000) +#define STR71X_FLASH_SER_MASK (0x08000000) +#define STR71X_FLASH_SPR_MASK (0x01000000) +#define STR71X_FLASH_DBGP_MASK (0x00000002) +#define STR71X_FLASH_ACCP_MASK (0x00000001) + +#define STR71X_FLASH_Reg_Mask (0xe0) +#define STR71X_FLASH_Flag_Mask (0x1f) + +#define STR71X_FLASH_INTM_Mask (0x00200000) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_FLASH_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_gpio.h b/nuttx/arch/arm/src/str71x/str71x_gpio.h index dbcd3cdeb0..16b3256130 100644 --- a/nuttx/arch/arm/src/str71x/str71x_gpio.h +++ b/nuttx/arch/arm/src/str71x/str71x_gpio.h @@ -1,94 +1,94 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_gpio.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H -#define __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* GPIO register offsets ************************************************************/ - -#define STR71X_GPIO_PC0_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_GPIO_PC1_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_GPIO_PC2_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_GPIO_PD_OFFSET (0x000c) /* 16-bits wide */ - -/* GPIO register addresses **********************************************************/ - -#define STR71X_GPIO_PC0(b) ((b) + STR71X_GPIO_PC0_OFFSET) -#define STR71X_GPIO_PC1(b) ((b) + STR71X_GPIO_PC1_OFFSET) -#define STR71X_GPIO_PC2(b) ((b) + STR71X_GPIO_PC2_OFFSET) -#define STR71X_GPIO_PD(b) ((b) + STR71X_GPIO_PD_OFFSET) - -#define STR71X_GPIO0_PC0 (STR71X_GPIO0_BASE + STR71X_GPIO_PC0_OFFSET) -#define STR71X_GPIO0_PC1 (STR71X_GPIO0_BASE + STR71X_GPIO_PC1_OFFSET) -#define STR71X_GPIO0_PC2 (STR71X_GPIO0_BASE + STR71X_GPIO_PC2_OFFSET) -#define STR71X_GPIO0_PD (STR71X_GPIO0_BASE + STR71X_GPIO_PD_OFFSET) - -#define STR71X_GPIO1_PC0 (STR71X_GPIO1_BASE + STR71X_GPIO_PC0_OFFSET) -#define STR71X_GPIO1_PC1 (STR71X_GPIO1_BASE + STR71X_GPIO_PC1_OFFSET) -#define STR71X_GPIO1_PC2 (STR71X_GPIO1_BASE + STR71X_GPIO_PC2_OFFSET) -#define STR71X_GPIO1_PD (STR71X_GPIO1_BASE + STR71X_GPIO_PD_OFFSET) - -#define STR71X_GPIO2_PC0 (STR71X_GPIO2_BASE + STR71X_GPIO_PC0_OFFSET) -#define STR71X_GPIO2_PC1 (STR71X_GPIO2_BASE + STR71X_GPIO_PC1_OFFSET) -#define STR71X_GPIO2_PC2 (STR71X_GPIO2_BASE + STR71X_GPIO_PC2_OFFSET) -#define STR71X_GPIO2_PD (STR71X_GPIO2_BASE + STR71X_GPIO_PD_OFFSET) - -/* Register bit settings ************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_gpio.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H +#define __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* GPIO register offsets ************************************************************/ + +#define STR71X_GPIO_PC0_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_GPIO_PC1_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_GPIO_PC2_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_GPIO_PD_OFFSET (0x000c) /* 16-bits wide */ + +/* GPIO register addresses **********************************************************/ + +#define STR71X_GPIO_PC0(b) ((b) + STR71X_GPIO_PC0_OFFSET) +#define STR71X_GPIO_PC1(b) ((b) + STR71X_GPIO_PC1_OFFSET) +#define STR71X_GPIO_PC2(b) ((b) + STR71X_GPIO_PC2_OFFSET) +#define STR71X_GPIO_PD(b) ((b) + STR71X_GPIO_PD_OFFSET) + +#define STR71X_GPIO0_PC0 (STR71X_GPIO0_BASE + STR71X_GPIO_PC0_OFFSET) +#define STR71X_GPIO0_PC1 (STR71X_GPIO0_BASE + STR71X_GPIO_PC1_OFFSET) +#define STR71X_GPIO0_PC2 (STR71X_GPIO0_BASE + STR71X_GPIO_PC2_OFFSET) +#define STR71X_GPIO0_PD (STR71X_GPIO0_BASE + STR71X_GPIO_PD_OFFSET) + +#define STR71X_GPIO1_PC0 (STR71X_GPIO1_BASE + STR71X_GPIO_PC0_OFFSET) +#define STR71X_GPIO1_PC1 (STR71X_GPIO1_BASE + STR71X_GPIO_PC1_OFFSET) +#define STR71X_GPIO1_PC2 (STR71X_GPIO1_BASE + STR71X_GPIO_PC2_OFFSET) +#define STR71X_GPIO1_PD (STR71X_GPIO1_BASE + STR71X_GPIO_PD_OFFSET) + +#define STR71X_GPIO2_PC0 (STR71X_GPIO2_BASE + STR71X_GPIO_PC0_OFFSET) +#define STR71X_GPIO2_PC1 (STR71X_GPIO2_BASE + STR71X_GPIO_PC1_OFFSET) +#define STR71X_GPIO2_PC2 (STR71X_GPIO2_BASE + STR71X_GPIO_PC2_OFFSET) +#define STR71X_GPIO2_PD (STR71X_GPIO2_BASE + STR71X_GPIO_PD_OFFSET) + +/* Register bit settings ************************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_GPIO_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_i2c.h b/nuttx/arch/arm/src/str71x/str71x_i2c.h index 8a0cd498f0..759c75e7eb 100644 --- a/nuttx/arch/arm/src/str71x/str71x_i2c.h +++ b/nuttx/arch/arm/src/str71x/str71x_i2c.h @@ -1,153 +1,153 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_i2c.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_I2C_H -#define __ARCH_ARM_SRC_STR71X_STR71X_I2C_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Register offets ******************************************************************/ - -#define STR71X_I2C_CR_OFFSET (0x0000) /* 8-bits wide */ -#define STR71X_I2C_SR1_OFFSET (0x0004) /* 8-bits wide */ -#define STR71X_I2C_SR2_OFFSET (0x0008) /* 8-bits wide */ -#define STR71X_I2C_CCR_OFFSET (0x000c) /* 8-bits wide */ -#define STR71X_I2C_OAR1_OFFSET (0x0010) /* 8-bits wide */ -#define STR71X_I2C_OAR2_OFFSET (0x0014) /* 8-bits wide */ -#define STR71X_I2C_DR_OFFSET (0x0018) /* 8-bits wide */ -#define STR71X_I2C_ECCR_OFFSET (0x001c) /* 8-bits wide */ - -/* Registers ************************************************************************/ - -#define STR71X_I2C_CR(b) ((b) + STR71X_I2C_SR_OFFSET) -#define STR71X_I2C_SR1(b) ((b) + STR71X_I2C_SR1_OFFSET) -#define STR71X_I2C_SR2(b) ((b) + STR71X_I2C_SR2_OFFSET) -#define STR71X_I2C_CCR(b) ((b) + STR71X_I2C_CCR_OFFSET) -#define STR71X_I2C_OAR1(b) ((b) + STR71X_I2C_OAR1_OFFSET) -#define STR71X_I2C_OAR2(b) ((b) + STR71X_I2C_OAR2_OFFSET) -#define STR71X_I2C_DR(b) ((b) + STR71X_I2C_DR_OFFSET) -#define STR71X_I2C_ECCR(b) ((b) + STR71X_I2C_ECCR_OFFSET) - -#define STR71X_I2C0_CR (STR71X_I2C0_BASE + STR71X_I2C_SR_OFFSET) -#define STR71X_I2C0_SR1 (STR71X_I2C0_BASE + STR71X_I2C_SR1_OFFSET) -#define STR71X_I2C0_SR2 (STR71X_I2C0_BASE + STR71X_I2C_SR2_OFFSET) -#define STR71X_I2C0_CCR (STR71X_I2C0_BASE + STR71X_I2C_CCR_OFFSET) -#define STR71X_I2C0_OAR1 (STR71X_I2C0_BASE + STR71X_I2C_OAR1_OFFSET) -#define STR71X_I2C0_OAR2 (STR71X_I2C0_BASE + STR71X_I2C_OAR2_OFFSET) -#define STR71X_I2C0_DR (STR71X_I2C0_BASE + STR71X_I2C_DR_OFFSET) -#define STR71X_I2C0_ECCR (STR71X_I2C0_BASE + STR71X_I2C_ECCR_OFFSET) - -#define STR71X_I2C1_CR (STR71X_I2C1_BASE + STR71X_I2C_SR_OFFSET) -#define STR71X_I2C1_SR1 (STR71X_I2C1_BASE + STR71X_I2C_SR1_OFFSET) -#define STR71X_I2C1_SR2 (STR71X_I2C1_BASE + STR71X_I2C_SR2_OFFSET) -#define STR71X_I2C1_CCR (STR71X_I2C1_BASE + STR71X_I2C_CCR_OFFSET) -#define STR71X_I2C1_OAR1 (STR71X_I2C1_BASE + STR71X_I2C_OAR1_OFFSET) -#define STR71X_I2C1_OAR2 (STR71X_I2C1_BASE + STR71X_I2C_OAR2_OFFSET) -#define STR71X_I2C1_DR (STR71X_I2C1_BASE + STR71X_I2C_DR_OFFSET) -#define STR71X_I2C1_ECCR (STR71X_I2C1_BASE + STR71X_I2C_ECCR_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* I2C Control Register (CR) */ - -#define STR71X_I2CCR_ITE (0x01) /* Bit 0: Interrupt enable */ -#define STR71X_I2CCR_STOP (0x02) /* Bit 1: Generation of a stop condition */ -#define STR71X_I2CCR_ACK (0x04) /* Bit 2: Acknowledge enable */ -#define STR71X_I2CCR_START (0x08) /* Bit 3: Generation of a start condition */ -#define STR71X_I2CCR_ENGC (0x10) /* Bit 4: Enable general call */ -#define STR71X_I2CCR_PE (0x20) /* Bit 5: Peripheral enable */ - -/* I2C Status Register 1 (SR1) */ - -#define STR71X_I2CSR1_SB (0x01) /* Bit 0: Start bit (master mode) */ -#define STR71X_I2CSR1_MSL (0x02) /* Bit 1: Master/slave */ -#define STR71X_I2CSR1_ADSL (0x04) /* Bit 2: Address matched */ -#define STR71X_I2CSR1_BTF (0x08) /* Bit 3: Byte transfer finished */ -#define STR71X_I2CSR1_BUSY (0x10) /* Bit 4: Bus busy */ -#define STR71X_I2CSR1_TRA (0x20) /* Bit 5: Transmitter/receiver */ -#define STR71X_I2CSR1_ADD10 (0x40) /* Bit 6: 10-bit addressing in master mode */ -#define STR71X_I2CSR1_EVF (0x80) /* Bit 7: Event flag */ - -/* I2C Status Register 2 (SR2) */ - -#define STR71X_I2CSR2_GCAL (0x01) /* Bit 0: General call (slave mode) */ -#define STR71X_I2CSR2_BERR (0x02) /* Bit 1: Bus error */ -#define STR71X_I2CSR2_ARLO (0x04) /* Bit 2: Arbitration lost */ -#define STR71X_I2CSR2_STOPF (0x08) /* Bit 3: Stop detection (slave mode) */ -#define STR71X_I2CSR2_AF (0x10) /* Bit 4: Acknowledge failure */ -#define STR71X_I2CSR2_ENDAD (0x20) /* Bit 5: End of address transmission */ - -/* I2C Clock Control Register (CCR) */ - -#define STR71X_I2CCCR_DIVMASK (0x7f) /* Bits 0-6: 7 bits of the 12-bit clock divider */ -#define STR71X_I2CCCR_FMSM (0x80) /* Bit 7: Fast/standard I2C mode */ - -/* I2C Extended Clock Control Register (ECCR) */ - -#define STR71X_I2CECCR_DIVMASK (0x1f) /* Bits 0-5: 5 bits of the 12-bit clock divider */ - -/* I2C Own Address Register 2 (OAR2) */ - -#define STR71X_I2COAR2_ADDRMASK (0x06) /* Bits 1-2: 2 bits of the 10-bit interface address */ -#define STR71X_I2COAR2_FREQMASK (0xe0) /* Bits 5-7: Frequency */ -#define STR71X_I2COAR2_5_10 (0x00) /* FPCLK1 = 5 to 10 */ -#define STR71X_I2COAR2_10_16 (0x20) /* FPCLK1 = 10 to 16.67 */ -#define STR71X_I2COAR2_16_26 (0x40) /* FPCLK1 = 16.67 to 26.67 */ -#define STR71X_I2COAR2_26_40 (0x60) /* FPCLK1 = 26.67 to 40 */ -#define STR71X_I2COAR2_40_53 (0x80) /* FPCLK1 = 40 to 53.33 */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_I2C_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_i2c.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_I2C_H +#define __ARCH_ARM_SRC_STR71X_STR71X_I2C_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Register offets ******************************************************************/ + +#define STR71X_I2C_CR_OFFSET (0x0000) /* 8-bits wide */ +#define STR71X_I2C_SR1_OFFSET (0x0004) /* 8-bits wide */ +#define STR71X_I2C_SR2_OFFSET (0x0008) /* 8-bits wide */ +#define STR71X_I2C_CCR_OFFSET (0x000c) /* 8-bits wide */ +#define STR71X_I2C_OAR1_OFFSET (0x0010) /* 8-bits wide */ +#define STR71X_I2C_OAR2_OFFSET (0x0014) /* 8-bits wide */ +#define STR71X_I2C_DR_OFFSET (0x0018) /* 8-bits wide */ +#define STR71X_I2C_ECCR_OFFSET (0x001c) /* 8-bits wide */ + +/* Registers ************************************************************************/ + +#define STR71X_I2C_CR(b) ((b) + STR71X_I2C_SR_OFFSET) +#define STR71X_I2C_SR1(b) ((b) + STR71X_I2C_SR1_OFFSET) +#define STR71X_I2C_SR2(b) ((b) + STR71X_I2C_SR2_OFFSET) +#define STR71X_I2C_CCR(b) ((b) + STR71X_I2C_CCR_OFFSET) +#define STR71X_I2C_OAR1(b) ((b) + STR71X_I2C_OAR1_OFFSET) +#define STR71X_I2C_OAR2(b) ((b) + STR71X_I2C_OAR2_OFFSET) +#define STR71X_I2C_DR(b) ((b) + STR71X_I2C_DR_OFFSET) +#define STR71X_I2C_ECCR(b) ((b) + STR71X_I2C_ECCR_OFFSET) + +#define STR71X_I2C0_CR (STR71X_I2C0_BASE + STR71X_I2C_SR_OFFSET) +#define STR71X_I2C0_SR1 (STR71X_I2C0_BASE + STR71X_I2C_SR1_OFFSET) +#define STR71X_I2C0_SR2 (STR71X_I2C0_BASE + STR71X_I2C_SR2_OFFSET) +#define STR71X_I2C0_CCR (STR71X_I2C0_BASE + STR71X_I2C_CCR_OFFSET) +#define STR71X_I2C0_OAR1 (STR71X_I2C0_BASE + STR71X_I2C_OAR1_OFFSET) +#define STR71X_I2C0_OAR2 (STR71X_I2C0_BASE + STR71X_I2C_OAR2_OFFSET) +#define STR71X_I2C0_DR (STR71X_I2C0_BASE + STR71X_I2C_DR_OFFSET) +#define STR71X_I2C0_ECCR (STR71X_I2C0_BASE + STR71X_I2C_ECCR_OFFSET) + +#define STR71X_I2C1_CR (STR71X_I2C1_BASE + STR71X_I2C_SR_OFFSET) +#define STR71X_I2C1_SR1 (STR71X_I2C1_BASE + STR71X_I2C_SR1_OFFSET) +#define STR71X_I2C1_SR2 (STR71X_I2C1_BASE + STR71X_I2C_SR2_OFFSET) +#define STR71X_I2C1_CCR (STR71X_I2C1_BASE + STR71X_I2C_CCR_OFFSET) +#define STR71X_I2C1_OAR1 (STR71X_I2C1_BASE + STR71X_I2C_OAR1_OFFSET) +#define STR71X_I2C1_OAR2 (STR71X_I2C1_BASE + STR71X_I2C_OAR2_OFFSET) +#define STR71X_I2C1_DR (STR71X_I2C1_BASE + STR71X_I2C_DR_OFFSET) +#define STR71X_I2C1_ECCR (STR71X_I2C1_BASE + STR71X_I2C_ECCR_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* I2C Control Register (CR) */ + +#define STR71X_I2CCR_ITE (0x01) /* Bit 0: Interrupt enable */ +#define STR71X_I2CCR_STOP (0x02) /* Bit 1: Generation of a stop condition */ +#define STR71X_I2CCR_ACK (0x04) /* Bit 2: Acknowledge enable */ +#define STR71X_I2CCR_START (0x08) /* Bit 3: Generation of a start condition */ +#define STR71X_I2CCR_ENGC (0x10) /* Bit 4: Enable general call */ +#define STR71X_I2CCR_PE (0x20) /* Bit 5: Peripheral enable */ + +/* I2C Status Register 1 (SR1) */ + +#define STR71X_I2CSR1_SB (0x01) /* Bit 0: Start bit (master mode) */ +#define STR71X_I2CSR1_MSL (0x02) /* Bit 1: Master/slave */ +#define STR71X_I2CSR1_ADSL (0x04) /* Bit 2: Address matched */ +#define STR71X_I2CSR1_BTF (0x08) /* Bit 3: Byte transfer finished */ +#define STR71X_I2CSR1_BUSY (0x10) /* Bit 4: Bus busy */ +#define STR71X_I2CSR1_TRA (0x20) /* Bit 5: Transmitter/receiver */ +#define STR71X_I2CSR1_ADD10 (0x40) /* Bit 6: 10-bit addressing in master mode */ +#define STR71X_I2CSR1_EVF (0x80) /* Bit 7: Event flag */ + +/* I2C Status Register 2 (SR2) */ + +#define STR71X_I2CSR2_GCAL (0x01) /* Bit 0: General call (slave mode) */ +#define STR71X_I2CSR2_BERR (0x02) /* Bit 1: Bus error */ +#define STR71X_I2CSR2_ARLO (0x04) /* Bit 2: Arbitration lost */ +#define STR71X_I2CSR2_STOPF (0x08) /* Bit 3: Stop detection (slave mode) */ +#define STR71X_I2CSR2_AF (0x10) /* Bit 4: Acknowledge failure */ +#define STR71X_I2CSR2_ENDAD (0x20) /* Bit 5: End of address transmission */ + +/* I2C Clock Control Register (CCR) */ + +#define STR71X_I2CCCR_DIVMASK (0x7f) /* Bits 0-6: 7 bits of the 12-bit clock divider */ +#define STR71X_I2CCCR_FMSM (0x80) /* Bit 7: Fast/standard I2C mode */ + +/* I2C Extended Clock Control Register (ECCR) */ + +#define STR71X_I2CECCR_DIVMASK (0x1f) /* Bits 0-5: 5 bits of the 12-bit clock divider */ + +/* I2C Own Address Register 2 (OAR2) */ + +#define STR71X_I2COAR2_ADDRMASK (0x06) /* Bits 1-2: 2 bits of the 10-bit interface address */ +#define STR71X_I2COAR2_FREQMASK (0xe0) /* Bits 5-7: Frequency */ +#define STR71X_I2COAR2_5_10 (0x00) /* FPCLK1 = 5 to 10 */ +#define STR71X_I2COAR2_10_16 (0x20) /* FPCLK1 = 10 to 16.67 */ +#define STR71X_I2COAR2_16_26 (0x40) /* FPCLK1 = 16.67 to 26.67 */ +#define STR71X_I2COAR2_26_40 (0x60) /* FPCLK1 = 26.67 to 40 */ +#define STR71X_I2COAR2_40_53 (0x80) /* FPCLK1 = 40 to 53.33 */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_I2C_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_internal.h b/nuttx/arch/arm/src/str71x/str71x_internal.h index 99012ca9c9..6e60a671cd 100644 --- a/nuttx/arch/arm/src/str71x/str71x_internal.h +++ b/nuttx/arch/arm/src/str71x/str71x_internal.h @@ -1,156 +1,156 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_internal.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H -#define __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Calculate the values of PCLK1 and PCLK2 from settings in board.h. - * - * Example: - * STR71X_RCCU_MAIN_OSC = 4MHz (not divided by 2) - * STR71X_CLK2 = 4MHz - * STR71X_PLL1OUT = 16 * STR71X_CLK2 / 2 = 32MHz - * CLK3 = 32MHz - * RCLK = 32MHz - * PCLK1 = 32MHz / 1 = 32MHz - */ - -/* PLL1OUT derives from Main OSC->CLK2 */ - -#ifdef STR71X_PLL1IN_DIV2 /* CLK2 is input to PLL1 */ -# define STR71X_CLK2 (STR71X_RCCU_MAIN_OSC/2) /* CLK2 is OSC/2 */ -#else -# define STR71X_CLK2 STR71X_RCCU_MAIN_OSC /* CLK2 is OSC */ -#endif - -#define STR71X_PLL1OUT ((STR71X_PLL1OUT_MUL * STR71X_CLK2) / STR71X_PLL1OUT_DIV) - -/* PLL2 OUT derives from HCLK */ - -#define STR71X_PLL2OUT ((STR71X_PLL2OUT_MUL * STR71X_HCLK) / STR71X_PLL2OUT_DIV) - -/* Peripheral clocks derive from PLL1OUT->CLK3->RCLK->PCLK1/2 */ - -#define STR71X_CLK3 STR71X_PLL1OUT /* CLK3 hard coded to be PLL1OUT */ -#define STR71X_RCLK STR71X_CLK3 /* RCLK hard coded to be CLK3 */ -#define STR71X_PCLK1 (STR71X_RCLK / STR71X_APB1_DIV) /* PCLK1 derives from RCLK */ -#define STR71X_PCLK2 (STR71X_RCLK / STR71X_APB2_DIV) /* PCLK2 derives from RCLK */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/******************************************************************************** - * Name: str7x_xtiinitialize - * - * Description: - * Configure XTI for operation. Note that the lines are not used as wake-up - * sources in this implementation. Some extensions would be required for that - * capability. - * - ********************************************************************************/ - -#ifdef CONFIG_STR71X_XTI -extern int str71x_xtiinitialize(void); -#else -# define str71x_xtiinitialize() -#endif /* CONFIG_STR71X_XTI */ - -/******************************************************************************** - * Name: str7x_xticonfig - * - * Description: - * Configure an external line to provide interrupts. Interrupt is configured, - * but disabled on return. - * - ********************************************************************************/ - -#ifdef CONFIG_STR71X_XTI -extern int str71x_xticonfig(int irq, bool rising); -#else -# define str71x_xticonfig(irq,rising) -#endif /* CONFIG_STR71X_XTI */ - -/**************************************************************************** - * Name: str71x_enable_xtiirq - * - * Description: - * Enable an external interrupt. - * - ****************************************************************************/ - -#ifdef CONFIG_STR71X_XTI -extern void str71x_enable_xtiirq(int irq); -#else -# define str71x_enable_xtiirq(irq) -#endif /* CONFIG_STR71X_XTI */ - -/**************************************************************************** - * Name: str71x_disable_xtiirq - * - * Description: - * Disable an external interrupt. - * - ****************************************************************************/ - -#ifdef CONFIG_STR71X_XTI -extern void str71x_disable_xtiirq(int irq); -#else -# define str71x_disable_xtiirq(irq) -#endif /* CONFIG_STR71X_XTI */ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_internal.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H +#define __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Calculate the values of PCLK1 and PCLK2 from settings in board.h. + * + * Example: + * STR71X_RCCU_MAIN_OSC = 4MHz (not divided by 2) + * STR71X_CLK2 = 4MHz + * STR71X_PLL1OUT = 16 * STR71X_CLK2 / 2 = 32MHz + * CLK3 = 32MHz + * RCLK = 32MHz + * PCLK1 = 32MHz / 1 = 32MHz + */ + +/* PLL1OUT derives from Main OSC->CLK2 */ + +#ifdef STR71X_PLL1IN_DIV2 /* CLK2 is input to PLL1 */ +# define STR71X_CLK2 (STR71X_RCCU_MAIN_OSC/2) /* CLK2 is OSC/2 */ +#else +# define STR71X_CLK2 STR71X_RCCU_MAIN_OSC /* CLK2 is OSC */ +#endif + +#define STR71X_PLL1OUT ((STR71X_PLL1OUT_MUL * STR71X_CLK2) / STR71X_PLL1OUT_DIV) + +/* PLL2 OUT derives from HCLK */ + +#define STR71X_PLL2OUT ((STR71X_PLL2OUT_MUL * STR71X_HCLK) / STR71X_PLL2OUT_DIV) + +/* Peripheral clocks derive from PLL1OUT->CLK3->RCLK->PCLK1/2 */ + +#define STR71X_CLK3 STR71X_PLL1OUT /* CLK3 hard coded to be PLL1OUT */ +#define STR71X_RCLK STR71X_CLK3 /* RCLK hard coded to be CLK3 */ +#define STR71X_PCLK1 (STR71X_RCLK / STR71X_APB1_DIV) /* PCLK1 derives from RCLK */ +#define STR71X_PCLK2 (STR71X_RCLK / STR71X_APB2_DIV) /* PCLK2 derives from RCLK */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/******************************************************************************** + * Name: str7x_xtiinitialize + * + * Description: + * Configure XTI for operation. Note that the lines are not used as wake-up + * sources in this implementation. Some extensions would be required for that + * capability. + * + ********************************************************************************/ + +#ifdef CONFIG_STR71X_XTI +extern int str71x_xtiinitialize(void); +#else +# define str71x_xtiinitialize() +#endif /* CONFIG_STR71X_XTI */ + +/******************************************************************************** + * Name: str7x_xticonfig + * + * Description: + * Configure an external line to provide interrupts. Interrupt is configured, + * but disabled on return. + * + ********************************************************************************/ + +#ifdef CONFIG_STR71X_XTI +extern int str71x_xticonfig(int irq, bool rising); +#else +# define str71x_xticonfig(irq,rising) +#endif /* CONFIG_STR71X_XTI */ + +/**************************************************************************** + * Name: str71x_enable_xtiirq + * + * Description: + * Enable an external interrupt. + * + ****************************************************************************/ + +#ifdef CONFIG_STR71X_XTI +extern void str71x_enable_xtiirq(int irq); +#else +# define str71x_enable_xtiirq(irq) +#endif /* CONFIG_STR71X_XTI */ + +/**************************************************************************** + * Name: str71x_disable_xtiirq + * + * Description: + * Disable an external interrupt. + * + ****************************************************************************/ + +#ifdef CONFIG_STR71X_XTI +extern void str71x_disable_xtiirq(int irq); +#else +# define str71x_disable_xtiirq(irq) +#endif /* CONFIG_STR71X_XTI */ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_INTERNAL_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_irq.c b/nuttx/arch/arm/src/str71x/str71x_irq.c index c5c359cdf3..3bf8706683 100644 --- a/nuttx/arch/arm/src/str71x/str71x_irq.c +++ b/nuttx/arch/arm/src/str71x/str71x_irq.c @@ -2,7 +2,7 @@ * arch/arm/src/st71x/st71x_irq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_lowputc.c b/nuttx/arch/arm/src/str71x/str71x_lowputc.c index a34b185c8f..fde33adb4c 100644 --- a/nuttx/arch/arm/src/str71x/str71x_lowputc.c +++ b/nuttx/arch/arm/src/str71x/str71x_lowputc.c @@ -2,7 +2,7 @@ * arch/arm/src/str71x/str71x_lowputc.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_map.h b/nuttx/arch/arm/src/str71x/str71x_map.h index ad29e4d8d2..e61be9e3e4 100644 --- a/nuttx/arch/arm/src/str71x/str71x_map.h +++ b/nuttx/arch/arm/src/str71x/str71x_map.h @@ -1,99 +1,99 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_map.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_MAP_H -#define __ARCH_ARM_SRC_STR71X_STR71X_MAP_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Memory Map ***********************************************************************/ - -#define STR71X_FLASHRAMEMI_BASE (0x00000000) /* Flash alias for booting */ -#define STR71X_RAM_BASE (0x20000000) -#define STR71X_FLASH_BASE (0x40000000) -#define STR71X_FLASHREG_BASE (0x40100000) -#define STR71X_EXTMEM_BASE (0x60000000) -#define STR71X_EMI_BASE (STR71X_EXTMEM_BASE + 0x0c000000) -#define STR71X_RCCU_BASE (0xa0000000) -#define STR71X_PCU_BASE (0xa0000040) -#define STR71X_APB1_BASE (0xc0000000) -#define STR71X_I2C0_BASE (STR71X_APB1_BASE + 0x1000) -#define STR71X_I2C1_BASE (STR71X_APB1_BASE + 0x2000) -#define STR71X_UART0_BASE (STR71X_APB1_BASE + 0x4000) -#define STR71X_UART1_BASE (STR71X_APB1_BASE + 0x5000) -#define STR71X_UART2_BASE (STR71X_APB1_BASE + 0x6000) -#define STR71X_UART3_BASE (STR71X_APB1_BASE + 0x7000) -#define STR71X_USBRAM_BASE (STR71X_APB1_BASE + 0x8000) -#define STR71X_USB_BASE (STR71X_APB1_BASE + 0x8800) -#define STR71X_CAN_BASE (STR71X_APB1_BASE + 0x9000) -#define STR71X_BSPI0_BASE (STR71X_APB1_BASE + 0xa000) -#define STR71X_BSPI1_BASE (STR71X_APB1_BASE + 0xb000) -#define STR71X_HDLCRAM_BASE (STR71X_APB1_BASE + 0xe000) -#define STR71X_APB2_BASE (0xe0000000) -#define STR71X_XTI_BASE (STR71X_APB2_BASE + 0x1000) -#define STR71X_GPIO0_BASE (STR71X_APB2_BASE + 0x3000) -#define STR71X_GPIO1_BASE (STR71X_APB2_BASE + 0x4000) -#define STR71X_GPIO2_BASE (STR71X_APB2_BASE + 0x5000) -#define STR71X_ADC12_BASE (STR71X_APB2_BASE + 0x7000) -#define STR71X_CLKOUT_BASE (STR71X_APB2_BASE + 0x8000) -#define STR71X_TIMER0_BASE (STR71X_APB2_BASE + 0x9000) -#define STR71X_TIMER1_BASE (STR71X_APB2_BASE + 0xa000) -#define STR71X_TIMER2_BASE (STR71X_APB2_BASE + 0xb000) -#define STR71X_TIMER3_BASE (STR71X_APB2_BASE + 0xc000) -#define STR71X_RTC_BASE (STR71X_APB2_BASE + 0xd000) -#define STR71X_WDOG_BASE (STR71X_APB2_BASE + 0xe000) -#define STR71X_EIC_BASE (0xfffff800) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif // __ARCH_ARM_SRC_STR71X_STR71X_MAP_H +/************************************************************************************ + * arch/arm/src/str71x/str71x_map.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_MAP_H +#define __ARCH_ARM_SRC_STR71X_STR71X_MAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Memory Map ***********************************************************************/ + +#define STR71X_FLASHRAMEMI_BASE (0x00000000) /* Flash alias for booting */ +#define STR71X_RAM_BASE (0x20000000) +#define STR71X_FLASH_BASE (0x40000000) +#define STR71X_FLASHREG_BASE (0x40100000) +#define STR71X_EXTMEM_BASE (0x60000000) +#define STR71X_EMI_BASE (STR71X_EXTMEM_BASE + 0x0c000000) +#define STR71X_RCCU_BASE (0xa0000000) +#define STR71X_PCU_BASE (0xa0000040) +#define STR71X_APB1_BASE (0xc0000000) +#define STR71X_I2C0_BASE (STR71X_APB1_BASE + 0x1000) +#define STR71X_I2C1_BASE (STR71X_APB1_BASE + 0x2000) +#define STR71X_UART0_BASE (STR71X_APB1_BASE + 0x4000) +#define STR71X_UART1_BASE (STR71X_APB1_BASE + 0x5000) +#define STR71X_UART2_BASE (STR71X_APB1_BASE + 0x6000) +#define STR71X_UART3_BASE (STR71X_APB1_BASE + 0x7000) +#define STR71X_USBRAM_BASE (STR71X_APB1_BASE + 0x8000) +#define STR71X_USB_BASE (STR71X_APB1_BASE + 0x8800) +#define STR71X_CAN_BASE (STR71X_APB1_BASE + 0x9000) +#define STR71X_BSPI0_BASE (STR71X_APB1_BASE + 0xa000) +#define STR71X_BSPI1_BASE (STR71X_APB1_BASE + 0xb000) +#define STR71X_HDLCRAM_BASE (STR71X_APB1_BASE + 0xe000) +#define STR71X_APB2_BASE (0xe0000000) +#define STR71X_XTI_BASE (STR71X_APB2_BASE + 0x1000) +#define STR71X_GPIO0_BASE (STR71X_APB2_BASE + 0x3000) +#define STR71X_GPIO1_BASE (STR71X_APB2_BASE + 0x4000) +#define STR71X_GPIO2_BASE (STR71X_APB2_BASE + 0x5000) +#define STR71X_ADC12_BASE (STR71X_APB2_BASE + 0x7000) +#define STR71X_CLKOUT_BASE (STR71X_APB2_BASE + 0x8000) +#define STR71X_TIMER0_BASE (STR71X_APB2_BASE + 0x9000) +#define STR71X_TIMER1_BASE (STR71X_APB2_BASE + 0xa000) +#define STR71X_TIMER2_BASE (STR71X_APB2_BASE + 0xb000) +#define STR71X_TIMER3_BASE (STR71X_APB2_BASE + 0xc000) +#define STR71X_RTC_BASE (STR71X_APB2_BASE + 0xd000) +#define STR71X_WDOG_BASE (STR71X_APB2_BASE + 0xe000) +#define STR71X_EIC_BASE (0xfffff800) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif // __ARCH_ARM_SRC_STR71X_STR71X_MAP_H diff --git a/nuttx/arch/arm/src/str71x/str71x_pcu.h b/nuttx/arch/arm/src/str71x/str71x_pcu.h index 19050253e0..5e23204f04 100644 --- a/nuttx/arch/arm/src/str71x/str71x_pcu.h +++ b/nuttx/arch/arm/src/str71x/str71x_pcu.h @@ -1,159 +1,159 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_pcu.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_PCU_H -#define __ARCH_ARM_SRC_STR71X_STR71X_PCU_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Power Control Unit (PCU) register offsets ****************************************/ - -#define STR71X_PCU_MDIVR_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_PCU_PDIVR_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_PCU_RSTR_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_PCU_PLL2CR_OFFSET (0x000c) /* 16-bits wide */ -#define STR71X_PCU_BOOTCR_OFFSET (0x0010) /* 16-bits wide */ -#define STR71X_PCU_PWRCR_OFFSET (0x0014) /* 16-bits wide */ - -/* Power Control Unit (PCU) register addresses **************************************/ - -#define STR71X_PCU_MDIVR (STR71X_PCU_BASE + STR71X_PCU_MDIVR_OFFSET) -#define STR71X_PCU_PDIVR (STR71X_PCU_BASE + STR71X_PCU_PDIVR_OFFSET) -#define STR71X_PCU_RSTR (STR71X_PCU_BASE + STR71X_PCU_RSTR_OFFSET) -#define STR71X_PCU_PLL2CR (STR71X_PCU_BASE + STR71X_PCU_PLL2CR_OFFSET) -#define STR71X_PCU_BOOTCR (STR71X_PCU_BASE + STR71X_PCU_BOOTCR_OFFSET) -#define STR71X_PCU_PWRCR (STR71X_PCU_BASE + STR71X_PCU_PWRCR_OFFSET) - -/* Register bit settings ************************************************************/ - -/* PCU MDIVR register bit definitions */ - -#define STR71X_PCUMDIVR_FACTMASK (0x0003) /* Bits 0-1: Division factor for main system clock */ -#define STR71X_PCUMDIVR_DIV1 (0x0000) /* MCLK = RCLK */ -#define STR71X_PCUMDIVR_DIV2 (0x0001) /* MCLK = RCLK / 2 */ -#define STR71X_PCUMDIVR_DIV4 (0x0002) /* MCLK = RCLK / 4 */ -#define STR71X_PCUMDIVR_DIV8 (0x0003) /* MCLK = RCLK / 8 */ - -/* PCU PDIVR register bit definitions */ - -#define STR71X_PCUPDIVR_FACT1MASK (0x0003) /* Bits 0-1: Division factor for APB1 peripherals */ -#define STR71X_PCUPDIVR_APB1DIV1 (0x0000) /* PCLK1 = RCLK */ -#define STR71X_PCUPDIVR_APB1DIV2 (0x0001) /* PCLK1 = RCLK / 2 */ -#define STR71X_PCUPDIVR_APB1DIV4 (0x0002) /* PCLK1 = RCLK / 4 */ -#define STR71X_PCUPDIVR_APB1DIV8 (0x0003) /* PCLK1 = RCLK / 8 */ -#define STR71X_PCUPDIVR_FACT2MASK (0x0300) /* Bits 8-9: Division factor for APB2 peripherals */ -#define STR71X_PCUPDIVR_APB2DIV1 (0x0000) /* PCLK2 = RCLK */ -#define STR71X_PCUPDIVR_APB2DIV2 (0x0100) /* PCLK2 = RCLK / 2 */ -#define STR71X_PCUPDIVR_APB2DIV4 (0x0200) /* PCLK2 = RCLK / 4 */ -#define STR71X_PCUPDIVR_APB2DIV8 (0x0300) /* PCLK2 = RCLK / 8 */ - -/* PCU RSTR register bit definitions */ - -#define STR71X_PCURSTR_EMIRESET (0x0004) /* Bit 2: EMI reset */ - -/* PCU PLL2CR register bit definitions */ - -#define STR71X_PCUPPL2CR_DXMASK (0x0007) /* Bits 0-2: PLL2 output clock divider */ -#define STR71X_PCUPPL2CR_DIV1 (0x0000) /* PLL2 / 1 */ -#define STR71X_PCUPPL2CR_DIV2 (0x0001) /* PLL2 / 2 */ -#define STR71X_PCUPPL2CR_DIV3 (0x0002) /* PLL2 / 3 */ -#define STR71X_PCUPPL2CR_DIV4 (0x0003) /* PLL2 / 4 */ -#define STR71X_PCUPPL2CR_DIV5 (0x0004) /* PLL2 / 5 */ -#define STR71X_PCUPPL2CR_DIV6 (0x0005) /* PLL2 / 6 */ -#define STR71X_PCUPPL2CR_DIV7 (0x0006) /* PLL2 / 7 */ -#define STR71X_PCUPPL2CR_OFF (0x0007) /* PLL2 OFF */ -#define STR71X_PCUPPL2CR_MXMASK (0x0030) /* Bits 4-5: PLL2 multiplier */ -#define STR71X_PCUPPL2CR_MUL20 (0x0000) /* CLK2 * 20 */ -#define STR71X_PCUPPL2CR_MUL12 (0x0010) /* CLK2 * 12 */ -#define STR71X_PCUPPL2CR_MUL28 (0x0020) /* CLK2 * 28 */ -#define STR71X_PCUPPL2CR_MUL16 (0x0030) /* CLK2 * 16 */ -#define STR71X_PCUPPL2CR_FRQRNG (0x0040) /* Bit 6: PLL2 frequency range selection */ -#define STR71X_PCUPPL2CR_PLLEN (0x0080) /* Bit 7: PLL2 enable */ -#define STR71X_PCUPPL2CR_USBEN (0x0100) /* Bit 8: Enable PLL clock to USB */ -#define STR71X_PCUPPL2CR_IRQMASK (0x0200) /* Bit 9: Enable interrupt request CPU on lock transition */ -#define STR71X_PCUPPL2CR_IRQPEND (0x0400) /* Bit 10: Interrtup request to CPU on lock transition pending */ -#define STR71X_PCUPPL2CR_LOCK (0x8000) /* Bit 15: PLL2 locked */ - -/* PCU BOOTCR register bit definitions */ - -#define STR71X_PCUBOOTCR_BOOTMASK (0x0003) /* Bits 0-1: Boot mode */ -#define STR71X_PCUBOOTCR_BMFLASH (0x0000) /* FLASH */ -#define STR71X_PCUBOOTCR_BMRAM (0x0002) /* RAM */ -#define STR71X_PCUBOOTCR_BMEXTMEM (0x0003) /* FLASH */ -#define STR71X_PCUBOOTCR_BSPIOEN (0x0004) /* Bit 2: Enable BSPI0 */ -#define STR71X_PCUBOOTCR_USBFILTEN (0x0008) /* Bit 3: Enable USB standby filtering */ -#define STR71X_PCUBOOTCR_LPOWDBGEN (0x0010) /* Bit 4: Enable reserved features for STOP mode */ -#define STR71X_PCUBOOTCR_ACDEN (0x0020) /* Bit 5: Enable ADC */ -#define STR71X_PCUBOOTCR_CANACTIVE (0x0040) /* Bit 6: CAN active */ -#define STR71X_PCUBOOTCR_HDLCACTIVE (0x0080) /* Bit 7: HDLC active */ -#define STR71X_PCUBOOTCR_PKG64 (0x0200) /* Bit 9: Die is hosted in 64-pin package */ - -/* PCU PWRCR register bit definitions */ - -#define STR71X_PCUPWRCR_VRBYP (0x0008) /* Bit 3: Main regulator bypass */ -#define STR71X_PCUPWRCR_LPRWFI (0x0010) /* Bit 4: Low power regulator in wait-for-interrupt mode */ -#define STR71X_PCUPWRCR_LPRBYP (0x0020) /* Bit 5: Low power regulator bypass */ -#define STR71X_PCUPWRCR_PWRDWN (0x0040) /* Bit 6: Activate standby mode */ -#define STR71X_PCUPWRCR_OSCBYP (0x0080) /* Bit 7: 32KHz oscillator bypass */ -#define STR71X_PCUPWRCR_LVDDIS (0x0100) /* Bit 8: Low voltage detector disable */ -#define STR71X_PCUPWRCR_FLASHLP (0x0200) /* Bit 9: FLASH low speed (low power) select */ -#define STR71X_PCUPWRCR_VROK (0x1000) /* Bit 12: Voltage regulator OK */ -#define STR71X_PCUPWRCR_WKUPALRM (0x2000) /* Bit 13: Wakeup or alarm active */ -#define STR71X_PCUPWRCR_BUSY (0x4000) /* Bit 14: PCU register backup logic busy */ -#define STR71X_PCUPWRCR_WREN (0x8000) /* Bit 15: PCU register write enable */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_PCU_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_pcu.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_PCU_H +#define __ARCH_ARM_SRC_STR71X_STR71X_PCU_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Power Control Unit (PCU) register offsets ****************************************/ + +#define STR71X_PCU_MDIVR_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_PCU_PDIVR_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_PCU_RSTR_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_PCU_PLL2CR_OFFSET (0x000c) /* 16-bits wide */ +#define STR71X_PCU_BOOTCR_OFFSET (0x0010) /* 16-bits wide */ +#define STR71X_PCU_PWRCR_OFFSET (0x0014) /* 16-bits wide */ + +/* Power Control Unit (PCU) register addresses **************************************/ + +#define STR71X_PCU_MDIVR (STR71X_PCU_BASE + STR71X_PCU_MDIVR_OFFSET) +#define STR71X_PCU_PDIVR (STR71X_PCU_BASE + STR71X_PCU_PDIVR_OFFSET) +#define STR71X_PCU_RSTR (STR71X_PCU_BASE + STR71X_PCU_RSTR_OFFSET) +#define STR71X_PCU_PLL2CR (STR71X_PCU_BASE + STR71X_PCU_PLL2CR_OFFSET) +#define STR71X_PCU_BOOTCR (STR71X_PCU_BASE + STR71X_PCU_BOOTCR_OFFSET) +#define STR71X_PCU_PWRCR (STR71X_PCU_BASE + STR71X_PCU_PWRCR_OFFSET) + +/* Register bit settings ************************************************************/ + +/* PCU MDIVR register bit definitions */ + +#define STR71X_PCUMDIVR_FACTMASK (0x0003) /* Bits 0-1: Division factor for main system clock */ +#define STR71X_PCUMDIVR_DIV1 (0x0000) /* MCLK = RCLK */ +#define STR71X_PCUMDIVR_DIV2 (0x0001) /* MCLK = RCLK / 2 */ +#define STR71X_PCUMDIVR_DIV4 (0x0002) /* MCLK = RCLK / 4 */ +#define STR71X_PCUMDIVR_DIV8 (0x0003) /* MCLK = RCLK / 8 */ + +/* PCU PDIVR register bit definitions */ + +#define STR71X_PCUPDIVR_FACT1MASK (0x0003) /* Bits 0-1: Division factor for APB1 peripherals */ +#define STR71X_PCUPDIVR_APB1DIV1 (0x0000) /* PCLK1 = RCLK */ +#define STR71X_PCUPDIVR_APB1DIV2 (0x0001) /* PCLK1 = RCLK / 2 */ +#define STR71X_PCUPDIVR_APB1DIV4 (0x0002) /* PCLK1 = RCLK / 4 */ +#define STR71X_PCUPDIVR_APB1DIV8 (0x0003) /* PCLK1 = RCLK / 8 */ +#define STR71X_PCUPDIVR_FACT2MASK (0x0300) /* Bits 8-9: Division factor for APB2 peripherals */ +#define STR71X_PCUPDIVR_APB2DIV1 (0x0000) /* PCLK2 = RCLK */ +#define STR71X_PCUPDIVR_APB2DIV2 (0x0100) /* PCLK2 = RCLK / 2 */ +#define STR71X_PCUPDIVR_APB2DIV4 (0x0200) /* PCLK2 = RCLK / 4 */ +#define STR71X_PCUPDIVR_APB2DIV8 (0x0300) /* PCLK2 = RCLK / 8 */ + +/* PCU RSTR register bit definitions */ + +#define STR71X_PCURSTR_EMIRESET (0x0004) /* Bit 2: EMI reset */ + +/* PCU PLL2CR register bit definitions */ + +#define STR71X_PCUPPL2CR_DXMASK (0x0007) /* Bits 0-2: PLL2 output clock divider */ +#define STR71X_PCUPPL2CR_DIV1 (0x0000) /* PLL2 / 1 */ +#define STR71X_PCUPPL2CR_DIV2 (0x0001) /* PLL2 / 2 */ +#define STR71X_PCUPPL2CR_DIV3 (0x0002) /* PLL2 / 3 */ +#define STR71X_PCUPPL2CR_DIV4 (0x0003) /* PLL2 / 4 */ +#define STR71X_PCUPPL2CR_DIV5 (0x0004) /* PLL2 / 5 */ +#define STR71X_PCUPPL2CR_DIV6 (0x0005) /* PLL2 / 6 */ +#define STR71X_PCUPPL2CR_DIV7 (0x0006) /* PLL2 / 7 */ +#define STR71X_PCUPPL2CR_OFF (0x0007) /* PLL2 OFF */ +#define STR71X_PCUPPL2CR_MXMASK (0x0030) /* Bits 4-5: PLL2 multiplier */ +#define STR71X_PCUPPL2CR_MUL20 (0x0000) /* CLK2 * 20 */ +#define STR71X_PCUPPL2CR_MUL12 (0x0010) /* CLK2 * 12 */ +#define STR71X_PCUPPL2CR_MUL28 (0x0020) /* CLK2 * 28 */ +#define STR71X_PCUPPL2CR_MUL16 (0x0030) /* CLK2 * 16 */ +#define STR71X_PCUPPL2CR_FRQRNG (0x0040) /* Bit 6: PLL2 frequency range selection */ +#define STR71X_PCUPPL2CR_PLLEN (0x0080) /* Bit 7: PLL2 enable */ +#define STR71X_PCUPPL2CR_USBEN (0x0100) /* Bit 8: Enable PLL clock to USB */ +#define STR71X_PCUPPL2CR_IRQMASK (0x0200) /* Bit 9: Enable interrupt request CPU on lock transition */ +#define STR71X_PCUPPL2CR_IRQPEND (0x0400) /* Bit 10: Interrtup request to CPU on lock transition pending */ +#define STR71X_PCUPPL2CR_LOCK (0x8000) /* Bit 15: PLL2 locked */ + +/* PCU BOOTCR register bit definitions */ + +#define STR71X_PCUBOOTCR_BOOTMASK (0x0003) /* Bits 0-1: Boot mode */ +#define STR71X_PCUBOOTCR_BMFLASH (0x0000) /* FLASH */ +#define STR71X_PCUBOOTCR_BMRAM (0x0002) /* RAM */ +#define STR71X_PCUBOOTCR_BMEXTMEM (0x0003) /* FLASH */ +#define STR71X_PCUBOOTCR_BSPIOEN (0x0004) /* Bit 2: Enable BSPI0 */ +#define STR71X_PCUBOOTCR_USBFILTEN (0x0008) /* Bit 3: Enable USB standby filtering */ +#define STR71X_PCUBOOTCR_LPOWDBGEN (0x0010) /* Bit 4: Enable reserved features for STOP mode */ +#define STR71X_PCUBOOTCR_ACDEN (0x0020) /* Bit 5: Enable ADC */ +#define STR71X_PCUBOOTCR_CANACTIVE (0x0040) /* Bit 6: CAN active */ +#define STR71X_PCUBOOTCR_HDLCACTIVE (0x0080) /* Bit 7: HDLC active */ +#define STR71X_PCUBOOTCR_PKG64 (0x0200) /* Bit 9: Die is hosted in 64-pin package */ + +/* PCU PWRCR register bit definitions */ + +#define STR71X_PCUPWRCR_VRBYP (0x0008) /* Bit 3: Main regulator bypass */ +#define STR71X_PCUPWRCR_LPRWFI (0x0010) /* Bit 4: Low power regulator in wait-for-interrupt mode */ +#define STR71X_PCUPWRCR_LPRBYP (0x0020) /* Bit 5: Low power regulator bypass */ +#define STR71X_PCUPWRCR_PWRDWN (0x0040) /* Bit 6: Activate standby mode */ +#define STR71X_PCUPWRCR_OSCBYP (0x0080) /* Bit 7: 32KHz oscillator bypass */ +#define STR71X_PCUPWRCR_LVDDIS (0x0100) /* Bit 8: Low voltage detector disable */ +#define STR71X_PCUPWRCR_FLASHLP (0x0200) /* Bit 9: FLASH low speed (low power) select */ +#define STR71X_PCUPWRCR_VROK (0x1000) /* Bit 12: Voltage regulator OK */ +#define STR71X_PCUPWRCR_WKUPALRM (0x2000) /* Bit 13: Wakeup or alarm active */ +#define STR71X_PCUPWRCR_BUSY (0x4000) /* Bit 14: PCU register backup logic busy */ +#define STR71X_PCUPWRCR_WREN (0x8000) /* Bit 15: PCU register write enable */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_PCU_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_prccu.c b/nuttx/arch/arm/src/str71x/str71x_prccu.c index 61cee03dde..5379b11642 100644 --- a/nuttx/arch/arm/src/str71x/str71x_prccu.c +++ b/nuttx/arch/arm/src/str71x/str71x_prccu.c @@ -2,7 +2,7 @@ * arch/arm/src/str71x/str71x_prccu.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_rccu.h b/nuttx/arch/arm/src/str71x/str71x_rccu.h index 858bd80892..ed3114c2c9 100644 --- a/nuttx/arch/arm/src/str71x/str71x_rccu.h +++ b/nuttx/arch/arm/src/str71x/str71x_rccu.h @@ -1,143 +1,143 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_rccu.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H -#define __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Reset and Clock Control Unit (RCCU) register offsets *****************************/ - -/* All registers are 32-bits wide, but with the top 16 bits "reserved" */ - -#define STR71X_RCCU_CCR_OFFSET (0x0000) /* 32-bits wide */ -#define STR71X_RCCU_CFR_OFFSET (0x0008) /* 32-bits wide */ -#define STR71X_RCCU_PLL1CR_OFFSET (0x0018) /* 32-bits wide */ -#define STR71X_RCCU_PER_OFFSET (0x001c) /* 32-bits wide */ -#define STR71X_RCCU_SMR_OFFSET (0x0020) /* 32-bits wide */ - -/* Reset and Clock Control Unit (RCCU) register addresses ***************************/ - -#define STR71X_RCCU_CCR (STR71X_RCCU_BASE + STR71X_RCCU_CCR_OFFSET) -#define STR71X_RCCU_CFR (STR71X_RCCU_BASE + STR71X_RCCU_CFR_OFFSET) -#define STR71X_RCCU_PLL1CR (STR71X_RCCU_BASE + STR71X_RCCU_PLL1CR_OFFSET) -#define STR71X_RCCU_PER (STR71X_RCCU_BASE + STR71X_RCCU_PER_OFFSET) -#define STR71X_RCCU_SMR (STR71X_RCCU_BASE + STR71X_RCCU_SMR_OFFSET) - -/* Register bit settings ************************************************************/ - -/* RCCU CCR register bit definitions */ - -#define STR71X_RCCUCCR_LPOWFI (0x00000001) /* Bit 0: Low power mode in wait-for-interrupt mode */ -#define STR71X_RCCUCCR_WFICLKSEL (0x00000002) /* Bit 1: WFI clock select */ -#define STR71X_RCCUCCR_CKAFSEL (0x00000004) /* Bit 2: Alternate function clock select */ -#define STR71X_RCCUCCR_SRESEN (0x00000008) /* Bit 3: Software reset enable */ -#define STR71X_RCCUCCR_ENCLOCK (0x00000080) /* Bit 7: Lock interrupt enable */ -#define STR71X_RCCUCCR_ENCKAF (0x00000100) /* Bit 8: CKAF interrupt enable */ -#define STR71X_RCCUCCR_ENCK216 (0x00000200) /* Bit 9: CK2_16 interrupt enable */ -#define STR71X_RCCUCCR_ENSTOP (0x00000400) /* Bit 10: Stop interrupt enable */ -#define STR71X_RCCUCCR_ENHALT (0x00000800) /* Bit 11: Enable halt */ - -/* RCCU CFR register bit definitions */ - -#define STR71X_RCCUCFR_CSUCKSEL (0x00000001) /* Bit 0: CSU clock select */ -#define STR71X_RCCUCFR_LOCK (0x00000002) /* Bit 1: PLL locked-in */ -#define STR71X_RCCUCFR_CKAFST (0x00000004) /* Bit 2: CK_AF status */ -#define STR71X_RCCUCFR_CK216 (0x00000008) /* Bit 3: CLK2/16 selection */ -#define STR71X_RCCUCFR_CKSTOPEN (0x00000010) /* Bit 4: Clock stop enable */ -#define STR71X_RCCUCFR_SOFTRES (0x00000020) /* Bit 5: Software reset */ -#define STR71X_RCCUCFR_WDGRES (0x00000040) /* Bit 6: Watchdog reset */ -#define STR71X_RCCUCFR_RTCALARM (0x00000080) /* Bit 7: RTC alarm reset */ -#define STR71X_RCCUCFR_LVDRES (0x00000200) /* Bit 9: Voltage regulator low voltage detector reset */ -#define STR71X_RCCUCFR_WKPRES (0x00000400) /* Bit 10: External wakeup */ -#define STR71X_RCCUCFR_LOCKI (0x00000800) /* Bit 11: Lock interrupt pending */ -#define STR71X_RCCUCFR_CKAFI (0x00001000) /* Bit 12: CK_AF switching interrupt pending */ -#define STR71X_RCCUCFR_CK216I (0x00002000) /* Bit 13: CK2_16 switching interrupt pending */ -#define STR71X_RCCUCFR_STOPI (0x00004000) /* Bit 14: Stop interrupt pending */ -#define STR71X_RCCUCFR_DIV2 (0x00008000) /* Bit 15: OSCIN divided by 2 */ - -/* RCCU PPL1CR register bit definitions */ - -#define STR71X_RCCUPLL1CR_DXMASK (0x00000003) /* Bit 0-2: PLL1 clock divisor */ -#define STR71X_RCCUPLL1CR_DIV1 (0x00000000) /* PLLCK / 1 */ -#define STR71X_RCCUPLL1CR_DIV2 (0x00000001) /* PLLCK / 2 */ -#define STR71X_RCCUPLL1CR_DIV3 (0x00000002) /* PLLCK / 3 */ -#define STR71X_RCCUPLL1CR_DIV4 (0x00000003) /* PLLCK / 4 */ -#define STR71X_RCCUPLL1CR_DIV5 (0x00000004) /* PLLCK / 5 */ -#define STR71X_RCCUPLL1CR_DIV6 (0x00000005) /* PLLCK / 6 */ -#define STR71X_RCCUPLL1CR_DIV7 (0x00000006) /* PLLCK / 7 */ -#define STR71X_RCCUPLL1CR_CLK2 (0x00000007) /* FREEN==0: CLK2 */ -#define STR71X_RCCUPLL1CR_FREERM (0x00000007) /* FREEN==1: PLL1 in free running mode */ -#define STR71X_RCCUPLL1CR_MXMASK (0x00000030) /* Bit 4-5: PLL1 clock multiplier */ -#define STR71X_RCCUPLL1CR_MUL20 (0x00000000) /* CLK2 * 20 */ -#define STR71X_RCCUPLL1CR_MUL12 (0x00000010) /* CLK2 * 12 */ -#define STR71X_RCCUPLL1CR_MUL24 (0x00000020) /* CLK2 * 24 */ -#define STR71X_RCCUPLL1CR_MUL16 (0x00000030) /* CLK2 * 16 */ -#define STR71X_RCCUPLL1CR_FREFRANGE (0x00000040) /* Bit 6: Reference frequency range select */ -#define STR71X_RCCUPLL1CR_FREEN (0x00000080) /* Bit 7: PKL free running mode */ - -/* RCCU PER register bit definitions */ - -#define STR71X_RCCUPER_EMI (0x00000004) /* Bit 2: EMI */ -#define STR71X_RCCUPER_USBKERNEL (0x00000010) /* Bit 4: USB Kernel */ - -/* RCCU SMR register bit definitions */ - -#define STR71X_RCCUSMR_WFI (0x00000001) /* Bit 0: Wait for interrupt */ -#define STR71X_RCCUSMR_HALT (0x00000000) /* Bit 1: Halt */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_rccu.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H +#define __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Reset and Clock Control Unit (RCCU) register offsets *****************************/ + +/* All registers are 32-bits wide, but with the top 16 bits "reserved" */ + +#define STR71X_RCCU_CCR_OFFSET (0x0000) /* 32-bits wide */ +#define STR71X_RCCU_CFR_OFFSET (0x0008) /* 32-bits wide */ +#define STR71X_RCCU_PLL1CR_OFFSET (0x0018) /* 32-bits wide */ +#define STR71X_RCCU_PER_OFFSET (0x001c) /* 32-bits wide */ +#define STR71X_RCCU_SMR_OFFSET (0x0020) /* 32-bits wide */ + +/* Reset and Clock Control Unit (RCCU) register addresses ***************************/ + +#define STR71X_RCCU_CCR (STR71X_RCCU_BASE + STR71X_RCCU_CCR_OFFSET) +#define STR71X_RCCU_CFR (STR71X_RCCU_BASE + STR71X_RCCU_CFR_OFFSET) +#define STR71X_RCCU_PLL1CR (STR71X_RCCU_BASE + STR71X_RCCU_PLL1CR_OFFSET) +#define STR71X_RCCU_PER (STR71X_RCCU_BASE + STR71X_RCCU_PER_OFFSET) +#define STR71X_RCCU_SMR (STR71X_RCCU_BASE + STR71X_RCCU_SMR_OFFSET) + +/* Register bit settings ************************************************************/ + +/* RCCU CCR register bit definitions */ + +#define STR71X_RCCUCCR_LPOWFI (0x00000001) /* Bit 0: Low power mode in wait-for-interrupt mode */ +#define STR71X_RCCUCCR_WFICLKSEL (0x00000002) /* Bit 1: WFI clock select */ +#define STR71X_RCCUCCR_CKAFSEL (0x00000004) /* Bit 2: Alternate function clock select */ +#define STR71X_RCCUCCR_SRESEN (0x00000008) /* Bit 3: Software reset enable */ +#define STR71X_RCCUCCR_ENCLOCK (0x00000080) /* Bit 7: Lock interrupt enable */ +#define STR71X_RCCUCCR_ENCKAF (0x00000100) /* Bit 8: CKAF interrupt enable */ +#define STR71X_RCCUCCR_ENCK216 (0x00000200) /* Bit 9: CK2_16 interrupt enable */ +#define STR71X_RCCUCCR_ENSTOP (0x00000400) /* Bit 10: Stop interrupt enable */ +#define STR71X_RCCUCCR_ENHALT (0x00000800) /* Bit 11: Enable halt */ + +/* RCCU CFR register bit definitions */ + +#define STR71X_RCCUCFR_CSUCKSEL (0x00000001) /* Bit 0: CSU clock select */ +#define STR71X_RCCUCFR_LOCK (0x00000002) /* Bit 1: PLL locked-in */ +#define STR71X_RCCUCFR_CKAFST (0x00000004) /* Bit 2: CK_AF status */ +#define STR71X_RCCUCFR_CK216 (0x00000008) /* Bit 3: CLK2/16 selection */ +#define STR71X_RCCUCFR_CKSTOPEN (0x00000010) /* Bit 4: Clock stop enable */ +#define STR71X_RCCUCFR_SOFTRES (0x00000020) /* Bit 5: Software reset */ +#define STR71X_RCCUCFR_WDGRES (0x00000040) /* Bit 6: Watchdog reset */ +#define STR71X_RCCUCFR_RTCALARM (0x00000080) /* Bit 7: RTC alarm reset */ +#define STR71X_RCCUCFR_LVDRES (0x00000200) /* Bit 9: Voltage regulator low voltage detector reset */ +#define STR71X_RCCUCFR_WKPRES (0x00000400) /* Bit 10: External wakeup */ +#define STR71X_RCCUCFR_LOCKI (0x00000800) /* Bit 11: Lock interrupt pending */ +#define STR71X_RCCUCFR_CKAFI (0x00001000) /* Bit 12: CK_AF switching interrupt pending */ +#define STR71X_RCCUCFR_CK216I (0x00002000) /* Bit 13: CK2_16 switching interrupt pending */ +#define STR71X_RCCUCFR_STOPI (0x00004000) /* Bit 14: Stop interrupt pending */ +#define STR71X_RCCUCFR_DIV2 (0x00008000) /* Bit 15: OSCIN divided by 2 */ + +/* RCCU PPL1CR register bit definitions */ + +#define STR71X_RCCUPLL1CR_DXMASK (0x00000003) /* Bit 0-2: PLL1 clock divisor */ +#define STR71X_RCCUPLL1CR_DIV1 (0x00000000) /* PLLCK / 1 */ +#define STR71X_RCCUPLL1CR_DIV2 (0x00000001) /* PLLCK / 2 */ +#define STR71X_RCCUPLL1CR_DIV3 (0x00000002) /* PLLCK / 3 */ +#define STR71X_RCCUPLL1CR_DIV4 (0x00000003) /* PLLCK / 4 */ +#define STR71X_RCCUPLL1CR_DIV5 (0x00000004) /* PLLCK / 5 */ +#define STR71X_RCCUPLL1CR_DIV6 (0x00000005) /* PLLCK / 6 */ +#define STR71X_RCCUPLL1CR_DIV7 (0x00000006) /* PLLCK / 7 */ +#define STR71X_RCCUPLL1CR_CLK2 (0x00000007) /* FREEN==0: CLK2 */ +#define STR71X_RCCUPLL1CR_FREERM (0x00000007) /* FREEN==1: PLL1 in free running mode */ +#define STR71X_RCCUPLL1CR_MXMASK (0x00000030) /* Bit 4-5: PLL1 clock multiplier */ +#define STR71X_RCCUPLL1CR_MUL20 (0x00000000) /* CLK2 * 20 */ +#define STR71X_RCCUPLL1CR_MUL12 (0x00000010) /* CLK2 * 12 */ +#define STR71X_RCCUPLL1CR_MUL24 (0x00000020) /* CLK2 * 24 */ +#define STR71X_RCCUPLL1CR_MUL16 (0x00000030) /* CLK2 * 16 */ +#define STR71X_RCCUPLL1CR_FREFRANGE (0x00000040) /* Bit 6: Reference frequency range select */ +#define STR71X_RCCUPLL1CR_FREEN (0x00000080) /* Bit 7: PKL free running mode */ + +/* RCCU PER register bit definitions */ + +#define STR71X_RCCUPER_EMI (0x00000004) /* Bit 2: EMI */ +#define STR71X_RCCUPER_USBKERNEL (0x00000010) /* Bit 4: USB Kernel */ + +/* RCCU SMR register bit definitions */ + +#define STR71X_RCCUSMR_WFI (0x00000001) /* Bit 0: Wait for interrupt */ +#define STR71X_RCCUSMR_HALT (0x00000000) /* Bit 1: Halt */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_RCCU_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_rtc.h b/nuttx/arch/arm/src/str71x/str71x_rtc.h index 634638f7e3..554123ff64 100644 --- a/nuttx/arch/arm/src/str71x/str71x_rtc.h +++ b/nuttx/arch/arm/src/str71x/str71x_rtc.h @@ -1,92 +1,92 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_rtc.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_RTC_H -#define __ARCH_ARM_SRC_STR71X_STR71X_RTC_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* RTC Registers ********************************************************************/ - -#define STR71X_RTC_CRH (STR71X_RTC_BASE + 0x0000) /* 16-bits wide */ -#define STR71X_RTC_CRL (STR71X_RTC_BASE + 0x0004) /* 16-bits wide */ -#define STR71X_RTC_PRLH (STR71X_RTC_BASE + 0x0008) /* 16-bits wide */ -#define STR71X_RTC_PRLL (STR71X_RTC_BASE + 0x000c) /* 16-bits wide */ -#define STR71X_RTC_DIVH (STR71X_RTC_BASE + 0x0010) /* 16-bits wide */ -#define STR71X_RTC_DIVL (STR71X_RTC_BASE + 0x0014) /* 16-bits wide */ -#define STR71X_RTC_CNTH (STR71X_RTC_BASE + 0x0018) /* 16-bits wide */ -#define STR71X_RTC_CNTL (STR71X_RTC_BASE + 0x001c) /* 16-bits wide */ -#define STR71X_RTC_ALRH (STR71X_RTC_BASE + 0x0020) /* 16-bits wide */ -#define STR71X_RTC_ALRL (STR71X_RTC_BASE + 0x0024) /* 16-bits wide */ - -/* Register bit settings ***********************************************************/ - -/* RTC control register */ - -#define STR71X_RTCCRH_SEN (0x0001) /* Bit 0: Second interrupt enable */ -#define STR71X_RTCCRH_AEN (0x0002) /* Bit 1: Alarm interrupt enable */ -#define STR71X_RTCCRH_OWEN (0x0004) /* Bit 2: Overflow interrupt enable */ -#define STR71X_RTCCRH_GEN (0x0008) /* Bit 3: Global interrupt enable */ - -#define STR71X_RTCCRL_SIR (0x0001) /* Bit 0: Second interrupt request */ -#define STR71X_RTCCRL_AIR (0x0002) /* Bit 1: Alarm interrupt request */ -#define STR71X_RTCCRL_OWIR (0x0004) /* Bit 2: Overflow interrupt request */ -#define STR71X_RTCCRL_GIR (0x0008) /* Bit 3: Global interrupt request */ -#define STR71X_RTCCRL_CNF (0x0010) /* Bit 4: Enter configuration mode */ -#define STR71X_RTCCRL_RTOFF (0x0020) /* Bit 5: RTC Operation Off */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_RTC_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_rtc.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_RTC_H +#define __ARCH_ARM_SRC_STR71X_STR71X_RTC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* RTC Registers ********************************************************************/ + +#define STR71X_RTC_CRH (STR71X_RTC_BASE + 0x0000) /* 16-bits wide */ +#define STR71X_RTC_CRL (STR71X_RTC_BASE + 0x0004) /* 16-bits wide */ +#define STR71X_RTC_PRLH (STR71X_RTC_BASE + 0x0008) /* 16-bits wide */ +#define STR71X_RTC_PRLL (STR71X_RTC_BASE + 0x000c) /* 16-bits wide */ +#define STR71X_RTC_DIVH (STR71X_RTC_BASE + 0x0010) /* 16-bits wide */ +#define STR71X_RTC_DIVL (STR71X_RTC_BASE + 0x0014) /* 16-bits wide */ +#define STR71X_RTC_CNTH (STR71X_RTC_BASE + 0x0018) /* 16-bits wide */ +#define STR71X_RTC_CNTL (STR71X_RTC_BASE + 0x001c) /* 16-bits wide */ +#define STR71X_RTC_ALRH (STR71X_RTC_BASE + 0x0020) /* 16-bits wide */ +#define STR71X_RTC_ALRL (STR71X_RTC_BASE + 0x0024) /* 16-bits wide */ + +/* Register bit settings ***********************************************************/ + +/* RTC control register */ + +#define STR71X_RTCCRH_SEN (0x0001) /* Bit 0: Second interrupt enable */ +#define STR71X_RTCCRH_AEN (0x0002) /* Bit 1: Alarm interrupt enable */ +#define STR71X_RTCCRH_OWEN (0x0004) /* Bit 2: Overflow interrupt enable */ +#define STR71X_RTCCRH_GEN (0x0008) /* Bit 3: Global interrupt enable */ + +#define STR71X_RTCCRL_SIR (0x0001) /* Bit 0: Second interrupt request */ +#define STR71X_RTCCRL_AIR (0x0002) /* Bit 1: Alarm interrupt request */ +#define STR71X_RTCCRL_OWIR (0x0004) /* Bit 2: Overflow interrupt request */ +#define STR71X_RTCCRL_GIR (0x0008) /* Bit 3: Global interrupt request */ +#define STR71X_RTCCRL_CNF (0x0010) /* Bit 4: Enter configuration mode */ +#define STR71X_RTCCRL_RTOFF (0x0020) /* Bit 5: RTC Operation Off */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_RTC_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_timer.h b/nuttx/arch/arm/src/str71x/str71x_timer.h index 2076a1d1d6..7712009c2a 100644 --- a/nuttx/arch/arm/src/str71x/str71x_timer.h +++ b/nuttx/arch/arm/src/str71x/str71x_timer.h @@ -1,155 +1,155 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_timer.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H -#define __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Register offsets *****************************************************************/ - -#define STR71X_TIMER_ICAR_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_TIMER_ICBR_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_TIMER_OCAR_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_TIMER_OCBR_OFFSET (0x000c) /* 16-bits wide */ -#define STR71X_TIMER_CNTR_OFFSET (0x0010) /* 16-bits wide */ -#define STR71X_TIMER_CR1_OFFSET (0x0014) /* 16-bits wide */ -#define STR71X_TIMER_CR2_OFFSET (0x0018) /* 16-bits wide */ -#define STR71X_TIMER_SR_OFFSET (0x001c) /* 16-bits wide */ - -/* Register Addresses ***************************************************************/ - -#define STR71X_TIMER_ICAR(b) ((b) + STR71X_TIMER_ICAR_OFFSET) -#define STR71X_TIMER_ICBR(b) ((b) + STR71X_TIMER_ICBR_OFFSET) -#define STR71X_TIMER_OCAR(b) ((b) + STR71X_TIMER_OCAR_OFFSET) -#define STR71X_TIMER_OCBR(b) ((b) + STR71X_TIMER_OCBR_OFFSET) -#define STR71X_TIMER_CNTR(b) ((b) + STR71X_TIMER_CNTR_OFFSET) -#define STR71X_TIMER_CR1(b) ((b) + STR71X_TIMER_CR1_OFFSET) -#define STR71X_TIMER_CR2(b) ((b) + STR71X_TIMER_CR2_OFFSET) -#define STR71X_TIMER_SR(b) ((b) + STR71X_TIMER_SR_OFFSET) - -#define STR71X_TIMER0_ICAR (STR71X_TIMER0_BASE + STR71X_TIMER_ICAR_OFFSET) -#define STR71X_TIMER0_ICBR (STR71X_TIMER0_BASE + STR71X_TIMER_ICBR_OFFSET) -#define STR71X_TIMER0_OCAR (STR71X_TIMER0_BASE + STR71X_TIMER_OCAR_OFFSET) -#define STR71X_TIMER0_OCBR (STR71X_TIMER0_BASE + STR71X_TIMER_OCBR_OFFSET) -#define STR71X_TIMER0_CNTR (STR71X_TIMER0_BASE + STR71X_TIMER_CNTR_OFFSET) -#define STR71X_TIMER0_CR1 (STR71X_TIMER0_BASE + STR71X_TIMER_CR1_OFFSET) -#define STR71X_TIMER0_CR2 (STR71X_TIMER0_BASE + STR71X_TIMER_CR2_OFFSET) -#define STR71X_TIMER0_SR (STR71X_TIMER0_BASE + STR71X_TIMER_SR_OFFSET) - -#define STR71X_TIMER1_ICAR (STR71X_TIMER1_BASE + STR71X_TIMER_ICAR_OFFSET) -#define STR71X_TIMER1_ICBR (STR71X_TIMER1_BASE + STR71X_TIMER_ICBR_OFFSET) -#define STR71X_TIMER1_OCAR (STR71X_TIMER1_BASE + STR71X_TIMER_OCAR_OFFSET) -#define STR71X_TIMER1_OCBR (STR71X_TIMER1_BASE + STR71X_TIMER_OCBR_OFFSET) -#define STR71X_TIMER1_CNTR (STR71X_TIMER1_BASE + STR71X_TIMER_CNTR_OFFSET) -#define STR71X_TIMER1_CR1 (STR71X_TIMER1_BASE + STR71X_TIMER_CR1_OFFSET) -#define STR71X_TIMER1_CR2 (STR71X_TIMER1_BASE + STR71X_TIMER_CR2_OFFSET) -#define STR71X_TIMER1_SR (STR71X_TIMER1_BASE + STR71X_TIMER_SR_OFFSET) - -#define STR71X_TIMER2_ICAR (STR71X_TIMER2_BASE + STR71X_TIMER_ICAR_OFFSET) -#define STR71X_TIMER2_ICBR (STR71X_TIMER2_BASE + STR71X_TIMER_ICBR_OFFSET) -#define STR71X_TIMER2_OCAR (STR71X_TIMER2_BASE + STR71X_TIMER_OCAR_OFFSET) -#define STR71X_TIMER2_OCBR (STR71X_TIMER2_BASE + STR71X_TIMER_OCBR_OFFSET) -#define STR71X_TIMER2_CNTR (STR71X_TIMER2_BASE + STR71X_TIMER_CNTR_OFFSET) -#define STR71X_TIMER2_CR1 (STR71X_TIMER2_BASE + STR71X_TIMER_CR1_OFFSET) -#define STR71X_TIMER2_CR2 (STR71X_TIMER2_BASE + STR71X_TIMER_CR2_OFFSET) -#define STR71X_TIMER2_SR (STR71X_TIMER2_BASE + STR71X_TIMER_SR_OFFSET) - -#define STR71X_TIMER3_ICAR (STR71X_TIMER3_BASE + STR71X_TIMER_ICAR_OFFSET) -#define STR71X_TIMER3_ICBR (STR71X_TIMER3_BASE + STR71X_TIMER_ICBR_OFFSET) -#define STR71X_TIMER3_OCAR (STR71X_TIMER3_BASE + STR71X_TIMER_OCAR_OFFSET) -#define STR71X_TIMER3_OCBR (STR71X_TIMER3_BASE + STR71X_TIMER_OCBR_OFFSET) -#define STR71X_TIMER3_CNTR (STR71X_TIMER3_BASE + STR71X_TIMER_CNTR_OFFSET) -#define STR71X_TIMER3_CR1 (STR71X_TIMER3_BASE + STR71X_TIMER_CR1_OFFSET) -#define STR71X_TIMER3_CR2 (STR71X_TIMER3_BASE + STR71X_TIMER_CR2_OFFSET) -#define STR71X_TIMER3_SR (STR71X_TIMER3_BASE + STR71X_TIMER_SR_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* Timer control register (CR1 and CR2) */ - -#define STR71X_TIMERCR1_ECKEN (0x0001) /* Bit 0: External clock enable */ -#define STR71X_TIMERCR1_EXEDG (0x0002) /* Bit 1: External clock edge */ -#define STR71X_TIMERCR1_IEDGA (0x0004) /* Bit 2: Input edge A */ -#define STR71X_TIMERCR1_IEDGB (0x0008) /* Bit 3: Input edge B */ -#define STR71X_TIMERCR1_PWM (0x0010) /* Bit 4: Pulse width modulation */ -#define STR71X_TIMERCR1_OPM (0x0020) /* Bit 5: One pulse mode */ -#define STR71X_TIMERCR1_OCAE (0x0040) /* Bit 6: Output compare A enable */ -#define STR71X_TIMERCR1_OCBE (0x0080) /* Bit 7: Output compare B enable */ -#define STR71X_TIMERCR1_OLVLA (0x0100) /* Bit 8: Output level A */ -#define STR71X_TIMERCR1_OLVLB (0x0200) /* Bit 9: Output level B */ -#define STR71X_TIMERCR1_FOLVA (0x0400) /* Bit 10: Forced output compare A */ -#define STR71X_TIMERCR1_FOLVB (0x0800) /* Bit 11: Forced output compare B */ -#define STR71X_TIMERCR1_PWMI (0x4000) /* Bit 14: Pulse width modulation input */ -#define STR71X_TIMERCR1_EN (0x8000) /* Bit 15: Timer count enable */ - -#define STR71X_TIMERCR2_DIVMASK (0x00ff) /* Bits 0-7: Timer prescaler value */ -#define STR71X_TIMERCR2_OCBIE (0x0800) /* Bit 11: Output capture B enable */ -#define STR71X_TIMERCR2_ICBIE (0x1000) /* Bit 12: Input capture B enable */ -#define STR71X_TIMERCR2_TOIE (0x2000) /* Bit 13: Timer overflow enable */ -#define STR71X_TIMERCR2_OCAIE (0x4000) /* Bit 14: Output capture A enable */ -#define STR71X_TIMERCR2_ICAIE (0x8000) /* Bit 15: Input capture B enable */ - -/* Timer status register (SR) */ - -#define STR71X_TIMERSR_OCFB (0x0800) /* Bit 11: Output capture flag B */ -#define STR71X_TIMERSR_ICFB (0x1000) /* Bit 12: Input capture flag B */ -#define STR71X_TIMERSR_TOF (0x2000) /* Bit 13: Timer overflow */ -#define STR71X_TIMERSR_OCFA (0x4000) /* Bit 14: Output capture flag A */ -#define STR71X_TIMERSR_ICFA (0x8000) /* Bit 15: Input capture flag A */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_timer.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H +#define __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Register offsets *****************************************************************/ + +#define STR71X_TIMER_ICAR_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_TIMER_ICBR_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_TIMER_OCAR_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_TIMER_OCBR_OFFSET (0x000c) /* 16-bits wide */ +#define STR71X_TIMER_CNTR_OFFSET (0x0010) /* 16-bits wide */ +#define STR71X_TIMER_CR1_OFFSET (0x0014) /* 16-bits wide */ +#define STR71X_TIMER_CR2_OFFSET (0x0018) /* 16-bits wide */ +#define STR71X_TIMER_SR_OFFSET (0x001c) /* 16-bits wide */ + +/* Register Addresses ***************************************************************/ + +#define STR71X_TIMER_ICAR(b) ((b) + STR71X_TIMER_ICAR_OFFSET) +#define STR71X_TIMER_ICBR(b) ((b) + STR71X_TIMER_ICBR_OFFSET) +#define STR71X_TIMER_OCAR(b) ((b) + STR71X_TIMER_OCAR_OFFSET) +#define STR71X_TIMER_OCBR(b) ((b) + STR71X_TIMER_OCBR_OFFSET) +#define STR71X_TIMER_CNTR(b) ((b) + STR71X_TIMER_CNTR_OFFSET) +#define STR71X_TIMER_CR1(b) ((b) + STR71X_TIMER_CR1_OFFSET) +#define STR71X_TIMER_CR2(b) ((b) + STR71X_TIMER_CR2_OFFSET) +#define STR71X_TIMER_SR(b) ((b) + STR71X_TIMER_SR_OFFSET) + +#define STR71X_TIMER0_ICAR (STR71X_TIMER0_BASE + STR71X_TIMER_ICAR_OFFSET) +#define STR71X_TIMER0_ICBR (STR71X_TIMER0_BASE + STR71X_TIMER_ICBR_OFFSET) +#define STR71X_TIMER0_OCAR (STR71X_TIMER0_BASE + STR71X_TIMER_OCAR_OFFSET) +#define STR71X_TIMER0_OCBR (STR71X_TIMER0_BASE + STR71X_TIMER_OCBR_OFFSET) +#define STR71X_TIMER0_CNTR (STR71X_TIMER0_BASE + STR71X_TIMER_CNTR_OFFSET) +#define STR71X_TIMER0_CR1 (STR71X_TIMER0_BASE + STR71X_TIMER_CR1_OFFSET) +#define STR71X_TIMER0_CR2 (STR71X_TIMER0_BASE + STR71X_TIMER_CR2_OFFSET) +#define STR71X_TIMER0_SR (STR71X_TIMER0_BASE + STR71X_TIMER_SR_OFFSET) + +#define STR71X_TIMER1_ICAR (STR71X_TIMER1_BASE + STR71X_TIMER_ICAR_OFFSET) +#define STR71X_TIMER1_ICBR (STR71X_TIMER1_BASE + STR71X_TIMER_ICBR_OFFSET) +#define STR71X_TIMER1_OCAR (STR71X_TIMER1_BASE + STR71X_TIMER_OCAR_OFFSET) +#define STR71X_TIMER1_OCBR (STR71X_TIMER1_BASE + STR71X_TIMER_OCBR_OFFSET) +#define STR71X_TIMER1_CNTR (STR71X_TIMER1_BASE + STR71X_TIMER_CNTR_OFFSET) +#define STR71X_TIMER1_CR1 (STR71X_TIMER1_BASE + STR71X_TIMER_CR1_OFFSET) +#define STR71X_TIMER1_CR2 (STR71X_TIMER1_BASE + STR71X_TIMER_CR2_OFFSET) +#define STR71X_TIMER1_SR (STR71X_TIMER1_BASE + STR71X_TIMER_SR_OFFSET) + +#define STR71X_TIMER2_ICAR (STR71X_TIMER2_BASE + STR71X_TIMER_ICAR_OFFSET) +#define STR71X_TIMER2_ICBR (STR71X_TIMER2_BASE + STR71X_TIMER_ICBR_OFFSET) +#define STR71X_TIMER2_OCAR (STR71X_TIMER2_BASE + STR71X_TIMER_OCAR_OFFSET) +#define STR71X_TIMER2_OCBR (STR71X_TIMER2_BASE + STR71X_TIMER_OCBR_OFFSET) +#define STR71X_TIMER2_CNTR (STR71X_TIMER2_BASE + STR71X_TIMER_CNTR_OFFSET) +#define STR71X_TIMER2_CR1 (STR71X_TIMER2_BASE + STR71X_TIMER_CR1_OFFSET) +#define STR71X_TIMER2_CR2 (STR71X_TIMER2_BASE + STR71X_TIMER_CR2_OFFSET) +#define STR71X_TIMER2_SR (STR71X_TIMER2_BASE + STR71X_TIMER_SR_OFFSET) + +#define STR71X_TIMER3_ICAR (STR71X_TIMER3_BASE + STR71X_TIMER_ICAR_OFFSET) +#define STR71X_TIMER3_ICBR (STR71X_TIMER3_BASE + STR71X_TIMER_ICBR_OFFSET) +#define STR71X_TIMER3_OCAR (STR71X_TIMER3_BASE + STR71X_TIMER_OCAR_OFFSET) +#define STR71X_TIMER3_OCBR (STR71X_TIMER3_BASE + STR71X_TIMER_OCBR_OFFSET) +#define STR71X_TIMER3_CNTR (STR71X_TIMER3_BASE + STR71X_TIMER_CNTR_OFFSET) +#define STR71X_TIMER3_CR1 (STR71X_TIMER3_BASE + STR71X_TIMER_CR1_OFFSET) +#define STR71X_TIMER3_CR2 (STR71X_TIMER3_BASE + STR71X_TIMER_CR2_OFFSET) +#define STR71X_TIMER3_SR (STR71X_TIMER3_BASE + STR71X_TIMER_SR_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* Timer control register (CR1 and CR2) */ + +#define STR71X_TIMERCR1_ECKEN (0x0001) /* Bit 0: External clock enable */ +#define STR71X_TIMERCR1_EXEDG (0x0002) /* Bit 1: External clock edge */ +#define STR71X_TIMERCR1_IEDGA (0x0004) /* Bit 2: Input edge A */ +#define STR71X_TIMERCR1_IEDGB (0x0008) /* Bit 3: Input edge B */ +#define STR71X_TIMERCR1_PWM (0x0010) /* Bit 4: Pulse width modulation */ +#define STR71X_TIMERCR1_OPM (0x0020) /* Bit 5: One pulse mode */ +#define STR71X_TIMERCR1_OCAE (0x0040) /* Bit 6: Output compare A enable */ +#define STR71X_TIMERCR1_OCBE (0x0080) /* Bit 7: Output compare B enable */ +#define STR71X_TIMERCR1_OLVLA (0x0100) /* Bit 8: Output level A */ +#define STR71X_TIMERCR1_OLVLB (0x0200) /* Bit 9: Output level B */ +#define STR71X_TIMERCR1_FOLVA (0x0400) /* Bit 10: Forced output compare A */ +#define STR71X_TIMERCR1_FOLVB (0x0800) /* Bit 11: Forced output compare B */ +#define STR71X_TIMERCR1_PWMI (0x4000) /* Bit 14: Pulse width modulation input */ +#define STR71X_TIMERCR1_EN (0x8000) /* Bit 15: Timer count enable */ + +#define STR71X_TIMERCR2_DIVMASK (0x00ff) /* Bits 0-7: Timer prescaler value */ +#define STR71X_TIMERCR2_OCBIE (0x0800) /* Bit 11: Output capture B enable */ +#define STR71X_TIMERCR2_ICBIE (0x1000) /* Bit 12: Input capture B enable */ +#define STR71X_TIMERCR2_TOIE (0x2000) /* Bit 13: Timer overflow enable */ +#define STR71X_TIMERCR2_OCAIE (0x4000) /* Bit 14: Output capture A enable */ +#define STR71X_TIMERCR2_ICAIE (0x8000) /* Bit 15: Input capture B enable */ + +/* Timer status register (SR) */ + +#define STR71X_TIMERSR_OCFB (0x0800) /* Bit 11: Output capture flag B */ +#define STR71X_TIMERSR_ICFB (0x1000) /* Bit 12: Input capture flag B */ +#define STR71X_TIMERSR_TOF (0x2000) /* Bit 13: Timer overflow */ +#define STR71X_TIMERSR_OCFA (0x4000) /* Bit 14: Output capture flag A */ +#define STR71X_TIMERSR_ICFA (0x8000) /* Bit 15: Input capture flag A */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_TIMER_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_timerisr.c b/nuttx/arch/arm/src/str71x/str71x_timerisr.c index 8f41b92912..e55e1f21a7 100644 --- a/nuttx/arch/arm/src/str71x/str71x_timerisr.c +++ b/nuttx/arch/arm/src/str71x/str71x_timerisr.c @@ -2,7 +2,7 @@ * arch/arm/src/str71x/str71x_timerisr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_uart.h b/nuttx/arch/arm/src/str71x/str71x_uart.h index 9178062c43..3073e00539 100644 --- a/nuttx/arch/arm/src/str71x/str71x_uart.h +++ b/nuttx/arch/arm/src/str71x/str71x_uart.h @@ -1,181 +1,181 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_uart.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_UART_H -#define __ARCH_ARM_SRC_STR71X_STR71X_UART_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Registers offsets ****************************************************************/ - -#define STR71X_UART_BR_OFFSET (0x0000) /* 16-bits wide */ -#define STR71X_UART_TXBUFR_OFFSET (0x0004) /* 16-bits wide */ -#define STR71X_UART_RXBUFR_OFFSET (0x0008) /* 16-bits wide */ -#define STR71X_UART_CR_OFFSET (0x000c) /* 16-bits wide */ -#define STR71X_UART_IER_OFFSET (0x0010) /* 16-bits wide */ -#define STR71X_UART_SR_OFFSET (0x0014) /* 16-bits wide */ -#define STR71X_UART_GTR_OFFSET (0x0018) /* 16-bits wide */ -#define STR71X_UART_TOR_OFFSET (0x001c) /* 16-bits wide */ -#define STR71X_UART_TXRSTR_OFFSET (0x0020) /* 16-bits wide */ -#define STR71X_UART_RXRSTR_OFFSET (0x0024) /* 16-bits wide */ - -/* Registers addresses **************************************************************/ - -#define STR71X_UART_BR(b) ((b) + STR71X_UART_BR_OFFSET) -#define STR71X_UART_TXBUFR(b) ((b) + STR71X_UART_TXBUFR_OFFSET) -#define STR71X_UART_RXBUFR(b) ((b) + STR71X_UART_RXBUFR_OFFSET) -#define STR71X_UART_CR(b) ((b) + STR71X_UART_CR_OFFSET) -#define STR71X_UART_IER(b) ((b) + STR71X_UART_IER_OFFSET) -#define STR71X_UART_SR(b) ((b) + STR71X_UART_SR_OFFSET) -#define STR71X_UART_GTR(b) ((b) + STR71X_UART_GTR_OFFSET) -#define STR71X_UART_TOR(b) ((b) + STR71X_UART_TOR_OFFSET) -#define STR71X_UART_TXRSTR(b) ((b) + STR71X_UART_TXRSTR_OFFSET) -#define STR71X_UART_RXRSTR(b) ((b) + STR71X_UART_RXRSTR_OFFSET) - -#define STR71X_UART0_BR (STR71X_UART0_BASE + STR71X_UART_BR_OFFSET) -#define STR71X_UART0_TXBUFR (STR71X_UART0_BASE + STR71X_UART_TXBUFR_OFFSET) -#define STR71X_UART0_RXBUFR (STR71X_UART0_BASE + STR71X_UART_RXBUFR_OFFSET) -#define STR71X_UART0_CR (STR71X_UART0_BASE + STR71X_UART_CR_OFFSET) -#define STR71X_UART0_IER (STR71X_UART0_BASE + STR71X_UART_IER_OFFSET) -#define STR71X_UART0_SR (STR71X_UART0_BASE + STR71X_UART_SR_OFFSET) -#define STR71X_UART0_GTR (STR71X_UART0_BASE + STR71X_UART_GTR_OFFSET) -#define STR71X_UART0_TOR (STR71X_UART0_BASE + STR71X_UART_TOR_OFFSET) -#define STR71X_UART0_TXRSTR (STR71X_UART0_BASE + STR71X_UART_TXRSTR_OFFSET) -#define STR71X_UART0_RXRSTR (STR71X_UART0_BASE + STR71X_UART_RXRSTR_OFFSET) - -#define STR71X_UART1_BR (STR71X_UART1_BASE + STR71X_UART_BR_OFFSET) -#define STR71X_UART1_TXBUFR (STR71X_UART1_BASE + STR71X_UART_TXBUFR_OFFSET) -#define STR71X_UART1_RXBUFR (STR71X_UART1_BASE + STR71X_UART_RXBUFR_OFFSET) -#define STR71X_UART1_CR (STR71X_UART1_BASE + STR71X_UART_CR_OFFSET) -#define STR71X_UART1_IER (STR71X_UART1_BASE + STR71X_UART_IER_OFFSET) -#define STR71X_UART1_SR (STR71X_UART1_BASE + STR71X_UART_SR_OFFSET) -#define STR71X_UART1_GTR (STR71X_UART1_BASE + STR71X_UART_GTR_OFFSET) -#define STR71X_UART1_TOR (STR71X_UART1_BASE + STR71X_UART_TOR_OFFSET) -#define STR71X_UART1_TXRSTR (STR71X_UART1_BASE + STR71X_UART_TXRSTR_OFFSET) -#define STR71X_UART1_RXRSTR (STR71X_UART1_BASE + STR71X_UART_RXRSTR_OFFSET) - -#define STR71X_UART2_BR (STR71X_UART2_BASE + STR71X_UART_BR_OFFSET) -#define STR71X_UART2_TXBUFR (STR71X_UART2_BASE + STR71X_UART_TXBUFR_OFFSET) -#define STR71X_UART2_RXBUFR (STR71X_UART2_BASE + STR71X_UART_RXBUFR_OFFSET) -#define STR71X_UART2_CR (STR71X_UART2_BASE + STR71X_UART_CR_OFFSET) -#define STR71X_UART2_IER (STR71X_UART2_BASE + STR71X_UART_IER_OFFSET) -#define STR71X_UART2_SR (STR71X_UART2_BASE + STR71X_UART_SR_OFFSET) -#define STR71X_UART2_GTR (STR71X_UART2_BASE + STR71X_UART_GTR_OFFSET) -#define STR71X_UART2_TOR (STR71X_UART2_BASE + STR71X_UART_TOR_OFFSET) -#define STR71X_UART2_TXRSTR (STR71X_UART2_BASE + STR71X_UART_TXRSTR_OFFSET) -#define STR71X_UART2_RXRSTR (STR71X_UART2_BASE + STR71X_UART_RXRSTR_OFFSET) - -#define STR71X_UART3_BR (STR71X_UART3_BASE + STR71X_UART_BR_OFFSET) -#define STR71X_UART3_TXBUFR (STR71X_UART3_BASE + STR71X_UART_TXBUFR_OFFSET) -#define STR71X_UART3_RXBUFR (STR71X_UART3_BASE + STR71X_UART_RXBUFR_OFFSET) -#define STR71X_UART3_CR (STR71X_UART3_BASE + STR71X_UART_CR_OFFSET) -#define STR71X_UART3_IER (STR71X_UART3_BASE + STR71X_UART_IER_OFFSET) -#define STR71X_UART3_SR (STR71X_UART3_BASE + STR71X_UART_SR_OFFSET) -#define STR71X_UART3_GTR (STR71X_UART3_BASE + STR71X_UART_GTR_OFFSET) -#define STR71X_UART3_TOR (STR71X_UART3_BASE + STR71X_UART_TOR_OFFSET) -#define STR71X_UART3_TXRSTR (STR71X_UART3_BASE + STR71X_UART_TXRSTR_OFFSET) -#define STR71X_UART3_RXRSTR (STR71X_UART3_BASE + STR71X_UART_RXRSTR_OFFSET) - -/* Register bit settings ***********************************************************/ - -/* UART control register (CR) */ - -#define STR71X_UARTCR_MODEMASK (0x0007) /* Bits 0-2: Mode */ -#define STR71X_UARTCR_MODE8BIT (0x0001) /* 8-bit */ -#define STR71X_UARTCR_MODE7BITP (0x0003) /* 7-bit with parity bit */ -#define STR71X_UARTCR_MODE9BIT (0x0004) /* 9-bit */ -#define STR71X_UARTCR_MODE8BITWU (0x0005) /* 8-bit with wakeup bit */ -#define STR71X_UARTCR_MODE8BITP (0x0007) /* 8-bit with parity bit */ -#define STR71X_UARTCR_STOPBITSMASK (0x0018) /* Bits 3-4: Stop bits */ -#define STR71X_UARTCR_STOPBIT05 (0x0000) /* 0.5 stop bits */ -#define STR71X_UARTCR_STOPBIT10 (0x0008) /* 1.0 stop bit */ -#define STR71X_UARTCR_STOPBIT15 (0x0010) /* 1.5 stop bits */ -#define STR71X_UARTCR_STOPBIT20 (0x0018) /* 2.0 stop bits */ -#define STR71X_UARTCR_PARITYODD (0x0020) /* Bit 5: Parity selection */ -#define STR71X_UARTCR_LOOPBACK (0x0040) /* Bit 6: Loopback mode enable */ -#define STR71X_UARTCR_RUN (0x0080) /* Bit 7: Baudrate generator run bit */ -#define STR71X_UARTCR_RXENABLE (0x0100) /* Bit 8: Receiver enable */ -#define STR71X_UARTCR_SCENABLE (0x0200) /* Bit 9: SmartCard mode enable */ -#define STR71X_UARTCR_FIFOENABLE (0x0400) /* Bit 10: FIFO enable */ - -/* UART interrupt enable (IER) register */ - -#define STR71X_UARTIER_RNE (0x0001) /* Bit 0: Rx buffer not empty */ -#define STR71X_UARTIER_TE (0x0002) /* Bit 1: Tx empty */ -#define STR71X_UARTIER_THE (0x0004) /* Bit 2: Tx half empty */ -#define STR71X_UARTIER_PERROR (0x0008) /* Bit 3: Parity error */ -#define STR71X_UARTIER_FRERROR (0x0010) /* Bit 4: Frame error */ -#define STR71X_UARTIER_OVERRUN (0x0020) /* Bit 5: Overrun error */ -#define STR71X_UARTIER_TIMEOUTNE (0x0040) /* Bit 6: Time out not empty*/ -#define STR71X_UARTIER_TIMEOUTIDLE (0x0080) /* Bit 7: Timeout out idle */ -#define STR71X_UARTIER_RHF (0x0100) /* Bit 8: Rx half full */ -#define STR71X_UARTIER_ALL (0x01ff) /* All interrupt bits */ - -/* UART status register (SR) */ - -#define STR71X_UARTSR_RNE (0x0001) /* Bit 0: Rx buffer not empty */ -#define STR71X_UARTSR_TE (0x0002) /* Bit 1: Tx empty */ -#define STR71X_UARTSR_THE (0x0004) /* Bit 2: Tx half empty */ -#define STR71X_UARTSR_PERR (0x0008) /* Bit 3: Parity error */ -#define STR71X_UARTSR_FRERROR (0x0010) /* Bit 4: Frame error */ -#define STR71X_UARTSR_OVERRUN (0x0020) /* Bit 5: Overrun error */ -#define STR71X_UARTSR_TIMEOUTNE (0x0040) /* Bit 6: Time out not empty */ -#define STR71X_UARTSR_TIMEOUTIDLE (0x0080) /* Bit 7: Timeout out idle */ -#define STR71X_UARTSR_RHF (0x0100) /* Bit 8: Rx half full */ -#define STR71X_UARTSR_TF (0x0200) /* Bit 9: Tx full */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_UART_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_uart.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_UART_H +#define __ARCH_ARM_SRC_STR71X_STR71X_UART_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Registers offsets ****************************************************************/ + +#define STR71X_UART_BR_OFFSET (0x0000) /* 16-bits wide */ +#define STR71X_UART_TXBUFR_OFFSET (0x0004) /* 16-bits wide */ +#define STR71X_UART_RXBUFR_OFFSET (0x0008) /* 16-bits wide */ +#define STR71X_UART_CR_OFFSET (0x000c) /* 16-bits wide */ +#define STR71X_UART_IER_OFFSET (0x0010) /* 16-bits wide */ +#define STR71X_UART_SR_OFFSET (0x0014) /* 16-bits wide */ +#define STR71X_UART_GTR_OFFSET (0x0018) /* 16-bits wide */ +#define STR71X_UART_TOR_OFFSET (0x001c) /* 16-bits wide */ +#define STR71X_UART_TXRSTR_OFFSET (0x0020) /* 16-bits wide */ +#define STR71X_UART_RXRSTR_OFFSET (0x0024) /* 16-bits wide */ + +/* Registers addresses **************************************************************/ + +#define STR71X_UART_BR(b) ((b) + STR71X_UART_BR_OFFSET) +#define STR71X_UART_TXBUFR(b) ((b) + STR71X_UART_TXBUFR_OFFSET) +#define STR71X_UART_RXBUFR(b) ((b) + STR71X_UART_RXBUFR_OFFSET) +#define STR71X_UART_CR(b) ((b) + STR71X_UART_CR_OFFSET) +#define STR71X_UART_IER(b) ((b) + STR71X_UART_IER_OFFSET) +#define STR71X_UART_SR(b) ((b) + STR71X_UART_SR_OFFSET) +#define STR71X_UART_GTR(b) ((b) + STR71X_UART_GTR_OFFSET) +#define STR71X_UART_TOR(b) ((b) + STR71X_UART_TOR_OFFSET) +#define STR71X_UART_TXRSTR(b) ((b) + STR71X_UART_TXRSTR_OFFSET) +#define STR71X_UART_RXRSTR(b) ((b) + STR71X_UART_RXRSTR_OFFSET) + +#define STR71X_UART0_BR (STR71X_UART0_BASE + STR71X_UART_BR_OFFSET) +#define STR71X_UART0_TXBUFR (STR71X_UART0_BASE + STR71X_UART_TXBUFR_OFFSET) +#define STR71X_UART0_RXBUFR (STR71X_UART0_BASE + STR71X_UART_RXBUFR_OFFSET) +#define STR71X_UART0_CR (STR71X_UART0_BASE + STR71X_UART_CR_OFFSET) +#define STR71X_UART0_IER (STR71X_UART0_BASE + STR71X_UART_IER_OFFSET) +#define STR71X_UART0_SR (STR71X_UART0_BASE + STR71X_UART_SR_OFFSET) +#define STR71X_UART0_GTR (STR71X_UART0_BASE + STR71X_UART_GTR_OFFSET) +#define STR71X_UART0_TOR (STR71X_UART0_BASE + STR71X_UART_TOR_OFFSET) +#define STR71X_UART0_TXRSTR (STR71X_UART0_BASE + STR71X_UART_TXRSTR_OFFSET) +#define STR71X_UART0_RXRSTR (STR71X_UART0_BASE + STR71X_UART_RXRSTR_OFFSET) + +#define STR71X_UART1_BR (STR71X_UART1_BASE + STR71X_UART_BR_OFFSET) +#define STR71X_UART1_TXBUFR (STR71X_UART1_BASE + STR71X_UART_TXBUFR_OFFSET) +#define STR71X_UART1_RXBUFR (STR71X_UART1_BASE + STR71X_UART_RXBUFR_OFFSET) +#define STR71X_UART1_CR (STR71X_UART1_BASE + STR71X_UART_CR_OFFSET) +#define STR71X_UART1_IER (STR71X_UART1_BASE + STR71X_UART_IER_OFFSET) +#define STR71X_UART1_SR (STR71X_UART1_BASE + STR71X_UART_SR_OFFSET) +#define STR71X_UART1_GTR (STR71X_UART1_BASE + STR71X_UART_GTR_OFFSET) +#define STR71X_UART1_TOR (STR71X_UART1_BASE + STR71X_UART_TOR_OFFSET) +#define STR71X_UART1_TXRSTR (STR71X_UART1_BASE + STR71X_UART_TXRSTR_OFFSET) +#define STR71X_UART1_RXRSTR (STR71X_UART1_BASE + STR71X_UART_RXRSTR_OFFSET) + +#define STR71X_UART2_BR (STR71X_UART2_BASE + STR71X_UART_BR_OFFSET) +#define STR71X_UART2_TXBUFR (STR71X_UART2_BASE + STR71X_UART_TXBUFR_OFFSET) +#define STR71X_UART2_RXBUFR (STR71X_UART2_BASE + STR71X_UART_RXBUFR_OFFSET) +#define STR71X_UART2_CR (STR71X_UART2_BASE + STR71X_UART_CR_OFFSET) +#define STR71X_UART2_IER (STR71X_UART2_BASE + STR71X_UART_IER_OFFSET) +#define STR71X_UART2_SR (STR71X_UART2_BASE + STR71X_UART_SR_OFFSET) +#define STR71X_UART2_GTR (STR71X_UART2_BASE + STR71X_UART_GTR_OFFSET) +#define STR71X_UART2_TOR (STR71X_UART2_BASE + STR71X_UART_TOR_OFFSET) +#define STR71X_UART2_TXRSTR (STR71X_UART2_BASE + STR71X_UART_TXRSTR_OFFSET) +#define STR71X_UART2_RXRSTR (STR71X_UART2_BASE + STR71X_UART_RXRSTR_OFFSET) + +#define STR71X_UART3_BR (STR71X_UART3_BASE + STR71X_UART_BR_OFFSET) +#define STR71X_UART3_TXBUFR (STR71X_UART3_BASE + STR71X_UART_TXBUFR_OFFSET) +#define STR71X_UART3_RXBUFR (STR71X_UART3_BASE + STR71X_UART_RXBUFR_OFFSET) +#define STR71X_UART3_CR (STR71X_UART3_BASE + STR71X_UART_CR_OFFSET) +#define STR71X_UART3_IER (STR71X_UART3_BASE + STR71X_UART_IER_OFFSET) +#define STR71X_UART3_SR (STR71X_UART3_BASE + STR71X_UART_SR_OFFSET) +#define STR71X_UART3_GTR (STR71X_UART3_BASE + STR71X_UART_GTR_OFFSET) +#define STR71X_UART3_TOR (STR71X_UART3_BASE + STR71X_UART_TOR_OFFSET) +#define STR71X_UART3_TXRSTR (STR71X_UART3_BASE + STR71X_UART_TXRSTR_OFFSET) +#define STR71X_UART3_RXRSTR (STR71X_UART3_BASE + STR71X_UART_RXRSTR_OFFSET) + +/* Register bit settings ***********************************************************/ + +/* UART control register (CR) */ + +#define STR71X_UARTCR_MODEMASK (0x0007) /* Bits 0-2: Mode */ +#define STR71X_UARTCR_MODE8BIT (0x0001) /* 8-bit */ +#define STR71X_UARTCR_MODE7BITP (0x0003) /* 7-bit with parity bit */ +#define STR71X_UARTCR_MODE9BIT (0x0004) /* 9-bit */ +#define STR71X_UARTCR_MODE8BITWU (0x0005) /* 8-bit with wakeup bit */ +#define STR71X_UARTCR_MODE8BITP (0x0007) /* 8-bit with parity bit */ +#define STR71X_UARTCR_STOPBITSMASK (0x0018) /* Bits 3-4: Stop bits */ +#define STR71X_UARTCR_STOPBIT05 (0x0000) /* 0.5 stop bits */ +#define STR71X_UARTCR_STOPBIT10 (0x0008) /* 1.0 stop bit */ +#define STR71X_UARTCR_STOPBIT15 (0x0010) /* 1.5 stop bits */ +#define STR71X_UARTCR_STOPBIT20 (0x0018) /* 2.0 stop bits */ +#define STR71X_UARTCR_PARITYODD (0x0020) /* Bit 5: Parity selection */ +#define STR71X_UARTCR_LOOPBACK (0x0040) /* Bit 6: Loopback mode enable */ +#define STR71X_UARTCR_RUN (0x0080) /* Bit 7: Baudrate generator run bit */ +#define STR71X_UARTCR_RXENABLE (0x0100) /* Bit 8: Receiver enable */ +#define STR71X_UARTCR_SCENABLE (0x0200) /* Bit 9: SmartCard mode enable */ +#define STR71X_UARTCR_FIFOENABLE (0x0400) /* Bit 10: FIFO enable */ + +/* UART interrupt enable (IER) register */ + +#define STR71X_UARTIER_RNE (0x0001) /* Bit 0: Rx buffer not empty */ +#define STR71X_UARTIER_TE (0x0002) /* Bit 1: Tx empty */ +#define STR71X_UARTIER_THE (0x0004) /* Bit 2: Tx half empty */ +#define STR71X_UARTIER_PERROR (0x0008) /* Bit 3: Parity error */ +#define STR71X_UARTIER_FRERROR (0x0010) /* Bit 4: Frame error */ +#define STR71X_UARTIER_OVERRUN (0x0020) /* Bit 5: Overrun error */ +#define STR71X_UARTIER_TIMEOUTNE (0x0040) /* Bit 6: Time out not empty*/ +#define STR71X_UARTIER_TIMEOUTIDLE (0x0080) /* Bit 7: Timeout out idle */ +#define STR71X_UARTIER_RHF (0x0100) /* Bit 8: Rx half full */ +#define STR71X_UARTIER_ALL (0x01ff) /* All interrupt bits */ + +/* UART status register (SR) */ + +#define STR71X_UARTSR_RNE (0x0001) /* Bit 0: Rx buffer not empty */ +#define STR71X_UARTSR_TE (0x0002) /* Bit 1: Tx empty */ +#define STR71X_UARTSR_THE (0x0004) /* Bit 2: Tx half empty */ +#define STR71X_UARTSR_PERR (0x0008) /* Bit 3: Parity error */ +#define STR71X_UARTSR_FRERROR (0x0010) /* Bit 4: Frame error */ +#define STR71X_UARTSR_OVERRUN (0x0020) /* Bit 5: Overrun error */ +#define STR71X_UARTSR_TIMEOUTNE (0x0040) /* Bit 6: Time out not empty */ +#define STR71X_UARTSR_TIMEOUTIDLE (0x0080) /* Bit 7: Timeout out idle */ +#define STR71X_UARTSR_RHF (0x0100) /* Bit 8: Rx half full */ +#define STR71X_UARTSR_TF (0x0200) /* Bit 9: Tx full */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_UART_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_usb.h b/nuttx/arch/arm/src/str71x/str71x_usb.h index 7fcbf57277..24ddd8a6b2 100644 --- a/nuttx/arch/arm/src/str71x/str71x_usb.h +++ b/nuttx/arch/arm/src/str71x/str71x_usb.h @@ -1,180 +1,180 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_usb.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_USB_H -#define __ARCH_ARM_SRC_STR71X_STR71X_USB_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* USB registers ********************************************************************/ - -#define STR71X_USB_NENDPNTS (16) -#define STR71X_USB_EPR(ep) (STR71X_USB_BASE + ((ep) << 4)) -#define STR71X_USB_EP0R (STR71X_USB_BASE + 0x0000) /* Endpoint 0 */ -#define STR71X_USB_EP1R (STR71X_USB_BASE + 0x0004) /* Endpoint 1 */ -#define STR71X_USB_EP2R (STR71X_USB_BASE + 0x0008) /* Endpoint 2 */ -#define STR71X_USB_EP3R (STR71X_USB_BASE + 0x000c) /* Endpoint 3 */ -#define STR71X_USB_EP4R (STR71X_USB_BASE + 0x0010) /* Endpoint 4 */ -#define STR71X_USB_EP5R (STR71X_USB_BASE + 0x0014) /* Endpoint 5 */ -#define STR71X_USB_EP6R (STR71X_USB_BASE + 0x0018) /* Endpoint 6 */ -#define STR71X_USB_EP7R (STR71X_USB_BASE + 0x001c) /* Endpoint 7 */ -#define STR71X_USB_EP8R (STR71X_USB_BASE + 0x0020) /* Endpoint 8 */ -#define STR71X_USB_EP9R (STR71X_USB_BASE + 0x0024) /* Endpoint 9 */ -#define STR71X_USB_EP10R (STR71X_USB_BASE + 0x0028) /* Endpoint 10 */ -#define STR71X_USB_EP11R (STR71X_USB_BASE + 0x002c) /* Endpoint 11 */ -#define STR71X_USB_EP12R (STR71X_USB_BASE + 0x0030) /* Endpoint 12 */ -#define STR71X_USB_EP13R (STR71X_USB_BASE + 0x0034) /* Endpoint 13 */ -#define STR71X_USB_EP14R (STR71X_USB_BASE + 0x0038) /* Endpoint 14 */ -#define STR71X_USB_EP15R (STR71X_USB_BASE + 0x003c) /* Endpoint 15 */ -#define STR71X_USB_CNTR (STR71X_USB_BASE + 0x0040) /* Control register */ -#define STR71X_USB_ISTR (STR71X_USB_BASE + 0x0044) /* Interrupt status register */ -#define STR71X_USB_FNR (STR71X_USB_BASE + 0x0048) /* Frame number register */ -#define STR71X_USB_DADDR (STR71X_USB_BASE + 0x004C) /* Device address register */ -#define STR71X_USB_BTABLE (STR71X_USB_BASE + 0x0050) /* Buffer Table address register */ - -/* Register bit settings ***********************************************************/ - -/* Control Register (CNTR) */ - -#define USB_CNTR_FRES (1 << 0) /* Bit 0: Force usb reset */ -#define USB_CNTR_PDWN (1 << 1) /* Bit 1: Power down */ -#define USB_CNTR_LPMODE (1 << 2) /* Bit 2: Low-power mode */ -#define USB_CNTR_FSUSP (1 << 3) /* Bit 3: Force suspend */ -#define USB_CNTR_RESUME (1 << 4) /* Bit 4: Resume request */ -#define USB_CNTR_ESOFM (1 << 8) /* Bit 8: Expected start of frame */ -#define USB_CNTR_SOFM (1 << 9) /* Bit 9: Start of frame */ -#define USB_CNTR_RESETM (1 << 10) /* Bit 10: Reset */ -#define USB_CNTR_SUSPM (1 << 11) /* Bit 11: Suspend */ -#define USB_CNTR_WKUPM (1 << 12) /* Bit 12: Wake up */ -#define USB_CNTR_ERRM (1 << 13) /* Bit 13: Error */ -#define USB_CNTR_DOVRM (1 << 14) /* Bit 14: DMA over/underrun */ -#define USB_CNTR_CTRM (1 << 15) /* Bit 15: Correct transfer */ - -/* Interrupt status register (ISTR) */ - -#define USB_ISTR_EPID_SHIFT 0 /* Bits 0-3: Endpoint Identifier */ -#define USB_ISTR_EPID_MASK (0x0f << USB_ISTR_EPID_SHIFT) -#define USB_ISTR_DIR (1 << 4) /* Bit 4: DIRection of transaction */ -#define USB_ISTR_ESOF (1 << 8) /* Bit 8: Expected start of frame */ -#define USB_ISTR_SOF (1 << 9) /* Bit 9: Start of frame */ -#define USB_ISTR_RESET (1 << 10) /* Bit 10: Reset */ -#define USB_ISTR_SUSP (1 << 11) /* Bit 11: Suspend */ -#define USB_ISTR_WKUP (1 << 12) /* Bit 12: Wakeup */ -#define USB_ISTR_ERR (1 << 13) /* Bit 13: Error */ -#define USB_ISTR_DOVR (1 << 14) /* Bit 14: DMA Over/underrun */ -#define USB_ISTR_CTR (1 << 15) /* Bit 15: Correct Transfer */ - -/* Frame number register (FNR) */ - -#define USB_FNR_FN_SHIFT 0 /* Bit 0-10: Frame number */ -#define USB_FNR_LSOF_SHIFT 11 /* Bits 11-12 : Lost SOF */ -#define USB_FNR_LSOF_MASK (3 << USB_FNR_LSOF_SHIFT) -#define USB_FNR_FN_MASK (0x07ff << USB_FNR_FN_SHIFT) -#define USB_FNR_LCK (1 << 13) /* Bit 13: Locked */ -#define USB_FNR_RXDM (1 << 14) /* Bit 14: Status of D- data line */ -#define USB_FNR_RXDP (1 << 15) /* Bit 15: Status of D+ data line */ - -/* Device address register (DADDR) */ - -#define USB_DADDR_ADD_SHIFT 0 /* Bits 0-7: Device address */ -#define USB_DADDR_ADD_MASK (0x7f << USB_DADDR_ADD_SHIFT) -#define USB_DADDR_EF (1 << 7) /* Bit 8: Enable function */ - -/* Endpoint registers (EPR) */ - -#define USB_EPR_ADDRFIELD_SHIFT 0 /* Bits 0-3: Endpoint address */ -#define USB_EPR_ADDRFIELD_MASK (0x0f << USB_EPR_ADDRFIELD_SHIFT) -#define USB_EPR_TXSTAT_SHIFT 4 /* Bits 4-5: Endpoint TX status bit */ -#define USB_EPR_TXSTAT_MASK (3 << USB_EPR_TXSTAT_SHIFT) -# define USB_EPR_TXDIS (0 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX disabled */ -# define USB_EPR_TXSTALL (1 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX stalled */ -# define USB_EPR_TXNAK (2 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX NAKed */ -# define USB_EPR_TXVALID (3 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX valid */ -# define USB_EPR_TXDTOG1 (1 << USB_EPR_TXSTAT_SHIFT) /* Bit : Endpoint TX data toggle bit1 */ -# define USB_EPR_TXDTOG2 (2 << USB_EPR_TXSTAT_SHIFT) /* Bit : Endpoint TX data toggle bit2 */ -#define USB_EPR_DTOGTX (1 << 6) /* Bit 6: Endpoint data toggle TX */ -#define USB_EPR_CTRTX (1 << 7) /* Bit 7: Endpoint correct transfer TX */ -#define USB_EPR_KIND (1 << 8) /* Bit 8: Endpoint kind */ -#define USB_EPR_EPTYPE_SHIFT 9 /* Bits 9-10: Endpoint type */ -#define USB_EPR_EPTYPE_MASK (3 << USB_EPR_EPTYPE_SHIFT) -# define USB_EPR_BULK (0 << USB_EPR_EPTYPE_SHIFT) /* Endpoint BULK */ -# define USB_EPR_CONTROL (1 << USB_EPR_EPTYPE_SHIFT) /* Endpoint CONTROL */ -# define USB_EPR_ISOC (2 << USB_EPR_EPTYPE_SHIFT)) /* Endpoint ISOCHRONOUS */ -# define USB_EPR_INTERRUPT (3 << USB_EPR_EPTYPE_SHIFT) /* Endpoint INTERRUPT */ -#define USB_EPR_SETUP (1 << 11) /* Bit 11: Endpoint setup */ -#define USB_EPR_RXSTAT_SHIFT 12 /* Bits 12-13: Endpoint RX status bit */ -#define USB_EPR_RXSTAT_MASK (3 << USB_EPR_RXSTAT_SHIFT) -# define USB_EPR_RXDIS (0 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX disabled */ -# define USB_EPR_RXSTALL (1 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX stalled */ -# define USB_EPR_RXNAK (2 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX NAKed */ -# define USB_EPR_RXVALID (3 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX valid */ -# define USB_EPR_RXDTOG1 (1 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX data toggle bit1 */ -# define USB_EPR_RXDTOG2 (2 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX data toggle bit2 */ -#define USB_EPR_DTOGRX (1 << 14) /* Bit 14: Endpoint data toggle RX */ -#define USB_EPR_CTRRX (1 << 15) /* Bit 15: Endpoint correct transfer RX */ - -/* Endpoint register mask (no toggle fields) */ - -#define USB_EPR_NOTOGGLE_MASK (USB_EPR_CTRRX|USB_EPR_SETUP|USB_EPR_TFIELD|\ - USB_EPR_KIND|USB_EPR_CTRTX|USB_EPR_ADDRFIELD) - -/* Toggles only */ - -#define USB_EPR_TXDTOG_MASK (USB_EPR_TXSTAT_MASK|USB_EPR_NOTOGGLE_MASK) -#define USB_EPR_RXDTOG_MASK (USB_EPR_RXSTAT_MASK|USB_EPR_NOTOGGLE_MASK) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_USB_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_usb.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_USB_H +#define __ARCH_ARM_SRC_STR71X_STR71X_USB_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* USB registers ********************************************************************/ + +#define STR71X_USB_NENDPNTS (16) +#define STR71X_USB_EPR(ep) (STR71X_USB_BASE + ((ep) << 4)) +#define STR71X_USB_EP0R (STR71X_USB_BASE + 0x0000) /* Endpoint 0 */ +#define STR71X_USB_EP1R (STR71X_USB_BASE + 0x0004) /* Endpoint 1 */ +#define STR71X_USB_EP2R (STR71X_USB_BASE + 0x0008) /* Endpoint 2 */ +#define STR71X_USB_EP3R (STR71X_USB_BASE + 0x000c) /* Endpoint 3 */ +#define STR71X_USB_EP4R (STR71X_USB_BASE + 0x0010) /* Endpoint 4 */ +#define STR71X_USB_EP5R (STR71X_USB_BASE + 0x0014) /* Endpoint 5 */ +#define STR71X_USB_EP6R (STR71X_USB_BASE + 0x0018) /* Endpoint 6 */ +#define STR71X_USB_EP7R (STR71X_USB_BASE + 0x001c) /* Endpoint 7 */ +#define STR71X_USB_EP8R (STR71X_USB_BASE + 0x0020) /* Endpoint 8 */ +#define STR71X_USB_EP9R (STR71X_USB_BASE + 0x0024) /* Endpoint 9 */ +#define STR71X_USB_EP10R (STR71X_USB_BASE + 0x0028) /* Endpoint 10 */ +#define STR71X_USB_EP11R (STR71X_USB_BASE + 0x002c) /* Endpoint 11 */ +#define STR71X_USB_EP12R (STR71X_USB_BASE + 0x0030) /* Endpoint 12 */ +#define STR71X_USB_EP13R (STR71X_USB_BASE + 0x0034) /* Endpoint 13 */ +#define STR71X_USB_EP14R (STR71X_USB_BASE + 0x0038) /* Endpoint 14 */ +#define STR71X_USB_EP15R (STR71X_USB_BASE + 0x003c) /* Endpoint 15 */ +#define STR71X_USB_CNTR (STR71X_USB_BASE + 0x0040) /* Control register */ +#define STR71X_USB_ISTR (STR71X_USB_BASE + 0x0044) /* Interrupt status register */ +#define STR71X_USB_FNR (STR71X_USB_BASE + 0x0048) /* Frame number register */ +#define STR71X_USB_DADDR (STR71X_USB_BASE + 0x004C) /* Device address register */ +#define STR71X_USB_BTABLE (STR71X_USB_BASE + 0x0050) /* Buffer Table address register */ + +/* Register bit settings ***********************************************************/ + +/* Control Register (CNTR) */ + +#define USB_CNTR_FRES (1 << 0) /* Bit 0: Force usb reset */ +#define USB_CNTR_PDWN (1 << 1) /* Bit 1: Power down */ +#define USB_CNTR_LPMODE (1 << 2) /* Bit 2: Low-power mode */ +#define USB_CNTR_FSUSP (1 << 3) /* Bit 3: Force suspend */ +#define USB_CNTR_RESUME (1 << 4) /* Bit 4: Resume request */ +#define USB_CNTR_ESOFM (1 << 8) /* Bit 8: Expected start of frame */ +#define USB_CNTR_SOFM (1 << 9) /* Bit 9: Start of frame */ +#define USB_CNTR_RESETM (1 << 10) /* Bit 10: Reset */ +#define USB_CNTR_SUSPM (1 << 11) /* Bit 11: Suspend */ +#define USB_CNTR_WKUPM (1 << 12) /* Bit 12: Wake up */ +#define USB_CNTR_ERRM (1 << 13) /* Bit 13: Error */ +#define USB_CNTR_DOVRM (1 << 14) /* Bit 14: DMA over/underrun */ +#define USB_CNTR_CTRM (1 << 15) /* Bit 15: Correct transfer */ + +/* Interrupt status register (ISTR) */ + +#define USB_ISTR_EPID_SHIFT 0 /* Bits 0-3: Endpoint Identifier */ +#define USB_ISTR_EPID_MASK (0x0f << USB_ISTR_EPID_SHIFT) +#define USB_ISTR_DIR (1 << 4) /* Bit 4: DIRection of transaction */ +#define USB_ISTR_ESOF (1 << 8) /* Bit 8: Expected start of frame */ +#define USB_ISTR_SOF (1 << 9) /* Bit 9: Start of frame */ +#define USB_ISTR_RESET (1 << 10) /* Bit 10: Reset */ +#define USB_ISTR_SUSP (1 << 11) /* Bit 11: Suspend */ +#define USB_ISTR_WKUP (1 << 12) /* Bit 12: Wakeup */ +#define USB_ISTR_ERR (1 << 13) /* Bit 13: Error */ +#define USB_ISTR_DOVR (1 << 14) /* Bit 14: DMA Over/underrun */ +#define USB_ISTR_CTR (1 << 15) /* Bit 15: Correct Transfer */ + +/* Frame number register (FNR) */ + +#define USB_FNR_FN_SHIFT 0 /* Bit 0-10: Frame number */ +#define USB_FNR_LSOF_SHIFT 11 /* Bits 11-12 : Lost SOF */ +#define USB_FNR_LSOF_MASK (3 << USB_FNR_LSOF_SHIFT) +#define USB_FNR_FN_MASK (0x07ff << USB_FNR_FN_SHIFT) +#define USB_FNR_LCK (1 << 13) /* Bit 13: Locked */ +#define USB_FNR_RXDM (1 << 14) /* Bit 14: Status of D- data line */ +#define USB_FNR_RXDP (1 << 15) /* Bit 15: Status of D+ data line */ + +/* Device address register (DADDR) */ + +#define USB_DADDR_ADD_SHIFT 0 /* Bits 0-7: Device address */ +#define USB_DADDR_ADD_MASK (0x7f << USB_DADDR_ADD_SHIFT) +#define USB_DADDR_EF (1 << 7) /* Bit 8: Enable function */ + +/* Endpoint registers (EPR) */ + +#define USB_EPR_ADDRFIELD_SHIFT 0 /* Bits 0-3: Endpoint address */ +#define USB_EPR_ADDRFIELD_MASK (0x0f << USB_EPR_ADDRFIELD_SHIFT) +#define USB_EPR_TXSTAT_SHIFT 4 /* Bits 4-5: Endpoint TX status bit */ +#define USB_EPR_TXSTAT_MASK (3 << USB_EPR_TXSTAT_SHIFT) +# define USB_EPR_TXDIS (0 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX disabled */ +# define USB_EPR_TXSTALL (1 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX stalled */ +# define USB_EPR_TXNAK (2 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX NAKed */ +# define USB_EPR_TXVALID (3 << USB_EPR_TXSTAT_SHIFT) /* Endpoint TX valid */ +# define USB_EPR_TXDTOG1 (1 << USB_EPR_TXSTAT_SHIFT) /* Bit : Endpoint TX data toggle bit1 */ +# define USB_EPR_TXDTOG2 (2 << USB_EPR_TXSTAT_SHIFT) /* Bit : Endpoint TX data toggle bit2 */ +#define USB_EPR_DTOGTX (1 << 6) /* Bit 6: Endpoint data toggle TX */ +#define USB_EPR_CTRTX (1 << 7) /* Bit 7: Endpoint correct transfer TX */ +#define USB_EPR_KIND (1 << 8) /* Bit 8: Endpoint kind */ +#define USB_EPR_EPTYPE_SHIFT 9 /* Bits 9-10: Endpoint type */ +#define USB_EPR_EPTYPE_MASK (3 << USB_EPR_EPTYPE_SHIFT) +# define USB_EPR_BULK (0 << USB_EPR_EPTYPE_SHIFT) /* Endpoint BULK */ +# define USB_EPR_CONTROL (1 << USB_EPR_EPTYPE_SHIFT) /* Endpoint CONTROL */ +# define USB_EPR_ISOC (2 << USB_EPR_EPTYPE_SHIFT)) /* Endpoint ISOCHRONOUS */ +# define USB_EPR_INTERRUPT (3 << USB_EPR_EPTYPE_SHIFT) /* Endpoint INTERRUPT */ +#define USB_EPR_SETUP (1 << 11) /* Bit 11: Endpoint setup */ +#define USB_EPR_RXSTAT_SHIFT 12 /* Bits 12-13: Endpoint RX status bit */ +#define USB_EPR_RXSTAT_MASK (3 << USB_EPR_RXSTAT_SHIFT) +# define USB_EPR_RXDIS (0 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX disabled */ +# define USB_EPR_RXSTALL (1 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX stalled */ +# define USB_EPR_RXNAK (2 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX NAKed */ +# define USB_EPR_RXVALID (3 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX valid */ +# define USB_EPR_RXDTOG1 (1 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX data toggle bit1 */ +# define USB_EPR_RXDTOG2 (2 << USB_EPR_RXSTAT_SHIFT) /* Endpoint RX data toggle bit2 */ +#define USB_EPR_DTOGRX (1 << 14) /* Bit 14: Endpoint data toggle RX */ +#define USB_EPR_CTRRX (1 << 15) /* Bit 15: Endpoint correct transfer RX */ + +/* Endpoint register mask (no toggle fields) */ + +#define USB_EPR_NOTOGGLE_MASK (USB_EPR_CTRRX|USB_EPR_SETUP|USB_EPR_TFIELD|\ + USB_EPR_KIND|USB_EPR_CTRTX|USB_EPR_ADDRFIELD) + +/* Toggles only */ + +#define USB_EPR_TXDTOG_MASK (USB_EPR_TXSTAT_MASK|USB_EPR_NOTOGGLE_MASK) +#define USB_EPR_RXDTOG_MASK (USB_EPR_RXSTAT_MASK|USB_EPR_NOTOGGLE_MASK) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_USB_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_wdog.h b/nuttx/arch/arm/src/str71x/str71x_wdog.h index 75b89ab891..81caf6a25f 100644 --- a/nuttx/arch/arm/src/str71x/str71x_wdog.h +++ b/nuttx/arch/arm/src/str71x/str71x_wdog.h @@ -1,75 +1,75 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_wdog.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H -#define __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* Registers ************************************************************************/ - -#define STR71X_WDOG_CR (STR71X_WDOG_BASE + 0x0000) /* 16-bits wide */ -#define STR71X_WDOG_PR (STR71X_WDOG_BASE + 0x0004) /* 16-bits wide */ -#define STR71X_WDOG_VR (STR71X_WDOG_BASE + 0x0008) /* 16-bits wide */ -#define STR71X_WDOG_CNT (STR71X_WDOG_BASE + 0x000c) /* 16-bits wide */ -#define STR71X_WDOG_SR (STR71X_WDOG_BASE + 0x0010) /* 16-bits wide */ -#define STR71X_WDOG_MR (STR71X_WDOG_BASE + 0x0014) /* 16-bits wide */ -#define STR71X_WDOG_KR (STR71X_WDOG_BASE + 0x00018 /* 16-bits wide */ - -/* Register bit settings ***********************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_wdog.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H +#define __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* Registers ************************************************************************/ + +#define STR71X_WDOG_CR (STR71X_WDOG_BASE + 0x0000) /* 16-bits wide */ +#define STR71X_WDOG_PR (STR71X_WDOG_BASE + 0x0004) /* 16-bits wide */ +#define STR71X_WDOG_VR (STR71X_WDOG_BASE + 0x0008) /* 16-bits wide */ +#define STR71X_WDOG_CNT (STR71X_WDOG_BASE + 0x000c) /* 16-bits wide */ +#define STR71X_WDOG_SR (STR71X_WDOG_BASE + 0x0010) /* 16-bits wide */ +#define STR71X_WDOG_MR (STR71X_WDOG_BASE + 0x0014) /* 16-bits wide */ +#define STR71X_WDOG_KR (STR71X_WDOG_BASE + 0x00018 /* 16-bits wide */ + +/* Register bit settings ***********************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STR71X_STR71X_WDOG_H */ diff --git a/nuttx/arch/arm/src/str71x/str71x_xti.c b/nuttx/arch/arm/src/str71x/str71x_xti.c index 3143ad76f3..3ef0a803db 100755 --- a/nuttx/arch/arm/src/str71x/str71x_xti.c +++ b/nuttx/arch/arm/src/str71x/str71x_xti.c @@ -2,7 +2,7 @@ * arch/arm/src/str71x/str71x_xti.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/arm/src/str71x/str71x_xti.h b/nuttx/arch/arm/src/str71x/str71x_xti.h index d9458c196e..638ab4f877 100644 --- a/nuttx/arch/arm/src/str71x/str71x_xti.h +++ b/nuttx/arch/arm/src/str71x/str71x_xti.h @@ -1,105 +1,105 @@ -/************************************************************************************ - * arch/arm/src/str71x/str71x_xti.h - * - * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_STR71X_STR71X_XTI_H -#define __ARCH_ARM_SRC_STR71X_STR71X_XTI_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "str71x_map.h" - -/************************************************************************************ - * Pre-procesor Definitions - ************************************************************************************/ - -/* External Interupt Controller (XTI) registers *************************************/ - -#define STR71X_XTI_SR (STR71X_XTI_BASE + 0x001c) /* 8-bits wide */ -#define STR71X_XTI_CTRL (STR71X_XTI_BASE + 0x0024) /* 8-bits wide */ -#define STR71X_XTI_MRH (STR71X_XTI_BASE + 0x0028) /* 8-bits wide */ -#define STR71X_XTI_MRL (STR71X_XTI_BASE + 0x002c) /* 8-bits wide */ -#define STR71X_XTI_TRH (STR71X_XTI_BASE + 0x0030) /* 8-bits wide */ -#define STR71X_XTI_TRL (STR71X_XTI_BASE + 0x0034) /* 8-bits wide */ -#define STR71X_XTI_PRH (STR71X_XTI_BASE + 0x0038) /* 8-bits wide */ -#define STR71X_XTI_PRL (STR71X_XTI_BASE + 0x003c) /* 8-bits wide */ - -/* Register bit settings ************************************************************/ - -/* Control register (CTRL) */ - -#define STR71X_XTICTRL_WKUPINT (0x01) -#define STR71X_XTICTRL_ID1S (0x02) -#define STR71X_XTICTRL_STOP (0x04) - -/* Most registers are address by external interrupt line in two 8-bit high and low - * registers - */ - -#define STR71X_XTI_LINE(n) (1 << (n)) -#define STR71X_XTI_LINE0 STR71X_XTI_LINE(0) /* Low register */ -#define STR71X_XTI_LINE1 STR71X_XTI_LINE(1) -#define STR71X_XTI_LINE2 STR71X_XTI_LINE(2) -#define STR71X_XTI_LINE3 STR71X_XTI_LINE(3) -#define STR71X_XTI_LINE4 STR71X_XTI_LINE(4) -#define STR71X_XTI_LINE5 STR71X_XTI_LINE(5) -#define STR71X_XTI_LINE6 STR71X_XTI_LINE(6) -#define STR71X_XTI_LINE7 STR71X_XTI_LINE(7) - -#define STR71X_XTI_LINE8 STR71X_XTI_LINE(8) /* High register */ -#define STR71X_XTI_LINE9 STR71X_XTI_LINE(9) -#define STR71X_XTI_LINE10 STR71X_XTI_LINE(10) -#define STR71X_XTI_LINE11 STR71X_XTI_LINE(11) -#define STR71X_XTI_LINE12 STR71X_XTI_LINE(12) -#define STR71X_XTI_LINE13 STR71X_XTI_LINE(13) -#define STR71X_XTI_LINE14 STR71X_XTI_LINE(14) -#define STR71X_XTI_LINE15 STR71X_XTI_LINE(15) - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* _ARCH_ARM_SRC_STR71X_STR71X_XTI_H */ +/************************************************************************************ + * arch/arm/src/str71x/str71x_xti.h + * + * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STR71X_STR71X_XTI_H +#define __ARCH_ARM_SRC_STR71X_STR71X_XTI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "str71x_map.h" + +/************************************************************************************ + * Pre-procesor Definitions + ************************************************************************************/ + +/* External Interupt Controller (XTI) registers *************************************/ + +#define STR71X_XTI_SR (STR71X_XTI_BASE + 0x001c) /* 8-bits wide */ +#define STR71X_XTI_CTRL (STR71X_XTI_BASE + 0x0024) /* 8-bits wide */ +#define STR71X_XTI_MRH (STR71X_XTI_BASE + 0x0028) /* 8-bits wide */ +#define STR71X_XTI_MRL (STR71X_XTI_BASE + 0x002c) /* 8-bits wide */ +#define STR71X_XTI_TRH (STR71X_XTI_BASE + 0x0030) /* 8-bits wide */ +#define STR71X_XTI_TRL (STR71X_XTI_BASE + 0x0034) /* 8-bits wide */ +#define STR71X_XTI_PRH (STR71X_XTI_BASE + 0x0038) /* 8-bits wide */ +#define STR71X_XTI_PRL (STR71X_XTI_BASE + 0x003c) /* 8-bits wide */ + +/* Register bit settings ************************************************************/ + +/* Control register (CTRL) */ + +#define STR71X_XTICTRL_WKUPINT (0x01) +#define STR71X_XTICTRL_ID1S (0x02) +#define STR71X_XTICTRL_STOP (0x04) + +/* Most registers are address by external interrupt line in two 8-bit high and low + * registers + */ + +#define STR71X_XTI_LINE(n) (1 << (n)) +#define STR71X_XTI_LINE0 STR71X_XTI_LINE(0) /* Low register */ +#define STR71X_XTI_LINE1 STR71X_XTI_LINE(1) +#define STR71X_XTI_LINE2 STR71X_XTI_LINE(2) +#define STR71X_XTI_LINE3 STR71X_XTI_LINE(3) +#define STR71X_XTI_LINE4 STR71X_XTI_LINE(4) +#define STR71X_XTI_LINE5 STR71X_XTI_LINE(5) +#define STR71X_XTI_LINE6 STR71X_XTI_LINE(6) +#define STR71X_XTI_LINE7 STR71X_XTI_LINE(7) + +#define STR71X_XTI_LINE8 STR71X_XTI_LINE(8) /* High register */ +#define STR71X_XTI_LINE9 STR71X_XTI_LINE(9) +#define STR71X_XTI_LINE10 STR71X_XTI_LINE(10) +#define STR71X_XTI_LINE11 STR71X_XTI_LINE(11) +#define STR71X_XTI_LINE12 STR71X_XTI_LINE(12) +#define STR71X_XTI_LINE13 STR71X_XTI_LINE(13) +#define STR71X_XTI_LINE14 STR71X_XTI_LINE(14) +#define STR71X_XTI_LINE15 STR71X_XTI_LINE(15) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* _ARCH_ARM_SRC_STR71X_STR71X_XTI_H */ diff --git a/nuttx/arch/avr/include/arch.h b/nuttx/arch/avr/include/arch.h index 389e5689a8..0f3ce5fcba 100644 --- a/nuttx/arch/avr/include/arch.h +++ b/nuttx/arch/avr/include/arch.h @@ -2,7 +2,7 @@ * arch/avr/include/arch.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/at32uc3/irq.h b/nuttx/arch/avr/include/at32uc3/irq.h index 670a4504c7..00802ebab1 100755 --- a/nuttx/arch/avr/include/at32uc3/irq.h +++ b/nuttx/arch/avr/include/at32uc3/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/at32uc3/irq.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/at90usb/irq.h b/nuttx/arch/avr/include/at90usb/irq.h index 8e6412125d..4c11d36887 100644 --- a/nuttx/arch/avr/include/at90usb/irq.h +++ b/nuttx/arch/avr/include/at90usb/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/at90usb/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/atmega/irq.h b/nuttx/arch/avr/include/atmega/irq.h index aabf227ee0..194c7d0084 100644 --- a/nuttx/arch/avr/include/atmega/irq.h +++ b/nuttx/arch/avr/include/atmega/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/atmega/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr/avr.h b/nuttx/arch/avr/include/avr/avr.h index d6b6f428df..fc3e82bb4b 100755 --- a/nuttx/arch/avr/include/avr/avr.h +++ b/nuttx/arch/avr/include/avr/avr.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/avr.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr/irq.h b/nuttx/arch/avr/include/avr/irq.h index 242114e98e..9a84d1aa7f 100644 --- a/nuttx/arch/avr/include/avr/irq.h +++ b/nuttx/arch/avr/include/avr/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr/syscall.h b/nuttx/arch/avr/include/avr/syscall.h index de5c4e3179..515c7adfb3 100644 --- a/nuttx/arch/avr/include/avr/syscall.h +++ b/nuttx/arch/avr/include/avr/syscall.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr/types.h b/nuttx/arch/avr/include/avr/types.h index e0a70fb7f9..4ea22aeafa 100644 --- a/nuttx/arch/avr/include/avr/types.h +++ b/nuttx/arch/avr/include/avr/types.h @@ -2,7 +2,7 @@ * arch/avr/include/avr/types.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr32/avr32.h b/nuttx/arch/avr/include/avr32/avr32.h index 2c0c66dbff..2488516ca2 100755 --- a/nuttx/arch/avr/include/avr32/avr32.h +++ b/nuttx/arch/avr/include/avr32/avr32.h @@ -2,7 +2,7 @@ * arch/avr/include/avr32/avr32.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr32/irq.h b/nuttx/arch/avr/include/avr32/irq.h index 5d4ddf6b1c..09ee0296ab 100644 --- a/nuttx/arch/avr/include/avr32/irq.h +++ b/nuttx/arch/avr/include/avr32/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/avr32/irq.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr32/syscall.h b/nuttx/arch/avr/include/avr32/syscall.h index 2fb43dde41..920b196485 100644 --- a/nuttx/arch/avr/include/avr32/syscall.h +++ b/nuttx/arch/avr/include/avr32/syscall.h @@ -2,7 +2,7 @@ * arch/avr/include/avr32/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/avr32/types.h b/nuttx/arch/avr/include/avr32/types.h index 4b5f20cea6..6a7c00b478 100644 --- a/nuttx/arch/avr/include/avr32/types.h +++ b/nuttx/arch/avr/include/avr32/types.h @@ -2,7 +2,7 @@ * arch/avr/include/avr32/types.h * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/irq.h b/nuttx/arch/avr/include/irq.h index 8f5ef73bc0..de9981cd50 100644 --- a/nuttx/arch/avr/include/irq.h +++ b/nuttx/arch/avr/include/irq.h @@ -2,7 +2,7 @@ * arch/avr/include/irq.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/limits.h b/nuttx/arch/avr/include/limits.h index 2213834739..2089bf9379 100644 --- a/nuttx/arch/avr/include/limits.h +++ b/nuttx/arch/avr/include/limits.h @@ -2,7 +2,7 @@ * arch/avr/include/limits.h * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/syscall.h b/nuttx/arch/avr/include/syscall.h index 29e2d8871f..aa6c501d1f 100644 --- a/nuttx/arch/avr/include/syscall.h +++ b/nuttx/arch/avr/include/syscall.h @@ -2,7 +2,7 @@ * arch/avr/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/include/types.h b/nuttx/arch/avr/include/types.h index 48481039f8..8089c96c13 100644 --- a/nuttx/arch/avr/include/types.h +++ b/nuttx/arch/avr/include/types.h @@ -2,7 +2,7 @@ * arch/avr/include/types.h * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/Make.defs b/nuttx/arch/avr/src/at32uc3/Make.defs index 49d35ed4be..69d17456d0 100644 --- a/nuttx/arch/avr/src/at32uc3/Make.defs +++ b/nuttx/arch/avr/src/at32uc3/Make.defs @@ -2,7 +2,7 @@ # arch/avr/src/at32uc3/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_abdac.h b/nuttx/arch/avr/src/at32uc3/at32uc3_abdac.h index f71229f895..b2f01e30c8 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_abdac.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_abdac.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_abdac.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_adc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_adc.h index 7695e6e653..37b1456b49 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_adc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_adc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_adc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_clkinit.c b/nuttx/arch/avr/src/at32uc3/at32uc3_clkinit.c index cf75ad0019..1a39aad783 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_clkinit.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_clkinit.c @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_clkinit.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_config.h b/nuttx/arch/avr/src/at32uc3/at32uc3_config.h index c1b3376765..1f942591a3 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_config.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_config.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_config.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_eic.h b/nuttx/arch/avr/src/at32uc3/at32uc3_eic.h index 505d0b84bd..44c050b2b4 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_eic.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_eic.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_eic.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_flashc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_flashc.h index 45df326bab..e66663fee3 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_flashc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_flashc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_flashc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.c b/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.c index 2a2948f877..a0e39e19dd 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.c @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_gpio.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.h b/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.h index b5f377efbf..6467ef7c14 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_gpio.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_gpio.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_gpioirq.c b/nuttx/arch/avr/src/at32uc3/at32uc3_gpioirq.c index 0e05bf02a1..c55ba3d136 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_gpioirq.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_gpioirq.c @@ -3,7 +3,7 @@ * arch/avr/src/chip/at32uc3_gpioirq.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_hmatrix.h b/nuttx/arch/avr/src/at32uc3/at32uc3_hmatrix.h index 6190fe3de3..40708fc1f1 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_hmatrix.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_hmatrix.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_hmatrix.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_intc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_intc.h index 700b274596..25aedd275b 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_intc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_intc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_intc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_internal.h b/nuttx/arch/avr/src/at32uc3/at32uc3_internal.h index 6fa53ef056..57d52a2885 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_internal.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_internal.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_irq.c b/nuttx/arch/avr/src/at32uc3/at32uc3_irq.c index ce42fd03d2..771d1b9da9 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_irq.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_irq.c @@ -3,7 +3,7 @@ * arch/avr/src/chip/at32uc3_irq.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_memorymap.h b/nuttx/arch/avr/src/at32uc3/at32uc3_memorymap.h index dfe31ee272..8df5183f79 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_memorymap.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_memorymap.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_memorymap.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_pdca.h b/nuttx/arch/avr/src/at32uc3/at32uc3_pdca.h index 7a6c3bfe16..ee84f8f090 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_pdca.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_pdca.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_pdca.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_pinmux.h b/nuttx/arch/avr/src/at32uc3/at32uc3_pinmux.h index 0c55fb94ca..e5c7e71436 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_pinmux.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_pinmux.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_pinmux.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_pm.h b/nuttx/arch/avr/src/at32uc3/at32uc3_pm.h index 3658768773..964d839ee0 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_pm.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_pm.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_pm.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_pwm.h b/nuttx/arch/avr/src/at32uc3/at32uc3_pwm.h index e2dee47e58..5aedf7d601 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_pwm.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_pwm.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_pwm.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_rtc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_rtc.h index 1a861d0bcc..aa762065cb 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_rtc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_rtc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_rtc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_spi.h b/nuttx/arch/avr/src/at32uc3/at32uc3_spi.h index c2a4b99d3e..1c1a804504 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_spi.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_spi.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_spi.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_ssc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_ssc.h index fa67d4714a..35b286b6ae 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_ssc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_ssc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_ssc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_tc.h b/nuttx/arch/avr/src/at32uc3/at32uc3_tc.h index f615d1b936..821b35b333 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_tc.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_tc.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_tc.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c index 3d17139096..711cef3c91 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_timerisr.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_twi.h b/nuttx/arch/avr/src/at32uc3/at32uc3_twi.h index afec99fb12..3a82b733a6 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_twi.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_twi.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_twi.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_usart.h b/nuttx/arch/avr/src/at32uc3/at32uc3_usart.h index 350946321c..17b01e0844 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_usart.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_usart.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_usart.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_usbb.h b/nuttx/arch/avr/src/at32uc3/at32uc3_usbb.h index b6bc1765ae..247f7d5f0f 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_usbb.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_usbb.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_usbb.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_wdt.h b/nuttx/arch/avr/src/at32uc3/at32uc3_wdt.h index 384e67265b..b3bfde6a93 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_wdt.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_wdt.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3_wdt.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3a_pinmux.h b/nuttx/arch/avr/src/at32uc3/at32uc3a_pinmux.h index 124d056d6a..695db47b58 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3a_pinmux.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3a_pinmux.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3a_pinmux.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3b_pinmux.h b/nuttx/arch/avr/src/at32uc3/at32uc3b_pinmux.h index 352af2635c..d5758745da 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3b_pinmux.h +++ b/nuttx/arch/avr/src/at32uc3/at32uc3b_pinmux.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/at32uc3b_pinmux.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at32uc3/chip.h b/nuttx/arch/avr/src/at32uc3/chip.h index ec2351b9cf..42b3ea681d 100644 --- a/nuttx/arch/avr/src/at32uc3/chip.h +++ b/nuttx/arch/avr/src/at32uc3/chip.h @@ -2,7 +2,7 @@ * arch/avr/src/at32uc3/chip.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/Make.defs b/nuttx/arch/avr/src/at90usb/Make.defs index 0497acd950..be37261343 100644 --- a/nuttx/arch/avr/src/at90usb/Make.defs +++ b/nuttx/arch/avr/src/at90usb/Make.defs @@ -2,7 +2,7 @@ # arch/avr/src/at90usb/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_exceptions.S b/nuttx/arch/avr/src/at90usb/at90usb_exceptions.S index 79eda5f18d..cb51c1616c 100755 --- a/nuttx/arch/avr/src/at90usb/at90usb_exceptions.S +++ b/nuttx/arch/avr/src/at90usb/at90usb_exceptions.S @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/at90usb_exceptions.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_head.S b/nuttx/arch/avr/src/at90usb/at90usb_head.S index 4efa973b6d..be747632b7 100755 --- a/nuttx/arch/avr/src/at90usb/at90usb_head.S +++ b/nuttx/arch/avr/src/at90usb/at90usb_head.S @@ -2,7 +2,7 @@ * arch/avr32/src/at90usb/at90usb_head.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_internal.h b/nuttx/arch/avr/src/at90usb/at90usb_internal.h index 609631dd50..329f3ce4a6 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_internal.h +++ b/nuttx/arch/avr/src/at90usb/at90usb_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/at90usb_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_lowconsole.c b/nuttx/arch/avr/src/at90usb/at90usb_lowconsole.c index bbba4478b9..d29f9a8325 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_lowconsole.c +++ b/nuttx/arch/avr/src/at90usb/at90usb_lowconsole.c @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/at90usb_lowconsole.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_memorymap.h b/nuttx/arch/avr/src/at90usb/at90usb_memorymap.h index 71635d3832..a40bd3d36f 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_memorymap.h +++ b/nuttx/arch/avr/src/at90usb/at90usb_memorymap.h @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/at90usb_memorymap.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/at90usb_timerisr.c b/nuttx/arch/avr/src/at90usb/at90usb_timerisr.c index 5e92acb5a8..21e577ad27 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_timerisr.c +++ b/nuttx/arch/avr/src/at90usb/at90usb_timerisr.c @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/at90usb_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/at90usb/chip.h b/nuttx/arch/avr/src/at90usb/chip.h index c58c2040d1..4e3ec8297b 100644 --- a/nuttx/arch/avr/src/at90usb/chip.h +++ b/nuttx/arch/avr/src/at90usb/chip.h @@ -2,7 +2,7 @@ * arch/avr/src/at90usb/chip.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/Make.defs b/nuttx/arch/avr/src/atmega/Make.defs index b3451aaa1f..a7d3a881b5 100644 --- a/nuttx/arch/avr/src/atmega/Make.defs +++ b/nuttx/arch/avr/src/atmega/Make.defs @@ -2,7 +2,7 @@ # arch/avr/src/atmega/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_exceptions.S b/nuttx/arch/avr/src/atmega/atmega_exceptions.S index 4050f1880e..0b8b4416d5 100755 --- a/nuttx/arch/avr/src/atmega/atmega_exceptions.S +++ b/nuttx/arch/avr/src/atmega/atmega_exceptions.S @@ -2,7 +2,7 @@ * arch/avr/src/atmega/atmega_exceptions.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_head.S b/nuttx/arch/avr/src/atmega/atmega_head.S index b930c309bd..95de2f100c 100755 --- a/nuttx/arch/avr/src/atmega/atmega_head.S +++ b/nuttx/arch/avr/src/atmega/atmega_head.S @@ -2,7 +2,7 @@ * arch/avr32/src/atmega/atmega_head.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_internal.h b/nuttx/arch/avr/src/atmega/atmega_internal.h index a062835bdc..4a51661a7a 100644 --- a/nuttx/arch/avr/src/atmega/atmega_internal.h +++ b/nuttx/arch/avr/src/atmega/atmega_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/atmega/atmega_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_lowconsole.c b/nuttx/arch/avr/src/atmega/atmega_lowconsole.c index 4e52f4aba1..9a03c56a47 100644 --- a/nuttx/arch/avr/src/atmega/atmega_lowconsole.c +++ b/nuttx/arch/avr/src/atmega/atmega_lowconsole.c @@ -2,7 +2,7 @@ * arch/avr/src/atmega/atmega_lowconsole.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_memorymap.h b/nuttx/arch/avr/src/atmega/atmega_memorymap.h index 7b990754c9..d957247d5c 100644 --- a/nuttx/arch/avr/src/atmega/atmega_memorymap.h +++ b/nuttx/arch/avr/src/atmega/atmega_memorymap.h @@ -2,7 +2,7 @@ * arch/avr/src/atmega/atmega_memorymap.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/atmega_timerisr.c b/nuttx/arch/avr/src/atmega/atmega_timerisr.c index d724bf6f8a..bcac060a02 100644 --- a/nuttx/arch/avr/src/atmega/atmega_timerisr.c +++ b/nuttx/arch/avr/src/atmega/atmega_timerisr.c @@ -2,7 +2,7 @@ * arch/avr/src/atmega/atmega_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/atmega/chip.h b/nuttx/arch/avr/src/atmega/chip.h index 0e3f779ab7..43f54df313 100644 --- a/nuttx/arch/avr/src/atmega/chip.h +++ b/nuttx/arch/avr/src/atmega/chip.h @@ -2,7 +2,7 @@ * arch/avr/src/atmega/chip.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/avr_internal.h b/nuttx/arch/avr/src/avr/avr_internal.h index 13c5d37c5a..c87254b770 100644 --- a/nuttx/arch/avr/src/avr/avr_internal.h +++ b/nuttx/arch/avr/src/avr/avr_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/avr/avr_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/excptmacros.h b/nuttx/arch/avr/src/avr/excptmacros.h index 2d55a81095..51e1e61a1e 100755 --- a/nuttx/arch/avr/src/avr/excptmacros.h +++ b/nuttx/arch/avr/src/avr/excptmacros.h @@ -2,7 +2,7 @@ * arch/avr/src/avr/excptmacros.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_blocktask.c b/nuttx/arch/avr/src/avr/up_blocktask.c index 6444132e02..4bc587903d 100755 --- a/nuttx/arch/avr/src/avr/up_blocktask.c +++ b/nuttx/arch/avr/src/avr/up_blocktask.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_blocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_checkstack.c b/nuttx/arch/avr/src/avr/up_checkstack.c index bf646f7ec9..b8325ccbc8 100644 --- a/nuttx/arch/avr/src/avr/up_checkstack.c +++ b/nuttx/arch/avr/src/avr/up_checkstack.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_checkstack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_copystate.c b/nuttx/arch/avr/src/avr/up_copystate.c index 5423202f2b..4c9c13bf83 100644 --- a/nuttx/arch/avr/src/avr/up_copystate.c +++ b/nuttx/arch/avr/src/avr/up_copystate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_copystate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_createstack.c b/nuttx/arch/avr/src/avr/up_createstack.c index 2ef60e8159..67219ec9c1 100644 --- a/nuttx/arch/avr/src/avr/up_createstack.c +++ b/nuttx/arch/avr/src/avr/up_createstack.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_createstack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_doirq.c b/nuttx/arch/avr/src/avr/up_doirq.c index e3d3f18217..e38bf7fa84 100644 --- a/nuttx/arch/avr/src/avr/up_doirq.c +++ b/nuttx/arch/avr/src/avr/up_doirq.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_doirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_dumpstate.c b/nuttx/arch/avr/src/avr/up_dumpstate.c index 73cb823c4c..902c2ce9fd 100644 --- a/nuttx/arch/avr/src/avr/up_dumpstate.c +++ b/nuttx/arch/avr/src/avr/up_dumpstate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_dumpstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_initialstate.c b/nuttx/arch/avr/src/avr/up_initialstate.c index af7e881013..12fead20ae 100644 --- a/nuttx/arch/avr/src/avr/up_initialstate.c +++ b/nuttx/arch/avr/src/avr/up_initialstate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_initialstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_irq.c b/nuttx/arch/avr/src/avr/up_irq.c index 1e0072427b..6362fe66a7 100644 --- a/nuttx/arch/avr/src/avr/up_irq.c +++ b/nuttx/arch/avr/src/avr/up_irq.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_irq.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_releasepending.c b/nuttx/arch/avr/src/avr/up_releasepending.c index bd35379440..5684dcf550 100755 --- a/nuttx/arch/avr/src/avr/up_releasepending.c +++ b/nuttx/arch/avr/src/avr/up_releasepending.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_releasepending.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_reprioritizertr.c b/nuttx/arch/avr/src/avr/up_reprioritizertr.c index 3983b3953a..14033a3bde 100755 --- a/nuttx/arch/avr/src/avr/up_reprioritizertr.c +++ b/nuttx/arch/avr/src/avr/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_reprioritizertr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_romgetc.c b/nuttx/arch/avr/src/avr/up_romgetc.c index 7d46b17929..db2fa55c28 100644 --- a/nuttx/arch/avr/src/avr/up_romgetc.c +++ b/nuttx/arch/avr/src/avr/up_romgetc.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_romgetc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_schedulesigaction.c b/nuttx/arch/avr/src/avr/up_schedulesigaction.c index ba56234d1c..a70158a0de 100644 --- a/nuttx/arch/avr/src/avr/up_schedulesigaction.c +++ b/nuttx/arch/avr/src/avr/up_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_schedulesigaction.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_sigdeliver.c b/nuttx/arch/avr/src/avr/up_sigdeliver.c index bef2834140..4398dba6b2 100644 --- a/nuttx/arch/avr/src/avr/up_sigdeliver.c +++ b/nuttx/arch/avr/src/avr/up_sigdeliver.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_sigdeliver.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_spi.c b/nuttx/arch/avr/src/avr/up_spi.c index 7a38d5c972..c490eb02b0 100644 --- a/nuttx/arch/avr/src/avr/up_spi.c +++ b/nuttx/arch/avr/src/avr/up_spi.c @@ -2,7 +2,7 @@ * arch/arm/src/avr/up_spi.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_switchcontext.S b/nuttx/arch/avr/src/avr/up_switchcontext.S index 3e451f4092..62532081f1 100755 --- a/nuttx/arch/avr/src/avr/up_switchcontext.S +++ b/nuttx/arch/avr/src/avr/up_switchcontext.S @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_switchcontext.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_unblocktask.c b/nuttx/arch/avr/src/avr/up_unblocktask.c index a55b81e2c7..0eff2edcd8 100755 --- a/nuttx/arch/avr/src/avr/up_unblocktask.c +++ b/nuttx/arch/avr/src/avr/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_unblocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr/up_usestack.c b/nuttx/arch/avr/src/avr/up_usestack.c index 0c86b64ee6..cedc9afe31 100644 --- a/nuttx/arch/avr/src/avr/up_usestack.c +++ b/nuttx/arch/avr/src/avr/up_usestack.c @@ -2,7 +2,7 @@ * arch/avr/src/avr/up_usestack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/avr32_internal.h b/nuttx/arch/avr/src/avr32/avr32_internal.h index 332b0918e6..680e2c804f 100644 --- a/nuttx/arch/avr/src/avr32/avr32_internal.h +++ b/nuttx/arch/avr/src/avr32/avr32_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_blocktask.c b/nuttx/arch/avr/src/avr32/up_blocktask.c index 5897825caa..5d05350e68 100755 --- a/nuttx/arch/avr/src/avr32/up_blocktask.c +++ b/nuttx/arch/avr/src/avr32/up_blocktask.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_blocktask.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_copystate.c b/nuttx/arch/avr/src/avr32/up_copystate.c index 67640f8cce..fa69f8cdd5 100644 --- a/nuttx/arch/avr/src/avr32/up_copystate.c +++ b/nuttx/arch/avr/src/avr32/up_copystate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_copystate.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c index cd72a66ac3..2d34a9adfe 100644 --- a/nuttx/arch/avr/src/avr32/up_createstack.c +++ b/nuttx/arch/avr/src/avr32/up_createstack.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_createstack.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c index 061583393d..7ade35fadc 100644 --- a/nuttx/arch/avr/src/avr32/up_doirq.c +++ b/nuttx/arch/avr/src/avr32/up_doirq.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_doirq.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_dumpstate.c b/nuttx/arch/avr/src/avr32/up_dumpstate.c index 71e35eea69..15a3e7ef87 100644 --- a/nuttx/arch/avr/src/avr32/up_dumpstate.c +++ b/nuttx/arch/avr/src/avr32/up_dumpstate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_dumpstate.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_exceptions.S b/nuttx/arch/avr/src/avr32/up_exceptions.S index 448a93d767..53a5b9c4fb 100755 --- a/nuttx/arch/avr/src/avr32/up_exceptions.S +++ b/nuttx/arch/avr/src/avr32/up_exceptions.S @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_exceptions.S * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_fullcontextrestore.S b/nuttx/arch/avr/src/avr32/up_fullcontextrestore.S index 466303abb2..8b09109983 100755 --- a/nuttx/arch/avr/src/avr32/up_fullcontextrestore.S +++ b/nuttx/arch/avr/src/avr32/up_fullcontextrestore.S @@ -2,7 +2,7 @@ * arch/avr32/src/avr32/up_fullcontextrestore.S * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_initialstate.c b/nuttx/arch/avr/src/avr32/up_initialstate.c index 38fe40d677..fe3a79d90b 100644 --- a/nuttx/arch/avr/src/avr32/up_initialstate.c +++ b/nuttx/arch/avr/src/avr32/up_initialstate.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_initialstate.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_nommuhead.S b/nuttx/arch/avr/src/avr32/up_nommuhead.S index 3f4321df09..316e68aaff 100644 --- a/nuttx/arch/avr/src/avr32/up_nommuhead.S +++ b/nuttx/arch/avr/src/avr32/up_nommuhead.S @@ -2,7 +2,7 @@ * arch/avr32/src/avr32/up_nommuhead.S * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_releasepending.c b/nuttx/arch/avr/src/avr32/up_releasepending.c index cf8ac55907..3cf29e623b 100755 --- a/nuttx/arch/avr/src/avr32/up_releasepending.c +++ b/nuttx/arch/avr/src/avr32/up_releasepending.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_releasepending.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_reprioritizertr.c b/nuttx/arch/avr/src/avr32/up_reprioritizertr.c index 967ea025aa..e1712fed09 100755 --- a/nuttx/arch/avr/src/avr32/up_reprioritizertr.c +++ b/nuttx/arch/avr/src/avr32/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_reprioritizertr.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c index d56bb1e512..edf145a17c 100644 --- a/nuttx/arch/avr/src/avr32/up_schedulesigaction.c +++ b/nuttx/arch/avr/src/avr32/up_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_schedulesigaction.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_sigdeliver.c b/nuttx/arch/avr/src/avr32/up_sigdeliver.c index c886694829..8c1c0b705d 100644 --- a/nuttx/arch/avr/src/avr32/up_sigdeliver.c +++ b/nuttx/arch/avr/src/avr32/up_sigdeliver.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_sigdeliver.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_switchcontext.S b/nuttx/arch/avr/src/avr32/up_switchcontext.S index 5cddc17a14..91b6a98bae 100755 --- a/nuttx/arch/avr/src/avr32/up_switchcontext.S +++ b/nuttx/arch/avr/src/avr32/up_switchcontext.S @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_switchcontext.S * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_syscall6.S b/nuttx/arch/avr/src/avr32/up_syscall6.S index 143980e62c..78e518dd75 100755 --- a/nuttx/arch/avr/src/avr32/up_syscall6.S +++ b/nuttx/arch/avr/src/avr32/up_syscall6.S @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_syscall6.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on Bran's kernel development tutorials. Rewritten for JamesM's * kernel development tutorials. diff --git a/nuttx/arch/avr/src/avr32/up_unblocktask.c b/nuttx/arch/avr/src/avr32/up_unblocktask.c index 43b6e58308..da6b31f833 100755 --- a/nuttx/arch/avr/src/avr32/up_unblocktask.c +++ b/nuttx/arch/avr/src/avr32/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_unblocktask.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/avr32/up_usestack.c b/nuttx/arch/avr/src/avr32/up_usestack.c index 2161ec6dd0..e73de3fb06 100644 --- a/nuttx/arch/avr/src/avr32/up_usestack.c +++ b/nuttx/arch/avr/src/avr32/up_usestack.c @@ -2,7 +2,7 @@ * arch/avr/src/avr32/up_usestack.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_allocateheap.c b/nuttx/arch/avr/src/common/up_allocateheap.c index 675352d5e7..b4a7cde024 100644 --- a/nuttx/arch/avr/src/common/up_allocateheap.c +++ b/nuttx/arch/avr/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_allocateheap.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_arch.h b/nuttx/arch/avr/src/common/up_arch.h index 16a303c5a9..f02c14fb11 100644 --- a/nuttx/arch/avr/src/common/up_arch.h +++ b/nuttx/arch/avr/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/avr/src/common/up_arch.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c index a0ba2355e2..82c58d6587 100644 --- a/nuttx/arch/avr/src/common/up_assert.c +++ b/nuttx/arch/avr/src/common/up_assert.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_assert.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_exit.c b/nuttx/arch/avr/src/common/up_exit.c index 1c41b7496c..0a8cc0d182 100644 --- a/nuttx/arch/avr/src/common/up_exit.c +++ b/nuttx/arch/avr/src/common/up_exit.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_exit.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_idle.c b/nuttx/arch/avr/src/common/up_idle.c index 2854956cd1..7221a36e75 100644 --- a/nuttx/arch/avr/src/common/up_idle.c +++ b/nuttx/arch/avr/src/common/up_idle.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_idle.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_internal.h b/nuttx/arch/avr/src/common/up_internal.h index e65b5627d9..fce3bc6faa 100644 --- a/nuttx/arch/avr/src/common/up_internal.h +++ b/nuttx/arch/avr/src/common/up_internal.h @@ -2,7 +2,7 @@ * arch/avr/src/common/up_internal.h * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_interruptcontext.c b/nuttx/arch/avr/src/common/up_interruptcontext.c index c1bfb0e4dc..4930e56eac 100644 --- a/nuttx/arch/avr/src/common/up_interruptcontext.c +++ b/nuttx/arch/avr/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_interruptcontext.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_lowputs.c b/nuttx/arch/avr/src/common/up_lowputs.c index 5695b806a2..5e57ac7262 100644 --- a/nuttx/arch/avr/src/common/up_lowputs.c +++ b/nuttx/arch/avr/src/common/up_lowputs.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_lowputs.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_mdelay.c b/nuttx/arch/avr/src/common/up_mdelay.c index 171835f39b..02fcf4c277 100644 --- a/nuttx/arch/avr/src/common/up_mdelay.c +++ b/nuttx/arch/avr/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_mdelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_modifyreg16.c b/nuttx/arch/avr/src/common/up_modifyreg16.c index e06f91f960..1bca1410e4 100644 --- a/nuttx/arch/avr/src/common/up_modifyreg16.c +++ b/nuttx/arch/avr/src/common/up_modifyreg16.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_modifyreg16.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_modifyreg32.c b/nuttx/arch/avr/src/common/up_modifyreg32.c index 3369abb566..40aaaad09f 100644 --- a/nuttx/arch/avr/src/common/up_modifyreg32.c +++ b/nuttx/arch/avr/src/common/up_modifyreg32.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_modifyreg32.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_modifyreg8.c b/nuttx/arch/avr/src/common/up_modifyreg8.c index 35537a4abb..227bd7904a 100644 --- a/nuttx/arch/avr/src/common/up_modifyreg8.c +++ b/nuttx/arch/avr/src/common/up_modifyreg8.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_modifyreg8.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_puts.c b/nuttx/arch/avr/src/common/up_puts.c index aa651e2940..c7cde66a26 100644 --- a/nuttx/arch/avr/src/common/up_puts.c +++ b/nuttx/arch/avr/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_puts.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_releasestack.c b/nuttx/arch/avr/src/common/up_releasestack.c index 4c453c590e..2cf3c30e86 100644 --- a/nuttx/arch/avr/src/common/up_releasestack.c +++ b/nuttx/arch/avr/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_releasestack.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/avr/src/common/up_udelay.c b/nuttx/arch/avr/src/common/up_udelay.c index 5bbeed9075..6dd8809cc8 100644 --- a/nuttx/arch/avr/src/common/up_udelay.c +++ b/nuttx/arch/avr/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/avr/src/common/up_udelay.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/arch.h b/nuttx/arch/hc/include/arch.h index 980d5517a8..840c8b292a 100755 --- a/nuttx/arch/hc/include/arch.h +++ b/nuttx/arch/hc/include/arch.h @@ -2,7 +2,7 @@ * arch/hc/include/arch.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/hc12/irq.h b/nuttx/arch/hc/include/hc12/irq.h index 8754dc5d8a..ad9ffc4bca 100755 --- a/nuttx/arch/hc/include/hc12/irq.h +++ b/nuttx/arch/hc/include/hc12/irq.h @@ -2,7 +2,7 @@ * arch/hc/include/hc12/irq.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/hc12/types.h b/nuttx/arch/hc/include/hc12/types.h index d676e3d27a..11bcf2ee52 100755 --- a/nuttx/arch/hc/include/hc12/types.h +++ b/nuttx/arch/hc/include/hc12/types.h @@ -2,7 +2,7 @@ * arch/hc/include/hc12/types.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/hcs12/irq.h b/nuttx/arch/hc/include/hcs12/irq.h index d6162b82e2..d8054bbff8 100755 --- a/nuttx/arch/hc/include/hcs12/irq.h +++ b/nuttx/arch/hc/include/hcs12/irq.h @@ -2,7 +2,7 @@ * arch/hc/include/hcs12/irq.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/hcs12/types.h b/nuttx/arch/hc/include/hcs12/types.h index 739ddef215..47c266b862 100755 --- a/nuttx/arch/hc/include/hcs12/types.h +++ b/nuttx/arch/hc/include/hcs12/types.h @@ -2,7 +2,7 @@ * arch/hc/include/hcs12/types.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/irq.h b/nuttx/arch/hc/include/irq.h index fbf7a624e6..ef15ccbf93 100755 --- a/nuttx/arch/hc/include/irq.h +++ b/nuttx/arch/hc/include/irq.h @@ -2,7 +2,7 @@ * arch/hc/include/irq.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/limits.h b/nuttx/arch/hc/include/limits.h index 5a2c9791e8..47ffd2c7da 100755 --- a/nuttx/arch/hc/include/limits.h +++ b/nuttx/arch/hc/include/limits.h @@ -2,7 +2,7 @@ * arch/hc/include/limits.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/m9s12/irq.h b/nuttx/arch/hc/include/m9s12/irq.h index 30bed2d4c8..dd4345558d 100755 --- a/nuttx/arch/hc/include/m9s12/irq.h +++ b/nuttx/arch/hc/include/m9s12/irq.h @@ -2,7 +2,7 @@ * arch/hc/include/m9s12/irq.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/syscall.h b/nuttx/arch/hc/include/syscall.h index ff71179466..37f6f8e990 100644 --- a/nuttx/arch/hc/include/syscall.h +++ b/nuttx/arch/hc/include/syscall.h @@ -2,7 +2,7 @@ * arch/hc/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/include/types.h b/nuttx/arch/hc/include/types.h index 5cba37a9f0..a70d6df7b6 100755 --- a/nuttx/arch/hc/include/types.h +++ b/nuttx/arch/hc/include/types.h @@ -2,7 +2,7 @@ * arch/hc/include/types.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_allocateheap.c b/nuttx/arch/hc/src/common/up_allocateheap.c index 174e61564e..fc86faca5d 100755 --- a/nuttx/arch/hc/src/common/up_allocateheap.c +++ b/nuttx/arch/hc/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_allocateheap.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_arch.h b/nuttx/arch/hc/src/common/up_arch.h index 01fa74b283..a9a768553a 100755 --- a/nuttx/arch/hc/src/common/up_arch.h +++ b/nuttx/arch/hc/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/hc/src/common/up_arch.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_blocktask.c b/nuttx/arch/hc/src/common/up_blocktask.c index 3bb0d1d325..4e5bf1826b 100755 --- a/nuttx/arch/hc/src/common/up_blocktask.c +++ b/nuttx/arch/hc/src/common/up_blocktask.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_blocktask.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_copystate.c b/nuttx/arch/hc/src/common/up_copystate.c index 0858872dff..ed3fe331d5 100644 --- a/nuttx/arch/hc/src/common/up_copystate.c +++ b/nuttx/arch/hc/src/common/up_copystate.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_copystate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_createstack.c b/nuttx/arch/hc/src/common/up_createstack.c index 6e2240ef92..ef0a9df9c3 100755 --- a/nuttx/arch/hc/src/common/up_createstack.c +++ b/nuttx/arch/hc/src/common/up_createstack.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_createstack.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c index 4fc52224ef..d03b007df1 100644 --- a/nuttx/arch/hc/src/common/up_doirq.c +++ b/nuttx/arch/hc/src/common/up_doirq.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_doirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_exit.c b/nuttx/arch/hc/src/common/up_exit.c index 5b85ffe68e..7cd16b4383 100644 --- a/nuttx/arch/hc/src/common/up_exit.c +++ b/nuttx/arch/hc/src/common/up_exit.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_exit.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_idle.c b/nuttx/arch/hc/src/common/up_idle.c index ec00a8da62..701523609b 100755 --- a/nuttx/arch/hc/src/common/up_idle.c +++ b/nuttx/arch/hc/src/common/up_idle.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_idle.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_interruptcontext.c b/nuttx/arch/hc/src/common/up_interruptcontext.c index 82caae0444..87c5053287 100755 --- a/nuttx/arch/hc/src/common/up_interruptcontext.c +++ b/nuttx/arch/hc/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_interruptcontext.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_mdelay.c b/nuttx/arch/hc/src/common/up_mdelay.c index aa6d8776ca..c5b9e095b0 100755 --- a/nuttx/arch/hc/src/common/up_mdelay.c +++ b/nuttx/arch/hc/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_mdelay.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_modifyreg16.c b/nuttx/arch/hc/src/common/up_modifyreg16.c index c5ca0f86c0..15692ae695 100755 --- a/nuttx/arch/hc/src/common/up_modifyreg16.c +++ b/nuttx/arch/hc/src/common/up_modifyreg16.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_modifyreg16.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_modifyreg32.c b/nuttx/arch/hc/src/common/up_modifyreg32.c index ba68fc723c..724a020cd1 100755 --- a/nuttx/arch/hc/src/common/up_modifyreg32.c +++ b/nuttx/arch/hc/src/common/up_modifyreg32.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_modifyreg32.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_modifyreg8.c b/nuttx/arch/hc/src/common/up_modifyreg8.c index 063c0921b8..32fc768b66 100755 --- a/nuttx/arch/hc/src/common/up_modifyreg8.c +++ b/nuttx/arch/hc/src/common/up_modifyreg8.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_modifyreg8.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_puts.c b/nuttx/arch/hc/src/common/up_puts.c index 7681b74837..68ad386708 100755 --- a/nuttx/arch/hc/src/common/up_puts.c +++ b/nuttx/arch/hc/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_puts.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_releasepending.c b/nuttx/arch/hc/src/common/up_releasepending.c index 222aa717ef..0c09cb0c6c 100755 --- a/nuttx/arch/hc/src/common/up_releasepending.c +++ b/nuttx/arch/hc/src/common/up_releasepending.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_releasepending.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_releasestack.c b/nuttx/arch/hc/src/common/up_releasestack.c index bcb3761cc0..d3d917fc36 100755 --- a/nuttx/arch/hc/src/common/up_releasestack.c +++ b/nuttx/arch/hc/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_releasestack.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_reprioritizertr.c b/nuttx/arch/hc/src/common/up_reprioritizertr.c index e17a488673..ffd90bf1f2 100755 --- a/nuttx/arch/hc/src/common/up_reprioritizertr.c +++ b/nuttx/arch/hc/src/common/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_reprioritizertr.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_udelay.c b/nuttx/arch/hc/src/common/up_udelay.c index 812390f874..72a6b80a31 100755 --- a/nuttx/arch/hc/src/common/up_udelay.c +++ b/nuttx/arch/hc/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_udelay.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_unblocktask.c b/nuttx/arch/hc/src/common/up_unblocktask.c index 0883a16618..9518da774b 100755 --- a/nuttx/arch/hc/src/common/up_unblocktask.c +++ b/nuttx/arch/hc/src/common/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_unblocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/common/up_usestack.c b/nuttx/arch/hc/src/common/up_usestack.c index f5b5798f04..b0349b21b3 100755 --- a/nuttx/arch/hc/src/common/up_usestack.c +++ b/nuttx/arch/hc/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/hc/src/common/up_usestack.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/Make.defs b/nuttx/arch/hc/src/m9s12/Make.defs index f3ef80795d..0f70c42ab5 100755 --- a/nuttx/arch/hc/src/m9s12/Make.defs +++ b/nuttx/arch/hc/src/m9s12/Make.defs @@ -2,7 +2,7 @@ # arch/arm/src/m9s12/Make.defs # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/chip.h b/nuttx/arch/hc/src/m9s12/chip.h index 422d6978cb..b9ba652710 100755 --- a/nuttx/arch/hc/src/m9s12/chip.h +++ b/nuttx/arch/hc/src/m9s12/chip.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/chip.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c index 97d18b64f6..386bcb2dfc 100644 --- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_assert.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_atd.h b/nuttx/arch/hc/src/m9s12/m9s12_atd.h index e79f028ae1..4375741810 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_atd.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_atd.h @@ -3,7 +3,7 @@ * Defintions for ATD10b8c v3 * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_crg.h b/nuttx/arch/hc/src/m9s12/m9s12_crg.h index 0c71cee5a9..0231d838bf 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_crg.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_crg.h @@ -1,140 +1,140 @@ -/************************************************************************************ - * arch/hc/src/m9s12/m9s12_crg.h - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H -#define __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* CRG Module Register Offsets */ - -#define HCS12_CRG_SYNR_OFFSET (HCS12_CRG_BASE+0x00) /* CRG Synthesizer Register */ -#define HCS12_CRG_REFDV_OFFSET (HCS12_CRG_BASE+0x01) /* CRG Reference Divider Register */ -#define HCS12_CRG_CTFLG_OFFSET (HCS12_CRG_BASE+0x02) /* CRG Test Flags Register */ -#define HCS12_CRG_CRGFLG_OFFSET (HCS12_CRG_BASE+0x03) /* CRG Flags Register */ -#define HCS12_CRG_CRGINT_OFFSET (HCS12_CRG_BASE+0x04) /* CRG Interrupt Enable Register */ -#define HCS12_CRG_CLKSEL_OFFSET (HCS12_CRG_BASE+0x05) /* CRG Clock Select Register */ -#define HCS12_CRG_PLLCTL_OFFSET (HCS12_CRG_BASE+0x06) /* CRG PLL Control Register */ -#define HCS12_CRG_RTICTL_OFFSET (HCS12_CRG_BASE+0x07) /* CRG RTI Control Register */ -#define HCS12_CRG_COPCTL_OFFSET (HCS12_CRG_BASE+0x08) /* CRG COP Control Register */ -#define HCS12_CRG_FORBYP_OFFSET (HCS12_CRG_BASE+0x09) /* CRG Force and Bypass Test Register */ -#define HCS12_CRG_CTCTL_OFFSET (HCS12_CRG_BASE+0x0a) /* CRG Test Control Register */ -#define HCS12_CRG_ARMCOP_OFFSET (HCS12_CRG_BASE+0x0b) /* CRG COP Arm/Timer Reset */ - -/* CRG Module Register Addresses */ - -#define HCS12_CRG_SYNR (HCS12_REG_BASE+HCS12_CRG_SYNR_OFFSET) -#define HCS12_CRG_REFDV (HCS12_REG_BASE+HCS12_CRG_REFDV_OFFSET) -#define HCS12_CRG_CTFLG (HCS12_REG_BASE+HCS12_CRG_CTFLG_OFFSET) -#define HCS12_CRG_CRGFLG (HCS12_REG_BASE+HCS12_CRG_CRGFLG_OFFSET) -#define HCS12_CRG_CRGINT (HCS12_REG_BASE+HCS12_CRG_CRGINT_OFFSET) -#define HCS12_CRG_CLKSEL (HCS12_REG_BASE+HCS12_CRG_CLKSEL_OFFSET) -#define HCS12_CRG_PLLCTL (HCS12_REG_BASE+HCS12_CRG_PLLCTL_OFFSET) -#define HCS12_CRG_RTICTL (HCS12_REG_BASE+HCS12_CRG_RTICTL_OFFSET) -#define HCS12_CRG_COPCTL (HCS12_REG_BASE+HCS12_CRG_COPCTL_OFFSET) -#define HCS12_CRG_FORBYP (HCS12_REG_BASE+HCS12_CRG_FORBYP_OFFSET) -#define HCS12_CRG_CTCTL (HCS12_REG_BASE+HCS12_CRG_CTCTL_OFFSET) -#define HCS12_CRG_ARMCOP (HCS12_REG_BASE+HCS12_CRG_ARMCOP_OFFSET) - -/* CRG Module Register Bit Definitions */ - -#define CRG_SYNR_SHIFT (0) /* Bits 0-5: CRG synthesizer value */ -#define CRG_SYNR_MASK (0x3f << CRG_SYNR_SHIFT) - -#define CRG_REFDV_SHIFT (0) /* Bit 0-3: Reference divider */ -#define CRG_REFDV_MASK (15 << CRG_REFDV_SHIFT) - -#define CRG_CRGFLG_SCM (1 << 0) /* Bit 0: Self-Clock Mode Status Bit */ -#define CRG_CRGFLG_SCMIF (1 << 1) /* Bit 1: Self-Clock Mode Interrupt Flag */ -#define CRG_CRGFLG_TRACK (1 << 2) /* Bit 2: Track Status Bit */ -#define CRG_CRGFLG_LOCK (1 << 3) /* Bit 3: Lock Status Bit */ -#define CRG_CRGFLG_LOCKIF (1 << 4) /* Bit 4: PLL Lock Interrupt Flag */ -#define CRG_CRGFLG_LVRF (1 << 5) /* Bit 5: Low Voltage Reset Flag */ -#define CRG_CRGFLG_PORF (1 << 6) /* Bit 6: Power-on Reset Flag */ -#define CRG_CRGFLG_RTIF (1 << 7) /* Bit 7: Real-Time Interrupt Flag */ - -#define CRG_CRGINT_SCMIE (1 << 1) /* Bit 1: Self-Clock Mode Status Bit */ -#define CRG_CRGINT_LOCKIE (1 << 4) /* Bit 4: Lock Interrupt Enable Bit */ -#define CRG_CRGINT_RTIE (1 << 7) /* Bit 7: Lock Interrupt Enable Bit */ - -#define CRG_CLKSEL_COPWAI (1 << 0) /* Bit 0: COP stops in Wait Mode Bit */ -#define CRG_CLKSEL_RTIWAI (1 << 1) /* Bit 1: RTI stops in Wait Mode Bit */ -#define CRG_CLKSEL_CWAI (1 << 2) /* Bit 2: Core stops in Wait Mode Bit */ -#define CRG_CLKSEL_PLLWAI (1 << 3) /* Bit 3: PLL stops in Wait Mode Bit */ -#define CRG_CLKSEL_ROAWAI (1 << 4) /* Bit 4: Reduced Oscillator Amplitude in Wait Mode Bit */ -#define CRG_CLKSEL_SYSWAI (1 << 5) /* Bit 5: System clocks stop in wait mode bit */ -#define CRG_CLKSEL_PSTP (1 << 6) /* Bit 6: Pseudo-Stop Bit */ -#define CRG_CLKSEL_PLLSEL (1 << 7) /* Bit 7: PLL Select Bit */ - -#define CRG_PLLCTL_SCME (1 << 0) /* Bit 0: Self-Clock Mode Enable Bit */ -#define CRG_PLLCTL_PCE (1 << 1) /* Bit 1: COP Enable during Pseudo-Stop Bit */ -#define CRG_PLLCTL_PRE (1 << 2) /* Bit 2: RTI Enable during Pseudo-Stop Bit */ -#define CRG_PLLCTL_ACQ (1 << 4) /* Bit 4: Acquisition Bit */ -#define CRG_PLLCTL_AUTO (1 << 5) /* Bit 5: Automatic Bandwidth Control Bit */ -#define CRG_PLLCTL_PLLON (1 << 6) /* Bit 6: Phase Lock Loop On Bit */ -#define CRG_PLLCTL_CME (1 << 7) /* Bit 7: Clock Monitor Enable Bit */ - -#define CRG_RTICTL_MODCNT_SHIFT (0) /* Bits 0-3: Real-Time Interrupt Modulus Counter Select Bits */ -#define CRG_RTICTL_MODCNT_MASK (15 << CRG_RTICTL_MODCNT_SHIFT) -#define CRG_RTICTL_PRER_SHIFT (4) /* Bits 4-6: Real-Time Interrupt Prescale Rate Select Bits */ -#define CRG_RTICTL_PRER_MASK (7 << CRG_RTICTL_PRE_SHIFT) - -#define CRG_COPCTL_CR_SHIFT (0) /* Bits 0-2: COP Watchdog Timer Rate select */ -#define CRG_COPCTL_CR_MASK (7 << CRG_COPCTL_CR_SHIFT) -#define CRG_COPCTL_RSBCK (1 << 6) /* Bit 6: COP and RTI stop in Active BDM mode B */ -#define CRG_COPCTL_WCOP (1 << 7) /* Bit 7: Window COP Mode Bit */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H */ +/************************************************************************************ + * arch/hc/src/m9s12/m9s12_crg.h + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H +#define __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* CRG Module Register Offsets */ + +#define HCS12_CRG_SYNR_OFFSET (HCS12_CRG_BASE+0x00) /* CRG Synthesizer Register */ +#define HCS12_CRG_REFDV_OFFSET (HCS12_CRG_BASE+0x01) /* CRG Reference Divider Register */ +#define HCS12_CRG_CTFLG_OFFSET (HCS12_CRG_BASE+0x02) /* CRG Test Flags Register */ +#define HCS12_CRG_CRGFLG_OFFSET (HCS12_CRG_BASE+0x03) /* CRG Flags Register */ +#define HCS12_CRG_CRGINT_OFFSET (HCS12_CRG_BASE+0x04) /* CRG Interrupt Enable Register */ +#define HCS12_CRG_CLKSEL_OFFSET (HCS12_CRG_BASE+0x05) /* CRG Clock Select Register */ +#define HCS12_CRG_PLLCTL_OFFSET (HCS12_CRG_BASE+0x06) /* CRG PLL Control Register */ +#define HCS12_CRG_RTICTL_OFFSET (HCS12_CRG_BASE+0x07) /* CRG RTI Control Register */ +#define HCS12_CRG_COPCTL_OFFSET (HCS12_CRG_BASE+0x08) /* CRG COP Control Register */ +#define HCS12_CRG_FORBYP_OFFSET (HCS12_CRG_BASE+0x09) /* CRG Force and Bypass Test Register */ +#define HCS12_CRG_CTCTL_OFFSET (HCS12_CRG_BASE+0x0a) /* CRG Test Control Register */ +#define HCS12_CRG_ARMCOP_OFFSET (HCS12_CRG_BASE+0x0b) /* CRG COP Arm/Timer Reset */ + +/* CRG Module Register Addresses */ + +#define HCS12_CRG_SYNR (HCS12_REG_BASE+HCS12_CRG_SYNR_OFFSET) +#define HCS12_CRG_REFDV (HCS12_REG_BASE+HCS12_CRG_REFDV_OFFSET) +#define HCS12_CRG_CTFLG (HCS12_REG_BASE+HCS12_CRG_CTFLG_OFFSET) +#define HCS12_CRG_CRGFLG (HCS12_REG_BASE+HCS12_CRG_CRGFLG_OFFSET) +#define HCS12_CRG_CRGINT (HCS12_REG_BASE+HCS12_CRG_CRGINT_OFFSET) +#define HCS12_CRG_CLKSEL (HCS12_REG_BASE+HCS12_CRG_CLKSEL_OFFSET) +#define HCS12_CRG_PLLCTL (HCS12_REG_BASE+HCS12_CRG_PLLCTL_OFFSET) +#define HCS12_CRG_RTICTL (HCS12_REG_BASE+HCS12_CRG_RTICTL_OFFSET) +#define HCS12_CRG_COPCTL (HCS12_REG_BASE+HCS12_CRG_COPCTL_OFFSET) +#define HCS12_CRG_FORBYP (HCS12_REG_BASE+HCS12_CRG_FORBYP_OFFSET) +#define HCS12_CRG_CTCTL (HCS12_REG_BASE+HCS12_CRG_CTCTL_OFFSET) +#define HCS12_CRG_ARMCOP (HCS12_REG_BASE+HCS12_CRG_ARMCOP_OFFSET) + +/* CRG Module Register Bit Definitions */ + +#define CRG_SYNR_SHIFT (0) /* Bits 0-5: CRG synthesizer value */ +#define CRG_SYNR_MASK (0x3f << CRG_SYNR_SHIFT) + +#define CRG_REFDV_SHIFT (0) /* Bit 0-3: Reference divider */ +#define CRG_REFDV_MASK (15 << CRG_REFDV_SHIFT) + +#define CRG_CRGFLG_SCM (1 << 0) /* Bit 0: Self-Clock Mode Status Bit */ +#define CRG_CRGFLG_SCMIF (1 << 1) /* Bit 1: Self-Clock Mode Interrupt Flag */ +#define CRG_CRGFLG_TRACK (1 << 2) /* Bit 2: Track Status Bit */ +#define CRG_CRGFLG_LOCK (1 << 3) /* Bit 3: Lock Status Bit */ +#define CRG_CRGFLG_LOCKIF (1 << 4) /* Bit 4: PLL Lock Interrupt Flag */ +#define CRG_CRGFLG_LVRF (1 << 5) /* Bit 5: Low Voltage Reset Flag */ +#define CRG_CRGFLG_PORF (1 << 6) /* Bit 6: Power-on Reset Flag */ +#define CRG_CRGFLG_RTIF (1 << 7) /* Bit 7: Real-Time Interrupt Flag */ + +#define CRG_CRGINT_SCMIE (1 << 1) /* Bit 1: Self-Clock Mode Status Bit */ +#define CRG_CRGINT_LOCKIE (1 << 4) /* Bit 4: Lock Interrupt Enable Bit */ +#define CRG_CRGINT_RTIE (1 << 7) /* Bit 7: Lock Interrupt Enable Bit */ + +#define CRG_CLKSEL_COPWAI (1 << 0) /* Bit 0: COP stops in Wait Mode Bit */ +#define CRG_CLKSEL_RTIWAI (1 << 1) /* Bit 1: RTI stops in Wait Mode Bit */ +#define CRG_CLKSEL_CWAI (1 << 2) /* Bit 2: Core stops in Wait Mode Bit */ +#define CRG_CLKSEL_PLLWAI (1 << 3) /* Bit 3: PLL stops in Wait Mode Bit */ +#define CRG_CLKSEL_ROAWAI (1 << 4) /* Bit 4: Reduced Oscillator Amplitude in Wait Mode Bit */ +#define CRG_CLKSEL_SYSWAI (1 << 5) /* Bit 5: System clocks stop in wait mode bit */ +#define CRG_CLKSEL_PSTP (1 << 6) /* Bit 6: Pseudo-Stop Bit */ +#define CRG_CLKSEL_PLLSEL (1 << 7) /* Bit 7: PLL Select Bit */ + +#define CRG_PLLCTL_SCME (1 << 0) /* Bit 0: Self-Clock Mode Enable Bit */ +#define CRG_PLLCTL_PCE (1 << 1) /* Bit 1: COP Enable during Pseudo-Stop Bit */ +#define CRG_PLLCTL_PRE (1 << 2) /* Bit 2: RTI Enable during Pseudo-Stop Bit */ +#define CRG_PLLCTL_ACQ (1 << 4) /* Bit 4: Acquisition Bit */ +#define CRG_PLLCTL_AUTO (1 << 5) /* Bit 5: Automatic Bandwidth Control Bit */ +#define CRG_PLLCTL_PLLON (1 << 6) /* Bit 6: Phase Lock Loop On Bit */ +#define CRG_PLLCTL_CME (1 << 7) /* Bit 7: Clock Monitor Enable Bit */ + +#define CRG_RTICTL_MODCNT_SHIFT (0) /* Bits 0-3: Real-Time Interrupt Modulus Counter Select Bits */ +#define CRG_RTICTL_MODCNT_MASK (15 << CRG_RTICTL_MODCNT_SHIFT) +#define CRG_RTICTL_PRER_SHIFT (4) /* Bits 4-6: Real-Time Interrupt Prescale Rate Select Bits */ +#define CRG_RTICTL_PRER_MASK (7 << CRG_RTICTL_PRE_SHIFT) + +#define CRG_COPCTL_CR_SHIFT (0) /* Bits 0-2: COP Watchdog Timer Rate select */ +#define CRG_COPCTL_CR_MASK (7 << CRG_COPCTL_CR_SHIFT) +#define CRG_COPCTL_RSBCK (1 << 6) /* Bit 6: COP and RTI stop in Active BDM mode B */ +#define CRG_COPCTL_WCOP (1 << 7) /* Bit 7: Window COP Mode Bit */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_HC_SRC_M9S12_M9S12_CRG_H */ diff --git a/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c b/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c index 13a84dacf0..c43d4439ef 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/m9s12_dumpgpio.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_emac.h b/nuttx/arch/hc/src/m9s12/m9s12_emac.h index b12f238b5d..0fd13f67d5 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_emac.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_emac.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_emac.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c index a2b890d22b..ed2977e889 100644 --- a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c @@ -2,7 +2,7 @@ * drivers/net/m9s12_ethernet.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_flash.h b/nuttx/arch/hc/src/m9s12/m9s12_flash.h index 8761c328f3..697eee57a3 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_flash.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_flash.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_flash.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_gpio.c b/nuttx/arch/hc/src/m9s12/m9s12_gpio.c index 0f866dc87e..280202da54 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_gpio.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_gpio.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/m9s12_gpio.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c b/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c index 6d31513d27..017292a26e 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/m9s12_gpioirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_iic.h b/nuttx/arch/hc/src/m9s12/m9s12_iic.h index 5d26391a07..f8d17014c3 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_iic.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_iic.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_iic.h (v2) * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c b/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c index c537546b1e..80bb5fe035 100644 --- a/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_initialstate.c @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_initialstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_int.h b/nuttx/arch/hc/src/m9s12/m9s12_int.h index 1794e0b73d..10e229aae6 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_int.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_int.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_int.h (v1) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_internal.h b/nuttx/arch/hc/src/m9s12/m9s12_internal.h index e4aa1e36dc..140aa0e5e8 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_internal.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_internal.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_internal.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_irq.c b/nuttx/arch/hc/src/m9s12/m9s12_irq.c index ab47589253..56e357a2e1 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_irq.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_irq.c @@ -3,7 +3,7 @@ * arch/arm/src/chip/m9s12_irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S b/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S index 0a6e761b7f..0905c09607 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S @@ -2,7 +2,7 @@ * arch/arm/src/m9s12/m9s12_lowputc.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_mebi.h b/nuttx/arch/hc/src/m9s12/m9s12_mebi.h index 7db814b651..f7426a3e51 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_mebi.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_mebi.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_mebi.h (v3) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_mmc.h b/nuttx/arch/hc/src/m9s12/m9s12_mmc.h index 2dadd5be86..5d68a425a0 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_mmc.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_mmc.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_mmcv4.h (v4) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_phy.h b/nuttx/arch/hc/src/m9s12/m9s12_phy.h index 635036b464..23a06957b7 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_phy.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_phy.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_phyv2.h (v2) * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_pim.h b/nuttx/arch/hc/src/m9s12/m9s12_pim.h index 68b702382f..a76d9f5819 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_pim.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_pim.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_pim.h * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_saveusercontext.S b/nuttx/arch/hc/src/m9s12/m9s12_saveusercontext.S index 749dd6383b..91fb0d9ef8 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_saveusercontext.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_saveusercontext.S @@ -2,7 +2,7 @@ * arch/arm/src/m9s12/m9s12_saveusercontext.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_sci.h b/nuttx/arch/hc/src/m9s12/m9s12_sci.h index c80c1fcfa7..28747e890d 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_sci.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_sci.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_sci.h (v3) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_serial.h b/nuttx/arch/hc/src/m9s12/m9s12_serial.h index 580862dce4..f38377982b 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_serial.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_serial.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/serial.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_spi.h b/nuttx/arch/hc/src/m9s12/m9s12_spi.h index fe3e3cddfb..931e0efcf5 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_spi.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_spi.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_spi.h (v3) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_start.S b/nuttx/arch/hc/src/m9s12/m9s12_start.S index dd5b9ce14e..66c1b80f9a 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_start.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_start.S @@ -3,7 +3,7 @@ * arch/hc/src/chip/m9s12_start.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_tim.h b/nuttx/arch/hc/src/m9s12/m9s12_tim.h index 820e069f14..e50c86dbf3 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_tim.h +++ b/nuttx/arch/hc/src/m9s12/m9s12_tim.h @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_tim.h (TIM16b4c v1) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c b/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c index 22e76d7ee6..dcefa1dc6d 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c @@ -2,7 +2,7 @@ * arch/hc/src/m9s12/m9s12_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/hc/src/m9s12/m9s12_vectors.S b/nuttx/arch/hc/src/m9s12/m9s12_vectors.S index 991d37dd81..dc57bf8b3b 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_vectors.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_vectors.S @@ -3,7 +3,7 @@ * arch/hc/src/chip/m9s12_vectors.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/arch.h b/nuttx/arch/mips/include/arch.h index 13945d2b5c..c19d55cb94 100644 --- a/nuttx/arch/mips/include/arch.h +++ b/nuttx/arch/mips/include/arch.h @@ -2,7 +2,7 @@ * arch/mips/include/arch.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/irq.h b/nuttx/arch/mips/include/irq.h index d1a7f8eaf0..c82661da11 100644 --- a/nuttx/arch/mips/include/irq.h +++ b/nuttx/arch/mips/include/irq.h @@ -2,7 +2,7 @@ * arch/mips/include/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/mips32/registers.h b/nuttx/arch/mips/include/mips32/registers.h index e541a8e531..70279cb6f3 100644 --- a/nuttx/arch/mips/include/mips32/registers.h +++ b/nuttx/arch/mips/include/mips32/registers.h @@ -2,7 +2,7 @@ * arch/mips/include/mips32/registers.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/mips32/syscall.h b/nuttx/arch/mips/include/mips32/syscall.h index b2aac6904c..9c497c8b6c 100644 --- a/nuttx/arch/mips/include/mips32/syscall.h +++ b/nuttx/arch/mips/include/mips32/syscall.h @@ -2,7 +2,7 @@ * arch/mips/include/mips32/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/syscall.h b/nuttx/arch/mips/include/syscall.h index 9fe94e1492..f87c51d4c3 100644 --- a/nuttx/arch/mips/include/syscall.h +++ b/nuttx/arch/mips/include/syscall.h @@ -2,7 +2,7 @@ * arch/mips/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/include/types.h b/nuttx/arch/mips/include/types.h index a83208c5a6..625f4de274 100644 --- a/nuttx/arch/mips/include/types.h +++ b/nuttx/arch/mips/include/types.h @@ -2,7 +2,7 @@ * arch/mips/include/types.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_allocateheap.c b/nuttx/arch/mips/src/common/up_allocateheap.c index 73933775d6..f29b2685f2 100644 --- a/nuttx/arch/mips/src/common/up_allocateheap.c +++ b/nuttx/arch/mips/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_allocateheap.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_arch.h b/nuttx/arch/mips/src/common/up_arch.h index 06e2eb7e4e..9496016bcc 100644 --- a/nuttx/arch/mips/src/common/up_arch.h +++ b/nuttx/arch/mips/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/mips/src/common/up_arch.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_createstack.c b/nuttx/arch/mips/src/common/up_createstack.c index 08c7231dd8..d5c285e25e 100644 --- a/nuttx/arch/mips/src/common/up_createstack.c +++ b/nuttx/arch/mips/src/common/up_createstack.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_createstack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_interruptcontext.c b/nuttx/arch/mips/src/common/up_interruptcontext.c index 48f6abd93d..526e86f87e 100644 --- a/nuttx/arch/mips/src/common/up_interruptcontext.c +++ b/nuttx/arch/mips/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_interruptcontext.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_lowputs.c b/nuttx/arch/mips/src/common/up_lowputs.c index 9734b584e7..314e239b1d 100644 --- a/nuttx/arch/mips/src/common/up_lowputs.c +++ b/nuttx/arch/mips/src/common/up_lowputs.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_lowputs.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_mdelay.c b/nuttx/arch/mips/src/common/up_mdelay.c index ff9b790e80..c55fb55bdc 100644 --- a/nuttx/arch/mips/src/common/up_mdelay.c +++ b/nuttx/arch/mips/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_mdelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_modifyreg16.c b/nuttx/arch/mips/src/common/up_modifyreg16.c index ca72dec3ed..2d65799470 100644 --- a/nuttx/arch/mips/src/common/up_modifyreg16.c +++ b/nuttx/arch/mips/src/common/up_modifyreg16.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_modifyreg16.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_modifyreg32.c b/nuttx/arch/mips/src/common/up_modifyreg32.c index 59bb3a1d82..e5de12e5e9 100644 --- a/nuttx/arch/mips/src/common/up_modifyreg32.c +++ b/nuttx/arch/mips/src/common/up_modifyreg32.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_modifyreg32.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_modifyreg8.c b/nuttx/arch/mips/src/common/up_modifyreg8.c index b590458b3b..53ed99f9c7 100644 --- a/nuttx/arch/mips/src/common/up_modifyreg8.c +++ b/nuttx/arch/mips/src/common/up_modifyreg8.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_modifyreg8.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_puts.c b/nuttx/arch/mips/src/common/up_puts.c index 9dd4bb5f4e..2394343f95 100644 --- a/nuttx/arch/mips/src/common/up_puts.c +++ b/nuttx/arch/mips/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_puts.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_releasestack.c b/nuttx/arch/mips/src/common/up_releasestack.c index 0724f1a76d..a54ea70cdb 100644 --- a/nuttx/arch/mips/src/common/up_releasestack.c +++ b/nuttx/arch/mips/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_releasestack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_udelay.c b/nuttx/arch/mips/src/common/up_udelay.c index b26f9d956e..261348726d 100644 --- a/nuttx/arch/mips/src/common/up_udelay.c +++ b/nuttx/arch/mips/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_udelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/common/up_usestack.c b/nuttx/arch/mips/src/common/up_usestack.c index fc27c1e76f..e41608f67d 100644 --- a/nuttx/arch/mips/src/common/up_usestack.c +++ b/nuttx/arch/mips/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/mips/src/common/up_usestack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/mips32-memorymap.h b/nuttx/arch/mips/src/mips32/mips32-memorymap.h index f4a0fed7d5..21093c3b7c 100644 --- a/nuttx/arch/mips/src/mips32/mips32-memorymap.h +++ b/nuttx/arch/mips/src/mips32/mips32-memorymap.h @@ -1,96 +1,96 @@ -/******************************************************************************************** - * arch/mips/src/mips32/mips32-memorymap.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ********************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H -#define __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H - -/******************************************************************************************** - * Included Files - ********************************************************************************************/ - -#include - -/******************************************************************************************** - * Pre-Processor Definitions - ********************************************************************************************/ - -/******************************************************************************************** - * Public Types - ********************************************************************************************/ - -/* MIPS32 address space organization */ - -#define USEG_BASE 0x00000000 -#define USEG_SIZE 0x80000000 - -#define KSEG0_BASE 0x80000000 -#define KSEG0_SIZE 0x20000000 - -#define KSEG1_BASE 0xa0000000 -#define KSEG1_SIZE 0x20000000 - -#define KSEG2_BASE 0xc0000000 -#define KSEG2_SIZE 0x20000000 - -#define KSEG3_BASE 0xe0000000 -#define KSEG3_SIZE 0x20000000 - -#define DSEG_BASE 0xff200000 -#define DSEG_SIZE 0x00200000 - -#ifndef __ASSEMBLY__ - -/******************************************************************************************** - * Inline Functions - ********************************************************************************************/ - -/******************************************************************************************** - * Public Function Prototypes - ********************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H */ +/******************************************************************************************** + * arch/mips/src/mips32/mips32-memorymap.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H +#define __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +/* MIPS32 address space organization */ + +#define USEG_BASE 0x00000000 +#define USEG_SIZE 0x80000000 + +#define KSEG0_BASE 0x80000000 +#define KSEG0_SIZE 0x20000000 + +#define KSEG1_BASE 0xa0000000 +#define KSEG1_SIZE 0x20000000 + +#define KSEG2_BASE 0xc0000000 +#define KSEG2_SIZE 0x20000000 + +#define KSEG3_BASE 0xe0000000 +#define KSEG3_SIZE 0x20000000 + +#define DSEG_BASE 0xff200000 +#define DSEG_SIZE 0x00200000 + +#ifndef __ASSEMBLY__ + +/******************************************************************************************** + * Inline Functions + ********************************************************************************************/ + +/******************************************************************************************** + * Public Function Prototypes + ********************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_MIPS32_MIPS32_MEMORYMAP_H */ diff --git a/nuttx/arch/mips/src/mips32/up_assert.c b/nuttx/arch/mips/src/mips32/up_assert.c index 977fe82874..881ec12cb7 100644 --- a/nuttx/arch/mips/src/mips32/up_assert.c +++ b/nuttx/arch/mips/src/mips32/up_assert.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_assert.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_copystate.c b/nuttx/arch/mips/src/mips32/up_copystate.c index 1bafffd0e3..798e82b045 100644 --- a/nuttx/arch/mips/src/mips32/up_copystate.c +++ b/nuttx/arch/mips/src/mips32/up_copystate.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_copystate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_doirq.c b/nuttx/arch/mips/src/mips32/up_doirq.c index d4a3d93a07..29cdf9c60a 100644 --- a/nuttx/arch/mips/src/mips32/up_doirq.c +++ b/nuttx/arch/mips/src/mips32/up_doirq.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_doirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_dumpstate.c b/nuttx/arch/mips/src/mips32/up_dumpstate.c index 369d98d7f5..866c17b4f2 100644 --- a/nuttx/arch/mips/src/mips32/up_dumpstate.c +++ b/nuttx/arch/mips/src/mips32/up_dumpstate.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_dumpstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_releasepending.c b/nuttx/arch/mips/src/mips32/up_releasepending.c index 978df0c7df..13918ca216 100644 --- a/nuttx/arch/mips/src/mips32/up_releasepending.c +++ b/nuttx/arch/mips/src/mips32/up_releasepending.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_releasepending.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_reprioritizertr.c b/nuttx/arch/mips/src/mips32/up_reprioritizertr.c index 24e33693cc..66ce687e01 100644 --- a/nuttx/arch/mips/src/mips32/up_reprioritizertr.c +++ b/nuttx/arch/mips/src/mips32/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_reprioritizertr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_unblocktask.c b/nuttx/arch/mips/src/mips32/up_unblocktask.c index ba29cb736d..5dafe90f0e 100644 --- a/nuttx/arch/mips/src/mips32/up_unblocktask.c +++ b/nuttx/arch/mips/src/mips32/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_unblocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-che.h b/nuttx/arch/mips/src/pic32mx/pic32mx-che.h index c4b0913a2a..f552486ba9 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-che.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-che.h @@ -1,185 +1,185 @@ -/******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-che.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ********************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H - -/******************************************************************************************** - * Included Files - ********************************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - -/******************************************************************************************** - * Pre-Processor Definitions - ********************************************************************************************/ -/* Register Offsets *************************************************************************/ - -#define PIC32MX_CHE_CON_OFFSET 0x0000 /* Pre-fetch cache control register */ -#define PIC32MX_CHE_CONCLR_OFFSET 0x0004 /* Pre-fetch cache control clear register */ -#define PIC32MX_CHE_CONSET_OFFSET 0x0008 /* Pre-fetch cache control set register */ -#define PIC32MX_CHE_CONINV_OFFSET 0x000c /* Pre-fetch cache control invert register */ -#define PIC32MX_CHE_ACC_OFFSET 0x0010 /* Pre-fetch cache access register */ -#define PIC32MX_CHE_ACCCLR_OFFSET 0x0014 /* Pre-fetch cache access clear register */ -#define PIC32MX_CHE_ACCSET_OFFSET 0x0018 /* Pre-fetch cache access set register */ -#define PIC32MX_CHE_ACCINV_OFFSET 0x001c /* Pre-fetch cache access invert register */ -#define PIC32MX_CHE_TAG_OFFSET 0x0020 /* Pre-fetch cache tag register */ -#define PIC32MX_CHE_TAGCLR_OFFSET 0x0024 /* Pre-fetch cache tag clear register */ -#define PIC32MX_CHE_TAGSET_OFFSET 0x0028 /* Pre-fetch cache tag set register */ -#define PIC32MX_CHE_TAGINV_OFFSET 0x002c /* Pre-fetch cache tag invert register */ -#define PIC32MX_CHE_MSK_OFFSET 0x0030 /* Pre-fetch cache tag mask register */ -#define PIC32MX_CHE_MSKCLR_OFFSET 0x0034 /* Pre-fetch cache tag mask clear register */ -#define PIC32MX_CHE_MSKSET_OFFSET 0x0038 /* Pre-fetch cache tag mask set register */ -#define PIC32MX_CHE_MSKINV_OFFSET 0x003c /* Pre-fetch cache tag mask invert register */ -#define PIC32MX_CHE_W0_OFFSET 0x0040 /* Cache word 0 register */ -#define PIC32MX_CHE_W1_OFFSET 0x0050 /* Cache word 1 register */ -#define PIC32MX_CHE_W2_OFFSET 0x0060 /* Cache word 2 register */ -#define PIC32MX_CHE_W3_OFFSET 0x0070 /* Cache word 3 register */ -#define PIC32MX_CHE_LRU_OFFSET 0x0080 /* Cache LRU register */ -#define PIC32MX_CHE_HIT_OFFSET 0x0090 /* Cache hit statistics register */ -#define PIC32MX_CHE_MIS_OFFSET 0x00a0 /* Cache miss statistics register */ -#define PIC32MX_CHE_PFABT_OFFSET 0x00c0 /* Pre-fetch cache abort statistics register */ - -/* Register Addresses ***********************************************************************/ - -#define PIC32MX_CHE_CON (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CON_OFFSET) -#define PIC32MX_CHE_CONCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONCLR_OFFSET) -#define PIC32MX_CHE_CONSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONSET_OFFSET) -#define PIC32MX_CHE_CONINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONINV_OFFSET) -#define PIC32MX_CHE_ACC (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACC_OFFSET) -#define PIC32MX_CHE_ACCCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCCLR_OFFSET) -#define PIC32MX_CHE_ACCSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCSET_OFFSET) -#define PIC32MX_CHE_ACCINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCINV_OFFSET) -#define PIC32MX_CHE_TAG (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAG_OFFSET) -#define PIC32MX_CHE_TAGCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGCLR_OFFSET) -#define PIC32MX_CHE_TAGSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGSET_OFFSET) -#define PIC32MX_CHE_TAGINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGINV_OFFSET) -#define PIC32MX_CHE_MSK (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSK_OFFSET) -#define PIC32MX_CHE_MSKCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKCLR_OFFSET) -#define PIC32MX_CHE_MSKSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKSET_OFFSET) -#define PIC32MX_CHE_MSKINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKINV_OFFSET) -#define PIC32MX_CHE_W0 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W0_OFFSET) -#define PIC32MX_CHE_W1 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W1_OFFSET) -#define PIC32MX_CHE_W2 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W2_OFFSET) -#define PIC32MX_CHE_W3 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W3_OFFSET) -#define PIC32MX_CHE_LRU (PIC32MX_CHE_K1BASE+PIC32MX_CHE_LRU_OFFSET) -#define PIC32MX_CHE_HIT (PIC32MX_CHE_K1BASE+PIC32MX_CHE_HIT_OFFSET) -#define PIC32MX_CHE_MIS (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MIS_OFFSET) -#define PIC32MX_CHE_PFABT (PIC32MX_CHE_K1BASE+PIC32MX_CHE_PFABT_OFFSET) - -/* Register Bit-Field Definitions ***********************************************************/ - -/* Pre-fetch cache control register */ - - -#define CHE_CON_PFMWS_SHIFT (0) /* Bits 0-2: PFM access time (SYSCLK wait states) */ -#define CHE_CON_PFMWS_MASK (7 << CHE_CON_PFMWS_SHIFT) -# define CHE_CON_PFMWS(n) ((n) << CHE_CON_PFMWS_SHIFT) /* n wait states, n=0-7 */ -#define CHE_CON_PREFEN_SHIFT (4) /* Bits 4-5: Predictive pre-fetch cache enable */ -#define CHE_CON_PREFEN_MASK (3 << CHE_CON_PREFEN_SHIFT) -# define CHE_CON_PREFEN_DISABLE (0 << CHE_CON_PREFEN_SHIFT) /* Disable predictive pre-fetch cache */ -# define CHE_CON_PREFEN_CACHE (1 << CHE_CON_PREFEN_SHIFT) /* Enable for cacheable regions only */ -# define CHE_CON_PREFEN_NONCACHE (2 << CHE_CON_PREFEN_SHIFT) /* Enable for non-cacheable regions only */ -# define CHE_CON_PREFEN_ALL (3 << CHE_CON_PREFEN_SHIFT) /* Enable for both regions */ -#define CHE_CON_DCSZ_SHIFT (8) /* Bits 8-9: Data cache size (lines) */ -#define CHE_CON_DCSZ_MASK (3 << CHE_CON_DCSZ_SHIFT) -# define CHE_CON_DCSZ_DISABLE (0 << CHE_CON_DCSZ_SHIFT) /* Disable data caching */ -# define CHE_CON_DCSZ_1LINE (1 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 1 line */ -# define CHE_CON_DCSZ_2LINES (2 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 2 lines */ -# define CHE_CON_DCSZ_4LINES (3 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 4 lines */ -#define CHE_CON_CHECOH (1 << 16) /* Bit 16: Cache coherency setting */ - -/* Pre-fetch cache access register */ - -#define CHE_ACC_CHEIDX_SHIFT (0) /* Bits 0-3: Cache line index */ -#define CHE_ACC_CHEIDX_MASK (15 << CHE_ACC_CHEIDX_SHIFT) -#define CHE_ACC_CHEWEN (1 << 31) /* Bit 31: Cache access enable */ - -/* Pre-fetch cache tag register */ - -#define CHE_TAG_LTYPE (1 << 1) /* Bit 1: Line type */ -#define CHE_TAG_LLOCK (1 << 2) /* Bit 2: Line lock */ -#define CHE_TAG_LVALID (1 << 3) /* Bit 3: Line valid */ -#define CHE_TAG_LTAG_SHIFT (4) /* Bits 4-23: Line tag address */ -#define CHE_TAG_LTAG_MASK (0x000fffff << CHE_TAG_LTAG_SHIFT) -#define CHE_TAG_LTAGBOOT (1 << 31) /* Bit 31: Line tag address boot */ - -/* Pre-fetch cache tag mask register */ - -#define CHE_MSK_SHIFT (5) /* Bits 5-15: Line mask */ -#define CHE_MSK_MASK (0x7ff << CHE_MSK_SHIFT) - -/* Cache word 0-3 register -- 32-bit cache line data */ - -/* Cache LRU register */ - -#define CHE_LRU_MASK 0x01ffffff /* Bits 0-24 */ - -/* Cache hit statistics register -- 32 bit counter value */ - -/* Cache miss statistics register -- 32 bit counter value */ - -/* Pre-fetch cache abort statistics register -- 32 bit counter value */ - -/******************************************************************************************** - * Public Types - ********************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/******************************************************************************************** - * Inline Functions - ********************************************************************************************/ - -/******************************************************************************************** - * Public Function Prototypes - ********************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H */ +/******************************************************************************************** + * arch/mips/src/pic32mx/pic32mx-che.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ +/* Register Offsets *************************************************************************/ + +#define PIC32MX_CHE_CON_OFFSET 0x0000 /* Pre-fetch cache control register */ +#define PIC32MX_CHE_CONCLR_OFFSET 0x0004 /* Pre-fetch cache control clear register */ +#define PIC32MX_CHE_CONSET_OFFSET 0x0008 /* Pre-fetch cache control set register */ +#define PIC32MX_CHE_CONINV_OFFSET 0x000c /* Pre-fetch cache control invert register */ +#define PIC32MX_CHE_ACC_OFFSET 0x0010 /* Pre-fetch cache access register */ +#define PIC32MX_CHE_ACCCLR_OFFSET 0x0014 /* Pre-fetch cache access clear register */ +#define PIC32MX_CHE_ACCSET_OFFSET 0x0018 /* Pre-fetch cache access set register */ +#define PIC32MX_CHE_ACCINV_OFFSET 0x001c /* Pre-fetch cache access invert register */ +#define PIC32MX_CHE_TAG_OFFSET 0x0020 /* Pre-fetch cache tag register */ +#define PIC32MX_CHE_TAGCLR_OFFSET 0x0024 /* Pre-fetch cache tag clear register */ +#define PIC32MX_CHE_TAGSET_OFFSET 0x0028 /* Pre-fetch cache tag set register */ +#define PIC32MX_CHE_TAGINV_OFFSET 0x002c /* Pre-fetch cache tag invert register */ +#define PIC32MX_CHE_MSK_OFFSET 0x0030 /* Pre-fetch cache tag mask register */ +#define PIC32MX_CHE_MSKCLR_OFFSET 0x0034 /* Pre-fetch cache tag mask clear register */ +#define PIC32MX_CHE_MSKSET_OFFSET 0x0038 /* Pre-fetch cache tag mask set register */ +#define PIC32MX_CHE_MSKINV_OFFSET 0x003c /* Pre-fetch cache tag mask invert register */ +#define PIC32MX_CHE_W0_OFFSET 0x0040 /* Cache word 0 register */ +#define PIC32MX_CHE_W1_OFFSET 0x0050 /* Cache word 1 register */ +#define PIC32MX_CHE_W2_OFFSET 0x0060 /* Cache word 2 register */ +#define PIC32MX_CHE_W3_OFFSET 0x0070 /* Cache word 3 register */ +#define PIC32MX_CHE_LRU_OFFSET 0x0080 /* Cache LRU register */ +#define PIC32MX_CHE_HIT_OFFSET 0x0090 /* Cache hit statistics register */ +#define PIC32MX_CHE_MIS_OFFSET 0x00a0 /* Cache miss statistics register */ +#define PIC32MX_CHE_PFABT_OFFSET 0x00c0 /* Pre-fetch cache abort statistics register */ + +/* Register Addresses ***********************************************************************/ + +#define PIC32MX_CHE_CON (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CON_OFFSET) +#define PIC32MX_CHE_CONCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONCLR_OFFSET) +#define PIC32MX_CHE_CONSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONSET_OFFSET) +#define PIC32MX_CHE_CONINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_CONINV_OFFSET) +#define PIC32MX_CHE_ACC (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACC_OFFSET) +#define PIC32MX_CHE_ACCCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCCLR_OFFSET) +#define PIC32MX_CHE_ACCSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCSET_OFFSET) +#define PIC32MX_CHE_ACCINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_ACCINV_OFFSET) +#define PIC32MX_CHE_TAG (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAG_OFFSET) +#define PIC32MX_CHE_TAGCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGCLR_OFFSET) +#define PIC32MX_CHE_TAGSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGSET_OFFSET) +#define PIC32MX_CHE_TAGINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_TAGINV_OFFSET) +#define PIC32MX_CHE_MSK (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSK_OFFSET) +#define PIC32MX_CHE_MSKCLR (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKCLR_OFFSET) +#define PIC32MX_CHE_MSKSET (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKSET_OFFSET) +#define PIC32MX_CHE_MSKINV (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MSKINV_OFFSET) +#define PIC32MX_CHE_W0 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W0_OFFSET) +#define PIC32MX_CHE_W1 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W1_OFFSET) +#define PIC32MX_CHE_W2 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W2_OFFSET) +#define PIC32MX_CHE_W3 (PIC32MX_CHE_K1BASE+PIC32MX_CHE_W3_OFFSET) +#define PIC32MX_CHE_LRU (PIC32MX_CHE_K1BASE+PIC32MX_CHE_LRU_OFFSET) +#define PIC32MX_CHE_HIT (PIC32MX_CHE_K1BASE+PIC32MX_CHE_HIT_OFFSET) +#define PIC32MX_CHE_MIS (PIC32MX_CHE_K1BASE+PIC32MX_CHE_MIS_OFFSET) +#define PIC32MX_CHE_PFABT (PIC32MX_CHE_K1BASE+PIC32MX_CHE_PFABT_OFFSET) + +/* Register Bit-Field Definitions ***********************************************************/ + +/* Pre-fetch cache control register */ + + +#define CHE_CON_PFMWS_SHIFT (0) /* Bits 0-2: PFM access time (SYSCLK wait states) */ +#define CHE_CON_PFMWS_MASK (7 << CHE_CON_PFMWS_SHIFT) +# define CHE_CON_PFMWS(n) ((n) << CHE_CON_PFMWS_SHIFT) /* n wait states, n=0-7 */ +#define CHE_CON_PREFEN_SHIFT (4) /* Bits 4-5: Predictive pre-fetch cache enable */ +#define CHE_CON_PREFEN_MASK (3 << CHE_CON_PREFEN_SHIFT) +# define CHE_CON_PREFEN_DISABLE (0 << CHE_CON_PREFEN_SHIFT) /* Disable predictive pre-fetch cache */ +# define CHE_CON_PREFEN_CACHE (1 << CHE_CON_PREFEN_SHIFT) /* Enable for cacheable regions only */ +# define CHE_CON_PREFEN_NONCACHE (2 << CHE_CON_PREFEN_SHIFT) /* Enable for non-cacheable regions only */ +# define CHE_CON_PREFEN_ALL (3 << CHE_CON_PREFEN_SHIFT) /* Enable for both regions */ +#define CHE_CON_DCSZ_SHIFT (8) /* Bits 8-9: Data cache size (lines) */ +#define CHE_CON_DCSZ_MASK (3 << CHE_CON_DCSZ_SHIFT) +# define CHE_CON_DCSZ_DISABLE (0 << CHE_CON_DCSZ_SHIFT) /* Disable data caching */ +# define CHE_CON_DCSZ_1LINE (1 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 1 line */ +# define CHE_CON_DCSZ_2LINES (2 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 2 lines */ +# define CHE_CON_DCSZ_4LINES (3 << CHE_CON_DCSZ_SHIFT) /* Enable with size of 4 lines */ +#define CHE_CON_CHECOH (1 << 16) /* Bit 16: Cache coherency setting */ + +/* Pre-fetch cache access register */ + +#define CHE_ACC_CHEIDX_SHIFT (0) /* Bits 0-3: Cache line index */ +#define CHE_ACC_CHEIDX_MASK (15 << CHE_ACC_CHEIDX_SHIFT) +#define CHE_ACC_CHEWEN (1 << 31) /* Bit 31: Cache access enable */ + +/* Pre-fetch cache tag register */ + +#define CHE_TAG_LTYPE (1 << 1) /* Bit 1: Line type */ +#define CHE_TAG_LLOCK (1 << 2) /* Bit 2: Line lock */ +#define CHE_TAG_LVALID (1 << 3) /* Bit 3: Line valid */ +#define CHE_TAG_LTAG_SHIFT (4) /* Bits 4-23: Line tag address */ +#define CHE_TAG_LTAG_MASK (0x000fffff << CHE_TAG_LTAG_SHIFT) +#define CHE_TAG_LTAGBOOT (1 << 31) /* Bit 31: Line tag address boot */ + +/* Pre-fetch cache tag mask register */ + +#define CHE_MSK_SHIFT (5) /* Bits 5-15: Line mask */ +#define CHE_MSK_MASK (0x7ff << CHE_MSK_SHIFT) + +/* Cache word 0-3 register -- 32-bit cache line data */ + +/* Cache LRU register */ + +#define CHE_LRU_MASK 0x01ffffff /* Bits 0-24 */ + +/* Cache hit statistics register -- 32 bit counter value */ + +/* Cache miss statistics register -- 32 bit counter value */ + +/* Pre-fetch cache abort statistics register -- 32 bit counter value */ + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/******************************************************************************************** + * Inline Functions + ********************************************************************************************/ + +/******************************************************************************************** + * Public Function Prototypes + ********************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CHE_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-cm.h b/nuttx/arch/mips/src/pic32mx/pic32mx-cm.h index 9268089c09..de2c0216c0 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-cm.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-cm.h @@ -1,140 +1,140 @@ -/************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-cm.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" -#include "pic32mx-memorymap.h" - -#if CHIP_NCM > 0 - -/************************************************************************************ - * Pre-Processor Definitions - ************************************************************************************/ -/* Register Offsets *****************************************************************/ - -#define PIC32MX_CM_CON_OFFSET 0x0000 /* Comparator control register */ -#define PIC32MX_CM_CONCLR_OFFSET 0x0004 /* Comparator control clear register */ -#define PIC32MX_CM_CONSET_OFFSET 0x0008 /* Comparator control set register */ -#define PIC32MX_CM_CONINV_OFFSET 0x000c /* Comparator control invert register */ -#define PIC32MX_CM_STAT_OFFSET 0x0060 /* Comparator status register */ -#define PIC32MX_CM_STATCLR_OFFSET 0x0064 /* Comparator status clear register */ -#define PIC32MX_CM_STATSET_OFFSET 0x0068 /* Comparator status set register */ -#define PIC32MX_CM_STATINV_OFFSET 0x006c /* Comparator status invert register */ - -/* Register Addresses ***************************************************************/ - -#define PIC32MX_CM1_CON (PIC32MX_CM1_K1BASE+PIC32MX_CM_CON_OFFSET) -#define PIC32MX_CM1_CONCLR (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONCLR_OFFSET) -#define PIC32MX_CM1_CONSET (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONSET_OFFSET) -#define PIC32MX_CM1_CONINV (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONINV_OFFSET) - -#if CHIP_NCM > 0 -# define PIC32MX_CM2_CON (PIC32MX_CM2_K1BASE+PIC32MX_CM_CON_OFFSET) -# define PIC32MX_CM2_CONCLR (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONCLR_OFFSET) -# define PIC32MX_CM2_CONSET (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONSET_OFFSET) -# define PIC32MX_CM2_CONINV (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONINV_OFFSET) -#endif - -#define PIC32MX_CM_STAT (PIC32MX_CM_K1BASE+PIC32MX_CM_STAT_OFFSET) -#define PIC32MX_CM_STATCLR (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATCLR_OFFSET) -#define PIC32MX_CM_STATSET (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATSET_OFFSET) -#define PIC32MX_CM_STATINV (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATINV_OFFSET) - -/* Register Bit-Field Definitions ***************************************************/ - -/* Comparator control register */ - -#define CM_CON_CCH_SHIFT (0) /* Bits 0-1: Comparator negative input select */ -#define CM_CON_CCH_MASK (3 << CM_CON_CCH_SHIFT) -# define CM_CON_CCH_CXINM (0 << CM_CON_CCH_SHIFT) /* Inverting input connected to CxIN- */ -# define CM_CON_CCH_CXINP (1 << CM_CON_CCH_SHIFT) /* Inverting input connected to CxIN+ */ -# define CM_CON_CCH_CYINP (2 << CM_CON_CCH_SHIFT) /* Inverting input connected to CyIN+ */ -# define CM_CON_CCH_IVREF (3 << CM_CON_CCH_SHIFT) /* Inverting input connected to IVREF */ -#define CM_CON_CREF (1 << 4) /* Bit 4: Comparator positive input configure */ -#define CM_CON_EVPOL_SHIFT (6) /* Bits 6-7: Interrupt event polarity select */ -#define CM_CON_EVPOL_MASK (3 << CM_CON_EVPOL_SHIFT) -# define CM_CON_EVPOL_DISABLED (0 << CM_CON_EVPOL_SHIFT) /* Interrupt disabled */ -# define CM_CON_EVPOL_RISING (1 << CM_CON_EVPOL_SHIFT) /* Interrupt on low-to-high transition */ -# define CM_CON_EVPOL_FALLING (2 << CM_CON_EVPOL_SHIFT) /* Interrupt on high-to-low transition */ -# define CM_CON_EVPOL_BOTH (3 << CM_CON_EVPOL_SHIFT) /* Interrupt on a both transitions */ -#define CM_CON_COUT (1 << 8) /* Bit 8: Comparator output */ -#define CM_CON_CPOL (1 << 13) /* Bit 13: Comparator output inversion */ -#define CM_CON_COE (1 << 14) /* Bit 14: Comparator output enable */ -#define CM_CON_ON (1 << 15) /* Bit 15: Comparator ON */ - -/* Comparator status register */ - -#define CM_STAT_C1OUT (1 << 0) /* Bit 0: Comparator 1 output */ -#define CM_STAT_C2OUT (1 << 1) /* Bit 1: Comparator 2 output */ -#define CM_STAT_SIDL (1 << 13) /* Bit 13: Stop in idle control */ -#define CM_STAT_FRZ (1 << 14) /* Bit 14: Freeze control */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Function Prototypes - ************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* CHIP_NCM > 0 */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H */ +/************************************************************************************ + * arch/mips/src/pic32mx/pic32mx-cm.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "pic32mx-memorymap.h" + +#if CHIP_NCM > 0 + +/************************************************************************************ + * Pre-Processor Definitions + ************************************************************************************/ +/* Register Offsets *****************************************************************/ + +#define PIC32MX_CM_CON_OFFSET 0x0000 /* Comparator control register */ +#define PIC32MX_CM_CONCLR_OFFSET 0x0004 /* Comparator control clear register */ +#define PIC32MX_CM_CONSET_OFFSET 0x0008 /* Comparator control set register */ +#define PIC32MX_CM_CONINV_OFFSET 0x000c /* Comparator control invert register */ +#define PIC32MX_CM_STAT_OFFSET 0x0060 /* Comparator status register */ +#define PIC32MX_CM_STATCLR_OFFSET 0x0064 /* Comparator status clear register */ +#define PIC32MX_CM_STATSET_OFFSET 0x0068 /* Comparator status set register */ +#define PIC32MX_CM_STATINV_OFFSET 0x006c /* Comparator status invert register */ + +/* Register Addresses ***************************************************************/ + +#define PIC32MX_CM1_CON (PIC32MX_CM1_K1BASE+PIC32MX_CM_CON_OFFSET) +#define PIC32MX_CM1_CONCLR (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONCLR_OFFSET) +#define PIC32MX_CM1_CONSET (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONSET_OFFSET) +#define PIC32MX_CM1_CONINV (PIC32MX_CM1_K1BASE+PIC32MX_CM_CONINV_OFFSET) + +#if CHIP_NCM > 0 +# define PIC32MX_CM2_CON (PIC32MX_CM2_K1BASE+PIC32MX_CM_CON_OFFSET) +# define PIC32MX_CM2_CONCLR (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONCLR_OFFSET) +# define PIC32MX_CM2_CONSET (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONSET_OFFSET) +# define PIC32MX_CM2_CONINV (PIC32MX_CM2_K1BASE+PIC32MX_CM_CONINV_OFFSET) +#endif + +#define PIC32MX_CM_STAT (PIC32MX_CM_K1BASE+PIC32MX_CM_STAT_OFFSET) +#define PIC32MX_CM_STATCLR (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATCLR_OFFSET) +#define PIC32MX_CM_STATSET (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATSET_OFFSET) +#define PIC32MX_CM_STATINV (PIC32MX_CM1_K1BASE+PIC32MX_CM_STATINV_OFFSET) + +/* Register Bit-Field Definitions ***************************************************/ + +/* Comparator control register */ + +#define CM_CON_CCH_SHIFT (0) /* Bits 0-1: Comparator negative input select */ +#define CM_CON_CCH_MASK (3 << CM_CON_CCH_SHIFT) +# define CM_CON_CCH_CXINM (0 << CM_CON_CCH_SHIFT) /* Inverting input connected to CxIN- */ +# define CM_CON_CCH_CXINP (1 << CM_CON_CCH_SHIFT) /* Inverting input connected to CxIN+ */ +# define CM_CON_CCH_CYINP (2 << CM_CON_CCH_SHIFT) /* Inverting input connected to CyIN+ */ +# define CM_CON_CCH_IVREF (3 << CM_CON_CCH_SHIFT) /* Inverting input connected to IVREF */ +#define CM_CON_CREF (1 << 4) /* Bit 4: Comparator positive input configure */ +#define CM_CON_EVPOL_SHIFT (6) /* Bits 6-7: Interrupt event polarity select */ +#define CM_CON_EVPOL_MASK (3 << CM_CON_EVPOL_SHIFT) +# define CM_CON_EVPOL_DISABLED (0 << CM_CON_EVPOL_SHIFT) /* Interrupt disabled */ +# define CM_CON_EVPOL_RISING (1 << CM_CON_EVPOL_SHIFT) /* Interrupt on low-to-high transition */ +# define CM_CON_EVPOL_FALLING (2 << CM_CON_EVPOL_SHIFT) /* Interrupt on high-to-low transition */ +# define CM_CON_EVPOL_BOTH (3 << CM_CON_EVPOL_SHIFT) /* Interrupt on a both transitions */ +#define CM_CON_COUT (1 << 8) /* Bit 8: Comparator output */ +#define CM_CON_CPOL (1 << 13) /* Bit 13: Comparator output inversion */ +#define CM_CON_COE (1 << 14) /* Bit 14: Comparator output enable */ +#define CM_CON_ON (1 << 15) /* Bit 15: Comparator ON */ + +/* Comparator status register */ + +#define CM_STAT_C1OUT (1 << 0) /* Bit 0: Comparator 1 output */ +#define CM_STAT_C2OUT (1 << 1) /* Bit 1: Comparator 2 output */ +#define CM_STAT_SIDL (1 << 13) /* Bit 13: Stop in idle control */ +#define CM_STAT_FRZ (1 << 14) /* Bit 14: Freeze control */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* CHIP_NCM > 0 */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CM_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ddp.h b/nuttx/arch/mips/src/pic32mx/pic32mx-ddp.h index 8c8b8d7876..c23cbb9c30 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-ddp.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ddp.h @@ -1,94 +1,94 @@ -/************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-ddp.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - -/************************************************************************************ - * Pre-Processor Definitions - ************************************************************************************/ -/* Register Offsets *****************************************************************/ - -#define PIC32MX_DDP_CON_OFFSET 0x0000 /* Control Register for the Diagnostic Module */ - -/* Register Addresses ***************************************************************/ - -#define PIC32MX_DDP_CON (PIC32MX_DDP_K1BASE+PIC32MX_DDP_CON_OFFSET) - -/* See also the ICESEL, DEBUG, and DEBUG0 in the DEVCFG0 register */ - -/* Register Bit-Field Definitions ***************************************************/ - -/* Control Register for the Diagnostic Module */ - -#define DDP_CON_TROEN (1 << 2) /* Bit 2: Trace output enable */ -#define DDP_CON_JTAGEN (1 << 3) /* Bit 3: JTAG port enable */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Function Prototypes - ************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H */ +/************************************************************************************ + * arch/mips/src/pic32mx/pic32mx-ddp.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + +/************************************************************************************ + * Pre-Processor Definitions + ************************************************************************************/ +/* Register Offsets *****************************************************************/ + +#define PIC32MX_DDP_CON_OFFSET 0x0000 /* Control Register for the Diagnostic Module */ + +/* Register Addresses ***************************************************************/ + +#define PIC32MX_DDP_CON (PIC32MX_DDP_K1BASE+PIC32MX_DDP_CON_OFFSET) + +/* See also the ICESEL, DEBUG, and DEBUG0 in the DEVCFG0 register */ + +/* Register Bit-Field Definitions ***************************************************/ + +/* Control Register for the Diagnostic Module */ + +#define DDP_CON_TROEN (1 << 2) /* Bit 2: Trace output enable */ +#define DDP_CON_JTAGEN (1 << 3) /* Bit 3: JTAG port enable */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_DDP_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-flash.h b/nuttx/arch/mips/src/pic32mx/pic32mx-flash.h index 8ef9f31867..604f66c462 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-flash.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-flash.h @@ -1,130 +1,130 @@ - /******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-flash.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ********************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H - - /******************************************************************************************** - * Included Files - ********************************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - - /******************************************************************************************** - * Pre-Processor Definitions - ********************************************************************************************/ -/* Register Offsets *************************************************************************/ - -#define PIC32MX_FLASH_NVMCON_OFFSET 0x0000 /* Programming Control Register */ -#define PIC32MX_FLASH_NVMCONCLR_OFFSET 0x0004 /* Programming Control Clear Register */ -#define PIC32MX_FLASH_NVMCONSET_OFFSET 0x0008 /* Programming Control Set Register */ -#define PIC32MX_FLASH_NVMCONINV_OFFSET 0x000c /* Programming Control Invert Register */ -#define PIC32MX_FLASH_NVMKEY_OFFSET 0x0010 /* Programming Unlock Register */ -#define PIC32MX_FLASH_NVMADDR_OFFSET 0x0020 /* Flash Address Register */ -#define PIC32MX_FLASH_NVMADDRCLR_OFFSET 0x0024 /* Flash Address Clear Register */ -#define PIC32MX_FLASH_NVMADDRSET_OFFSET 0x0028 /* Flash Address Set Register */ -#define PIC32MX_FLASH_NVMADDRINV_OFFSET 0x002c /* Flash Address Invert Register */ -#define PIC32MX_FLASH_NVMDATA_OFFSET 0x0030 /* Flash Program Data Register */ -#define PIC32MX_FLASH_NVMSRCADDR_OFFSET 0x0040 /* Source Data Address Register */ - -/* Register Addresses ***********************************************************************/ - -#define PIC32MX_FLASH_NVMCON (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCON_OFFSET) -#define PIC32MX_FLASH_NVMCONCLR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONCLR_OFFSET) -#define PIC32MX_FLASH_NVMCONSET (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONSET_OFFSET) -#define PIC32MX_FLASH_NVMCONINV (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONINV_OFFSET) -#define PIC32MX_FLASH_NVMKEY (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMKEY_OFFSET) -#define PIC32MX_FLASH_NVMADDRCLR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRCLR_OFFSET) -#define PIC32MX_FLASH_NVMADDRSET (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRSET_OFFSET) -#define PIC32MX_FLASH_NVMADDRINV (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRINV_OFFSET) -#define PIC32MX_FLASH_NVMADDR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDR_OFFSET) -#define PIC32MX_FLASH_NVMDATA (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMDATA_OFFSET) -#define PIC32MX_FLASH_NVMSRCADDR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMSRCADDR_OFFSET) - -/* Register Bit-Field Definitions ***********************************************************/ - -/* Programming Control Register */ - -#define FLASH_NVMCON_NVMOP_SHIFT (0) /* Bits 0-3: NVM operation */ -#define FLASH_NVMCON_NVMOP_MASK (15 << FLASH_NVMCON_NVMOP_SHIFT) -# define FLASH_NVMCON_NVMOP_NOP (0 << FLASH_NVMCON_NVMOP_SHIFT) /* No operation */ -# define FLASH_NVMCON_NVMOP_WDPROG (1 << FLASH_NVMCON_NVMOP_SHIFT) /* Word program operation */ -# define FLASH_NVMCON_NVMOP_ROWPROG (3 << FLASH_NVMCON_NVMOP_SHIFT) /* Row program operation */ -# define FLASH_NVMCON_NVMOP_PFMERASE (4 << FLASH_NVMCON_NVMOP_SHIFT) /* Page erase operation */ -# define FLASH_NVMCON_NVMOP_PFMERASE (5 << FLASH_NVMCON_NVMOP_SHIFT) /* PFM erase operationxx */ -#define FLASH_NVMCON_LVDSTAT (1 << 11) /* Bit nn: Low-voltage detect status */ -#define FLASH_NVMCON_LVDERR (1 << 12) /* Bit nn: Low-voltage detect error */ -#define FLASH_NVMCON_WRERR (1 << 13) /* Bit nn: Write error */ -#define FLASH_NVMCON_WREN (1 << 14) /* Bit nn: Write enable */ -#define FLASH_NVMCON_WR (1 << 15) /* Bit nn: Write control */ - -/* Programming Unlock Register -- 32 Bits of data */ - -/* Flash Address Register -- 32 Bits of data */ - -/* Flash Program Data Register -- 32 Bits of data */ - -/* Source Data Address Register -- 32 Bits of data */ - - /******************************************************************************************** - * Public Types - ********************************************************************************************/ - -#ifndef __ASSEMBLY__ - - /******************************************************************************************** - * Inline Functions - ********************************************************************************************/ - - /******************************************************************************************** - * Public Function Prototypes - ********************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H */ + /******************************************************************************************** + * arch/mips/src/pic32mx/pic32mx-flash.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H + + /******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + + /******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ +/* Register Offsets *************************************************************************/ + +#define PIC32MX_FLASH_NVMCON_OFFSET 0x0000 /* Programming Control Register */ +#define PIC32MX_FLASH_NVMCONCLR_OFFSET 0x0004 /* Programming Control Clear Register */ +#define PIC32MX_FLASH_NVMCONSET_OFFSET 0x0008 /* Programming Control Set Register */ +#define PIC32MX_FLASH_NVMCONINV_OFFSET 0x000c /* Programming Control Invert Register */ +#define PIC32MX_FLASH_NVMKEY_OFFSET 0x0010 /* Programming Unlock Register */ +#define PIC32MX_FLASH_NVMADDR_OFFSET 0x0020 /* Flash Address Register */ +#define PIC32MX_FLASH_NVMADDRCLR_OFFSET 0x0024 /* Flash Address Clear Register */ +#define PIC32MX_FLASH_NVMADDRSET_OFFSET 0x0028 /* Flash Address Set Register */ +#define PIC32MX_FLASH_NVMADDRINV_OFFSET 0x002c /* Flash Address Invert Register */ +#define PIC32MX_FLASH_NVMDATA_OFFSET 0x0030 /* Flash Program Data Register */ +#define PIC32MX_FLASH_NVMSRCADDR_OFFSET 0x0040 /* Source Data Address Register */ + +/* Register Addresses ***********************************************************************/ + +#define PIC32MX_FLASH_NVMCON (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCON_OFFSET) +#define PIC32MX_FLASH_NVMCONCLR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONCLR_OFFSET) +#define PIC32MX_FLASH_NVMCONSET (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONSET_OFFSET) +#define PIC32MX_FLASH_NVMCONINV (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMCONINV_OFFSET) +#define PIC32MX_FLASH_NVMKEY (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMKEY_OFFSET) +#define PIC32MX_FLASH_NVMADDRCLR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRCLR_OFFSET) +#define PIC32MX_FLASH_NVMADDRSET (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRSET_OFFSET) +#define PIC32MX_FLASH_NVMADDRINV (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDRINV_OFFSET) +#define PIC32MX_FLASH_NVMADDR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMADDR_OFFSET) +#define PIC32MX_FLASH_NVMDATA (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMDATA_OFFSET) +#define PIC32MX_FLASH_NVMSRCADDR (PIC32MX_FLASH_K1BASE+PIC32MX_FLASH_NVMSRCADDR_OFFSET) + +/* Register Bit-Field Definitions ***********************************************************/ + +/* Programming Control Register */ + +#define FLASH_NVMCON_NVMOP_SHIFT (0) /* Bits 0-3: NVM operation */ +#define FLASH_NVMCON_NVMOP_MASK (15 << FLASH_NVMCON_NVMOP_SHIFT) +# define FLASH_NVMCON_NVMOP_NOP (0 << FLASH_NVMCON_NVMOP_SHIFT) /* No operation */ +# define FLASH_NVMCON_NVMOP_WDPROG (1 << FLASH_NVMCON_NVMOP_SHIFT) /* Word program operation */ +# define FLASH_NVMCON_NVMOP_ROWPROG (3 << FLASH_NVMCON_NVMOP_SHIFT) /* Row program operation */ +# define FLASH_NVMCON_NVMOP_PFMERASE (4 << FLASH_NVMCON_NVMOP_SHIFT) /* Page erase operation */ +# define FLASH_NVMCON_NVMOP_PFMERASE (5 << FLASH_NVMCON_NVMOP_SHIFT) /* PFM erase operationxx */ +#define FLASH_NVMCON_LVDSTAT (1 << 11) /* Bit nn: Low-voltage detect status */ +#define FLASH_NVMCON_LVDERR (1 << 12) /* Bit nn: Low-voltage detect error */ +#define FLASH_NVMCON_WRERR (1 << 13) /* Bit nn: Write error */ +#define FLASH_NVMCON_WREN (1 << 14) /* Bit nn: Write enable */ +#define FLASH_NVMCON_WR (1 << 15) /* Bit nn: Write control */ + +/* Programming Unlock Register -- 32 Bits of data */ + +/* Flash Address Register -- 32 Bits of data */ + +/* Flash Program Data Register -- 32 Bits of data */ + +/* Source Data Address Register -- 32 Bits of data */ + + /******************************************************************************************** + * Public Types + ********************************************************************************************/ + +#ifndef __ASSEMBLY__ + + /******************************************************************************************** + * Inline Functions + ********************************************************************************************/ + + /******************************************************************************************** + * Public Function Prototypes + ********************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_FLASH_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-osc.h b/nuttx/arch/mips/src/pic32mx/pic32mx-osc.h index 9142b19a2d..69c00329d6 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-osc.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-osc.h @@ -1,165 +1,165 @@ -/**************************************************************************** - * arch/mips/src/pic32mx/pic32mx-osc.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ -/* Register Offsets *********************************************************/ - -#define PIC32MX_OSCCON_OFFSET 0x0000 /* Oscillator control register offset */ -#define PIC32MX_OSCTUN_OFFSET 0x0010 /* FRC tuning register offset */ - -/* Register Addresses *******************************************************/ - -#define PIC32MX_OSCCON (PIC32MX_OSC_K1BASE+PIC32MX_OSCCON_OFFSET) -#define PIC32MX_OSCTUN (PIC32MX_OSC_K1BASE+PIC32MX_OSCTUN_OFFSET) - -/* Register Bit-Field Definitions *******************************************/ - -/* Oscillator control register offset */ - -#define OSCCON_OSWEN (1 << 0) /* Bit 0: Oscillator switch enable */ -#define OSCCON_SOSCEN (1 << 1) /* Bit 1: 32.768kHz secondary oscillator enable */ -#define OSCCON_UFRCEN (1 << 2) /* Bit 2: USB FRC clock enable */ -#define OSCCON_CF (1 << 3) /* Bit 3: Clock fail detect */ -#define OSCCON_SLPEN (1 << 4) /* Bit 4: Sleep mode enable */ -#define OSCCON_SLOCK (1 << 5) /* Bit 5: PLL lock status */ -#define OSCCON_ULOCK (1 << 6) /* Bit 6: USB PLL lock status */ -#define OSCCON_CLKLOCK (1 << 7) /* Bit 7: Clock selection lock enable */ -#define OSCCON_NOSC_SHIFT (8) /* Bits 8-10: New oscillator selection */ -#define OSCCON_NOSC_MASK (7 << OSCCON_NOSC_SHIFT) -# define OSCCON_NOSC_FRC (0 << OSCCON_NOSC_SHIFT) /* FRC oscillator */ -# define OSCCON_NOSC_FRCPLL (1 << OSCCON_NOSC_SHIFT) /* FRC w/PLL postscaler */ -# define OSCCON_NOSC_POSC (2 << OSCCON_NOSC_SHIFT) /* Primary oscillator */ -# define OSCCON_NOSC_POSCPLL (3 << OSCCON_NOSC_SHIFT) /* Primary oscillator with PLL */ -# define OSCCON_NOSC_SOSC (4 << OSCCON_NOSC_SHIFT) /* Secondary oscillator */ -# define OSCCON_NOSC_LPRC (5 << OSCCON_NOSC_SHIFT) /* Low power RC oscillator */ -# define OSCCON_NOSC_FRCDIV16 (6 << OSCCON_NOSC_SHIFT) /* FRC divided by 16 */ -# define OSCCON_NOSC_FRCDIV (7 << OSCCON_NOSC_SHIFT) /* FRC dived by FRCDIV */ -#define OSCCON_COSC_SHIFT (12) /* Bits 12-14: Current oscillator selection */ -#define OSCCON_COSC_MASK (7 << OSCCON_COSC_SHIFT) -# define OSCCON_COSC_FRC (0 << OSCCON_COSC_SHIFT) /* FRC oscillator */ -# define OSCCON_COSC_FRCPLL (1 << OSCCON_COSC_SHIFT) /* FRC w/PLL postscaler */ -# define OSCCON_COSC_POSC (2 << OSCCON_COSC_SHIFT) /* Primary oscillator */ -# define OSCCON_COSC_POSCPLL (3 << OSCCON_COSC_SHIFT) /* Primary oscillator with PLL */ -# define OSCCON_COSC_SOSC (4 << OSCCON_COSC_SHIFT) /* Secondary oscillator */ -# define OSCCON_COSC_LPRC (5 << OSCCON_COSC_SHIFT) /* Low power RC oscillator */ -# define OSCCON_COSC_FRCDIV16 (6 << OSCCON_COSC_SHIFT) /* FRC divided by 16 */ -# define OSCCON_COSC_FRCDIV (7 << OSCCON_COSC_SHIFT) /* FRC dived by FRCDIV */ -#define OSCCON_PLLMULT_SHIFT (16) /* Bits 16-18: PLL multiplier */ -#define OSCCON_PLLMULT_MASK (7 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL15 (0 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL16 (1 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL17 (2 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL18 (3 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL19 (4 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL20 (5 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL21 (6 << OSCCON_PLLMULT_SHIFT) -# define OSCCON_PLLMULT_MUL24 (7 << OSCCON_PLLMULT_SHIFT) -#define OSCCON_PBDIV_SHIFT (19) /* Bits 19-20: PBVLK divisor */ -#define OSCCON_PBDIV_SMASK (3 << OSCCON_PBDIV_SHIFT) -# define OSCCON_PBDIV_DIV1 (0 << OSCCON_PBDIV_SHIFT) -# define OSCCON_PBDIV_DIV2 (1 << OSCCON_PBDIV_SHIFT) -# define OSCCON_PBDIV_DIV4 (2 << OSCCON_PBDIV_SHIFT) -# define OSCCON_PBDIV_DIV8 (3 << OSCCON_PBDIV_SHIFT) -#define OSCCON_SOSCRDY (1 << 22) /* Bit 22: Secondary oscillator ready */ -#define OSCCON_FRCDIV_SHIFT (24) /* Bits 24-26: FRC oscillator divider */ -#define OSCCON_FRCDIV_MASK (7 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV1 (0 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV2 (1 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV4 (2 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV8 (3 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV16 (4 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV32 (5 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV64 (6 << OSCCON_FRCDIV_SHIFT) -# define OSCCON_FRCDIV_DIV256 (7 << OSCCON_FRCDIV_SHIFT) -#define OSCCON_PLL0DIV_SHIFT (27) /* Bits 27-29: Output divider for PLL */ -#define OSCCON_PLL0DIV_MASK (7 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV1 (0 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV2 (1 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV4 (2 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV8 (3 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV16 (4 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV32 (5 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV64 (6 << OSCCON_PLL0DIV_SHIFT) -# define OSCCON_PLL0DIV_DIV256 (7 << OSCCON_PLL0DIV_SHIFT) - -/* FRC tuning register offset (6-bit, signed twos complement) */ - -#define OSCTUN_SHIFT (0) /* Bits 0-5: FRC tuning bits */ -#define OSCTUN_MASK (0x3f << OSCTUN_SHIFT) -# define OSCTUN_MIN (0x20 << OSCTUN_SHIFT) -# define OSCTUN_CENTER (0x00 << OSCTUN_SHIFT) -# define OSCTUN_MAX (0x1f << OSCTUN_SHIFT) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H */ +/**************************************************************************** + * arch/mips/src/pic32mx/pic32mx-osc.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Register Offsets *********************************************************/ + +#define PIC32MX_OSCCON_OFFSET 0x0000 /* Oscillator control register offset */ +#define PIC32MX_OSCTUN_OFFSET 0x0010 /* FRC tuning register offset */ + +/* Register Addresses *******************************************************/ + +#define PIC32MX_OSCCON (PIC32MX_OSC_K1BASE+PIC32MX_OSCCON_OFFSET) +#define PIC32MX_OSCTUN (PIC32MX_OSC_K1BASE+PIC32MX_OSCTUN_OFFSET) + +/* Register Bit-Field Definitions *******************************************/ + +/* Oscillator control register offset */ + +#define OSCCON_OSWEN (1 << 0) /* Bit 0: Oscillator switch enable */ +#define OSCCON_SOSCEN (1 << 1) /* Bit 1: 32.768kHz secondary oscillator enable */ +#define OSCCON_UFRCEN (1 << 2) /* Bit 2: USB FRC clock enable */ +#define OSCCON_CF (1 << 3) /* Bit 3: Clock fail detect */ +#define OSCCON_SLPEN (1 << 4) /* Bit 4: Sleep mode enable */ +#define OSCCON_SLOCK (1 << 5) /* Bit 5: PLL lock status */ +#define OSCCON_ULOCK (1 << 6) /* Bit 6: USB PLL lock status */ +#define OSCCON_CLKLOCK (1 << 7) /* Bit 7: Clock selection lock enable */ +#define OSCCON_NOSC_SHIFT (8) /* Bits 8-10: New oscillator selection */ +#define OSCCON_NOSC_MASK (7 << OSCCON_NOSC_SHIFT) +# define OSCCON_NOSC_FRC (0 << OSCCON_NOSC_SHIFT) /* FRC oscillator */ +# define OSCCON_NOSC_FRCPLL (1 << OSCCON_NOSC_SHIFT) /* FRC w/PLL postscaler */ +# define OSCCON_NOSC_POSC (2 << OSCCON_NOSC_SHIFT) /* Primary oscillator */ +# define OSCCON_NOSC_POSCPLL (3 << OSCCON_NOSC_SHIFT) /* Primary oscillator with PLL */ +# define OSCCON_NOSC_SOSC (4 << OSCCON_NOSC_SHIFT) /* Secondary oscillator */ +# define OSCCON_NOSC_LPRC (5 << OSCCON_NOSC_SHIFT) /* Low power RC oscillator */ +# define OSCCON_NOSC_FRCDIV16 (6 << OSCCON_NOSC_SHIFT) /* FRC divided by 16 */ +# define OSCCON_NOSC_FRCDIV (7 << OSCCON_NOSC_SHIFT) /* FRC dived by FRCDIV */ +#define OSCCON_COSC_SHIFT (12) /* Bits 12-14: Current oscillator selection */ +#define OSCCON_COSC_MASK (7 << OSCCON_COSC_SHIFT) +# define OSCCON_COSC_FRC (0 << OSCCON_COSC_SHIFT) /* FRC oscillator */ +# define OSCCON_COSC_FRCPLL (1 << OSCCON_COSC_SHIFT) /* FRC w/PLL postscaler */ +# define OSCCON_COSC_POSC (2 << OSCCON_COSC_SHIFT) /* Primary oscillator */ +# define OSCCON_COSC_POSCPLL (3 << OSCCON_COSC_SHIFT) /* Primary oscillator with PLL */ +# define OSCCON_COSC_SOSC (4 << OSCCON_COSC_SHIFT) /* Secondary oscillator */ +# define OSCCON_COSC_LPRC (5 << OSCCON_COSC_SHIFT) /* Low power RC oscillator */ +# define OSCCON_COSC_FRCDIV16 (6 << OSCCON_COSC_SHIFT) /* FRC divided by 16 */ +# define OSCCON_COSC_FRCDIV (7 << OSCCON_COSC_SHIFT) /* FRC dived by FRCDIV */ +#define OSCCON_PLLMULT_SHIFT (16) /* Bits 16-18: PLL multiplier */ +#define OSCCON_PLLMULT_MASK (7 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL15 (0 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL16 (1 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL17 (2 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL18 (3 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL19 (4 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL20 (5 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL21 (6 << OSCCON_PLLMULT_SHIFT) +# define OSCCON_PLLMULT_MUL24 (7 << OSCCON_PLLMULT_SHIFT) +#define OSCCON_PBDIV_SHIFT (19) /* Bits 19-20: PBVLK divisor */ +#define OSCCON_PBDIV_SMASK (3 << OSCCON_PBDIV_SHIFT) +# define OSCCON_PBDIV_DIV1 (0 << OSCCON_PBDIV_SHIFT) +# define OSCCON_PBDIV_DIV2 (1 << OSCCON_PBDIV_SHIFT) +# define OSCCON_PBDIV_DIV4 (2 << OSCCON_PBDIV_SHIFT) +# define OSCCON_PBDIV_DIV8 (3 << OSCCON_PBDIV_SHIFT) +#define OSCCON_SOSCRDY (1 << 22) /* Bit 22: Secondary oscillator ready */ +#define OSCCON_FRCDIV_SHIFT (24) /* Bits 24-26: FRC oscillator divider */ +#define OSCCON_FRCDIV_MASK (7 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV1 (0 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV2 (1 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV4 (2 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV8 (3 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV16 (4 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV32 (5 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV64 (6 << OSCCON_FRCDIV_SHIFT) +# define OSCCON_FRCDIV_DIV256 (7 << OSCCON_FRCDIV_SHIFT) +#define OSCCON_PLL0DIV_SHIFT (27) /* Bits 27-29: Output divider for PLL */ +#define OSCCON_PLL0DIV_MASK (7 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV1 (0 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV2 (1 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV4 (2 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV8 (3 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV16 (4 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV32 (5 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV64 (6 << OSCCON_PLL0DIV_SHIFT) +# define OSCCON_PLL0DIV_DIV256 (7 << OSCCON_PLL0DIV_SHIFT) + +/* FRC tuning register offset (6-bit, signed twos complement) */ + +#define OSCTUN_SHIFT (0) /* Bits 0-5: FRC tuning bits */ +#define OSCTUN_MASK (0x3f << OSCTUN_SHIFT) +# define OSCTUN_MIN (0x20 << OSCTUN_SHIFT) +# define OSCTUN_CENTER (0x00 << OSCTUN_SHIFT) +# define OSCTUN_MAX (0x1f << OSCTUN_SHIFT) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OSC_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-pmp.h b/nuttx/arch/mips/src/pic32mx/pic32mx-pmp.h index d3ed74627b..745c56a3d9 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-pmp.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-pmp.h @@ -2,7 +2,7 @@ * arch/mips/src/pic32mx/pic32mx-pmp.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-reset.h b/nuttx/arch/mips/src/pic32mx/pic32mx-reset.h index 5e1721796a..22fc62e4e1 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-reset.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-reset.h @@ -1,117 +1,117 @@ -/************************************************************************************ - * arch/mips/src/pic32mx/pic32mx-reset.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - -/************************************************************************************ - * Pre-Processor Definitions - ************************************************************************************/ -/* Register Offsets *****************************************************************/ - -#define PIC32MX_RESET_RCON_OFFSET 0x0000 /* Reset control register */ -#define PIC32MX_RESET_RCONCLR_OFFSET 0x0004 /* RCON clear register */ -#define PIC32MX_RESET_RCONSET_OFFSET 0x0008 /* RCON set register */ -#define PIC32MX_RESET_RCONINV_OFFSET 0x000c /* RCON invert register */ -#define PIC32MX_RESET_RSWRST_OFFSET 0x0010 /* Software reset register */ -#define PIC32MX_RESET_RSWRSTCLR_OFFSET 0x0014 /* RSWRST clear register */ -#define PIC32MX_RESET_RSWRSTSET_OFFSET 0x0018 /* RSWRST set register */ -#define PIC32MX_RESET_RSWRSTINV_OFFSET 0x001c /* RSWRST invert register */ - -/* Register Addresses ***************************************************************/ - -#define PIC32MX_RESET_RCON (PIC32MX_RESET_K1BASE+PIC32MX_RCON_OFFSET) -#define PIC32MX_RESET_RCONCLR (PIC32MX_RESET_K1BASE+PIC32MX_RCONCLR_OFFSET) -#define PIC32MX_RESET_RCONSET (PIC32MX_RESET_K1BASE+PIC32MX_RCONSET_OFFSET) -#define PIC32MX_RESET_RCONINV (PIC32MX_RESET_K1BASE+PIC32MX_RCONINV_OFFSET) -#define PIC32MX_RESET_RSWRST (PIC32MX_RESET_K1BASE+PIC32MX_RSWRST_OFFSET) -#define PIC32MX_RESET_RSWRSTCLR (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTCLR_OFFSET) -#define PIC32MX_RESET_RSWRSTSET (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTSET_OFFSET) -#define PIC32MX_RESET_RSWRSTINV (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTINV_OFFSET) - -/* Register Bit-Field Definitions ***************************************************/ - -/* Reset control register */ - -#define RESET_RCON_POR (1 << 0) /* Bit 0: Power on reset */ -#define RESET_RCON_BOR (1 << 1) /* Bit 1: Brown out reset */ -#define RESET_RCON_IDLE (1 << 2) /* Bit 2: Wake from idle */ -#define RESET_RCON_SLEEP (1 << 3) /* Bit 3: Wake from sleep */ -#define RESET_RCON_WDTO (1 << 4) /* Bit 4: Watchdog timer time-out */ -#define RESET_RCON_SWR (1 << 6) /* Bit 6: Software reset */ -#define RESET_RCON_EXTR (1 << 7) /* Bit 7: External reset pin */ -#define RESET_RCON_VREGS (1 << 8) /* Bit 8: Voltage regulator standby enable */ -#define RESET_RCON_CMR (1 << 9) /* Bit 9: Configuration mismatch reset */ - -/* Software reset register */ - -#define RESET_RSWRST_TRIGGER (1 << 0) /* Bit 0: Software reset trigger */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Function Prototypes - ************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H */ +/************************************************************************************ + * arch/mips/src/pic32mx/pic32mx-reset.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + +/************************************************************************************ + * Pre-Processor Definitions + ************************************************************************************/ +/* Register Offsets *****************************************************************/ + +#define PIC32MX_RESET_RCON_OFFSET 0x0000 /* Reset control register */ +#define PIC32MX_RESET_RCONCLR_OFFSET 0x0004 /* RCON clear register */ +#define PIC32MX_RESET_RCONSET_OFFSET 0x0008 /* RCON set register */ +#define PIC32MX_RESET_RCONINV_OFFSET 0x000c /* RCON invert register */ +#define PIC32MX_RESET_RSWRST_OFFSET 0x0010 /* Software reset register */ +#define PIC32MX_RESET_RSWRSTCLR_OFFSET 0x0014 /* RSWRST clear register */ +#define PIC32MX_RESET_RSWRSTSET_OFFSET 0x0018 /* RSWRST set register */ +#define PIC32MX_RESET_RSWRSTINV_OFFSET 0x001c /* RSWRST invert register */ + +/* Register Addresses ***************************************************************/ + +#define PIC32MX_RESET_RCON (PIC32MX_RESET_K1BASE+PIC32MX_RCON_OFFSET) +#define PIC32MX_RESET_RCONCLR (PIC32MX_RESET_K1BASE+PIC32MX_RCONCLR_OFFSET) +#define PIC32MX_RESET_RCONSET (PIC32MX_RESET_K1BASE+PIC32MX_RCONSET_OFFSET) +#define PIC32MX_RESET_RCONINV (PIC32MX_RESET_K1BASE+PIC32MX_RCONINV_OFFSET) +#define PIC32MX_RESET_RSWRST (PIC32MX_RESET_K1BASE+PIC32MX_RSWRST_OFFSET) +#define PIC32MX_RESET_RSWRSTCLR (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTCLR_OFFSET) +#define PIC32MX_RESET_RSWRSTSET (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTSET_OFFSET) +#define PIC32MX_RESET_RSWRSTINV (PIC32MX_RESET_K1BASE+PIC32MX_RSWRSTINV_OFFSET) + +/* Register Bit-Field Definitions ***************************************************/ + +/* Reset control register */ + +#define RESET_RCON_POR (1 << 0) /* Bit 0: Power on reset */ +#define RESET_RCON_BOR (1 << 1) /* Bit 1: Brown out reset */ +#define RESET_RCON_IDLE (1 << 2) /* Bit 2: Wake from idle */ +#define RESET_RCON_SLEEP (1 << 3) /* Bit 3: Wake from sleep */ +#define RESET_RCON_WDTO (1 << 4) /* Bit 4: Watchdog timer time-out */ +#define RESET_RCON_SWR (1 << 6) /* Bit 6: Software reset */ +#define RESET_RCON_EXTR (1 << 7) /* Bit 7: External reset pin */ +#define RESET_RCON_VREGS (1 << 8) /* Bit 8: Voltage regulator standby enable */ +#define RESET_RCON_CMR (1 << 9) /* Bit 9: Configuration mismatch reset */ + +/* Software reset register */ + +#define RESET_RSWRST_TRIGGER (1 << 0) /* Bit 0: Software reset trigger */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Inline Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RESET_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-rtcc.h b/nuttx/arch/mips/src/pic32mx/pic32mx-rtcc.h index 4a3c2a31d9..5ecb9090ca 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-rtcc.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-rtcc.h @@ -1,219 +1,219 @@ -/******************************************************************************************** - * arch/mips/src/pic32mx/pic32mx-rtcc.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ********************************************************************************************/ - -#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H -#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H - -/******************************************************************************************** - * Included Files - ********************************************************************************************/ - -#include - -#include "pic32mx-memorymap.h" - -/******************************************************************************************** - * Pre-Processor Definitions - ********************************************************************************************/ -/* Register Offsets *************************************************************************/ - -#define PIC32MX_RTCC_CON_OFFSET 0x0000 /* RTC Control Register */ -#define PIC32MX_RTCC_CONCLR_OFFSET 0x0004 /* RTC Control Clear Register */ -#define PIC32MX_RTCC_CONSET_OFFSET 0x0008 /* RTC Control Set Register */ -#define PIC32MX_RTCC_CONINV_OFFSET 0x000c /* RTC Control Invert Register */ -#define PIC32MX_RTCC_ALRM_OFFSET 0x0010 /* RTC ALARM Control Register */ -#define PIC32MX_RTCC_ALRMCLR_OFFSET 0x0014 /* RTC ALARM Control Clear Register */ -#define PIC32MX_RTCC_ALRMSET_OFFSET 0x0018 /* RTC ALARM Control Set Register */ -#define PIC32MX_RTCC_ALRMINV_OFFSET 0x001c /* RTC ALARM Control Invert Register */ -#define PIC32MX_RTCC_TIME_OFFSET 0x0020 /* RTC Time Value Register */ -#define PIC32MX_RTCC_TIMECLR_OFFSET 0x0024 /* RTC Time Value Clear Register */ -#define PIC32MX_RTCC_TIMESET_OFFSET 0x0028 /* RTC Time Value Set Register */ -#define PIC32MX_RTCC_TIMEINV_OFFSET 0x002c /* RTC Time Value Invert Register */ -#define PIC32MX_RTCC_DATE_OFFSET 0x0030 /* RTC Date Value Register */ -#define PIC32MX_RTCC_DATECLR_OFFSET 0x0034 /* RTC Date Value Clear Register */ -#define PIC32MX_RTCC_DATESET_OFFSET 0x0038 /* RTC Date Value Set Register */ -#define PIC32MX_RTCC_DATEINV_OFFSET 0x003c /* RTC Date Value Invert Register */ -#define PIC32MX_RTCC_ALRMTIME_OFFSET 0x0040 /* Alarm Time Value Register */ -#define PIC32MX_RTCC_ALRMTIMECLR_OFFSET 0x0044 /* Alarm Time Value Clear Register */ -#define PIC32MX_RTCC_ALRMTIMESET_OFFSET 0x0048 /* Alarm Time Value Set Register */ -#define PIC32MX_RTCC_ALRMTIMEINV_OFFSET 0x004c /* Alarm Time Value Invert Register */ -#define PIC32MX_RTCC_ALRMDATE_OFFSET 0x0050 /* Alarm Date Value Register */ -#define PIC32MX_RTCC_ALRMDATECLR_OFFSET 0x0054 /* Alarm Date Value Clear Register */ -#define PIC32MX_RTCC_ALRMDATESET_OFFSET 0x0058 /* Alarm Date Value Set Register */ -#define PIC32MX_RTCC_ALRMDATEINV_OFFSET 0x005c /* Alarm Date Value Invert Register */ - -/* Register Addresses ***********************************************************************/ - -#define PIC32MX_RTCC_CON (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CON_OFFSET) -#define PIC32MX_RTCC_CONCLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONCLR_OFFSET) -#define PIC32MX_RTCC_CONSET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONSET_OFFSET) -#define PIC32MX_RTCC_CONINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONINV_OFFSET) -#define PIC32MX_RTCC_ALRM (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRM_OFFSET) -#define PIC32MX_RTCC_ALRMCLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMCLR_OFFSET) -#define PIC32MX_RTCC_ALRMSET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMSET_OFFSET) -#define PIC32MX_RTCC_ALRMINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMINV_OFFSET) -#define PIC32MX_RTCC_TIME (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIME_OFFSET) -#define PIC32MX_RTCC_TIMECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMECLR_OFFSET) -#define PIC32MX_RTCC_TIMESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMESET_OFFSET) -#define PIC32MX_RTCC_TIMEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMEINV_OFFSET) -#define PIC32MX_RTCC_DATE (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATE_OFFSET) -#define PIC32MX_RTCC_DATECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATECLR_OFFSET) -#define PIC32MX_RTCC_DATESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATESET_OFFSET) -#define PIC32MX_RTCC_DATEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATEINV_OFFSET) -#define PIC32MX_RTCC_ALRMTIME (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIME_OFFSET) -#define PIC32MX_RTCC_ALRMTIMECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMECLR_OFFSET) -#define PIC32MX_RTCC_ALRMTIMESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMESET_OFFSET) -#define PIC32MX_RTCC_ALRMTIMEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMEINV_OFFSET) -#define PIC32MX_RTCC_ALRMDATE (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATE_OFFSET) -#define PIC32MX_RTCC_ALRMDATECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATECLR_OFFSET) -#define PIC32MX_RTCC_ALRMDATESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATESET_OFFSET) -#define PIC32MX_RTCC_ALRMDATEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATEINV_OFFSET) - -/* Register Bit-Field Definitions ***********************************************************/ - -/* RTC Control Register */ - -#define RTCC_CON_CAL_SHIFT (16) /* Bits 16-25: RTC drift calibration */ -#define RTCC_CON_CAL_MASK (0x3ff << RTCC_CON_CAL_SHIFT) /* 10-bit 2's complement */ -# define RTCC_CON_CAL_MAX (0x1ff << RTCC_CON_CAL_SHIFT) -# define RTCC_CON_CAL_CENTER (0x000 << RTCC_CON_CAL_SHIFT) -# define RTCC_CON_CAL_MIN (0x200 << RTCC_CON_CAL_SHIFT) -#define RTCC_CON_ON (1 << 15) /* Bit 15: RTCC on */ -#define RTCC_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug mode */ -#define RTCC_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode */ -#define RTCC_CON_RTSECSEL (1 << 9) /* Bit 7: RTCC seconds clock output select */ -#define RTCC_CON_RTCCLKON (1 << 8) /* Bit 6: RTCC clock enable status */ -#define RTCC_CON_RTCWREN (1 << 3) /* Bit 3: RTC value registers write enable */ -#define RTCC_CON_RTCSYNC (1 << 2) /* Bit 2: RTCC value registers read synchronization */ -#define RTCC_CON_HALFSEC (1 << 1) /* Bit 1: Half-second status */ -#define RTCC_CON_RTCOE (1 << 0) /* Bit 0: RTCC output enable */ - -/* RTC ALARM Control Register */ - -#define RTCC_ALRM_ARPT_SHIFT (0) /* Bits 0-7: Alarm repeat counter value */ -#define RTCC_ALRM_ARPT_MASK (0xff << RTCC_ALRM_ARPT_SHIFT) -#define RTCC_ALRM_AMASK_SHIFT (8) /* Bits 8-11: Alarm mask configuration */ -#define RTCC_ALRM_AMASK_MASK (15 << RTCC_ALRM_AMASK_SHIFT) -#define RTCC_ALRM_ALRMSYNC (1 << 12) /* Bit 12: Alarm sync */ -#define RTCC_ALRM_PIV (1 << 13) /* Bit 13: Alarm pulse initial value */ -#define RTCC_ALRM_CHIME (1 << 14) /* Bit 14: Chime enable */ -#define RTCC_ALRM_ALRMEN (1 << 15) /* Bit 15: Alarm enable */ - -/* RTC Time Value Register */ - -#define RTCC_TIME_SEC01_SHIFT (8) /* Bits 8-11: BCD seconds, 1 digit */ -#define RTCC_TIME_SEC01_MASK (15 << RTCC_TIME_SEC01_SHIFT) -#define RTCC_TIME_SEC10_SHIFT (12) /* Bits 12-14: BCD seconds, 10 digits */ -#define RTCC_TIME_SEC10_MASK (7 << RTCC_TIME_SEC10_SHIFT) -#define RTCC_TIME_MIN01_SHIFT (16) /* Bits 16-19: BCD minutes, 1 digit */ -#define RTCC_TIME_MIN01_MASK (15 << RTCC_TIME_MIN01_SHIFT) -#define RTCC_TIME_MIN10_SHIFT (20) /* Bits 20-22: BCD minutes, 10 digits */ -#define RTCC_TIME_MIN10_MASK (7 << RTCC_TIME_MIN10_SHIFT) -#define RTCC_TIME_HR01_SHIFT (24) /* Bits 24-27: BCD hours, 1 digit */ -#define RTCC_TIME_HR01_MASK (15 << RTCC_TIME_HR01_SHIFT) -#define RTCC_TIME_HR10_SHIFT (28) /* Bits 28-29: BCD hours, 10 digits */ -#define RTCC_TIME_HR10_MASK (3 << RTCC_TIME_HR10_SHIFT) - -/* RTC Date Value Register */ - -#define RTCC_DATE_WDAY01_SHIFT (0) /* Bits 0-2: BCD weekday, 1 digit */ -#define RTCC_DATE_WDAY01_MASK (7 << RTCC_DATE_WDAY01_SHIFT) -#define RTCC_DATE_DAY01_SHIFT (8) /* Bits 8-11: BCD day, 1 digit */ -#define RTCC_DATE_DAY01_MASK (15 << RTCC_DATE_DAY01_SHIFT) -#define RTCC_DATE_DAY10_SHIFT (12) /* Bits 12-13: BCD day, 10 digits */ -#define RTCC_DATE_DAY10_MASK (3 << RTCC_DATE_DAY10_SHIFT) -#define RTCC_DATE_MONTH01_SHIFT (16) /* Bits 16-19: BCD month, 1 digit */ -#define RTCC_DATE_MONTH01_MASK (15 << RTCC_DATE_MONTH01_SHIFT) -#define RTCC_DATE_MONTH10 (1 << 20) /* Bit 20: BCD month, 10 digits */ -#define RTCC_DATE_YEAR01_SHIFT (24) /* Bits 24-27: BCD year, 1 digit */ -#define RTCC_DATE_YEAR01_MASK (15 << RTCC_DATE_YEAR01_SHIFT) -#define RTCC_DATE_YEAR10_SHIFT (28) /* Bits 28-31: BCD year, 10 digits */ -#define RTCC_DATE_YEAR10_MASK (15 << RTCC_DATE_YEAR10_SHIFT) - -/* Alarm Time Value Register */ - -#define RTCC_ALRMTIME_SEC01_SHIFT (8) /* Bits 8-11: BCD seconds, 1 digit */ -#define RTCC_ALRMTIME_SEC01_MASK (15 << RTCC_ALRMTIME_SEC01_SHIFT) -#define RTCC_ALRMTIME_SEC10_SHIFT (12) /* Bits 12-14: BCD seconds, 1 digit */ -#define RTCC_ALRMTIME_SEC10_MASK (7 << RTCC_ALRMTIME_SEC10_SHIFT) -#define RTCC_ALRMTIME_MIN01_SHIFT (16) /* Bits 16-19: BCD minutes, 1 digit */ -#define RTCC_ALRMTIME_MIN01_MASK (15 << RTCC_ALRMTIME_MIN01_SHIFT) -#define RTCC_ALRMTIME_MIN10_SHIFT (20) /* Bits 20-22: BCD minutes, 1 digit */ -#define RTCC_ALRMTIME_MIN10_MASK (7 << RTCC_ALRMTIME_MIN10_SHIFT) -#define RTCC_ALRMTIME_HR01_SHIFT (24) /* Bits 24-27: BCD hours, 1 digit */ -#define RTCC_ALRMTIME_HR01_MASK (15 << RTCC_ALRMTIME_HR01_SHIFT) -#define RTCC_ALRMTIME_HR10_SHIFT (28) /* Bits 28-29: BCD hours, 1 digit */ -#define RTCC_ALRMTIME_HR10_MASK (3 << RTCC_ALRMTIME_HR10_SHIFT) - -/* Alarm Date Value Register */ - -#define RTCC_ALRMDATE_WDAY01_SHIFT (0) /* Bits 0-2: BCD weekday, 1 digit */ -#define RTCC_ALRMDATE_WDAY01_MASK (7 << RTCC_ALRMDATE_WDAY01_SHIFT) -#define RTCC_ALRMDATE_DAY01_SHIFT (8) /* Bits 8-11: BCD days, 1 digit */ -#define RTCC_ALRMDATE_DAY01_MASK (15 << RTCC_ALRMDATE_DAY01_SHIFT) -#define RTCC_ALRMDATE_DAY10_SHIFT (12) /* Bits 12-13: BCD days, 1 digit */ -#define RTCC_ALRMDATE_DAY10_MASK (3 << RTCC_ALRMDATE_DAY10_SHIFT) -#define RTCC_ALRMDATE_MONTH01_SHIFT (16) /* Bits 16-19: BCD month, 1 digit */ -#define RTCC_ALRMDATE_MONTH01_MASK (15 << RTCC_ALRMDATE_MONTH01_SHIFT) -#define RTCC_DATE_MONTH10 (1 << 20) /* Bit 20: BCD month, 10 digits */ - -/******************************************************************************************** - * Public Types - ********************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/******************************************************************************************** - * Inline Functions - ********************************************************************************************/ - -/******************************************************************************************** - * Public Function Prototypes - ********************************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H */ +/******************************************************************************************** + * arch/mips/src/pic32mx/pic32mx-rtcc.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +#ifndef __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H +#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include "pic32mx-memorymap.h" + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ +/* Register Offsets *************************************************************************/ + +#define PIC32MX_RTCC_CON_OFFSET 0x0000 /* RTC Control Register */ +#define PIC32MX_RTCC_CONCLR_OFFSET 0x0004 /* RTC Control Clear Register */ +#define PIC32MX_RTCC_CONSET_OFFSET 0x0008 /* RTC Control Set Register */ +#define PIC32MX_RTCC_CONINV_OFFSET 0x000c /* RTC Control Invert Register */ +#define PIC32MX_RTCC_ALRM_OFFSET 0x0010 /* RTC ALARM Control Register */ +#define PIC32MX_RTCC_ALRMCLR_OFFSET 0x0014 /* RTC ALARM Control Clear Register */ +#define PIC32MX_RTCC_ALRMSET_OFFSET 0x0018 /* RTC ALARM Control Set Register */ +#define PIC32MX_RTCC_ALRMINV_OFFSET 0x001c /* RTC ALARM Control Invert Register */ +#define PIC32MX_RTCC_TIME_OFFSET 0x0020 /* RTC Time Value Register */ +#define PIC32MX_RTCC_TIMECLR_OFFSET 0x0024 /* RTC Time Value Clear Register */ +#define PIC32MX_RTCC_TIMESET_OFFSET 0x0028 /* RTC Time Value Set Register */ +#define PIC32MX_RTCC_TIMEINV_OFFSET 0x002c /* RTC Time Value Invert Register */ +#define PIC32MX_RTCC_DATE_OFFSET 0x0030 /* RTC Date Value Register */ +#define PIC32MX_RTCC_DATECLR_OFFSET 0x0034 /* RTC Date Value Clear Register */ +#define PIC32MX_RTCC_DATESET_OFFSET 0x0038 /* RTC Date Value Set Register */ +#define PIC32MX_RTCC_DATEINV_OFFSET 0x003c /* RTC Date Value Invert Register */ +#define PIC32MX_RTCC_ALRMTIME_OFFSET 0x0040 /* Alarm Time Value Register */ +#define PIC32MX_RTCC_ALRMTIMECLR_OFFSET 0x0044 /* Alarm Time Value Clear Register */ +#define PIC32MX_RTCC_ALRMTIMESET_OFFSET 0x0048 /* Alarm Time Value Set Register */ +#define PIC32MX_RTCC_ALRMTIMEINV_OFFSET 0x004c /* Alarm Time Value Invert Register */ +#define PIC32MX_RTCC_ALRMDATE_OFFSET 0x0050 /* Alarm Date Value Register */ +#define PIC32MX_RTCC_ALRMDATECLR_OFFSET 0x0054 /* Alarm Date Value Clear Register */ +#define PIC32MX_RTCC_ALRMDATESET_OFFSET 0x0058 /* Alarm Date Value Set Register */ +#define PIC32MX_RTCC_ALRMDATEINV_OFFSET 0x005c /* Alarm Date Value Invert Register */ + +/* Register Addresses ***********************************************************************/ + +#define PIC32MX_RTCC_CON (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CON_OFFSET) +#define PIC32MX_RTCC_CONCLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONCLR_OFFSET) +#define PIC32MX_RTCC_CONSET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONSET_OFFSET) +#define PIC32MX_RTCC_CONINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_CONINV_OFFSET) +#define PIC32MX_RTCC_ALRM (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRM_OFFSET) +#define PIC32MX_RTCC_ALRMCLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMCLR_OFFSET) +#define PIC32MX_RTCC_ALRMSET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMSET_OFFSET) +#define PIC32MX_RTCC_ALRMINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMINV_OFFSET) +#define PIC32MX_RTCC_TIME (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIME_OFFSET) +#define PIC32MX_RTCC_TIMECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMECLR_OFFSET) +#define PIC32MX_RTCC_TIMESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMESET_OFFSET) +#define PIC32MX_RTCC_TIMEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_TIMEINV_OFFSET) +#define PIC32MX_RTCC_DATE (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATE_OFFSET) +#define PIC32MX_RTCC_DATECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATECLR_OFFSET) +#define PIC32MX_RTCC_DATESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATESET_OFFSET) +#define PIC32MX_RTCC_DATEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_DATEINV_OFFSET) +#define PIC32MX_RTCC_ALRMTIME (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIME_OFFSET) +#define PIC32MX_RTCC_ALRMTIMECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMECLR_OFFSET) +#define PIC32MX_RTCC_ALRMTIMESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMESET_OFFSET) +#define PIC32MX_RTCC_ALRMTIMEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMTIMEINV_OFFSET) +#define PIC32MX_RTCC_ALRMDATE (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATE_OFFSET) +#define PIC32MX_RTCC_ALRMDATECLR (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATECLR_OFFSET) +#define PIC32MX_RTCC_ALRMDATESET (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATESET_OFFSET) +#define PIC32MX_RTCC_ALRMDATEINV (PIC32MX_RTCC_K1BASE+PIC32MX_RTCC_ALRMDATEINV_OFFSET) + +/* Register Bit-Field Definitions ***********************************************************/ + +/* RTC Control Register */ + +#define RTCC_CON_CAL_SHIFT (16) /* Bits 16-25: RTC drift calibration */ +#define RTCC_CON_CAL_MASK (0x3ff << RTCC_CON_CAL_SHIFT) /* 10-bit 2's complement */ +# define RTCC_CON_CAL_MAX (0x1ff << RTCC_CON_CAL_SHIFT) +# define RTCC_CON_CAL_CENTER (0x000 << RTCC_CON_CAL_SHIFT) +# define RTCC_CON_CAL_MIN (0x200 << RTCC_CON_CAL_SHIFT) +#define RTCC_CON_ON (1 << 15) /* Bit 15: RTCC on */ +#define RTCC_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug mode */ +#define RTCC_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode */ +#define RTCC_CON_RTSECSEL (1 << 9) /* Bit 7: RTCC seconds clock output select */ +#define RTCC_CON_RTCCLKON (1 << 8) /* Bit 6: RTCC clock enable status */ +#define RTCC_CON_RTCWREN (1 << 3) /* Bit 3: RTC value registers write enable */ +#define RTCC_CON_RTCSYNC (1 << 2) /* Bit 2: RTCC value registers read synchronization */ +#define RTCC_CON_HALFSEC (1 << 1) /* Bit 1: Half-second status */ +#define RTCC_CON_RTCOE (1 << 0) /* Bit 0: RTCC output enable */ + +/* RTC ALARM Control Register */ + +#define RTCC_ALRM_ARPT_SHIFT (0) /* Bits 0-7: Alarm repeat counter value */ +#define RTCC_ALRM_ARPT_MASK (0xff << RTCC_ALRM_ARPT_SHIFT) +#define RTCC_ALRM_AMASK_SHIFT (8) /* Bits 8-11: Alarm mask configuration */ +#define RTCC_ALRM_AMASK_MASK (15 << RTCC_ALRM_AMASK_SHIFT) +#define RTCC_ALRM_ALRMSYNC (1 << 12) /* Bit 12: Alarm sync */ +#define RTCC_ALRM_PIV (1 << 13) /* Bit 13: Alarm pulse initial value */ +#define RTCC_ALRM_CHIME (1 << 14) /* Bit 14: Chime enable */ +#define RTCC_ALRM_ALRMEN (1 << 15) /* Bit 15: Alarm enable */ + +/* RTC Time Value Register */ + +#define RTCC_TIME_SEC01_SHIFT (8) /* Bits 8-11: BCD seconds, 1 digit */ +#define RTCC_TIME_SEC01_MASK (15 << RTCC_TIME_SEC01_SHIFT) +#define RTCC_TIME_SEC10_SHIFT (12) /* Bits 12-14: BCD seconds, 10 digits */ +#define RTCC_TIME_SEC10_MASK (7 << RTCC_TIME_SEC10_SHIFT) +#define RTCC_TIME_MIN01_SHIFT (16) /* Bits 16-19: BCD minutes, 1 digit */ +#define RTCC_TIME_MIN01_MASK (15 << RTCC_TIME_MIN01_SHIFT) +#define RTCC_TIME_MIN10_SHIFT (20) /* Bits 20-22: BCD minutes, 10 digits */ +#define RTCC_TIME_MIN10_MASK (7 << RTCC_TIME_MIN10_SHIFT) +#define RTCC_TIME_HR01_SHIFT (24) /* Bits 24-27: BCD hours, 1 digit */ +#define RTCC_TIME_HR01_MASK (15 << RTCC_TIME_HR01_SHIFT) +#define RTCC_TIME_HR10_SHIFT (28) /* Bits 28-29: BCD hours, 10 digits */ +#define RTCC_TIME_HR10_MASK (3 << RTCC_TIME_HR10_SHIFT) + +/* RTC Date Value Register */ + +#define RTCC_DATE_WDAY01_SHIFT (0) /* Bits 0-2: BCD weekday, 1 digit */ +#define RTCC_DATE_WDAY01_MASK (7 << RTCC_DATE_WDAY01_SHIFT) +#define RTCC_DATE_DAY01_SHIFT (8) /* Bits 8-11: BCD day, 1 digit */ +#define RTCC_DATE_DAY01_MASK (15 << RTCC_DATE_DAY01_SHIFT) +#define RTCC_DATE_DAY10_SHIFT (12) /* Bits 12-13: BCD day, 10 digits */ +#define RTCC_DATE_DAY10_MASK (3 << RTCC_DATE_DAY10_SHIFT) +#define RTCC_DATE_MONTH01_SHIFT (16) /* Bits 16-19: BCD month, 1 digit */ +#define RTCC_DATE_MONTH01_MASK (15 << RTCC_DATE_MONTH01_SHIFT) +#define RTCC_DATE_MONTH10 (1 << 20) /* Bit 20: BCD month, 10 digits */ +#define RTCC_DATE_YEAR01_SHIFT (24) /* Bits 24-27: BCD year, 1 digit */ +#define RTCC_DATE_YEAR01_MASK (15 << RTCC_DATE_YEAR01_SHIFT) +#define RTCC_DATE_YEAR10_SHIFT (28) /* Bits 28-31: BCD year, 10 digits */ +#define RTCC_DATE_YEAR10_MASK (15 << RTCC_DATE_YEAR10_SHIFT) + +/* Alarm Time Value Register */ + +#define RTCC_ALRMTIME_SEC01_SHIFT (8) /* Bits 8-11: BCD seconds, 1 digit */ +#define RTCC_ALRMTIME_SEC01_MASK (15 << RTCC_ALRMTIME_SEC01_SHIFT) +#define RTCC_ALRMTIME_SEC10_SHIFT (12) /* Bits 12-14: BCD seconds, 1 digit */ +#define RTCC_ALRMTIME_SEC10_MASK (7 << RTCC_ALRMTIME_SEC10_SHIFT) +#define RTCC_ALRMTIME_MIN01_SHIFT (16) /* Bits 16-19: BCD minutes, 1 digit */ +#define RTCC_ALRMTIME_MIN01_MASK (15 << RTCC_ALRMTIME_MIN01_SHIFT) +#define RTCC_ALRMTIME_MIN10_SHIFT (20) /* Bits 20-22: BCD minutes, 1 digit */ +#define RTCC_ALRMTIME_MIN10_MASK (7 << RTCC_ALRMTIME_MIN10_SHIFT) +#define RTCC_ALRMTIME_HR01_SHIFT (24) /* Bits 24-27: BCD hours, 1 digit */ +#define RTCC_ALRMTIME_HR01_MASK (15 << RTCC_ALRMTIME_HR01_SHIFT) +#define RTCC_ALRMTIME_HR10_SHIFT (28) /* Bits 28-29: BCD hours, 1 digit */ +#define RTCC_ALRMTIME_HR10_MASK (3 << RTCC_ALRMTIME_HR10_SHIFT) + +/* Alarm Date Value Register */ + +#define RTCC_ALRMDATE_WDAY01_SHIFT (0) /* Bits 0-2: BCD weekday, 1 digit */ +#define RTCC_ALRMDATE_WDAY01_MASK (7 << RTCC_ALRMDATE_WDAY01_SHIFT) +#define RTCC_ALRMDATE_DAY01_SHIFT (8) /* Bits 8-11: BCD days, 1 digit */ +#define RTCC_ALRMDATE_DAY01_MASK (15 << RTCC_ALRMDATE_DAY01_SHIFT) +#define RTCC_ALRMDATE_DAY10_SHIFT (12) /* Bits 12-13: BCD days, 1 digit */ +#define RTCC_ALRMDATE_DAY10_MASK (3 << RTCC_ALRMDATE_DAY10_SHIFT) +#define RTCC_ALRMDATE_MONTH01_SHIFT (16) /* Bits 16-19: BCD month, 1 digit */ +#define RTCC_ALRMDATE_MONTH01_MASK (15 << RTCC_ALRMDATE_MONTH01_SHIFT) +#define RTCC_DATE_MONTH10 (1 << 20) /* Bit 20: BCD month, 10 digits */ + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/******************************************************************************************** + * Inline Functions + ********************************************************************************************/ + +/******************************************************************************************** + * Public Function Prototypes + ********************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_RTCC_H */ diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-timerisr.c b/nuttx/arch/mips/src/pic32mx/pic32mx-timerisr.c index a3273e868c..126c2a7bce 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-timerisr.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-timerisr.c @@ -2,7 +2,7 @@ * arch/mips/src/pic32mx/pic32mx_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-wdt.h b/nuttx/arch/mips/src/pic32mx/pic32mx-wdt.h index e6dfeea937..5da30fa05a 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-wdt.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-wdt.h @@ -2,7 +2,7 @@ * arch/mips/src/pic32mx/pic32mx-wdt.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/rgmp/include/math.h b/nuttx/arch/rgmp/include/math.h index 55f24aaa40..16992d63c6 100644 --- a/nuttx/arch/rgmp/include/math.h +++ b/nuttx/arch/rgmp/include/math.h @@ -2,7 +2,7 @@ * arch/rgmp/include/math.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/rgmp/include/stdbool.h b/nuttx/arch/rgmp/include/stdbool.h index 4af9ec9e33..993e0f7361 100644 --- a/nuttx/arch/rgmp/include/stdbool.h +++ b/nuttx/arch/rgmp/include/stdbool.h @@ -2,7 +2,7 @@ * arch/rgmp/include/stdbool.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/rgmp/include/stdint.h b/nuttx/arch/rgmp/include/stdint.h index 7b244dd9f4..07b9ffdeeb 100644 --- a/nuttx/arch/rgmp/include/stdint.h +++ b/nuttx/arch/rgmp/include/stdint.h @@ -2,7 +2,7 @@ * arch/rgmp/include/stdint.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/rgmp/include/types.h b/nuttx/arch/rgmp/include/types.h index 48e141db3a..81bf0e817a 100644 --- a/nuttx/arch/rgmp/include/types.h +++ b/nuttx/arch/rgmp/include/types.h @@ -2,7 +2,7 @@ * arch/rgmp/include/types.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/rgmp/src/x86/com.c b/nuttx/arch/rgmp/src/x86/com.c index e5e7f70f6a..6a136ac7d7 100644 --- a/nuttx/arch/rgmp/src/x86/com.c +++ b/nuttx/arch/rgmp/src/x86/com.c @@ -4,7 +4,7 @@ * Copyright (C) 2011 Yu Qiang. All rights reserved. * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Authors: Yu Qiang - * Gregory Nutt + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/arch.h b/nuttx/arch/sh/include/arch.h index 81853b12ea..e277d9f386 100644 --- a/nuttx/arch/sh/include/arch.h +++ b/nuttx/arch/sh/include/arch.h @@ -2,7 +2,7 @@ * arch/sh/include/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/irq.h b/nuttx/arch/sh/include/irq.h index 87c80e3497..cb8a345ee5 100644 --- a/nuttx/arch/sh/include/irq.h +++ b/nuttx/arch/sh/include/irq.h @@ -2,7 +2,7 @@ * arch/sh/include/irq.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/limits.h b/nuttx/arch/sh/include/limits.h index 18860b96ee..eeae7c5aab 100644 --- a/nuttx/arch/sh/include/limits.h +++ b/nuttx/arch/sh/include/limits.h @@ -2,7 +2,7 @@ * arch/sh/include/limits.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/m16c/irq.h b/nuttx/arch/sh/include/m16c/irq.h index 8809d06e61..b134428a7e 100644 --- a/nuttx/arch/sh/include/m16c/irq.h +++ b/nuttx/arch/sh/include/m16c/irq.h @@ -2,7 +2,7 @@ * arch/sh/include/m16c/irq.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/m16c/types.h b/nuttx/arch/sh/include/m16c/types.h index 4f84a31132..bd23a9a5fa 100644 --- a/nuttx/arch/sh/include/m16c/types.h +++ b/nuttx/arch/sh/include/m16c/types.h @@ -2,7 +2,7 @@ * arch/sh/include/m16c/types.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/serial.h b/nuttx/arch/sh/include/serial.h index 09073e1449..b91494e502 100644 --- a/nuttx/arch/sh/include/serial.h +++ b/nuttx/arch/sh/include/serial.h @@ -2,7 +2,7 @@ * arch/sh/include/serial.h * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/sh1/irq.h b/nuttx/arch/sh/include/sh1/irq.h index a6b0fcbaee..e4c7ce9909 100644 --- a/nuttx/arch/sh/include/sh1/irq.h +++ b/nuttx/arch/sh/include/sh1/irq.h @@ -2,7 +2,7 @@ * arch/sh/include/sh1/irq.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/sh1/types.h b/nuttx/arch/sh/include/sh1/types.h index ac0769ecd5..f9e31242df 100644 --- a/nuttx/arch/sh/include/sh1/types.h +++ b/nuttx/arch/sh/include/sh1/types.h @@ -2,7 +2,7 @@ * arch/sh/include/sh1/types.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/syscall.h b/nuttx/arch/sh/include/syscall.h index 4cbfefec4c..7295005f07 100644 --- a/nuttx/arch/sh/include/syscall.h +++ b/nuttx/arch/sh/include/syscall.h @@ -2,7 +2,7 @@ * arch/sh/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/types.h b/nuttx/arch/sh/include/types.h index e50a71c00c..daec7c6821 100644 --- a/nuttx/arch/sh/include/types.h +++ b/nuttx/arch/sh/include/types.h @@ -2,7 +2,7 @@ * arch/sh/include/types.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/include/watchdog.h b/nuttx/arch/sh/include/watchdog.h index 2b70dfc88a..c69612b791 100644 --- a/nuttx/arch/sh/include/watchdog.h +++ b/nuttx/arch/sh/include/watchdog.h @@ -2,7 +2,7 @@ * arch/sh/include/watchdog.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_allocateheap.c b/nuttx/arch/sh/src/common/up_allocateheap.c index 676634ed6c..e19b2c18e9 100644 --- a/nuttx/arch/sh/src/common/up_allocateheap.c +++ b/nuttx/arch/sh/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_allocateheap.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_arch.h b/nuttx/arch/sh/src/common/up_arch.h index ddc66fb760..c23d9dff16 100644 --- a/nuttx/arch/sh/src/common/up_arch.h +++ b/nuttx/arch/sh/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/sh/src/common/up_arch.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c index 95b87af6fe..cfd7854dff 100644 --- a/nuttx/arch/sh/src/common/up_assert.c +++ b/nuttx/arch/sh/src/common/up_assert.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_assert.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_blocktask.c b/nuttx/arch/sh/src/common/up_blocktask.c index dc8c1a1fa7..0a53b6633e 100644 --- a/nuttx/arch/sh/src/common/up_blocktask.c +++ b/nuttx/arch/sh/src/common/up_blocktask.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_blocktask.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_createstack.c b/nuttx/arch/sh/src/common/up_createstack.c index 37346b84b3..f80e4f7c00 100644 --- a/nuttx/arch/sh/src/common/up_createstack.c +++ b/nuttx/arch/sh/src/common/up_createstack.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_createstack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c index 0ec82b7d9d..717196682b 100644 --- a/nuttx/arch/sh/src/common/up_doirq.c +++ b/nuttx/arch/sh/src/common/up_doirq.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_doirq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_exit.c b/nuttx/arch/sh/src/common/up_exit.c index fc1991db13..84a44a7057 100644 --- a/nuttx/arch/sh/src/common/up_exit.c +++ b/nuttx/arch/sh/src/common/up_exit.c @@ -2,7 +2,7 @@ * common/up_exit.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_idle.c b/nuttx/arch/sh/src/common/up_idle.c index f95f019aec..71c4ff1d15 100644 --- a/nuttx/arch/sh/src/common/up_idle.c +++ b/nuttx/arch/sh/src/common/up_idle.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_idle.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_interruptcontext.c b/nuttx/arch/sh/src/common/up_interruptcontext.c index 16b443619e..19a7997b10 100644 --- a/nuttx/arch/sh/src/common/up_interruptcontext.c +++ b/nuttx/arch/sh/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_interruptcontext.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_lowputs.c b/nuttx/arch/sh/src/common/up_lowputs.c index 54438835d0..88cc240689 100644 --- a/nuttx/arch/sh/src/common/up_lowputs.c +++ b/nuttx/arch/sh/src/common/up_lowputs.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_lowputs.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_mdelay.c b/nuttx/arch/sh/src/common/up_mdelay.c index 5d3958700c..8ea915886d 100644 --- a/nuttx/arch/sh/src/common/up_mdelay.c +++ b/nuttx/arch/sh/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_mdelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_puts.c b/nuttx/arch/sh/src/common/up_puts.c index d22b22e714..e17338039f 100644 --- a/nuttx/arch/sh/src/common/up_puts.c +++ b/nuttx/arch/sh/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_puts.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_releasepending.c b/nuttx/arch/sh/src/common/up_releasepending.c index 2f54e0249f..955febea14 100644 --- a/nuttx/arch/sh/src/common/up_releasepending.c +++ b/nuttx/arch/sh/src/common/up_releasepending.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_releasepending.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_releasestack.c b/nuttx/arch/sh/src/common/up_releasestack.c index b8c9fb8bbf..bb6739433b 100644 --- a/nuttx/arch/sh/src/common/up_releasestack.c +++ b/nuttx/arch/sh/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_releasestack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_reprioritizertr.c b/nuttx/arch/sh/src/common/up_reprioritizertr.c index 58a142563e..728cafdf30 100644 --- a/nuttx/arch/sh/src/common/up_reprioritizertr.c +++ b/nuttx/arch/sh/src/common/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_reprioritizertr.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_udelay.c b/nuttx/arch/sh/src/common/up_udelay.c index 097cbb9e65..4ec4b09488 100644 --- a/nuttx/arch/sh/src/common/up_udelay.c +++ b/nuttx/arch/sh/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_udelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_unblocktask.c b/nuttx/arch/sh/src/common/up_unblocktask.c index 6421c56194..5841f50adb 100644 --- a/nuttx/arch/sh/src/common/up_unblocktask.c +++ b/nuttx/arch/sh/src/common/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_unblocktask.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/common/up_usestack.c b/nuttx/arch/sh/src/common/up_usestack.c index 6b472b8a29..41367ce0b2 100644 --- a/nuttx/arch/sh/src/common/up_usestack.c +++ b/nuttx/arch/sh/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/sh/src/common/up_usestack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/Make.defs b/nuttx/arch/sh/src/m16c/Make.defs index 5c4b2ea8a9..6d5877b8b6 100644 --- a/nuttx/arch/sh/src/m16c/Make.defs +++ b/nuttx/arch/sh/src/m16c/Make.defs @@ -2,7 +2,7 @@ # arch/sh/src/m16c/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/chip.h b/nuttx/arch/sh/src/m16c/chip.h index 32d04b26e5..0a91d6041e 100644 --- a/nuttx/arch/sh/src/m16c/chip.h +++ b/nuttx/arch/sh/src/m16c/chip.h @@ -2,7 +2,7 @@ * arch/sh/src/m16c/chip.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_copystate.c b/nuttx/arch/sh/src/m16c/m16c_copystate.c index 3c1748549b..5ba40e294e 100644 --- a/nuttx/arch/sh/src/m16c/m16c_copystate.c +++ b/nuttx/arch/sh/src/m16c/m16c_copystate.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/up_copystate.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c index eeae392d4f..438ff21d2b 100755 --- a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c +++ b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_assert.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_initialstate.c b/nuttx/arch/sh/src/m16c/m16c_initialstate.c index deb6dd304f..f667cf5572 100644 --- a/nuttx/arch/sh/src/m16c/m16c_initialstate.c +++ b/nuttx/arch/sh/src/m16c/m16c_initialstate.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_initialstate.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_irq.c b/nuttx/arch/sh/src/m16c/m16c_irq.c index 5cfb43e8dc..b62f55b547 100644 --- a/nuttx/arch/sh/src/m16c/m16c_irq.c +++ b/nuttx/arch/sh/src/m16c/m16c_irq.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_irq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_lowputc.c b/nuttx/arch/sh/src/m16c/m16c_lowputc.c index 4651e617ed..a473351f3f 100644 --- a/nuttx/arch/sh/src/m16c/m16c_lowputc.c +++ b/nuttx/arch/sh/src/m16c/m16c_lowputc.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_lowputc.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c b/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c index d921fca01e..0dc33568d2 100644 --- a/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c +++ b/nuttx/arch/sh/src/m16c/m16c_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_schedulesigaction.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c index 848249721a..958ff56af6 100644 --- a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c +++ b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_sigdeliver.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_timer.h b/nuttx/arch/sh/src/m16c/m16c_timer.h index 22cc316828..a3d0b0377f 100644 --- a/nuttx/arch/sh/src/m16c/m16c_timer.h +++ b/nuttx/arch/sh/src/m16c/m16c_timer.h @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_timer.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_timerisr.c b/nuttx/arch/sh/src/m16c/m16c_timerisr.c index 4a7493cd6d..ee61d76019 100644 --- a/nuttx/arch/sh/src/m16c/m16c_timerisr.c +++ b/nuttx/arch/sh/src/m16c/m16c_timerisr.c @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_uart.h b/nuttx/arch/sh/src/m16c/m16c_uart.h index 38f41ac28a..4996d97d3d 100644 --- a/nuttx/arch/sh/src/m16c/m16c_uart.h +++ b/nuttx/arch/sh/src/m16c/m16c_uart.h @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_uart.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/m16c/m16c_vectors.S b/nuttx/arch/sh/src/m16c/m16c_vectors.S index a07b2ab015..8a99148e49 100644 --- a/nuttx/arch/sh/src/m16c/m16c_vectors.S +++ b/nuttx/arch/sh/src/m16c/m16c_vectors.S @@ -2,7 +2,7 @@ * arch/sh/src/m16c/m16c_vectors.S * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/Make.defs b/nuttx/arch/sh/src/sh1/Make.defs index aaa6bebe08..d75fdf70d7 100644 --- a/nuttx/arch/sh/src/sh1/Make.defs +++ b/nuttx/arch/sh/src/sh1/Make.defs @@ -2,7 +2,7 @@ # arch/sh/src/sh1/Make.defs # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/chip.h b/nuttx/arch/sh/src/sh1/chip.h index e907bbd421..b679fe8661 100644 --- a/nuttx/arch/sh/src/sh1/chip.h +++ b/nuttx/arch/sh/src/sh1/chip.h @@ -2,7 +2,7 @@ * arch/sh/src/sh1/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_703x.h b/nuttx/arch/sh/src/sh1/sh1_703x.h index b79bbb0395..92fcd92bf6 100644 --- a/nuttx/arch/sh/src/sh1/sh1_703x.h +++ b/nuttx/arch/sh/src/sh1/sh1_703x.h @@ -1,475 +1,475 @@ -/************************************************************************************ - * arch/sh/src/sh1/sh1_703x.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_SH_SRC_SH1_703X_H -#define __ARCH_SH_SRC_SH1_703X_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Memory-mapped register addresses *************************************************/ - -/* Serial Communications interface (SCI) */ - -#define SH1_SCI0_BASE (0x05fffec0) -#define SH1_SCI1_BASE (0x05fffec8) - -#define SH1_SCI_SMR_OFFSET (0) /* Serial Mode Register (8-bits wide) */ -#define SH1_SCI_BRR_OFFSET (1) /* Bit Rate Register (8-bits wide) */ -#define SH1_SCI_SCR_OFFSET (2) /* Serial Control Register (8-bits wide) */ -#define SH1_SCI_TDR_OFFSET (3) /* Transmit Data Register (8-bits wide) */ -#define SH1_SCI_SSR_OFFSET (4) /* Serial Status Register (8-bits wide) */ -#define SH1_SCI_RDR_OFFSET (5) /* Receive Data Register (8-bits wide) */ - -#define SH1_SCI0_SMR (SH1_SCI0_BASE+SH1_SCI_SMR_OFFSET) -#define SH1_SCI0_BRR (SH1_SCI0_BASE+SH1_SCI_BRR_OFFSET) -#define SH1_SCI0_SCR (SH1_SCI0_BASE+SH1_SCI_SCR_OFFSET) -#define SH1_SCI0_TDR (SH1_SCI0_BASE+SH1_SCI_TDR_OFFSET) -#define SH1_SCI0_SSR (SH1_SCI0_BASE+SH1_SCI_SSR_OFFSET) -#define SH1_SCI0_RDR (SH1_SCI0_BASE+SH1_SCI_RDR_OFFSET) - -#define SH1_SCI1_SMR (SH1_SCI1_BASE+SH1_SCI_SMR_OFFSET) -#define SH1_SCI1_BRR (SH1_SCI1_BASE+SH1_SCI_BRR_OFFSET) -#define SH1_SCI1_SCR (SH1_SCI1_BASE+SH1_SCI_SCR_OFFSET) -#define SH1_SCI1_TDR (SH1_SCI1_BASE+SH1_SCI_TDR_OFFSET) -#define SH1_SCI1_SSR (SH1_SCI1_BASE+SH1_SCI_SSR_OFFSET) -#define SH1_SCI1_RDR (SH1_SCI1_BASE+SH1_SCI_RDR_OFFSET) - -/* A/D */ - -#define SH1_AD_ADDRA (0x05fffee0) /* 16-bits wide */ -#define SH1_AD_DRAH (0x05fffee0) /* 8-bits wide */ -#define SH1_AD_DRAL (0x05fffee1) /* 8-bits wide */ -#define SH1_AD_DRB (0x05fffee2) /* 16-bits wide */ -#define SH1_AD_DRBH (0x05fffee2) /* 8-bits wide */ -#define SH1_AD_DRBL (0x05fffee3) /* 8-bits wide */ -#define SH1_AD_DRC (0x05fffee4) /* 16-bits wide */ -#define SH1_AD_DRCH (0x05fffee4) /* 8-bits wide */ -#define SH1_AD_DRCL (0x05fffee5) /* 8-bits wide */ -#define SH1_AD_DRD (0x05fffee6) /* 16-bits wide */ -#define SH1_AD_DRDH (0x05fffee6) /* 8-bits wide */ -#define SH1_AD_DRDL (0x05fffee7) /* 8-bits wide */ -#define SH1_AD_CSR (0x05fffee8) /* 8-bits wide */ -#define SH1_AD_CR (0x05fffee9) /* 8-bits wide */ - -/* Integrated Timer/Pulse Unit (ITU) */ - -/* ITU shared */ - -#define SH1_ITU_TSTR (0x05ffff00) /* 8-bits wide */ -#define SH1_ITU_TSNC (0x05ffff01) /* 16-bits wide */ -#define SH1_ITU_TMDR (0x05ffff02) /* 16-bits wide */ -#define SH1_ITU_TFCR (0x05ffff03) /* 16-bits wide */ - -/* ITU channel 0 */ - -#define SH1_ITU0_TCR (0x05ffff04) /* 8-bits wide */ -#define SH1_ITU0_TIOR (0x05ffff05) /* 8-bits wide */ -#define SH1_ITU0_TIER (0x05ffff06) /* 8-bits wide */ -#define SH1_ITU0_TSR (0x05ffff07) /* 8-bits wide */ -#define SH1_ITU0_TCNT (0x05ffff08) /* 16-bits wide */ -#define SH1_ITU0_GRA (0x05ffff0a) /* 16-bits wide */ -#define SH1_ITU0_GRB (0x05ffff0c) /* 16-bits wide */ - -/* ITU channel 1 */ - -#define SH1_ITU1_TCR (0x05ffff0e) /* 8-bits wide */ -#define SH1_ITU1_TIOR (0x05ffff0f) /* 8-bits wide */ -#define SH1_ITU1_TIER (0x05ffff10) /* 8-bits wide */ -#define SH1_ITU1_TSR (0x05ffff11) /* 8-bits wide */ -#define SH1_ITU1_TCNT (0x05ffff12) /* 16-bits wide */ -#define SH1_ITU1_GRA (0x05ffff14) /* 16-bits wide */ -#define SH1_ITU1_GRB (0x05ffff16) /* 16-bits wide */ - -/* ITU channel 2 */ - -#define SH1_ITU2_TCR (0x05ffff18) /* 8-bits wide */ -#define SH1_ITU2_TIOR (0x05ffff19) /* 8-bits wide */ -#define SH1_ITU2_TIER (0x05ffff1a) /* 8-bits wide */ -#define SH1_ITU2_TSR (0x05ffff1b) /* 8-bits wide */ -#define SH1_ITU2_TCNT (0x05ffff1c) /* 16-bits wide */ -#define SH1_ITU2_GRA (0x05ffff1e) /* 16-bits wide */ -#define SH1_ITU2_GRB (0x05ffff20) /* 16-bits wide */ - -/* ITU channel 3 */ - -#define SH1_ITU3_TCR (0x05ffff22) /* 8-bits wide */ -#define SH1_ITU3_TIOR (0x05ffff23) /* 8-bits wide */ -#define SH1_ITU3_TIER (0x05ffff24) /* 8-bits wide */ -#define SH1_ITU3_TSR (0x05ffff25) /* 8-bits wide */ -#define SH1_ITU3_TCNT (0x05ffff26) /* 16-bits wide */ -#define SH1_ITU3_GRA (0x05ffff28) /* 16-bits wide */ -#define SH1_ITU3_GRB (0x05ffff2a) /* 16-bits wide */ -#define SH1_ITU3_BRA (0x05ffff2c) /* 16-bits wide */ -#define SH1_ITU3_BRB3 (0x05ffff2e) /* 16-bits wide */ - -/* ITU channels 0-4 shared */ - -#define SH1_ITU_TOCR (0x05ffff31) /* 8-bits wide */ - -/* ITU channel 4 */ - -#define SH1_ITU4_TCR (0x05ffff32) /* 8-bits wide */ -#define SH1_ITU4_TIOR (0x05ffff33) /* 8-bits wide */ -#define SH1_ITU4_TIER (0x05ffff34) /* 8-bits wide */ -#define SH1_ITU4_TSR (0x05ffff35) /* 8-bits wide */ -#define SH1_ITU4_TCNT (0x05ffff36) /* 16-bits wide */ -#define SH1_ITU4_GRA (0x05ffff38) /* 16-bits wide */ -#define SH1_ITU4_GRB (0x05ffff3a) /* 16-bits wide */ -#define SH1_ITU4_BRA (0x05ffff3c) /* 16-bits wide */ -#define SH1_ITU4_BRB (0x05ffff3e) /* 16-bits wide */ - -/* DMA controller (DMAC) */ - -/* DMAC channels 0-3 shared */ - -#define SH1_DMAOR (0x05ffff48) /* 16-bits wide */ - -/* DMAC channel 0 */ - -#define SH1_DMA0_SAR0 (0x05ffff40) /* 32-bits wide */ -#define SH1_DMA0_DAR0 (0x05ffff44) /* 32-bits wide */ -#define SH1_DMA0_TCR0 (0x05ffff4a) /* 16-bits wide */ -#define SH1_DMA0_CHCR0 (0x05ffff4e) /* 16-bits wide */ - -/* DMAC channel 1 */ - -#define SH1_DMA1_SAR (0x05ffff50) /* 32-bits wide */ -#define SH1_DMA1_DAR (0x05ffff54) /* 32-bits wide */ -#define SH1_DMA1_TCR (0x05fffF5a) /* 16-bits wide */ -#define SH1_DMA1_CHCR (0x05ffff5e) /* 16-bits wide */ - -/* DMAC channel 2 */ - -#define SH1_DMA2_SAR (0x05ffff60) /* 32-bits wide */ -#define SH1_DMA2_DAR (0x05ffff64) /* 32-bits wide */ -#define SH1_DMA2_TCR (0x05fffF6a) /* 16-bits wide */ -#define SH1_DMA2_CHCR (0x05ffff6e) /* 16-bits wide */ - -/* DMAC channel 3 */ - -#define SH1_DMA3_SAR (0x05ffff70) /* 32-bits wide */ -#define SH1_DMA3_DAR (0x05ffff74) /* 32-bits wide */ -#define SH1_DMA3_TCR (0x05fffF7a) /* 16-bits wide */ -#define SH1_DMA3_CHCR (0x05ffff7e) /* 16-bits wide */ - -/* Interrupt Controller (INTC) */ - -#define SH1_INTC_IPRA (0x05ffff84) /* Interrupt priority register A (16-bits wide) */ -#define SH1_INTC_IPRB (0x05ffff86) /* Interrupt priority register B (16-bits wide) */ -#define SH1_INTC_IPRC (0x05ffff88) /* Interrupt priority register C (16-bits wide) */ -#define SH1_INTC_IPRD (0x05ffff8a) /* Interrupt priority register D (16-bits wide) */ -#define SH1_INTC_IPRE (0x05ffff8c) /* Interrupt priority register E (16-bits wide) */ -#define SH1_INTC_ICR (0x05ffff8e) /* Interrupt control register (16-bits wide) */ - -/* User Break Controller (UBC) */ - -#define SH1_UBC_BARH (0x05ffff90) /* 16-bits wide */ -#define SH1_UBC_BARL (0x05ffff92) /* 16-bits wide */ -#define SH1_UBC_BAMRH (0x05ffff94) /* 16-bits wide */ -#define SH1_UBC_BAMRL (0x05ffff96) /* 16-bits wide */ -#define SH1_UBC_BBR (0x05ffff98) /* 16-bits wide */ - -/* Bus State Controller (BSC) */ - -#define SH1_BSC_BCR (0x05ffffa0) /* 16-bits wide */ -#define SH1_BSC_WCR1 (0x05ffffa2) /* 16-bits wide */ -#define SH1_BSC_WCR2 (0x05ffffa4) /* 16-bits wide */ -#define SH1_BSC_WCR3 (0x05ffffa6) /* 16-bits wide */ -#define SH1_BSC_DCR (0x05ffffa8) /* 16-bits wide */ -#define SH1_BSC_PCR (0x05ffffaa) /* 16-bits wide */ -#define SH1_BSC_RCR (0x05ffffac) /* 16-bits wide */ -#define SH1_BSC_RTCSR (0x05ffffae) /* 16-bits wide */ -#define SH1_BSC_RTCNT (0x05ffffb0) /* 16-bits wide */ -#define SH1_BSC_RTCOR (0x05ffffb2) /* 16-bits wide */ - -/* Watchdog Timer (WDT) */ - -#define SH1_WDT_TCSR (0x05ffffb8) /* 8-bits wide */ -#define SH1_WDT_TCNT (0x05ffffb9) /* 8-bits wide */ -#define SH1_WDT_RSTCSR (0x05ffffbb) /* 8-bits wide */ - -/* Power down state */ - -#define SH1_PDT_SBYCR (0x05ffffbc) /* 8-bits wide */ - -/* Port A */ - -#define SH1_PORTA_DR (0x05ffffc0) /* 16-bits wide */ - -/* Port B */ - -#define SH1_PORTB_DR (0x05ffffc2) /* 16-bits wide */ - -/* Pin Function Controller (PFC) */ - -#define SH1_PFC_PAIOR (0x05ffffc4) /* Port B I/O register (16-bits wide) */ -#define SH1_PFC_PBIOR (0x05ffffc6) /* Port B I/O register (16-bits wide) */ -#define SH1_PFC_PACR1 (0x05ffffc8) /* Port A control register 1 (16-bits wide) */ -#define SH1_PFC_PACR2 (0x05ffffca) /* Port A control register 2 (16-bits wide) */ -#define SH1_PFC_PBCR1 (0x05ffffcc) /* Port B control register 1 (16-bits wide) */ -#define SH1_PFC_PBCR2 (0x05ffffce) /* Port B control register 2 )16-bits wide) */ - -/* Port C */ - -#define SH1_PORTC_DR (0x05ffffd0) /* 16-bits wide */ - -/* Pin Function Controller (PFC, cont'd) */ - -#define SH1_PFC_CASCR (0x05ffffee) /* 16-bits wide */ - -/* Timing Pattern Controller (TPC) */ - -#define SH1_TPC_TPMR (0x05fffff0) /* 16-bits wide */ -#define SH1_TPC_TPCR (0x05fffff1) /* 16-bits wide */ -#define SH1_TPC_NDERH (0x05fffff2) /* 16-bits wide */ -#define SH1_TPC_NDERL (0x05fffff3) /* 16-bits wide */ -#define SH1_TPC_NDRB0 (0x05fffff4) /* 8-bits wide */ -#define SH1_TPC_NDRA0 (0x05fffff5) /* 8-bits wide */ -#define SH1_TPC_NDRB1 (0x05fffff6) /* 8-bits wide */ -#define SH1_TPC_NDRA1 (0x05fffff7) /* 8-bits wide */ - -/* Register bit definitions *********************************************************/ - -/* Serial Communications interface (SCI) */ - -#define SH1_SCISMR_CKSMASK (0x03) /* Bit 0-1: Internal clock source */ -#define SH1_SCISMR_DIV1 (0x00) /* System clock (phi) */ -#define SH1_SCISMR_DIV4 (0x01) /* phi/4 */ -#define SH1_SCISMR_DIV16 (0x02) /* phi/16 */ -#define SH1_SCISMR_DIV64 (0x03) /* phi/64 */ -#define SH1_SCISMR_MP (0x04) /* Bit 2: Multiprocessor select */ -#define SH1_SCISMR_STOP (0x08) /* Bit 3: 0:One stop bit, 1:Two stop bits */ -#define SH1_SCISMR_OE (0x10) /* Bit 4: 0:Even parity, 1:Odd parity */ -#define SH1_SCISMR_PE (0x20) /* Bit 5: Parity enable */ -#define SH1_SCISMR_CHR (0x40) /* Bit 6: 0:8-bit data, 1:7-bit data */ -#define SH1_SCISMR_CA (0x80) /* Bit 7: 0:Asynchronous, 1:clocked synchronous */ - -#define SH1_SCISCR_CKEMASK (0x03) /* Bit 0-1: Internal clock source */ - /* Asynchronous mode: */ -#define SH1_SCISCR_AISIN (0x00) /* Internal clock, SCK pin used for input pin */ -#define SH1_SCISCR_AISOUT (0x01) /* Internal clock, SCK pin used for clock output */ -#define SH1_SCISCR_AXSIN1 (0x02) /* External clock, SCK pin used for clock input */ -#define SH1_SCISCR_AXSIN2 (0x03) /* External clock, SCK pin used for clock input */ - /* Synchronous mode: */ -#define SH1_SCISCR_SISOUT1 (0x00) /* Internal clock, SCK pin used for input pin */ -#define SH1_SCISCR_SISOUT2 (0x01) /* Internal clock, SCK pin used for clock output */ -#define SH1_SCISCR_SXSIN1 (0x02) /* External clock, SCK pin used for clock input */ -#define SH1_SCISCR_SXSIN2 (0x03) /* External clock, SCK pin used for clock input */ -#define SH1_SCISCR_TEIE (0x04) /* Bit 2: 1=Transmit end interrupt enable */ -#define SH1_SCISCR_MPIE (0x08) /* Bit 3: 1=Multiprocessor interrupt enable */ -#define SH1_SCISCR_RE (0x10) /* Bit 4: 1=Receiver enable */ -#define SH1_SCISCR_TE (0x20) /* Bit 5: 1=Transmitter enable */ -#define SH1_SCISCR_RIE (0x40) /* Bit 6: 1=Recieve-data-full interrupt enable */ -#define SH1_SCISCR_TIE (0x80) /* Bit 7: 1=Transmit-data-empty interrupt enable */ -#define SH1_SCISCR_ALLINTS (0xcc) - -#define SH1_SCISSR_MPBT (0x01) /* Bit 0: Multi-processor Bit in Transmit data */ -#define SH1_SCISSR_MPB (0x02) /* Bit 1: Multi-processor Bit in receive data */ -#define SH1_SCISSR_TEND (0x04) /* Bit 2: End of transmission */ -#define SH1_SCISSR_PER (0x08) /* Bit 3: Receive parity error */ -#define SH1_SCISSR_FER (0x10) /* Bit 4: Receive framing error */ -#define SH1_SCISSR_ORER (0x20) /* Bit 5: Receive overrun error */ -#define SH1_SCISSR_RDRF (0x40) /* Bit 6: RDR contains valid received data */ -#define SH1_SCISSR_TDRE (0x80) /* Bit 7: TDR does not contain valid transmit data */ - -/* Integrated Timer unit (ITU) */ - -#define SH1_ITUTSTR_STR0 (0x01) /* Bit 0: TCNT0 is counting */ -#define SH1_ITUTSTR_STR1 (0x02) /* Bit 1: TCNT1 is counting */ -#define SH1_ITUTSTR_STR2 (0x04) /* Bit 2: TCNT2 is counting */ -#define SH1_ITUTSTR_STR3 (0x08) /* Bit 3: TCNT3 is counting */ -#define SH1_ITUTSTR_STR4 (0x10) /* Bit 4: TCNT4 is counting */ - -#define SH1_ITUTSNC_SYNC0 (0x01) /* Bit 0: Channel 0 operates synchronously */ -#define SH1_ITUTSNC_SYNC1 (0x02) /* Bit 1: Channel 1 operates synchronously */ -#define SH1_ITUTSNC_SYNC2 (0x04) /* Bit 2: Channel 2 operates synchronously */ -#define SH1_ITUTSNC_SYNC3 (0x08) /* Bit 3: Channel 3 operates synchronously */ -#define SH1_ITUTSNC_SYNC4 (0x10) /* Bit 4: Channel 4 operates synchronously */ - -#define SH1_ITUTMDR_PWM0 (0x01) /* Bit 0: Channel 0 operated in PWM mode */ -#define SH1_ITUTMDR_PWM1 (0x02) /* Bit 1: Channel 1 operated in PWM mode */ -#define SH1_ITUTMDR_PWM2 (0x04) /* Bit 2: Channel 2 operated in PWM mode */ -#define SH1_ITUTMDR_PWM3 (0x08) /* Bit 3: Channel 3 operated in PWM mode */ -#define SH1_ITUTMDR_PWM4 (0x10) /* Bit 4: Channel 4 operated in PWM mode */ -#define SH1_ITUTMDR_FDIR (0x20) /* Bit 5: OVF set when TCNT2 overflows */ -#define SH1_ITUTMDR_MDF (0x40) /* Bit 6: Channel 2 operates in phase counting mode */ - -#define SH1_ITUTFCR_BFA3 (0x01) /* Bit 0: GRA3 & BRA3 operate in mode in channel 4 */ -#define SH1_ITUTFCR_BFB3 (0x02) /* Bit 1: GRB3 & BRB3 operate in mode in channel 4 */ -#define SH1_ITUTFCR_BFA4 (0x04) /* Bit 2: GRA4 & BRA4 operate in mode in channel 4 */ -#define SH1_ITUTFCR_BFB4 (0x08) /* Bit 3: GRB4 & BRB4 operate in mode in channel 4 */ -#define SH1_ITUTFCR_CMDMASK (0x30) /* Bit 4-5: Command */ -#define SH1_ITUTFCR_34NDEF (0x00) /* Channels 3/4 normal (default) */ -#define SH1_ITUTFCR_34NORM (0x10) /* Channels 3/4 normal */ -#define SH1_ITUTFCR_34CPWM (0x20) /* Channels 3/4 in complementary PWM mode*/ -#define SH1_ITUTFCR_34RSPWN (0x30) /* Channels 3/4 in reset-synchronized PWM mode */ - -#define SH1_ITUTOCR_OLS3 (0x01) /* Bit 0: 1=TIOCA3, A4 & B4 not inverted */ -#define SH1_ITUTOCR_OLS4 (0x02) /* Bit 1: 1=TIOCB3, XA4 & XB4 not inverted */ - -#define SH1_ITUTCR_TPSCMSK (0x07) /* Bits 0-2: Clock setup, internal/external, divider */ -#define SH1_ITUTCR_DIV1 (0x00) /* Internal clock (phi) */ -#define SH1_ITUTCR_DIV2 (0x01) /* phi / 2 */ -#define SH1_ITUTCR_DIV4 (0x02) /* phi / 4 */ -#define SH1_ITUTCR_DIV8 (0x03) /* phi / 8 */ -#define SH1_ITUTCR_TCLKA (0x04) /* External clock A (TCLKA) */ -#define SH1_ITUTCR_TCLKB (0x05) /* External clock B (TCLKB) */ -#define SH1_ITUTCR_TCLKC (0x06) /* External clock C (TCLKC) */ -#define SH1_ITUTCR_TCLKD (0x07) /* External clock D (TCLKD) */ -#define SH1_ITUTCR_CKEGMSK (0x18) /* Bits 3-4: External clock input edge selection */ -#define SH1_ITUTCR_RISING (0x00) /* Count rising edges */ -#define SH1_ITUTCR_FALLING (0x08) /* Count falling edges */ -#define SH1_ITUTCR_BOTH (0x10) /* Count both */ -#define SH1_ITUTCR_CCLRMSK (0x60) /* Bits 5-6: TCNT clear controls */ -#define SH1_ITUTCR_NCLR (0x00) /* TCNT not cleared */ -#define SH1_ITUTCR_CGRA (0x20) /* TCNT cleared by GRA */ -#define SH1_ITUTCR_CGRB (0x40) /* TCNT cleared by GRB */ -#define SH1_ITUTCR_CSYNC (0x60) /* Synchronized clear */ - -#define SH1_ITUTIOR_IOAMSK (0x07) /* Bits 0-3: GRA function */ -#define SH1_ITUTIOR_OCGRAD (0x00) /* GRA output comparator, disabled */ -#define SH1_ITUTIOR_OCGRA0 (0x01) /* GRA output comparator, 0 output at match */ -#define SH1_ITUTIOR_OCGRA1 (0x02) /* GRA output comparator, 1 output at match */ -#define SH1_ITUTIOR_OCATOG (0x03) /* GRA output comparator, output toggles at match */ -#define SH1_ITUTIOR_ICGRAR (0x04) /* GRA input capture, rising edge */ -#define SH1_ITUTIOR_ICGRAF (0x05) /* GRA input capture, falling edge */ -#define SH1_ITUTIOR_ICGRAB (0x06) /* GRA input capture, both edges */ -#define SH1_ITUTIOR_IOBMSK (0x70) /* Bits 4-6: GRB function */ -#define SH1_ITUTIOR_OCGRBD (0x00) /* GRB output comparator, disabled */ -#define SH1_ITUTIOR_OCGRB0 (0x10) /* GRB output comparator, 0 output at match */ -#define SH1_ITUTIOR_OCGRB1 (0x20) /* GRB output comparator, 1 output at match */ -#define SH1_ITUTIOR_OCBTOG (0x30) /* GRB output comparator, output toggles at match */ -#define SH1_ITUTIOR_ICGRBR (0x40) /* GRB input capture, rising edge */ -#define SH1_ITUTIOR_ICGRBF (0x50) /* GRB input capture, falling edge */ -#define SH1_ITUTIOR_ICGRBB (0x60) /* GRB input capture, both edges */ - -#define SH1_ITUTSR_IMFA (0x01) /* Bit 0: 0=Clearing condition, 1=setting confition */ -#define SH1_ITUTSR_IMFB (0x02) /* Bit 1: 0=Clearing condition, 1=setting confition */ -#define SH1_ITUTSR_OVF (0x04) /* Bit 2: 0=Clearing condition, 1=setting confition */ - -#define SH1_ITUTIER_IMIEA (0x01) /* Bit 0: Enables interrupt request from IMFA */ -#define SH1_ITUTIER_IMIEB (0x02) /* Bit 1: Enables interrupt request from IMFB */ -#define SH1_ITUTIER_OVIE (0x04) /* Bit 2: Enables interrupt request from OVR */ - -/* Interrupt Controller (INTC) */ - -#define SH1_IPRA_IRQ3MASK (0x000f) /* Bits 0-3: IRQ3 */ -#define SH1_IPRA_IRQ3SHIFT (0) -#define SH1_IPRA_IRQ2MASK (0x00f0) /* Bits 4-7: IRQ2 */ -#define SH1_IPRA_IRQ2SHIFT (4) -#define SH1_IPRA_IRQ1MASK (0x0f00) /* Bits 8-11: IRQ1 */ -#define SH1_IPRA_IRQ1SHIFT (8) -#define SH1_IPRA_IRQ0MASK (0xf000) /* Bits 12-15: IRQ0 */ -#define SH1_IPRA_IRQ0SHIFT (12) - -#define SH1_IPRB_IRQ7MASK (0x000f) /* Bits 0-3: IRQ7 */ -#define SH1_IPRB_IRQ7SHIFT (0) -#define SH1_IPRB_IRQ6MASK (0x00f0) /* Bits 4-7: IRQ6 */ -#define SH1_IPRB_IRQ6SHIFT (4) -#define SH1_IPRB_IRQ5MASK (0x0f00) /* Bits 8-11: IRQ5 */ -#define SH1_IPRB_IRQ5SHIFT (8) -#define SH1_IPRB_IRQ4MASK (0xf000) /* Bits 12-15: IRQ4 */ -#define SH1_IPRB_IRQ4SHIFT (12) - -#define SH1_IPRC_ITU1MASK (0x000f) /* Bits 0-3: ITU1 */ -#define SH1_IPRC_ITU1SHIFT (0) -#define SH1_IPRC_ITU0MASK (0x00f0) /* Bits 4-7: ITU0 */ -#define SH1_IPRC_ITU0SHIFT (4) -#define SH1_IPRC_DM23MASK (0x0f00) /* Bits 8-11: DMAC2,3 */ -#define SH1_IPRC_DM23SHIFT (8) -#define SH1_IPRC_DM01MASK (0xf000) /* Bits 12-15: DMAC0,1 */ -#define SH1_IPRC_DM01SHIFT (12) - -#define SH1_IPRD_SCI0MASK (0x000f) /* Bits 0-3: SCI0 */ -#define SH1_IPRD_SCI0SHIFT (0) -#define SH1_IPRD_ITU4MASK (0x00f0) /* Bits 4-7: ITU4 */ -#define SH1_IPRD_ITU4SHIFT (4) -#define SH1_IPRD_ITU3MASK (0x0f00) /* Bits 8-11: ITU3 */ -#define SH1_IPRD_ITU3SHIFT (8) -#define SH1_IPRD_ITU2MASK (0xf000) /* Bits 12-15: ITU2 */ -#define SH1_IPRD_ITU2SHIFT (12) - -#define SH1_IPRE_WDRFMASK (0x00f0) /* Bits 4-7: WDT, REF */ -#define SH1_IPRE_WDRFSHIFT (4) -#define SH1_IPRE_PRADMASK (0x0f00) /* Bits 8-11: PRT, A/D */ -#define SH1_IPRE_PRADSHIFT (8) -#define SH1_IPRE_SCI1MASK (0xf000) /* Bits 12-15: SCI1 */ -#define SH1_IPRE_SCI1SHIFT (12) - -#define SH1_ICR_IRQ7S (0x0001) /* Bits 0: Interrupt on falling edge of IRQ7 input */ -#define SH1_ICR_IRQ6S (0x0002) /* Bits 1: Interrupt on falling edge of IRQ6 input */ -#define SH1_ICR_IRQ5S (0x0004) /* Bits 2: Interrupt on falling edge of IRQ5 input */ -#define SH1_ICR_IRQ4S (0x0008) /* Bits 3: Interrupt on falling edge of IRQ4 input */ -#define SH1_ICR_IRQ3S (0x0010) /* Bits 4: Interrupt on falling edge of IRQ3 input */ -#define SH1_ICR_IRQ2S (0x0020) /* Bits 5: Interrupt on falling edge of IRQ2 input */ -#define SH1_ICR_IRQ1S (0x0040) /* Bits 6: Interrupt on falling edge of IRQ1 input */ -#define SH1_ICR_IRQ0S (0x0080) /* Bits 7: Interrupt on falling edge of IRQ0 input */ -#define SH1_ICR_NMIE (0x0100) /* Bits 8: Interupt on rising edge of NMI input */ -#define SH1_ICR_NMIL (0x8000) /* Bits 15: NMI input level high */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_SH_SRC_SH1_703X_H */ - - - - - - - - - - - - - +/************************************************************************************ + * arch/sh/src/sh1/sh1_703x.h + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_SH_SRC_SH1_703X_H +#define __ARCH_SH_SRC_SH1_703X_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Memory-mapped register addresses *************************************************/ + +/* Serial Communications interface (SCI) */ + +#define SH1_SCI0_BASE (0x05fffec0) +#define SH1_SCI1_BASE (0x05fffec8) + +#define SH1_SCI_SMR_OFFSET (0) /* Serial Mode Register (8-bits wide) */ +#define SH1_SCI_BRR_OFFSET (1) /* Bit Rate Register (8-bits wide) */ +#define SH1_SCI_SCR_OFFSET (2) /* Serial Control Register (8-bits wide) */ +#define SH1_SCI_TDR_OFFSET (3) /* Transmit Data Register (8-bits wide) */ +#define SH1_SCI_SSR_OFFSET (4) /* Serial Status Register (8-bits wide) */ +#define SH1_SCI_RDR_OFFSET (5) /* Receive Data Register (8-bits wide) */ + +#define SH1_SCI0_SMR (SH1_SCI0_BASE+SH1_SCI_SMR_OFFSET) +#define SH1_SCI0_BRR (SH1_SCI0_BASE+SH1_SCI_BRR_OFFSET) +#define SH1_SCI0_SCR (SH1_SCI0_BASE+SH1_SCI_SCR_OFFSET) +#define SH1_SCI0_TDR (SH1_SCI0_BASE+SH1_SCI_TDR_OFFSET) +#define SH1_SCI0_SSR (SH1_SCI0_BASE+SH1_SCI_SSR_OFFSET) +#define SH1_SCI0_RDR (SH1_SCI0_BASE+SH1_SCI_RDR_OFFSET) + +#define SH1_SCI1_SMR (SH1_SCI1_BASE+SH1_SCI_SMR_OFFSET) +#define SH1_SCI1_BRR (SH1_SCI1_BASE+SH1_SCI_BRR_OFFSET) +#define SH1_SCI1_SCR (SH1_SCI1_BASE+SH1_SCI_SCR_OFFSET) +#define SH1_SCI1_TDR (SH1_SCI1_BASE+SH1_SCI_TDR_OFFSET) +#define SH1_SCI1_SSR (SH1_SCI1_BASE+SH1_SCI_SSR_OFFSET) +#define SH1_SCI1_RDR (SH1_SCI1_BASE+SH1_SCI_RDR_OFFSET) + +/* A/D */ + +#define SH1_AD_ADDRA (0x05fffee0) /* 16-bits wide */ +#define SH1_AD_DRAH (0x05fffee0) /* 8-bits wide */ +#define SH1_AD_DRAL (0x05fffee1) /* 8-bits wide */ +#define SH1_AD_DRB (0x05fffee2) /* 16-bits wide */ +#define SH1_AD_DRBH (0x05fffee2) /* 8-bits wide */ +#define SH1_AD_DRBL (0x05fffee3) /* 8-bits wide */ +#define SH1_AD_DRC (0x05fffee4) /* 16-bits wide */ +#define SH1_AD_DRCH (0x05fffee4) /* 8-bits wide */ +#define SH1_AD_DRCL (0x05fffee5) /* 8-bits wide */ +#define SH1_AD_DRD (0x05fffee6) /* 16-bits wide */ +#define SH1_AD_DRDH (0x05fffee6) /* 8-bits wide */ +#define SH1_AD_DRDL (0x05fffee7) /* 8-bits wide */ +#define SH1_AD_CSR (0x05fffee8) /* 8-bits wide */ +#define SH1_AD_CR (0x05fffee9) /* 8-bits wide */ + +/* Integrated Timer/Pulse Unit (ITU) */ + +/* ITU shared */ + +#define SH1_ITU_TSTR (0x05ffff00) /* 8-bits wide */ +#define SH1_ITU_TSNC (0x05ffff01) /* 16-bits wide */ +#define SH1_ITU_TMDR (0x05ffff02) /* 16-bits wide */ +#define SH1_ITU_TFCR (0x05ffff03) /* 16-bits wide */ + +/* ITU channel 0 */ + +#define SH1_ITU0_TCR (0x05ffff04) /* 8-bits wide */ +#define SH1_ITU0_TIOR (0x05ffff05) /* 8-bits wide */ +#define SH1_ITU0_TIER (0x05ffff06) /* 8-bits wide */ +#define SH1_ITU0_TSR (0x05ffff07) /* 8-bits wide */ +#define SH1_ITU0_TCNT (0x05ffff08) /* 16-bits wide */ +#define SH1_ITU0_GRA (0x05ffff0a) /* 16-bits wide */ +#define SH1_ITU0_GRB (0x05ffff0c) /* 16-bits wide */ + +/* ITU channel 1 */ + +#define SH1_ITU1_TCR (0x05ffff0e) /* 8-bits wide */ +#define SH1_ITU1_TIOR (0x05ffff0f) /* 8-bits wide */ +#define SH1_ITU1_TIER (0x05ffff10) /* 8-bits wide */ +#define SH1_ITU1_TSR (0x05ffff11) /* 8-bits wide */ +#define SH1_ITU1_TCNT (0x05ffff12) /* 16-bits wide */ +#define SH1_ITU1_GRA (0x05ffff14) /* 16-bits wide */ +#define SH1_ITU1_GRB (0x05ffff16) /* 16-bits wide */ + +/* ITU channel 2 */ + +#define SH1_ITU2_TCR (0x05ffff18) /* 8-bits wide */ +#define SH1_ITU2_TIOR (0x05ffff19) /* 8-bits wide */ +#define SH1_ITU2_TIER (0x05ffff1a) /* 8-bits wide */ +#define SH1_ITU2_TSR (0x05ffff1b) /* 8-bits wide */ +#define SH1_ITU2_TCNT (0x05ffff1c) /* 16-bits wide */ +#define SH1_ITU2_GRA (0x05ffff1e) /* 16-bits wide */ +#define SH1_ITU2_GRB (0x05ffff20) /* 16-bits wide */ + +/* ITU channel 3 */ + +#define SH1_ITU3_TCR (0x05ffff22) /* 8-bits wide */ +#define SH1_ITU3_TIOR (0x05ffff23) /* 8-bits wide */ +#define SH1_ITU3_TIER (0x05ffff24) /* 8-bits wide */ +#define SH1_ITU3_TSR (0x05ffff25) /* 8-bits wide */ +#define SH1_ITU3_TCNT (0x05ffff26) /* 16-bits wide */ +#define SH1_ITU3_GRA (0x05ffff28) /* 16-bits wide */ +#define SH1_ITU3_GRB (0x05ffff2a) /* 16-bits wide */ +#define SH1_ITU3_BRA (0x05ffff2c) /* 16-bits wide */ +#define SH1_ITU3_BRB3 (0x05ffff2e) /* 16-bits wide */ + +/* ITU channels 0-4 shared */ + +#define SH1_ITU_TOCR (0x05ffff31) /* 8-bits wide */ + +/* ITU channel 4 */ + +#define SH1_ITU4_TCR (0x05ffff32) /* 8-bits wide */ +#define SH1_ITU4_TIOR (0x05ffff33) /* 8-bits wide */ +#define SH1_ITU4_TIER (0x05ffff34) /* 8-bits wide */ +#define SH1_ITU4_TSR (0x05ffff35) /* 8-bits wide */ +#define SH1_ITU4_TCNT (0x05ffff36) /* 16-bits wide */ +#define SH1_ITU4_GRA (0x05ffff38) /* 16-bits wide */ +#define SH1_ITU4_GRB (0x05ffff3a) /* 16-bits wide */ +#define SH1_ITU4_BRA (0x05ffff3c) /* 16-bits wide */ +#define SH1_ITU4_BRB (0x05ffff3e) /* 16-bits wide */ + +/* DMA controller (DMAC) */ + +/* DMAC channels 0-3 shared */ + +#define SH1_DMAOR (0x05ffff48) /* 16-bits wide */ + +/* DMAC channel 0 */ + +#define SH1_DMA0_SAR0 (0x05ffff40) /* 32-bits wide */ +#define SH1_DMA0_DAR0 (0x05ffff44) /* 32-bits wide */ +#define SH1_DMA0_TCR0 (0x05ffff4a) /* 16-bits wide */ +#define SH1_DMA0_CHCR0 (0x05ffff4e) /* 16-bits wide */ + +/* DMAC channel 1 */ + +#define SH1_DMA1_SAR (0x05ffff50) /* 32-bits wide */ +#define SH1_DMA1_DAR (0x05ffff54) /* 32-bits wide */ +#define SH1_DMA1_TCR (0x05fffF5a) /* 16-bits wide */ +#define SH1_DMA1_CHCR (0x05ffff5e) /* 16-bits wide */ + +/* DMAC channel 2 */ + +#define SH1_DMA2_SAR (0x05ffff60) /* 32-bits wide */ +#define SH1_DMA2_DAR (0x05ffff64) /* 32-bits wide */ +#define SH1_DMA2_TCR (0x05fffF6a) /* 16-bits wide */ +#define SH1_DMA2_CHCR (0x05ffff6e) /* 16-bits wide */ + +/* DMAC channel 3 */ + +#define SH1_DMA3_SAR (0x05ffff70) /* 32-bits wide */ +#define SH1_DMA3_DAR (0x05ffff74) /* 32-bits wide */ +#define SH1_DMA3_TCR (0x05fffF7a) /* 16-bits wide */ +#define SH1_DMA3_CHCR (0x05ffff7e) /* 16-bits wide */ + +/* Interrupt Controller (INTC) */ + +#define SH1_INTC_IPRA (0x05ffff84) /* Interrupt priority register A (16-bits wide) */ +#define SH1_INTC_IPRB (0x05ffff86) /* Interrupt priority register B (16-bits wide) */ +#define SH1_INTC_IPRC (0x05ffff88) /* Interrupt priority register C (16-bits wide) */ +#define SH1_INTC_IPRD (0x05ffff8a) /* Interrupt priority register D (16-bits wide) */ +#define SH1_INTC_IPRE (0x05ffff8c) /* Interrupt priority register E (16-bits wide) */ +#define SH1_INTC_ICR (0x05ffff8e) /* Interrupt control register (16-bits wide) */ + +/* User Break Controller (UBC) */ + +#define SH1_UBC_BARH (0x05ffff90) /* 16-bits wide */ +#define SH1_UBC_BARL (0x05ffff92) /* 16-bits wide */ +#define SH1_UBC_BAMRH (0x05ffff94) /* 16-bits wide */ +#define SH1_UBC_BAMRL (0x05ffff96) /* 16-bits wide */ +#define SH1_UBC_BBR (0x05ffff98) /* 16-bits wide */ + +/* Bus State Controller (BSC) */ + +#define SH1_BSC_BCR (0x05ffffa0) /* 16-bits wide */ +#define SH1_BSC_WCR1 (0x05ffffa2) /* 16-bits wide */ +#define SH1_BSC_WCR2 (0x05ffffa4) /* 16-bits wide */ +#define SH1_BSC_WCR3 (0x05ffffa6) /* 16-bits wide */ +#define SH1_BSC_DCR (0x05ffffa8) /* 16-bits wide */ +#define SH1_BSC_PCR (0x05ffffaa) /* 16-bits wide */ +#define SH1_BSC_RCR (0x05ffffac) /* 16-bits wide */ +#define SH1_BSC_RTCSR (0x05ffffae) /* 16-bits wide */ +#define SH1_BSC_RTCNT (0x05ffffb0) /* 16-bits wide */ +#define SH1_BSC_RTCOR (0x05ffffb2) /* 16-bits wide */ + +/* Watchdog Timer (WDT) */ + +#define SH1_WDT_TCSR (0x05ffffb8) /* 8-bits wide */ +#define SH1_WDT_TCNT (0x05ffffb9) /* 8-bits wide */ +#define SH1_WDT_RSTCSR (0x05ffffbb) /* 8-bits wide */ + +/* Power down state */ + +#define SH1_PDT_SBYCR (0x05ffffbc) /* 8-bits wide */ + +/* Port A */ + +#define SH1_PORTA_DR (0x05ffffc0) /* 16-bits wide */ + +/* Port B */ + +#define SH1_PORTB_DR (0x05ffffc2) /* 16-bits wide */ + +/* Pin Function Controller (PFC) */ + +#define SH1_PFC_PAIOR (0x05ffffc4) /* Port B I/O register (16-bits wide) */ +#define SH1_PFC_PBIOR (0x05ffffc6) /* Port B I/O register (16-bits wide) */ +#define SH1_PFC_PACR1 (0x05ffffc8) /* Port A control register 1 (16-bits wide) */ +#define SH1_PFC_PACR2 (0x05ffffca) /* Port A control register 2 (16-bits wide) */ +#define SH1_PFC_PBCR1 (0x05ffffcc) /* Port B control register 1 (16-bits wide) */ +#define SH1_PFC_PBCR2 (0x05ffffce) /* Port B control register 2 )16-bits wide) */ + +/* Port C */ + +#define SH1_PORTC_DR (0x05ffffd0) /* 16-bits wide */ + +/* Pin Function Controller (PFC, cont'd) */ + +#define SH1_PFC_CASCR (0x05ffffee) /* 16-bits wide */ + +/* Timing Pattern Controller (TPC) */ + +#define SH1_TPC_TPMR (0x05fffff0) /* 16-bits wide */ +#define SH1_TPC_TPCR (0x05fffff1) /* 16-bits wide */ +#define SH1_TPC_NDERH (0x05fffff2) /* 16-bits wide */ +#define SH1_TPC_NDERL (0x05fffff3) /* 16-bits wide */ +#define SH1_TPC_NDRB0 (0x05fffff4) /* 8-bits wide */ +#define SH1_TPC_NDRA0 (0x05fffff5) /* 8-bits wide */ +#define SH1_TPC_NDRB1 (0x05fffff6) /* 8-bits wide */ +#define SH1_TPC_NDRA1 (0x05fffff7) /* 8-bits wide */ + +/* Register bit definitions *********************************************************/ + +/* Serial Communications interface (SCI) */ + +#define SH1_SCISMR_CKSMASK (0x03) /* Bit 0-1: Internal clock source */ +#define SH1_SCISMR_DIV1 (0x00) /* System clock (phi) */ +#define SH1_SCISMR_DIV4 (0x01) /* phi/4 */ +#define SH1_SCISMR_DIV16 (0x02) /* phi/16 */ +#define SH1_SCISMR_DIV64 (0x03) /* phi/64 */ +#define SH1_SCISMR_MP (0x04) /* Bit 2: Multiprocessor select */ +#define SH1_SCISMR_STOP (0x08) /* Bit 3: 0:One stop bit, 1:Two stop bits */ +#define SH1_SCISMR_OE (0x10) /* Bit 4: 0:Even parity, 1:Odd parity */ +#define SH1_SCISMR_PE (0x20) /* Bit 5: Parity enable */ +#define SH1_SCISMR_CHR (0x40) /* Bit 6: 0:8-bit data, 1:7-bit data */ +#define SH1_SCISMR_CA (0x80) /* Bit 7: 0:Asynchronous, 1:clocked synchronous */ + +#define SH1_SCISCR_CKEMASK (0x03) /* Bit 0-1: Internal clock source */ + /* Asynchronous mode: */ +#define SH1_SCISCR_AISIN (0x00) /* Internal clock, SCK pin used for input pin */ +#define SH1_SCISCR_AISOUT (0x01) /* Internal clock, SCK pin used for clock output */ +#define SH1_SCISCR_AXSIN1 (0x02) /* External clock, SCK pin used for clock input */ +#define SH1_SCISCR_AXSIN2 (0x03) /* External clock, SCK pin used for clock input */ + /* Synchronous mode: */ +#define SH1_SCISCR_SISOUT1 (0x00) /* Internal clock, SCK pin used for input pin */ +#define SH1_SCISCR_SISOUT2 (0x01) /* Internal clock, SCK pin used for clock output */ +#define SH1_SCISCR_SXSIN1 (0x02) /* External clock, SCK pin used for clock input */ +#define SH1_SCISCR_SXSIN2 (0x03) /* External clock, SCK pin used for clock input */ +#define SH1_SCISCR_TEIE (0x04) /* Bit 2: 1=Transmit end interrupt enable */ +#define SH1_SCISCR_MPIE (0x08) /* Bit 3: 1=Multiprocessor interrupt enable */ +#define SH1_SCISCR_RE (0x10) /* Bit 4: 1=Receiver enable */ +#define SH1_SCISCR_TE (0x20) /* Bit 5: 1=Transmitter enable */ +#define SH1_SCISCR_RIE (0x40) /* Bit 6: 1=Recieve-data-full interrupt enable */ +#define SH1_SCISCR_TIE (0x80) /* Bit 7: 1=Transmit-data-empty interrupt enable */ +#define SH1_SCISCR_ALLINTS (0xcc) + +#define SH1_SCISSR_MPBT (0x01) /* Bit 0: Multi-processor Bit in Transmit data */ +#define SH1_SCISSR_MPB (0x02) /* Bit 1: Multi-processor Bit in receive data */ +#define SH1_SCISSR_TEND (0x04) /* Bit 2: End of transmission */ +#define SH1_SCISSR_PER (0x08) /* Bit 3: Receive parity error */ +#define SH1_SCISSR_FER (0x10) /* Bit 4: Receive framing error */ +#define SH1_SCISSR_ORER (0x20) /* Bit 5: Receive overrun error */ +#define SH1_SCISSR_RDRF (0x40) /* Bit 6: RDR contains valid received data */ +#define SH1_SCISSR_TDRE (0x80) /* Bit 7: TDR does not contain valid transmit data */ + +/* Integrated Timer unit (ITU) */ + +#define SH1_ITUTSTR_STR0 (0x01) /* Bit 0: TCNT0 is counting */ +#define SH1_ITUTSTR_STR1 (0x02) /* Bit 1: TCNT1 is counting */ +#define SH1_ITUTSTR_STR2 (0x04) /* Bit 2: TCNT2 is counting */ +#define SH1_ITUTSTR_STR3 (0x08) /* Bit 3: TCNT3 is counting */ +#define SH1_ITUTSTR_STR4 (0x10) /* Bit 4: TCNT4 is counting */ + +#define SH1_ITUTSNC_SYNC0 (0x01) /* Bit 0: Channel 0 operates synchronously */ +#define SH1_ITUTSNC_SYNC1 (0x02) /* Bit 1: Channel 1 operates synchronously */ +#define SH1_ITUTSNC_SYNC2 (0x04) /* Bit 2: Channel 2 operates synchronously */ +#define SH1_ITUTSNC_SYNC3 (0x08) /* Bit 3: Channel 3 operates synchronously */ +#define SH1_ITUTSNC_SYNC4 (0x10) /* Bit 4: Channel 4 operates synchronously */ + +#define SH1_ITUTMDR_PWM0 (0x01) /* Bit 0: Channel 0 operated in PWM mode */ +#define SH1_ITUTMDR_PWM1 (0x02) /* Bit 1: Channel 1 operated in PWM mode */ +#define SH1_ITUTMDR_PWM2 (0x04) /* Bit 2: Channel 2 operated in PWM mode */ +#define SH1_ITUTMDR_PWM3 (0x08) /* Bit 3: Channel 3 operated in PWM mode */ +#define SH1_ITUTMDR_PWM4 (0x10) /* Bit 4: Channel 4 operated in PWM mode */ +#define SH1_ITUTMDR_FDIR (0x20) /* Bit 5: OVF set when TCNT2 overflows */ +#define SH1_ITUTMDR_MDF (0x40) /* Bit 6: Channel 2 operates in phase counting mode */ + +#define SH1_ITUTFCR_BFA3 (0x01) /* Bit 0: GRA3 & BRA3 operate in mode in channel 4 */ +#define SH1_ITUTFCR_BFB3 (0x02) /* Bit 1: GRB3 & BRB3 operate in mode in channel 4 */ +#define SH1_ITUTFCR_BFA4 (0x04) /* Bit 2: GRA4 & BRA4 operate in mode in channel 4 */ +#define SH1_ITUTFCR_BFB4 (0x08) /* Bit 3: GRB4 & BRB4 operate in mode in channel 4 */ +#define SH1_ITUTFCR_CMDMASK (0x30) /* Bit 4-5: Command */ +#define SH1_ITUTFCR_34NDEF (0x00) /* Channels 3/4 normal (default) */ +#define SH1_ITUTFCR_34NORM (0x10) /* Channels 3/4 normal */ +#define SH1_ITUTFCR_34CPWM (0x20) /* Channels 3/4 in complementary PWM mode*/ +#define SH1_ITUTFCR_34RSPWN (0x30) /* Channels 3/4 in reset-synchronized PWM mode */ + +#define SH1_ITUTOCR_OLS3 (0x01) /* Bit 0: 1=TIOCA3, A4 & B4 not inverted */ +#define SH1_ITUTOCR_OLS4 (0x02) /* Bit 1: 1=TIOCB3, XA4 & XB4 not inverted */ + +#define SH1_ITUTCR_TPSCMSK (0x07) /* Bits 0-2: Clock setup, internal/external, divider */ +#define SH1_ITUTCR_DIV1 (0x00) /* Internal clock (phi) */ +#define SH1_ITUTCR_DIV2 (0x01) /* phi / 2 */ +#define SH1_ITUTCR_DIV4 (0x02) /* phi / 4 */ +#define SH1_ITUTCR_DIV8 (0x03) /* phi / 8 */ +#define SH1_ITUTCR_TCLKA (0x04) /* External clock A (TCLKA) */ +#define SH1_ITUTCR_TCLKB (0x05) /* External clock B (TCLKB) */ +#define SH1_ITUTCR_TCLKC (0x06) /* External clock C (TCLKC) */ +#define SH1_ITUTCR_TCLKD (0x07) /* External clock D (TCLKD) */ +#define SH1_ITUTCR_CKEGMSK (0x18) /* Bits 3-4: External clock input edge selection */ +#define SH1_ITUTCR_RISING (0x00) /* Count rising edges */ +#define SH1_ITUTCR_FALLING (0x08) /* Count falling edges */ +#define SH1_ITUTCR_BOTH (0x10) /* Count both */ +#define SH1_ITUTCR_CCLRMSK (0x60) /* Bits 5-6: TCNT clear controls */ +#define SH1_ITUTCR_NCLR (0x00) /* TCNT not cleared */ +#define SH1_ITUTCR_CGRA (0x20) /* TCNT cleared by GRA */ +#define SH1_ITUTCR_CGRB (0x40) /* TCNT cleared by GRB */ +#define SH1_ITUTCR_CSYNC (0x60) /* Synchronized clear */ + +#define SH1_ITUTIOR_IOAMSK (0x07) /* Bits 0-3: GRA function */ +#define SH1_ITUTIOR_OCGRAD (0x00) /* GRA output comparator, disabled */ +#define SH1_ITUTIOR_OCGRA0 (0x01) /* GRA output comparator, 0 output at match */ +#define SH1_ITUTIOR_OCGRA1 (0x02) /* GRA output comparator, 1 output at match */ +#define SH1_ITUTIOR_OCATOG (0x03) /* GRA output comparator, output toggles at match */ +#define SH1_ITUTIOR_ICGRAR (0x04) /* GRA input capture, rising edge */ +#define SH1_ITUTIOR_ICGRAF (0x05) /* GRA input capture, falling edge */ +#define SH1_ITUTIOR_ICGRAB (0x06) /* GRA input capture, both edges */ +#define SH1_ITUTIOR_IOBMSK (0x70) /* Bits 4-6: GRB function */ +#define SH1_ITUTIOR_OCGRBD (0x00) /* GRB output comparator, disabled */ +#define SH1_ITUTIOR_OCGRB0 (0x10) /* GRB output comparator, 0 output at match */ +#define SH1_ITUTIOR_OCGRB1 (0x20) /* GRB output comparator, 1 output at match */ +#define SH1_ITUTIOR_OCBTOG (0x30) /* GRB output comparator, output toggles at match */ +#define SH1_ITUTIOR_ICGRBR (0x40) /* GRB input capture, rising edge */ +#define SH1_ITUTIOR_ICGRBF (0x50) /* GRB input capture, falling edge */ +#define SH1_ITUTIOR_ICGRBB (0x60) /* GRB input capture, both edges */ + +#define SH1_ITUTSR_IMFA (0x01) /* Bit 0: 0=Clearing condition, 1=setting confition */ +#define SH1_ITUTSR_IMFB (0x02) /* Bit 1: 0=Clearing condition, 1=setting confition */ +#define SH1_ITUTSR_OVF (0x04) /* Bit 2: 0=Clearing condition, 1=setting confition */ + +#define SH1_ITUTIER_IMIEA (0x01) /* Bit 0: Enables interrupt request from IMFA */ +#define SH1_ITUTIER_IMIEB (0x02) /* Bit 1: Enables interrupt request from IMFB */ +#define SH1_ITUTIER_OVIE (0x04) /* Bit 2: Enables interrupt request from OVR */ + +/* Interrupt Controller (INTC) */ + +#define SH1_IPRA_IRQ3MASK (0x000f) /* Bits 0-3: IRQ3 */ +#define SH1_IPRA_IRQ3SHIFT (0) +#define SH1_IPRA_IRQ2MASK (0x00f0) /* Bits 4-7: IRQ2 */ +#define SH1_IPRA_IRQ2SHIFT (4) +#define SH1_IPRA_IRQ1MASK (0x0f00) /* Bits 8-11: IRQ1 */ +#define SH1_IPRA_IRQ1SHIFT (8) +#define SH1_IPRA_IRQ0MASK (0xf000) /* Bits 12-15: IRQ0 */ +#define SH1_IPRA_IRQ0SHIFT (12) + +#define SH1_IPRB_IRQ7MASK (0x000f) /* Bits 0-3: IRQ7 */ +#define SH1_IPRB_IRQ7SHIFT (0) +#define SH1_IPRB_IRQ6MASK (0x00f0) /* Bits 4-7: IRQ6 */ +#define SH1_IPRB_IRQ6SHIFT (4) +#define SH1_IPRB_IRQ5MASK (0x0f00) /* Bits 8-11: IRQ5 */ +#define SH1_IPRB_IRQ5SHIFT (8) +#define SH1_IPRB_IRQ4MASK (0xf000) /* Bits 12-15: IRQ4 */ +#define SH1_IPRB_IRQ4SHIFT (12) + +#define SH1_IPRC_ITU1MASK (0x000f) /* Bits 0-3: ITU1 */ +#define SH1_IPRC_ITU1SHIFT (0) +#define SH1_IPRC_ITU0MASK (0x00f0) /* Bits 4-7: ITU0 */ +#define SH1_IPRC_ITU0SHIFT (4) +#define SH1_IPRC_DM23MASK (0x0f00) /* Bits 8-11: DMAC2,3 */ +#define SH1_IPRC_DM23SHIFT (8) +#define SH1_IPRC_DM01MASK (0xf000) /* Bits 12-15: DMAC0,1 */ +#define SH1_IPRC_DM01SHIFT (12) + +#define SH1_IPRD_SCI0MASK (0x000f) /* Bits 0-3: SCI0 */ +#define SH1_IPRD_SCI0SHIFT (0) +#define SH1_IPRD_ITU4MASK (0x00f0) /* Bits 4-7: ITU4 */ +#define SH1_IPRD_ITU4SHIFT (4) +#define SH1_IPRD_ITU3MASK (0x0f00) /* Bits 8-11: ITU3 */ +#define SH1_IPRD_ITU3SHIFT (8) +#define SH1_IPRD_ITU2MASK (0xf000) /* Bits 12-15: ITU2 */ +#define SH1_IPRD_ITU2SHIFT (12) + +#define SH1_IPRE_WDRFMASK (0x00f0) /* Bits 4-7: WDT, REF */ +#define SH1_IPRE_WDRFSHIFT (4) +#define SH1_IPRE_PRADMASK (0x0f00) /* Bits 8-11: PRT, A/D */ +#define SH1_IPRE_PRADSHIFT (8) +#define SH1_IPRE_SCI1MASK (0xf000) /* Bits 12-15: SCI1 */ +#define SH1_IPRE_SCI1SHIFT (12) + +#define SH1_ICR_IRQ7S (0x0001) /* Bits 0: Interrupt on falling edge of IRQ7 input */ +#define SH1_ICR_IRQ6S (0x0002) /* Bits 1: Interrupt on falling edge of IRQ6 input */ +#define SH1_ICR_IRQ5S (0x0004) /* Bits 2: Interrupt on falling edge of IRQ5 input */ +#define SH1_ICR_IRQ4S (0x0008) /* Bits 3: Interrupt on falling edge of IRQ4 input */ +#define SH1_ICR_IRQ3S (0x0010) /* Bits 4: Interrupt on falling edge of IRQ3 input */ +#define SH1_ICR_IRQ2S (0x0020) /* Bits 5: Interrupt on falling edge of IRQ2 input */ +#define SH1_ICR_IRQ1S (0x0040) /* Bits 6: Interrupt on falling edge of IRQ1 input */ +#define SH1_ICR_IRQ0S (0x0080) /* Bits 7: Interrupt on falling edge of IRQ0 input */ +#define SH1_ICR_NMIE (0x0100) /* Bits 8: Interupt on rising edge of NMI input */ +#define SH1_ICR_NMIL (0x8000) /* Bits 15: NMI input level high */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_SH_SRC_SH1_703X_H */ + + + + + + + + + + + + + diff --git a/nuttx/arch/sh/src/sh1/sh1_copystate.c b/nuttx/arch/sh/src/sh1/sh1_copystate.c index 3b0863eb7e..323f96c4a1 100644 --- a/nuttx/arch/sh/src/sh1/sh1_copystate.c +++ b/nuttx/arch/sh/src/sh1/sh1_copystate.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/up_copystate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c index ddfa5e455a..296e20a45c 100755 --- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c +++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_assert.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_initialstate.c b/nuttx/arch/sh/src/sh1/sh1_initialstate.c index 94b74c3abd..c4fb11a745 100644 --- a/nuttx/arch/sh/src/sh1/sh1_initialstate.c +++ b/nuttx/arch/sh/src/sh1/sh1_initialstate.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_irq.c b/nuttx/arch/sh/src/sh1/sh1_irq.c index d76d1d94cd..7757c9ba90 100644 --- a/nuttx/arch/sh/src/sh1/sh1_irq.c +++ b/nuttx/arch/sh/src/sh1/sh1_irq.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_irq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_lowputc.c b/nuttx/arch/sh/src/sh1/sh1_lowputc.c index dd66c727b8..ed9cbb8e22 100644 --- a/nuttx/arch/sh/src/sh1/sh1_lowputc.c +++ b/nuttx/arch/sh/src/sh1/sh1_lowputc.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_lowputc.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_saveusercontext.S b/nuttx/arch/sh/src/sh1/sh1_saveusercontext.S index 1514b93992..56a43a2fbb 100644 --- a/nuttx/arch/sh/src/sh1/sh1_saveusercontext.S +++ b/nuttx/arch/sh/src/sh1/sh1_saveusercontext.S @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_saveusercontext.S * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c index 4454195d69..f0bc0af848 100644 --- a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c +++ b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_schedulesigaction.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c index 568b448e3e..2f596b6b0f 100644 --- a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c +++ b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c @@ -2,7 +2,7 @@ * common/up_sigdeliver.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_timerisr.c b/nuttx/arch/sh/src/sh1/sh1_timerisr.c index 7072c4c643..4f0f176a2b 100644 --- a/nuttx/arch/sh/src/sh1/sh1_timerisr.c +++ b/nuttx/arch/sh/src/sh1/sh1_timerisr.c @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sh/src/sh1/sh1_vector.S b/nuttx/arch/sh/src/sh1/sh1_vector.S index 9e7ef50752..1655a782dc 100644 --- a/nuttx/arch/sh/src/sh1/sh1_vector.S +++ b/nuttx/arch/sh/src/sh1/sh1_vector.S @@ -2,7 +2,7 @@ * arch/sh/src/sh1/sh1_vector.S * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/include/arch.h b/nuttx/arch/sim/include/arch.h index 03e8ae36eb..5ec8022b27 100644 --- a/nuttx/arch/sim/include/arch.h +++ b/nuttx/arch/sim/include/arch.h @@ -2,7 +2,7 @@ * arch.h * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/include/irq.h b/nuttx/arch/sim/include/irq.h index e5405f0caf..ffc325790c 100644 --- a/nuttx/arch/sim/include/irq.h +++ b/nuttx/arch/sim/include/irq.h @@ -2,7 +2,7 @@ * irq.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/include/syscall.h b/nuttx/arch/sim/include/syscall.h index 73b78def42..7ffcbf5e69 100644 --- a/nuttx/arch/sim/include/syscall.h +++ b/nuttx/arch/sim/include/syscall.h @@ -2,7 +2,7 @@ * arch/sim/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/include/types.h b/nuttx/arch/sim/include/types.h index 5b58264e6c..719944f1f5 100644 --- a/nuttx/arch/sim/include/types.h +++ b/nuttx/arch/sim/include/types.h @@ -2,7 +2,7 @@ * arch/sim/include/types.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_allocateheap.c b/nuttx/arch/sim/src/up_allocateheap.c index f02f8cbfa0..47400ec7c3 100644 --- a/nuttx/arch/sim/src/up_allocateheap.c +++ b/nuttx/arch/sim/src/up_allocateheap.c @@ -2,7 +2,7 @@ * up_allocateheap.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_blockdevice.c b/nuttx/arch/sim/src/up_blockdevice.c index f697b36cbb..edcb6f3774 100644 --- a/nuttx/arch/sim/src/up_blockdevice.c +++ b/nuttx/arch/sim/src/up_blockdevice.c @@ -2,7 +2,7 @@ * up_blockdevice.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_blocktask.c b/nuttx/arch/sim/src/up_blocktask.c index cfa9adb59e..c69c979aeb 100644 --- a/nuttx/arch/sim/src/up_blocktask.c +++ b/nuttx/arch/sim/src/up_blocktask.c @@ -2,7 +2,7 @@ * up_blocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_createstack.c b/nuttx/arch/sim/src/up_createstack.c index 03426ade2e..be8fe278b4 100644 --- a/nuttx/arch/sim/src/up_createstack.c +++ b/nuttx/arch/sim/src/up_createstack.c @@ -2,7 +2,7 @@ * arch/sim/src/up_createstack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_devconsole.c b/nuttx/arch/sim/src/up_devconsole.c index a2406f232b..bd2be0f10f 100644 --- a/nuttx/arch/sim/src/up_devconsole.c +++ b/nuttx/arch/sim/src/up_devconsole.c @@ -2,7 +2,7 @@ * up_devconsole.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_deviceimage.c b/nuttx/arch/sim/src/up_deviceimage.c index 19b7650ec7..e32f649275 100644 --- a/nuttx/arch/sim/src/up_deviceimage.c +++ b/nuttx/arch/sim/src/up_deviceimage.c @@ -2,7 +2,7 @@ * up_deviceimage.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_exit.c b/nuttx/arch/sim/src/up_exit.c index d42ab94dd4..3f82246c97 100644 --- a/nuttx/arch/sim/src/up_exit.c +++ b/nuttx/arch/sim/src/up_exit.c @@ -2,7 +2,7 @@ * up_exit.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_framebuffer.c b/nuttx/arch/sim/src/up_framebuffer.c index d8e9a452f3..35329b9d88 100644 --- a/nuttx/arch/sim/src/up_framebuffer.c +++ b/nuttx/arch/sim/src/up_framebuffer.c @@ -2,7 +2,7 @@ * arch/sim/src/up_framebuffer.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_hostusleep.c b/nuttx/arch/sim/src/up_hostusleep.c index 67eb3e2214..df65d7be5c 100644 --- a/nuttx/arch/sim/src/up_hostusleep.c +++ b/nuttx/arch/sim/src/up_hostusleep.c @@ -2,7 +2,7 @@ * arch/sim/src/up_hostusleep.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_initialstate.c b/nuttx/arch/sim/src/up_initialstate.c index 6c959589fe..6f241fc47d 100644 --- a/nuttx/arch/sim/src/up_initialstate.c +++ b/nuttx/arch/sim/src/up_initialstate.c @@ -2,7 +2,7 @@ * up_initialstate.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_interruptcontext.c b/nuttx/arch/sim/src/up_interruptcontext.c index 8c211fc477..83a17d3b6d 100644 --- a/nuttx/arch/sim/src/up_interruptcontext.c +++ b/nuttx/arch/sim/src/up_interruptcontext.c @@ -2,7 +2,7 @@ * up_interruptcontext.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_lcd.c b/nuttx/arch/sim/src/up_lcd.c index f5a1e01599..4c2031dd29 100644 --- a/nuttx/arch/sim/src/up_lcd.c +++ b/nuttx/arch/sim/src/up_lcd.c @@ -2,7 +2,7 @@ * arch/sim/src/up_lcd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_netdev.c b/nuttx/arch/sim/src/up_netdev.c index 8758facc43..e02b30ef6d 100644 --- a/nuttx/arch/sim/src/up_netdev.c +++ b/nuttx/arch/sim/src/up_netdev.c @@ -2,7 +2,7 @@ * arch/sim/src/up_tapdev.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_releasepending.c b/nuttx/arch/sim/src/up_releasepending.c index a5152ee86c..52d76bcace 100644 --- a/nuttx/arch/sim/src/up_releasepending.c +++ b/nuttx/arch/sim/src/up_releasepending.c @@ -2,7 +2,7 @@ * up_releasepending.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_releasestack.c b/nuttx/arch/sim/src/up_releasestack.c index 745345c1aa..ef09fcb2a9 100644 --- a/nuttx/arch/sim/src/up_releasestack.c +++ b/nuttx/arch/sim/src/up_releasestack.c @@ -2,7 +2,7 @@ * up_releasestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_reprioritizertr.c b/nuttx/arch/sim/src/up_reprioritizertr.c index a7ffb137dc..913d8d5f5b 100644 --- a/nuttx/arch/sim/src/up_reprioritizertr.c +++ b/nuttx/arch/sim/src/up_reprioritizertr.c @@ -2,7 +2,7 @@ * up_reprioritizertr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_romgetc.c b/nuttx/arch/sim/src/up_romgetc.c index 7218445081..9b75ecd653 100644 --- a/nuttx/arch/sim/src/up_romgetc.c +++ b/nuttx/arch/sim/src/up_romgetc.c @@ -2,7 +2,7 @@ * arch/sim/src/up_romgetc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_schedulesigaction.c b/nuttx/arch/sim/src/up_schedulesigaction.c index ca61e8ddf3..871040a949 100644 --- a/nuttx/arch/sim/src/up_schedulesigaction.c +++ b/nuttx/arch/sim/src/up_schedulesigaction.c @@ -2,7 +2,7 @@ * up_schedulesigaction.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_stdio.c b/nuttx/arch/sim/src/up_stdio.c index 7a014d4d88..b6da9cb2fc 100644 --- a/nuttx/arch/sim/src/up_stdio.c +++ b/nuttx/arch/sim/src/up_stdio.c @@ -2,7 +2,7 @@ * up_stdio.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_tapdev.c b/nuttx/arch/sim/src/up_tapdev.c index 4176258e2f..d0deea6d9b 100644 --- a/nuttx/arch/sim/src/up_tapdev.c +++ b/nuttx/arch/sim/src/up_tapdev.c @@ -2,7 +2,7 @@ * up_tapdev.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: * diff --git a/nuttx/arch/sim/src/up_touchscreen.c b/nuttx/arch/sim/src/up_touchscreen.c index a05b42c74d..cc40f50fec 100644 --- a/nuttx/arch/sim/src/up_touchscreen.c +++ b/nuttx/arch/sim/src/up_touchscreen.c @@ -2,7 +2,7 @@ * arch/sim/src/up_touchscreen.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_unblocktask.c b/nuttx/arch/sim/src/up_unblocktask.c index 684b7fb0bf..04b6455f31 100644 --- a/nuttx/arch/sim/src/up_unblocktask.c +++ b/nuttx/arch/sim/src/up_unblocktask.c @@ -2,7 +2,7 @@ * up_unblocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_usestack.c b/nuttx/arch/sim/src/up_usestack.c index 309dc2dc40..aa832ff902 100644 --- a/nuttx/arch/sim/src/up_usestack.c +++ b/nuttx/arch/sim/src/up_usestack.c @@ -2,7 +2,7 @@ * arch/sim/src/up_usestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_wpcap.c b/nuttx/arch/sim/src/up_wpcap.c index 18a6ad4aec..42e8764f80 100644 --- a/nuttx/arch/sim/src/up_wpcap.c +++ b/nuttx/arch/sim/src/up_wpcap.c @@ -2,7 +2,7 @@ * up_wcap.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: * diff --git a/nuttx/arch/sim/src/up_x11eventloop.c b/nuttx/arch/sim/src/up_x11eventloop.c index 4783880657..e2354dbeca 100644 --- a/nuttx/arch/sim/src/up_x11eventloop.c +++ b/nuttx/arch/sim/src/up_x11eventloop.c @@ -2,7 +2,7 @@ * arch/sim/src/up_x11eventloop.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/sim/src/up_x11framebuffer.c b/nuttx/arch/sim/src/up_x11framebuffer.c index 248156100c..a035e2f3a2 100644 --- a/nuttx/arch/sim/src/up_x11framebuffer.c +++ b/nuttx/arch/sim/src/up_x11framebuffer.c @@ -2,7 +2,7 @@ * arch/sim/src/up_x11framebuffer.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/arch.h b/nuttx/arch/x86/include/arch.h index 966bfbc564..b55880e4ef 100755 --- a/nuttx/arch/x86/include/arch.h +++ b/nuttx/arch/x86/include/arch.h @@ -2,7 +2,7 @@ * arch/x86/include/arch.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/arch.h b/nuttx/arch/x86/include/i486/arch.h index 077c766261..64d9d85bf2 100755 --- a/nuttx/arch/x86/include/i486/arch.h +++ b/nuttx/arch/x86/include/i486/arch.h @@ -2,7 +2,7 @@ * arch/x86/include/i486/arch.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/io.h b/nuttx/arch/x86/include/i486/io.h index ce3c37ecb7..6f170ac975 100644 --- a/nuttx/arch/x86/include/i486/io.h +++ b/nuttx/arch/x86/include/i486/io.h @@ -3,7 +3,7 @@ * arch/chip/io.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/irq.h b/nuttx/arch/x86/include/i486/irq.h index bca34b3ba9..95dc200e4a 100755 --- a/nuttx/arch/x86/include/i486/irq.h +++ b/nuttx/arch/x86/include/i486/irq.h @@ -2,7 +2,7 @@ * arch/x86/include/i486/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/limits.h b/nuttx/arch/x86/include/i486/limits.h index ae8a779d4d..c2a9a620f0 100755 --- a/nuttx/arch/x86/include/i486/limits.h +++ b/nuttx/arch/x86/include/i486/limits.h @@ -2,7 +2,7 @@ * arch/x86/include/i486/limits.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/syscall.h b/nuttx/arch/x86/include/i486/syscall.h index 7ca5f81eaf..96437b4b57 100644 --- a/nuttx/arch/x86/include/i486/syscall.h +++ b/nuttx/arch/x86/include/i486/syscall.h @@ -2,7 +2,7 @@ * arch/x86/include/i486/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/i486/types.h b/nuttx/arch/x86/include/i486/types.h index d6f25f3e0e..e83f5f4359 100755 --- a/nuttx/arch/x86/include/i486/types.h +++ b/nuttx/arch/x86/include/i486/types.h @@ -2,7 +2,7 @@ * arch/x86/include/i486/types.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/io.h b/nuttx/arch/x86/include/io.h index 4f88932c52..71225760d8 100755 --- a/nuttx/arch/x86/include/io.h +++ b/nuttx/arch/x86/include/io.h @@ -2,7 +2,7 @@ * arch/x86/include/io.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/irq.h b/nuttx/arch/x86/include/irq.h index 97c8c0f9c7..3f4c21da66 100755 --- a/nuttx/arch/x86/include/irq.h +++ b/nuttx/arch/x86/include/irq.h @@ -2,7 +2,7 @@ * arch/x86/include/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/limits.h b/nuttx/arch/x86/include/limits.h index 729504edda..9f9c620712 100755 --- a/nuttx/arch/x86/include/limits.h +++ b/nuttx/arch/x86/include/limits.h @@ -2,7 +2,7 @@ * arch/x86/include/limits.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/qemu/arch.h b/nuttx/arch/x86/include/qemu/arch.h index fc2a7278ba..097e37fc91 100755 --- a/nuttx/arch/x86/include/qemu/arch.h +++ b/nuttx/arch/x86/include/qemu/arch.h @@ -2,7 +2,7 @@ * arch/x86/include/qemu/arch.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/qemu/irq.h b/nuttx/arch/x86/include/qemu/irq.h index 23611b83c4..8161e6b83a 100755 --- a/nuttx/arch/x86/include/qemu/irq.h +++ b/nuttx/arch/x86/include/qemu/irq.h @@ -2,7 +2,7 @@ * arch/x86/include/qemu/irq.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/syscall.h b/nuttx/arch/x86/include/syscall.h index 2d3f9a8c08..a9171a6197 100644 --- a/nuttx/arch/x86/include/syscall.h +++ b/nuttx/arch/x86/include/syscall.h @@ -2,7 +2,7 @@ * arch/x86/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/include/types.h b/nuttx/arch/x86/include/types.h index 112de8525f..0a6807b028 100755 --- a/nuttx/arch/x86/include/types.h +++ b/nuttx/arch/x86/include/types.h @@ -2,7 +2,7 @@ * arch/x86/include/types.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_allocateheap.c b/nuttx/arch/x86/src/common/up_allocateheap.c index 3273d681fd..74b169df32 100644 --- a/nuttx/arch/x86/src/common/up_allocateheap.c +++ b/nuttx/arch/x86/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_allocateheap.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_arch.h b/nuttx/arch/x86/src/common/up_arch.h index 96d49d306e..9d477cd9a8 100644 --- a/nuttx/arch/x86/src/common/up_arch.h +++ b/nuttx/arch/x86/src/common/up_arch.h @@ -2,7 +2,7 @@ * arch/x86/src/common/up_arch.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c index 7767846568..be82a36169 100644 --- a/nuttx/arch/x86/src/common/up_assert.c +++ b/nuttx/arch/x86/src/common/up_assert.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_assert.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_blocktask.c b/nuttx/arch/x86/src/common/up_blocktask.c index f119311038..530147a978 100755 --- a/nuttx/arch/x86/src/common/up_blocktask.c +++ b/nuttx/arch/x86/src/common/up_blocktask.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_blocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_copystate.c b/nuttx/arch/x86/src/common/up_copystate.c index 4ae842308d..5e53e38465 100644 --- a/nuttx/arch/x86/src/common/up_copystate.c +++ b/nuttx/arch/x86/src/common/up_copystate.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_copystate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_exit.c b/nuttx/arch/x86/src/common/up_exit.c index 840464da16..e3d27b0afe 100644 --- a/nuttx/arch/x86/src/common/up_exit.c +++ b/nuttx/arch/x86/src/common/up_exit.c @@ -2,7 +2,7 @@ * common/up_exit.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_interruptcontext.c b/nuttx/arch/x86/src/common/up_interruptcontext.c index 6fbe67989d..4cf65f4e1e 100644 --- a/nuttx/arch/x86/src/common/up_interruptcontext.c +++ b/nuttx/arch/x86/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_interruptcontext.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_lowputs.c b/nuttx/arch/x86/src/common/up_lowputs.c index 46c8940ccf..b6ea96cc2c 100644 --- a/nuttx/arch/x86/src/common/up_lowputs.c +++ b/nuttx/arch/x86/src/common/up_lowputs.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_lowputs.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_mdelay.c b/nuttx/arch/x86/src/common/up_mdelay.c index 22fc78d045..e742470f23 100644 --- a/nuttx/arch/x86/src/common/up_mdelay.c +++ b/nuttx/arch/x86/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_mdelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_modifyreg16.c b/nuttx/arch/x86/src/common/up_modifyreg16.c index 9a7ae45073..144cd4797c 100644 --- a/nuttx/arch/x86/src/common/up_modifyreg16.c +++ b/nuttx/arch/x86/src/common/up_modifyreg16.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_modifyreg16.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_modifyreg32.c b/nuttx/arch/x86/src/common/up_modifyreg32.c index c2a4003358..9953f52ad6 100644 --- a/nuttx/arch/x86/src/common/up_modifyreg32.c +++ b/nuttx/arch/x86/src/common/up_modifyreg32.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_modifyreg32.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_modifyreg8.c b/nuttx/arch/x86/src/common/up_modifyreg8.c index fd4031dc55..d75b7deba5 100644 --- a/nuttx/arch/x86/src/common/up_modifyreg8.c +++ b/nuttx/arch/x86/src/common/up_modifyreg8.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_modifyreg8.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_puts.c b/nuttx/arch/x86/src/common/up_puts.c index 58420c598f..c4df9ad71a 100644 --- a/nuttx/arch/x86/src/common/up_puts.c +++ b/nuttx/arch/x86/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_puts.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_releasepending.c b/nuttx/arch/x86/src/common/up_releasepending.c index f476837da2..979e0b50f6 100755 --- a/nuttx/arch/x86/src/common/up_releasepending.c +++ b/nuttx/arch/x86/src/common/up_releasepending.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_releasepending.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_reprioritizertr.c b/nuttx/arch/x86/src/common/up_reprioritizertr.c index 5df8c26b06..ad8a748a89 100755 --- a/nuttx/arch/x86/src/common/up_reprioritizertr.c +++ b/nuttx/arch/x86/src/common/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/arm/src/arm/up_reprioritizertr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_udelay.c b/nuttx/arch/x86/src/common/up_udelay.c index 92d3b7c167..208b5be4a7 100644 --- a/nuttx/arch/x86/src/common/up_udelay.c +++ b/nuttx/arch/x86/src/common/up_udelay.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_udelay.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/common/up_unblocktask.c b/nuttx/arch/x86/src/common/up_unblocktask.c index 7dd263f1a7..3397b75e56 100755 --- a/nuttx/arch/x86/src/common/up_unblocktask.c +++ b/nuttx/arch/x86/src/common/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_unblocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/i486_utils.S b/nuttx/arch/x86/src/i486/i486_utils.S index ee89c0c68d..f405289220 100644 --- a/nuttx/arch/x86/src/i486/i486_utils.S +++ b/nuttx/arch/x86/src/i486/i486_utils.S @@ -2,7 +2,7 @@ * arch/x86/src/i486/i486_utils.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on Bran's kernel development tutorials. Rewritten for JamesM's * kernel development tutorials. diff --git a/nuttx/arch/x86/src/i486/up_createstack.c b/nuttx/arch/x86/src/i486/up_createstack.c index 842872d312..1a2f67f335 100644 --- a/nuttx/arch/x86/src/i486/up_createstack.c +++ b/nuttx/arch/x86/src/i486/up_createstack.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_createstack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_initialstate.c b/nuttx/arch/x86/src/i486/up_initialstate.c index c1bb422da1..078099bd12 100644 --- a/nuttx/arch/x86/src/i486/up_initialstate.c +++ b/nuttx/arch/x86/src/i486/up_initialstate.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_initialstate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_irq.c b/nuttx/arch/x86/src/i486/up_irq.c index 01da4962e3..3eb6d6070c 100755 --- a/nuttx/arch/x86/src/i486/up_irq.c +++ b/nuttx/arch/x86/src/i486/up_irq.c @@ -3,7 +3,7 @@ * arch/x86/src/chip/up_irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_regdump.c b/nuttx/arch/x86/src/i486/up_regdump.c index 5a5da0e70b..b7547aec4c 100644 --- a/nuttx/arch/x86/src/i486/up_regdump.c +++ b/nuttx/arch/x86/src/i486/up_regdump.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_regdump.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_releasestack.c b/nuttx/arch/x86/src/i486/up_releasestack.c index ac93688d6c..a10a001e1a 100644 --- a/nuttx/arch/x86/src/i486/up_releasestack.c +++ b/nuttx/arch/x86/src/i486/up_releasestack.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_releasestack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_savestate.c b/nuttx/arch/x86/src/i486/up_savestate.c index 1d35c62a99..ce237efac4 100644 --- a/nuttx/arch/x86/src/i486/up_savestate.c +++ b/nuttx/arch/x86/src/i486/up_savestate.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_savestate.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_schedulesigaction.c b/nuttx/arch/x86/src/i486/up_schedulesigaction.c index 7d91bb3e31..bacc126223 100644 --- a/nuttx/arch/x86/src/i486/up_schedulesigaction.c +++ b/nuttx/arch/x86/src/i486/up_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_schedulesigaction.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_sigdeliver.c b/nuttx/arch/x86/src/i486/up_sigdeliver.c index 8dbf466982..468f5bc666 100644 --- a/nuttx/arch/x86/src/i486/up_sigdeliver.c +++ b/nuttx/arch/x86/src/i486/up_sigdeliver.c @@ -2,7 +2,7 @@ * arch/x86/src/i486/up_sigdeliver.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/i486/up_syscall6.S b/nuttx/arch/x86/src/i486/up_syscall6.S index 9c6f879e39..3bcbad9ba6 100755 --- a/nuttx/arch/x86/src/i486/up_syscall6.S +++ b/nuttx/arch/x86/src/i486/up_syscall6.S @@ -1,97 +1,97 @@ -/**************************************************************************** - * arch/x86/src/i486/up_syscall6.S - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based on Bran's kernel development tutorials. Rewritten for JamesM's - * kernel development tutorials. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - - .file "up_syscall6.S" - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Globals - ****************************************************************************/ - -/**************************************************************************** - * .text - ****************************************************************************/ - - .text - -/**************************************************************************** - * Name: sys_call6 - * - * C Prototype: - * uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, - * uintptr_t parm2, uintptr_t parm3, - * uintptr_t parm4, uintptr_t parm5, - * uintptr_t parm6); - * - ****************************************************************************/ - - .global sys_call6 - .type sys_call6, %function - -sys_call6: - pushl %ebp /* Save ebx, esi, edi, and ebp */ - pushl %edi - pushl %esi - pushl %ebx - - movl 44(%esp),%ebp /* Save parm6 in ebp */ - movl 40(%esp),%edi /* Save parm5 in edi */ - movl 36(%esp),%esi /* Save parm4 in esi */ - movl 32(%esp),%edx /* Save parm3 in edx */ - movl 28(%esp),%ecx /* Save parm2 in ecx */ - movl 24(%esp),%ebx /* Save parm1 in ebx */ - movl 20(%esp),%eax /* Save syscall number in eax */ - int $0x80 /* Execute the trap */ - /* Return value is in %eax */ - popl %ebx /* Restore ebx, esi, edi, and ebp */ - popl %esi - popl %edi - popl %ebp - ret /* And return with result in %eax */ - - .size sys_call6,.-sys_call6 - .end +/**************************************************************************** + * arch/x86/src/i486/up_syscall6.S + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based on Bran's kernel development tutorials. Rewritten for JamesM's + * kernel development tutorials. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + + .file "up_syscall6.S" + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Globals + ****************************************************************************/ + +/**************************************************************************** + * .text + ****************************************************************************/ + + .text + +/**************************************************************************** + * Name: sys_call6 + * + * C Prototype: + * uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, + * uintptr_t parm2, uintptr_t parm3, + * uintptr_t parm4, uintptr_t parm5, + * uintptr_t parm6); + * + ****************************************************************************/ + + .global sys_call6 + .type sys_call6, %function + +sys_call6: + pushl %ebp /* Save ebx, esi, edi, and ebp */ + pushl %edi + pushl %esi + pushl %ebx + + movl 44(%esp),%ebp /* Save parm6 in ebp */ + movl 40(%esp),%edi /* Save parm5 in edi */ + movl 36(%esp),%esi /* Save parm4 in esi */ + movl 32(%esp),%edx /* Save parm3 in edx */ + movl 28(%esp),%ecx /* Save parm2 in ecx */ + movl 24(%esp),%ebx /* Save parm1 in ebx */ + movl 20(%esp),%eax /* Save syscall number in eax */ + int $0x80 /* Execute the trap */ + /* Return value is in %eax */ + popl %ebx /* Restore ebx, esi, edi, and ebp */ + popl %esi + popl %edi + popl %ebp + ret /* And return with result in %eax */ + + .size sys_call6,.-sys_call6 + .end diff --git a/nuttx/arch/x86/src/i486/up_usestack.c b/nuttx/arch/x86/src/i486/up_usestack.c index fb8ded0e14..4a44c84151 100644 --- a/nuttx/arch/x86/src/i486/up_usestack.c +++ b/nuttx/arch/x86/src/i486/up_usestack.c @@ -2,7 +2,7 @@ * arch/x86/src/common/up_usestack.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/Make.defs b/nuttx/arch/x86/src/qemu/Make.defs index f4a57128c0..3c6e99fcca 100755 --- a/nuttx/arch/x86/src/qemu/Make.defs +++ b/nuttx/arch/x86/src/qemu/Make.defs @@ -2,7 +2,7 @@ # arch/x86/src/qemu/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/chip.h b/nuttx/arch/x86/src/qemu/chip.h index 0cbf26cb36..63c7529f2f 100755 --- a/nuttx/arch/x86/src/qemu/chip.h +++ b/nuttx/arch/x86/src/qemu/chip.h @@ -2,7 +2,7 @@ * arch/x86/src/qemu/chip.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S b/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S index ded55a1470..50ebdc0411 100644 --- a/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S +++ b/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_fullcontextrestore.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_handlers.c b/nuttx/arch/x86/src/qemu/qemu_handlers.c index a85370f767..aeb9b8b1fa 100644 --- a/nuttx/arch/x86/src/qemu/qemu_handlers.c +++ b/nuttx/arch/x86/src/qemu/qemu_handlers.c @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_handlers.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_head.S b/nuttx/arch/x86/src/qemu/qemu_head.S index 9933d91ffb..2b86c18354 100755 --- a/nuttx/arch/x86/src/qemu/qemu_head.S +++ b/nuttx/arch/x86/src/qemu/qemu_head.S @@ -1,161 +1,161 @@ -/**************************************************************************** - * arch/x86/src/qemu/qemu_head.S - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - - .file "qemu_head.S" - -/**************************************************************************** - * Pre-processor definitions - ****************************************************************************/ - -/* Memory Map: _sbss is the start of the BSS region (see ld.script) _ebss is - * the end of the BSS regsion (see ld.script). The idle task stack starts at - * the end of BSS and is of size CONFIG_IDLETHREAD_STACKSIZE. The IDLE thread - * is the thread that the system boots on and, eventually, becomes the idle, - * do nothing task that runs only when there is nothing else to run. The - * heap continues from there until the end of memory. See g_heapbase below. - */ - -#define STACKBASE ((_ebss + 0x1f) & 0xffffffe0) -#define IDLE_STACK (STACKBASE+CONFIG_IDLETHREAD_STACKSIZE) -#define HEAP_BASE (STACKBASE+CONFIG_IDLETHREAD_STACKSIZE) - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/* Trace macros, use like trace 'i' to print char to serial port. */ - - .macro trace, ch -#ifdef CONFIG_DEBUG - mov $0x3f8, %dx - mov $\ch, %al - out %al, %dx -#endif - .endm - -/**************************************************************************** - * Global Symbols - ****************************************************************************/ - - .global __start /* Making entry point visible to linker */ - .global os_start /* os_start is defined elsewhere */ - .global up_lowsetup /* up_lowsetup is defined elsewhere */ - .global g_heapbase /* The start of the heap */ - -/**************************************************************************** - * .text - ****************************************************************************/ -/**************************************************************************** - * Multiboot Header - ****************************************************************************/ - - /* Setting up the Multiboot header - see GRUB docs for details */ - - .set ALIGN, 1<<0 /* Align loaded modules on page boundaries */ - .set MEMINFO, 1<<1 /* Provide memory map */ - .set FLAGS, ALIGN | MEMINFO /* This is the Multiboot 'flag' field */ - .set MAGIC, 0x1badb002 /* 'magic number' lets bootloader find the header */ - .set CHECKSUM, -(MAGIC + FLAGS) /* Checksum required */ - - .text - .align 4 - .long MAGIC - .long FLAGS - .long CHECKSUM - -/**************************************************************************** - * Name: Start - ****************************************************************************/ - - .type __start, @function -__start: - /* Set up the stack */ - - mov $(idle_stack + CONFIG_IDLETHREAD_STACKSIZE), %esp - - /* Multiboot setup */ - - push %eax /* Multiboot magic number */ - push %ebx /* Multiboot data structure */ - - /* Initialize and start NuttX */ - - call up_lowsetup /* Low-level, pre-OS initialization */ - call os_start /* Start NuttX */ - - /* NuttX will not return */ - - cli -hang: - hlt /* Halt machine should NuttX return */ - jmp hang - .size __start, . - __start - -/**************************************************************************** - * .bss - ****************************************************************************/ - -/* The stack for the IDLE task thread is declared in .bss. NuttX boots and - * initializes on the IDLE thread, then at the completion of OS startup, this - * thread becomes the thread that executes when there is nothing else to - * do in the system (see up_idle()). - */ - - .type idle_stack, @object - .comm idle_stack, CONFIG_IDLETHREAD_STACKSIZE, 32 - .size idle_stack, . - idle_stack - -/**************************************************************************** - * .rodata - ****************************************************************************/ - - .section .rodata, "a" - -/* HEAP BASE: _sbss is the start of the BSS region (see ld.script) _ebss is - * the end of the BSS region (see ld.script). The heap continues from there - * until the end of memory. - */ - - .type g_heapbase, @object -g_heapbase: - .long _ebss - .size g_heapbase, . - g_heapbase - .end +/**************************************************************************** + * arch/x86/src/qemu/qemu_head.S + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + + .file "qemu_head.S" + +/**************************************************************************** + * Pre-processor definitions + ****************************************************************************/ + +/* Memory Map: _sbss is the start of the BSS region (see ld.script) _ebss is + * the end of the BSS regsion (see ld.script). The idle task stack starts at + * the end of BSS and is of size CONFIG_IDLETHREAD_STACKSIZE. The IDLE thread + * is the thread that the system boots on and, eventually, becomes the idle, + * do nothing task that runs only when there is nothing else to run. The + * heap continues from there until the end of memory. See g_heapbase below. + */ + +#define STACKBASE ((_ebss + 0x1f) & 0xffffffe0) +#define IDLE_STACK (STACKBASE+CONFIG_IDLETHREAD_STACKSIZE) +#define HEAP_BASE (STACKBASE+CONFIG_IDLETHREAD_STACKSIZE) + +/**************************************************************************** + * Macros + ****************************************************************************/ + +/* Trace macros, use like trace 'i' to print char to serial port. */ + + .macro trace, ch +#ifdef CONFIG_DEBUG + mov $0x3f8, %dx + mov $\ch, %al + out %al, %dx +#endif + .endm + +/**************************************************************************** + * Global Symbols + ****************************************************************************/ + + .global __start /* Making entry point visible to linker */ + .global os_start /* os_start is defined elsewhere */ + .global up_lowsetup /* up_lowsetup is defined elsewhere */ + .global g_heapbase /* The start of the heap */ + +/**************************************************************************** + * .text + ****************************************************************************/ +/**************************************************************************** + * Multiboot Header + ****************************************************************************/ + + /* Setting up the Multiboot header - see GRUB docs for details */ + + .set ALIGN, 1<<0 /* Align loaded modules on page boundaries */ + .set MEMINFO, 1<<1 /* Provide memory map */ + .set FLAGS, ALIGN | MEMINFO /* This is the Multiboot 'flag' field */ + .set MAGIC, 0x1badb002 /* 'magic number' lets bootloader find the header */ + .set CHECKSUM, -(MAGIC + FLAGS) /* Checksum required */ + + .text + .align 4 + .long MAGIC + .long FLAGS + .long CHECKSUM + +/**************************************************************************** + * Name: Start + ****************************************************************************/ + + .type __start, @function +__start: + /* Set up the stack */ + + mov $(idle_stack + CONFIG_IDLETHREAD_STACKSIZE), %esp + + /* Multiboot setup */ + + push %eax /* Multiboot magic number */ + push %ebx /* Multiboot data structure */ + + /* Initialize and start NuttX */ + + call up_lowsetup /* Low-level, pre-OS initialization */ + call os_start /* Start NuttX */ + + /* NuttX will not return */ + + cli +hang: + hlt /* Halt machine should NuttX return */ + jmp hang + .size __start, . - __start + +/**************************************************************************** + * .bss + ****************************************************************************/ + +/* The stack for the IDLE task thread is declared in .bss. NuttX boots and + * initializes on the IDLE thread, then at the completion of OS startup, this + * thread becomes the thread that executes when there is nothing else to + * do in the system (see up_idle()). + */ + + .type idle_stack, @object + .comm idle_stack, CONFIG_IDLETHREAD_STACKSIZE, 32 + .size idle_stack, . - idle_stack + +/**************************************************************************** + * .rodata + ****************************************************************************/ + + .section .rodata, "a" + +/* HEAP BASE: _sbss is the start of the BSS region (see ld.script) _ebss is + * the end of the BSS region (see ld.script). The heap continues from there + * until the end of memory. + */ + + .type g_heapbase, @object +g_heapbase: + .long _ebss + .size g_heapbase, . - g_heapbase + .end diff --git a/nuttx/arch/x86/src/qemu/qemu_idle.c b/nuttx/arch/x86/src/qemu/qemu_idle.c index 42145105b9..b3c97948ba 100644 --- a/nuttx/arch/x86/src/qemu/qemu_idle.c +++ b/nuttx/arch/x86/src/qemu/qemu_idle.c @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_idle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_internal.h b/nuttx/arch/x86/src/qemu/qemu_internal.h index c8bd5cd95d..b63a7b68cd 100755 --- a/nuttx/arch/x86/src/qemu/qemu_internal.h +++ b/nuttx/arch/x86/src/qemu/qemu_internal.h @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_lowputc.c b/nuttx/arch/x86/src/qemu/qemu_lowputc.c index 1fa4aa6c59..9bfee18d05 100644 --- a/nuttx/arch/x86/src/qemu/qemu_lowputc.c +++ b/nuttx/arch/x86/src/qemu/qemu_lowputc.c @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_lowputc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_memorymap.h b/nuttx/arch/x86/src/qemu/qemu_memorymap.h index 571ddd03d7..1bb8afe68d 100755 --- a/nuttx/arch/x86/src/qemu/qemu_memorymap.h +++ b/nuttx/arch/x86/src/qemu/qemu_memorymap.h @@ -1,67 +1,67 @@ -/************************************************************************************ - * arch/x86/src/qemu/qemu_memorymap.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H -#define __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include "chip.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Memory Map ***********************************************************************/ - -/* Peripheral Base Addresses ********************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H */ +/************************************************************************************ + * arch/x86/src/qemu/qemu_memorymap.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H +#define __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Memory Map ***********************************************************************/ + +/* Peripheral Base Addresses ********************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_X86_SRC_QEMU_QEMU_MEMORYMAP_H */ diff --git a/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S b/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S index 427c3bd5d4..ab12447986 100644 --- a/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S +++ b/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S @@ -2,7 +2,7 @@ * arch/x86/src/qemu/up_saveusercontext.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/x86/src/qemu/qemu_timerisr.c b/nuttx/arch/x86/src/qemu/qemu_timerisr.c index 531b7d09d9..b363d22678 100755 --- a/nuttx/arch/x86/src/qemu/qemu_timerisr.c +++ b/nuttx/arch/x86/src/qemu/qemu_timerisr.c @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_timerisr.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on Bran's kernel development tutorials. Rewritten for JamesM's * kernel development tutorials. diff --git a/nuttx/arch/x86/src/qemu/qemu_vectors.S b/nuttx/arch/x86/src/qemu/qemu_vectors.S index d6e17e57bc..8a68e2e095 100755 --- a/nuttx/arch/x86/src/qemu/qemu_vectors.S +++ b/nuttx/arch/x86/src/qemu/qemu_vectors.S @@ -2,7 +2,7 @@ * arch/x86/src/qemu/qemu_head.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based on Bran's kernel development tutorials. Rewritten for JamesM's * kernel development tutorials. diff --git a/nuttx/arch/z16/include/arch.h b/nuttx/arch/z16/include/arch.h index f32e2a998e..31dfe61d03 100644 --- a/nuttx/arch/z16/include/arch.h +++ b/nuttx/arch/z16/include/arch.h @@ -2,7 +2,7 @@ * arch/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/irq.h b/nuttx/arch/z16/include/irq.h index 116cba8fa8..4926510288 100644 --- a/nuttx/arch/z16/include/irq.h +++ b/nuttx/arch/z16/include/irq.h @@ -2,7 +2,7 @@ * arch/irq.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/serial.h b/nuttx/arch/z16/include/serial.h index c46a8c35d0..15d49ee434 100644 --- a/nuttx/arch/z16/include/serial.h +++ b/nuttx/arch/z16/include/serial.h @@ -2,7 +2,7 @@ * arch/serial.h * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/syscall.h b/nuttx/arch/z16/include/syscall.h index a009452c01..c682189d80 100644 --- a/nuttx/arch/z16/include/syscall.h +++ b/nuttx/arch/z16/include/syscall.h @@ -2,7 +2,7 @@ * arch/z16/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/types.h b/nuttx/arch/z16/include/types.h index 536cb52a74..e58a93ba1c 100644 --- a/nuttx/arch/z16/include/types.h +++ b/nuttx/arch/z16/include/types.h @@ -2,7 +2,7 @@ * arch/z16/include/types.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/z16f/arch.h b/nuttx/arch/z16/include/z16f/arch.h index 3d0e02c209..52f77228a2 100644 --- a/nuttx/arch/z16/include/z16f/arch.h +++ b/nuttx/arch/z16/include/z16f/arch.h @@ -3,7 +3,7 @@ * arch/chip/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/include/z16f/irq.h b/nuttx/arch/z16/include/z16f/irq.h index 46abe4d3f0..83b251e81b 100644 --- a/nuttx/arch/z16/include/z16f/irq.h +++ b/nuttx/arch/z16/include/z16f/irq.h @@ -3,7 +3,7 @@ * arch/chip/irq.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_allocateheap.c b/nuttx/arch/z16/src/common/up_allocateheap.c index 0b6c766d36..72686b7516 100644 --- a/nuttx/arch/z16/src/common/up_allocateheap.c +++ b/nuttx/arch/z16/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * common/up_allocateheap.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c index d1bedb065e..d7d614a919 100644 --- a/nuttx/arch/z16/src/common/up_assert.c +++ b/nuttx/arch/z16/src/common/up_assert.c @@ -2,7 +2,7 @@ * common/up_assert.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_blocktask.c b/nuttx/arch/z16/src/common/up_blocktask.c index 015ebed3a1..88b422cf88 100644 --- a/nuttx/arch/z16/src/common/up_blocktask.c +++ b/nuttx/arch/z16/src/common/up_blocktask.c @@ -2,7 +2,7 @@ * common/up_blocktask.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_copystate.c b/nuttx/arch/z16/src/common/up_copystate.c index 1a48536d73..d3a4d47a05 100644 --- a/nuttx/arch/z16/src/common/up_copystate.c +++ b/nuttx/arch/z16/src/common/up_copystate.c @@ -2,7 +2,7 @@ * common/up_copystate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_createstack.c b/nuttx/arch/z16/src/common/up_createstack.c index 1adcc78358..ed9b1655cb 100644 --- a/nuttx/arch/z16/src/common/up_createstack.c +++ b/nuttx/arch/z16/src/common/up_createstack.c @@ -2,7 +2,7 @@ * arch/z16/common/up_createstack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c index 3adddf6db1..e8f40fb563 100644 --- a/nuttx/arch/z16/src/common/up_doirq.c +++ b/nuttx/arch/z16/src/common/up_doirq.c @@ -2,7 +2,7 @@ * common/up_doirq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_exit.c b/nuttx/arch/z16/src/common/up_exit.c index be5411b1f9..41f0583472 100644 --- a/nuttx/arch/z16/src/common/up_exit.c +++ b/nuttx/arch/z16/src/common/up_exit.c @@ -2,7 +2,7 @@ * common/up_exit.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_idle.c b/nuttx/arch/z16/src/common/up_idle.c index 154e041bcd..58cd1afc66 100644 --- a/nuttx/arch/z16/src/common/up_idle.c +++ b/nuttx/arch/z16/src/common/up_idle.c @@ -2,7 +2,7 @@ * common/up_idle.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_initialstate.c b/nuttx/arch/z16/src/common/up_initialstate.c index c01c18e89c..8938679aca 100644 --- a/nuttx/arch/z16/src/common/up_initialstate.c +++ b/nuttx/arch/z16/src/common/up_initialstate.c @@ -2,7 +2,7 @@ * common/up_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_interruptcontext.c b/nuttx/arch/z16/src/common/up_interruptcontext.c index fe9c281f71..99cc4abe77 100644 --- a/nuttx/arch/z16/src/common/up_interruptcontext.c +++ b/nuttx/arch/z16/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * common/up_interruptcontext.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_mdelay.c b/nuttx/arch/z16/src/common/up_mdelay.c index 94ae885411..d69253ab07 100644 --- a/nuttx/arch/z16/src/common/up_mdelay.c +++ b/nuttx/arch/z16/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * common/up_mdelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_registerdump.c b/nuttx/arch/z16/src/common/up_registerdump.c index 90c7d79c52..dd1f210f75 100644 --- a/nuttx/arch/z16/src/common/up_registerdump.c +++ b/nuttx/arch/z16/src/common/up_registerdump.c @@ -2,7 +2,7 @@ * common/up_registerdump.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_releasepending.c b/nuttx/arch/z16/src/common/up_releasepending.c index a91d785033..ff9a9782ee 100644 --- a/nuttx/arch/z16/src/common/up_releasepending.c +++ b/nuttx/arch/z16/src/common/up_releasepending.c @@ -2,7 +2,7 @@ * common/up_releasepending.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_releasestack.c b/nuttx/arch/z16/src/common/up_releasestack.c index 6f96c0c30f..f064cae7ff 100644 --- a/nuttx/arch/z16/src/common/up_releasestack.c +++ b/nuttx/arch/z16/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * common/up_releasestack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_reprioritizertr.c b/nuttx/arch/z16/src/common/up_reprioritizertr.c index e0ddc364b5..0363184cd5 100644 --- a/nuttx/arch/z16/src/common/up_reprioritizertr.c +++ b/nuttx/arch/z16/src/common/up_reprioritizertr.c @@ -2,7 +2,7 @@ * common/up_reprioritizertr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_schedulesigaction.c b/nuttx/arch/z16/src/common/up_schedulesigaction.c index 368b2ed541..1c5b9a78c5 100644 --- a/nuttx/arch/z16/src/common/up_schedulesigaction.c +++ b/nuttx/arch/z16/src/common/up_schedulesigaction.c @@ -2,7 +2,7 @@ * common/up_schedulesigaction.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c index 4ca05d17ba..d8636bd6f5 100644 --- a/nuttx/arch/z16/src/common/up_sigdeliver.c +++ b/nuttx/arch/z16/src/common/up_sigdeliver.c @@ -2,7 +2,7 @@ * common/up_sigdeliver.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_stackdump.c b/nuttx/arch/z16/src/common/up_stackdump.c index 8f63e2c59d..b4930f6206 100644 --- a/nuttx/arch/z16/src/common/up_stackdump.c +++ b/nuttx/arch/z16/src/common/up_stackdump.c @@ -2,7 +2,7 @@ * common/up_stackdump.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_udelay.c b/nuttx/arch/z16/src/common/up_udelay.c index f909eb18c9..a68b6a1723 100644 --- a/nuttx/arch/z16/src/common/up_udelay.c +++ b/nuttx/arch/z16/src/common/up_udelay.c @@ -2,7 +2,7 @@ * common/up_udelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_unblocktask.c b/nuttx/arch/z16/src/common/up_unblocktask.c index 3e4958ab54..d72d554241 100644 --- a/nuttx/arch/z16/src/common/up_unblocktask.c +++ b/nuttx/arch/z16/src/common/up_unblocktask.c @@ -2,7 +2,7 @@ * common/up_unblocktask.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/common/up_usestack.c b/nuttx/arch/z16/src/common/up_usestack.c index 14a18ccb33..69e4763c53 100644 --- a/nuttx/arch/z16/src/common/up_usestack.c +++ b/nuttx/arch/z16/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/z16/common/up_usestack.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/Make.defs b/nuttx/arch/z16/src/z16f/Make.defs index 3fb62ae73e..4c47cf41bc 100644 --- a/nuttx/arch/z16/src/z16f/Make.defs +++ b/nuttx/arch/z16/src/z16f/Make.defs @@ -2,7 +2,7 @@ # arch/z16/src/z16f/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/chip.h b/nuttx/arch/z16/src/z16f/chip.h index f4b0cd0ed8..bf4b7fd0ca 100644 --- a/nuttx/arch/z16/src/z16f/chip.h +++ b/nuttx/arch/z16/src/z16f/chip.h @@ -3,7 +3,7 @@ * include/arch/chip/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/z16f_clkinit.c b/nuttx/arch/z16/src/z16f/z16f_clkinit.c index 298fbb45ae..9aa80ec505 100644 --- a/nuttx/arch/z16/src/z16f/z16f_clkinit.c +++ b/nuttx/arch/z16/src/z16f/z16f_clkinit.c @@ -2,7 +2,7 @@ * z16f/z16f_clkinit.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based upon sample code included with the Zilog ZDS-II toolchain. * diff --git a/nuttx/arch/z16/src/z16f/z16f_irq.c b/nuttx/arch/z16/src/z16f/z16f_irq.c index ed29a81019..5c089d654d 100644 --- a/nuttx/arch/z16/src/z16f/z16f_irq.c +++ b/nuttx/arch/z16/src/z16f/z16f_irq.c @@ -2,7 +2,7 @@ * z16f/z16f_irq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/z16f_restoreusercontext.S b/nuttx/arch/z16/src/z16f/z16f_restoreusercontext.S index 0d6f5fec1b..796874fbaa 100755 --- a/nuttx/arch/z16/src/z16f/z16f_restoreusercontext.S +++ b/nuttx/arch/z16/src/z16f/z16f_restoreusercontext.S @@ -2,7 +2,7 @@ * arch/z16/src/z16f/z16f_restoreusercontext.asm * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/z16f_saveusercontext.S b/nuttx/arch/z16/src/z16f/z16f_saveusercontext.S index 892f9779e8..6b56c2a498 100644 --- a/nuttx/arch/z16/src/z16f/z16f_saveusercontext.S +++ b/nuttx/arch/z16/src/z16f/z16f_saveusercontext.S @@ -2,7 +2,7 @@ * arch/z16/src/z16f/z16f_saveusercontext.asm * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/z16f_sysexec.c b/nuttx/arch/z16/src/z16f/z16f_sysexec.c index 889e768823..2fbc1e2c96 100644 --- a/nuttx/arch/z16/src/z16f/z16f_sysexec.c +++ b/nuttx/arch/z16/src/z16f/z16f_sysexec.c @@ -2,7 +2,7 @@ * z16f/z16f_sysexec.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z16/src/z16f/z16f_timerisr.c b/nuttx/arch/z16/src/z16f/z16f_timerisr.c index 981cc54f01..2849fd0af9 100644 --- a/nuttx/arch/z16/src/z16f/z16f_timerisr.c +++ b/nuttx/arch/z16/src/z16f/z16f_timerisr.c @@ -2,7 +2,7 @@ * z16f/z16f_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/arch.h b/nuttx/arch/z80/include/arch.h index ff3a059e0d..112fcde3aa 100644 --- a/nuttx/arch/z80/include/arch.h +++ b/nuttx/arch/z80/include/arch.h @@ -2,7 +2,7 @@ * arch/arch.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/ez80/arch.h b/nuttx/arch/z80/include/ez80/arch.h index 2440c12e49..e86d1004b3 100644 --- a/nuttx/arch/z80/include/ez80/arch.h +++ b/nuttx/arch/z80/include/ez80/arch.h @@ -3,7 +3,7 @@ * arch/chip/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/ez80/io.h b/nuttx/arch/z80/include/ez80/io.h index fc41ccb596..b5f23d38e6 100644 --- a/nuttx/arch/z80/include/ez80/io.h +++ b/nuttx/arch/z80/include/ez80/io.h @@ -3,7 +3,7 @@ * arch/chip/io.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/ez80/irq.h b/nuttx/arch/z80/include/ez80/irq.h index 49039fbce2..5d57e244b5 100644 --- a/nuttx/arch/z80/include/ez80/irq.h +++ b/nuttx/arch/z80/include/ez80/irq.h @@ -3,7 +3,7 @@ * arch/chip/irq.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/ez80/types.h b/nuttx/arch/z80/include/ez80/types.h index f3569d9baa..f7ec1d3857 100644 --- a/nuttx/arch/z80/include/ez80/types.h +++ b/nuttx/arch/z80/include/ez80/types.h @@ -3,7 +3,7 @@ * include/arch/chip/types.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/io.h b/nuttx/arch/z80/include/io.h index ce6a90ab5b..dacc0bc5b4 100644 --- a/nuttx/arch/z80/include/io.h +++ b/nuttx/arch/z80/include/io.h @@ -3,7 +3,7 @@ * arch/chip/io.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/irq.h b/nuttx/arch/z80/include/irq.h index 62957914f2..a617540a98 100644 --- a/nuttx/arch/z80/include/irq.h +++ b/nuttx/arch/z80/include/irq.h @@ -2,7 +2,7 @@ * arch/z80/include/irq.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/limits.h b/nuttx/arch/z80/include/limits.h index 27707012d7..3cfd65dc6b 100644 --- a/nuttx/arch/z80/include/limits.h +++ b/nuttx/arch/z80/include/limits.h @@ -2,7 +2,7 @@ * arch/z80/include/limits.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/serial.h b/nuttx/arch/z80/include/serial.h index 91a0184c4f..2688c045f5 100644 --- a/nuttx/arch/z80/include/serial.h +++ b/nuttx/arch/z80/include/serial.h @@ -2,7 +2,7 @@ * arch/z80/include/serial.h * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/syscall.h b/nuttx/arch/z80/include/syscall.h index a20711c13c..b1894ca347 100644 --- a/nuttx/arch/z80/include/syscall.h +++ b/nuttx/arch/z80/include/syscall.h @@ -2,7 +2,7 @@ * arch/z80/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/types.h b/nuttx/arch/z80/include/types.h index 67f44ddd48..5b2b5ff16f 100644 --- a/nuttx/arch/z80/include/types.h +++ b/nuttx/arch/z80/include/types.h @@ -2,7 +2,7 @@ * arch/z80/include/types.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z8/arch.h b/nuttx/arch/z80/include/z8/arch.h index d5f02a49ac..d834bd7919 100644 --- a/nuttx/arch/z80/include/z8/arch.h +++ b/nuttx/arch/z80/include/z8/arch.h @@ -3,7 +3,7 @@ * arch/chip/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h index fb0cc7281f..3a0c75900b 100644 --- a/nuttx/arch/z80/include/z8/irq.h +++ b/nuttx/arch/z80/include/z8/irq.h @@ -3,7 +3,7 @@ * arch/chip/irq.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z8/types.h b/nuttx/arch/z80/include/z8/types.h index 324ca236c4..f9aee3ff9a 100644 --- a/nuttx/arch/z80/include/z8/types.h +++ b/nuttx/arch/z80/include/z8/types.h @@ -3,7 +3,7 @@ * include/arch/chip/types.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z80/arch.h b/nuttx/arch/z80/include/z80/arch.h index e9033596cd..eb9a838603 100644 --- a/nuttx/arch/z80/include/z80/arch.h +++ b/nuttx/arch/z80/include/z80/arch.h @@ -3,7 +3,7 @@ * arch/chip/arch.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z80/io.h b/nuttx/arch/z80/include/z80/io.h index f3cc992eeb..b45526a03f 100644 --- a/nuttx/arch/z80/include/z80/io.h +++ b/nuttx/arch/z80/include/z80/io.h @@ -3,7 +3,7 @@ * arch/chip/io.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z80/irq.h b/nuttx/arch/z80/include/z80/irq.h index cc0cb25cc9..6c172c6332 100644 --- a/nuttx/arch/z80/include/z80/irq.h +++ b/nuttx/arch/z80/include/z80/irq.h @@ -3,7 +3,7 @@ * arch/chip/irq.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/include/z80/types.h b/nuttx/arch/z80/include/z80/types.h index 42bba5ac80..19dab71034 100644 --- a/nuttx/arch/z80/include/z80/types.h +++ b/nuttx/arch/z80/include/z80/types.h @@ -3,7 +3,7 @@ * include/arch/chip/types.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_allocateheap.c b/nuttx/arch/z80/src/common/up_allocateheap.c index 368785cf2c..94b06e3755 100644 --- a/nuttx/arch/z80/src/common/up_allocateheap.c +++ b/nuttx/arch/z80/src/common/up_allocateheap.c @@ -2,7 +2,7 @@ * common/up_allocateheap.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_arch.h b/nuttx/arch/z80/src/common/up_arch.h index 0cb523ea10..99087bb088 100644 --- a/nuttx/arch/z80/src/common/up_arch.h +++ b/nuttx/arch/z80/src/common/up_arch.h @@ -2,7 +2,7 @@ * common/up_arch.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c index 9fe66ecdaf..b35e8dd33a 100644 --- a/nuttx/arch/z80/src/common/up_assert.c +++ b/nuttx/arch/z80/src/common/up_assert.c @@ -2,7 +2,7 @@ * common/up_assert.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_blocktask.c b/nuttx/arch/z80/src/common/up_blocktask.c index 7feb02169f..bbc2be5e65 100644 --- a/nuttx/arch/z80/src/common/up_blocktask.c +++ b/nuttx/arch/z80/src/common/up_blocktask.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_blocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_createstack.c b/nuttx/arch/z80/src/common/up_createstack.c index 6ffaa272bf..28246aec33 100644 --- a/nuttx/arch/z80/src/common/up_createstack.c +++ b/nuttx/arch/z80/src/common/up_createstack.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_createstack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_doirq.c b/nuttx/arch/z80/src/common/up_doirq.c index 828806a496..fd871e2462 100644 --- a/nuttx/arch/z80/src/common/up_doirq.c +++ b/nuttx/arch/z80/src/common/up_doirq.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_doirq.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_exit.c b/nuttx/arch/z80/src/common/up_exit.c index f57fd442c7..85ddd841ef 100644 --- a/nuttx/arch/z80/src/common/up_exit.c +++ b/nuttx/arch/z80/src/common/up_exit.c @@ -2,7 +2,7 @@ * common/up_exit.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_idle.c b/nuttx/arch/z80/src/common/up_idle.c index 550bc124d8..938a150a0d 100644 --- a/nuttx/arch/z80/src/common/up_idle.c +++ b/nuttx/arch/z80/src/common/up_idle.c @@ -2,7 +2,7 @@ * common/up_idle.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h index 919a74353b..960061a802 100644 --- a/nuttx/arch/z80/src/common/up_internal.h +++ b/nuttx/arch/z80/src/common/up_internal.h @@ -2,7 +2,7 @@ * arch/z80/src/common/up_internal.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_interruptcontext.c b/nuttx/arch/z80/src/common/up_interruptcontext.c index e8887abef0..31a6364189 100644 --- a/nuttx/arch/z80/src/common/up_interruptcontext.c +++ b/nuttx/arch/z80/src/common/up_interruptcontext.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_interruptcontext.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_mdelay.c b/nuttx/arch/z80/src/common/up_mdelay.c index 33a8130639..dd09043fc7 100644 --- a/nuttx/arch/z80/src/common/up_mdelay.c +++ b/nuttx/arch/z80/src/common/up_mdelay.c @@ -2,7 +2,7 @@ * common/up_mdelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_puts.c b/nuttx/arch/z80/src/common/up_puts.c index 06c38573dd..a91d05c0c8 100644 --- a/nuttx/arch/z80/src/common/up_puts.c +++ b/nuttx/arch/z80/src/common/up_puts.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_puts.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_releasepending.c b/nuttx/arch/z80/src/common/up_releasepending.c index 8090cb763c..bb51874653 100644 --- a/nuttx/arch/z80/src/common/up_releasepending.c +++ b/nuttx/arch/z80/src/common/up_releasepending.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_releasepending.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_releasestack.c b/nuttx/arch/z80/src/common/up_releasestack.c index 549879725b..d41cc99182 100644 --- a/nuttx/arch/z80/src/common/up_releasestack.c +++ b/nuttx/arch/z80/src/common/up_releasestack.c @@ -2,7 +2,7 @@ * common/up_releasestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_reprioritizertr.c b/nuttx/arch/z80/src/common/up_reprioritizertr.c index f520500330..84cd3e1e10 100644 --- a/nuttx/arch/z80/src/common/up_reprioritizertr.c +++ b/nuttx/arch/z80/src/common/up_reprioritizertr.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_reprioritizertr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_stackdump.c b/nuttx/arch/z80/src/common/up_stackdump.c index be6c67dd43..817c2d3156 100644 --- a/nuttx/arch/z80/src/common/up_stackdump.c +++ b/nuttx/arch/z80/src/common/up_stackdump.c @@ -2,7 +2,7 @@ * common/up_stackdump.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_udelay.c b/nuttx/arch/z80/src/common/up_udelay.c index 06faa9a80e..f03357418f 100644 --- a/nuttx/arch/z80/src/common/up_udelay.c +++ b/nuttx/arch/z80/src/common/up_udelay.c @@ -2,7 +2,7 @@ * common/up_udelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_unblocktask.c b/nuttx/arch/z80/src/common/up_unblocktask.c index 33d98e864d..d99d6d87df 100644 --- a/nuttx/arch/z80/src/common/up_unblocktask.c +++ b/nuttx/arch/z80/src/common/up_unblocktask.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_unblocktask.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/common/up_usestack.c b/nuttx/arch/z80/src/common/up_usestack.c index 7f22e9ce62..7d348a9c65 100644 --- a/nuttx/arch/z80/src/common/up_usestack.c +++ b/nuttx/arch/z80/src/common/up_usestack.c @@ -2,7 +2,7 @@ * arch/z80/src/common/up_usestack.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/Make.defs b/nuttx/arch/z80/src/ez80/Make.defs index 8999b6a66b..fb2b3d48f8 100644 --- a/nuttx/arch/z80/src/ez80/Make.defs +++ b/nuttx/arch/z80/src/ez80/Make.defs @@ -2,7 +2,7 @@ # arch/z80/src/ez80/Make.defs # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/chip.h b/nuttx/arch/z80/src/ez80/chip.h index 3402943aec..8bc6d0eefc 100644 --- a/nuttx/arch/z80/src/ez80/chip.h +++ b/nuttx/arch/z80/src/ez80/chip.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_clock.c b/nuttx/arch/z80/src/ez80/ez80_clock.c index 8446e8124f..3cbe1f8f44 100644 --- a/nuttx/arch/z80/src/ez80/ez80_clock.c +++ b/nuttx/arch/z80/src/ez80/ez80_clock.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_clock.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_copystate.c b/nuttx/arch/z80/src/ez80/ez80_copystate.c index 976817c6eb..c85d2b7169 100644 --- a/nuttx/arch/z80/src/ez80/ez80_copystate.c +++ b/nuttx/arch/z80/src/ez80/ez80_copystate.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_copystate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_i2c.c b/nuttx/arch/z80/src/ez80/ez80_i2c.c index 609ab22bd5..dbc817442c 100644 --- a/nuttx/arch/z80/src/ez80/ez80_i2c.c +++ b/nuttx/arch/z80/src/ez80/ez80_i2c.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_i2c.c * * Copyright(C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_initialstate.c b/nuttx/arch/z80/src/ez80/ez80_initialstate.c index 5b6e5fb4b7..9ff56e7c17 100644 --- a/nuttx/arch/z80/src/ez80/ez80_initialstate.c +++ b/nuttx/arch/z80/src/ez80/ez80_initialstate.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_io.asm b/nuttx/arch/z80/src/ez80/ez80_io.asm index 9c5d28e7e4..32cd5296c0 100644 --- a/nuttx/arch/z80/src/ez80/ez80_io.asm +++ b/nuttx/arch/z80/src/ez80/ez80_io.asm @@ -2,7 +2,7 @@ ; arch/z80/src/ze80/ez80_io.c ; ; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt +; Author: Gregory Nutt ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_irq.c b/nuttx/arch/z80/src/ez80/ez80_irq.c index d89bff8598..604e5c5b3f 100644 --- a/nuttx/arch/z80/src/ez80/ez80_irq.c +++ b/nuttx/arch/z80/src/ez80/ez80_irq.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_irq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_irqsave.asm b/nuttx/arch/z80/src/ez80/ez80_irqsave.asm index c19ef0bdd9..0efae6a478 100644 --- a/nuttx/arch/z80/src/ez80/ez80_irqsave.asm +++ b/nuttx/arch/z80/src/ez80/ez80_irqsave.asm @@ -1,88 +1,88 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_irqsave.asm -; -; Copyright (C) 2008 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - - xdef _irqsave - xdef _irqrestore - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -;* Name: irqstate_t irqsave(void) -;* -;* Description: -;* Disable all interrupts; return previous interrupt state -;* -;************************************************************************** - -_irqsave: - ld a, i ; AF = interrupt state - di ; Interrupts are disabled (does not affect F) - push af ; Transfer to HL via the stack - pop hl ; - ret ; And return - -;************************************************************************** -;* Name: void irqrestore(irqstate_t flags) -;* -;* Description: -;* Restore previous interrupt state -;* -;************************************************************************** - -_irqrestore: - di ; Assume disabled - pop hl ; HL = return address - pop af ; AF Parity bit holds interrupt state - jp po, _disabled ; Skip over re-enable if Parity odd - ei ; Re-enable interrupts -_disabled: - push af ; Restore stack - push hl ; - ret ; and return - - end +;************************************************************************** +; arch/z80/src/ez80/ez80_irqsave.asm +; +; Copyright (C) 2008 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + +;************************************************************************** +; Global Symbols Imported +;************************************************************************** + +;************************************************************************** +; Global Symbols Expported +;************************************************************************** + + xdef _irqsave + xdef _irqrestore + +;************************************************************************** +; Code +;************************************************************************** + + segment CODE + .assume ADL=1 + +;************************************************************************** +;* Name: irqstate_t irqsave(void) +;* +;* Description: +;* Disable all interrupts; return previous interrupt state +;* +;************************************************************************** + +_irqsave: + ld a, i ; AF = interrupt state + di ; Interrupts are disabled (does not affect F) + push af ; Transfer to HL via the stack + pop hl ; + ret ; And return + +;************************************************************************** +;* Name: void irqrestore(irqstate_t flags) +;* +;* Description: +;* Restore previous interrupt state +;* +;************************************************************************** + +_irqrestore: + di ; Assume disabled + pop hl ; HL = return address + pop af ; AF Parity bit holds interrupt state + jp po, _disabled ; Skip over re-enable if Parity odd + ei ; Re-enable interrupts +_disabled: + push af ; Restore stack + push hl ; + ret ; and return + + end diff --git a/nuttx/arch/z80/src/ez80/ez80_registerdump.c b/nuttx/arch/z80/src/ez80/ez80_registerdump.c index d1aa3726bb..a43bd6459b 100644 --- a/nuttx/arch/z80/src/ez80/ez80_registerdump.c +++ b/nuttx/arch/z80/src/ez80/ez80_registerdump.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_registerdump.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_restorecontext.asm b/nuttx/arch/z80/src/ez80/ez80_restorecontext.asm index da1d050f0c..c90ce808fa 100644 --- a/nuttx/arch/z80/src/ez80/ez80_restorecontext.asm +++ b/nuttx/arch/z80/src/ez80/ez80_restorecontext.asm @@ -1,110 +1,110 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_restorcontext.asm -; -; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - -;************************************************************************** -; Global Symbols Expported -;************************************************************************** - - xdef _ez80_restorecontext - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -; ez80_restorecontext -;************************************************************************** - -_ez80_restorecontext: - ; On entry, stack contains return address (not used), then address - ; of the register save structure - - ; Discard the return address, we won't be returning - - pop hl - - ; Get the address of the beginning of the state save area. Each - ; pop will increment to the next element of the structure - - pop hl ; BC = Address of save structure - ld sp, hl ; SP points to top of storage area - - ; Disable interrupts while we muck with the alternative registers. The - ; Correct interrupt state will be restore below - - di - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; DE' = return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Save return address for ret instruction - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, noinrestore ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes.. Enable interrupts - ret ; and return -noinrestore: - ex af, af' ; Restore AF - ret ; Return with interrupts disabled - end - +;************************************************************************** +; arch/z80/src/ez80/ez80_restorcontext.asm +; +; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + +;************************************************************************** +; Global Symbols Imported +;************************************************************************** + +;************************************************************************** +; Global Symbols Expported +;************************************************************************** + + xdef _ez80_restorecontext + +;************************************************************************** +; Code +;************************************************************************** + + segment CODE + .assume ADL=1 + +;************************************************************************** +; ez80_restorecontext +;************************************************************************** + +_ez80_restorecontext: + ; On entry, stack contains return address (not used), then address + ; of the register save structure + + ; Discard the return address, we won't be returning + + pop hl + + ; Get the address of the beginning of the state save area. Each + ; pop will increment to the next element of the structure + + pop hl ; BC = Address of save structure + ld sp, hl ; SP points to top of storage area + + ; Disable interrupts while we muck with the alternative registers. The + ; Correct interrupt state will be restore below + + di + + ; Restore registers. HL points to the beginning of the reg structure to restore + + ex af, af' ; Select alternate AF + pop af ; Offset 0: AF' = I with interrupt state in parity + ex af, af' ; Restore original AF + pop bc ; Offset 1: BC + pop de ; Offset 2: DE + pop ix ; Offset 3: IX + pop iy ; Offset 4: IY + exx ; Use alternate BC/DE/HL + pop hl ; Offset 5: HL' = Stack pointer after return + exx ; Restore original BC/DE/HL + pop hl ; Offset 6: HL + pop af ; Offset 7: AF + + ; Restore the stack pointer + + exx ; Use alternate BC/DE/HL + pop de ; DE' = return address + ld sp, hl ; Set SP = saved stack pointer value before return + push de ; Save return address for ret instruction + exx ; Restore original BC/DE/HL + + ; Restore interrupt state + + ex af, af' ; Recover interrupt state + jp po, noinrestore ; Odd parity, IFF2=0, means disabled + ex af, af' ; Restore AF (before enabling interrupts) + ei ; yes.. Enable interrupts + ret ; and return +noinrestore: + ex af, af' ; Restore AF + ret ; Return with interrupts disabled + end + diff --git a/nuttx/arch/z80/src/ez80/ez80_saveusercontext.asm b/nuttx/arch/z80/src/ez80/ez80_saveusercontext.asm index ecd7db1143..429dc3dd57 100644 --- a/nuttx/arch/z80/src/ez80/ez80_saveusercontext.asm +++ b/nuttx/arch/z80/src/ez80/ez80_saveusercontext.asm @@ -2,7 +2,7 @@ ; arch/z80/src/ez80/ez80_saveusercontext.asm ; ; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt +; Author: Gregory Nutt ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c index ce48fe9871..04643304d8 100644 --- a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c +++ b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_schedulesigaction.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c index 86aaad2d50..2d946aa322 100644 --- a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c +++ b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_sigdeliver.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_spi.c b/nuttx/arch/z80/src/ez80/ez80_spi.c index 0c238f663e..14f8e05f3b 100755 --- a/nuttx/arch/z80/src/ez80/ez80_spi.c +++ b/nuttx/arch/z80/src/ez80/ez80_spi.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_spi.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_startup.asm b/nuttx/arch/z80/src/ez80/ez80_startup.asm index 2173f80a42..d52795d637 100644 --- a/nuttx/arch/z80/src/ez80/ez80_startup.asm +++ b/nuttx/arch/z80/src/ez80/ez80_startup.asm @@ -1,155 +1,155 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_startup.asm -; -; Copyright (C) 2008 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - -;************************************************************************** -; Included Files -;************************************************************************** - -;************************************************************************** -; Constants -;************************************************************************** - -;************************************************************************** -; Global symbols used -;************************************************************************** - - xref __stack - xref _ez80_init - xref _ez80_initvectors - xref _ez80_initsysclk - xref _ez80_lowinit - xref __low_bss ; Low address of bss segment - xref __len_bss ; Length of bss segment - - xref __low_data ; Address of initialized data section - xref __low_romdata ; Addr of initialized data section in ROM - xref __len_data ; Length of initialized data section - - xref __copy_code_to_ram - xref __len_code - xref __low_code - xref __low_romcode - xref _os_start - xdef _ez80_startup - xdef _ez80_halt - -;************************************************************************** -; Code -;************************************************************************** - - segment CODE - .assume ADL=1 - -;************************************************************************** -; System reset start logic -;************************************************************************** - -_ez80_startup: - ; Set up the stack pointer at the location determined the lincmd - ; file - - ld sp, __stack - - ; Peform chip-specific initialization - - call _ez80_init - - ; initialize the interrupt vector table - - call _ez80_initvectors - - ; Initialize the system clock - - call _ez80_initsysclk - - ; Perform C initializations - ; Clear the uninitialized data section - - ld bc, __len_bss ; Check for non-zero length - ld a, __len_bss >> 16 - or a, c - or a, b - jr z, _ez80_bssdone ; BSS is zero-length ... - xor a, a - ld (__low_bss), a - sbc hl, hl ; hl = 0 - dec bc ; 1st byte's taken care of - sbc hl, bc - jr z, _ez80_bssdone ; Just 1 byte ... - ld hl, __low_bss ; reset hl - ld de, __low_bss + 1 ; [de] = bss + 1 - ldir -_ez80_bssdone: - - ; Copy the initialized data section - ld bc, __len_data ; [bc] = data length - ld a, __len_data >> 16 ; Check for non-zero length - or a, c - or a, b - jr z, _ez80_datadone ; __len_data is zero-length ... - ld hl, __low_romdata ; [hl] = data_copy - ld de, __low_data ; [de] = data - ldir ; Copy the data section -_ez80_datadone: - - ; Copy CODE (which may be in FLASH) to RAM if the - ; copy_code_to_ram symbol is set in the link control file - ld a, __copy_code_to_ram - or a, a - jr z, _ez80_codedone - ld bc, __len_code ; [bc] = code length - ld a, __len_code >> 16 ; Check for non-zero length - or a, c - or a, b - jr z, _ez80_codedone ; __len_code is zero-length - ld hl, __low_romcode ; [hl] = code_copy - ld de, __low_code ; [de] = code - ldir ; Copy the code section -_ez80_codedone: - - ; Perform board-specific intialization - - call _ez80_lowinit - - ; Then start NuttX - - call _os_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_ez80_halt: - halt ; We should never get here - jp _ez80_halt - +;************************************************************************** +; arch/z80/src/ez80/ez80_startup.asm +; +; Copyright (C) 2008 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + +;************************************************************************** +; Included Files +;************************************************************************** + +;************************************************************************** +; Constants +;************************************************************************** + +;************************************************************************** +; Global symbols used +;************************************************************************** + + xref __stack + xref _ez80_init + xref _ez80_initvectors + xref _ez80_initsysclk + xref _ez80_lowinit + xref __low_bss ; Low address of bss segment + xref __len_bss ; Length of bss segment + + xref __low_data ; Address of initialized data section + xref __low_romdata ; Addr of initialized data section in ROM + xref __len_data ; Length of initialized data section + + xref __copy_code_to_ram + xref __len_code + xref __low_code + xref __low_romcode + xref _os_start + xdef _ez80_startup + xdef _ez80_halt + +;************************************************************************** +; Code +;************************************************************************** + + segment CODE + .assume ADL=1 + +;************************************************************************** +; System reset start logic +;************************************************************************** + +_ez80_startup: + ; Set up the stack pointer at the location determined the lincmd + ; file + + ld sp, __stack + + ; Peform chip-specific initialization + + call _ez80_init + + ; initialize the interrupt vector table + + call _ez80_initvectors + + ; Initialize the system clock + + call _ez80_initsysclk + + ; Perform C initializations + ; Clear the uninitialized data section + + ld bc, __len_bss ; Check for non-zero length + ld a, __len_bss >> 16 + or a, c + or a, b + jr z, _ez80_bssdone ; BSS is zero-length ... + xor a, a + ld (__low_bss), a + sbc hl, hl ; hl = 0 + dec bc ; 1st byte's taken care of + sbc hl, bc + jr z, _ez80_bssdone ; Just 1 byte ... + ld hl, __low_bss ; reset hl + ld de, __low_bss + 1 ; [de] = bss + 1 + ldir +_ez80_bssdone: + + ; Copy the initialized data section + ld bc, __len_data ; [bc] = data length + ld a, __len_data >> 16 ; Check for non-zero length + or a, c + or a, b + jr z, _ez80_datadone ; __len_data is zero-length ... + ld hl, __low_romdata ; [hl] = data_copy + ld de, __low_data ; [de] = data + ldir ; Copy the data section +_ez80_datadone: + + ; Copy CODE (which may be in FLASH) to RAM if the + ; copy_code_to_ram symbol is set in the link control file + ld a, __copy_code_to_ram + or a, a + jr z, _ez80_codedone + ld bc, __len_code ; [bc] = code length + ld a, __len_code >> 16 ; Check for non-zero length + or a, c + or a, b + jr z, _ez80_codedone ; __len_code is zero-length + ld hl, __low_romcode ; [hl] = code_copy + ld de, __low_code ; [de] = code + ldir ; Copy the code section +_ez80_codedone: + + ; Perform board-specific intialization + + call _ez80_lowinit + + ; Then start NuttX + + call _os_start ; jump to the OS entry point + + ; NuttX will never return, but just in case... + +_ez80_halt: + halt ; We should never get here + jp _ez80_halt + diff --git a/nuttx/arch/z80/src/ez80/ez80_timerisr.c b/nuttx/arch/z80/src/ez80/ez80_timerisr.c index a251b57e7d..d29237e54c 100644 --- a/nuttx/arch/z80/src/ez80/ez80_timerisr.c +++ b/nuttx/arch/z80/src/ez80/ez80_timerisr.c @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80_vectors.asm b/nuttx/arch/z80/src/ez80/ez80_vectors.asm index 3e3d44ced6..eaec4b36fd 100644 --- a/nuttx/arch/z80/src/ez80/ez80_vectors.asm +++ b/nuttx/arch/z80/src/ez80/ez80_vectors.asm @@ -1,340 +1,340 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80_vectors.asm -; -; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - -;************************************************************************** -; Constants -;************************************************************************** - -NVECTORS EQU 64 ; max possible interrupt vectors - -;* Bits in the Z80 FLAGS register ***************************************** - -EZ80_C_FLAG EQU 01h ; Bit 0: Carry flag -EZ80_N_FLAG EQU 02h ; Bit 1: Add/Subtract flag -EZ80_PV_FLAG EQU 04h ; Bit 2: Parity/Overflow flag -EZ80_H_FLAG EQU 10h ; Bit 4: Half carry flag -EZ80_Z_FLAG EQU 40h ; Bit 5: Zero flag -EZ80_S_FLAG EQU 80h ; Bit 7: Sign flag - -;* The IRQ number to use for unused vectors - -EZ80_UNUSED EQU 40h - -;************************************************************************** -; Global Symbols Imported -;************************************************************************** - - xref _ez80_startup - xref _up_doirq - -;************************************************************************** -; Global Symbols Exported -;************************************************************************** - - xdef _ez80_reset - xdef _ez80_initvectors - xdef _ez80_handlers - xdef _ez80_rstcommon - xdef _ez80_initvectors - xdef _ez80_vectable - -;************************************************************************** -; Macros -;************************************************************************** - -; Define one reset handler -; 1. Disable interrupts -; 2. Dlear mixed memory mode (MADL) flag -; 3. jump to initialization procedure with jp.lil to set ADL -rstvector: macro - di - rsmix - jp.lil _ez80_startup - endmac rstvector - -; Define one interrupt handler -irqhandler: macro vectno - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #vectno ; A = vector number - jp _ez80_rstcommon ; Remaining RST handling is common - endmac irqhandler - -;************************************************************************** -; Reset entry points -;************************************************************************** - - define .RESET, space = ROM - segment .RESET - -_ez80_reset: -_rst0: - rstvector -_rst8: - rstvector -_rst10: - rstvector -_rst18: - rstvector -_rst20: - rstvector -_rst28: - rstvector -_rst30: - rstvector -_rst38: - rstvector - ds %26 -_nmi: - retn - -;************************************************************************** -; Startup logic -;************************************************************************** - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL=1 - -;************************************************************************** -; Interrupt Vector Handling -;************************************************************************** - - ; Symbol Val VecNo Addr - ;----------------- --- ----- ----- -_ez80_handlers: - irqhandler 0 ; EZ80_EMACRX_IRQ 0 0 0x040 - handlersize equ $-_ez80handlers - irqhandler 1 ; EZ80_EMACTX_IRQ 1 1 0x044 - irqhandler 2 ; EZ80_EMACSYS_IRQ 2 2 0x048 - irqhandler 3 ; EZ80_PLL_IRQ 3 3 0x04c - irqhandler 4 ; EZ80_FLASH_IRQ 4 4 0x050 - irqhandler 5 ; EZ80_TIMER0_IRQ 5 5 0x054 - irqhandler 6 ; EZ80_TIMER1_IRQ 6 6 0x058 - irqhandler 7 ; EZ80_TIMER2_IRQ 7 7 0x05c - irqhandler 8 ; EZ80_TIMER3_IRQ 8 8 0x060 - irqhandler EZ80_UNUSED ; 9 0x064 - irqhandler EZ80_UNUSED+1 ; 10 0x068 - irqhandler 9 ; EZ80_RTC_IRQ 9 11 0x06C - irqhandler 10 ; EZ80_UART0_IRQ 10 12 0x070 - irqhandler 11 ; EZ80_UART1_IRQ 11 13 0x074 - irqhandler 12 ; EZ80_I2C_IRQ 12 14 0x078 - irqhandler 13 ; EZ80_SPI_IRQ 13 15 0x07c - irqhandler 14 ; EZ80_PORTA0_IRQ 14 16 0x080 - irqhandler 15 ; EZ80_PORTA1_IRQ 15 17 0x084 - irqhandler 16 ; EZ80_PORTA2_IRQ 16 18 0x088 - irqhandler 17 ; EZ80_PORTA3_IRQ 17 19 0x08c - irqhandler 18 ; EZ80_PORTA4_IRQ 18 20 0x090 - irqhandler 19 ; EZ80_PORTA5_IRQ 19 21 0x094 - irqhandler 20 ; EZ80_PORTA6_IRQ 20 22 0x098 - irqhandler 21 ; EZ80_PORTA7_IRQ 21 23 0x09c - irqhandler 22 ; EZ80_PORTB0_IRQ 22 24 0x0a0 - irqhandler 23 ; EZ80_PORTB1_IRQ 23 25 0x0a4 - irqhandler 24 ; EZ80_PORTB2_IRQ 24 26 0x0a8 - irqhandler 25 ; EZ80_PORTB3_IRQ 25 27 0x0ac - irqhandler 26 ; EZ80_PORTB4_IRQ 26 28 0x0b0 - irqhandler 27 ; EZ80_PORTB5_IRQ 27 29 0x0b4 - irqhandler 28 ; EZ80_PORTB6_IRQ 28 20 0x0b8 - irqhandler 29 ; EZ80_PORTB7_IRQ 29 21 0x0bc - irqhandler 30 ; EZ80_PORTC0_IRQ 30 22 0x0c0 - irqhandler 31 ; EZ80_PORTC1_IRQ 31 23 0x0c4 - irqhandler 32 ; EZ80_PORTC2_IRQ 32 24 0x0c8 - irqhandler 33 ; EZ80_PORTC3_IRQ 33 25 0x0cc - irqhandler 34 ; EZ80_PORTC4_IRQ 34 26 0x0d0 - irqhandler 35 ; EZ80_PORTC5_IRQ 35 27 0x0d4 - irqhandler 36 ; EZ80_PORTC6_IRQ 36 28 0x0d8 - irqhandler 37 ; EZ80_PORTC7_IRQ 37 29 0x0dc - irqhandler 38 ; EZ80_PORTD0_IRQ 38 40 0x0e0 - irqhandler 39 ; EZ80_PORTD1_IRQ 39 41 0x0e4 - irqhandler 40 ; EZ80_PORTD2_IRQ 40 42 0x0e8 - irqhandler 41 ; EZ80_PORTD3_IRQ 41 43 0x0ec - irqhandler 42 ; EZ80_PORTD4_IRQ 42 44 0x0f0 - irqhandler 43 ; EZ80_PORTD5_IRQ 43 45 0x0f4 - irqhandler 44 ; EZ80_PORTD6_IRQ 44 46 0x0f8 - irqhandler 45 ; EZ80_PORTD7_IRQ 45 47 0x0fc - irqhandler EZ80_UNUSED+1 ; 48 0x100 - irqhandler EZ80_UNUSED+2 ; 49 0x104 - irqhandler EZ80_UNUSED+3 ; 50 0x108 - irqhandler EZ80_UNUSED+4 ; 51 0x10c - irqhandler EZ80_UNUSED+5 ; 52 0x110 - irqhandler EZ80_UNUSED+6 ; 53 0x114 - irqhandler EZ80_UNUSED+7 ; 54 0x118 - irqhandler EZ80_UNUSED+8 ; 55 0x11c - irqhandler EZ80_UNUSED+9 ; 56 0x120 - irqhandler EZ80_UNUSED+10 ; 57 0x124 - irqhandler EZ80_UNUSED+11 ; 58 0x128 - irqhandler EZ80_UNUSED+12 ; 59 0x12c - irqhandler EZ80_UNUSED+13 ; 60 0x130 - irqhandler EZ80_UNUSED+14 ; 61 0x134 - irqhandler EZ80_UNUSED+15 ; 62 0x138 - irqhandler EZ80_UNUSED+16 ; 63 0x13c - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_ez80_rstcommon: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*3) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred (3 for PC, AF, HL) - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ; At this point, we know that interrupts were enabled (or we wouldn't be here - ; so we can save a fake indicationn that will cause interrupts to restored when - ; this context is restored - - ld bc, #EZ80_PV_FLAG ; Parity bit. 1=parity odd, IEF2=1 - push bc ; Offset 0: I with interrupt state in parity - di ; (not necessary) - - ; Call the interrupt decode logic. SP points to the beggining of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - ld bc, #0 ; BC = reset number - ld c, a ; Save the reset number in C - push bc ; Argument #1 is the Reset number - call _up_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; Offset 8: Return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Set up for reti - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable: - ex af, af' ; Restore AF - reti - -;************************************************************************** -; Vector Setup Logic -;************************************************************************** - -_ez80_initvectors: - ; Initialize the vector table - - ld iy, _ez80_vectable - ld ix, 4 - ld bc, 4 - ld b, NVECTORS - xor a, a ; Clear carry - ld hl, handlersize - ld de, _ez80_handlers - sbc hl, de ; Length of irq handler in hl - ld d, h - ld e, l - ld hl, _ez80_handlers ; Start of handlers in hl - - ld a, 0 -$1: - ld (iy), hl ; Store IRQ handler - ld (iy+3), a ; Pad to 4 bytes - add hl, de ; Point to next handler - push de - ld de, 4 - add iy, de ; Point to next entry in vector table - pop de - djnz $1 ; Loop until all vectors have been written - - ; Select interrupt mode 2 - - im 2 ; Interrupt mode 2 - - ; Write the address of the vector table into the interrupt vector base - - ld hl, _ez80_vectable >> 8 - ld i, hl - ret - -;************************************************************************** -; Vector Table -;************************************************************************** -; This segment must be aligned on a 512 byte boundary anywhere in RAM -; Each entry will be a 3-byte address in a 4-byte space - - define .IVECTS, space = RAM, align = 200h - segment .IVECTS - - ; The first 64 bytes are not used... the vectors actually start at +0x40 -_ez80_vecreserve: - ds 64 -_ez80_vectable: - ds NVECTORS * 4 +;************************************************************************** +; arch/z80/src/ez80/ez80_vectors.asm +; +; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + +;************************************************************************** +; Constants +;************************************************************************** + +NVECTORS EQU 64 ; max possible interrupt vectors + +;* Bits in the Z80 FLAGS register ***************************************** + +EZ80_C_FLAG EQU 01h ; Bit 0: Carry flag +EZ80_N_FLAG EQU 02h ; Bit 1: Add/Subtract flag +EZ80_PV_FLAG EQU 04h ; Bit 2: Parity/Overflow flag +EZ80_H_FLAG EQU 10h ; Bit 4: Half carry flag +EZ80_Z_FLAG EQU 40h ; Bit 5: Zero flag +EZ80_S_FLAG EQU 80h ; Bit 7: Sign flag + +;* The IRQ number to use for unused vectors + +EZ80_UNUSED EQU 40h + +;************************************************************************** +; Global Symbols Imported +;************************************************************************** + + xref _ez80_startup + xref _up_doirq + +;************************************************************************** +; Global Symbols Exported +;************************************************************************** + + xdef _ez80_reset + xdef _ez80_initvectors + xdef _ez80_handlers + xdef _ez80_rstcommon + xdef _ez80_initvectors + xdef _ez80_vectable + +;************************************************************************** +; Macros +;************************************************************************** + +; Define one reset handler +; 1. Disable interrupts +; 2. Dlear mixed memory mode (MADL) flag +; 3. jump to initialization procedure with jp.lil to set ADL +rstvector: macro + di + rsmix + jp.lil _ez80_startup + endmac rstvector + +; Define one interrupt handler +irqhandler: macro vectno + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #vectno ; A = vector number + jp _ez80_rstcommon ; Remaining RST handling is common + endmac irqhandler + +;************************************************************************** +; Reset entry points +;************************************************************************** + + define .RESET, space = ROM + segment .RESET + +_ez80_reset: +_rst0: + rstvector +_rst8: + rstvector +_rst10: + rstvector +_rst18: + rstvector +_rst20: + rstvector +_rst28: + rstvector +_rst30: + rstvector +_rst38: + rstvector + ds %26 +_nmi: + retn + +;************************************************************************** +; Startup logic +;************************************************************************** + + define .STARTUP, space = ROM + segment .STARTUP + .assume ADL=1 + +;************************************************************************** +; Interrupt Vector Handling +;************************************************************************** + + ; Symbol Val VecNo Addr + ;----------------- --- ----- ----- +_ez80_handlers: + irqhandler 0 ; EZ80_EMACRX_IRQ 0 0 0x040 + handlersize equ $-_ez80handlers + irqhandler 1 ; EZ80_EMACTX_IRQ 1 1 0x044 + irqhandler 2 ; EZ80_EMACSYS_IRQ 2 2 0x048 + irqhandler 3 ; EZ80_PLL_IRQ 3 3 0x04c + irqhandler 4 ; EZ80_FLASH_IRQ 4 4 0x050 + irqhandler 5 ; EZ80_TIMER0_IRQ 5 5 0x054 + irqhandler 6 ; EZ80_TIMER1_IRQ 6 6 0x058 + irqhandler 7 ; EZ80_TIMER2_IRQ 7 7 0x05c + irqhandler 8 ; EZ80_TIMER3_IRQ 8 8 0x060 + irqhandler EZ80_UNUSED ; 9 0x064 + irqhandler EZ80_UNUSED+1 ; 10 0x068 + irqhandler 9 ; EZ80_RTC_IRQ 9 11 0x06C + irqhandler 10 ; EZ80_UART0_IRQ 10 12 0x070 + irqhandler 11 ; EZ80_UART1_IRQ 11 13 0x074 + irqhandler 12 ; EZ80_I2C_IRQ 12 14 0x078 + irqhandler 13 ; EZ80_SPI_IRQ 13 15 0x07c + irqhandler 14 ; EZ80_PORTA0_IRQ 14 16 0x080 + irqhandler 15 ; EZ80_PORTA1_IRQ 15 17 0x084 + irqhandler 16 ; EZ80_PORTA2_IRQ 16 18 0x088 + irqhandler 17 ; EZ80_PORTA3_IRQ 17 19 0x08c + irqhandler 18 ; EZ80_PORTA4_IRQ 18 20 0x090 + irqhandler 19 ; EZ80_PORTA5_IRQ 19 21 0x094 + irqhandler 20 ; EZ80_PORTA6_IRQ 20 22 0x098 + irqhandler 21 ; EZ80_PORTA7_IRQ 21 23 0x09c + irqhandler 22 ; EZ80_PORTB0_IRQ 22 24 0x0a0 + irqhandler 23 ; EZ80_PORTB1_IRQ 23 25 0x0a4 + irqhandler 24 ; EZ80_PORTB2_IRQ 24 26 0x0a8 + irqhandler 25 ; EZ80_PORTB3_IRQ 25 27 0x0ac + irqhandler 26 ; EZ80_PORTB4_IRQ 26 28 0x0b0 + irqhandler 27 ; EZ80_PORTB5_IRQ 27 29 0x0b4 + irqhandler 28 ; EZ80_PORTB6_IRQ 28 20 0x0b8 + irqhandler 29 ; EZ80_PORTB7_IRQ 29 21 0x0bc + irqhandler 30 ; EZ80_PORTC0_IRQ 30 22 0x0c0 + irqhandler 31 ; EZ80_PORTC1_IRQ 31 23 0x0c4 + irqhandler 32 ; EZ80_PORTC2_IRQ 32 24 0x0c8 + irqhandler 33 ; EZ80_PORTC3_IRQ 33 25 0x0cc + irqhandler 34 ; EZ80_PORTC4_IRQ 34 26 0x0d0 + irqhandler 35 ; EZ80_PORTC5_IRQ 35 27 0x0d4 + irqhandler 36 ; EZ80_PORTC6_IRQ 36 28 0x0d8 + irqhandler 37 ; EZ80_PORTC7_IRQ 37 29 0x0dc + irqhandler 38 ; EZ80_PORTD0_IRQ 38 40 0x0e0 + irqhandler 39 ; EZ80_PORTD1_IRQ 39 41 0x0e4 + irqhandler 40 ; EZ80_PORTD2_IRQ 40 42 0x0e8 + irqhandler 41 ; EZ80_PORTD3_IRQ 41 43 0x0ec + irqhandler 42 ; EZ80_PORTD4_IRQ 42 44 0x0f0 + irqhandler 43 ; EZ80_PORTD5_IRQ 43 45 0x0f4 + irqhandler 44 ; EZ80_PORTD6_IRQ 44 46 0x0f8 + irqhandler 45 ; EZ80_PORTD7_IRQ 45 47 0x0fc + irqhandler EZ80_UNUSED+1 ; 48 0x100 + irqhandler EZ80_UNUSED+2 ; 49 0x104 + irqhandler EZ80_UNUSED+3 ; 50 0x108 + irqhandler EZ80_UNUSED+4 ; 51 0x10c + irqhandler EZ80_UNUSED+5 ; 52 0x110 + irqhandler EZ80_UNUSED+6 ; 53 0x114 + irqhandler EZ80_UNUSED+7 ; 54 0x118 + irqhandler EZ80_UNUSED+8 ; 55 0x11c + irqhandler EZ80_UNUSED+9 ; 56 0x120 + irqhandler EZ80_UNUSED+10 ; 57 0x124 + irqhandler EZ80_UNUSED+11 ; 58 0x128 + irqhandler EZ80_UNUSED+12 ; 59 0x12c + irqhandler EZ80_UNUSED+13 ; 60 0x130 + irqhandler EZ80_UNUSED+14 ; 61 0x134 + irqhandler EZ80_UNUSED+15 ; 62 0x138 + irqhandler EZ80_UNUSED+16 ; 63 0x13c + +;************************************************************************** +; Common Interrupt handler +;************************************************************************** + +_ez80_rstcommon: + ; Create a register frame. SP points to top of frame + 4, pushes + ; decrement the stack pointer. Already have + ; + ; Offset 8: Return PC is already on the stack + ; Offset 7: AF (retaining flags) + ; + ; IRQ number is in A + + push hl ; Offset 6: HL + ld hl, #(3*3) ; HL is the value of the stack pointer before + add hl, sp ; the interrupt occurred (3 for PC, AF, HL) + push hl ; Offset 5: Stack pointer + push iy ; Offset 4: IY + push ix ; Offset 3: IX + push de ; Offset 2: DE + push bc ; Offset 1: BC + + ; At this point, we know that interrupts were enabled (or we wouldn't be here + ; so we can save a fake indicationn that will cause interrupts to restored when + ; this context is restored + + ld bc, #EZ80_PV_FLAG ; Parity bit. 1=parity odd, IEF2=1 + push bc ; Offset 0: I with interrupt state in parity + di ; (not necessary) + + ; Call the interrupt decode logic. SP points to the beggining of the reg structure + + ld hl, #0 ; Argument #2 is the beginning of the reg structure + add hl, sp ; + push hl ; Place argument #2 at the top of stack + ld bc, #0 ; BC = reset number + ld c, a ; Save the reset number in C + push bc ; Argument #1 is the Reset number + call _up_doirq ; Decode the IRQ + + ; On return, HL points to the beginning of the reg structure to restore + ; Note that (1) the arguments pushed on the stack are not popped, and (2) the + ; original stack pointer is lost. In the normal case (no context switch), + ; HL will contain the value of the SP before the arguments were pushed. + + ld sp, hl ; Use the new stack pointer + + ; Restore registers. HL points to the beginning of the reg structure to restore + + ex af, af' ; Select alternate AF + pop af ; Offset 0: AF' = I with interrupt state in parity + ex af, af' ; Restore original AF + pop bc ; Offset 1: BC + pop de ; Offset 2: DE + pop ix ; Offset 3: IX + pop iy ; Offset 4: IY + exx ; Use alternate BC/DE/HL + pop hl ; Offset 5: HL' = Stack pointer after return + exx ; Restore original BC/DE/HL + pop hl ; Offset 6: HL + pop af ; Offset 7: AF + + ; Restore the stack pointer + + exx ; Use alternate BC/DE/HL + pop de ; Offset 8: Return address + ld sp, hl ; Set SP = saved stack pointer value before return + push de ; Set up for reti + exx ; Restore original BC/DE/HL + + ; Restore interrupt state + + ex af, af' ; Recover interrupt state + jp po, nointenable ; Odd parity, IFF2=0, means disabled + ex af, af' ; Restore AF (before enabling interrupts) + ei ; yes + reti +nointenable: + ex af, af' ; Restore AF + reti + +;************************************************************************** +; Vector Setup Logic +;************************************************************************** + +_ez80_initvectors: + ; Initialize the vector table + + ld iy, _ez80_vectable + ld ix, 4 + ld bc, 4 + ld b, NVECTORS + xor a, a ; Clear carry + ld hl, handlersize + ld de, _ez80_handlers + sbc hl, de ; Length of irq handler in hl + ld d, h + ld e, l + ld hl, _ez80_handlers ; Start of handlers in hl + + ld a, 0 +$1: + ld (iy), hl ; Store IRQ handler + ld (iy+3), a ; Pad to 4 bytes + add hl, de ; Point to next handler + push de + ld de, 4 + add iy, de ; Point to next entry in vector table + pop de + djnz $1 ; Loop until all vectors have been written + + ; Select interrupt mode 2 + + im 2 ; Interrupt mode 2 + + ; Write the address of the vector table into the interrupt vector base + + ld hl, _ez80_vectable >> 8 + ld i, hl + ret + +;************************************************************************** +; Vector Table +;************************************************************************** +; This segment must be aligned on a 512 byte boundary anywhere in RAM +; Each entry will be a 3-byte address in a 4-byte space + + define .IVECTS, space = RAM, align = 200h + segment .IVECTS + + ; The first 64 bytes are not used... the vectors actually start at +0x40 +_ez80_vecreserve: + ds 64 +_ez80_vectable: + ds NVECTORS * 4 diff --git a/nuttx/arch/z80/src/ez80/ez80f91.h b/nuttx/arch/z80/src/ez80/ez80f91.h index ec15d8f250..490c7f9231 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91.h +++ b/nuttx/arch/z80/src/ez80/ez80f91.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/ez80f91.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80f91_emac.h b/nuttx/arch/z80/src/ez80/ez80f91_emac.h index 61f2e7f5a4..ddd8299a0e 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91_emac.h +++ b/nuttx/arch/z80/src/ez80/ez80f91_emac.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/ez80f91_emac.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80f91_i2c.h b/nuttx/arch/z80/src/ez80/ez80f91_i2c.h index 20ffb513a8..f0d6cda4d2 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91_i2c.h +++ b/nuttx/arch/z80/src/ez80/ez80f91_i2c.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/ez80f91_i2c.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/ez80f91_init.asm b/nuttx/arch/z80/src/ez80/ez80f91_init.asm index 422c14f2dc..17ef5f2952 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91_init.asm +++ b/nuttx/arch/z80/src/ez80/ez80f91_init.asm @@ -1,257 +1,257 @@ -;************************************************************************** -; arch/z80/src/ez80/ez80f91_init.asm -; -; Copyright (C) 2008 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - -;************************************************************************** -; Included Files -;************************************************************************** - - include "ez80f91.inc" - -;************************************************************************** -; Constants -;************************************************************************** - -;PLL_DIV_L EQU %5C -;PLL_DIV_H EQU %5D -;PLL_CTL0 EQU %5E -;PLL_CTL1 EQU %5F - -OSC EQU 0 -PLL EQU 1 -RTC EQU 2 - -CLK_MUX_OSC EQU %00 -CLK_MUX_PLL EQU %01 -CLK_MUX_RTC EQU %02 - -CHRP_CTL_0 EQU %00 -CHRP_CTL_1 EQU %40 -CHRP_CTL_2 EQU %80 -CHRP_CTL_3 EQU %C0 - -LDS_CTL_0 EQU %00 -LDS_CTL_1 EQU %04 -LDS_CTL_2 EQU %08 -LDS_CTL_3 EQU %0C - -LCK_STATUS EQU %20 -INT_LOCK EQU %10 -INT_UNLOCK EQU %08 -INT_LOCK_EN EQU %04 -INT_UNLOCK_EN EQU %02 -PLL_ENABLE EQU %01 - -;************************************************************************** -; Global symbols used -;************************************************************************** - -; Exported symbols - xdef _ez80_init - xdef _ez80_initsysclk - -; Imported symbols - xref __CS0_LBR_INIT_PARAM - xref __CS0_UBR_INIT_PARAM - xref __CS0_CTL_INIT_PARAM - xref __CS1_LBR_INIT_PARAM - xref __CS1_UBR_INIT_PARAM - xref __CS1_CTL_INIT_PARAM - xref __CS2_LBR_INIT_PARAM - xref __CS2_UBR_INIT_PARAM - xref __CS2_CTL_INIT_PARAM - xref __CS3_LBR_INIT_PARAM - xref __CS3_UBR_INIT_PARAM - xref __CS3_CTL_INIT_PARAM - xref __CS0_BMC_INIT_PARAM - xref __CS1_BMC_INIT_PARAM - xref __CS2_BMC_INIT_PARAM - xref __CS3_BMC_INIT_PARAM - xref __FLASH_CTL_INIT_PARAM - xref __FLASH_ADDR_U_INIT_PARAM - xref __RAM_CTL_INIT_PARAM - xref __RAM_ADDR_U_INIT_PARAM - xref _SYS_CLK_SRC - xref _SYS_CLK_FREQ - xref _OSC_FREQ - xref _OSC_FREQ_MULT - xref __PLL_CTL0_INIT_PARAM - -;************************************************************************** -; Chip-specific initialization logic -;************************************************************************** -; Minimum default initialization for eZ80F91 - - define .STARTUP, space = ROM - segment .STARTUP - .assume ADL = 1 - -_ez80_init: - ; Disable internal peripheral interrupt sources - - ld a, %ff - out0 (PA_DDR), a ; GPIO - out0 (PB_DDR), a - out0 (PC_DDR), a - out0 (PD_DDR), a - ld a, %00 - out0 (PA_ALT1), a - out0 (PB_ALT1), a - out0 (PC_ALT1), a - out0 (PD_ALT1), a - out0 (PA_ALT2), a - out0 (PB_ALT2), a - out0 (PC_ALT2), a - out0 (PD_ALT2), a - out0 (PLL_CTL1), a ; PLL - out0 (TMR0_IER), a ; timers - out0 (TMR1_IER), a - out0 (TMR2_IER), a - out0 (TMR3_IER), a - out0 (UART0_IER), a ; UARTs - out0 (UART1_IER), a - out0 (I2C_CTL), a ; I2C - out0 (EMAC_IEN), a ; EMAC - out0 (FLASH_IRQ), a ; Flash - ld a, %04 - out0 (SPI_CTL), a ; SPI - in0 a, (RTC_CTRL) ; RTC, - and a, %be - out0 (RTC_CTRL), a - - ; Configure external memory/io - - ld a, __CS0_LBR_INIT_PARAM - out0 (CS0_LBR), a - ld a, __CS0_UBR_INIT_PARAM - out0 (CS0_UBR), a - ld a, __CS0_BMC_INIT_PARAM - out0 (CS0_BMC), a - ld a, __CS0_CTL_INIT_PARAM - out0 (CS0_CTL), a - - ld a, __CS1_LBR_INIT_PARAM - out0 (CS1_LBR), a - ld a, __CS1_UBR_INIT_PARAM - out0 (CS1_UBR), a - ld a, __CS1_BMC_INIT_PARAM - out0 (CS1_BMC), a - ld a, __CS1_CTL_INIT_PARAM - out0 (CS1_CTL), a - - ld a, __CS2_LBR_INIT_PARAM - out0 (CS2_LBR), a - ld a, __CS2_UBR_INIT_PARAM - out0 (CS2_UBR), a - ld a, __CS2_BMC_INIT_PARAM - out0 (CS2_BMC), a - ld a, __CS2_CTL_INIT_PARAM - out0 (CS2_CTL), a - - ld a, __CS3_LBR_INIT_PARAM - out0 (CS3_LBR), a - ld a, __CS3_UBR_INIT_PARAM - out0 (CS3_UBR), a - ld a, __CS3_BMC_INIT_PARAM - out0 (CS3_BMC), a - ld a, __CS3_CTL_INIT_PARAM - out0 (CS3_CTL), a - - ; Enable internal memory - - ld a, __FLASH_ADDR_U_INIT_PARAM - out0 (FLASH_ADDR_U), a - ld a, __FLASH_CTL_INIT_PARAM - out0 (FLASH_CTRL), a - - ld a, __RAM_ADDR_U_INIT_PARAM - out0 (RAM_ADDR_U), a - ld a, __RAM_CTL_INIT_PARAM - out0 (RAM_CTL), a - ret - -;***************************************************************************** -; eZ80F91 System Clock Initialization -;***************************************************************************** - -_ez80_initsysclk: - ; check if the PLL should be used - ld a, (_ez80_sysclksrc) - cp a, PLL - jr nz, _ez80_initsysclkdone - - ; Load PLL divider - - ld a, (_ez80_oscfreqmult) ;CR 6202 - out0 (PLL_DIV_L), a - ld a, (_ez80_oscfreqmult+1) - out0 (PLL_DIV_H), a - - ; Set charge pump and lock criteria - - ld a, __PLL_CTL0_INIT_PARAM - and a, %CC ; mask off reserved and clock source bits - out0 (PLL_CTL0), a - - ; Enable PLL - - in0 a, (PLL_CTL1) - set 0, a - out0 (PLL_CTL1), a - - ; Wait for PLL to lock -_ez80_initsysclkwait: - in0 a, (PLL_CTL1) - and a, LCK_STATUS - cp a, LCK_STATUS - jr nz, _ez80_initsysclkwait - - ; Select PLL as system clock source - - ld a, __PLL_CTL0_INIT_PARAM - set 0, a - out0 (PLL_CTL0), a - -_ez80_initsysclkdone: - ret - -;_ez80_oscfreq: -; dl _OSC_FREQ -_ez80_oscfreqmult: - dw _OSC_FREQ_MULT -;_ez80_sysclkfreq: -; dl _SYS_CLK_FREQ -_ez80_sysclksrc: - db _SYS_CLK_SRC +;************************************************************************** +; arch/z80/src/ez80/ez80f91_init.asm +; +; Copyright (C) 2008 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + +;************************************************************************** +; Included Files +;************************************************************************** + + include "ez80f91.inc" + +;************************************************************************** +; Constants +;************************************************************************** + +;PLL_DIV_L EQU %5C +;PLL_DIV_H EQU %5D +;PLL_CTL0 EQU %5E +;PLL_CTL1 EQU %5F + +OSC EQU 0 +PLL EQU 1 +RTC EQU 2 + +CLK_MUX_OSC EQU %00 +CLK_MUX_PLL EQU %01 +CLK_MUX_RTC EQU %02 + +CHRP_CTL_0 EQU %00 +CHRP_CTL_1 EQU %40 +CHRP_CTL_2 EQU %80 +CHRP_CTL_3 EQU %C0 + +LDS_CTL_0 EQU %00 +LDS_CTL_1 EQU %04 +LDS_CTL_2 EQU %08 +LDS_CTL_3 EQU %0C + +LCK_STATUS EQU %20 +INT_LOCK EQU %10 +INT_UNLOCK EQU %08 +INT_LOCK_EN EQU %04 +INT_UNLOCK_EN EQU %02 +PLL_ENABLE EQU %01 + +;************************************************************************** +; Global symbols used +;************************************************************************** + +; Exported symbols + xdef _ez80_init + xdef _ez80_initsysclk + +; Imported symbols + xref __CS0_LBR_INIT_PARAM + xref __CS0_UBR_INIT_PARAM + xref __CS0_CTL_INIT_PARAM + xref __CS1_LBR_INIT_PARAM + xref __CS1_UBR_INIT_PARAM + xref __CS1_CTL_INIT_PARAM + xref __CS2_LBR_INIT_PARAM + xref __CS2_UBR_INIT_PARAM + xref __CS2_CTL_INIT_PARAM + xref __CS3_LBR_INIT_PARAM + xref __CS3_UBR_INIT_PARAM + xref __CS3_CTL_INIT_PARAM + xref __CS0_BMC_INIT_PARAM + xref __CS1_BMC_INIT_PARAM + xref __CS2_BMC_INIT_PARAM + xref __CS3_BMC_INIT_PARAM + xref __FLASH_CTL_INIT_PARAM + xref __FLASH_ADDR_U_INIT_PARAM + xref __RAM_CTL_INIT_PARAM + xref __RAM_ADDR_U_INIT_PARAM + xref _SYS_CLK_SRC + xref _SYS_CLK_FREQ + xref _OSC_FREQ + xref _OSC_FREQ_MULT + xref __PLL_CTL0_INIT_PARAM + +;************************************************************************** +; Chip-specific initialization logic +;************************************************************************** +; Minimum default initialization for eZ80F91 + + define .STARTUP, space = ROM + segment .STARTUP + .assume ADL = 1 + +_ez80_init: + ; Disable internal peripheral interrupt sources + + ld a, %ff + out0 (PA_DDR), a ; GPIO + out0 (PB_DDR), a + out0 (PC_DDR), a + out0 (PD_DDR), a + ld a, %00 + out0 (PA_ALT1), a + out0 (PB_ALT1), a + out0 (PC_ALT1), a + out0 (PD_ALT1), a + out0 (PA_ALT2), a + out0 (PB_ALT2), a + out0 (PC_ALT2), a + out0 (PD_ALT2), a + out0 (PLL_CTL1), a ; PLL + out0 (TMR0_IER), a ; timers + out0 (TMR1_IER), a + out0 (TMR2_IER), a + out0 (TMR3_IER), a + out0 (UART0_IER), a ; UARTs + out0 (UART1_IER), a + out0 (I2C_CTL), a ; I2C + out0 (EMAC_IEN), a ; EMAC + out0 (FLASH_IRQ), a ; Flash + ld a, %04 + out0 (SPI_CTL), a ; SPI + in0 a, (RTC_CTRL) ; RTC, + and a, %be + out0 (RTC_CTRL), a + + ; Configure external memory/io + + ld a, __CS0_LBR_INIT_PARAM + out0 (CS0_LBR), a + ld a, __CS0_UBR_INIT_PARAM + out0 (CS0_UBR), a + ld a, __CS0_BMC_INIT_PARAM + out0 (CS0_BMC), a + ld a, __CS0_CTL_INIT_PARAM + out0 (CS0_CTL), a + + ld a, __CS1_LBR_INIT_PARAM + out0 (CS1_LBR), a + ld a, __CS1_UBR_INIT_PARAM + out0 (CS1_UBR), a + ld a, __CS1_BMC_INIT_PARAM + out0 (CS1_BMC), a + ld a, __CS1_CTL_INIT_PARAM + out0 (CS1_CTL), a + + ld a, __CS2_LBR_INIT_PARAM + out0 (CS2_LBR), a + ld a, __CS2_UBR_INIT_PARAM + out0 (CS2_UBR), a + ld a, __CS2_BMC_INIT_PARAM + out0 (CS2_BMC), a + ld a, __CS2_CTL_INIT_PARAM + out0 (CS2_CTL), a + + ld a, __CS3_LBR_INIT_PARAM + out0 (CS3_LBR), a + ld a, __CS3_UBR_INIT_PARAM + out0 (CS3_UBR), a + ld a, __CS3_BMC_INIT_PARAM + out0 (CS3_BMC), a + ld a, __CS3_CTL_INIT_PARAM + out0 (CS3_CTL), a + + ; Enable internal memory + + ld a, __FLASH_ADDR_U_INIT_PARAM + out0 (FLASH_ADDR_U), a + ld a, __FLASH_CTL_INIT_PARAM + out0 (FLASH_CTRL), a + + ld a, __RAM_ADDR_U_INIT_PARAM + out0 (RAM_ADDR_U), a + ld a, __RAM_CTL_INIT_PARAM + out0 (RAM_CTL), a + ret + +;***************************************************************************** +; eZ80F91 System Clock Initialization +;***************************************************************************** + +_ez80_initsysclk: + ; check if the PLL should be used + ld a, (_ez80_sysclksrc) + cp a, PLL + jr nz, _ez80_initsysclkdone + + ; Load PLL divider + + ld a, (_ez80_oscfreqmult) ;CR 6202 + out0 (PLL_DIV_L), a + ld a, (_ez80_oscfreqmult+1) + out0 (PLL_DIV_H), a + + ; Set charge pump and lock criteria + + ld a, __PLL_CTL0_INIT_PARAM + and a, %CC ; mask off reserved and clock source bits + out0 (PLL_CTL0), a + + ; Enable PLL + + in0 a, (PLL_CTL1) + set 0, a + out0 (PLL_CTL1), a + + ; Wait for PLL to lock +_ez80_initsysclkwait: + in0 a, (PLL_CTL1) + and a, LCK_STATUS + cp a, LCK_STATUS + jr nz, _ez80_initsysclkwait + + ; Select PLL as system clock source + + ld a, __PLL_CTL0_INIT_PARAM + set 0, a + out0 (PLL_CTL0), a + +_ez80_initsysclkdone: + ret + +;_ez80_oscfreq: +; dl _OSC_FREQ +_ez80_oscfreqmult: + dw _OSC_FREQ_MULT +;_ez80_sysclkfreq: +; dl _SYS_CLK_FREQ +_ez80_sysclksrc: + db _SYS_CLK_SRC end \ No newline at end of file diff --git a/nuttx/arch/z80/src/ez80/ez80f91_spi.h b/nuttx/arch/z80/src/ez80/ez80f91_spi.h index e27df2693a..9fa42917b2 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91_spi.h +++ b/nuttx/arch/z80/src/ez80/ez80f91_spi.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/ez80f91_spi.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/switch.h b/nuttx/arch/z80/src/ez80/switch.h index 3b7f1bd95f..de6506490c 100644 --- a/nuttx/arch/z80/src/ez80/switch.h +++ b/nuttx/arch/z80/src/ez80/switch.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/switch.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/ez80/up_mem.h b/nuttx/arch/z80/src/ez80/up_mem.h index 724facbd37..6242470226 100644 --- a/nuttx/arch/z80/src/ez80/up_mem.h +++ b/nuttx/arch/z80/src/ez80/up_mem.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/up_mem.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/mkhpbase.sh b/nuttx/arch/z80/src/mkhpbase.sh index 48647e822c..1d7acb7d56 100755 --- a/nuttx/arch/z80/src/mkhpbase.sh +++ b/nuttx/arch/z80/src/mkhpbase.sh @@ -3,7 +3,7 @@ # arch/z80/src/mkhpbase.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/Make.defs b/nuttx/arch/z80/src/z8/Make.defs index ae4f2a48c9..5d7a338bec 100644 --- a/nuttx/arch/z80/src/z8/Make.defs +++ b/nuttx/arch/z80/src/z8/Make.defs @@ -2,7 +2,7 @@ # arch/z80/src/z8/Make.defs # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/chip.h b/nuttx/arch/z80/src/z8/chip.h index 7635c0407c..4951a27fab 100644 --- a/nuttx/arch/z80/src/z8/chip.h +++ b/nuttx/arch/z80/src/z8/chip.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/switch.h b/nuttx/arch/z80/src/z8/switch.h index c37d7bcd02..7738f24362 100644 --- a/nuttx/arch/z80/src/z8/switch.h +++ b/nuttx/arch/z80/src/z8/switch.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/switch.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/up_mem.h b/nuttx/arch/z80/src/z8/up_mem.h index 42ad293a83..681805e66b 100644 --- a/nuttx/arch/z80/src/z8/up_mem.h +++ b/nuttx/arch/z80/src/z8/up_mem.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/up_mem.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_head.S b/nuttx/arch/z80/src/z8/z8_head.S index 550409632d..7fcd905044 100755 --- a/nuttx/arch/z80/src/z8/z8_head.S +++ b/nuttx/arch/z80/src/z8/z8_head.S @@ -1,253 +1,253 @@ -/************************************************************************** - * arch/z80/src/z8/z8_head.S - * ez8 Reset Entry Point - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS - * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include -#include - -/************************************************************************** - * Definitions - **************************************************************************/ - -/* Assume the large model */ - -#if !defined(CONFIG_Z8_MODEL_LARGE) && !defined(CONFIG_Z8_MODEL_SMALL) -# define CONFIG_Z8_MODEL_LARGE 1 -# undef CONFIG_Z8_MODEL_SMALL -#endif - -#ifdef __Z8F1680 -# define CONFIG_Z8_COPYPRAM -#else -# undef CONFIG_Z8_COPYPRAM -#endif - - -/************************************************************************** - * External References / External Definitions - **************************************************************************/ - - xref _z16f_clkinit:ROM - xref _z16f_lowinit:ROM -#ifdef CONFIG_ARCH_LEDS - xref _up_ledinit:ROM -#endif - xref _os_start:ROM - xref _up_doirq:ROM - xref _low_nearbss - xref _len_nearbss - xref _low_farbss - xref _len_farbss - xref _low_neardata - xref _len_neardata - xref _low_near_romdata - xref _low_fardata - xref _len_fardata - xref _low_far_romdata -#ifdef CONFIG_Z8_COPYPRAM - xref _low_pramseg - xref _len_pramseg - xref _low_pram_romdata -#endif - xref _far_stacktop - xdef _z8_reset - xdef __intrp - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/************************************************************************** - * Interrupt Vectors - **************************************************************************/ - - /* Reset vector */ - - vector RESET = _z8_reset - -/************************************************************************** - * Name: _z16f_reset - * - * Description: - * Reset entry point - * - **************************************************************************/ - - define startup, space=rom - segment startup -_z8_reset: - /* Set the register pointer for working registers e0-ef */ - - srp #%e0 - - /* Initialize the stack pointer */ - - ldx spl, #low(_far_stacktop+1) - ldx sph, #high(_far_stacktop+1) - - /* Clear internal register ram area (c_nearbss) */ - - ld r0, #_low_nearbss - ld r2, #_len_nearbss - cp r2, #0 - jr z, _z8_reset2 - -_z8_reset1: - clr @r0 - inc r0 - djnz r2, _z8_reset1 - - /* Clear extended ram area (c_farbss) */ - -_z8_reset2: - ld r2, #high(_low_farbss) - ld r3, #low(_low_farbss) - ld r0, #high(_len_farbss) - ld r1, #low(_len_farbss) - - ld r4, r0 - or r4, r1 - jr z, _z8_reset4 - clr r4 - -_z8_reset3: - ldx @rr2,r4 - incw rr2 - decw rr0 - jr nz, _z8_reset3 - - /* Copy ROM data into internal RAM */ - -_z8_reset4: -#ifdef CONFIG_Z8_COPYNEARDATA - ld r0, #high(_low_near_romdata) - ld r1, #low(_low_near_romdata) - ld r3, #_len_neardata - ld r4, #_low_neardata - cp r3, #0 - jr z, _z8_reset6 - -_z8_reset5: - ldci @r4, @rr0 - djnz r3, _z8_reset5 - -_z8_reset6: -#endif - /* Copy ROM data into extended RAM */ - - ld r0, #high(_low_fardata) - ld r1, #low(_low_fardata) - ld r2, #high(_low_far_romdata) - ld r3, #low(_low_far_romdata) - ld r4, #high(_len_fardata) - ld r5, #low(_len_fardata) - - ld r6, r4 - or r6, r5 - jr z, _z8_reset8 - -_z8_reset7: - ldc r6, @rr2 - ldx @rr0, r6 - incw rr0 - incw rr2 - decw rr4 - jr nz, _z8_reset7 - - /* Copy ROM copy of code into Program RAM */ - -_z8_reset8: -#ifdef CONFIG_Z8_COPYPRAM - ld r0, #high(_low_pramseg) - ld r1, #low(_low_pramseg) - ld r2, #high(_low_pram_romdata) - ld r3, #low(_low_pram_romdata) - ld r4, #high(_len_pramseg) - ld r5, #low(_len_pramseg) - - ld r6, r4 - or r6, r5 - jr z, _z8_reset10 - -_z8_reset9: - ldc r6, @rr2 - ldc @rr0, r6 - incw rr0 - incw rr2 - decw rr4 - jr nz, _z8_reset9 - -_z8_reset10: -#endif - - /* Start NuttX */ - - ldx __intrp,#0 - xor r15, r15 - xor r14, r14 - call _os_start - - /* We should never get here */ - -_z8_reset_halt: - jr _z8_reset_halt - -/************************************************************************** - * Data - **************************************************************************/ - -#ifdef CONFIG_Z8_MODEL_LARGE - segment FAR_BSS -__intrp ds 1 -#else - segment NEAR_BSS -__intrp ds 1 -#endif - - /* Set aside area for working registers */ - - define workingreg, space=rdata, org=%e0 - segment workingreg - ds %10 - - end _z8_reset +/************************************************************************** + * arch/z80/src/z8/z8_head.S + * ez8 Reset Entry Point + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS + * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************/ + +/************************************************************************** + * Included Files + **************************************************************************/ + +#include +#include +#include +#include + +/************************************************************************** + * Definitions + **************************************************************************/ + +/* Assume the large model */ + +#if !defined(CONFIG_Z8_MODEL_LARGE) && !defined(CONFIG_Z8_MODEL_SMALL) +# define CONFIG_Z8_MODEL_LARGE 1 +# undef CONFIG_Z8_MODEL_SMALL +#endif + +#ifdef __Z8F1680 +# define CONFIG_Z8_COPYPRAM +#else +# undef CONFIG_Z8_COPYPRAM +#endif + + +/************************************************************************** + * External References / External Definitions + **************************************************************************/ + + xref _z16f_clkinit:ROM + xref _z16f_lowinit:ROM +#ifdef CONFIG_ARCH_LEDS + xref _up_ledinit:ROM +#endif + xref _os_start:ROM + xref _up_doirq:ROM + xref _low_nearbss + xref _len_nearbss + xref _low_farbss + xref _len_farbss + xref _low_neardata + xref _len_neardata + xref _low_near_romdata + xref _low_fardata + xref _len_fardata + xref _low_far_romdata +#ifdef CONFIG_Z8_COPYPRAM + xref _low_pramseg + xref _len_pramseg + xref _low_pram_romdata +#endif + xref _far_stacktop + xdef _z8_reset + xdef __intrp + +/************************************************************************** + * Code + **************************************************************************/ + + segment CODE + +/************************************************************************** + * Interrupt Vectors + **************************************************************************/ + + /* Reset vector */ + + vector RESET = _z8_reset + +/************************************************************************** + * Name: _z16f_reset + * + * Description: + * Reset entry point + * + **************************************************************************/ + + define startup, space=rom + segment startup +_z8_reset: + /* Set the register pointer for working registers e0-ef */ + + srp #%e0 + + /* Initialize the stack pointer */ + + ldx spl, #low(_far_stacktop+1) + ldx sph, #high(_far_stacktop+1) + + /* Clear internal register ram area (c_nearbss) */ + + ld r0, #_low_nearbss + ld r2, #_len_nearbss + cp r2, #0 + jr z, _z8_reset2 + +_z8_reset1: + clr @r0 + inc r0 + djnz r2, _z8_reset1 + + /* Clear extended ram area (c_farbss) */ + +_z8_reset2: + ld r2, #high(_low_farbss) + ld r3, #low(_low_farbss) + ld r0, #high(_len_farbss) + ld r1, #low(_len_farbss) + + ld r4, r0 + or r4, r1 + jr z, _z8_reset4 + clr r4 + +_z8_reset3: + ldx @rr2,r4 + incw rr2 + decw rr0 + jr nz, _z8_reset3 + + /* Copy ROM data into internal RAM */ + +_z8_reset4: +#ifdef CONFIG_Z8_COPYNEARDATA + ld r0, #high(_low_near_romdata) + ld r1, #low(_low_near_romdata) + ld r3, #_len_neardata + ld r4, #_low_neardata + cp r3, #0 + jr z, _z8_reset6 + +_z8_reset5: + ldci @r4, @rr0 + djnz r3, _z8_reset5 + +_z8_reset6: +#endif + /* Copy ROM data into extended RAM */ + + ld r0, #high(_low_fardata) + ld r1, #low(_low_fardata) + ld r2, #high(_low_far_romdata) + ld r3, #low(_low_far_romdata) + ld r4, #high(_len_fardata) + ld r5, #low(_len_fardata) + + ld r6, r4 + or r6, r5 + jr z, _z8_reset8 + +_z8_reset7: + ldc r6, @rr2 + ldx @rr0, r6 + incw rr0 + incw rr2 + decw rr4 + jr nz, _z8_reset7 + + /* Copy ROM copy of code into Program RAM */ + +_z8_reset8: +#ifdef CONFIG_Z8_COPYPRAM + ld r0, #high(_low_pramseg) + ld r1, #low(_low_pramseg) + ld r2, #high(_low_pram_romdata) + ld r3, #low(_low_pram_romdata) + ld r4, #high(_len_pramseg) + ld r5, #low(_len_pramseg) + + ld r6, r4 + or r6, r5 + jr z, _z8_reset10 + +_z8_reset9: + ldc r6, @rr2 + ldc @rr0, r6 + incw rr0 + incw rr2 + decw rr4 + jr nz, _z8_reset9 + +_z8_reset10: +#endif + + /* Start NuttX */ + + ldx __intrp,#0 + xor r15, r15 + xor r14, r14 + call _os_start + + /* We should never get here */ + +_z8_reset_halt: + jr _z8_reset_halt + +/************************************************************************** + * Data + **************************************************************************/ + +#ifdef CONFIG_Z8_MODEL_LARGE + segment FAR_BSS +__intrp ds 1 +#else + segment NEAR_BSS +__intrp ds 1 +#endif + + /* Set aside area for working registers */ + + define workingreg, space=rdata, org=%e0 + segment workingreg + ds %10 + + end _z8_reset diff --git a/nuttx/arch/z80/src/z8/z8_i2c.c b/nuttx/arch/z80/src/z8/z8_i2c.c index be4a94eb02..e90bd40365 100755 --- a/nuttx/arch/z80/src/z8/z8_i2c.c +++ b/nuttx/arch/z80/src/z8/z8_i2c.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_i2c.c * * Copyright(C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_initialstate.c b/nuttx/arch/z80/src/z8/z8_initialstate.c index 794446aacb..706347da9e 100644 --- a/nuttx/arch/z80/src/z8/z8_initialstate.c +++ b/nuttx/arch/z80/src/z8/z8_initialstate.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_irq.c b/nuttx/arch/z80/src/z8/z8_irq.c index be732fe83e..82ab4d60ca 100644 --- a/nuttx/arch/z80/src/z8/z8_irq.c +++ b/nuttx/arch/z80/src/z8/z8_irq.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_irq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_registerdump.c b/nuttx/arch/z80/src/z8/z8_registerdump.c index d9ccdf48f8..36b6cdd379 100644 --- a/nuttx/arch/z80/src/z8/z8_registerdump.c +++ b/nuttx/arch/z80/src/z8/z8_registerdump.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_registerdump.c * * Copyright (C) 2008-2009,2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_restorecontext.S b/nuttx/arch/z80/src/z8/z8_restorecontext.S index 4cdd0d3d0c..88e29781c1 100755 --- a/nuttx/arch/z80/src/z8/z8_restorecontext.S +++ b/nuttx/arch/z80/src/z8/z8_restorecontext.S @@ -1,164 +1,164 @@ -/************************************************************************** - * arch/z80/src/z8/z8_saveusercontext.S - * Save the state of the current user thread - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS - * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include - -/************************************************************************** - * Definitions - **************************************************************************/ - - xdef _z8_restorecontext - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/**************************************************************************** - * Name: _z8_restorecontext - * - * Description: - * Restore the task context that was previously saved via - * _z8_saveusercontext() or by interrupt handling. Unlike the - * _z8_saveusercontext() counterpart, we do not know the context of the - * restored task and, hence, we must handle the worst case -- restore - * everythihng. - * - * Parameters: - * On entry, the following stack organization is assumed: - * - * Pointer to the context save structure - * TOS -> Return address (2) - * - * Assumptions: - * Large model, dynamic frames - * - **************************************************************************/ - -_z8_restorecontext: - /* Disable all interrupts because we are going to be using - * the IRQ register set. - */ - - di - - /* Switch to IRQ register set */ - - srp #%f0 - - /* Get the rr0 = the current value of the stack pointer */ - - ldx r0, sph /* rr0 = stack pointer */ - ldx r1, spl - - /* Get rr6 = the pointer to the context save structure */ - - ldx r6, 2(rr0) /* rr6 = pointer to context structure */ - ldx r7, 3(rr0) - - /* Copy all registers into the user register area. NOTE: we - * use the saved RP value to determine the destination adress. - */ - - clr r0 /* rr0 = destination address */ - ldx r1, XCPT_RP_OFFS(rr6) - ld r2, r6 /* rr2 = source address */ - ld r3, r7 - ld r4, #16 /* r4 = number of bytes to copy */ - -_z8_restore: - ldx r5, @rr2 - ldx @rr0, r5 - incw rr0 - incw rr2 - djnz r4, _z8_restore - - /* Set the new stack pointer */ - - ldx r0, XCPT_SPH_OFFS(rr6) - ldx r1, XCPT_SPL_OFFS(rr6) - ldx sph, r0 - ldx spl, r1 - - /* Push the return address onto the stack */ - - ldx r0, XCPT_PCH_OFFS(rr6) - ldx r1, XCPT_PCL_OFFS(rr6) - push r1 - push r0 - - /* Recover the flags and RP settings.. but don't restore them yet */ - - ldx r1, XCPT_FLAGS_OFFS(rr6) - ldx r2, XCPT_RP_OFFS(rr6) - - /* Determine whether interrupts must be enabled on return. This - * would be nicer to do below, but later we will need to preserve - * the condition codes in the flags. - */ - - ldx r0, XCPT_IRQCTL_OFFS(rr6) - tm r0, #%80 - jr nz, _z8_returnenabled - - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page and return with interrupts disabled */ - - ldx rp, r2 /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_returnenabled: - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page, re-enable interrupts and return */ - - ldx rp, r2 /* Does not effect flags */ - ei /* Does not effect flags */ - ret /* Does not effect flags */ - - end +/************************************************************************** + * arch/z80/src/z8/z8_saveusercontext.S + * Save the state of the current user thread + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS + * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************/ + +/************************************************************************** + * Included Files + **************************************************************************/ + +#include +#include +#include + +/************************************************************************** + * Definitions + **************************************************************************/ + + xdef _z8_restorecontext + +/************************************************************************** + * Code + **************************************************************************/ + + segment CODE + +/**************************************************************************** + * Name: _z8_restorecontext + * + * Description: + * Restore the task context that was previously saved via + * _z8_saveusercontext() or by interrupt handling. Unlike the + * _z8_saveusercontext() counterpart, we do not know the context of the + * restored task and, hence, we must handle the worst case -- restore + * everythihng. + * + * Parameters: + * On entry, the following stack organization is assumed: + * + * Pointer to the context save structure + * TOS -> Return address (2) + * + * Assumptions: + * Large model, dynamic frames + * + **************************************************************************/ + +_z8_restorecontext: + /* Disable all interrupts because we are going to be using + * the IRQ register set. + */ + + di + + /* Switch to IRQ register set */ + + srp #%f0 + + /* Get the rr0 = the current value of the stack pointer */ + + ldx r0, sph /* rr0 = stack pointer */ + ldx r1, spl + + /* Get rr6 = the pointer to the context save structure */ + + ldx r6, 2(rr0) /* rr6 = pointer to context structure */ + ldx r7, 3(rr0) + + /* Copy all registers into the user register area. NOTE: we + * use the saved RP value to determine the destination adress. + */ + + clr r0 /* rr0 = destination address */ + ldx r1, XCPT_RP_OFFS(rr6) + ld r2, r6 /* rr2 = source address */ + ld r3, r7 + ld r4, #16 /* r4 = number of bytes to copy */ + +_z8_restore: + ldx r5, @rr2 + ldx @rr0, r5 + incw rr0 + incw rr2 + djnz r4, _z8_restore + + /* Set the new stack pointer */ + + ldx r0, XCPT_SPH_OFFS(rr6) + ldx r1, XCPT_SPL_OFFS(rr6) + ldx sph, r0 + ldx spl, r1 + + /* Push the return address onto the stack */ + + ldx r0, XCPT_PCH_OFFS(rr6) + ldx r1, XCPT_PCL_OFFS(rr6) + push r1 + push r0 + + /* Recover the flags and RP settings.. but don't restore them yet */ + + ldx r1, XCPT_FLAGS_OFFS(rr6) + ldx r2, XCPT_RP_OFFS(rr6) + + /* Determine whether interrupts must be enabled on return. This + * would be nicer to do below, but later we will need to preserve + * the condition codes in the flags. + */ + + ldx r0, XCPT_IRQCTL_OFFS(rr6) + tm r0, #%80 + jr nz, _z8_returnenabled + + /* Restore the flag settings */ + + ldx flags, r1 + + /* Restore the user register page and return with interrupts disabled */ + + ldx rp, r2 /* Does not effect flags */ + ret /* Does not effect flags */ + +_z8_returnenabled: + /* Restore the flag settings */ + + ldx flags, r1 + + /* Restore the user register page, re-enable interrupts and return */ + + ldx rp, r2 /* Does not effect flags */ + ei /* Does not effect flags */ + ret /* Does not effect flags */ + + end diff --git a/nuttx/arch/z80/src/z8/z8_saveirqcontext.c b/nuttx/arch/z80/src/z8/z8_saveirqcontext.c index 2d3fb7aa2f..ea206c9dd3 100644 --- a/nuttx/arch/z80/src/z8/z8_saveirqcontext.c +++ b/nuttx/arch/z80/src/z8/z8_saveirqcontext.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_saveirqcontext.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_saveusercontext.S b/nuttx/arch/z80/src/z8/z8_saveusercontext.S index 314cf3e77a..e553515505 100755 --- a/nuttx/arch/z80/src/z8/z8_saveusercontext.S +++ b/nuttx/arch/z80/src/z8/z8_saveusercontext.S @@ -1,165 +1,165 @@ -/************************************************************************** - * arch/z80/src/z8/z8_saveusercontext.S - * Save the state of the current user thread - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS - * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include -#include - -/************************************************************************** - * Definitions - **************************************************************************/ - - xdef _z8_saveusercontext - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/**************************************************************************** - * Name: _z8_saveusercontext - * - * Description: - * Save the current state of the user thread. Since this function is - * called from user code, it is only necessary to save the parts of the - * context that must be preserved between function calls. This includes - * - * - Frame pointer (r14, r15) - * - Register pointer (RP) - * - Interrupt state (flags) - * - Stack pointer (sph, spl) - * - Return address - * - * Parameters: - * On entry, the following stack organization is assumed: - * - * Pointer to the context save structure - * TOS -> Return address (2) - * - * Assumptions: - * Large model, dynamic frames - * - **************************************************************************/ - -_z8_saveusercontext: - /* Get the rr6 = the current value of the stack pointer */ - - ldx r6, sph /* rr6 = stack pointer */ - ldx r7, spl - - /* Get rr2 = the pointer to the context save structure */ - - ldx r2, 2(rr6) /* rr2 = pointer to context structure */ - ldx r3, 3(rr6) - - /* Get the value currently in the interrupt control register. - * Bit 7 (IRQE) determines whether or not interrupts are - * currently enabled (0:disabled, 1:enabled) - */ - - ldx r4, IRQCTL /* r4 = IRQCTL value */ - - /* Disable all interrupts so that there can be no concurrent - * modification of the TCB state save area. - */ - - di - - /* Fetch and save the return address from the stack */ - - ldx r0, @rr6 /* rr0 = return address */ - ldx r1, 1(rr6) - ldx XCPT_PCH_OFFS(rr2), r0 - ldx XCPT_PCL_OFFS(rr2), r1 - - /* Fetch and save the register pointer */ - - ldx r0, rp /* r0 = register pointer */ - ldx XCPT_RP_OFFS(rr2), r0 - - /* Calculate the value of the stack pointer on return - * from this function - */ - - ld r1, #3 /* rr0 = 3 */ - clr r0 - add r1, r7 /* rr0 = SP + 3 */ - adc r0, r6 - ldx XCPT_SPH_OFFS(rr2), r0 - ldx XCPT_SPL_OFFS(rr2), r1 - - /* Save the IRQCTL register value */ - - clr r0 - ldx XCPT_UNUSED_OFFS(rr2), r0 - ldx XCPT_IRQCTL_OFFS(rr2), r4 - - /* Save the frame pointer (rr14) in the context structure */ - - ldx XCPT_R14_OFFS(rr2), r14 - ldx XCPT_R15_OFFS(rr2), r15 - - /* Set the return value of 1 in the context structure. When the - * state is restored (via z8_restorecontext() or an interrupt - * return), the return value of 1 distinguishes the no-context- - * switch case. - */ - - /* clr r0 */ - ld r1, #1 - ldx XCPT_R0_OFFS(rr2), r0 - ldx XCPT_R1_OFFS(rr2), r1 - - /* Setup to return zero for the no-context-switch case */ - - /* clr r0 */ - clr r1 - - /* Now decide if we need to re-enable interrupts or not */ - - tm r4, #%80 - jr z, _z8_noenable - ei -_z8_noenable: - ret - - end - +/************************************************************************** + * arch/z80/src/z8/z8_saveusercontext.S + * Save the state of the current user thread + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS + * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************/ + +/************************************************************************** + * Included Files + **************************************************************************/ + +#include +#include +#include + +/************************************************************************** + * Definitions + **************************************************************************/ + + xdef _z8_saveusercontext + +/************************************************************************** + * Code + **************************************************************************/ + + segment CODE + +/**************************************************************************** + * Name: _z8_saveusercontext + * + * Description: + * Save the current state of the user thread. Since this function is + * called from user code, it is only necessary to save the parts of the + * context that must be preserved between function calls. This includes + * + * - Frame pointer (r14, r15) + * - Register pointer (RP) + * - Interrupt state (flags) + * - Stack pointer (sph, spl) + * - Return address + * + * Parameters: + * On entry, the following stack organization is assumed: + * + * Pointer to the context save structure + * TOS -> Return address (2) + * + * Assumptions: + * Large model, dynamic frames + * + **************************************************************************/ + +_z8_saveusercontext: + /* Get the rr6 = the current value of the stack pointer */ + + ldx r6, sph /* rr6 = stack pointer */ + ldx r7, spl + + /* Get rr2 = the pointer to the context save structure */ + + ldx r2, 2(rr6) /* rr2 = pointer to context structure */ + ldx r3, 3(rr6) + + /* Get the value currently in the interrupt control register. + * Bit 7 (IRQE) determines whether or not interrupts are + * currently enabled (0:disabled, 1:enabled) + */ + + ldx r4, IRQCTL /* r4 = IRQCTL value */ + + /* Disable all interrupts so that there can be no concurrent + * modification of the TCB state save area. + */ + + di + + /* Fetch and save the return address from the stack */ + + ldx r0, @rr6 /* rr0 = return address */ + ldx r1, 1(rr6) + ldx XCPT_PCH_OFFS(rr2), r0 + ldx XCPT_PCL_OFFS(rr2), r1 + + /* Fetch and save the register pointer */ + + ldx r0, rp /* r0 = register pointer */ + ldx XCPT_RP_OFFS(rr2), r0 + + /* Calculate the value of the stack pointer on return + * from this function + */ + + ld r1, #3 /* rr0 = 3 */ + clr r0 + add r1, r7 /* rr0 = SP + 3 */ + adc r0, r6 + ldx XCPT_SPH_OFFS(rr2), r0 + ldx XCPT_SPL_OFFS(rr2), r1 + + /* Save the IRQCTL register value */ + + clr r0 + ldx XCPT_UNUSED_OFFS(rr2), r0 + ldx XCPT_IRQCTL_OFFS(rr2), r4 + + /* Save the frame pointer (rr14) in the context structure */ + + ldx XCPT_R14_OFFS(rr2), r14 + ldx XCPT_R15_OFFS(rr2), r15 + + /* Set the return value of 1 in the context structure. When the + * state is restored (via z8_restorecontext() or an interrupt + * return), the return value of 1 distinguishes the no-context- + * switch case. + */ + + /* clr r0 */ + ld r1, #1 + ldx XCPT_R0_OFFS(rr2), r0 + ldx XCPT_R1_OFFS(rr2), r1 + + /* Setup to return zero for the no-context-switch case */ + + /* clr r0 */ + clr r1 + + /* Now decide if we need to re-enable interrupts or not */ + + tm r4, #%80 + jr z, _z8_noenable + ei +_z8_noenable: + ret + + end + diff --git a/nuttx/arch/z80/src/z8/z8_schedulesigaction.c b/nuttx/arch/z80/src/z8/z8_schedulesigaction.c index 1f1a354712..7a5f666159 100644 --- a/nuttx/arch/z80/src/z8/z8_schedulesigaction.c +++ b/nuttx/arch/z80/src/z8/z8_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_schedulesigaction.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_sigdeliver.c b/nuttx/arch/z80/src/z8/z8_sigdeliver.c index c5cf30aa6a..d1153a4978 100644 --- a/nuttx/arch/z80/src/z8/z8_sigdeliver.c +++ b/nuttx/arch/z80/src/z8/z8_sigdeliver.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_sigdeliver.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_timerisr.c b/nuttx/arch/z80/src/z8/z8_timerisr.c index a317cf3b9c..0ed61e2836 100644 --- a/nuttx/arch/z80/src/z8/z8_timerisr.c +++ b/nuttx/arch/z80/src/z8/z8_timerisr.c @@ -2,7 +2,7 @@ * arch/z80/src/z8/z8_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z8/z8_vector.S b/nuttx/arch/z80/src/z8/z8_vector.S index 2d1381dfff..1802415217 100755 --- a/nuttx/arch/z80/src/z8/z8_vector.S +++ b/nuttx/arch/z80/src/z8/z8_vector.S @@ -1,873 +1,873 @@ -/************************************************************************** - * arch/z80/src/z8/z8_xdef.S - * Interrupt Handling - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS - * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************/ - -/************************************************************************** - * Included Files - **************************************************************************/ - -#include -#include - -#include -#include - -/************************************************************************** - * Definitions - **************************************************************************/ - -/************************************************************************** - * External References / External Definitions - **************************************************************************/ - - xref _up_doirq:ROM - -#if defined(ENCORE_VECTORS) - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if EZ8_ADC=1 - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_TIMER4=1 - xdef _z8_timer3_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif -if EZ8_DMA=1 - xdef _z8_dma_handler -endif -if EZ8_PORT1=0 - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_TIMER4=1 - xdef _z8_timer3_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif -if EZ8_DMA=1 - xdef _z8_dma_handler -endif -if (EZ8_PORT1=0) - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler -endif - xdef _z8_potrap_handler - xdef _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler -if EZ8_TIMER3=1 - xdef _z8_timer2_handler -endif - xdef _z8_timer1_handler - xdef _z8_timer0_handler -if EZ8_UART0=1 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif -if EZ8_ESPI=1 - xdef _z8_spi_handler -endif -if EZ8_ADC_NEW=1 - xdef _z8_adc_handler -endif - xdef _z8_p7ad_handler - xdef _z8_p6ad_handler - xdef _z8_p5ad_handler - xdef _z8_p4ad_handler - xdef _z8_p3ad_handler - xdef _z8_p2ad_handler - xdef _z8_p1ad_handler - xdef _z8_p0ad_handler -if EZ8_MCT=1 - xdef _z8_mct_handler -endif -if EZ8_UART1=1 - xdef _z8_uart1rx_handler - xdef _z8_uart1tx_handler -endif - xdef _z8_c3_handler - xdef _z8_c2_handler - xdef _z8_c1_handler - xdef _z8_c0_handler - xdef _z8_potrap_handler - xdef _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - - xdef _z8_wdt_handler - xdef _z8_trap_handler - xdef _z8_pwmtimer_handler - xdef _z8_pwmfault_handler -if EZ8_ADC_NEW=1 - xdef _z8_adc_handler -endif - xdef _z8_cmp_handler - xdef _z8_timer0_handler -if EZ8_UART0 - xdef _z8_uart0rx_handler - xdef _z8_uart0tx_handler -endif -if EZ8_SPI=1 - xdef _z8_spi_handler -endif -if EZ8_I2C=1 - xdef _z8_i2c_handler -endif - xdef _z8_c0_handler - xdef _z8_pb_handler - xdef _z8_p7ap3a_handler - xdef _z8_p6ap2a_handler - xdef _z8_p5ap1a_handler - xdef _z8_p4ap0a_handler - xdef _z8_potrap_handler - xdef _z8_wotrap_handler -#endif - -/************************************************************************** - * Macros - **************************************************************************/ - -ENTER : MACRO val - pushx rp /* Save the current RP value in the stack */ - srp #%f0 /* Load the interrupt register pointer */ - ld r0, #val /* Pass the new value in r0 */ - jr _z8_common_handler /* The rest of the handling is common */ - ENDMAC ENTER - -LEAVE : MACRO - popx rp /* Restore the user register pointer */ - iret /* And return from interrupt */ - ENDMAC LEAVE - -/************************************************************************** - * Code - **************************************************************************/ - - segment CODE - -/************************************************************************** - * Interrupt Vectors - **************************************************************************/ - -#if defined(ENCORE_VECTORS) - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_ADC=1 - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_TIMER4=1 - vector TIMER3 = _z8_timer3_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif -if EZ8_DMA=1 - vector DMA = _z8_dma_handler -endif -if EZ8_PORT1=0 - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_TIMER4=1 - vector TIMER3 = _z8_timer3_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif -if EZ8_DMA=1 - vector DMA = _z8_dma_handler -endif -if EZ8_PORT1=0 - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler -endif - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler -if EZ8_TIMER3=1 - vector TIMER2 = _z8_timer2_handler -endif - vector TIMER1 = _z8_timer1_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0=1 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif -if EZ8_ESPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_ADC_NEW=1 - vector ADC = _z8_adc_handler -endif - vector P7AD = _z8_p7ad_handler - vector P6AD = _z8_p6ad_handler - vector P5AD = _z8_p5ad_handler - vector P4AD = _z8_p4ad_handler - vector P3AD = _z8_p3ad_handler - vector P2AD = _z8_p2ad_handler - vector P1AD = _z8_p1ad_handler - vector P0AD = _z8_p0ad_handler -if EZ8_MCT=1 - vector MCT = _z8_mct_handler -endif -if EZ8_UART1=1 - vector UART1_RX = _z8_uart1rx_handler - vector UART1_TX = _z8_uart1tx_handler -endif - vector C3 = _z8_c3_handler - vector C2 = _z8_c2_handler - vector C1 = _z8_c1_handler - vector C0 = _z8_c0_handler - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - - vector WDT = _z8_wdt_handler - vector TRAP = _z8_trap_handler - vector PWMTIMER = _z8_pwmtimer_handler - vector PWMFAULT = _z8_pwmfault_handler -if EZ8_ADC_NEW=1 - vector ADC = _z8_adc_handler -endif - vector CMP = _z8_cmp_handler - vector TIMER0 = _z8_timer0_handler -if EZ8_UART0 - vector UART0_RX = _z8_uart0rx_handler - vector UART0_TX = _z8_uart0tx_handler -endif -if EZ8_SPI=1 - vector SPI = _z8_spi_handler -endif -if EZ8_I2C=1 - vector I2C = _z8_i2c_handler -endif - vector C0 = _z8_c0_handler - vector PB = _z8_pb_handler - vector P7A = _z8_p7ap3a_handler - vector P6A = _z8_p6ap2a_handler - vector P5A = _z8_p5ap1a_handler - vector P4A = _z8_p4ap0a_handler - vector POTRAP = _z8_potrap_handler - vector WOTRAP = _z8_wotrap_handler -#endif - -/************************************************************************** - * Name: _z16f_*_handler - * - * Description: - * Map individual interrupts into interrupt number and branch to common - * interrupt handling logic. If higher interrupt handling performance - * for particular interrupts is required, then those interrupts should - * be picked off here and handled outside of the common logic. - * - * On entry to any of these handlers, the stack contains the following: - * - * TOS before interrupt - * PC[7:0] - * PC[15:8] - * SP -> Flags Register - * - **************************************************************************/ - -#if defined(ENCORE_VECTORS) -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_ADC=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_TIMER4=1 -_z8_timer3_handler: - ENTER(Z8_TIMER3_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -if EZ8_DMA=1 -_z8_dma_handler: - ENTER(Z8_DMA_IRQ) -endif -if EZ8_PORT1=0 -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -endif - -/**************************************************************************/ - -#elif defined(ENCORE_XP_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_TIMER4=1 -_z8_timer3_handler: - ENTER(Z8_TIMER3_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -if EZ8_DMA=1 -_z8_dma_handler: - ENTER(Z8_DMA_IRQ) -endif -if EZ8_PORT1=0 -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -endif -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) - -/**************************************************************************/ - -#elif defined(ENCORE_XP16K_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -if EZ8_TIMER3=1 -_z8_timer2_handler: - ENTER(Z8_TIMER2_IRQ) -endif -_z8_timer1_handler: - ENTER(Z8_TIMER1_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0=1 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -if EZ8_ESPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_ADC_NEW=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_p7ad_handler: - ENTER(Z8_P7AD_IRQ) -_z8_p6ad_handler: - ENTER(Z8_P6AD_IRQ) -_z8_p5ad_handler: - ENTER(Z8_P5AD_IRQ) -_z8_p4ad_handler: - ENTER(Z8_P4AD_IRQ) -_z8_p3ad_handler: - ENTER(Z8_P3AD_IRQ) -_z8_p2ad_handler: - ENTER(Z8_P2AD_IRQ) -_z8_p1ad_handler: - ENTER(Z8_P1AD_IRQ) -_z8_p0ad_handler: - ENTER(Z8_P0AD_IRQ) -if EZ8_MCT=1 -_z8_mct_handler: - ENTER(Z8_MCT_IRQ) -endif -if EZ8_UART1=1 -_z8_uart1rx_handler: - ENTER(Z8_UART1_RX_IRQ) -_z8_uart1tx_handler: - ENTER(Z8_UART1_TX_IRQ) -endif -_z8_c3_handler: - ENTER(Z8_C3_IRQ) -_z8_c2_handler: - ENTER(Z8_C2_IRQ) -_z8_c1_handler: - ENTER(Z8_C1_IRQ) -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) - -/**************************************************************************/ - -#elif defined(ENCORE_MC_VECTORS) - -_z8_wdt_handler: - ENTER(Z8_WDT_IRQ) -_z8_trap_handler: - ENTER(Z8_TRAP_IRQ) -_z8_pwmtimer_handler: - ENTER(Z8_PWMTIMER_IRQ) -_z8_pwmfault_handler: - ENTER(Z8_PWMFAULT_IRQ) -if EZ8_ADC_NEW=1 -_z8_adc_handler: - ENTER(Z8_ADC_IRQ) -endif -_z8_cmp_handler: - ENTER(Z8_CMP_IRQ) -_z8_timer0_handler: - ENTER(Z8_TIMER0_IRQ) -if EZ8_UART0 -_z8_uart0rx_handler: - ENTER(Z8_UART0_RX_IRQ) -_z8_uart0tx_handler: - ENTER(Z8_UART0_TX_IRQ) -endif -if EZ8_SPI=1 -_z8_spi_handler: - ENTER(Z8_SPI_IRQ) -endif -if EZ8_I2C=1 -_z8_i2c_handler: - ENTER(Z8_I2C_IRQ) -endif -_z8_c0_handler: - ENTER(Z8_C0_IRQ) -_z8_pb_handler: - ENTER(Z8_PB_IRQ) -_z8_p7ap3a_handler: - ENTER(Z8_P7A_IRQ) -_z8_p6ap2a_handler: - ENTER(Z8_P6AP2A_IRQ) -_z8_p5ap1a_handler: - ENTER(Z8_P5AP1A_IRQ) -_z8_p4ap0a_handler: - ENTER(Z8_P4AP0A_IRQ) -_z8_potrap_handler: - ENTER(Z8_POTRAP_IRQ) -_z8_wotrap_handler: - ENTER(Z8_WOTRAP_IRQ) -#endif - -/************************************************************************** - * Name: _z16f_common_handler - * - * Description: - * Common IRQ handling logic - * - * On entry, the stack contains the following: - * - * TOS before interrupt - * PC[7:0] - * PC[15:8] - * Flags Register - * SP -> RP - * - * R0 holds the IRQ number and the RP has been reset to %f0 - * - **************************************************************************/ - -_z8_common_handler: - /* Pass the address of the IRQ stack frame */ - - ldx r2, sph /* rr2 = stack pointer */ - ldx r3, spl - push r3 /* Pass as a parameter */ - push r2 - - /* Pass the IRQ number */ - - push r0 - - /* Process the interrupt */ - - call _up_doirq /* Call the IRQ handler */ - - /* Release arguments from the stack */ - - pop r4 /* Discard the IRQ argument */ - pop r2 /* Recover the stack pointer parameter */ - pop r3 - - /* If a interrupt level context switch occurred, then the - * return value will be the same as the input value - */ - - cp r0, r2 /* Same as the return value? */ - jr nz, _z8_switch - cp r1, r3 - jr z, _z8_noswitch - - /* A context switch occurs. Restore the use context. - * rr0 = pointer to context structgure. - */ - -_z8_switch: - - /* Destroy the interrupt return information on the stack */ - - pop r4 /* Destroy saved RP */ - pop r4 /* Destroy saved flags */ - pop r4 /* Destroy saved return address */ - pop r4 - - /* Copy all registers into the user register area. */ - - clr r2 /* rr2 = destination address */ - ldx r3, XCPT_RP_OFFS(rr0) - ld r4, r0 /* rr4 = source address */ - ld r5, r1 - ld r6, #16 /* r6 = number of bytes to copy */ - -_z8_restore: - ldx r7, @rr4 - ldx @rr2, r7 - incw rr2 - incw rr4 - djnz r6, _z8_restore - - /* Set the new stack pointer */ - - ldx r2, XCPT_SPH_OFFS(rr0) - ldx r3, XCPT_SPL_OFFS(rr0) - ldx sph, r2 - ldx spl, r3 - - /* Push the return address onto the stack */ - - ldx r2, XCPT_PCH_OFFS(rr0) - ldx r3, XCPT_PCL_OFFS(rr0) - push r3 - push r2 - - /* Recover the flags and RP settings.. but don't restore them yet */ - - ldx r3, XCPT_FLAGS_OFFS(rr0) - ldx r4, XCPT_RP_OFFS(rr0) - - /* Determine whether interrupts must be enabled on return. This - * would be nicer to do below, but later we will need to preserve - * the condition codes in the flags. - */ - - ldx r2, XCPT_IRQCTL_OFFS(rr0) - tm r2, #%80 - jr nz, _z8_returnenabled - - /* Restore the flag settings */ - - ldx flags, r3 - - /* Restore the user register page and return with interrupts disabled. - * Note that we cannot use the iret instruction because it unconditionally - * re-enabled interrupts - */ - - ldx rp, r4 /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_returnenabled: - /* Restore the flag settings */ - - ldx flags, r1 - - /* Restore the user register page, re-enable interrupts and return. - * Note that we cannot use the iret instruction because it unconditionally - * re-enabled interrupts - */ - - ldx rp, r4 /* Does not effect flags */ - ei /* Does not effect flags */ - ret /* Does not effect flags */ - -_z8_noswitch: - LEAVE - -/************************************************************************** - * Data - **************************************************************************/ - - /* Set aside area for interrupt registers */ - - define interruptreg, space=rdata, org=%f0 - segment interruptreg - ds %10 - - end _z8_common_handler +/************************************************************************** + * arch/z80/src/z8/z8_xdef.S + * Interrupt Handling + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS or IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER or CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, or CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS or SERVICES; LOSS + * OF USE, DATA, or PROFITS; or BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, or TORT (INCLUDING NEGLIGENCE or OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************/ + +/************************************************************************** + * Included Files + **************************************************************************/ + +#include +#include + +#include +#include + +/************************************************************************** + * Definitions + **************************************************************************/ + +/************************************************************************** + * External References / External Definitions + **************************************************************************/ + + xref _up_doirq:ROM + +#if defined(ENCORE_VECTORS) + xdef _z8_wdt_handler + xdef _z8_trap_handler +if EZ8_TIMER3=1 + xdef _z8_timer2_handler +endif + xdef _z8_timer1_handler + xdef _z8_timer0_handler +if EZ8_UART0=1 + xdef _z8_uart0rx_handler + xdef _z8_uart0tx_handler +endif +if EZ8_I2C=1 + xdef _z8_i2c_handler +endif +if EZ8_SPI=1 + xdef _z8_spi_handler +endif +if EZ8_ADC=1 + xdef _z8_adc_handler +endif + xdef _z8_p7ad_handler + xdef _z8_p6ad_handler + xdef _z8_p5ad_handler + xdef _z8_p4ad_handler + xdef _z8_p3ad_handler + xdef _z8_p2ad_handler + xdef _z8_p1ad_handler + xdef _z8_p0ad_handler +if EZ8_TIMER4=1 + xdef _z8_timer3_handler +endif +if EZ8_UART1=1 + xdef _z8_uart1rx_handler + xdef _z8_uart1tx_handler +endif +if EZ8_DMA=1 + xdef _z8_dma_handler +endif +if EZ8_PORT1=0 + xdef _z8_c3_handler + xdef _z8_c2_handler + xdef _z8_c1_handler + xdef _z8_c0_handler +endif + +/**************************************************************************/ + +#elif defined(ENCORE_XP_VECTORS) + + xdef _z8_wdt_handler + xdef _z8_trap_handler +if EZ8_TIMER3=1 + xdef _z8_timer2_handler +endif + xdef _z8_timer1_handler + xdef _z8_timer0_handler +if EZ8_UART0=1 + xdef _z8_uart0rx_handler + xdef _z8_uart0tx_handler +endif +if EZ8_I2C=1 + xdef _z8_i2c_handler +endif +if EZ8_SPI=1 + xdef _z8_spi_handler +endif +if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) + xdef _z8_adc_handler +endif + xdef _z8_p7ad_handler + xdef _z8_p6ad_handler + xdef _z8_p5ad_handler + xdef _z8_p4ad_handler + xdef _z8_p3ad_handler + xdef _z8_p2ad_handler + xdef _z8_p1ad_handler + xdef _z8_p0ad_handler +if EZ8_TIMER4=1 + xdef _z8_timer3_handler +endif +if EZ8_UART1=1 + xdef _z8_uart1rx_handler + xdef _z8_uart1tx_handler +endif +if EZ8_DMA=1 + xdef _z8_dma_handler +endif +if (EZ8_PORT1=0) + xdef _z8_c3_handler + xdef _z8_c2_handler + xdef _z8_c1_handler + xdef _z8_c0_handler +endif + xdef _z8_potrap_handler + xdef _z8_wotrap_handler + +/**************************************************************************/ + +#elif defined(ENCORE_XP16K_VECTORS) + + xdef _z8_wdt_handler + xdef _z8_trap_handler +if EZ8_TIMER3=1 + xdef _z8_timer2_handler +endif + xdef _z8_timer1_handler + xdef _z8_timer0_handler +if EZ8_UART0=1 + xdef _z8_uart0rx_handler + xdef _z8_uart0tx_handler +endif +if EZ8_I2C=1 + xdef _z8_i2c_handler +endif +if EZ8_ESPI=1 + xdef _z8_spi_handler +endif +if EZ8_ADC_NEW=1 + xdef _z8_adc_handler +endif + xdef _z8_p7ad_handler + xdef _z8_p6ad_handler + xdef _z8_p5ad_handler + xdef _z8_p4ad_handler + xdef _z8_p3ad_handler + xdef _z8_p2ad_handler + xdef _z8_p1ad_handler + xdef _z8_p0ad_handler +if EZ8_MCT=1 + xdef _z8_mct_handler +endif +if EZ8_UART1=1 + xdef _z8_uart1rx_handler + xdef _z8_uart1tx_handler +endif + xdef _z8_c3_handler + xdef _z8_c2_handler + xdef _z8_c1_handler + xdef _z8_c0_handler + xdef _z8_potrap_handler + xdef _z8_wotrap_handler + +/**************************************************************************/ + +#elif defined(ENCORE_MC_VECTORS) + + xdef _z8_wdt_handler + xdef _z8_trap_handler + xdef _z8_pwmtimer_handler + xdef _z8_pwmfault_handler +if EZ8_ADC_NEW=1 + xdef _z8_adc_handler +endif + xdef _z8_cmp_handler + xdef _z8_timer0_handler +if EZ8_UART0 + xdef _z8_uart0rx_handler + xdef _z8_uart0tx_handler +endif +if EZ8_SPI=1 + xdef _z8_spi_handler +endif +if EZ8_I2C=1 + xdef _z8_i2c_handler +endif + xdef _z8_c0_handler + xdef _z8_pb_handler + xdef _z8_p7ap3a_handler + xdef _z8_p6ap2a_handler + xdef _z8_p5ap1a_handler + xdef _z8_p4ap0a_handler + xdef _z8_potrap_handler + xdef _z8_wotrap_handler +#endif + +/************************************************************************** + * Macros + **************************************************************************/ + +ENTER : MACRO val + pushx rp /* Save the current RP value in the stack */ + srp #%f0 /* Load the interrupt register pointer */ + ld r0, #val /* Pass the new value in r0 */ + jr _z8_common_handler /* The rest of the handling is common */ + ENDMAC ENTER + +LEAVE : MACRO + popx rp /* Restore the user register pointer */ + iret /* And return from interrupt */ + ENDMAC LEAVE + +/************************************************************************** + * Code + **************************************************************************/ + + segment CODE + +/************************************************************************** + * Interrupt Vectors + **************************************************************************/ + +#if defined(ENCORE_VECTORS) + vector WDT = _z8_wdt_handler + vector TRAP = _z8_trap_handler +if EZ8_TIMER3=1 + vector TIMER2 = _z8_timer2_handler +endif + vector TIMER1 = _z8_timer1_handler + vector TIMER0 = _z8_timer0_handler +if EZ8_UART0=1 + vector UART0_RX = _z8_uart0rx_handler + vector UART0_TX = _z8_uart0tx_handler +endif +if EZ8_I2C=1 + vector I2C = _z8_i2c_handler +endif +if EZ8_SPI=1 + vector SPI = _z8_spi_handler +endif +if EZ8_ADC=1 + vector ADC = _z8_adc_handler +endif + vector P7AD = _z8_p7ad_handler + vector P6AD = _z8_p6ad_handler + vector P5AD = _z8_p5ad_handler + vector P4AD = _z8_p4ad_handler + vector P3AD = _z8_p3ad_handler + vector P2AD = _z8_p2ad_handler + vector P1AD = _z8_p1ad_handler + vector P0AD = _z8_p0ad_handler +if EZ8_TIMER4=1 + vector TIMER3 = _z8_timer3_handler +endif +if EZ8_UART1=1 + vector UART1_RX = _z8_uart1rx_handler + vector UART1_TX = _z8_uart1tx_handler +endif +if EZ8_DMA=1 + vector DMA = _z8_dma_handler +endif +if EZ8_PORT1=0 + vector C3 = _z8_c3_handler + vector C2 = _z8_c2_handler + vector C1 = _z8_c1_handler + vector C0 = _z8_c0_handler +endif + +/**************************************************************************/ + +#elif defined(ENCORE_XP_VECTORS) + + vector WDT = _z8_wdt_handler + vector TRAP = _z8_trap_handler +if EZ8_TIMER3=1 + vector TIMER2 = _z8_timer2_handler +endif + vector TIMER1 = _z8_timer1_handler + vector TIMER0 = _z8_timer0_handler +if EZ8_UART0=1 + vector UART0_RX = _z8_uart0rx_handler + vector UART0_TX = _z8_uart0tx_handler +endif +if EZ8_I2C=1 + vector I2C = _z8_i2c_handler +endif +if EZ8_SPI=1 + vector SPI = _z8_spi_handler +endif +if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) + vector ADC = _z8_adc_handler +endif + vector P7AD = _z8_p7ad_handler + vector P6AD = _z8_p6ad_handler + vector P5AD = _z8_p5ad_handler + vector P4AD = _z8_p4ad_handler + vector P3AD = _z8_p3ad_handler + vector P2AD = _z8_p2ad_handler + vector P1AD = _z8_p1ad_handler + vector P0AD = _z8_p0ad_handler +if EZ8_TIMER4=1 + vector TIMER3 = _z8_timer3_handler +endif +if EZ8_UART1=1 + vector UART1_RX = _z8_uart1rx_handler + vector UART1_TX = _z8_uart1tx_handler +endif +if EZ8_DMA=1 + vector DMA = _z8_dma_handler +endif +if EZ8_PORT1=0 + vector C3 = _z8_c3_handler + vector C2 = _z8_c2_handler + vector C1 = _z8_c1_handler + vector C0 = _z8_c0_handler +endif + vector POTRAP = _z8_potrap_handler + vector WOTRAP = _z8_wotrap_handler + +/**************************************************************************/ + +#elif defined(ENCORE_XP16K_VECTORS) + + vector WDT = _z8_wdt_handler + vector TRAP = _z8_trap_handler +if EZ8_TIMER3=1 + vector TIMER2 = _z8_timer2_handler +endif + vector TIMER1 = _z8_timer1_handler + vector TIMER0 = _z8_timer0_handler +if EZ8_UART0=1 + vector UART0_RX = _z8_uart0rx_handler + vector UART0_TX = _z8_uart0tx_handler +endif +if EZ8_I2C=1 + vector I2C = _z8_i2c_handler +endif +if EZ8_ESPI=1 + vector SPI = _z8_spi_handler +endif +if EZ8_ADC_NEW=1 + vector ADC = _z8_adc_handler +endif + vector P7AD = _z8_p7ad_handler + vector P6AD = _z8_p6ad_handler + vector P5AD = _z8_p5ad_handler + vector P4AD = _z8_p4ad_handler + vector P3AD = _z8_p3ad_handler + vector P2AD = _z8_p2ad_handler + vector P1AD = _z8_p1ad_handler + vector P0AD = _z8_p0ad_handler +if EZ8_MCT=1 + vector MCT = _z8_mct_handler +endif +if EZ8_UART1=1 + vector UART1_RX = _z8_uart1rx_handler + vector UART1_TX = _z8_uart1tx_handler +endif + vector C3 = _z8_c3_handler + vector C2 = _z8_c2_handler + vector C1 = _z8_c1_handler + vector C0 = _z8_c0_handler + vector POTRAP = _z8_potrap_handler + vector WOTRAP = _z8_wotrap_handler + +/**************************************************************************/ + +#elif defined(ENCORE_MC_VECTORS) + + vector WDT = _z8_wdt_handler + vector TRAP = _z8_trap_handler + vector PWMTIMER = _z8_pwmtimer_handler + vector PWMFAULT = _z8_pwmfault_handler +if EZ8_ADC_NEW=1 + vector ADC = _z8_adc_handler +endif + vector CMP = _z8_cmp_handler + vector TIMER0 = _z8_timer0_handler +if EZ8_UART0 + vector UART0_RX = _z8_uart0rx_handler + vector UART0_TX = _z8_uart0tx_handler +endif +if EZ8_SPI=1 + vector SPI = _z8_spi_handler +endif +if EZ8_I2C=1 + vector I2C = _z8_i2c_handler +endif + vector C0 = _z8_c0_handler + vector PB = _z8_pb_handler + vector P7A = _z8_p7ap3a_handler + vector P6A = _z8_p6ap2a_handler + vector P5A = _z8_p5ap1a_handler + vector P4A = _z8_p4ap0a_handler + vector POTRAP = _z8_potrap_handler + vector WOTRAP = _z8_wotrap_handler +#endif + +/************************************************************************** + * Name: _z16f_*_handler + * + * Description: + * Map individual interrupts into interrupt number and branch to common + * interrupt handling logic. If higher interrupt handling performance + * for particular interrupts is required, then those interrupts should + * be picked off here and handled outside of the common logic. + * + * On entry to any of these handlers, the stack contains the following: + * + * TOS before interrupt + * PC[7:0] + * PC[15:8] + * SP -> Flags Register + * + **************************************************************************/ + +#if defined(ENCORE_VECTORS) +_z8_wdt_handler: + ENTER(Z8_WDT_IRQ) +_z8_trap_handler: + ENTER(Z8_TRAP_IRQ) +if EZ8_TIMER3=1 +_z8_timer2_handler: + ENTER(Z8_TIMER2_IRQ) +endif +_z8_timer1_handler: + ENTER(Z8_TIMER1_IRQ) +_z8_timer0_handler: + ENTER(Z8_TIMER0_IRQ) +if EZ8_UART0=1 +_z8_uart0rx_handler: + ENTER(Z8_UART0_RX_IRQ) +_z8_uart0tx_handler: + ENTER(Z8_UART0_TX_IRQ) +endif +if EZ8_I2C=1 +_z8_i2c_handler: + ENTER(Z8_I2C_IRQ) +endif +if EZ8_SPI=1 +_z8_spi_handler: + ENTER(Z8_SPI_IRQ) +endif +if EZ8_ADC=1 +_z8_adc_handler: + ENTER(Z8_ADC_IRQ) +endif +_z8_p7ad_handler: + ENTER(Z8_P7AD_IRQ) +_z8_p6ad_handler: + ENTER(Z8_P6AD_IRQ) +_z8_p5ad_handler: + ENTER(Z8_P5AD_IRQ) +_z8_p4ad_handler: + ENTER(Z8_P4AD_IRQ) +_z8_p3ad_handler: + ENTER(Z8_P3AD_IRQ) +_z8_p2ad_handler: + ENTER(Z8_P2AD_IRQ) +_z8_p1ad_handler: + ENTER(Z8_P1AD_IRQ) +_z8_p0ad_handler: + ENTER(Z8_P0AD_IRQ) +if EZ8_TIMER4=1 +_z8_timer3_handler: + ENTER(Z8_TIMER3_IRQ) +endif +if EZ8_UART1=1 +_z8_uart1rx_handler: + ENTER(Z8_UART1_RX_IRQ) +_z8_uart1tx_handler: + ENTER(Z8_UART1_TX_IRQ) +endif +if EZ8_DMA=1 +_z8_dma_handler: + ENTER(Z8_DMA_IRQ) +endif +if EZ8_PORT1=0 +_z8_c3_handler: + ENTER(Z8_C3_IRQ) +_z8_c2_handler: + ENTER(Z8_C2_IRQ) +_z8_c1_handler: + ENTER(Z8_C1_IRQ) +_z8_c0_handler: + ENTER(Z8_C0_IRQ) +endif + +/**************************************************************************/ + +#elif defined(ENCORE_XP_VECTORS) + +_z8_wdt_handler: + ENTER(Z8_WDT_IRQ) +_z8_trap_handler: + ENTER(Z8_TRAP_IRQ) +if EZ8_TIMER3=1 +_z8_timer2_handler: + ENTER(Z8_TIMER2_IRQ) +endif +_z8_timer1_handler: + ENTER(Z8_TIMER1_IRQ) +_z8_timer0_handler: + ENTER(Z8_TIMER0_IRQ) +if EZ8_UART0=1 +_z8_uart0rx_handler: + ENTER(Z8_UART0_RX_IRQ) +_z8_uart0tx_handler: + ENTER(Z8_UART0_TX_IRQ) +endif +if EZ8_I2C=1 +_z8_i2c_handler: + ENTER(Z8_I2C_IRQ) +endif +if EZ8_SPI=1 +_z8_spi_handler: + ENTER(Z8_SPI_IRQ) +endif +if (EZ8_ADC=1) || (EZ8_ADC_NEW=1) +_z8_adc_handler: + ENTER(Z8_ADC_IRQ) +endif +_z8_p7ad_handler: + ENTER(Z8_P7AD_IRQ) +_z8_p6ad_handler: + ENTER(Z8_P6AD_IRQ) +_z8_p5ad_handler: + ENTER(Z8_P5AD_IRQ) +_z8_p4ad_handler: + ENTER(Z8_P4AD_IRQ) +_z8_p3ad_handler: + ENTER(Z8_P3AD_IRQ) +_z8_p2ad_handler: + ENTER(Z8_P2AD_IRQ) +_z8_p1ad_handler: + ENTER(Z8_P1AD_IRQ) +_z8_p0ad_handler: + ENTER(Z8_P0AD_IRQ) +if EZ8_TIMER4=1 +_z8_timer3_handler: + ENTER(Z8_TIMER3_IRQ) +endif +if EZ8_UART1=1 +_z8_uart1rx_handler: + ENTER(Z8_UART1_RX_IRQ) +_z8_uart1tx_handler: + ENTER(Z8_UART1_TX_IRQ) +endif +if EZ8_DMA=1 +_z8_dma_handler: + ENTER(Z8_DMA_IRQ) +endif +if EZ8_PORT1=0 +_z8_c3_handler: + ENTER(Z8_C3_IRQ) +_z8_c2_handler: + ENTER(Z8_C2_IRQ) +_z8_c1_handler: + ENTER(Z8_C1_IRQ) +_z8_c0_handler: + ENTER(Z8_C0_IRQ) +endif +_z8_potrap_handler: + ENTER(Z8_POTRAP_IRQ) +_z8_wotrap_handler: + ENTER(Z8_WOTRAP_IRQ) + +/**************************************************************************/ + +#elif defined(ENCORE_XP16K_VECTORS) + +_z8_wdt_handler: + ENTER(Z8_WDT_IRQ) +_z8_trap_handler: + ENTER(Z8_TRAP_IRQ) +if EZ8_TIMER3=1 +_z8_timer2_handler: + ENTER(Z8_TIMER2_IRQ) +endif +_z8_timer1_handler: + ENTER(Z8_TIMER1_IRQ) +_z8_timer0_handler: + ENTER(Z8_TIMER0_IRQ) +if EZ8_UART0=1 +_z8_uart0rx_handler: + ENTER(Z8_UART0_RX_IRQ) +_z8_uart0tx_handler: + ENTER(Z8_UART0_TX_IRQ) +endif +if EZ8_I2C=1 +_z8_i2c_handler: + ENTER(Z8_I2C_IRQ) +endif +if EZ8_ESPI=1 +_z8_spi_handler: + ENTER(Z8_SPI_IRQ) +endif +if EZ8_ADC_NEW=1 +_z8_adc_handler: + ENTER(Z8_ADC_IRQ) +endif +_z8_p7ad_handler: + ENTER(Z8_P7AD_IRQ) +_z8_p6ad_handler: + ENTER(Z8_P6AD_IRQ) +_z8_p5ad_handler: + ENTER(Z8_P5AD_IRQ) +_z8_p4ad_handler: + ENTER(Z8_P4AD_IRQ) +_z8_p3ad_handler: + ENTER(Z8_P3AD_IRQ) +_z8_p2ad_handler: + ENTER(Z8_P2AD_IRQ) +_z8_p1ad_handler: + ENTER(Z8_P1AD_IRQ) +_z8_p0ad_handler: + ENTER(Z8_P0AD_IRQ) +if EZ8_MCT=1 +_z8_mct_handler: + ENTER(Z8_MCT_IRQ) +endif +if EZ8_UART1=1 +_z8_uart1rx_handler: + ENTER(Z8_UART1_RX_IRQ) +_z8_uart1tx_handler: + ENTER(Z8_UART1_TX_IRQ) +endif +_z8_c3_handler: + ENTER(Z8_C3_IRQ) +_z8_c2_handler: + ENTER(Z8_C2_IRQ) +_z8_c1_handler: + ENTER(Z8_C1_IRQ) +_z8_c0_handler: + ENTER(Z8_C0_IRQ) +_z8_potrap_handler: + ENTER(Z8_POTRAP_IRQ) +_z8_wotrap_handler: + ENTER(Z8_WOTRAP_IRQ) + +/**************************************************************************/ + +#elif defined(ENCORE_MC_VECTORS) + +_z8_wdt_handler: + ENTER(Z8_WDT_IRQ) +_z8_trap_handler: + ENTER(Z8_TRAP_IRQ) +_z8_pwmtimer_handler: + ENTER(Z8_PWMTIMER_IRQ) +_z8_pwmfault_handler: + ENTER(Z8_PWMFAULT_IRQ) +if EZ8_ADC_NEW=1 +_z8_adc_handler: + ENTER(Z8_ADC_IRQ) +endif +_z8_cmp_handler: + ENTER(Z8_CMP_IRQ) +_z8_timer0_handler: + ENTER(Z8_TIMER0_IRQ) +if EZ8_UART0 +_z8_uart0rx_handler: + ENTER(Z8_UART0_RX_IRQ) +_z8_uart0tx_handler: + ENTER(Z8_UART0_TX_IRQ) +endif +if EZ8_SPI=1 +_z8_spi_handler: + ENTER(Z8_SPI_IRQ) +endif +if EZ8_I2C=1 +_z8_i2c_handler: + ENTER(Z8_I2C_IRQ) +endif +_z8_c0_handler: + ENTER(Z8_C0_IRQ) +_z8_pb_handler: + ENTER(Z8_PB_IRQ) +_z8_p7ap3a_handler: + ENTER(Z8_P7A_IRQ) +_z8_p6ap2a_handler: + ENTER(Z8_P6AP2A_IRQ) +_z8_p5ap1a_handler: + ENTER(Z8_P5AP1A_IRQ) +_z8_p4ap0a_handler: + ENTER(Z8_P4AP0A_IRQ) +_z8_potrap_handler: + ENTER(Z8_POTRAP_IRQ) +_z8_wotrap_handler: + ENTER(Z8_WOTRAP_IRQ) +#endif + +/************************************************************************** + * Name: _z16f_common_handler + * + * Description: + * Common IRQ handling logic + * + * On entry, the stack contains the following: + * + * TOS before interrupt + * PC[7:0] + * PC[15:8] + * Flags Register + * SP -> RP + * + * R0 holds the IRQ number and the RP has been reset to %f0 + * + **************************************************************************/ + +_z8_common_handler: + /* Pass the address of the IRQ stack frame */ + + ldx r2, sph /* rr2 = stack pointer */ + ldx r3, spl + push r3 /* Pass as a parameter */ + push r2 + + /* Pass the IRQ number */ + + push r0 + + /* Process the interrupt */ + + call _up_doirq /* Call the IRQ handler */ + + /* Release arguments from the stack */ + + pop r4 /* Discard the IRQ argument */ + pop r2 /* Recover the stack pointer parameter */ + pop r3 + + /* If a interrupt level context switch occurred, then the + * return value will be the same as the input value + */ + + cp r0, r2 /* Same as the return value? */ + jr nz, _z8_switch + cp r1, r3 + jr z, _z8_noswitch + + /* A context switch occurs. Restore the use context. + * rr0 = pointer to context structgure. + */ + +_z8_switch: + + /* Destroy the interrupt return information on the stack */ + + pop r4 /* Destroy saved RP */ + pop r4 /* Destroy saved flags */ + pop r4 /* Destroy saved return address */ + pop r4 + + /* Copy all registers into the user register area. */ + + clr r2 /* rr2 = destination address */ + ldx r3, XCPT_RP_OFFS(rr0) + ld r4, r0 /* rr4 = source address */ + ld r5, r1 + ld r6, #16 /* r6 = number of bytes to copy */ + +_z8_restore: + ldx r7, @rr4 + ldx @rr2, r7 + incw rr2 + incw rr4 + djnz r6, _z8_restore + + /* Set the new stack pointer */ + + ldx r2, XCPT_SPH_OFFS(rr0) + ldx r3, XCPT_SPL_OFFS(rr0) + ldx sph, r2 + ldx spl, r3 + + /* Push the return address onto the stack */ + + ldx r2, XCPT_PCH_OFFS(rr0) + ldx r3, XCPT_PCL_OFFS(rr0) + push r3 + push r2 + + /* Recover the flags and RP settings.. but don't restore them yet */ + + ldx r3, XCPT_FLAGS_OFFS(rr0) + ldx r4, XCPT_RP_OFFS(rr0) + + /* Determine whether interrupts must be enabled on return. This + * would be nicer to do below, but later we will need to preserve + * the condition codes in the flags. + */ + + ldx r2, XCPT_IRQCTL_OFFS(rr0) + tm r2, #%80 + jr nz, _z8_returnenabled + + /* Restore the flag settings */ + + ldx flags, r3 + + /* Restore the user register page and return with interrupts disabled. + * Note that we cannot use the iret instruction because it unconditionally + * re-enabled interrupts + */ + + ldx rp, r4 /* Does not effect flags */ + ret /* Does not effect flags */ + +_z8_returnenabled: + /* Restore the flag settings */ + + ldx flags, r1 + + /* Restore the user register page, re-enable interrupts and return. + * Note that we cannot use the iret instruction because it unconditionally + * re-enabled interrupts + */ + + ldx rp, r4 /* Does not effect flags */ + ei /* Does not effect flags */ + ret /* Does not effect flags */ + +_z8_noswitch: + LEAVE + +/************************************************************************** + * Data + **************************************************************************/ + + /* Set aside area for interrupt registers */ + + define interruptreg, space=rdata, org=%f0 + segment interruptreg + ds %10 + + end _z8_common_handler diff --git a/nuttx/arch/z80/src/z80/Make.defs b/nuttx/arch/z80/src/z80/Make.defs index 01564f059a..4f8c291c40 100644 --- a/nuttx/arch/z80/src/z80/Make.defs +++ b/nuttx/arch/z80/src/z80/Make.defs @@ -2,7 +2,7 @@ # arch/z80/src/z80/Make.defs # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/chip.h b/nuttx/arch/z80/src/z80/chip.h index 5874f733b0..e80b2b231b 100644 --- a/nuttx/arch/z80/src/z80/chip.h +++ b/nuttx/arch/z80/src/z80/chip.h @@ -3,7 +3,7 @@ * chip/chip.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/switch.h b/nuttx/arch/z80/src/z80/switch.h index 1b54ada5ee..e7f705cfda 100644 --- a/nuttx/arch/z80/src/z80/switch.h +++ b/nuttx/arch/z80/src/z80/switch.h @@ -3,7 +3,7 @@ * arch/z80/src/chip/switch.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_copystate.c b/nuttx/arch/z80/src/z80/z80_copystate.c index b49196f93e..ca2286a2bd 100644 --- a/nuttx/arch/z80/src/z80/z80_copystate.c +++ b/nuttx/arch/z80/src/z80/z80_copystate.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_copystate.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_head.asm b/nuttx/arch/z80/src/z80/z80_head.asm index 0eb166af64..828a29d776 100644 --- a/nuttx/arch/z80/src/z80/z80_head.asm +++ b/nuttx/arch/z80/src/z80/z80_head.asm @@ -1,283 +1,283 @@ -;************************************************************************** -; arch/z80/src/z80/z80_head.asm -; -; Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - - .title NuttX for the Z80 - .module z80_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Register save area layout - - XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in carry - XCPT_BC == 2 ; Offset 1: Saved BC register - XCPT_DE == 4 ; Offset 2: Saved DE register - XCPT_IX == 6 ; Offset 3: Saved IX register - XCPT_IY == 8 ; Offset 4: Saved IY register - XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt - XCPT_HL == 12 ; Offset 6: Saved HL register - XCPT_AF == 14 ; Offset 7: Saved AF register - XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _os_start ; OS entry point - .globl _up_doirq ; Interrupt decoding logic - -;************************************************************************** -; Reset entry point -;************************************************************************** - - .area _HEADER (ABS) - .org 0x0000 - - di ; Disable interrupts - im 1 ; Set interrupt mode 1 - jr _up_reset ; And boot the system - -;************************************************************************** -; Other reset handlers -; -; Interrupt mode 1 behavior: -; -; 1. M1 cycle: 7 ticks -; Acknowledge interrupt and decrements SP -; 2. M2 cycle: 3 ticks -; Writes the MS byte of the PC onto the stack and decrements SP -; 3. M3 cycle: 3 ticks -; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. -; -;************************************************************************** - - .org 0x0008 ; RST 1 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z80_RST1 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0010 ; RST 2 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z80_RST2 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0018 ; RST 3 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 1 = Z80_RST3 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0020 ; RST 4 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 1 = Z80_RST4 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0028 ; RST 5 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 1 = Z80_RST5 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0030 ; RST 6 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 1 = Z80_RST6 - jr _up_rstcommon ; Remaining RST handling is common - - .org 0x0038 ; Int mode 1 / RST 7 - - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #7 ; 7 = Z80_RST7 - jr _up_rstcommon ; Remaining RST handling is common - -;************************************************************************** -; NMI interrupt handler -;************************************************************************** - - .org 0x0066 - retn - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Then start NuttX - - call _os_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_up_rstcommon:: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*2) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ld b, a ; Save the reset number in B - ld a, i ; Parity bit holds interrupt state - push af ; Offset 0: I with interrupt state in parity - di - - ; Call the interrupt decode logic. SP points to the beggining of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - push bc ; Argument #1 is the Reset number - inc sp ; (make byte sized) - call _up_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments wer pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in carry - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - ld hl, #-2 ; Offset of SP to account for ret addr on stack - pop de ; Offset 5: HL' = Stack pointer after return - add hl, de ; HL = Stack pointer value before return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - ld sp, hl ; Set SP = saved stack pointer value before return - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable:: - ex af, af' ; Restore AF - reti - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - .area _GSFINAL - ret - +;************************************************************************** +; arch/z80/src/z80/z80_head.asm +; +; Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + + .title NuttX for the Z80 + .module z80_head + +;************************************************************************** +; Constants +;************************************************************************** + + ; Register save area layout + + XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in carry + XCPT_BC == 2 ; Offset 1: Saved BC register + XCPT_DE == 4 ; Offset 2: Saved DE register + XCPT_IX == 6 ; Offset 3: Saved IX register + XCPT_IY == 8 ; Offset 4: Saved IY register + XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt + XCPT_HL == 12 ; Offset 6: Saved HL register + XCPT_AF == 14 ; Offset 7: Saved AF register + XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt + + ; Default stack base (needs to be fixed) + + .include "asm_mem.h" + +;************************************************************************** +; Global symbols used +;************************************************************************** + + .globl _os_start ; OS entry point + .globl _up_doirq ; Interrupt decoding logic + +;************************************************************************** +; Reset entry point +;************************************************************************** + + .area _HEADER (ABS) + .org 0x0000 + + di ; Disable interrupts + im 1 ; Set interrupt mode 1 + jr _up_reset ; And boot the system + +;************************************************************************** +; Other reset handlers +; +; Interrupt mode 1 behavior: +; +; 1. M1 cycle: 7 ticks +; Acknowledge interrupt and decrements SP +; 2. M2 cycle: 3 ticks +; Writes the MS byte of the PC onto the stack and decrements SP +; 3. M3 cycle: 3 ticks +; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. +; +;************************************************************************** + + .org 0x0008 ; RST 1 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #1 ; 1 = Z80_RST1 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0010 ; RST 2 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #2 ; 2 = Z80_RST2 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0018 ; RST 3 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #3 ; 1 = Z80_RST3 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0020 ; RST 4 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #4 ; 1 = Z80_RST4 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0028 ; RST 5 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #5 ; 1 = Z80_RST5 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0030 ; RST 6 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #6 ; 1 = Z80_RST6 + jr _up_rstcommon ; Remaining RST handling is common + + .org 0x0038 ; Int mode 1 / RST 7 + + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #7 ; 7 = Z80_RST7 + jr _up_rstcommon ; Remaining RST handling is common + +;************************************************************************** +; NMI interrupt handler +;************************************************************************** + + .org 0x0066 + retn + +;************************************************************************** +; System start logic +;************************************************************************** + +_up_reset: + ; Set up the stack pointer at the location determined the Makefile + ; and stored in asm_mem.h + + ld SP, #CONFIG_STACK_END ; Set stack pointer + + ; Performed initialization unique to the SDCC toolchain + + call gsinit ; Initialize the data section + + ; Then start NuttX + + call _os_start ; jump to the OS entry point + + ; NuttX will never return, but just in case... + +_up_halt:: + halt ; We should never get here + jp _up_halt + +;************************************************************************** +; Common Interrupt handler +;************************************************************************** + +_up_rstcommon:: + ; Create a register frame. SP points to top of frame + 4, pushes + ; decrement the stack pointer. Already have + ; + ; Offset 8: Return PC is already on the stack + ; Offset 7: AF (retaining flags) + ; + ; IRQ number is in A + + push hl ; Offset 6: HL + ld hl, #(3*2) ; HL is the value of the stack pointer before + add hl, sp ; the interrupt occurred + push hl ; Offset 5: Stack pointer + push iy ; Offset 4: IY + push ix ; Offset 3: IX + push de ; Offset 2: DE + push bc ; Offset 1: BC + + ld b, a ; Save the reset number in B + ld a, i ; Parity bit holds interrupt state + push af ; Offset 0: I with interrupt state in parity + di + + ; Call the interrupt decode logic. SP points to the beggining of the reg structure + + ld hl, #0 ; Argument #2 is the beginning of the reg structure + add hl, sp ; + push hl ; Place argument #2 at the top of stack + push bc ; Argument #1 is the Reset number + inc sp ; (make byte sized) + call _up_doirq ; Decode the IRQ + + ; On return, HL points to the beginning of the reg structure to restore + ; Note that (1) the arguments pushed on the stack are not popped, and (2) the + ; original stack pointer is lost. In the normal case (no context switch), + ; HL will contain the value of the SP before the arguments wer pushed. + + ld sp, hl ; Use the new stack pointer + + ; Restore registers. HL points to the beginning of the reg structure to restore + + ex af, af' ; Select alternate AF + pop af ; Offset 0: AF' = I with interrupt state in carry + ex af, af' ; Restore original AF + pop bc ; Offset 1: BC + pop de ; Offset 2: DE + pop ix ; Offset 3: IX + pop iy ; Offset 4: IY + exx ; Use alternate BC/DE/HL + ld hl, #-2 ; Offset of SP to account for ret addr on stack + pop de ; Offset 5: HL' = Stack pointer after return + add hl, de ; HL = Stack pointer value before return + exx ; Restore original BC/DE/HL + pop hl ; Offset 6: HL + pop af ; Offset 7: AF + + ; Restore the stack pointer + + exx ; Use alternate BC/DE/HL + ld sp, hl ; Set SP = saved stack pointer value before return + exx ; Restore original BC/DE/HL + + ; Restore interrupt state + + ex af, af' ; Recover interrupt state + jp po, nointenable ; Odd parity, IFF2=0, means disabled + ex af, af' ; Restore AF (before enabling interrupts) + ei ; yes + reti +nointenable:: + ex af, af' ; Restore AF + reti + +;************************************************************************** +; Ordering of segments for the linker (SDCC only) +;************************************************************************** + + .area _HOME + .area _CODE + .area _GSINIT + .area _GSFINAL + + .area _DATA + .area _BSS + .area _HEAP + +;************************************************************************** +; Global data initialization logic (SDCC only) +;************************************************************************** + + .area _GSINIT +gsinit:: + .area _GSFINAL + ret + diff --git a/nuttx/arch/z80/src/z80/z80_initialstate.c b/nuttx/arch/z80/src/z80/z80_initialstate.c index fc65dbca55..01cc4f00a5 100644 --- a/nuttx/arch/z80/src/z80/z80_initialstate.c +++ b/nuttx/arch/z80/src/z80/z80_initialstate.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_initialstate.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_io.c b/nuttx/arch/z80/src/z80/z80_io.c index 780d5f6744..cddaa6831f 100644 --- a/nuttx/arch/z80/src/z80/z80_io.c +++ b/nuttx/arch/z80/src/z80/z80_io.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_io.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_irq.c b/nuttx/arch/z80/src/z80/z80_irq.c index 5efd36b9fa..08b426235d 100644 --- a/nuttx/arch/z80/src/z80/z80_irq.c +++ b/nuttx/arch/z80/src/z80/z80_irq.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_irq.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_registerdump.c b/nuttx/arch/z80/src/z80/z80_registerdump.c index f215b6dc6e..0d09a243a2 100644 --- a/nuttx/arch/z80/src/z80/z80_registerdump.c +++ b/nuttx/arch/z80/src/z80/z80_registerdump.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_registerdump.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_restoreusercontext.asm b/nuttx/arch/z80/src/z80/z80_restoreusercontext.asm index 79c3a6034d..bab1434625 100644 --- a/nuttx/arch/z80/src/z80/z80_restoreusercontext.asm +++ b/nuttx/arch/z80/src/z80/z80_restoreusercontext.asm @@ -1,104 +1,104 @@ -;************************************************************************** -; arch/z80/src/z80/z80_restoreusercontext.asm -; -; Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - - ; Register save area layout - - .globl XCPT_I ; Offset 0: Saved I w/interrupt state in carry - .globl XCPT_BC ; Offset 1: Saved BC register - .globl XCPT_DE ; Offset 2: Saved DE register - .globl XCPT_IX ; Offset 3: Saved IX register - .globl XCPT_IY ; Offset 4: Saved IY register - .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt - .globl XCPT_HL ; Offset 6: Saved HL register - .globl XCPT_AF ; Offset 7: Saved AF register - .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt - -;************************************************************************** -; z80_restoreusercontext -;************************************************************************** - - .area _CODE -_z80_restoreusercontext: - ; On entry, stack contains return address (not used), then address - ; of the register save structure - - ; Discard the return address, we won't be returning - - pop hl - - ; Get the address of the beginning of the state save area. Each - ; pop will increment to the next element of the structure - - pop hl ; BC = Address of save structure - ld sp, hl ; SP points to top of storage area - - ; Disable interrupts while we muck with the alternative registers. The - ; Correct interrupt state will be restore below - - di - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - pop hl ; Offset 5: HL' = Stack pointer after return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - pop de ; DE' = return address - ld sp, hl ; Set SP = saved stack pointer value before return - push de ; Save return address for ret instruction - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, noinrestore ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes.. Enable interrupts - ret ; and return -noinrestore: - ex af, af' ; Restore AF - ret ; Return with interrupts disabled +;************************************************************************** +; arch/z80/src/z80/z80_restoreusercontext.asm +; +; Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + + ; Register save area layout + + .globl XCPT_I ; Offset 0: Saved I w/interrupt state in carry + .globl XCPT_BC ; Offset 1: Saved BC register + .globl XCPT_DE ; Offset 2: Saved DE register + .globl XCPT_IX ; Offset 3: Saved IX register + .globl XCPT_IY ; Offset 4: Saved IY register + .globl XCPT_SP ; Offset 5: Offset to SP at time of interrupt + .globl XCPT_HL ; Offset 6: Saved HL register + .globl XCPT_AF ; Offset 7: Saved AF register + .globl XCPT_PC ; Offset 8: Offset to PC at time of interrupt + +;************************************************************************** +; z80_restoreusercontext +;************************************************************************** + + .area _CODE +_z80_restoreusercontext: + ; On entry, stack contains return address (not used), then address + ; of the register save structure + + ; Discard the return address, we won't be returning + + pop hl + + ; Get the address of the beginning of the state save area. Each + ; pop will increment to the next element of the structure + + pop hl ; BC = Address of save structure + ld sp, hl ; SP points to top of storage area + + ; Disable interrupts while we muck with the alternative registers. The + ; Correct interrupt state will be restore below + + di + + ; Restore registers. HL points to the beginning of the reg structure to restore + + ex af, af' ; Select alternate AF + pop af ; Offset 0: AF' = I with interrupt state in parity + ex af, af' ; Restore original AF + pop bc ; Offset 1: BC + pop de ; Offset 2: DE + pop ix ; Offset 3: IX + pop iy ; Offset 4: IY + exx ; Use alternate BC/DE/HL + pop hl ; Offset 5: HL' = Stack pointer after return + exx ; Restore original BC/DE/HL + pop hl ; Offset 6: HL + pop af ; Offset 7: AF + + ; Restore the stack pointer + + exx ; Use alternate BC/DE/HL + pop de ; DE' = return address + ld sp, hl ; Set SP = saved stack pointer value before return + push de ; Save return address for ret instruction + exx ; Restore original BC/DE/HL + + ; Restore interrupt state + + ex af, af' ; Recover interrupt state + jp po, noinrestore ; Odd parity, IFF2=0, means disabled + ex af, af' ; Restore AF (before enabling interrupts) + ei ; yes.. Enable interrupts + ret ; and return +noinrestore: + ex af, af' ; Restore AF + ret ; Return with interrupts disabled diff --git a/nuttx/arch/z80/src/z80/z80_rom.asm b/nuttx/arch/z80/src/z80/z80_rom.asm index b2fd76bb3b..d3bc135306 100644 --- a/nuttx/arch/z80/src/z80/z80_rom.asm +++ b/nuttx/arch/z80/src/z80/z80_rom.asm @@ -1,276 +1,276 @@ -;************************************************************************** -; arch/z80/src/z80/z80_rom.asm -; -; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt -; -; Redistribution and use in source and binary forms, with or without -; modification, are permitted provided that the following conditions -; are met: -; -; 1. Redistributions of source code must retain the above copyright -; notice, this list of conditions and the following disclaimer. -; 2. Redistributions in binary form must reproduce the above copyright -; notice, this list of conditions and the following disclaimer in -; the documentation and/or other materials provided with the -; distribution. -; 3. Neither the name NuttX nor the names of its contributors may be -; used to endorse or promote products derived from this software -; without specific prior written permission. -; -; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -; POSSIBILITY OF SUCH DAMAGE. -; -;************************************************************************** - - .title NuttX for the Z80 - .module z80_head - -;************************************************************************** -; Constants -;************************************************************************** - - ; Register save area layout - - XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in parity - XCPT_BC == 2 ; Offset 1: Saved BC register - XCPT_DE == 4 ; Offset 2: Saved DE register - XCPT_IX == 6 ; Offset 3: Saved IX register - XCPT_IY == 8 ; Offset 4: Saved IY register - XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt - XCPT_HL == 12 ; Offset 6: Saved HL register - XCPT_AF == 14 ; Offset 7: Saved AF register - XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt - - ; Default stack base (needs to be fixed) - - .include "asm_mem.h" - -;************************************************************************** -; Global symbols used -;************************************************************************** - - .globl _os_start ; OS entry point - .globl _up_doirq ; Interrupt decoding logic - -;************************************************************************** -; System start logic -;************************************************************************** - -_up_reset: - ; Set up the stack pointer at the location determined the Makefile - ; and stored in asm_mem.h - - ld SP, #CONFIG_STACK_END ; Set stack pointer - - ; Performed initialization unique to the SDCC toolchain - - call gsinit ; Initialize the data section - - ; Copy the reset vectors - - ld hl, #_up_rstvectors ; code for RAM - ld de, #0x4000 ; move it here - ld bc, #3*7 ; 7 vectors / 3 bytes each - ldir - - ; Then start NuttX - - call _os_start ; jump to the OS entry point - - ; NuttX will never return, but just in case... - -_up_halt:: - halt ; We should never get here - jp _up_halt - - ; Data to copy to address 0x4000 - -_up_rstvectors: - jp _up_rst1 ; 0x4000 : RST 1 - jp _up_rst2 ; 0x4003 : RST 2 - jp _up_rst3 ; 0x4006 : RST 3 - jp _up_rst4 ; 0x4009 : RST 4 - jp _up_rst5 ; 0x400c : RST 5 - jp _up_rst6 ; 0x400f : RST 6 - jp _up_rst7 ; 0x4012 : RST 7 - -;************************************************************************** -; Other reset handlers -; -; Interrupt mode 1 behavior: -; -; 1. M1 cycle: 7 ticks -; Acknowledge interrupt and decrements SP -; 2. M2 cycle: 3 ticks -; Writes the MS byte of the PC onto the stack and decrements SP -; 3. M3 cycle: 3 ticks -; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. -; -;************************************************************************** - -_up_rst1: ; RST 1 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #1 ; 1 = Z80_RST1 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst2: ; RST 2 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #2 ; 2 = Z80_RST2 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst3: ; RST 3 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #3 ; 1 = Z80_RST3 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst4: ; RST 4 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #4 ; 1 = Z80_RST4 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst5: ; RST 5 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #5 ; 1 = Z80_RST5 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst6: ; RST 6 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #6 ; 1 = Z80_RST6 - jr _up_rstcommon ; Remaining RST handling is common - -_up_rst7: ; RST 7 - ; Save AF on the stack, set the interrupt number and jump to the - ; common reset handling logic. - ; Offset 8: Return PC is already on the stack - push af ; Offset 7: AF (retaining flags) - ld a, #7 ; 7 = Z80_RST7 - jr _up_rstcommon ; Remaining RST handling is common - -;************************************************************************** -; Common Interrupt handler -;************************************************************************** - -_up_rstcommon: - ; Create a register frame. SP points to top of frame + 4, pushes - ; decrement the stack pointer. Already have - ; - ; Offset 8: Return PC is already on the stack - ; Offset 7: AF (retaining flags) - ; - ; IRQ number is in A - - push hl ; Offset 6: HL - ld hl, #(3*2) ; HL is the value of the stack pointer before - add hl, sp ; the interrupt occurred - push hl ; Offset 5: Stack pointer - push iy ; Offset 4: IY - push ix ; Offset 3: IX - push de ; Offset 2: DE - push bc ; Offset 1: BC - - ld b, a ; Save the reset number in B - ld a, i ; Parity bit holds interrupt state - push af ; Offset 0: I with interrupt state in parity - di - - ; Call the interrupt decode logic. SP points to the beginning of the reg structure - - ld hl, #0 ; Argument #2 is the beginning of the reg structure - add hl, sp ; - push hl ; Place argument #2 at the top of stack - push bc ; Argument #1 is the Reset number - inc sp ; (make byte sized) - call _up_doirq ; Decode the IRQ - - ; On return, HL points to the beginning of the reg structure to restore - ; Note that (1) the arguments pushed on the stack are not popped, and (2) the - ; original stack pointer is lost. In the normal case (no context switch), - ; HL will contain the value of the SP before the arguments were pushed. - - ld sp, hl ; Use the new stack pointer - - ; Restore registers. HL points to the beginning of the reg structure to restore - - ex af, af' ; Select alternate AF - pop af ; Offset 0: AF' = I with interrupt state in parity - ex af, af' ; Restore original AF - pop bc ; Offset 1: BC - pop de ; Offset 2: DE - pop ix ; Offset 3: IX - pop iy ; Offset 4: IY - exx ; Use alternate BC/DE/HL - ld hl, #-2 ; Offset of SP to account for ret addr on stack - pop de ; Offset 5: HL' = Stack pointer after return - add hl, de ; HL = Stack pointer value before return - exx ; Restore original BC/DE/HL - pop hl ; Offset 6: HL - pop af ; Offset 7: AF - - ; Restore the stack pointer - - exx ; Use alternate BC/DE/HL - ld sp, hl ; Set SP = saved stack pointer value before return - exx ; Restore original BC/DE/HL - - ; Restore interrupt state - - ex af, af' ; Recover interrupt state - jp po, nointenable ; Odd parity, IFF2=0, means disabled - ex af, af' ; Restore AF (before enabling interrupts) - ei ; yes - reti -nointenable:: - ex af, af' ; Restore AF - reti - -;************************************************************************** -; Ordering of segments for the linker (SDCC only) -;************************************************************************** - - .area _HOME - .area _CODE - .area _GSINIT - .area _GSFINAL - - .area _DATA - .area _BSS - .area _HEAP - -;************************************************************************** -; Global data initialization logic (SDCC only) -;************************************************************************** - - .area _GSINIT -gsinit:: - .area _GSFINAL - ret - +;************************************************************************** +; arch/z80/src/z80/z80_rom.asm +; +; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. +; Author: Gregory Nutt +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; 3. Neither the name NuttX nor the names of its contributors may be +; used to endorse or promote products derived from this software +; without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +; OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +; AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; +;************************************************************************** + + .title NuttX for the Z80 + .module z80_head + +;************************************************************************** +; Constants +;************************************************************************** + + ; Register save area layout + + XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in parity + XCPT_BC == 2 ; Offset 1: Saved BC register + XCPT_DE == 4 ; Offset 2: Saved DE register + XCPT_IX == 6 ; Offset 3: Saved IX register + XCPT_IY == 8 ; Offset 4: Saved IY register + XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt + XCPT_HL == 12 ; Offset 6: Saved HL register + XCPT_AF == 14 ; Offset 7: Saved AF register + XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt + + ; Default stack base (needs to be fixed) + + .include "asm_mem.h" + +;************************************************************************** +; Global symbols used +;************************************************************************** + + .globl _os_start ; OS entry point + .globl _up_doirq ; Interrupt decoding logic + +;************************************************************************** +; System start logic +;************************************************************************** + +_up_reset: + ; Set up the stack pointer at the location determined the Makefile + ; and stored in asm_mem.h + + ld SP, #CONFIG_STACK_END ; Set stack pointer + + ; Performed initialization unique to the SDCC toolchain + + call gsinit ; Initialize the data section + + ; Copy the reset vectors + + ld hl, #_up_rstvectors ; code for RAM + ld de, #0x4000 ; move it here + ld bc, #3*7 ; 7 vectors / 3 bytes each + ldir + + ; Then start NuttX + + call _os_start ; jump to the OS entry point + + ; NuttX will never return, but just in case... + +_up_halt:: + halt ; We should never get here + jp _up_halt + + ; Data to copy to address 0x4000 + +_up_rstvectors: + jp _up_rst1 ; 0x4000 : RST 1 + jp _up_rst2 ; 0x4003 : RST 2 + jp _up_rst3 ; 0x4006 : RST 3 + jp _up_rst4 ; 0x4009 : RST 4 + jp _up_rst5 ; 0x400c : RST 5 + jp _up_rst6 ; 0x400f : RST 6 + jp _up_rst7 ; 0x4012 : RST 7 + +;************************************************************************** +; Other reset handlers +; +; Interrupt mode 1 behavior: +; +; 1. M1 cycle: 7 ticks +; Acknowledge interrupt and decrements SP +; 2. M2 cycle: 3 ticks +; Writes the MS byte of the PC onto the stack and decrements SP +; 3. M3 cycle: 3 ticks +; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038. +; +;************************************************************************** + +_up_rst1: ; RST 1 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #1 ; 1 = Z80_RST1 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst2: ; RST 2 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #2 ; 2 = Z80_RST2 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst3: ; RST 3 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #3 ; 1 = Z80_RST3 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst4: ; RST 4 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #4 ; 1 = Z80_RST4 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst5: ; RST 5 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #5 ; 1 = Z80_RST5 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst6: ; RST 6 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #6 ; 1 = Z80_RST6 + jr _up_rstcommon ; Remaining RST handling is common + +_up_rst7: ; RST 7 + ; Save AF on the stack, set the interrupt number and jump to the + ; common reset handling logic. + ; Offset 8: Return PC is already on the stack + push af ; Offset 7: AF (retaining flags) + ld a, #7 ; 7 = Z80_RST7 + jr _up_rstcommon ; Remaining RST handling is common + +;************************************************************************** +; Common Interrupt handler +;************************************************************************** + +_up_rstcommon: + ; Create a register frame. SP points to top of frame + 4, pushes + ; decrement the stack pointer. Already have + ; + ; Offset 8: Return PC is already on the stack + ; Offset 7: AF (retaining flags) + ; + ; IRQ number is in A + + push hl ; Offset 6: HL + ld hl, #(3*2) ; HL is the value of the stack pointer before + add hl, sp ; the interrupt occurred + push hl ; Offset 5: Stack pointer + push iy ; Offset 4: IY + push ix ; Offset 3: IX + push de ; Offset 2: DE + push bc ; Offset 1: BC + + ld b, a ; Save the reset number in B + ld a, i ; Parity bit holds interrupt state + push af ; Offset 0: I with interrupt state in parity + di + + ; Call the interrupt decode logic. SP points to the beginning of the reg structure + + ld hl, #0 ; Argument #2 is the beginning of the reg structure + add hl, sp ; + push hl ; Place argument #2 at the top of stack + push bc ; Argument #1 is the Reset number + inc sp ; (make byte sized) + call _up_doirq ; Decode the IRQ + + ; On return, HL points to the beginning of the reg structure to restore + ; Note that (1) the arguments pushed on the stack are not popped, and (2) the + ; original stack pointer is lost. In the normal case (no context switch), + ; HL will contain the value of the SP before the arguments were pushed. + + ld sp, hl ; Use the new stack pointer + + ; Restore registers. HL points to the beginning of the reg structure to restore + + ex af, af' ; Select alternate AF + pop af ; Offset 0: AF' = I with interrupt state in parity + ex af, af' ; Restore original AF + pop bc ; Offset 1: BC + pop de ; Offset 2: DE + pop ix ; Offset 3: IX + pop iy ; Offset 4: IY + exx ; Use alternate BC/DE/HL + ld hl, #-2 ; Offset of SP to account for ret addr on stack + pop de ; Offset 5: HL' = Stack pointer after return + add hl, de ; HL = Stack pointer value before return + exx ; Restore original BC/DE/HL + pop hl ; Offset 6: HL + pop af ; Offset 7: AF + + ; Restore the stack pointer + + exx ; Use alternate BC/DE/HL + ld sp, hl ; Set SP = saved stack pointer value before return + exx ; Restore original BC/DE/HL + + ; Restore interrupt state + + ex af, af' ; Recover interrupt state + jp po, nointenable ; Odd parity, IFF2=0, means disabled + ex af, af' ; Restore AF (before enabling interrupts) + ei ; yes + reti +nointenable:: + ex af, af' ; Restore AF + reti + +;************************************************************************** +; Ordering of segments for the linker (SDCC only) +;************************************************************************** + + .area _HOME + .area _CODE + .area _GSINIT + .area _GSFINAL + + .area _DATA + .area _BSS + .area _HEAP + +;************************************************************************** +; Global data initialization logic (SDCC only) +;************************************************************************** + + .area _GSINIT +gsinit:: + .area _GSFINAL + ret + diff --git a/nuttx/arch/z80/src/z80/z80_saveusercontext.asm b/nuttx/arch/z80/src/z80/z80_saveusercontext.asm index e23039dfc3..d53c3c5df2 100644 --- a/nuttx/arch/z80/src/z80/z80_saveusercontext.asm +++ b/nuttx/arch/z80/src/z80/z80_saveusercontext.asm @@ -2,7 +2,7 @@ ; arch/z80/src/z80/z80_saveusercontext.asm ; ; Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt +; Author: Gregory Nutt ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_schedulesigaction.c b/nuttx/arch/z80/src/z80/z80_schedulesigaction.c index 24b12731c7..3b227d5e3c 100644 --- a/nuttx/arch/z80/src/z80/z80_schedulesigaction.c +++ b/nuttx/arch/z80/src/z80/z80_schedulesigaction.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_schedulesigaction.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/z80/src/z80/z80_sigdeliver.c b/nuttx/arch/z80/src/z80/z80_sigdeliver.c index c6aa5ff3c5..a8fc1e3470 100644 --- a/nuttx/arch/z80/src/z80/z80_sigdeliver.c +++ b/nuttx/arch/z80/src/z80/z80_sigdeliver.c @@ -2,7 +2,7 @@ * arch/z80/src/z80/z80_sigdeliver.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile index dd9e459ced..b3a9269b30 100644 --- a/nuttx/binfmt/Makefile +++ b/nuttx/binfmt/Makefile @@ -2,7 +2,7 @@ # nxflat/Makefile # # Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_dumpmodule.c b/nuttx/binfmt/binfmt_dumpmodule.c index 945dcb3ace..32a3fef3e3 100644 --- a/nuttx/binfmt/binfmt_dumpmodule.c +++ b/nuttx/binfmt/binfmt_dumpmodule.c @@ -2,7 +2,7 @@ * binfmt/binfmt_dumpmodule.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c index cefd3aa5c7..c070324c31 100644 --- a/nuttx/binfmt/binfmt_exec.c +++ b/nuttx/binfmt/binfmt_exec.c @@ -2,7 +2,7 @@ * binfmt/binfmt_exec.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c index 1965f6fa0b..1b511b0cb8 100644 --- a/nuttx/binfmt/binfmt_execmodule.c +++ b/nuttx/binfmt/binfmt_execmodule.c @@ -2,7 +2,7 @@ * binfmt/binfmt_execmodule.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_globals.c b/nuttx/binfmt/binfmt_globals.c index 0d0b2dbb42..069d3a2aa9 100644 --- a/nuttx/binfmt/binfmt_globals.c +++ b/nuttx/binfmt/binfmt_globals.c @@ -2,7 +2,7 @@ * binfmt/binfmt_globals.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_internal.h b/nuttx/binfmt/binfmt_internal.h index 22fadcd211..da67f5350b 100644 --- a/nuttx/binfmt/binfmt_internal.h +++ b/nuttx/binfmt/binfmt_internal.h @@ -2,7 +2,7 @@ * binfmt/binfmt_internal.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_loadmodule.c b/nuttx/binfmt/binfmt_loadmodule.c index d4ef7cde27..01ab8cc883 100644 --- a/nuttx/binfmt/binfmt_loadmodule.c +++ b/nuttx/binfmt/binfmt_loadmodule.c @@ -2,7 +2,7 @@ * binfmt/binfmt_loadmodule.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_register.c b/nuttx/binfmt/binfmt_register.c index e41c7a0d98..7f6eef671a 100644 --- a/nuttx/binfmt/binfmt_register.c +++ b/nuttx/binfmt/binfmt_register.c @@ -2,7 +2,7 @@ * binfmt/binfmt_register.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_unloadmodule.c b/nuttx/binfmt/binfmt_unloadmodule.c index c6fa90c396..04859a2910 100644 --- a/nuttx/binfmt/binfmt_unloadmodule.c +++ b/nuttx/binfmt/binfmt_unloadmodule.c @@ -2,7 +2,7 @@ * binfmt/binfmt_loadmodule.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/binfmt_unregister.c b/nuttx/binfmt/binfmt_unregister.c index 1b50b2c582..b97b9b67dd 100644 --- a/nuttx/binfmt/binfmt_unregister.c +++ b/nuttx/binfmt/binfmt_unregister.c @@ -2,7 +2,7 @@ * binfmt/binfmt_unregister.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/Make.defs b/nuttx/binfmt/libnxflat/Make.defs index 9e95936519..f979741e51 100644 --- a/nuttx/binfmt/libnxflat/Make.defs +++ b/nuttx/binfmt/libnxflat/Make.defs @@ -2,7 +2,7 @@ # nxflat/lib/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/gnu-nxflat.ld b/nuttx/binfmt/libnxflat/gnu-nxflat.ld index 9a59c0ec09..e66b1dff52 100644 --- a/nuttx/binfmt/libnxflat/gnu-nxflat.ld +++ b/nuttx/binfmt/libnxflat/gnu-nxflat.ld @@ -2,7 +2,7 @@ * examples/nxflat/nxflat.ld * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index eb65a7e63a..ca348178dd 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_bind.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_init.c b/nuttx/binfmt/libnxflat/libnxflat_init.c index 45f016e271..5b6375ff16 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_init.c +++ b/nuttx/binfmt/libnxflat/libnxflat_init.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_init.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_load.c b/nuttx/binfmt/libnxflat/libnxflat_load.c index 25be056212..0991d0c2d7 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_load.c +++ b/nuttx/binfmt/libnxflat/libnxflat_load.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_load.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_read.c b/nuttx/binfmt/libnxflat/libnxflat_read.c index 8f1650e873..dbcd542791 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_read.c +++ b/nuttx/binfmt/libnxflat/libnxflat_read.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_read.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_uninit.c b/nuttx/binfmt/libnxflat/libnxflat_uninit.c index 72be6c7aed..5d06296c79 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_uninit.c +++ b/nuttx/binfmt/libnxflat/libnxflat_uninit.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_uninit.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_unload.c b/nuttx/binfmt/libnxflat/libnxflat_unload.c index 7dc3e87a74..55a2e45e60 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_unload.c +++ b/nuttx/binfmt/libnxflat/libnxflat_unload.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/libnxflat_unload.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/libnxflat/libnxflat_verify.c b/nuttx/binfmt/libnxflat/libnxflat_verify.c index de952774fc..f799aca4f6 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_verify.c +++ b/nuttx/binfmt/libnxflat/libnxflat_verify.c @@ -2,7 +2,7 @@ * binfmt/libnxflat/nxflat_verify.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 99b99249a1..4f5869bd92 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -2,7 +2,7 @@ * binfmt/nxflat.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/symtab_findbyname.c b/nuttx/binfmt/symtab_findbyname.c index 02b2ac22b4..201d7ba07d 100644 --- a/nuttx/binfmt/symtab_findbyname.c +++ b/nuttx/binfmt/symtab_findbyname.c @@ -2,7 +2,7 @@ * binfmt/symtab_findbyname.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/symtab_findbyvalue.c b/nuttx/binfmt/symtab_findbyvalue.c index 80df746684..4382ed5d8d 100644 --- a/nuttx/binfmt/symtab_findbyvalue.c +++ b/nuttx/binfmt/symtab_findbyvalue.c @@ -2,7 +2,7 @@ * binfmt/symtab_findbyvalue.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/symtab_findorderedbyname.c b/nuttx/binfmt/symtab_findorderedbyname.c index 82d68bfea4..61decf49ad 100644 --- a/nuttx/binfmt/symtab_findorderedbyname.c +++ b/nuttx/binfmt/symtab_findorderedbyname.c @@ -2,7 +2,7 @@ * binfmt/symtab_findorderedbyname.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/binfmt/symtab_findorderedbyvalue.c b/nuttx/binfmt/symtab_findorderedbyvalue.c index a995595da9..92b107856d 100644 --- a/nuttx/binfmt/symtab_findorderedbyvalue.c +++ b/nuttx/binfmt/symtab_findorderedbyvalue.c @@ -2,7 +2,7 @@ * binfmt/symtab_findorderedbyvalue.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/hello/appconfig b/nuttx/configs/amber/hello/appconfig index b932c0470a..35d94bcd72 100644 --- a/nuttx/configs/amber/hello/appconfig +++ b/nuttx/configs/amber/hello/appconfig @@ -2,7 +2,7 @@ # configs/amber/hello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/hello/ld.script b/nuttx/configs/amber/hello/ld.script index 719f68163c..af7eed6f30 100644 --- a/nuttx/configs/amber/hello/ld.script +++ b/nuttx/configs/amber/hello/ld.script @@ -2,7 +2,7 @@ * configs/amber/hello/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/hello/setenv.sh b/nuttx/configs/amber/hello/setenv.sh index 4ce47684d3..094bad8b92 100755 --- a/nuttx/configs/amber/hello/setenv.sh +++ b/nuttx/configs/amber/hello/setenv.sh @@ -2,7 +2,7 @@ # configs/amber/hello/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/include/board.h b/nuttx/configs/amber/include/board.h index 0aaa6baa86..dba47cb95f 100755 --- a/nuttx/configs/amber/include/board.h +++ b/nuttx/configs/amber/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/src/Makefile b/nuttx/configs/amber/src/Makefile index 2437599247..7b30e6ff6e 100644 --- a/nuttx/configs/amber/src/Makefile +++ b/nuttx/configs/amber/src/Makefile @@ -2,7 +2,7 @@ # configs/amber/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/amber/src/amber_internal.h b/nuttx/configs/amber/src/amber_internal.h index 7f16e3d740..6e847bdec9 100644 --- a/nuttx/configs/amber/src/amber_internal.h +++ b/nuttx/configs/amber/src/amber_internal.h @@ -1,101 +1,101 @@ -/**************************************************************************** - * configs/amber/src/pcblogic-internal.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H -#define __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/************************************************************************************ - * Name: atmega_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the Amber Web Server. - * - ************************************************************************************/ - -#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) -EXTERN void weak_function atmega_spiinitialize(void); -#endif - -/************************************************************************************ - * Name: atmega_ledinit - * - * Description: - * Configure on-board LEDs if LED support has been selected. - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -EXTERN void atmega_ledinit(void); -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H */ +/**************************************************************************** + * configs/amber/src/amber-internal.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H +#define __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Name: atmega_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Amber Web Server. + * + ************************************************************************************/ + +#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) +EXTERN void weak_function atmega_spiinitialize(void); +#endif + +/************************************************************************************ + * Name: atmega_ledinit + * + * Description: + * Configure on-board LEDs if LED support has been selected. + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +EXTERN void atmega_ledinit(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_AMBER_SRC_AMBER_INTERNAL_H */ diff --git a/nuttx/configs/amber/src/up_boot.c b/nuttx/configs/amber/src/up_boot.c index ba80f4b8b0..e21ab3b252 100644 --- a/nuttx/configs/amber/src/up_boot.c +++ b/nuttx/configs/amber/src/up_boot.c @@ -3,7 +3,7 @@ * arch/mips/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/include/board.h b/nuttx/configs/avr32dev1/include/board.h index c09adc56fa..008c5ffe34 100755 --- a/nuttx/configs/avr32dev1/include/board.h +++ b/nuttx/configs/avr32dev1/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/nsh/Make.defs b/nuttx/configs/avr32dev1/nsh/Make.defs index 6be28bc8a8..e2880edcae 100755 --- a/nuttx/configs/avr32dev1/nsh/Make.defs +++ b/nuttx/configs/avr32dev1/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/avr32dev1/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index 4fc5089e2d..730d843918 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -2,7 +2,7 @@ # configs/avr32dev1/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/nsh/ld.script b/nuttx/configs/avr32dev1/nsh/ld.script index 04a2087a1c..1a7035a739 100755 --- a/nuttx/configs/avr32dev1/nsh/ld.script +++ b/nuttx/configs/avr32dev1/nsh/ld.script @@ -2,7 +2,7 @@ * configs/avr32dev1/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/nsh/setenv.sh b/nuttx/configs/avr32dev1/nsh/setenv.sh index c37cc08985..b3ab164ad4 100755 --- a/nuttx/configs/avr32dev1/nsh/setenv.sh +++ b/nuttx/configs/avr32dev1/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/avr32dev1/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/ostest/Make.defs b/nuttx/configs/avr32dev1/ostest/Make.defs index 29e82fcd4e..b02597fe06 100755 --- a/nuttx/configs/avr32dev1/ostest/Make.defs +++ b/nuttx/configs/avr32dev1/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/avr32dev1/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/ostest/appconfig b/nuttx/configs/avr32dev1/ostest/appconfig index e87ca0d13d..4e3f490dcf 100644 --- a/nuttx/configs/avr32dev1/ostest/appconfig +++ b/nuttx/configs/avr32dev1/ostest/appconfig @@ -2,7 +2,7 @@ # configs/avr32dev1/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 0c0ffafaab..e8d8e378ad 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -2,7 +2,7 @@ # configs/avr32dev1/ostest/defconfig # # Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/ostest/ld.script b/nuttx/configs/avr32dev1/ostest/ld.script index d4d89881c8..189a9ebe34 100755 --- a/nuttx/configs/avr32dev1/ostest/ld.script +++ b/nuttx/configs/avr32dev1/ostest/ld.script @@ -2,7 +2,7 @@ * configs/avr32dev1/ostest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/ostest/setenv.sh b/nuttx/configs/avr32dev1/ostest/setenv.sh index e2eb1d2f0f..3c3bfcc408 100755 --- a/nuttx/configs/avr32dev1/ostest/setenv.sh +++ b/nuttx/configs/avr32dev1/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/avr32dev1/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/src/Makefile b/nuttx/configs/avr32dev1/src/Makefile index 282aaa8aa6..e49d457925 100644 --- a/nuttx/configs/avr32dev1/src/Makefile +++ b/nuttx/configs/avr32dev1/src/Makefile @@ -2,7 +2,7 @@ # configs/avr32dev1/src/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/src/avr32dev1_internal.h b/nuttx/configs/avr32dev1/src/avr32dev1_internal.h index 30f19c7dbc..31561c881c 100644 --- a/nuttx/configs/avr32dev1/src/avr32dev1_internal.h +++ b/nuttx/configs/avr32dev1/src/avr32dev1_internal.h @@ -1,127 +1,127 @@ -/************************************************************************************ - * configs/avr32dev1/src/avr32dev1_internal.h - * arch/avr/src/board/avr32dev1_internal.n - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H -#define _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include -#include "at32uc3_config.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Configuration ********************************************************************/ - -#if (CONFIG_AVR32_GPIOIRQSETB & 4) == 1 -# define CONFIG_AVR32DEV_BUTTON1_IRQ 1 -#endif - -#if (CONFIG_AVR32_GPIOIRQSETB & 8) == 1 -# define CONFIG_AVR32DEV_BUTTON2_IRQ 1 -#endif - -/* AVRDEV1 GPIO Pin Definitions *****************************************************/ -/* LEDs - * - * The AVR32DEV1 board has 3 LEDs, two of which can be controlled through GPIO pins. - * - * PIN 13 PA7 LED1 - * PIN 14 PA8 LED2 - */ - -#define PINMUX_GPIO_LED1 (GPIO_ENABLE | GPIO_OUTPUT | GPIO_LOW | GPIO_PORTA | 7) -#define PINMUX_GPIO_LED2 (GPIO_ENABLE | GPIO_OUTPUT | GPIO_LOW | GPIO_PORTA | 8) - -/* BUTTONs - * - * The AVR32DEV1 board has 3 BUTTONs, two of which can be sensed through GPIO pins. - * - * PIN 24 PB2 KEY1 - * PIN 25 PB3 KEY2 - */ - -#if CONFIG_AVR32DEV_BUTTON1_IRQ -# define PINMUX_GPIO_BUTTON1 (GPIO_ENABLE | GPIO_INPUT | GPIO_INTR | \ - GPIO_INTMODE_BOTH | GPIO_GLITCH | GPIO_PORTB | 2) -# define GPIO_BUTTON1_IRQ AVR32_IRQ_GPIO_PB2 -#else -# define PINMUX_GPIO_BUTTON1 (GPIO_ENABLE | GPIO_INPUT | GPIO_GLITCH | \ - GPIO_PORTB | 2) -#endif - -#if CONFIG_AVR32DEV_BUTTON2_IRQ -# define PINMUX_GPIO_BUTTON2 (GPIO_ENABLE | GPIO_INPUT | GPIO_INTR | \ - GPIO_INTMODE_BOTH | GPIO_GLITCH | GPIO_PORTB | 3) -# define GPIO_BUTTON2_IRQ AVR32_IRQ_GPIO_PB3 -#else -# define PINMUX_GPIO_BUTTON2 (GPIO_ENABLE | GPIO_INPUT | GPIO_GLITCH | \ - GPIO_PORTB | 3) -#endif - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: up_ledinitialize - * - * Description: - * Configure on-board LEDs if LED support has been selected. - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -extern void up_ledinitialize(void); -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H */ - +/************************************************************************************ + * configs/avr32dev1/src/avr32dev1_internal.h + * arch/avr/src/board/avr32dev1_internal.n + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H +#define _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include +#include "at32uc3_config.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ + +#if (CONFIG_AVR32_GPIOIRQSETB & 4) == 1 +# define CONFIG_AVR32DEV_BUTTON1_IRQ 1 +#endif + +#if (CONFIG_AVR32_GPIOIRQSETB & 8) == 1 +# define CONFIG_AVR32DEV_BUTTON2_IRQ 1 +#endif + +/* AVRDEV1 GPIO Pin Definitions *****************************************************/ +/* LEDs + * + * The AVR32DEV1 board has 3 LEDs, two of which can be controlled through GPIO pins. + * + * PIN 13 PA7 LED1 + * PIN 14 PA8 LED2 + */ + +#define PINMUX_GPIO_LED1 (GPIO_ENABLE | GPIO_OUTPUT | GPIO_LOW | GPIO_PORTA | 7) +#define PINMUX_GPIO_LED2 (GPIO_ENABLE | GPIO_OUTPUT | GPIO_LOW | GPIO_PORTA | 8) + +/* BUTTONs + * + * The AVR32DEV1 board has 3 BUTTONs, two of which can be sensed through GPIO pins. + * + * PIN 24 PB2 KEY1 + * PIN 25 PB3 KEY2 + */ + +#if CONFIG_AVR32DEV_BUTTON1_IRQ +# define PINMUX_GPIO_BUTTON1 (GPIO_ENABLE | GPIO_INPUT | GPIO_INTR | \ + GPIO_INTMODE_BOTH | GPIO_GLITCH | GPIO_PORTB | 2) +# define GPIO_BUTTON1_IRQ AVR32_IRQ_GPIO_PB2 +#else +# define PINMUX_GPIO_BUTTON1 (GPIO_ENABLE | GPIO_INPUT | GPIO_GLITCH | \ + GPIO_PORTB | 2) +#endif + +#if CONFIG_AVR32DEV_BUTTON2_IRQ +# define PINMUX_GPIO_BUTTON2 (GPIO_ENABLE | GPIO_INPUT | GPIO_INTR | \ + GPIO_INTMODE_BOTH | GPIO_GLITCH | GPIO_PORTB | 3) +# define GPIO_BUTTON2_IRQ AVR32_IRQ_GPIO_PB3 +#else +# define PINMUX_GPIO_BUTTON2 (GPIO_ENABLE | GPIO_INPUT | GPIO_GLITCH | \ + GPIO_PORTB | 3) +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: up_ledinitialize + * + * Description: + * Configure on-board LEDs if LED support has been selected. + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +extern void up_ledinitialize(void); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* _CONFIGS_AVR32DEV1_SRC_AVR32DEV1_INTERNAL_H */ + diff --git a/nuttx/configs/avr32dev1/src/up_boot.c b/nuttx/configs/avr32dev1/src/up_boot.c index 44dd8ee557..5871688538 100644 --- a/nuttx/configs/avr32dev1/src/up_boot.c +++ b/nuttx/configs/avr32dev1/src/up_boot.c @@ -1,84 +1,84 @@ -/************************************************************************************ - * configs/avr32dev1/src/up_boot.c - * arch/avr/src/board/up_boot.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "up_internal.h" - -#include "at32uc3_internal.h" -#include "avr32dev1_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: up_boardinitialize - * - * Description: - * All AVR32 architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -void up_boardinitialize(void) -{ - /* Configure SPI chip selects */ - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinitialize(); -#endif -} +/************************************************************************************ + * configs/avr32dev1/src/up_boot.c + * arch/avr/src/board/up_boot.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "up_internal.h" + +#include "at32uc3_internal.h" +#include "avr32dev1_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: up_boardinitialize + * + * Description: + * All AVR32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void up_boardinitialize(void) +{ + /* Configure SPI chip selects */ + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinitialize(); +#endif +} diff --git a/nuttx/configs/avr32dev1/src/up_buttons.c b/nuttx/configs/avr32dev1/src/up_buttons.c index 882eb6d86f..5b488d72ee 100644 --- a/nuttx/configs/avr32dev1/src/up_buttons.c +++ b/nuttx/configs/avr32dev1/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_leds.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/avr32dev1/src/up_leds.c b/nuttx/configs/avr32dev1/src/up_leds.c index c7f123a98a..62cde6b210 100644 --- a/nuttx/configs/avr32dev1/src/up_leds.c +++ b/nuttx/configs/avr32dev1/src/up_leds.c @@ -3,7 +3,7 @@ * arch/avr/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/httpd/Make.defs b/nuttx/configs/c5471evm/httpd/Make.defs index 549f98cd61..59a3bad44f 100644 --- a/nuttx/configs/c5471evm/httpd/Make.defs +++ b/nuttx/configs/c5471evm/httpd/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/httpd/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/httpd/appconfig b/nuttx/configs/c5471evm/httpd/appconfig index f08e3f7c9e..1d9def12d2 100644 --- a/nuttx/configs/c5471evm/httpd/appconfig +++ b/nuttx/configs/c5471evm/httpd/appconfig @@ -2,7 +2,7 @@ # configs/c5471evm/httpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig index 386936b721..1e599d9a11 100644 --- a/nuttx/configs/c5471evm/httpd/defconfig +++ b/nuttx/configs/c5471evm/httpd/defconfig @@ -2,7 +2,7 @@ # configs/c5471evm/httpd/defconfig # # Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/httpd/setenv.sh b/nuttx/configs/c5471evm/httpd/setenv.sh index 20d8417788..e9ab8023a6 100755 --- a/nuttx/configs/c5471evm/httpd/setenv.sh +++ b/nuttx/configs/c5471evm/httpd/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/httpd/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/include/board.h b/nuttx/configs/c5471evm/include/board.h index 615d4723ac..8ee4df9ccf 100644 --- a/nuttx/configs/c5471evm/include/board.h +++ b/nuttx/configs/c5471evm/include/board.h @@ -2,7 +2,7 @@ * arch/board.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nettest/Make.defs b/nuttx/configs/c5471evm/nettest/Make.defs index 0acc3af47d..584a2e7fd7 100644 --- a/nuttx/configs/c5471evm/nettest/Make.defs +++ b/nuttx/configs/c5471evm/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/nettest/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nettest/appconfig b/nuttx/configs/c5471evm/nettest/appconfig index f1050ef733..971aca0070 100644 --- a/nuttx/configs/c5471evm/nettest/appconfig +++ b/nuttx/configs/c5471evm/nettest/appconfig @@ -2,7 +2,7 @@ # configs/c5471evm/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig index 19b865bf27..807a23f155 100644 --- a/nuttx/configs/c5471evm/nettest/defconfig +++ b/nuttx/configs/c5471evm/nettest/defconfig @@ -2,7 +2,7 @@ # configs/c5471evm/nettest/defconfig # # Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nettest/setenv.sh b/nuttx/configs/c5471evm/nettest/setenv.sh index b9c7b6db27..67bcbc1f68 100755 --- a/nuttx/configs/c5471evm/nettest/setenv.sh +++ b/nuttx/configs/c5471evm/nettest/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/nettest/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nsh/Make.defs b/nuttx/configs/c5471evm/nsh/Make.defs index d5e4d54ac8..1977cc2332 100644 --- a/nuttx/configs/c5471evm/nsh/Make.defs +++ b/nuttx/configs/c5471evm/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/nsh/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig index 2bcb89b115..9f5bc6373a 100644 --- a/nuttx/configs/c5471evm/nsh/defconfig +++ b/nuttx/configs/c5471evm/nsh/defconfig @@ -2,7 +2,7 @@ # configs/c5471evm/nsh/defconfig # # Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/nsh/setenv.sh b/nuttx/configs/c5471evm/nsh/setenv.sh index 4ee41c934a..0693ede0ac 100755 --- a/nuttx/configs/c5471evm/nsh/setenv.sh +++ b/nuttx/configs/c5471evm/nsh/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/nsh/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/ostest/Make.defs b/nuttx/configs/c5471evm/ostest/Make.defs index 7d147c9de3..8773c7c68b 100644 --- a/nuttx/configs/c5471evm/ostest/Make.defs +++ b/nuttx/configs/c5471evm/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/ostest/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/ostest/appconfig b/nuttx/configs/c5471evm/ostest/appconfig index 97e30c0f8e..759015c6ac 100644 --- a/nuttx/configs/c5471evm/ostest/appconfig +++ b/nuttx/configs/c5471evm/ostest/appconfig @@ -2,7 +2,7 @@ # configs/c5471evm/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig index ac11ba1a1a..4921b59e6a 100644 --- a/nuttx/configs/c5471evm/ostest/defconfig +++ b/nuttx/configs/c5471evm/ostest/defconfig @@ -2,7 +2,7 @@ # configs/c5471evm/ostest/defconfig # # Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/ostest/setenv.sh b/nuttx/configs/c5471evm/ostest/setenv.sh index dc2c643764..e48437a419 100755 --- a/nuttx/configs/c5471evm/ostest/setenv.sh +++ b/nuttx/configs/c5471evm/ostest/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/ostest/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/src/Makefile b/nuttx/configs/c5471evm/src/Makefile index fab7141e58..57f52b4fee 100644 --- a/nuttx/configs/c5471evm/src/Makefile +++ b/nuttx/configs/c5471evm/src/Makefile @@ -2,7 +2,7 @@ # configs/c5471evm/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/c5471evm/src/up_leds.c b/nuttx/configs/c5471evm/src/up_leds.c index f733e9ffe0..72811a8711 100644 --- a/nuttx/configs/c5471evm/src/up_leds.c +++ b/nuttx/configs/c5471evm/src/up_leds.c @@ -2,7 +2,7 @@ * up_leds.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e88/nsh_highram/Make.defs b/nuttx/configs/compal_e88/nsh_highram/Make.defs index 4a9b3d200f..d22675f179 100644 --- a/nuttx/configs/compal_e88/nsh_highram/Make.defs +++ b/nuttx/configs/compal_e88/nsh_highram/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/nsh/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e88/nsh_highram/appconfig b/nuttx/configs/compal_e88/nsh_highram/appconfig index dd189fa1f7..00921c3614 100644 --- a/nuttx/configs/compal_e88/nsh_highram/appconfig +++ b/nuttx/configs/compal_e88/nsh_highram/appconfig @@ -2,7 +2,7 @@ # configs/compal_e88/nsh_highram/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e88/nsh_highram/setenv.sh b/nuttx/configs/compal_e88/nsh_highram/setenv.sh index 4ee41c934a..0693ede0ac 100644 --- a/nuttx/configs/compal_e88/nsh_highram/setenv.sh +++ b/nuttx/configs/compal_e88/nsh_highram/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/nsh/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e88/src/Makefile b/nuttx/configs/compal_e88/src/Makefile index 8996ca20a8..13e1ae09f2 100644 --- a/nuttx/configs/compal_e88/src/Makefile +++ b/nuttx/configs/compal_e88/src/Makefile @@ -2,7 +2,7 @@ # configs/compal_e88/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Copyright (C) 2011 Stefan Richter. All rights reserved. # Author: Stefan Richter diff --git a/nuttx/configs/compal_e99/nsh_compalram/Make.defs b/nuttx/configs/compal_e99/nsh_compalram/Make.defs index 7a99f90bf5..0a93ce7525 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/Make.defs +++ b/nuttx/configs/compal_e99/nsh_compalram/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/nsh/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/nsh_compalram/appconfig b/nuttx/configs/compal_e99/nsh_compalram/appconfig index b94469ee00..8df90adb0a 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/appconfig +++ b/nuttx/configs/compal_e99/nsh_compalram/appconfig @@ -2,7 +2,7 @@ # configs/compal_e99/nsh_compalram/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/nsh_compalram/setenv.sh b/nuttx/configs/compal_e99/nsh_compalram/setenv.sh index 4ee41c934a..0693ede0ac 100644 --- a/nuttx/configs/compal_e99/nsh_compalram/setenv.sh +++ b/nuttx/configs/compal_e99/nsh_compalram/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/nsh/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/nsh_highram/Make.defs b/nuttx/configs/compal_e99/nsh_highram/Make.defs index 4a9b3d200f..d22675f179 100644 --- a/nuttx/configs/compal_e99/nsh_highram/Make.defs +++ b/nuttx/configs/compal_e99/nsh_highram/Make.defs @@ -2,7 +2,7 @@ # configs/c5471evm/nsh/Make.defs # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/nsh_highram/appconfig b/nuttx/configs/compal_e99/nsh_highram/appconfig index 65eed81f79..241253f8cd 100644 --- a/nuttx/configs/compal_e99/nsh_highram/appconfig +++ b/nuttx/configs/compal_e99/nsh_highram/appconfig @@ -2,7 +2,7 @@ # configs/compal_e99/nsh_highram/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/nsh_highram/setenv.sh b/nuttx/configs/compal_e99/nsh_highram/setenv.sh index 4ee41c934a..0693ede0ac 100644 --- a/nuttx/configs/compal_e99/nsh_highram/setenv.sh +++ b/nuttx/configs/compal_e99/nsh_highram/setenv.sh @@ -2,7 +2,7 @@ # c5471evm/nsh/setenv.sh # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/compal_e99/src/Makefile b/nuttx/configs/compal_e99/src/Makefile index 97569236fe..2a5ad6783e 100644 --- a/nuttx/configs/compal_e99/src/Makefile +++ b/nuttx/configs/compal_e99/src/Makefile @@ -2,7 +2,7 @@ # configs/compal_e99/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Copyright (C) 2011 Stefan Richter. All rights reserved. # Author: Stefan Richter diff --git a/nuttx/configs/demo9s12ne64/include/board.h b/nuttx/configs/demo9s12ne64/include/board.h index ee190731cb..501b2f8e09 100755 --- a/nuttx/configs/demo9s12ne64/include/board.h +++ b/nuttx/configs/demo9s12ne64/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/ostest/Make.defs b/nuttx/configs/demo9s12ne64/ostest/Make.defs index 1ae7b5f394..58d502e967 100755 --- a/nuttx/configs/demo9s12ne64/ostest/Make.defs +++ b/nuttx/configs/demo9s12ne64/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/demo9s12ne64/ostest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/ostest/appconfig b/nuttx/configs/demo9s12ne64/ostest/appconfig index 0fcb806263..f101d01ece 100644 --- a/nuttx/configs/demo9s12ne64/ostest/appconfig +++ b/nuttx/configs/demo9s12ne64/ostest/appconfig @@ -2,7 +2,7 @@ # configs/demo9s12ne64/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/ostest/ld.script.banked b/nuttx/configs/demo9s12ne64/ostest/ld.script.banked index 17c73dd53e..798658f39e 100755 --- a/nuttx/configs/demo9s12ne64/ostest/ld.script.banked +++ b/nuttx/configs/demo9s12ne64/ostest/ld.script.banked @@ -2,7 +2,7 @@ * configs/demo9s12ne64/ostest/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/ostest/ld.script.nonbanked b/nuttx/configs/demo9s12ne64/ostest/ld.script.nonbanked index 8e2a276884..ab36d1c4e2 100755 --- a/nuttx/configs/demo9s12ne64/ostest/ld.script.nonbanked +++ b/nuttx/configs/demo9s12ne64/ostest/ld.script.nonbanked @@ -2,7 +2,7 @@ * configs/demo9s12ne64/ostest/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/ostest/setenv.sh b/nuttx/configs/demo9s12ne64/ostest/setenv.sh index 0010997b7c..8f47650ca5 100755 --- a/nuttx/configs/demo9s12ne64/ostest/setenv.sh +++ b/nuttx/configs/demo9s12ne64/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/demo9s12ne64/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/src/Makefile b/nuttx/configs/demo9s12ne64/src/Makefile index 37dc211507..7ab12080cc 100644 --- a/nuttx/configs/demo9s12ne64/src/Makefile +++ b/nuttx/configs/demo9s12ne64/src/Makefile @@ -2,7 +2,7 @@ # configs/demo9s12ne64/src/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h b/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h index 4ce8b46aaa..0a6c8e2c9e 100644 --- a/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h +++ b/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h @@ -1,91 +1,91 @@ -/************************************************************************************ - * configs/demo9s12ne64/src/demo9s12ne64.h - * arch/arm/src/board/demo9s12ne64.n - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H -#define __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* DEMO9S12NE64 GPIOs ***************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ -/************************************************************************************ - * Name: up_ledinit - * - * Description: - * Configure and initialize on-board LEDs - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -extern void up_ledinit(void); -#endif - -/************************************************************************************ - * Name: hcs12_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. - * - ************************************************************************************/ - -extern void weak_function hcs12_spiinitialize(void); - - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H */ - +/************************************************************************************ + * configs/demo9s12ne64/src/demo9s12ne64.h + * arch/arm/src/board/demo9s12ne64.n + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H +#define __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* DEMO9S12NE64 GPIOs ***************************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ +/************************************************************************************ + * Name: up_ledinit + * + * Description: + * Configure and initialize on-board LEDs + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +extern void up_ledinit(void); +#endif + +/************************************************************************************ + * Name: hcs12_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. + * + ************************************************************************************/ + +extern void weak_function hcs12_spiinitialize(void); + + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_DEMO9S12NE64_SRC_DEMO9S12NE64_H */ + diff --git a/nuttx/configs/demo9s12ne64/src/up_boot.c b/nuttx/configs/demo9s12ne64/src/up_boot.c index 61313618ae..a98bb0d909 100644 --- a/nuttx/configs/demo9s12ne64/src/up_boot.c +++ b/nuttx/configs/demo9s12ne64/src/up_boot.c @@ -1,89 +1,89 @@ -/************************************************************************************ - * configs/demo9s12ne64/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "demo9s12ne64.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: hcs12_boardinitialize - * - * Description: - * All HCS12 architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -void hcs12_boardinitialize(void) -{ - /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function - * hcs12_spiinitialize() has been brought into the link. - */ - -#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI) - if (hcs12_spiinitialize) - { - hcs12_spiinitialize(); - } -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/demo9s12ne64/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "demo9s12ne64.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: hcs12_boardinitialize + * + * Description: + * All HCS12 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void hcs12_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function + * hcs12_spiinitialize() has been brought into the link. + */ + +#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI) + if (hcs12_spiinitialize) + { + hcs12_spiinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/demo9s12ne64/src/up_buttons.c b/nuttx/configs/demo9s12ne64/src/up_buttons.c index fa015585de..b895f45a36 100644 --- a/nuttx/configs/demo9s12ne64/src/up_buttons.c +++ b/nuttx/configs/demo9s12ne64/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/demo9s12ne64/src/up_leds.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/src/up_leds.c b/nuttx/configs/demo9s12ne64/src/up_leds.c index f84f83cddc..1984d81652 100644 --- a/nuttx/configs/demo9s12ne64/src/up_leds.c +++ b/nuttx/configs/demo9s12ne64/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/src/up_nsh.c b/nuttx/configs/demo9s12ne64/src/up_nsh.c index 451ea901d6..7e53f7f076 100644 --- a/nuttx/configs/demo9s12ne64/src/up_nsh.c +++ b/nuttx/configs/demo9s12ne64/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/demo9s12ne64/src/up_spi.c b/nuttx/configs/demo9s12ne64/src/up_spi.c index 5f33d0776a..8514b48ed1 100644 --- a/nuttx/configs/demo9s12ne64/src/up_spi.c +++ b/nuttx/configs/demo9s12ne64/src/up_spi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_spi.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/include/board.h b/nuttx/configs/ea3131/include/board.h index 7e0a01b6ac..2154af545b 100644 --- a/nuttx/configs/ea3131/include/board.h +++ b/nuttx/configs/ea3131/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/include/board_memorymap.h b/nuttx/configs/ea3131/include/board_memorymap.h index 2604865c10..69fe0ae961 100644 --- a/nuttx/configs/ea3131/include/board_memorymap.h +++ b/nuttx/configs/ea3131/include/board_memorymap.h @@ -3,7 +3,7 @@ * include/arch/board/board_memorymap.h * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/locked/Makefile b/nuttx/configs/ea3131/locked/Makefile index 1108132ac0..79fa82610c 100644 --- a/nuttx/configs/ea3131/locked/Makefile +++ b/nuttx/configs/ea3131/locked/Makefile @@ -2,7 +2,7 @@ # configs/ea3131/locked/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/locked/ld-locked.script b/nuttx/configs/ea3131/locked/ld-locked.script index ddc865b2fa..955505364f 100644 --- a/nuttx/configs/ea3131/locked/ld-locked.script +++ b/nuttx/configs/ea3131/locked/ld-locked.script @@ -2,7 +2,7 @@ * configs/ea3131/locked/ld-locked.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/nsh/Make.defs b/nuttx/configs/ea3131/nsh/Make.defs index bff75e8e01..01b83a5a63 100644 --- a/nuttx/configs/ea3131/nsh/Make.defs +++ b/nuttx/configs/ea3131/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/ea3131/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/nsh/setenv.sh b/nuttx/configs/ea3131/nsh/setenv.sh index 671df47f19..00b1e0c436 100755 --- a/nuttx/configs/ea3131/nsh/setenv.sh +++ b/nuttx/configs/ea3131/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/ea3131/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/ostest/appconfig b/nuttx/configs/ea3131/ostest/appconfig index aa56dd4c1c..c665ea7b2a 100644 --- a/nuttx/configs/ea3131/ostest/appconfig +++ b/nuttx/configs/ea3131/ostest/appconfig @@ -2,7 +2,7 @@ # configs/ea3131/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/ostest/setenv.sh b/nuttx/configs/ea3131/ostest/setenv.sh index a8155ab79c..cd894a300a 100755 --- a/nuttx/configs/ea3131/ostest/setenv.sh +++ b/nuttx/configs/ea3131/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/ea3131/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/pgnsh/setenv.sh b/nuttx/configs/ea3131/pgnsh/setenv.sh index 82205c4523..ead7c9ffad 100755 --- a/nuttx/configs/ea3131/pgnsh/setenv.sh +++ b/nuttx/configs/ea3131/pgnsh/setenv.sh @@ -2,7 +2,7 @@ # configs/ea3131/pgnsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/src/up_buttons.c b/nuttx/configs/ea3131/src/up_buttons.c index f7c13b93aa..8dd468a9e6 100644 --- a/nuttx/configs/ea3131/src/up_buttons.c +++ b/nuttx/configs/ea3131/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/ea3131/src/up_leds.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/src/up_clkinit.c b/nuttx/configs/ea3131/src/up_clkinit.c index a0eba9c75d..247844a81b 100644 --- a/nuttx/configs/ea3131/src/up_clkinit.c +++ b/nuttx/configs/ea3131/src/up_clkinit.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_clkinit.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - NXP UM10314 LPC3130/31 User manual Rev. 1.01 — 9 September 2009 diff --git a/nuttx/configs/ea3131/src/up_leds.c b/nuttx/configs/ea3131/src/up_leds.c index a0bec01b02..ab22c7657c 100644 --- a/nuttx/configs/ea3131/src/up_leds.c +++ b/nuttx/configs/ea3131/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/src/up_usbmsc.c b/nuttx/configs/ea3131/src/up_usbmsc.c index b1d07ac55f..5f4850ea1c 100644 --- a/nuttx/configs/ea3131/src/up_usbmsc.c +++ b/nuttx/configs/ea3131/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/ea3131/src/up_usbmsc.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the SAM3U MMC/SD SDIO block driver. * diff --git a/nuttx/configs/ea3131/tools/Makefile b/nuttx/configs/ea3131/tools/Makefile index 6c3362d8c1..0d6f43d09e 100644 --- a/nuttx/configs/ea3131/tools/Makefile +++ b/nuttx/configs/ea3131/tools/Makefile @@ -2,7 +2,7 @@ # configs/ea3131/tools/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/tools/lpchdr.c b/nuttx/configs/ea3131/tools/lpchdr.c index 9325c88135..d21cf3906f 100644 --- a/nuttx/configs/ea3131/tools/lpchdr.c +++ b/nuttx/configs/ea3131/tools/lpchdr.c @@ -2,7 +2,7 @@ * configs/ea3131/tools/lpchdr.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/tools/lpchdr.h b/nuttx/configs/ea3131/tools/lpchdr.h index 46cc910762..7ada6bb359 100644 --- a/nuttx/configs/ea3131/tools/lpchdr.h +++ b/nuttx/configs/ea3131/tools/lpchdr.h @@ -2,7 +2,7 @@ * configs/ea3131/tools/lpchdr.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/usbserial/appconfig b/nuttx/configs/ea3131/usbserial/appconfig index 32c385dc89..76ec23eb0c 100644 --- a/nuttx/configs/ea3131/usbserial/appconfig +++ b/nuttx/configs/ea3131/usbserial/appconfig @@ -2,7 +2,7 @@ # configs/ea3131/usbserial/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/usbserial/setenv.sh b/nuttx/configs/ea3131/usbserial/setenv.sh index d48e40756d..69a6bb4421 100755 --- a/nuttx/configs/ea3131/usbserial/setenv.sh +++ b/nuttx/configs/ea3131/usbserial/setenv.sh @@ -2,7 +2,7 @@ # configs/ea3131/usbserial/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/usbstorage/appconfig b/nuttx/configs/ea3131/usbstorage/appconfig index 9022fd3ad1..8db7e05d68 100644 --- a/nuttx/configs/ea3131/usbstorage/appconfig +++ b/nuttx/configs/ea3131/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/ea3131/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ea3131/usbstorage/setenv.sh b/nuttx/configs/ea3131/usbstorage/setenv.sh index 2a20e7ba9c..6481502283 100755 --- a/nuttx/configs/ea3131/usbstorage/setenv.sh +++ b/nuttx/configs/ea3131/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/ea3131/usbstorage/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/httpd/Make.defs b/nuttx/configs/eagle100/httpd/Make.defs index b19de75472..6d9f86db57 100644 --- a/nuttx/configs/eagle100/httpd/Make.defs +++ b/nuttx/configs/eagle100/httpd/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/httpd/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/httpd/appconfig b/nuttx/configs/eagle100/httpd/appconfig index adfe0291bf..fbb81805db 100644 --- a/nuttx/configs/eagle100/httpd/appconfig +++ b/nuttx/configs/eagle100/httpd/appconfig @@ -2,7 +2,7 @@ # configs/eagle100/httpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index 93565d4aa8..3ad9220977 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -2,7 +2,7 @@ # configs/eagle100/httpd/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/httpd/setenv.sh b/nuttx/configs/eagle100/httpd/setenv.sh index 337ecc9676..e17655b0a3 100755 --- a/nuttx/configs/eagle100/httpd/setenv.sh +++ b/nuttx/configs/eagle100/httpd/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/httpd/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/include/board.h b/nuttx/configs/eagle100/include/board.h index d05d45f43a..40a12327fb 100644 --- a/nuttx/configs/eagle100/include/board.h +++ b/nuttx/configs/eagle100/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nettest/Make.defs b/nuttx/configs/eagle100/nettest/Make.defs index 295d0b0cc9..2bfabeade9 100644 --- a/nuttx/configs/eagle100/nettest/Make.defs +++ b/nuttx/configs/eagle100/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/nettest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nettest/appconfig b/nuttx/configs/eagle100/nettest/appconfig index 9c6b568247..e5ff507b89 100644 --- a/nuttx/configs/eagle100/nettest/appconfig +++ b/nuttx/configs/eagle100/nettest/appconfig @@ -2,7 +2,7 @@ # configs/eagle100/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nettest/setenv.sh b/nuttx/configs/eagle100/nettest/setenv.sh index 555e6b553a..ce89c68aac 100755 --- a/nuttx/configs/eagle100/nettest/setenv.sh +++ b/nuttx/configs/eagle100/nettest/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/nettest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nsh/Make.defs b/nuttx/configs/eagle100/nsh/Make.defs index 7fbd738f5d..066b00ceea 100644 --- a/nuttx/configs/eagle100/nsh/Make.defs +++ b/nuttx/configs/eagle100/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/nsh/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nsh/setenv.sh b/nuttx/configs/eagle100/nsh/setenv.sh index 6e487c2a35..93396cb736 100755 --- a/nuttx/configs/eagle100/nsh/setenv.sh +++ b/nuttx/configs/eagle100/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/nsh/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nxflat/Make.defs b/nuttx/configs/eagle100/nxflat/Make.defs index 2c7ef95838..2cd0a3b6cf 100644 --- a/nuttx/configs/eagle100/nxflat/Make.defs +++ b/nuttx/configs/eagle100/nxflat/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/nxflat/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nxflat/appconfig b/nuttx/configs/eagle100/nxflat/appconfig index dae39407d2..44dc4bf96d 100644 --- a/nuttx/configs/eagle100/nxflat/appconfig +++ b/nuttx/configs/eagle100/nxflat/appconfig @@ -2,7 +2,7 @@ # configs/eagle100/nxflat/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index f917f91a0f..7befde172c 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -2,7 +2,7 @@ # configs/eagle100/nxflat/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/nxflat/setenv.sh b/nuttx/configs/eagle100/nxflat/setenv.sh index 4e0c8e040b..39afe386f7 100755 --- a/nuttx/configs/eagle100/nxflat/setenv.sh +++ b/nuttx/configs/eagle100/nxflat/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/nxflat/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/ostest/Make.defs b/nuttx/configs/eagle100/ostest/Make.defs index edc1afd19a..1694942a89 100644 --- a/nuttx/configs/eagle100/ostest/Make.defs +++ b/nuttx/configs/eagle100/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/ostest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/ostest/appconfig b/nuttx/configs/eagle100/ostest/appconfig index 7bf44797ad..1be133dec8 100644 --- a/nuttx/configs/eagle100/ostest/appconfig +++ b/nuttx/configs/eagle100/ostest/appconfig @@ -2,7 +2,7 @@ # configs/eagle100/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/ostest/setenv.sh b/nuttx/configs/eagle100/ostest/setenv.sh index b370ce3726..c3c1f581db 100755 --- a/nuttx/configs/eagle100/ostest/setenv.sh +++ b/nuttx/configs/eagle100/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/src/Makefile b/nuttx/configs/eagle100/src/Makefile index 23311f40bf..123aa81398 100644 --- a/nuttx/configs/eagle100/src/Makefile +++ b/nuttx/configs/eagle100/src/Makefile @@ -2,7 +2,7 @@ # configs/eagle100/src/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/src/eagle100_internal.h b/nuttx/configs/eagle100/src/eagle100_internal.h index 68a64bde19..88d2bf3b0e 100644 --- a/nuttx/configs/eagle100/src/eagle100_internal.h +++ b/nuttx/configs/eagle100/src/eagle100_internal.h @@ -1,106 +1,106 @@ -/************************************************************************************ - * configs/eagle100/src/eagle100_internal.h - * arch/arm/src/board/eagle100_internal.n - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H -#define __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* How many SSI modules does this chip support? The LM3S6918 supports 2 SSI - * modules (others may support more -- in such case, the following must be - * expanded). - */ - -#if LM3S_NSSI == 0 -# undef CONFIG_SSI0_DISABLE -# define CONFIG_SSI0_DISABLE 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#elif LM3S_NSSI == 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#endif - -/* Eagle-100 GPIOs ******************************************************************/ - -/* GPIO for microSD card chip select */ - -#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ - GPIO_VALUE_ONE | GPIO_PORTG | 1) -#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTE | 1) - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the Eagle100 board. - * - ************************************************************************************/ - -extern void weak_function lm3s_ssiinitialize(void); - -/**************************************************************************** - * Name: up_ledinit - * - * Description: - * Initialize on-board LEDs. - * - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -extern void up_ledinit(void); -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H */ - +/************************************************************************************ + * configs/eagle100/src/eagle100_internal.h + * arch/arm/src/board/eagle100_internal.n + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H +#define __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* How many SSI modules does this chip support? The LM3S6918 supports 2 SSI + * modules (others may support more -- in such case, the following must be + * expanded). + */ + +#if LM3S_NSSI == 0 +# undef CONFIG_SSI0_DISABLE +# define CONFIG_SSI0_DISABLE 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#elif LM3S_NSSI == 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#endif + +/* Eagle-100 GPIOs ******************************************************************/ + +/* GPIO for microSD card chip select */ + +#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ + GPIO_VALUE_ONE | GPIO_PORTG | 1) +#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTE | 1) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Eagle100 board. + * + ************************************************************************************/ + +extern void weak_function lm3s_ssiinitialize(void); + +/**************************************************************************** + * Name: up_ledinit + * + * Description: + * Initialize on-board LEDs. + * + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +extern void up_ledinit(void); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_EAGLE100_SRC_EAGLE100_INTERNAL_H */ + diff --git a/nuttx/configs/eagle100/src/up_boot.c b/nuttx/configs/eagle100/src/up_boot.c index 61dab16532..44f003e0b0 100644 --- a/nuttx/configs/eagle100/src/up_boot.c +++ b/nuttx/configs/eagle100/src/up_boot.c @@ -1,91 +1,91 @@ -/************************************************************************************ - * configs/eagle100/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "eagle100_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_boardinitialize - * - * Description: - * All LM3S architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - ************************************************************************************/ - -void lm3s_boardinitialize(void) -{ - /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function - * lm3s_ssiinitialize() has been brought into the link. - */ - -/* The Eagle100 microSD CS is on SSI0 */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - if (lm3s_ssiinitialize) - { - lm3s_ssiinitialize(); - } -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/eagle100/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "eagle100_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_boardinitialize + * + * Description: + * All LM3S architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + ************************************************************************************/ + +void lm3s_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function + * lm3s_ssiinitialize() has been brought into the link. + */ + +/* The Eagle100 microSD CS is on SSI0 */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + if (lm3s_ssiinitialize) + { + lm3s_ssiinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/eagle100/src/up_ethernet.c b/nuttx/configs/eagle100/src/up_ethernet.c index 54145ff589..a071fcca9a 100644 --- a/nuttx/configs/eagle100/src/up_ethernet.c +++ b/nuttx/configs/eagle100/src/up_ethernet.c @@ -1,98 +1,98 @@ -/************************************************************************************ - * configs/eagle100/src/up_ethernet.c - * arch/arm/src/board/up_ethernet.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ethernetmac - * - * Description: - * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile - * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function - * will obtain the MAC address from these registers. - * - ************************************************************************************/ - -#ifdef CONFIG_LM3S_BOARDMAC -void lm3s_ethernetmac(struct ether_addr *ethaddr) -{ - uint32_t user0; - uint32_t user1; - - /* Get the current value of the user registers */ - - user0 = getreg32(LM3S_FLASH_USERREG0); - user1 = getreg32(LM3S_FLASH_USERREG1); - - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); - DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - - /* Re-format that MAC address the way that uIP expects to see it */ - - ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); - ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); - ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); - ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); - ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); - ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); -} -#endif +/************************************************************************************ + * configs/eagle100/src/up_ethernet.c + * arch/arm/src/board/up_ethernet.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ethernetmac + * + * Description: + * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile + * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function + * will obtain the MAC address from these registers. + * + ************************************************************************************/ + +#ifdef CONFIG_LM3S_BOARDMAC +void lm3s_ethernetmac(struct ether_addr *ethaddr) +{ + uint32_t user0; + uint32_t user1; + + /* Get the current value of the user registers */ + + user0 = getreg32(LM3S_FLASH_USERREG0); + user1 = getreg32(LM3S_FLASH_USERREG1); + + nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); + + /* Re-format that MAC address the way that uIP expects to see it */ + + ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); + ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); + ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); + ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); + ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); + ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); +} +#endif diff --git a/nuttx/configs/eagle100/src/up_leds.c b/nuttx/configs/eagle100/src/up_leds.c index e567955b34..59b489c114 100644 --- a/nuttx/configs/eagle100/src/up_leds.c +++ b/nuttx/configs/eagle100/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/src/up_ssi.c b/nuttx/configs/eagle100/src/up_ssi.c index 2d0237266a..fb5f99df34 100644 --- a/nuttx/configs/eagle100/src/up_ssi.c +++ b/nuttx/configs/eagle100/src/up_ssi.c @@ -1,152 +1,152 @@ -/************************************************************************************ - * configs/eagle100/src/up_ssi.c - * arch/arm/src/board/up_ssi.c - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "lm3s_internal.h" -#include "eagle100_internal.h" - -/* The Eagle100 microSD CS is on SSI0 */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ - -#ifdef SSI_VERBOSE -# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) -#else -# define ssi_dumpgpio(m) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the Eagle100 board. - * - ************************************************************************************/ - -void weak_function lm3s_ssiinitialize(void) -{ - /* Configure the SPI-based microSD CS GPIO */ - - ssi_dumpgpio("lm3s_ssiinitialize() before lm3s_configgpio()"); - lm3s_configgpio(SDCCS_GPIO); - ssi_dumpgpio("lm3s_ssiinitialize() after lm3s_configgpio()"); -} - -/**************************************************************************** - * The external functions, lm3s_spiselect and lm3s_spistatus must be provided - * by board-specific logic. The are implementations of the select and status - * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). - * All othermethods (including up_spiinitialize()) are provided by common - * logic. To use this common SPI logic on your board: - * - * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. Add a call to up_spiinitialize() in your low level initialization - * logic - * 3. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ****************************************************************************/ - -void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - if (devid == SPIDEV_MMCSD) - { - /* Assert the CS pin to the card */ - - ssi_dumpgpio("lm3s_spiselect() before lm3s_gpiowrite()"); - lm3s_gpiowrite(SDCCS_GPIO, !selected); - ssi_dumpgpio("lm3s_spiselect() after lm3s_gpiowrite()"); - } -} - -uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - ssidbg("Returning SPI_STATUS_PRESENT\n"); - return SPI_STATUS_PRESENT; -} - -#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ +/************************************************************************************ + * configs/eagle100/src/up_ssi.c + * arch/arm/src/board/up_ssi.c + * + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "lm3s_internal.h" +#include "eagle100_internal.h" + +/* The Eagle100 microSD CS is on SSI0 */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SSI_DEBUG /* Define to enable debug */ +#undef SSI_VERBOSE /* Define to enable verbose debug */ + +#ifdef SSI_DEBUG +# define ssidbg lldbg +# ifdef SSI_VERBOSE +# define ssivdbg lldbg +# else +# define ssivdbg(x...) +# endif +#else +# undef SSI_VERBOSE +# define ssidbg(x...) +# define ssivdbg(x...) +#endif + +/* Dump GPIO registers */ + +#ifdef SSI_VERBOSE +# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) +#else +# define ssi_dumpgpio(m) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Eagle100 board. + * + ************************************************************************************/ + +void weak_function lm3s_ssiinitialize(void) +{ + /* Configure the SPI-based microSD CS GPIO */ + + ssi_dumpgpio("lm3s_ssiinitialize() before lm3s_configgpio()"); + lm3s_configgpio(SDCCS_GPIO); + ssi_dumpgpio("lm3s_ssiinitialize() after lm3s_configgpio()"); +} + +/**************************************************************************** + * The external functions, lm3s_spiselect and lm3s_spistatus must be provided + * by board-specific logic. The are implementations of the select and status + * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). + * All othermethods (including up_spiinitialize()) are provided by common + * logic. To use this common SPI logic on your board: + * + * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your + * board-specific logic. This function will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 2. Add a call to up_spiinitialize() in your low level initialization + * logic + * 3. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ****************************************************************************/ + +void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + if (devid == SPIDEV_MMCSD) + { + /* Assert the CS pin to the card */ + + ssi_dumpgpio("lm3s_spiselect() before lm3s_gpiowrite()"); + lm3s_gpiowrite(SDCCS_GPIO, !selected); + ssi_dumpgpio("lm3s_spiselect() after lm3s_gpiowrite()"); + } +} + +uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + ssidbg("Returning SPI_STATUS_PRESENT\n"); + return SPI_STATUS_PRESENT; +} + +#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ diff --git a/nuttx/configs/eagle100/thttpd/Make.defs b/nuttx/configs/eagle100/thttpd/Make.defs index f984d3a8de..cbc3b4a92a 100644 --- a/nuttx/configs/eagle100/thttpd/Make.defs +++ b/nuttx/configs/eagle100/thttpd/Make.defs @@ -2,7 +2,7 @@ # configs/eagle100/thttpd/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/thttpd/appconfig b/nuttx/configs/eagle100/thttpd/appconfig index e692157372..45c2605ba4 100644 --- a/nuttx/configs/eagle100/thttpd/appconfig +++ b/nuttx/configs/eagle100/thttpd/appconfig @@ -2,7 +2,7 @@ # configs/eagle100/thttpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/eagle100/thttpd/setenv.sh b/nuttx/configs/eagle100/thttpd/setenv.sh index 793c31a49d..4dc148e65a 100755 --- a/nuttx/configs/eagle100/thttpd/setenv.sh +++ b/nuttx/configs/eagle100/thttpd/setenv.sh @@ -2,7 +2,7 @@ # configs/eagle100/thttpd/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/include/board.h b/nuttx/configs/ez80f910200kitg/include/board.h index 99b44ec08a..80a8afb23a 100644 --- a/nuttx/configs/ez80f910200kitg/include/board.h +++ b/nuttx/configs/ez80f910200kitg/include/board.h @@ -2,7 +2,7 @@ * arch/ez80f910200kitg/include/board.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/ostest/Make.defs b/nuttx/configs/ez80f910200kitg/ostest/Make.defs index 8ac31611c1..2ec06aadd3 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/Make.defs +++ b/nuttx/configs/ez80f910200kitg/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200kitg/ostest/Make.defs # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/ostest/appconfig b/nuttx/configs/ez80f910200kitg/ostest/appconfig index 68892459ca..64d83b55ee 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/appconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200kitg/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 6eeda0cb8d..adc92f8796 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200kitg/ostest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/ostest/ostest.linkcmd b/nuttx/configs/ez80f910200kitg/ostest/ostest.linkcmd index 14b482dcea..3ddee5f855 100755 --- a/nuttx/configs/ez80f910200kitg/ostest/ostest.linkcmd +++ b/nuttx/configs/ez80f910200kitg/ostest/ostest.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200kitg/ostest/ostest.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200kitg/ostest/setenv.sh b/nuttx/configs/ez80f910200kitg/ostest/setenv.sh index 83273e37de..e692029ae4 100755 --- a/nuttx/configs/ez80f910200kitg/ostest/setenv.sh +++ b/nuttx/configs/ez80f910200kitg/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200kitg/ostest/setenv.sh # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/src/Makefile b/nuttx/configs/ez80f910200kitg/src/Makefile index ae4ffd6854..a1f0f6035f 100644 --- a/nuttx/configs/ez80f910200kitg/src/Makefile +++ b/nuttx/configs/ez80f910200kitg/src/Makefile @@ -2,7 +2,7 @@ # configs/ez80f910200kitg/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/src/ez80_leds.c b/nuttx/configs/ez80f910200kitg/src/ez80_leds.c index 12cfe11c6f..588410c8e6 100644 --- a/nuttx/configs/ez80f910200kitg/src/ez80_leds.c +++ b/nuttx/configs/ez80f910200kitg/src/ez80_leds.c @@ -2,7 +2,7 @@ * configs/ez80f910200kitg/src/ez80_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200kitg/src/ez80_lowinit.c b/nuttx/configs/ez80f910200kitg/src/ez80_lowinit.c index f56ac52ce3..e96a1ec07a 100644 --- a/nuttx/configs/ez80f910200kitg/src/ez80_lowinit.c +++ b/nuttx/configs/ez80f910200kitg/src/ez80_lowinit.c @@ -1,66 +1,66 @@ -/*************************************************************************** - * configs/ez80f910200kitg/src/ez80_lowinit.c - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include - -#include "chip/chip.h" - -/*************************************************************************** - * Pre-processor Definitions - ***************************************************************************/ - -/*************************************************************************** - * Private Functions - ***************************************************************************/ - -static void ez80_gpioinit(void) -{ -} - -/*************************************************************************** - * Public Functions - ***************************************************************************/ - -void ez80_lowinit(void) -{ - ez80_gpioinit(); -} - +/*************************************************************************** + * configs/ez80f910200kitg/src/ez80_lowinit.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include + +#include "chip/chip.h" + +/*************************************************************************** + * Pre-processor Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +static void ez80_gpioinit(void) +{ +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +void ez80_lowinit(void) +{ + ez80_gpioinit(); +} + diff --git a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs index cf69788f59..367f60ca7f 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs +++ b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/dhcpd/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/dhcpd/appconfig b/nuttx/configs/ez80f910200zco/dhcpd/appconfig index 5506cff4e7..97b7565216 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/appconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/dhcpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index 650af3f2b0..8f7b6479f7 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/dhcpd/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/dhcpd/dhcpd.linkcmd b/nuttx/configs/ez80f910200zco/dhcpd/dhcpd.linkcmd index dcf816ae8e..9a4ae3a77d 100755 --- a/nuttx/configs/ez80f910200zco/dhcpd/dhcpd.linkcmd +++ b/nuttx/configs/ez80f910200zco/dhcpd/dhcpd.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/dhcpd/dhcpd.linkcmd */ /* */ /* Copyright (C) 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/dhcpd/setenv.sh b/nuttx/configs/ez80f910200zco/dhcpd/setenv.sh index 2cdf7b9f69..3d1c4aecbc 100755 --- a/nuttx/configs/ez80f910200zco/dhcpd/setenv.sh +++ b/nuttx/configs/ez80f910200zco/dhcpd/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/dhcpd/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/httpd/Make.defs b/nuttx/configs/ez80f910200zco/httpd/Make.defs index 37aac8fed7..ec5a70ca69 100644 --- a/nuttx/configs/ez80f910200zco/httpd/Make.defs +++ b/nuttx/configs/ez80f910200zco/httpd/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/httpd/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/httpd/appconfig b/nuttx/configs/ez80f910200zco/httpd/appconfig index 33d384dfe4..c37580834a 100644 --- a/nuttx/configs/ez80f910200zco/httpd/appconfig +++ b/nuttx/configs/ez80f910200zco/httpd/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/httpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index 55cd915ace..296521a9e0 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/httpd/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/httpd/httpd.linkcmd b/nuttx/configs/ez80f910200zco/httpd/httpd.linkcmd index 19910368d5..4ecc8f1ca7 100755 --- a/nuttx/configs/ez80f910200zco/httpd/httpd.linkcmd +++ b/nuttx/configs/ez80f910200zco/httpd/httpd.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/httpd/httpd.linkcmd */ /* */ /* Copyright (C) 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/httpd/setenv.sh b/nuttx/configs/ez80f910200zco/httpd/setenv.sh index 2cdf7b9f69..3d1c4aecbc 100755 --- a/nuttx/configs/ez80f910200zco/httpd/setenv.sh +++ b/nuttx/configs/ez80f910200zco/httpd/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/dhcpd/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/include/board.h b/nuttx/configs/ez80f910200zco/include/board.h index cbcabc8038..84767437f9 100644 --- a/nuttx/configs/ez80f910200zco/include/board.h +++ b/nuttx/configs/ez80f910200zco/include/board.h @@ -2,7 +2,7 @@ * arch/ez80f910200zco/include/board.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nettest/Make.defs b/nuttx/configs/ez80f910200zco/nettest/Make.defs index 51a9ababb0..04074c1bf7 100644 --- a/nuttx/configs/ez80f910200zco/nettest/Make.defs +++ b/nuttx/configs/ez80f910200zco/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nettest/Make.defs # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nettest/appconfig b/nuttx/configs/ez80f910200zco/nettest/appconfig index f02619a796..b3d97d6e90 100644 --- a/nuttx/configs/ez80f910200zco/nettest/appconfig +++ b/nuttx/configs/ez80f910200zco/nettest/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index e3b7833079..fb424a7669 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nettest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nettest/nettest.linkcmd b/nuttx/configs/ez80f910200zco/nettest/nettest.linkcmd index f1608c2a18..a2338024ac 100755 --- a/nuttx/configs/ez80f910200zco/nettest/nettest.linkcmd +++ b/nuttx/configs/ez80f910200zco/nettest/nettest.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/nettest/nettest.linkcmd */ /* */ /* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/nettest/setenv.sh b/nuttx/configs/ez80f910200zco/nettest/setenv.sh index ccc66b1a15..86823697cb 100755 --- a/nuttx/configs/ez80f910200zco/nettest/setenv.sh +++ b/nuttx/configs/ez80f910200zco/nettest/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nettest/setenv.sh # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nsh/Make.defs b/nuttx/configs/ez80f910200zco/nsh/Make.defs index fb9b40ab56..3f740ac34e 100644 --- a/nuttx/configs/ez80f910200zco/nsh/Make.defs +++ b/nuttx/configs/ez80f910200zco/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nst/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index aa62a9b659..9c4b5aaee3 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nsh/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/nsh/nsh.linkcmd b/nuttx/configs/ez80f910200zco/nsh/nsh.linkcmd index 256e7a1137..c9e730615b 100755 --- a/nuttx/configs/ez80f910200zco/nsh/nsh.linkcmd +++ b/nuttx/configs/ez80f910200zco/nsh/nsh.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/nsh/nsh.linkcmd */ /* */ /* Copyright (C) 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/nsh/setenv.sh b/nuttx/configs/ez80f910200zco/nsh/setenv.sh index f399d0f4f3..37bc6e3aa7 100755 --- a/nuttx/configs/ez80f910200zco/nsh/setenv.sh +++ b/nuttx/configs/ez80f910200zco/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/nst/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/ostest/Make.defs b/nuttx/configs/ez80f910200zco/ostest/Make.defs index 36cfdc191c..7c738c4b31 100644 --- a/nuttx/configs/ez80f910200zco/ostest/Make.defs +++ b/nuttx/configs/ez80f910200zco/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/ostest/Make.defs # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/ostest/appconfig b/nuttx/configs/ez80f910200zco/ostest/appconfig index 6d2ad84ae1..987de079e8 100644 --- a/nuttx/configs/ez80f910200zco/ostest/appconfig +++ b/nuttx/configs/ez80f910200zco/ostest/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 11a7fda494..548ce3376c 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/ostest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/ostest/ostest.linkcmd b/nuttx/configs/ez80f910200zco/ostest/ostest.linkcmd index 0bdd5776eb..808d79f358 100755 --- a/nuttx/configs/ez80f910200zco/ostest/ostest.linkcmd +++ b/nuttx/configs/ez80f910200zco/ostest/ostest.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/ostest/ostest.linkcmd */ /* */ /* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/ostest/setenv.sh b/nuttx/configs/ez80f910200zco/ostest/setenv.sh index 6a1446c045..028eb6ad47 100755 --- a/nuttx/configs/ez80f910200zco/ostest/setenv.sh +++ b/nuttx/configs/ez80f910200zco/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/ostest/setenv.sh # # Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/poll/Make.defs b/nuttx/configs/ez80f910200zco/poll/Make.defs index 085700d047..65d3ca2f78 100644 --- a/nuttx/configs/ez80f910200zco/poll/Make.defs +++ b/nuttx/configs/ez80f910200zco/poll/Make.defs @@ -2,7 +2,7 @@ # configs/ez80f910200zco/poll/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/poll/appconfig b/nuttx/configs/ez80f910200zco/poll/appconfig index 181f2e1dbd..8377851cca 100644 --- a/nuttx/configs/ez80f910200zco/poll/appconfig +++ b/nuttx/configs/ez80f910200zco/poll/appconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/poll/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index 79a9482027..0334ebc260 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -2,7 +2,7 @@ # configs/ez80f910200zco/poll/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/poll/poll.linkcmd b/nuttx/configs/ez80f910200zco/poll/poll.linkcmd index 274464450d..ecfa93e6eb 100755 --- a/nuttx/configs/ez80f910200zco/poll/poll.linkcmd +++ b/nuttx/configs/ez80f910200zco/poll/poll.linkcmd @@ -2,7 +2,7 @@ /* configs/ez80f910200zco/poll/poll.linkcmd */ /* */ /* Copyright (C) 2009 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/ez80f910200zco/poll/setenv.sh b/nuttx/configs/ez80f910200zco/poll/setenv.sh index 71af2dcd1f..38252f8f65 100755 --- a/nuttx/configs/ez80f910200zco/poll/setenv.sh +++ b/nuttx/configs/ez80f910200zco/poll/setenv.sh @@ -2,7 +2,7 @@ # configs/ez80f910200zco/poll/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/src/Makefile b/nuttx/configs/ez80f910200zco/src/Makefile index d8e41a4f7d..994bb68a67 100644 --- a/nuttx/configs/ez80f910200zco/src/Makefile +++ b/nuttx/configs/ez80f910200zco/src/Makefile @@ -2,7 +2,7 @@ # configs/ez80f910200zco/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/src/ez80_buttons.c b/nuttx/configs/ez80f910200zco/src/ez80_buttons.c index 11ead57b3e..babf13b7e1 100644 --- a/nuttx/configs/ez80f910200zco/src/ez80_buttons.c +++ b/nuttx/configs/ez80f910200zco/src/ez80_buttons.c @@ -1,174 +1,174 @@ -/**************************************************************************** - * configs/ez80f910200zco/src/ez80_leds.c - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#include "chip.h" -#include "up_arch.h" -#include "up_internal.h" - -/**************************************************************************** - * Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_PB/1/2interrupt - * - * Description: - * These could be exteneded to provide interrupt driven button input - * - ****************************************************************************/ - -#if 0 -void up_PBinterrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ - regval |= 1; - outp(EZ80_PB_ALT0, regval); -} - -void up_pb1interrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ - regval |= 2; - outp(EZ80_PB_ALT0, regval); -} - -void up_pb2interrupt(void) -{ - uint8_t regval; - - regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_ALT0); - regval |= 4; - outp(EZ80_PB_ALT0, regval); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ -} -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_buttoninit - ****************************************************************************/ - -#ifdef CONFIG_ARCH_BUTTONS -void up_buttoninit(void) -{ - uint8_t regval; - -#if 0 /* Interrupts are not used */ - - /* Attach GIO interrupts */ - - irq_attach(EZ80_PB_IRQ, up_PBinterrupt); - irq_attach(EZ80_PB1_IRQ, up_pb1interrupt); - irq_attach(EZ80_PB2_IRQ, up_pb2interrupt); - - /* Configure PB0,1,2 as interrupt, rising edge */ - - regval = inp(EZ80_PB_DR); - regval |= 7; - outp(EZ80_PB_DR, regval); - - regval = inp(EZ80_PB_DDR); - regval |= 7; - outp(EZ80_PB_DDR, regval); - - regval = inp(EZ80_PB_ALT1); - regval |= 7; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval |= 7; - outp(EZ80_PB_ALT2, regval); -#else - /* Configure PB0,1,2 as inputs */ - - regval = inp(EZ80_PB_DDR); - regval |= 7; - outp(EZ80_PB_DDR, regval); - - regval = inp(EZ80_PB_ALT1); - regval &= ~7; - outp(EZ80_PB_ALT1, regval); - - regval = inp(EZ80_PB_ALT2); - regval &= ~7; - outp(EZ80_PB_ALT2, regval); -#endif -} - -/**************************************************************************** - * Name: up_buttons - ****************************************************************************/ - -uint8_t up_buttons(void) -{ - return inp(EZ80_PB_DDR) & 7; -} -#endif /* CONFIG_ARCH_BUTTONS */ +/**************************************************************************** + * configs/ez80f910200zco/src/ez80_leds.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_PB/1/2interrupt + * + * Description: + * These could be exteneded to provide interrupt driven button input + * + ****************************************************************************/ + +#if 0 +void up_PBinterrupt(void) +{ + uint8_t regval; + + regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ + regval |= 7; + outp(EZ80_PB_DR, regval); + + regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ + regval |= 1; + outp(EZ80_PB_ALT0, regval); +} + +void up_pb1interrupt(void) +{ + uint8_t regval; + + regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ + regval |= 7; + outp(EZ80_PB_DR, regval); + + regval = inp(EZ80_PB_ALT0); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ + regval |= 2; + outp(EZ80_PB_ALT0, regval); +} + +void up_pb2interrupt(void) +{ + uint8_t regval; + + regval = inp(EZ80_PB_DR); /* Clear interrupt flag for eZ80F91 date codes before 0611 */ + regval |= 7; + outp(EZ80_PB_DR, regval); + + regval = inp(EZ80_PB_ALT0); + regval |= 4; + outp(EZ80_PB_ALT0, regval); /* Clear interrupt flag for eZ80F91 date codes 0611 and after */ +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_buttoninit + ****************************************************************************/ + +#ifdef CONFIG_ARCH_BUTTONS +void up_buttoninit(void) +{ + uint8_t regval; + +#if 0 /* Interrupts are not used */ + + /* Attach GIO interrupts */ + + irq_attach(EZ80_PB_IRQ, up_PBinterrupt); + irq_attach(EZ80_PB1_IRQ, up_pb1interrupt); + irq_attach(EZ80_PB2_IRQ, up_pb2interrupt); + + /* Configure PB0,1,2 as interrupt, rising edge */ + + regval = inp(EZ80_PB_DR); + regval |= 7; + outp(EZ80_PB_DR, regval); + + regval = inp(EZ80_PB_DDR); + regval |= 7; + outp(EZ80_PB_DDR, regval); + + regval = inp(EZ80_PB_ALT1); + regval |= 7; + outp(EZ80_PB_ALT1, regval); + + regval = inp(EZ80_PB_ALT2); + regval |= 7; + outp(EZ80_PB_ALT2, regval); +#else + /* Configure PB0,1,2 as inputs */ + + regval = inp(EZ80_PB_DDR); + regval |= 7; + outp(EZ80_PB_DDR, regval); + + regval = inp(EZ80_PB_ALT1); + regval &= ~7; + outp(EZ80_PB_ALT1, regval); + + regval = inp(EZ80_PB_ALT2); + regval &= ~7; + outp(EZ80_PB_ALT2, regval); +#endif +} + +/**************************************************************************** + * Name: up_buttons + ****************************************************************************/ + +uint8_t up_buttons(void) +{ + return inp(EZ80_PB_DDR) & 7; +} +#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/nuttx/configs/ez80f910200zco/src/ez80_leds.c b/nuttx/configs/ez80f910200zco/src/ez80_leds.c index 908d9fc61a..7f5af20750 100644 --- a/nuttx/configs/ez80f910200zco/src/ez80_leds.c +++ b/nuttx/configs/ez80f910200zco/src/ez80_leds.c @@ -2,7 +2,7 @@ * configs/ez80f910200zco/src/ez80_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ez80f910200zco/src/ez80_lowinit.c b/nuttx/configs/ez80f910200zco/src/ez80_lowinit.c index e08670df6a..cd52ae1588 100644 --- a/nuttx/configs/ez80f910200zco/src/ez80_lowinit.c +++ b/nuttx/configs/ez80f910200zco/src/ez80_lowinit.c @@ -1,66 +1,66 @@ -/*************************************************************************** - * configs/ez80f910200zco/src/ez80_lowinit.c - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include - -#include "chip/chip.h" - -/*************************************************************************** - * Definitions - ***************************************************************************/ - -/*************************************************************************** - * Private Functions - ***************************************************************************/ - -static void ez80_gpioinit(void) -{ -} - -/*************************************************************************** - * Public Functions - ***************************************************************************/ - -void ez80_lowinit(void) -{ - ez80_gpioinit(); -} - +/*************************************************************************** + * configs/ez80f910200zco/src/ez80_lowinit.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include + +#include "chip/chip.h" + +/*************************************************************************** + * Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +static void ez80_gpioinit(void) +{ +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +void ez80_lowinit(void) +{ + ez80_gpioinit(); +} + diff --git a/nuttx/configs/ez80f910200zco/src/ez80f910200zco.h b/nuttx/configs/ez80f910200zco/src/ez80f910200zco.h index f7612d694b..b26a0dd3c6 100644 --- a/nuttx/configs/ez80f910200zco/src/ez80f910200zco.h +++ b/nuttx/configs/ez80f910200zco/src/ez80f910200zco.h @@ -2,7 +2,7 @@ * arch/ez80f910200zco/src/ez80f910200zco.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/include/board.h b/nuttx/configs/kwikstik-k40/include/board.h index 19653e74e1..86434ca7c4 100755 --- a/nuttx/configs/kwikstik-k40/include/board.h +++ b/nuttx/configs/kwikstik-k40/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/ostest/Make.defs b/nuttx/configs/kwikstik-k40/ostest/Make.defs index c6d3bb651b..f78ea44fd1 100644 --- a/nuttx/configs/kwikstik-k40/ostest/Make.defs +++ b/nuttx/configs/kwikstik-k40/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/kwikstik-k40/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/ostest/appconfig b/nuttx/configs/kwikstik-k40/ostest/appconfig index 05f1034b61..9fa43afb8f 100644 --- a/nuttx/configs/kwikstik-k40/ostest/appconfig +++ b/nuttx/configs/kwikstik-k40/ostest/appconfig @@ -2,7 +2,7 @@ # configs/kwikstik-k40/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 2006686b9e..4d90473398 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -2,7 +2,7 @@ # configs/kwikstik-k40/ostest/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/ostest/ld.script b/nuttx/configs/kwikstik-k40/ostest/ld.script index f4f3f2e69a..2b7b517fa3 100755 --- a/nuttx/configs/kwikstik-k40/ostest/ld.script +++ b/nuttx/configs/kwikstik-k40/ostest/ld.script @@ -2,7 +2,7 @@ * configs/kwikstik-k40/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/ostest/setenv.sh b/nuttx/configs/kwikstik-k40/ostest/setenv.sh index e7f74bc48e..089419ac73 100755 --- a/nuttx/configs/kwikstik-k40/ostest/setenv.sh +++ b/nuttx/configs/kwikstik-k40/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/kwikstik-k40/ostest/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/Makefile b/nuttx/configs/kwikstik-k40/src/Makefile index 8c61af8af5..ae935f6d91 100644 --- a/nuttx/configs/kwikstik-k40/src/Makefile +++ b/nuttx/configs/kwikstik-k40/src/Makefile @@ -2,7 +2,7 @@ # configs/kwikstik-k40/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h b/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h index 015f0bc86f..145b62d5f6 100644 --- a/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h +++ b/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h @@ -3,7 +3,7 @@ * arch/arm/src/board/kwikstik-internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_boot.c b/nuttx/configs/kwikstik-k40/src/up_boot.c index 350294d2c4..cf5bba4e75 100644 --- a/nuttx/configs/kwikstik-k40/src/up_boot.c +++ b/nuttx/configs/kwikstik-k40/src/up_boot.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_buttons.c b/nuttx/configs/kwikstik-k40/src/up_buttons.c index 3c944c5087..a30a480bcb 100644 --- a/nuttx/configs/kwikstik-k40/src/up_buttons.c +++ b/nuttx/configs/kwikstik-k40/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/kwikstik-k40/src/up_buttons.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_lcd.c b/nuttx/configs/kwikstik-k40/src/up_lcd.c index b4f499f16c..c8a8a90082 100644 --- a/nuttx/configs/kwikstik-k40/src/up_lcd.c +++ b/nuttx/configs/kwikstik-k40/src/up_lcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_lcd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_leds.c b/nuttx/configs/kwikstik-k40/src/up_leds.c index f86c77aef5..a455fcc34c 100644 --- a/nuttx/configs/kwikstik-k40/src/up_leds.c +++ b/nuttx/configs/kwikstik-k40/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_nsh.c b/nuttx/configs/kwikstik-k40/src/up_nsh.c index fa4cc5fa95..884ff3c44c 100644 --- a/nuttx/configs/kwikstik-k40/src/up_nsh.c +++ b/nuttx/configs/kwikstik-k40/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_spi.c b/nuttx/configs/kwikstik-k40/src/up_spi.c index 9468c16ae0..e88721dda5 100644 --- a/nuttx/configs/kwikstik-k40/src/up_spi.c +++ b/nuttx/configs/kwikstik-k40/src/up_spi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_spi.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_usbdev.c b/nuttx/configs/kwikstik-k40/src/up_usbdev.c index 60e54af7cf..38e3413c7a 100644 --- a/nuttx/configs/kwikstik-k40/src/up_usbdev.c +++ b/nuttx/configs/kwikstik-k40/src/up_usbdev.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c index 378295cfac..8051ea1bad 100644 --- a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c +++ b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/kwikstik-k40/src/up_usbmsc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the Kinetis MMC/SD block driver. * diff --git a/nuttx/configs/lm3s6432-s2e/include/board.h b/nuttx/configs/lm3s6432-s2e/include/board.h index 872f784fec..06504ec4f8 100644 --- a/nuttx/configs/lm3s6432-s2e/include/board.h +++ b/nuttx/configs/lm3s6432-s2e/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/nsh/Make.defs b/nuttx/configs/lm3s6432-s2e/nsh/Make.defs index 36b463c5c5..73f7007e86 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/Make.defs +++ b/nuttx/configs/lm3s6432-s2e/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index b4c02b5345..a5f2466c20 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/nsh/ld.script b/nuttx/configs/lm3s6432-s2e/nsh/ld.script index 675f8753bb..0701841c5a 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/ld.script +++ b/nuttx/configs/lm3s6432-s2e/nsh/ld.script @@ -2,7 +2,7 @@ * configs/lm3s6432-s2e/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/nsh/setenv.sh b/nuttx/configs/lm3s6432-s2e/nsh/setenv.sh index 522ac07bf4..3cd011f121 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/setenv.sh +++ b/nuttx/configs/lm3s6432-s2e/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/ostest/Make.defs b/nuttx/configs/lm3s6432-s2e/ostest/Make.defs index c59ee3adb7..41c1ba32c8 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/Make.defs +++ b/nuttx/configs/lm3s6432-s2e/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/ostest/appconfig b/nuttx/configs/lm3s6432-s2e/ostest/appconfig index 459dfc1cbb..59851765a1 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/appconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/appconfig @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index 03a3b30eb7..bc9ce20f05 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/ostest/ld.script b/nuttx/configs/lm3s6432-s2e/ostest/ld.script index 900e15e43f..bfbf8d3024 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/ld.script +++ b/nuttx/configs/lm3s6432-s2e/ostest/ld.script @@ -2,7 +2,7 @@ * configs/lm3s6432-s2e/ostest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/ostest/setenv.sh b/nuttx/configs/lm3s6432-s2e/ostest/setenv.sh index c45468cb0c..2cccdc70e6 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/setenv.sh +++ b/nuttx/configs/lm3s6432-s2e/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/Makefile b/nuttx/configs/lm3s6432-s2e/src/Makefile index 7a0b883f87..eefaa50394 100644 --- a/nuttx/configs/lm3s6432-s2e/src/Makefile +++ b/nuttx/configs/lm3s6432-s2e/src/Makefile @@ -2,7 +2,7 @@ # configs/lm3s6432-s2e/src/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/lm3s6432s2e_internal.h b/nuttx/configs/lm3s6432-s2e/src/lm3s6432s2e_internal.h index cc474bd80a..bd4cff77fc 100644 --- a/nuttx/configs/lm3s6432-s2e/src/lm3s6432s2e_internal.h +++ b/nuttx/configs/lm3s6432-s2e/src/lm3s6432s2e_internal.h @@ -2,7 +2,7 @@ * configs/lm3s6432-s2e/src/lm3s6432s2e_internal.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/up_boot.c b/nuttx/configs/lm3s6432-s2e/src/up_boot.c index 4b8fc3fcf5..3c5787f99a 100644 --- a/nuttx/configs/lm3s6432-s2e/src/up_boot.c +++ b/nuttx/configs/lm3s6432-s2e/src/up_boot.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/up_ethernet.c b/nuttx/configs/lm3s6432-s2e/src/up_ethernet.c index 6040c167c6..09d5040c41 100644 --- a/nuttx/configs/lm3s6432-s2e/src/up_ethernet.c +++ b/nuttx/configs/lm3s6432-s2e/src/up_ethernet.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_ethernet.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/up_leds.c b/nuttx/configs/lm3s6432-s2e/src/up_leds.c index 9a3e337930..80fea934f9 100644 --- a/nuttx/configs/lm3s6432-s2e/src/up_leds.c +++ b/nuttx/configs/lm3s6432-s2e/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/up_nsh.c b/nuttx/configs/lm3s6432-s2e/src/up_nsh.c index 6b44eafafa..46726e753e 100644 --- a/nuttx/configs/lm3s6432-s2e/src/up_nsh.c +++ b/nuttx/configs/lm3s6432-s2e/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6432-s2e/src/up_ssi.c b/nuttx/configs/lm3s6432-s2e/src/up_ssi.c index 7ca33c8bea..d20e1d978b 100644 --- a/nuttx/configs/lm3s6432-s2e/src/up_ssi.c +++ b/nuttx/configs/lm3s6432-s2e/src/up_ssi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_ssi.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/include/board.h b/nuttx/configs/lm3s6965-ek/include/board.h index 45fa0dfb04..e8eaf9dd1a 100755 --- a/nuttx/configs/lm3s6965-ek/include/board.h +++ b/nuttx/configs/lm3s6965-ek/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nsh/Make.defs b/nuttx/configs/lm3s6965-ek/nsh/Make.defs index 555d188437..b25fa4bb62 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/Make.defs +++ b/nuttx/configs/lm3s6965-ek/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 39d6807140..145c992c9a 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nsh/ld.script b/nuttx/configs/lm3s6965-ek/nsh/ld.script index 61fe04c0eb..d3a0d668e4 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/ld.script +++ b/nuttx/configs/lm3s6965-ek/nsh/ld.script @@ -2,7 +2,7 @@ * configs/lm3s6965-ek/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nsh/setenv.sh b/nuttx/configs/lm3s6965-ek/nsh/setenv.sh index 3490a47d8e..0b9389f49e 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/setenv.sh +++ b/nuttx/configs/lm3s6965-ek/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nx/Make.defs b/nuttx/configs/lm3s6965-ek/nx/Make.defs index a9756cb36e..388caffb61 100755 --- a/nuttx/configs/lm3s6965-ek/nx/Make.defs +++ b/nuttx/configs/lm3s6965-ek/nx/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nx/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nx/appconfig b/nuttx/configs/lm3s6965-ek/nx/appconfig index c7fbe82ee3..69f92ce3a5 100644 --- a/nuttx/configs/lm3s6965-ek/nx/appconfig +++ b/nuttx/configs/lm3s6965-ek/nx/appconfig @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nx/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index 713420b385..c6340c76b5 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nx/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nx/ld.script b/nuttx/configs/lm3s6965-ek/nx/ld.script index 1b900bed44..dcb12fa99a 100755 --- a/nuttx/configs/lm3s6965-ek/nx/ld.script +++ b/nuttx/configs/lm3s6965-ek/nx/ld.script @@ -2,7 +2,7 @@ * configs/lm3s6965-ek/nx/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/nx/setenv.sh b/nuttx/configs/lm3s6965-ek/nx/setenv.sh index c18c43c159..a364c20172 100755 --- a/nuttx/configs/lm3s6965-ek/nx/setenv.sh +++ b/nuttx/configs/lm3s6965-ek/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/nx/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/ostest/Make.defs b/nuttx/configs/lm3s6965-ek/ostest/Make.defs index 4233287a4b..74eed679e0 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/Make.defs +++ b/nuttx/configs/lm3s6965-ek/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/ostest/appconfig b/nuttx/configs/lm3s6965-ek/ostest/appconfig index 1e12db1f02..dabf1f2b44 100644 --- a/nuttx/configs/lm3s6965-ek/ostest/appconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/appconfig @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 667c93b153..1ef498dd8e 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/ostest/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/ostest/ld.script b/nuttx/configs/lm3s6965-ek/ostest/ld.script index 2bd910d917..e330f35ae4 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/ld.script +++ b/nuttx/configs/lm3s6965-ek/ostest/ld.script @@ -2,7 +2,7 @@ * configs/lm3s6965-ek/ostest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/ostest/setenv.sh b/nuttx/configs/lm3s6965-ek/ostest/setenv.sh index be32a282c7..6e907ae7a6 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/setenv.sh +++ b/nuttx/configs/lm3s6965-ek/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/src/Makefile b/nuttx/configs/lm3s6965-ek/src/Makefile index bd9b4f9caa..90833fc319 100644 --- a/nuttx/configs/lm3s6965-ek/src/Makefile +++ b/nuttx/configs/lm3s6965-ek/src/Makefile @@ -2,7 +2,7 @@ # configs/lm3s6965-ek/src/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h b/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h index fb3a8a4eae..621f00148c 100644 --- a/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h +++ b/nuttx/configs/lm3s6965-ek/src/lm3s6965ek_internal.h @@ -1,136 +1,136 @@ -/************************************************************************************ - * configs/lm3s6965-ek/src/lm3s6965ek_internal.h - * arch/arm/src/board/lm3s6965ek_internal.n - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H -#define __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* How many SSI modules does this chip support? The LM3S6965 supports 1 SSI - * module (others may support more than 2 -- in such case, the following must be - * expanded). - */ - -#if LM3S_NSSI == 0 -# undef CONFIG_SSI0_DISABLE -# define CONFIG_SSI0_DISABLE 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#elif LM3S_NSSI == 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#endif - -/* LM3S6965 Eval Kit ***************************************************************/ - -/* GPIO Usage - * - * PIN SIGNAL EVB Function - * --- ----------- --------------------------------------- - * 26 PA0/U0RX Virtual COM port receive - * 27 PA1/U0TX Virtual COM port transmit - * 10 PD0/IDX0 SD card chip select - * 11 PD1/PWM1 Sound - * 30 PA4/SSI0RX SD card data out - * 31 PA5/SSI0TX SD card and OLED display data in - * 28 PA2/SSI0CLK SD card and OLED display clock - * 22 PC7/PHB0 OLED display data/control select - * 29 PA3/SSI0FSS OLED display chip select - * 73 PE1/PWM5 Down switch - * 74 PE2/PHB1 Left switch - * 72 PE0/PWM4 Up switch - * 75 PE3/PHA1 Right switch - * 61 PF1/IDX1 Select switch - * 47 PF0/PWM0 User LED - * 23 PC6/CCP3 Enable +15 V - */ - -/* GPIO for microSD card chip select: - * - PD0: SD card chip select (CARDCSn) - */ - -#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ - GPIO_VALUE_ONE | GPIO_PORTD | 0) - -/* GPIO for single LED: - * - PF0: User LED - */ - -#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTF | 0) - -/* GPIOs for OLED: - * - PC7: OLED display data/control select (D/Cn) - * - PA3: OLED display chip select (CSn) - * - PC6: Enable +15V needed by OLED (EN+15V) - */ - -#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ - GPIO_VALUE_ONE | GPIO_PORTC | 7) -#define OLEDCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ - GPIO_VALUE_ONE | GPIO_PORTA | 3) -#define OLEDEN_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ - GPIO_VALUE_ONE | GPIO_PORTC | 6) - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. - * - ************************************************************************************/ - -extern void weak_function lm3s_ssiinitialize(void); - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */ - +/************************************************************************************ + * configs/lm3s6965-ek/src/lm3s6965ek_internal.h + * arch/arm/src/board/lm3s6965ek_internal.n + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H +#define __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* How many SSI modules does this chip support? The LM3S6965 supports 1 SSI + * module (others may support more than 2 -- in such case, the following must be + * expanded). + */ + +#if LM3S_NSSI == 0 +# undef CONFIG_SSI0_DISABLE +# define CONFIG_SSI0_DISABLE 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#elif LM3S_NSSI == 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#endif + +/* LM3S6965 Eval Kit ***************************************************************/ + +/* GPIO Usage + * + * PIN SIGNAL EVB Function + * --- ----------- --------------------------------------- + * 26 PA0/U0RX Virtual COM port receive + * 27 PA1/U0TX Virtual COM port transmit + * 10 PD0/IDX0 SD card chip select + * 11 PD1/PWM1 Sound + * 30 PA4/SSI0RX SD card data out + * 31 PA5/SSI0TX SD card and OLED display data in + * 28 PA2/SSI0CLK SD card and OLED display clock + * 22 PC7/PHB0 OLED display data/control select + * 29 PA3/SSI0FSS OLED display chip select + * 73 PE1/PWM5 Down switch + * 74 PE2/PHB1 Left switch + * 72 PE0/PWM4 Up switch + * 75 PE3/PHA1 Right switch + * 61 PF1/IDX1 Select switch + * 47 PF0/PWM0 User LED + * 23 PC6/CCP3 Enable +15 V + */ + +/* GPIO for microSD card chip select: + * - PD0: SD card chip select (CARDCSn) + */ + +#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ + GPIO_VALUE_ONE | GPIO_PORTD | 0) + +/* GPIO for single LED: + * - PF0: User LED + */ + +#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTF | 0) + +/* GPIOs for OLED: + * - PC7: OLED display data/control select (D/Cn) + * - PA3: OLED display chip select (CSn) + * - PC6: Enable +15V needed by OLED (EN+15V) + */ + +#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ + GPIO_VALUE_ONE | GPIO_PORTC | 7) +#define OLEDCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ + GPIO_VALUE_ONE | GPIO_PORTA | 3) +#define OLEDEN_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ + GPIO_VALUE_ONE | GPIO_PORTC | 6) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. + * + ************************************************************************************/ + +extern void weak_function lm3s_ssiinitialize(void); + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */ + diff --git a/nuttx/configs/lm3s6965-ek/src/up_boot.c b/nuttx/configs/lm3s6965-ek/src/up_boot.c index 3fb75cf543..7f887be620 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_boot.c +++ b/nuttx/configs/lm3s6965-ek/src/up_boot.c @@ -1,92 +1,92 @@ -/************************************************************************************ - * configs/lm3s6965-ek/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "up_internal.h" -#include "lm3s6965ek_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_boardinitialize - * - * Description: - * All LM3S architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - ************************************************************************************/ - -void lm3s_boardinitialize(void) -{ - /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function - * lm3s_ssiinitialize() has been brought into the link. - */ - - /* The LM3S6965 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - if (lm3s_ssiinitialize) - { - lm3s_ssiinitialize(); - } -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/lm3s6965-ek/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "up_internal.h" +#include "lm3s6965ek_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_boardinitialize + * + * Description: + * All LM3S architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + ************************************************************************************/ + +void lm3s_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function + * lm3s_ssiinitialize() has been brought into the link. + */ + + /* The LM3S6965 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + if (lm3s_ssiinitialize) + { + lm3s_ssiinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/lm3s6965-ek/src/up_ethernet.c b/nuttx/configs/lm3s6965-ek/src/up_ethernet.c index 1cea3d0228..4f402cae70 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_ethernet.c +++ b/nuttx/configs/lm3s6965-ek/src/up_ethernet.c @@ -1,98 +1,98 @@ -/************************************************************************************ - * configs/lm3s6965-ek/src/up_ethernet.c - * arch/arm/src/board/up_ethernet.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ethernetmac - * - * Description: - * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile - * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function - * will obtain the MAC address from these registers. - * - ************************************************************************************/ - -#ifdef CONFIG_LM3S_BOARDMAC -void lm3s_ethernetmac(struct ether_addr *ethaddr) -{ - uint32_t user0; - uint32_t user1; - - /* Get the current value of the user registers */ - - user0 = getreg32(LM3S_FLASH_USERREG0); - user1 = getreg32(LM3S_FLASH_USERREG1); - - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); - DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - - /* Re-format that MAC address the way that uIP expects to see it */ - - ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); - ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); - ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); - ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); - ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); - ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); -} -#endif +/************************************************************************************ + * configs/lm3s6965-ek/src/up_ethernet.c + * arch/arm/src/board/up_ethernet.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ethernetmac + * + * Description: + * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile + * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function + * will obtain the MAC address from these registers. + * + ************************************************************************************/ + +#ifdef CONFIG_LM3S_BOARDMAC +void lm3s_ethernetmac(struct ether_addr *ethaddr) +{ + uint32_t user0; + uint32_t user1; + + /* Get the current value of the user registers */ + + user0 = getreg32(LM3S_FLASH_USERREG0); + user1 = getreg32(LM3S_FLASH_USERREG1); + + nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); + + /* Re-format that MAC address the way that uIP expects to see it */ + + ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); + ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); + ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); + ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); + ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); + ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); +} +#endif diff --git a/nuttx/configs/lm3s6965-ek/src/up_leds.c b/nuttx/configs/lm3s6965-ek/src/up_leds.c index f817f8261c..933c114467 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_leds.c +++ b/nuttx/configs/lm3s6965-ek/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/src/up_nsh.c b/nuttx/configs/lm3s6965-ek/src/up_nsh.c index 952ee4298d..409b351f06 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_nsh.c +++ b/nuttx/configs/lm3s6965-ek/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/src/up_oled.c b/nuttx/configs/lm3s6965-ek/src/up_oled.c index 8a26e1eb2e..586927d536 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_oled.c +++ b/nuttx/configs/lm3s6965-ek/src/up_oled.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_oled.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s6965-ek/src/up_ssi.c b/nuttx/configs/lm3s6965-ek/src/up_ssi.c index 4dcd231c06..16111fcdaf 100644 --- a/nuttx/configs/lm3s6965-ek/src/up_ssi.c +++ b/nuttx/configs/lm3s6965-ek/src/up_ssi.c @@ -1,164 +1,164 @@ -/************************************************************************************ - * configs/lm3s6965-ek/src/up_ssi.c - * arch/arm/src/board/up_ssi.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "lm3s_internal.h" -#include "lm3s6965ek_internal.h" - -/* The LM3S6965 Eval Kit microSD CS is on SSI0 */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ - -#ifdef SSI_VERBOSE -# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) -#else -# define ssi_dumpgpio(m) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. - * - ************************************************************************************/ - -void weak_function lm3s_ssiinitialize(void) -{ - /* Configure the SPI-based microSD CS GPIO */ - - ssi_dumpgpio("lm3s_ssiinitialize() Entry)"); - lm3s_configgpio(SDCCS_GPIO); -#ifdef CONFIG_NX_LCDDRIVER - lm3s_configgpio(OLEDCS_GPIO); -#endif - ssi_dumpgpio("lm3s_ssiinitialize() Exit"); -} - -/**************************************************************************** - * The external functions, lm3s_spiselect and lm3s_spistatus must be provided - * by board-specific logic. The are implementations of the select and status - * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). - * All othermethods (including up_spiinitialize()) are provided by common - * logic. To use this common SPI logic on your board: - * - * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. Add a call to up_spiinitialize() in your low level initialization - * logic - * 3. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ****************************************************************************/ - -void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - ssi_dumpgpio("lm3s_spiselect() Entry"); - - if (devid == SPIDEV_MMCSD) - { - /* Assert the CS pin to the card */ - - lm3s_gpiowrite(SDCCS_GPIO, !selected); - } -#ifdef CONFIG_NX_LCDDRIVER - else if (devid == SPIDEV_DISPLAY) - { - /* Assert the CS pin to the display */ - - lm3s_gpiowrite(OLEDCS_GPIO, !selected); - } -#endif - ssi_dumpgpio("lm3s_spiselect() Exit"); -} - -uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - ssidbg("Returning SPI_STATUS_PRESENT\n"); - return SPI_STATUS_PRESENT; -} - -#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ +/************************************************************************************ + * configs/lm3s6965-ek/src/up_ssi.c + * arch/arm/src/board/up_ssi.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "lm3s_internal.h" +#include "lm3s6965ek_internal.h" + +/* The LM3S6965 Eval Kit microSD CS is on SSI0 */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SSI_DEBUG /* Define to enable debug */ +#undef SSI_VERBOSE /* Define to enable verbose debug */ + +#ifdef SSI_DEBUG +# define ssidbg lldbg +# ifdef SSI_VERBOSE +# define ssivdbg lldbg +# else +# define ssivdbg(x...) +# endif +#else +# undef SSI_VERBOSE +# define ssidbg(x...) +# define ssivdbg(x...) +#endif + +/* Dump GPIO registers */ + +#ifdef SSI_VERBOSE +# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) +#else +# define ssi_dumpgpio(m) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. + * + ************************************************************************************/ + +void weak_function lm3s_ssiinitialize(void) +{ + /* Configure the SPI-based microSD CS GPIO */ + + ssi_dumpgpio("lm3s_ssiinitialize() Entry)"); + lm3s_configgpio(SDCCS_GPIO); +#ifdef CONFIG_NX_LCDDRIVER + lm3s_configgpio(OLEDCS_GPIO); +#endif + ssi_dumpgpio("lm3s_ssiinitialize() Exit"); +} + +/**************************************************************************** + * The external functions, lm3s_spiselect and lm3s_spistatus must be provided + * by board-specific logic. The are implementations of the select and status + * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). + * All othermethods (including up_spiinitialize()) are provided by common + * logic. To use this common SPI logic on your board: + * + * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your + * board-specific logic. This function will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 2. Add a call to up_spiinitialize() in your low level initialization + * logic + * 3. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ****************************************************************************/ + +void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + ssi_dumpgpio("lm3s_spiselect() Entry"); + + if (devid == SPIDEV_MMCSD) + { + /* Assert the CS pin to the card */ + + lm3s_gpiowrite(SDCCS_GPIO, !selected); + } +#ifdef CONFIG_NX_LCDDRIVER + else if (devid == SPIDEV_DISPLAY) + { + /* Assert the CS pin to the display */ + + lm3s_gpiowrite(OLEDCS_GPIO, !selected); + } +#endif + ssi_dumpgpio("lm3s_spiselect() Exit"); +} + +uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + ssidbg("Returning SPI_STATUS_PRESENT\n"); + return SPI_STATUS_PRESENT; +} + +#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ diff --git a/nuttx/configs/lm3s8962-ek/include/board.h b/nuttx/configs/lm3s8962-ek/include/board.h index 016cf54ce7..0b03f96f04 100755 --- a/nuttx/configs/lm3s8962-ek/include/board.h +++ b/nuttx/configs/lm3s8962-ek/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nsh/Make.defs b/nuttx/configs/lm3s8962-ek/nsh/Make.defs index ed81aa0964..cd183ed15e 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/Make.defs +++ b/nuttx/configs/lm3s8962-ek/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index 4c51b681ae..439165c904 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nsh/ld.script b/nuttx/configs/lm3s8962-ek/nsh/ld.script index 34b8a6bd7d..fdf7c89689 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/ld.script +++ b/nuttx/configs/lm3s8962-ek/nsh/ld.script @@ -2,7 +2,7 @@ * configs/lm3s8962-ek/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nsh/setenv.sh b/nuttx/configs/lm3s8962-ek/nsh/setenv.sh index 417ed66a1d..4ed5385b63 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/setenv.sh +++ b/nuttx/configs/lm3s8962-ek/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nx/Make.defs b/nuttx/configs/lm3s8962-ek/nx/Make.defs index 8f1b3837df..8417734772 100755 --- a/nuttx/configs/lm3s8962-ek/nx/Make.defs +++ b/nuttx/configs/lm3s8962-ek/nx/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nx/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nx/appconfig b/nuttx/configs/lm3s8962-ek/nx/appconfig index 1c730279b2..ace182b629 100644 --- a/nuttx/configs/lm3s8962-ek/nx/appconfig +++ b/nuttx/configs/lm3s8962-ek/nx/appconfig @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nx/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index d3e0f2ffd2..823d62ae95 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nx/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nx/ld.script b/nuttx/configs/lm3s8962-ek/nx/ld.script index fa4c9e1109..71f0be6c51 100755 --- a/nuttx/configs/lm3s8962-ek/nx/ld.script +++ b/nuttx/configs/lm3s8962-ek/nx/ld.script @@ -2,7 +2,7 @@ * configs/lm3s8962-ek/nx/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/nx/setenv.sh b/nuttx/configs/lm3s8962-ek/nx/setenv.sh index 2122e811fe..4c76fd7369 100755 --- a/nuttx/configs/lm3s8962-ek/nx/setenv.sh +++ b/nuttx/configs/lm3s8962-ek/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/nx/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/ostest/Make.defs b/nuttx/configs/lm3s8962-ek/ostest/Make.defs index d10957130b..914e96eb61 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/Make.defs +++ b/nuttx/configs/lm3s8962-ek/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/ostest/appconfig b/nuttx/configs/lm3s8962-ek/ostest/appconfig index 3ff28ef03e..f7475bcedf 100644 --- a/nuttx/configs/lm3s8962-ek/ostest/appconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/appconfig @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index cea2d5c1e5..291f4e1f26 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/ostest/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/ostest/ld.script b/nuttx/configs/lm3s8962-ek/ostest/ld.script index 08ea906bf1..6aa9f5f374 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/ld.script +++ b/nuttx/configs/lm3s8962-ek/ostest/ld.script @@ -2,7 +2,7 @@ * configs/lm3s8962-ek/ostest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/ostest/setenv.sh b/nuttx/configs/lm3s8962-ek/ostest/setenv.sh index ff8e4432ec..b5ee8be314 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/setenv.sh +++ b/nuttx/configs/lm3s8962-ek/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/src/Makefile b/nuttx/configs/lm3s8962-ek/src/Makefile index 7721e7e941..2d44db56c9 100644 --- a/nuttx/configs/lm3s8962-ek/src/Makefile +++ b/nuttx/configs/lm3s8962-ek/src/Makefile @@ -2,7 +2,7 @@ # configs/lm3s8962-ek/src/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/src/lm3s8962ek_internal.h b/nuttx/configs/lm3s8962-ek/src/lm3s8962ek_internal.h index 0c21e5d4b4..3b6175661b 100644 --- a/nuttx/configs/lm3s8962-ek/src/lm3s8962ek_internal.h +++ b/nuttx/configs/lm3s8962-ek/src/lm3s8962ek_internal.h @@ -1,136 +1,136 @@ -/************************************************************************************ - * configs/lm3s8962-ek/src/lm3s8962ek_internal.h - * arch/arm/src/board/lm3s8962ek_internal.n - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H -#define __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* How many SSI modules does this chip support? The LM3S8962 supports 1 SSI - * module (others may support more than 2 -- in such case, the following must be - * expanded). - */ - -#if LM3S_NSSI == 0 -# undef CONFIG_SSI0_DISABLE -# define CONFIG_SSI0_DISABLE 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#elif LM3S_NSSI == 1 -# undef CONFIG_SSI1_DISABLE -# define CONFIG_SSI1_DISABLE 1 -#endif - -/* LM3S8962 Eval Kit ***************************************************************/ - -/* GPIO Usage - * - * PIN SIGNAL EVB Function - * --- ----------- --------------------------------------- - * 26 PA0/U0RX Virtual COM port receive - * 27 PA1/U0TX Virtual COM port transmit - * 10 PD0/IDX0 SD card chip select - * 11 PD1/PWM1 Sound - * 30 PA4/SSI0RX SD card data out - * 31 PA5/SSI0TX SD card and OLED display data in - * 28 PA2/SSI0CLK SD card and OLED display clock - * 22 PC7/PHB0 OLED display data/control select - * 29 PA3/SSI0FSS OLED display chip select - * 73 PE1/PWM5 Down switch - * 74 PE2/PHB1 Left switch - * 72 PE0/PWM4 Up switch - * 75 PE3/PHA1 Right switch - * 61 PF1/IDX1 Select switch - * 47 PF0/PWM0 User LED - * 23 PC6/CCP3 Enable +15 V - */ - -/* GPIO for microSD card chip select: - * - PD0: SD card chip select (CARDCSn) - */ - -#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ - GPIO_VALUE_ONE | GPIO_PORTD | 0) - -/* GPIO for single LED: - * - PF0: User LED - */ - -#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTF | 0) - -/* GPIOs for OLED: - * - PC7: OLED display data/control select (D/Cn) - * - PA3: OLED display chip select (CSn) - * - PC6: Enable +15V needed by OLED (EN+15V) - */ - -#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ - GPIO_VALUE_ONE | GPIO_PORTC | 7) -#define OLEDCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ - GPIO_VALUE_ONE | GPIO_PORTA | 3) -#define OLEDEN_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ - GPIO_VALUE_ONE | GPIO_PORTC | 6) - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit. - * - ************************************************************************************/ - -extern void weak_function lm3s_ssiinitialize(void); - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H */ - +/************************************************************************************ + * configs/lm3s8962-ek/src/lm3s8962ek_internal.h + * arch/arm/src/board/lm3s8962ek_internal.n + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H +#define __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* How many SSI modules does this chip support? The LM3S8962 supports 1 SSI + * module (others may support more than 2 -- in such case, the following must be + * expanded). + */ + +#if LM3S_NSSI == 0 +# undef CONFIG_SSI0_DISABLE +# define CONFIG_SSI0_DISABLE 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#elif LM3S_NSSI == 1 +# undef CONFIG_SSI1_DISABLE +# define CONFIG_SSI1_DISABLE 1 +#endif + +/* LM3S8962 Eval Kit ***************************************************************/ + +/* GPIO Usage + * + * PIN SIGNAL EVB Function + * --- ----------- --------------------------------------- + * 26 PA0/U0RX Virtual COM port receive + * 27 PA1/U0TX Virtual COM port transmit + * 10 PD0/IDX0 SD card chip select + * 11 PD1/PWM1 Sound + * 30 PA4/SSI0RX SD card data out + * 31 PA5/SSI0TX SD card and OLED display data in + * 28 PA2/SSI0CLK SD card and OLED display clock + * 22 PC7/PHB0 OLED display data/control select + * 29 PA3/SSI0FSS OLED display chip select + * 73 PE1/PWM5 Down switch + * 74 PE2/PHB1 Left switch + * 72 PE0/PWM4 Up switch + * 75 PE3/PHA1 Right switch + * 61 PF1/IDX1 Select switch + * 47 PF0/PWM0 User LED + * 23 PC6/CCP3 Enable +15 V + */ + +/* GPIO for microSD card chip select: + * - PD0: SD card chip select (CARDCSn) + */ + +#define SDCCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ + GPIO_VALUE_ONE | GPIO_PORTD | 0) + +/* GPIO for single LED: + * - PF0: User LED + */ + +#define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTF | 0) + +/* GPIOs for OLED: + * - PC7: OLED display data/control select (D/Cn) + * - PA3: OLED display chip select (CSn) + * - PC6: Enable +15V needed by OLED (EN+15V) + */ + +#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ + GPIO_VALUE_ONE | GPIO_PORTC | 7) +#define OLEDCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \ + GPIO_VALUE_ONE | GPIO_PORTA | 3) +#define OLEDEN_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \ + GPIO_VALUE_ONE | GPIO_PORTC | 6) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit. + * + ************************************************************************************/ + +extern void weak_function lm3s_ssiinitialize(void); + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H */ + diff --git a/nuttx/configs/lm3s8962-ek/src/up_boot.c b/nuttx/configs/lm3s8962-ek/src/up_boot.c index 2992b00c12..0a976e8572 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_boot.c +++ b/nuttx/configs/lm3s8962-ek/src/up_boot.c @@ -1,92 +1,92 @@ -/************************************************************************************ - * configs/lm3s8962-ek/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "up_internal.h" -#include "lm3s8962ek_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_boardinitialize - * - * Description: - * All LM3S architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - ************************************************************************************/ - -void lm3s_boardinitialize(void) -{ - /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function - * lm3s_ssiinitialize() has been brought into the link. - */ - - /* The LM3S8962 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - if (lm3s_ssiinitialize) - { - lm3s_ssiinitialize(); - } -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/lm3s8962-ek/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "up_internal.h" +#include "lm3s8962ek_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_boardinitialize + * + * Description: + * All LM3S architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + ************************************************************************************/ + +void lm3s_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function + * lm3s_ssiinitialize() has been brought into the link. + */ + + /* The LM3S8962 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + if (lm3s_ssiinitialize) + { + lm3s_ssiinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/lm3s8962-ek/src/up_ethernet.c b/nuttx/configs/lm3s8962-ek/src/up_ethernet.c index 457e560913..2cad50bef9 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_ethernet.c +++ b/nuttx/configs/lm3s8962-ek/src/up_ethernet.c @@ -1,98 +1,98 @@ -/************************************************************************************ - * configs/lm3s8962-ek/src/up_ethernet.c - * arch/arm/src/board/up_ethernet.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ethernetmac - * - * Description: - * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile - * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function - * will obtain the MAC address from these registers. - * - ************************************************************************************/ - -#ifdef CONFIG_LM3S_BOARDMAC -void lm3s_ethernetmac(struct ether_addr *ethaddr) -{ - uint32_t user0; - uint32_t user1; - - /* Get the current value of the user registers */ - - user0 = getreg32(LM3S_FLASH_USERREG0); - user1 = getreg32(LM3S_FLASH_USERREG1); - - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); - DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - - /* Re-format that MAC address the way that uIP expects to see it */ - - ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); - ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); - ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); - ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); - ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); - ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); -} -#endif +/************************************************************************************ + * configs/lm3s8962-ek/src/up_ethernet.c + * arch/arm/src/board/up_ethernet.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ethernetmac + * + * Description: + * For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile + * USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function + * will obtain the MAC address from these registers. + * + ************************************************************************************/ + +#ifdef CONFIG_LM3S_BOARDMAC +void lm3s_ethernetmac(struct ether_addr *ethaddr) +{ + uint32_t user0; + uint32_t user1; + + /* Get the current value of the user registers */ + + user0 = getreg32(LM3S_FLASH_USERREG0); + user1 = getreg32(LM3S_FLASH_USERREG1); + + nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); + + /* Re-format that MAC address the way that uIP expects to see it */ + + ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); + ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); + ethaddr->ether_addr_octet[2] = ((user0 >> 16) & 0xff); + ethaddr->ether_addr_octet[3] = ((user1 >> 0) & 0xff); + ethaddr->ether_addr_octet[4] = ((user1 >> 8) & 0xff); + ethaddr->ether_addr_octet[5] = ((user1 >> 16) & 0xff); +} +#endif diff --git a/nuttx/configs/lm3s8962-ek/src/up_leds.c b/nuttx/configs/lm3s8962-ek/src/up_leds.c index 1592168d78..bff9204341 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_leds.c +++ b/nuttx/configs/lm3s8962-ek/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/src/up_nsh.c b/nuttx/configs/lm3s8962-ek/src/up_nsh.c index c95dce7a93..6938621845 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_nsh.c +++ b/nuttx/configs/lm3s8962-ek/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/src/up_oled.c b/nuttx/configs/lm3s8962-ek/src/up_oled.c index 55f7688940..7611872794 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_oled.c +++ b/nuttx/configs/lm3s8962-ek/src/up_oled.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_oled.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lm3s8962-ek/src/up_ssi.c b/nuttx/configs/lm3s8962-ek/src/up_ssi.c index 27899b5bfa..00e07c85d0 100644 --- a/nuttx/configs/lm3s8962-ek/src/up_ssi.c +++ b/nuttx/configs/lm3s8962-ek/src/up_ssi.c @@ -1,164 +1,164 @@ -/************************************************************************************ - * configs/lm3s8962-ek/src/up_ssi.c - * arch/arm/src/board/up_ssi.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "lm3s_internal.h" -#include "lm3s8962ek_internal.h" - -/* The LM3S8962 Eval Kit microSD CS is on SSI0 */ - -#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ - -#ifdef SSI_VERBOSE -# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) -#else -# define ssi_dumpgpio(m) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lm3s_ssiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit. - * - ************************************************************************************/ - -void weak_function lm3s_ssiinitialize(void) -{ - /* Configure the SPI-based microSD CS GPIO */ - - ssi_dumpgpio("lm3s_ssiinitialize() Entry)"); - lm3s_configgpio(SDCCS_GPIO); -#ifdef CONFIG_NX_LCDDRIVER - lm3s_configgpio(OLEDCS_GPIO); -#endif - ssi_dumpgpio("lm3s_ssiinitialize() Exit"); -} - -/**************************************************************************** - * The external functions, lm3s_spiselect and lm3s_spistatus must be provided - * by board-specific logic. The are implementations of the select and status - * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). - * All othermethods (including up_spiinitialize()) are provided by common - * logic. To use this common SPI logic on your board: - * - * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your - * board-specific logic. This function will perform chip selection and - * status operations using GPIOs in the way your board is configured. - * 2. Add a call to up_spiinitialize() in your low level initialization - * logic - * 3. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ****************************************************************************/ - -void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - ssi_dumpgpio("lm3s_spiselect() Entry"); - - if (devid == SPIDEV_MMCSD) - { - /* Assert the CS pin to the card */ - - lm3s_gpiowrite(SDCCS_GPIO, !selected); - } -#ifdef CONFIG_NX_LCDDRIVER - else if (devid == SPIDEV_DISPLAY) - { - /* Assert the CS pin to the display */ - - lm3s_gpiowrite(OLEDCS_GPIO, !selected); - } -#endif - ssi_dumpgpio("lm3s_spiselect() Exit"); -} - -uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - ssidbg("Returning SPI_STATUS_PRESENT\n"); - return SPI_STATUS_PRESENT; -} - -#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ +/************************************************************************************ + * configs/lm3s8962-ek/src/up_ssi.c + * arch/arm/src/board/up_ssi.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "lm3s_internal.h" +#include "lm3s8962ek_internal.h" + +/* The LM3S8962 Eval Kit microSD CS is on SSI0 */ + +#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */ + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SSI_DEBUG /* Define to enable debug */ +#undef SSI_VERBOSE /* Define to enable verbose debug */ + +#ifdef SSI_DEBUG +# define ssidbg lldbg +# ifdef SSI_VERBOSE +# define ssivdbg lldbg +# else +# define ssivdbg(x...) +# endif +#else +# undef SSI_VERBOSE +# define ssidbg(x...) +# define ssivdbg(x...) +#endif + +/* Dump GPIO registers */ + +#ifdef SSI_VERBOSE +# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m) +#else +# define ssi_dumpgpio(m) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lm3s_ssiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit. + * + ************************************************************************************/ + +void weak_function lm3s_ssiinitialize(void) +{ + /* Configure the SPI-based microSD CS GPIO */ + + ssi_dumpgpio("lm3s_ssiinitialize() Entry)"); + lm3s_configgpio(SDCCS_GPIO); +#ifdef CONFIG_NX_LCDDRIVER + lm3s_configgpio(OLEDCS_GPIO); +#endif + ssi_dumpgpio("lm3s_ssiinitialize() Exit"); +} + +/**************************************************************************** + * The external functions, lm3s_spiselect and lm3s_spistatus must be provided + * by board-specific logic. The are implementations of the select and status + * methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). + * All othermethods (including up_spiinitialize()) are provided by common + * logic. To use this common SPI logic on your board: + * + * 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your + * board-specific logic. This function will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 2. Add a call to up_spiinitialize() in your low level initialization + * logic + * 3. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ****************************************************************************/ + +void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + ssi_dumpgpio("lm3s_spiselect() Entry"); + + if (devid == SPIDEV_MMCSD) + { + /* Assert the CS pin to the card */ + + lm3s_gpiowrite(SDCCS_GPIO, !selected); + } +#ifdef CONFIG_NX_LCDDRIVER + else if (devid == SPIDEV_DISPLAY) + { + /* Assert the CS pin to the display */ + + lm3s_gpiowrite(OLEDCS_GPIO, !selected); + } +#endif + ssi_dumpgpio("lm3s_spiselect() Exit"); +} + +uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + ssidbg("Returning SPI_STATUS_PRESENT\n"); + return SPI_STATUS_PRESENT; +} + +#endif /* !CONFIG_SSI0_DISABLE || !CONFIG_SSI1_DISABLE */ diff --git a/nuttx/configs/lpc4330-xplorer/nsh/setenv.sh b/nuttx/configs/lpc4330-xplorer/nsh/setenv.sh index 65e410fc64..64109ce38c 100755 --- a/nuttx/configs/lpc4330-xplorer/nsh/setenv.sh +++ b/nuttx/configs/lpc4330-xplorer/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/lpc4330-xplorer/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpc4330-xplorer/ostest/setenv.sh b/nuttx/configs/lpc4330-xplorer/ostest/setenv.sh index ec93482fd2..8ac6da66b1 100755 --- a/nuttx/configs/lpc4330-xplorer/ostest/setenv.sh +++ b/nuttx/configs/lpc4330-xplorer/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/lpc4330-xplorer/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs index 6c583c2d1c..2c91b76b5e 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/dhcpd/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/appconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/appconfig index 6a901d09fe..76a9d2e71f 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/appconfig @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/dhcpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/ld.script b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/ld.script index d57e8f4183..d8f4444753 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/dhcpd/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/setenv.sh index bab486c18b..6bc6e10c97 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/dhcpd/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/include/board.h b/nuttx/configs/lpcxpresso-lpc1768/include/board.h index fe4dc71444..10af5dfc1a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/include/board.h +++ b/nuttx/configs/lpcxpresso-lpc1768/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs index c902e94f77..7a29f70432 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/nsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/ld.script b/nuttx/configs/lpcxpresso-lpc1768/nsh/ld.script index 0d8103b2e1..f37c4accb0 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/nsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/nsh/setenv.sh index fea794e86d..77f745c76a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/nsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs index ce07973f24..061d4ff68f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/nx/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/appconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/appconfig index 9523a5a0a2..a590ace67d 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/appconfig @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/nx/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/ld.script b/nuttx/configs/lpcxpresso-lpc1768/nx/ld.script index d59cfda383..f1a49e3aab 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/nx/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/nx/setenv.sh index b4f3faa3f9..711d92ea47 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/nx/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs index e7350094ee..496c54be44 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/appconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/appconfig index 055914983a..f20cf33dc4 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/appconfig @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/ld.script b/nuttx/configs/lpcxpresso-lpc1768/ostest/ld.script index a85bc2b048..da29a1482e 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/ostest/setenv.sh index 7f902d549b..db976c9469 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/ostest/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/Makefile b/nuttx/configs/lpcxpresso-lpc1768/src/Makefile index abc43d41c0..7384b04d47 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/Makefile +++ b/nuttx/configs/lpcxpresso-lpc1768/src/Makefile @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h b/nuttx/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h index 43237a0c2b..41ec1ce111 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h +++ b/nuttx/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h @@ -3,7 +3,7 @@ * arch/arm/src/board/lpcxpresso_internal.n * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c index 137df2f186..f672c4517d 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c index 39c12e7916..cebf3a143d 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c index 0b643f2763..b9c39ed163 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c index f3d884bb39..7060a92e69 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_oled.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c index 6c81c7a0dd..894404cc2b 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_ssp.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c index d368801226..c43028f1e3 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/src/up_usbmsc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the LPC17xx MMC/SD SPI block driver. * diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs index 730638bbca..8f2823d0f7 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/thttpd/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/appconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/appconfig index aaaa7c55c0..b6cac656ab 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/appconfig @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/thttpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/ld.script b/nuttx/configs/lpcxpresso-lpc1768/thttpd/ld.script index 4a897eb42b..37ec255327 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/thttpd/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/thttpd/setenv.sh index 932b230656..158c8a4424 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/thttpd/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/tools/flash.sh b/nuttx/configs/lpcxpresso-lpc1768/tools/flash.sh index 0dc2851327..4faa709ca0 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/tools/flash.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/tools/flash.sh @@ -3,7 +3,7 @@ # flash.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs index 9033e3e2e5..5a60371428 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/usbstorage/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/appconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/appconfig index 1f158cd5e8..a562cb9181 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/ld.script b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/ld.script index bc431cb947..7cccb8421f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/ld.script +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/ld.script @@ -2,7 +2,7 @@ * configs/lpcxpresso-lpc1768/usbstorage/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/setenv.sh b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/setenv.sh index 4a6b1613d3..036de7aef1 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/setenv.sh +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/lpcxpresso-lpc1768/usbstorage/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/Make.defs b/nuttx/configs/m68332evb/Make.defs index 897fb74da3..a0e6aa1ea1 100644 --- a/nuttx/configs/m68332evb/Make.defs +++ b/nuttx/configs/m68332evb/Make.defs @@ -2,7 +2,7 @@ # configs/m68332evb/Make.defs # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/appconfig b/nuttx/configs/m68332evb/appconfig index 779ae93052..4972941a6e 100644 --- a/nuttx/configs/m68332evb/appconfig +++ b/nuttx/configs/m68332evb/appconfig @@ -2,7 +2,7 @@ # configs/m68332evb/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index bad7f83420..e3e8110a7d 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -2,7 +2,7 @@ # configs/m68332evb/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/ld.script b/nuttx/configs/m68332evb/ld.script index 0054ff1d17..ab65751aa5 100644 --- a/nuttx/configs/m68332evb/ld.script +++ b/nuttx/configs/m68332evb/ld.script @@ -2,7 +2,7 @@ * ld.script * * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/setenv.sh b/nuttx/configs/m68332evb/setenv.sh index a5bb0f3b31..2882011fdb 100755 --- a/nuttx/configs/m68332evb/setenv.sh +++ b/nuttx/configs/m68332evb/setenv.sh @@ -2,7 +2,7 @@ # m68322evb/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/m68332evb/src/Makefile b/nuttx/configs/m68332evb/src/Makefile index 58bf0faf30..f510c22190 100644 --- a/nuttx/configs/m68332evb/src/Makefile +++ b/nuttx/configs/m68332evb/src/Makefile @@ -2,7 +2,7 @@ # configs/m68332evb/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/hidkbd/Make.defs b/nuttx/configs/mbed/hidkbd/Make.defs index 16725d3d28..d588e12fc2 100644 --- a/nuttx/configs/mbed/hidkbd/Make.defs +++ b/nuttx/configs/mbed/hidkbd/Make.defs @@ -2,7 +2,7 @@ # configs/mbed/hidkbd/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/hidkbd/appconfig b/nuttx/configs/mbed/hidkbd/appconfig index 820167020e..fa7e5e3c2c 100644 --- a/nuttx/configs/mbed/hidkbd/appconfig +++ b/nuttx/configs/mbed/hidkbd/appconfig @@ -2,7 +2,7 @@ # configs/mbed/hidkbd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/hidkbd/ld.script b/nuttx/configs/mbed/hidkbd/ld.script index 0d497e7e51..152f8bc2a8 100644 --- a/nuttx/configs/mbed/hidkbd/ld.script +++ b/nuttx/configs/mbed/hidkbd/ld.script @@ -2,7 +2,7 @@ * configs/olimex-lpc1766stk/hidkbd/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/hidkbd/setenv.sh b/nuttx/configs/mbed/hidkbd/setenv.sh index f4063ee4a3..c3ca070e33 100644 --- a/nuttx/configs/mbed/hidkbd/setenv.sh +++ b/nuttx/configs/mbed/hidkbd/setenv.sh @@ -2,7 +2,7 @@ # configs/mbed/hidkbd/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/include/board.h b/nuttx/configs/mbed/include/board.h index bec90d10f8..b2bda1f4c1 100755 --- a/nuttx/configs/mbed/include/board.h +++ b/nuttx/configs/mbed/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/nsh/Make.defs b/nuttx/configs/mbed/nsh/Make.defs index 044361af4b..dfc0a79689 100755 --- a/nuttx/configs/mbed/nsh/Make.defs +++ b/nuttx/configs/mbed/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/mbed/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/nsh/ld.script b/nuttx/configs/mbed/nsh/ld.script index 75b47d3600..d96d51dd9d 100755 --- a/nuttx/configs/mbed/nsh/ld.script +++ b/nuttx/configs/mbed/nsh/ld.script @@ -2,7 +2,7 @@ * configs/mbed/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/nsh/setenv.sh b/nuttx/configs/mbed/nsh/setenv.sh index 515d1c44cb..f29d975892 100755 --- a/nuttx/configs/mbed/nsh/setenv.sh +++ b/nuttx/configs/mbed/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/mbed/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/src/Makefile b/nuttx/configs/mbed/src/Makefile index 9841a90a5f..a29ddca868 100644 --- a/nuttx/configs/mbed/src/Makefile +++ b/nuttx/configs/mbed/src/Makefile @@ -2,7 +2,7 @@ # configs/mbed/src/Makefile # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/src/mbed_internal.h b/nuttx/configs/mbed/src/mbed_internal.h index 95b3da41ee..6b966b47a1 100644 --- a/nuttx/configs/mbed/src/mbed_internal.h +++ b/nuttx/configs/mbed/src/mbed_internal.h @@ -1,94 +1,94 @@ -/************************************************************************************ - * configs/mbed/src/mbed_internal.h - * arch/arm/src/board/mbed_internal.n - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef _CONFIGS_MBED_SRC_MBED_INTERNAL_H -#define _CONFIGS_MBED_SRC_MBED_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* MBED GPIO Pin Definitions ********************************************************/ - -#define MBED_LED1 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN18) -#define MBED_LED1_OFF MBED_LED1 -#define MBED_LED1_ON (MBED_LED1 | GPIO_VALUE_ONE) -#define MBED_LED2 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN20) -#define MBED_LED2_OFF MBED_LED2 -#define MBED_LED2_ON (MBED_LED2 | GPIO_VALUE_ONE) -#define MBED_LED3 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN21) -#define MBED_LED3_OFF MBED_LED3 -#define MBED_LED3_ON (MBED_LED3 | GPIO_VALUE_ONE) -#define MBED_LED4 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN23) -#define MBED_LED4_OFF MBED_LED4 -#define MBED_LED4_ON (MBED_LED 4| GPIO_VALUE_ONE) - -#define MBED_HEARTBEAT MBED_LED4 - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lpc17_sspinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board. - * - ************************************************************************************/ - -extern void weak_function lpc17_sspinitialize(void); - -#endif /* __ASSEMBLY__ */ -#endif /* _CONFIGS_MBED_SRC_MBED_INTERNAL_H */ - +/************************************************************************************ + * configs/mbed/src/mbed_internal.h + * arch/arm/src/board/mbed_internal.n + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef _CONFIGS_MBED_SRC_MBED_INTERNAL_H +#define _CONFIGS_MBED_SRC_MBED_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* MBED GPIO Pin Definitions ********************************************************/ + +#define MBED_LED1 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN18) +#define MBED_LED1_OFF MBED_LED1 +#define MBED_LED1_ON (MBED_LED1 | GPIO_VALUE_ONE) +#define MBED_LED2 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN20) +#define MBED_LED2_OFF MBED_LED2 +#define MBED_LED2_ON (MBED_LED2 | GPIO_VALUE_ONE) +#define MBED_LED3 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN21) +#define MBED_LED3_OFF MBED_LED3 +#define MBED_LED3_ON (MBED_LED3 | GPIO_VALUE_ONE) +#define MBED_LED4 (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN23) +#define MBED_LED4_OFF MBED_LED4 +#define MBED_LED4_ON (MBED_LED 4| GPIO_VALUE_ONE) + +#define MBED_HEARTBEAT MBED_LED4 + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lpc17_sspinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board. + * + ************************************************************************************/ + +extern void weak_function lpc17_sspinitialize(void); + +#endif /* __ASSEMBLY__ */ +#endif /* _CONFIGS_MBED_SRC_MBED_INTERNAL_H */ + diff --git a/nuttx/configs/mbed/src/up_boot.c b/nuttx/configs/mbed/src/up_boot.c index 93d69bf505..42dd54bf56 100644 --- a/nuttx/configs/mbed/src/up_boot.c +++ b/nuttx/configs/mbed/src/up_boot.c @@ -1,82 +1,82 @@ -/************************************************************************************ - * configs/mbed/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "up_internal.h" - -#include "lpc17_internal.h" -#include "mbed_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lpc17_boardinitialize - * - * Description: - * All LPC17xx architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -void lpc17_boardinitialize(void) -{ - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/mbed/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "up_internal.h" + +#include "lpc17_internal.h" +#include "mbed_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lpc17_boardinitialize + * + * Description: + * All LPC17xx architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void lpc17_boardinitialize(void) +{ + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/mbed/src/up_leds.c b/nuttx/configs/mbed/src/up_leds.c index 572e63a363..bc8a870452 100644 --- a/nuttx/configs/mbed/src/up_leds.c +++ b/nuttx/configs/mbed/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mbed/src/up_nsh.c b/nuttx/configs/mbed/src/up_nsh.c index 562b67cd94..3a23ca7a51 100644 --- a/nuttx/configs/mbed/src/up_nsh.c +++ b/nuttx/configs/mbed/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/composite/appconfig b/nuttx/configs/mcu123-lpc214x/composite/appconfig index 47d5346369..4c29b65234 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/appconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/appconfig @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/composite/appconfig # # Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/include/board.h b/nuttx/configs/mcu123-lpc214x/include/board.h index 04dab43f98..aa2b689572 100644 --- a/nuttx/configs/mcu123-lpc214x/include/board.h +++ b/nuttx/configs/mcu123-lpc214x/include/board.h @@ -2,7 +2,7 @@ * configs/mcu123-lpc214x/include/board.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/nsh/Make.defs b/nuttx/configs/mcu123-lpc214x/nsh/Make.defs index b883cf06f8..85b8bf8907 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/nsh/Make.defs # # Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh b/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh index 7a79f8fcbd..97295dbd7c 100755 --- a/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/mcu123-lpc2148/nsh/setenv.sh # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/ostest/Make.defs b/nuttx/configs/mcu123-lpc214x/ostest/Make.defs index c3da596abb..04d444c5df 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/ostest/Make.defs # # Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/ostest/appconfig b/nuttx/configs/mcu123-lpc214x/ostest/appconfig index 7086a745ea..33846aafb0 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/appconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/appconfig @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh index c4b3b42bd2..67d8b5d65a 100755 --- a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/mcu123-lpc2148/ostest/setenv.sh # # Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh b/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh index ccb2025dd9..6dae9b704e 100755 --- a/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh +++ b/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh @@ -3,7 +3,7 @@ # configs/mcu123-lpc214x/lpc21isp.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/src/up_leds.c b/nuttx/configs/mcu123-lpc214x/src/up_leds.c index 1cc7167532..9d399c8cc9 100644 --- a/nuttx/configs/mcu123-lpc214x/src/up_leds.c +++ b/nuttx/configs/mcu123-lpc214x/src/up_leds.c @@ -2,7 +2,7 @@ * configs/mcu123-lpc214x/src/up_leds.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/src/up_nsh.c b/nuttx/configs/mcu123-lpc214x/src/up_nsh.c index caef0c3b5e..14b5d7d97e 100644 --- a/nuttx/configs/mcu123-lpc214x/src/up_nsh.c +++ b/nuttx/configs/mcu123-lpc214x/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c index f25486d890..79d9344a4a 100644 --- a/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c +++ b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/mcu123-lpc214x/src/up_usbmsc.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the LPC214x MMC/SD SPI block driver. * diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs b/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs index 20fb8b55d1..a5163d8821 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/usbserial/Make.defs # # Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/appconfig b/nuttx/configs/mcu123-lpc214x/usbserial/appconfig index d4cf7893da..31ecbf24e0 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/appconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/appconfig @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/usbserial/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh b/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh index f68750d884..8661ee0cb7 100755 --- a/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh @@ -2,7 +2,7 @@ # configs/mcu123-lpc2148/usbserial/setenv.sh # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/appconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/appconfig index ffc6bb8206..1ed11ca5e3 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/appconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/mcu123-lpc214x/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh b/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh index 4be2cb49ab..f27530656f 100755 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/mcu123-lpc2148/usbstorage/setenv.sh # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/hello/appconfig b/nuttx/configs/micropendous3/hello/appconfig index 17771a4271..334bdaa1af 100644 --- a/nuttx/configs/micropendous3/hello/appconfig +++ b/nuttx/configs/micropendous3/hello/appconfig @@ -2,7 +2,7 @@ # configs/micropendous3/hello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/hello/ld.script b/nuttx/configs/micropendous3/hello/ld.script index 5492abda90..1a0c4b3f46 100644 --- a/nuttx/configs/micropendous3/hello/ld.script +++ b/nuttx/configs/micropendous3/hello/ld.script @@ -2,7 +2,7 @@ * configs/micropendous3/hello/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/hello/setenv.sh b/nuttx/configs/micropendous3/hello/setenv.sh index 4736838b9a..8e8830dc78 100755 --- a/nuttx/configs/micropendous3/hello/setenv.sh +++ b/nuttx/configs/micropendous3/hello/setenv.sh @@ -2,7 +2,7 @@ # configs/micropendous3/hello/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/include/board.h b/nuttx/configs/micropendous3/include/board.h index 8fd35e8908..a63de7cc11 100755 --- a/nuttx/configs/micropendous3/include/board.h +++ b/nuttx/configs/micropendous3/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/src/Makefile b/nuttx/configs/micropendous3/src/Makefile index b027183c48..ff1c872f09 100644 --- a/nuttx/configs/micropendous3/src/Makefile +++ b/nuttx/configs/micropendous3/src/Makefile @@ -2,7 +2,7 @@ # configs/micropendous3/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/micropendous3/src/micropendous3_internal.h b/nuttx/configs/micropendous3/src/micropendous3_internal.h index 8425bfb8f6..df22a265fd 100644 --- a/nuttx/configs/micropendous3/src/micropendous3_internal.h +++ b/nuttx/configs/micropendous3/src/micropendous3_internal.h @@ -1,101 +1,101 @@ -/**************************************************************************** - * configs/micropendous3/src/pcblogic-internal.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H -#define __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/************************************************************************************ - * Name: at90usb_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the Micropendous3 board. - * - ************************************************************************************/ - -#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) -EXTERN void weak_function at90usb_spiinitialize(void); -#endif - -/************************************************************************************ - * Name: at90usb_ledinit - * - * Description: - * Configure on-board LEDs if LED support has been selected. - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -EXTERN void at90usb_ledinit(void); -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H */ +/**************************************************************************** + * configs/micropendous3/src/micropendous3-internal.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H +#define __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Name: at90usb_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Micropendous3 board. + * + ************************************************************************************/ + +#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2) +EXTERN void weak_function at90usb_spiinitialize(void); +#endif + +/************************************************************************************ + * Name: at90usb_ledinit + * + * Description: + * Configure on-board LEDs if LED support has been selected. + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +EXTERN void at90usb_ledinit(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_MICROPENDOUS3_SRC_MICROPENDOUS3_INTERNAL_H */ diff --git a/nuttx/configs/micropendous3/src/up_boot.c b/nuttx/configs/micropendous3/src/up_boot.c index 6c9a879a8f..912440c192 100644 --- a/nuttx/configs/micropendous3/src/up_boot.c +++ b/nuttx/configs/micropendous3/src/up_boot.c @@ -3,7 +3,7 @@ * arch/mips/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/include/board.h b/nuttx/configs/mx1ads/include/board.h index 7fa096b254..1180e67ccf 100644 --- a/nuttx/configs/mx1ads/include/board.h +++ b/nuttx/configs/mx1ads/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/ostest/Make.defs b/nuttx/configs/mx1ads/ostest/Make.defs index 4eba91c3f5..ffcb4662c7 100644 --- a/nuttx/configs/mx1ads/ostest/Make.defs +++ b/nuttx/configs/mx1ads/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/mx1ads/ostest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/ostest/appconfig b/nuttx/configs/mx1ads/ostest/appconfig index 0f761bdb7d..2f61aa07c2 100644 --- a/nuttx/configs/mx1ads/ostest/appconfig +++ b/nuttx/configs/mx1ads/ostest/appconfig @@ -2,7 +2,7 @@ # configs/mx1ads/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index e58fb27018..f20216aa81 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -2,7 +2,7 @@ # configs/mx1ads/ostest/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/ostest/ld.script b/nuttx/configs/mx1ads/ostest/ld.script index 445c2c574b..e16f9de249 100644 --- a/nuttx/configs/mx1ads/ostest/ld.script +++ b/nuttx/configs/mx1ads/ostest/ld.script @@ -2,7 +2,7 @@ * configs/mx1ads/ostest/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/ostest/setenv.sh b/nuttx/configs/mx1ads/ostest/setenv.sh index 9089b26b09..e73858fc76 100755 --- a/nuttx/configs/mx1ads/ostest/setenv.sh +++ b/nuttx/configs/mx1ads/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/mx1ads/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/src/Makefile b/nuttx/configs/mx1ads/src/Makefile index 56d3af3f3d..4a2c02ef1a 100644 --- a/nuttx/configs/mx1ads/src/Makefile +++ b/nuttx/configs/mx1ads/src/Makefile @@ -2,7 +2,7 @@ # configs/mx1ads/src/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/src/up_boot.c b/nuttx/configs/mx1ads/src/up_boot.c index a65c9b4db4..67ac4ce176 100644 --- a/nuttx/configs/mx1ads/src/up_boot.c +++ b/nuttx/configs/mx1ads/src/up_boot.c @@ -1,107 +1,107 @@ -/************************************************************************************ - * configs/mx1ads/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "chip.h" -#include "up_arch.h" -#include "imx_gpio.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: imx_boardinitialize - * - * Description: - * All i.MX architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - ************************************************************************************/ - -void imx_boardinitialize(void) -{ - uint32_t regval; - - putreg32(0x000003ab, IMX_SC_GPCR); /* I/O pad driving strength */ - putreg32(IMX_MPCTL0_VALUE, IMX_PLL_MPCTL0); - putreg32(IMX_SPCTL0_VALUE, IMX_PLL_SPCTL0); - - regval = (CSCR_CLKOSEL_FCLK | /* Output FCLK on CLK0 */ - (IMX_CSCR_USBDIV << PLL_CSCR_USBDIV_SHIFT) | /* USB divider */ - CSCR_SDCNT_4thEDGE | /* Shutdown on 4th edge */ - (IMX_CSCR_BCLKDIV << PLL_CSCR_BCLKDIV_SHIFT) | /* Bclock divider */ - PLL_CSCR_SPEN | PLL_CSCR_MPEN); /* Enable MUC and System PLL */ - putreg32(regval, IMX_PLL_CSCR); - - /* Use these new frequencies now */ - - putreg32(IMX_PLL_CSCR, regval | (PLL_CSCR_MPLLRESTART|PLL_CSCR_SPLLRESTART)); - - /* Setup peripheral clocking */ - - putreg32(IMX_PCDR_VALUE, IMX_PLL_PCDR); - - /* Configure CS4 for cs8900 Ethernet */ - -#ifdef CONFIG_NET - putreg32(0x00000f00, IMX_EIM_CS4H); - putreg32(0x00001501, IMX_EIM_CS4L); - - imxgpio_configprimary(GPIOA, 21); - imxgpio_configprimary(GPIOA, 22); - - regval = getreg32(IMX_CS4_VSECTION + 0x0c); - regval = getreg32(IMX_CS4_VSECTION + 0x0c); -#endif -} +/************************************************************************************ + * configs/mx1ads/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "chip.h" +#include "up_arch.h" +#include "imx_gpio.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: imx_boardinitialize + * + * Description: + * All i.MX architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + ************************************************************************************/ + +void imx_boardinitialize(void) +{ + uint32_t regval; + + putreg32(0x000003ab, IMX_SC_GPCR); /* I/O pad driving strength */ + putreg32(IMX_MPCTL0_VALUE, IMX_PLL_MPCTL0); + putreg32(IMX_SPCTL0_VALUE, IMX_PLL_SPCTL0); + + regval = (CSCR_CLKOSEL_FCLK | /* Output FCLK on CLK0 */ + (IMX_CSCR_USBDIV << PLL_CSCR_USBDIV_SHIFT) | /* USB divider */ + CSCR_SDCNT_4thEDGE | /* Shutdown on 4th edge */ + (IMX_CSCR_BCLKDIV << PLL_CSCR_BCLKDIV_SHIFT) | /* Bclock divider */ + PLL_CSCR_SPEN | PLL_CSCR_MPEN); /* Enable MUC and System PLL */ + putreg32(regval, IMX_PLL_CSCR); + + /* Use these new frequencies now */ + + putreg32(IMX_PLL_CSCR, regval | (PLL_CSCR_MPLLRESTART|PLL_CSCR_SPLLRESTART)); + + /* Setup peripheral clocking */ + + putreg32(IMX_PCDR_VALUE, IMX_PLL_PCDR); + + /* Configure CS4 for cs8900 Ethernet */ + +#ifdef CONFIG_NET + putreg32(0x00000f00, IMX_EIM_CS4H); + putreg32(0x00001501, IMX_EIM_CS4L); + + imxgpio_configprimary(GPIOA, 21); + imxgpio_configprimary(GPIOA, 22); + + regval = getreg32(IMX_CS4_VSECTION + 0x0c); + regval = getreg32(IMX_CS4_VSECTION + 0x0c); +#endif +} diff --git a/nuttx/configs/mx1ads/src/up_leds.c b/nuttx/configs/mx1ads/src/up_leds.c index ff9a9b6382..30ba2bdbea 100644 --- a/nuttx/configs/mx1ads/src/up_leds.c +++ b/nuttx/configs/mx1ads/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/mx1ads/src/up_network.c b/nuttx/configs/mx1ads/src/up_network.c index 5eb0460eae..20fc766e3b 100644 --- a/nuttx/configs/mx1ads/src/up_network.c +++ b/nuttx/configs/mx1ads/src/up_network.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_network.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/include/board.h b/nuttx/configs/ne64badge/include/board.h index aea9358b10..ba4ce3631b 100755 --- a/nuttx/configs/ne64badge/include/board.h +++ b/nuttx/configs/ne64badge/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/ostest/Make.defs b/nuttx/configs/ne64badge/ostest/Make.defs index d72a137592..fcd01d1127 100755 --- a/nuttx/configs/ne64badge/ostest/Make.defs +++ b/nuttx/configs/ne64badge/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/ne64badge/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/ostest/appconfig b/nuttx/configs/ne64badge/ostest/appconfig index 185e346d88..013a78d059 100644 --- a/nuttx/configs/ne64badge/ostest/appconfig +++ b/nuttx/configs/ne64badge/ostest/appconfig @@ -2,7 +2,7 @@ # configs/ne64badge/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/ostest/ld.script.banked b/nuttx/configs/ne64badge/ostest/ld.script.banked index ef0673aac0..5f466e6491 100755 --- a/nuttx/configs/ne64badge/ostest/ld.script.banked +++ b/nuttx/configs/ne64badge/ostest/ld.script.banked @@ -2,7 +2,7 @@ * configs/ne64badge/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/ostest/ld.script.nonbanked b/nuttx/configs/ne64badge/ostest/ld.script.nonbanked index 1ec41e919f..dfa8b15b21 100755 --- a/nuttx/configs/ne64badge/ostest/ld.script.nonbanked +++ b/nuttx/configs/ne64badge/ostest/ld.script.nonbanked @@ -2,7 +2,7 @@ * configs/ne64badge/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/ostest/setenv.sh b/nuttx/configs/ne64badge/ostest/setenv.sh index f34038eba6..c5aa591b49 100755 --- a/nuttx/configs/ne64badge/ostest/setenv.sh +++ b/nuttx/configs/ne64badge/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/ne64badge/ostest/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/src/Makefile b/nuttx/configs/ne64badge/src/Makefile index 6808224cde..657fedddc1 100644 --- a/nuttx/configs/ne64badge/src/Makefile +++ b/nuttx/configs/ne64badge/src/Makefile @@ -2,7 +2,7 @@ # configs/ne64badge/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/src/ne64badge_internal.h b/nuttx/configs/ne64badge/src/ne64badge_internal.h index 7cba3a91c7..d10618c9a4 100644 --- a/nuttx/configs/ne64badge/src/ne64badge_internal.h +++ b/nuttx/configs/ne64badge/src/ne64badge_internal.h @@ -1,205 +1,205 @@ -/************************************************************************************ - * configs/ne64badge/src/ne64badge_internal.h - * arch/arm/src/board/ne64badge_internal.n - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H -#define __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -#include "m9s12_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* NE64BADGE Pin Usage **************************************************************/ -/* PIN PIN NAME BOARD SIGNAL NOTES - * --- ------------------- -------------- ---------------------- - * 44 RESET J3 RESET_L Also to SW3 - * 57 BKGD/MODC/TAGHI_B BDM BKGD CON6A - * - * 85 PAD0 VR1 Potentiometer - * 86 PAD1 J3 ANALOG_IN0 Not used on board - * 87 PAD2 J3 ANALOG_IN1 " " " " "" " " - * 88 PAD3 J3 ANALOG_IN2 " " " " "" " " - * 89 PAD4 J3 ANALOG_IN3 " " " " "" " " - * - * 70 PHY_TXP J7 TD+ RJ45 connector - * 71 PHY_TXN J7 TD- RJ45 connector - * 73 PHY_RXP J7 RD+ RJ45 connector - * 74 PHY_RXN J7 RD- RJ45 connector - * - * Ports A,B,E,K managed by the MEBI block - * --------------------------------------- - * 60 PA0/ADDR8/DATA8 J3 ADDR_DATA8 Not used on board - * 61 PA1/ADDR9/DATA9 J3 ADDR_DATA9 " " " " "" " " - * 62 PA2/ADDR10/DATA10 J3 ADDR_DATA10 " " " " "" " " - * 63 PA3/ADDR11/DATA11 J3 ADDR_DATA11 " " " " "" " " - * 77 PA4/ADDR12/DATA12 J3 ADDR_DATA12 " " " " "" " " - * 78 PA5/ADDR13/DATA13 J3 ADDR_DATA13 " " " " "" " " - * 79 PA6/ADDR14/DATA14 J3 ADDR_DATA14 " " " " "" " " - * 80 PA7/ADDR15/DATA15 J3 ADDR_DATA15 " " " " "" " " - * - * 10 PB0/ADDR0/DATA0 J3 ADDR_DATA0 Not used on board - * 11 PB1/ADDR1/DATA1 J3 ADDR_DATA1 " " " " "" " " - * 12 PB2/ADDR2/DATA2 J3 ADDR_DATA2 " " " " "" " " - * 13 PB3/ADDR3/DATA3 J3 ADDR_DATA3 " " " " "" " " - * 16 PB4/ADDR4/DATA4 J3 ADDR_DATA4 " " " " "" " " - * 17 PB5/ADDR5/DATA5 J3 ADDR_DATA5 " " " " "" " " - * 18 PB6/ADDR6/DATA6 J3 ADDR_DATA6 " " " " "" " " - * 19 PB7/ADDR7/DATA7 J3 ADDR_DATA7 " " " " "" " " - * - * 56 PE0/XIRQ_B BUTTON1 SW1 - * 55 PE1/IRQ_B J3 IRQ Not used on board - * 54 PE2/R_W J3 RW " " " " "" " " - * 53 PE3/LSTRB_B/TAGLO_B J3 LSTRB " " " " "" " " - * 41 PE4/ECLK J3 ECLK " " " " "" " " - * 40 PE5/IPIPE0/MODA J3 MODA " " " " "" " " - * 39 PE6/IPIPE1/MODB J3 MODB " " " " "" " " - * 38 PE7/NOACC/XCLKS_B pulled low pulled low - */ - -#define NE64BADGE_BUTTON1 (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT_E | GPIO_PIN_0) - -/* 97 PK0/XADR14 N/C N/C - * 98 PK1/XADR15 N/C N/C - * 99 PK2/XADR16 N/C N/C - * 100 PK3/XADR17 N/C N/C - * 103 PK4/XADR18 N/C N/C - * 104 PK5/XADR19 N/C N/C - * 105 PK6/XCS_B J3 XCS Not used on board - * 106 PK7/ECS_B/ROMCTL J3 ECS " " " " "" " " - * - * Ports T,S,G,H,J,L managed by the PIM Block - * ------------------------------------------ - * 110 PT4/IOC1_4 J3 GPIO8 Not used on board - * 109 PT5/IOC1_5 J3 GPIO9 " " " " "" " " - * 108 PT6/IOC1_6 J3 GPIO10 " " " " "" " " - * 107 PT7/IOC1_7 N/C N/C - * - * 30 PS0/RXD0 RS232_RX Eventually maps to J2 RXD - * 31 PS1/TXD0 RS232_TX Eventually maps to J2 TXD - * 32 PS2/RXD1 J3&J4 UART_RX Not used on board - * 33 PS3/TXD1 J3&J4 UART_TX " " " " "" " " - * 34 PS4/MISO J3 SPI_MISO " " " " "" " " - * 35 PS5/MOSI J3 SPI_MOSI " " " " "" " " - * 36 PS6/SCK J3 SPI_CLOCK " " " " "" " " - * 37 PS7/SS_B J3 SPI_SS " " " " "" " " - * - * 22 PG0/RXD0/KWG0 J3 GPIO0 Not used on board - * 23 PG1/RXD1/KWG1 J3 GPIO1 " " " " "" " " - * 24 PG2/RXD2/KWG2 J3 GPIO2 " " " " "" " " - * 25 PG3/RXD3/KWG3 J3 GPIO3 " " " " "" " " - * 26 PG4/RXCLK/KWG4 J3 GPIO4 " " " " "" " " - * 27 PG5/RXDV/KWG5 J3 GPIO5 " " " " "" " " - * 28 PG6/RXER/KWG6 J3 GPIO6 " " " " "" " " - * 29 PG7/KWG7 J3 GPIO7 " " " " "" " " - * - * 7 PH0/TXD0/KWH0 N/C N/C - * 6 PH1/TXD1/KWH1 N/C N/C - * 5 PH2/TXD2/KWH2 J4 XBEE_RESET Not used on board - * 4 PH3/TXD3/KWH3 J4 XBEE_RSSI Not used on board - * 3 PH4/TXCLK/KWH4 BUTTON2 SW2 - * 2 PH5/TXDV/KWH5 J5 XBEE_LOAD_H Not used on board - * 1 PH6/TXER/KWH6 J4 XBEE_LOAD_L Not used on board - */ - -#define NE64BADGE_BUTTON2 (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT_H | GPIO_PIN_4) - -/* 8 PJ0/MDC/KWJ0 LED1 D21, red - * 9 PJ1/MDIO/KWJ1 LED2 D22, red - * 20 PJ2/CRS/KWJ2 J3 SPI_CS Not used on board - * 21 PJ3/COL/KWJ3 N/C - * 112 PJ6/SDA/KWJ6 J3 I2C_DATA Not used on board - * 111 PJ7/SCL/KWJ7 J3 I2C_CLOCK " " " " "" " " - */ - -#define NE64BADGE_LED1 (GPIO_OUTPUT | GPIO_OUTPUT_HIGH | GPIO_PORT_J | GPIO_PIN_0) -#define NE64BADGE_LED2 (GPIO_OUTPUT | GPIO_OUTPUT_HIGH | GPIO_PORT_J | GPIO_PIN_1) - -/* 51 PL6/TXER/KWL6 N/C N/C - * 52 PL5/TXDV/KWL5 N/C N/C - * 58 PL4/COLLED Collision LED red - * 59 PL3/DUPLED Full Duplex LED yellow - * 81 PL2/SPDLED 100Mbps Speed LED yellow - * 83 PL1/LNKLED Link Good LED green - * 84 PL0/ACTLED Activity LED yellow - */ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ -/************************************************************************************ - * Name: up_ledinit - * - * Description: - * Configure and initialize on-board LEDs - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -extern void up_ledinit(void); -#endif - -/************************************************************************************ - * Name: hcs12_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. - * - ************************************************************************************/ - -extern void weak_function hcs12_spiinitialize(void); - - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H */ - +/************************************************************************************ + * configs/ne64badge/src/ne64badge_internal.h + * arch/arm/src/board/ne64badge_internal.n + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H +#define __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#include "m9s12_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* NE64BADGE Pin Usage **************************************************************/ +/* PIN PIN NAME BOARD SIGNAL NOTES + * --- ------------------- -------------- ---------------------- + * 44 RESET J3 RESET_L Also to SW3 + * 57 BKGD/MODC/TAGHI_B BDM BKGD CON6A + * + * 85 PAD0 VR1 Potentiometer + * 86 PAD1 J3 ANALOG_IN0 Not used on board + * 87 PAD2 J3 ANALOG_IN1 " " " " "" " " + * 88 PAD3 J3 ANALOG_IN2 " " " " "" " " + * 89 PAD4 J3 ANALOG_IN3 " " " " "" " " + * + * 70 PHY_TXP J7 TD+ RJ45 connector + * 71 PHY_TXN J7 TD- RJ45 connector + * 73 PHY_RXP J7 RD+ RJ45 connector + * 74 PHY_RXN J7 RD- RJ45 connector + * + * Ports A,B,E,K managed by the MEBI block + * --------------------------------------- + * 60 PA0/ADDR8/DATA8 J3 ADDR_DATA8 Not used on board + * 61 PA1/ADDR9/DATA9 J3 ADDR_DATA9 " " " " "" " " + * 62 PA2/ADDR10/DATA10 J3 ADDR_DATA10 " " " " "" " " + * 63 PA3/ADDR11/DATA11 J3 ADDR_DATA11 " " " " "" " " + * 77 PA4/ADDR12/DATA12 J3 ADDR_DATA12 " " " " "" " " + * 78 PA5/ADDR13/DATA13 J3 ADDR_DATA13 " " " " "" " " + * 79 PA6/ADDR14/DATA14 J3 ADDR_DATA14 " " " " "" " " + * 80 PA7/ADDR15/DATA15 J3 ADDR_DATA15 " " " " "" " " + * + * 10 PB0/ADDR0/DATA0 J3 ADDR_DATA0 Not used on board + * 11 PB1/ADDR1/DATA1 J3 ADDR_DATA1 " " " " "" " " + * 12 PB2/ADDR2/DATA2 J3 ADDR_DATA2 " " " " "" " " + * 13 PB3/ADDR3/DATA3 J3 ADDR_DATA3 " " " " "" " " + * 16 PB4/ADDR4/DATA4 J3 ADDR_DATA4 " " " " "" " " + * 17 PB5/ADDR5/DATA5 J3 ADDR_DATA5 " " " " "" " " + * 18 PB6/ADDR6/DATA6 J3 ADDR_DATA6 " " " " "" " " + * 19 PB7/ADDR7/DATA7 J3 ADDR_DATA7 " " " " "" " " + * + * 56 PE0/XIRQ_B BUTTON1 SW1 + * 55 PE1/IRQ_B J3 IRQ Not used on board + * 54 PE2/R_W J3 RW " " " " "" " " + * 53 PE3/LSTRB_B/TAGLO_B J3 LSTRB " " " " "" " " + * 41 PE4/ECLK J3 ECLK " " " " "" " " + * 40 PE5/IPIPE0/MODA J3 MODA " " " " "" " " + * 39 PE6/IPIPE1/MODB J3 MODB " " " " "" " " + * 38 PE7/NOACC/XCLKS_B pulled low pulled low + */ + +#define NE64BADGE_BUTTON1 (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT_E | GPIO_PIN_0) + +/* 97 PK0/XADR14 N/C N/C + * 98 PK1/XADR15 N/C N/C + * 99 PK2/XADR16 N/C N/C + * 100 PK3/XADR17 N/C N/C + * 103 PK4/XADR18 N/C N/C + * 104 PK5/XADR19 N/C N/C + * 105 PK6/XCS_B J3 XCS Not used on board + * 106 PK7/ECS_B/ROMCTL J3 ECS " " " " "" " " + * + * Ports T,S,G,H,J,L managed by the PIM Block + * ------------------------------------------ + * 110 PT4/IOC1_4 J3 GPIO8 Not used on board + * 109 PT5/IOC1_5 J3 GPIO9 " " " " "" " " + * 108 PT6/IOC1_6 J3 GPIO10 " " " " "" " " + * 107 PT7/IOC1_7 N/C N/C + * + * 30 PS0/RXD0 RS232_RX Eventually maps to J2 RXD + * 31 PS1/TXD0 RS232_TX Eventually maps to J2 TXD + * 32 PS2/RXD1 J3&J4 UART_RX Not used on board + * 33 PS3/TXD1 J3&J4 UART_TX " " " " "" " " + * 34 PS4/MISO J3 SPI_MISO " " " " "" " " + * 35 PS5/MOSI J3 SPI_MOSI " " " " "" " " + * 36 PS6/SCK J3 SPI_CLOCK " " " " "" " " + * 37 PS7/SS_B J3 SPI_SS " " " " "" " " + * + * 22 PG0/RXD0/KWG0 J3 GPIO0 Not used on board + * 23 PG1/RXD1/KWG1 J3 GPIO1 " " " " "" " " + * 24 PG2/RXD2/KWG2 J3 GPIO2 " " " " "" " " + * 25 PG3/RXD3/KWG3 J3 GPIO3 " " " " "" " " + * 26 PG4/RXCLK/KWG4 J3 GPIO4 " " " " "" " " + * 27 PG5/RXDV/KWG5 J3 GPIO5 " " " " "" " " + * 28 PG6/RXER/KWG6 J3 GPIO6 " " " " "" " " + * 29 PG7/KWG7 J3 GPIO7 " " " " "" " " + * + * 7 PH0/TXD0/KWH0 N/C N/C + * 6 PH1/TXD1/KWH1 N/C N/C + * 5 PH2/TXD2/KWH2 J4 XBEE_RESET Not used on board + * 4 PH3/TXD3/KWH3 J4 XBEE_RSSI Not used on board + * 3 PH4/TXCLK/KWH4 BUTTON2 SW2 + * 2 PH5/TXDV/KWH5 J5 XBEE_LOAD_H Not used on board + * 1 PH6/TXER/KWH6 J4 XBEE_LOAD_L Not used on board + */ + +#define NE64BADGE_BUTTON2 (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT_H | GPIO_PIN_4) + +/* 8 PJ0/MDC/KWJ0 LED1 D21, red + * 9 PJ1/MDIO/KWJ1 LED2 D22, red + * 20 PJ2/CRS/KWJ2 J3 SPI_CS Not used on board + * 21 PJ3/COL/KWJ3 N/C + * 112 PJ6/SDA/KWJ6 J3 I2C_DATA Not used on board + * 111 PJ7/SCL/KWJ7 J3 I2C_CLOCK " " " " "" " " + */ + +#define NE64BADGE_LED1 (GPIO_OUTPUT | GPIO_OUTPUT_HIGH | GPIO_PORT_J | GPIO_PIN_0) +#define NE64BADGE_LED2 (GPIO_OUTPUT | GPIO_OUTPUT_HIGH | GPIO_PORT_J | GPIO_PIN_1) + +/* 51 PL6/TXER/KWL6 N/C N/C + * 52 PL5/TXDV/KWL5 N/C N/C + * 58 PL4/COLLED Collision LED red + * 59 PL3/DUPLED Full Duplex LED yellow + * 81 PL2/SPDLED 100Mbps Speed LED yellow + * 83 PL1/LNKLED Link Good LED green + * 84 PL0/ACTLED Activity LED yellow + */ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ +/************************************************************************************ + * Name: up_ledinit + * + * Description: + * Configure and initialize on-board LEDs + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +extern void up_ledinit(void); +#endif + +/************************************************************************************ + * Name: hcs12_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. + * + ************************************************************************************/ + +extern void weak_function hcs12_spiinitialize(void); + + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H */ + diff --git a/nuttx/configs/ne64badge/src/up_boot.c b/nuttx/configs/ne64badge/src/up_boot.c index b277be76e9..a1d0071d9c 100644 --- a/nuttx/configs/ne64badge/src/up_boot.c +++ b/nuttx/configs/ne64badge/src/up_boot.c @@ -1,89 +1,89 @@ -/************************************************************************************ - * configs/ne64badge/src/up_boot.c - * arch/arm/src/board/up_boot.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "ne64badge_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: hcs12_boardinitialize - * - * Description: - * All HCS12 architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -void hcs12_boardinitialize(void) -{ - /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function - * hcs12_spiinitialize() has been brought into the link. - */ - -#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI) - if (hcs12_spiinitialize) - { - hcs12_spiinitialize(); - } -#endif - - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/ne64badge/src/up_boot.c + * arch/arm/src/board/up_boot.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "ne64badge_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: hcs12_boardinitialize + * + * Description: + * All HCS12 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void hcs12_boardinitialize(void) +{ + /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function + * hcs12_spiinitialize() has been brought into the link. + */ + +#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI) + if (hcs12_spiinitialize) + { + hcs12_spiinitialize(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/ne64badge/src/up_buttons.c b/nuttx/configs/ne64badge/src/up_buttons.c index ec43c3bedb..70c57f2cce 100644 --- a/nuttx/configs/ne64badge/src/up_buttons.c +++ b/nuttx/configs/ne64badge/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/ne64badge/src/up_buttons.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/src/up_leds.c b/nuttx/configs/ne64badge/src/up_leds.c index e6660b0c03..73991f5708 100644 --- a/nuttx/configs/ne64badge/src/up_leds.c +++ b/nuttx/configs/ne64badge/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/src/up_nsh.c b/nuttx/configs/ne64badge/src/up_nsh.c index f3851fcf6d..17a52819bc 100644 --- a/nuttx/configs/ne64badge/src/up_nsh.c +++ b/nuttx/configs/ne64badge/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ne64badge/src/up_spi.c b/nuttx/configs/ne64badge/src/up_spi.c index 08681fa2d2..8d52b75708 100644 --- a/nuttx/configs/ne64badge/src/up_spi.c +++ b/nuttx/configs/ne64badge/src/up_spi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_spi.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/include/board.h b/nuttx/configs/ntosd-dm320/include/board.h index 10fcec68b9..cf302a1ffc 100644 --- a/nuttx/configs/ntosd-dm320/include/board.h +++ b/nuttx/configs/ntosd-dm320/include/board.h @@ -2,7 +2,7 @@ * arch/board/board.h * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nettest/Make.defs b/nuttx/configs/ntosd-dm320/nettest/Make.defs index bc44d04875..c3b25f9cb5 100644 --- a/nuttx/configs/ntosd-dm320/nettest/Make.defs +++ b/nuttx/configs/ntosd-dm320/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nettest/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nettest/appconfig b/nuttx/configs/ntosd-dm320/nettest/appconfig index 6e57e8bd0b..de2ad4fb45 100644 --- a/nuttx/configs/ntosd-dm320/nettest/appconfig +++ b/nuttx/configs/ntosd-dm320/nettest/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index 3a5b019009..848cf2f9da 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nettest/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nettest/ld.script b/nuttx/configs/ntosd-dm320/nettest/ld.script index 55e763fad6..1b0b185009 100644 --- a/nuttx/configs/ntosd-dm320/nettest/ld.script +++ b/nuttx/configs/ntosd-dm320/nettest/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/nettest/ld.script * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nettest/setenv.sh b/nuttx/configs/ntosd-dm320/nettest/setenv.sh index e007fae486..8a7788cfd9 100755 --- a/nuttx/configs/ntosd-dm320/nettest/setenv.sh +++ b/nuttx/configs/ntosd-dm320/nettest/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nettest/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nsh/Make.defs b/nuttx/configs/ntosd-dm320/nsh/Make.defs index 00a4ae2b2a..5c7d88265d 100644 --- a/nuttx/configs/ntosd-dm320/nsh/Make.defs +++ b/nuttx/configs/ntosd-dm320/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nsh/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index 3cf421f16c..d824f55fc2 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nsh/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nsh/ld.script b/nuttx/configs/ntosd-dm320/nsh/ld.script index c1a27e4535..6155a14295 100644 --- a/nuttx/configs/ntosd-dm320/nsh/ld.script +++ b/nuttx/configs/ntosd-dm320/nsh/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/nsh/ld.script * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/nsh/setenv.sh b/nuttx/configs/ntosd-dm320/nsh/setenv.sh index 0dda8cba6f..bf3f497adb 100755 --- a/nuttx/configs/ntosd-dm320/nsh/setenv.sh +++ b/nuttx/configs/ntosd-dm320/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/nsh/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/ostest/Make.defs b/nuttx/configs/ntosd-dm320/ostest/Make.defs index 7e12a8c70d..7b1976cddb 100644 --- a/nuttx/configs/ntosd-dm320/ostest/Make.defs +++ b/nuttx/configs/ntosd-dm320/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/ostest/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/ostest/appconfig b/nuttx/configs/ntosd-dm320/ostest/appconfig index 1c5f6ab7b8..4e74fabc60 100644 --- a/nuttx/configs/ntosd-dm320/ostest/appconfig +++ b/nuttx/configs/ntosd-dm320/ostest/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index 08ea8be97b..edc991880d 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/ostest/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/ostest/ld.script b/nuttx/configs/ntosd-dm320/ostest/ld.script index e5bb772571..f475f99f2f 100644 --- a/nuttx/configs/ntosd-dm320/ostest/ld.script +++ b/nuttx/configs/ntosd-dm320/ostest/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/ostest/ld.script * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/ostest/setenv.sh b/nuttx/configs/ntosd-dm320/ostest/setenv.sh index 23948092b1..6ce1e04a85 100755 --- a/nuttx/configs/ntosd-dm320/ostest/setenv.sh +++ b/nuttx/configs/ntosd-dm320/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/ostest/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/poll/Make.defs b/nuttx/configs/ntosd-dm320/poll/Make.defs index 7ec6c0aad0..9e63120b12 100644 --- a/nuttx/configs/ntosd-dm320/poll/Make.defs +++ b/nuttx/configs/ntosd-dm320/poll/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/poll/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/poll/appconfig b/nuttx/configs/ntosd-dm320/poll/appconfig index ff5abf976a..e16589d1d3 100644 --- a/nuttx/configs/ntosd-dm320/poll/appconfig +++ b/nuttx/configs/ntosd-dm320/poll/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/poll/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig index ec845c7ed6..7386ff966d 100644 --- a/nuttx/configs/ntosd-dm320/poll/defconfig +++ b/nuttx/configs/ntosd-dm320/poll/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/poll/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/poll/ld.script b/nuttx/configs/ntosd-dm320/poll/ld.script index 8db7a0fed1..f8bdf223b0 100644 --- a/nuttx/configs/ntosd-dm320/poll/ld.script +++ b/nuttx/configs/ntosd-dm320/poll/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/poll/ld.script * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/poll/setenv.sh b/nuttx/configs/ntosd-dm320/poll/setenv.sh index 9a94a9894f..a3479fb180 100755 --- a/nuttx/configs/ntosd-dm320/poll/setenv.sh +++ b/nuttx/configs/ntosd-dm320/poll/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/poll/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/src/Makefile b/nuttx/configs/ntosd-dm320/src/Makefile index 1bd4b6291b..1d0a1e614a 100644 --- a/nuttx/configs/ntosd-dm320/src/Makefile +++ b/nuttx/configs/ntosd-dm320/src/Makefile @@ -2,7 +2,7 @@ # configs/ntosd-dm320/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/src/up_leds.c b/nuttx/configs/ntosd-dm320/src/up_leds.c index 15cf7b99f6..9e2336e368 100644 --- a/nuttx/configs/ntosd-dm320/src/up_leds.c +++ b/nuttx/configs/ntosd-dm320/src/up_leds.c @@ -2,7 +2,7 @@ * confgs/ntosd-dm320/src/up_leds.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/src/up_network.c b/nuttx/configs/ntosd-dm320/src/up_network.c index df2f76ca74..c94c814330 100644 --- a/nuttx/configs/ntosd-dm320/src/up_network.c +++ b/nuttx/configs/ntosd-dm320/src/up_network.c @@ -2,7 +2,7 @@ * board/up_network.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/thttpd/Make.defs b/nuttx/configs/ntosd-dm320/thttpd/Make.defs index ec5581bbba..aca2218710 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/Make.defs +++ b/nuttx/configs/ntosd-dm320/thttpd/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/thttpd/Make.defs # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/thttpd/appconfig b/nuttx/configs/ntosd-dm320/thttpd/appconfig index 42bcab4d43..bf47bf59f1 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/appconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/thttpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index 19680b2e9d..90f84c5e38 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/thttpd/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/thttpd/ld.script b/nuttx/configs/ntosd-dm320/thttpd/ld.script index 6646ec2f72..63199aa5a2 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/ld.script +++ b/nuttx/configs/ntosd-dm320/thttpd/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/thttpd/ld.script * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/thttpd/setenv.sh b/nuttx/configs/ntosd-dm320/thttpd/setenv.sh index 516766b429..54700fb6b3 100755 --- a/nuttx/configs/ntosd-dm320/thttpd/setenv.sh +++ b/nuttx/configs/ntosd-dm320/thttpd/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/thttpd/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/udp/Make.defs b/nuttx/configs/ntosd-dm320/udp/Make.defs index 54df969e0a..003df0778d 100644 --- a/nuttx/configs/ntosd-dm320/udp/Make.defs +++ b/nuttx/configs/ntosd-dm320/udp/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/udp/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/udp/appconfig b/nuttx/configs/ntosd-dm320/udp/appconfig index 30e21e1850..1a1eb12fc5 100644 --- a/nuttx/configs/ntosd-dm320/udp/appconfig +++ b/nuttx/configs/ntosd-dm320/udp/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/udp/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index bc2bf86511..4bc4b4bc80 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/udp/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/udp/ld.script b/nuttx/configs/ntosd-dm320/udp/ld.script index d921a28add..89dd8f823f 100644 --- a/nuttx/configs/ntosd-dm320/udp/ld.script +++ b/nuttx/configs/ntosd-dm320/udp/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/udp/ld.script * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/udp/setenv.sh b/nuttx/configs/ntosd-dm320/udp/setenv.sh index 8e14be32f9..a2e1ffec73 100755 --- a/nuttx/configs/ntosd-dm320/udp/setenv.sh +++ b/nuttx/configs/ntosd-dm320/udp/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/udp/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/uip/Make.defs b/nuttx/configs/ntosd-dm320/uip/Make.defs index 40394e77b4..e759a8dcc6 100644 --- a/nuttx/configs/ntosd-dm320/uip/Make.defs +++ b/nuttx/configs/ntosd-dm320/uip/Make.defs @@ -2,7 +2,7 @@ # configs/ntosd-dm320/uip/Make.defs # # Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/uip/appconfig b/nuttx/configs/ntosd-dm320/uip/appconfig index cfd75d6a89..73bf15ba36 100644 --- a/nuttx/configs/ntosd-dm320/uip/appconfig +++ b/nuttx/configs/ntosd-dm320/uip/appconfig @@ -2,7 +2,7 @@ # configs/ntosd-dm320/uip/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/uip/ld.script b/nuttx/configs/ntosd-dm320/uip/ld.script index e9bee2f8c8..57d763c8e1 100644 --- a/nuttx/configs/ntosd-dm320/uip/ld.script +++ b/nuttx/configs/ntosd-dm320/uip/ld.script @@ -2,7 +2,7 @@ * configs/ntosd-dm320/uip/ld.script * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/ntosd-dm320/uip/setenv.sh b/nuttx/configs/ntosd-dm320/uip/setenv.sh index afc63692e1..ccc74829d8 100755 --- a/nuttx/configs/ntosd-dm320/uip/setenv.sh +++ b/nuttx/configs/ntosd-dm320/uip/setenv.sh @@ -2,7 +2,7 @@ # configs/ntosd-dm320/uip/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/nsh/Make.defs b/nuttx/configs/nucleus2g/nsh/Make.defs index 5bce696517..44cab10a49 100755 --- a/nuttx/configs/nucleus2g/nsh/Make.defs +++ b/nuttx/configs/nucleus2g/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/nucleus2g/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/nsh/ld.script b/nuttx/configs/nucleus2g/nsh/ld.script index 82170d40c9..bc4d89cf17 100755 --- a/nuttx/configs/nucleus2g/nsh/ld.script +++ b/nuttx/configs/nucleus2g/nsh/ld.script @@ -2,7 +2,7 @@ * configs/nucleus2g/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/nsh/setenv.sh b/nuttx/configs/nucleus2g/nsh/setenv.sh index 243490cc61..ffdc74e9b9 100755 --- a/nuttx/configs/nucleus2g/nsh/setenv.sh +++ b/nuttx/configs/nucleus2g/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/nucleus2g/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/ostest/Make.defs b/nuttx/configs/nucleus2g/ostest/Make.defs index 359c012f84..614654a8fb 100755 --- a/nuttx/configs/nucleus2g/ostest/Make.defs +++ b/nuttx/configs/nucleus2g/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/nucleus2g/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/ostest/appconfig b/nuttx/configs/nucleus2g/ostest/appconfig index 32b848f2d7..835b8e1dc0 100644 --- a/nuttx/configs/nucleus2g/ostest/appconfig +++ b/nuttx/configs/nucleus2g/ostest/appconfig @@ -2,7 +2,7 @@ # configs/nucleus2g/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/ostest/ld.script b/nuttx/configs/nucleus2g/ostest/ld.script index 1959ea88d6..5d3b874af2 100755 --- a/nuttx/configs/nucleus2g/ostest/ld.script +++ b/nuttx/configs/nucleus2g/ostest/ld.script @@ -2,7 +2,7 @@ * configs/nucleus2g/ostest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/ostest/setenv.sh b/nuttx/configs/nucleus2g/ostest/setenv.sh index 32d3b23c1e..6a78a5c239 100755 --- a/nuttx/configs/nucleus2g/ostest/setenv.sh +++ b/nuttx/configs/nucleus2g/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/nucleus2g/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/src/Makefile b/nuttx/configs/nucleus2g/src/Makefile index 42a8b5cd2d..6e3fc94d2d 100644 --- a/nuttx/configs/nucleus2g/src/Makefile +++ b/nuttx/configs/nucleus2g/src/Makefile @@ -2,7 +2,7 @@ # configs/nucleus2g/src/Makefile # # Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/src/up_leds.c b/nuttx/configs/nucleus2g/src/up_leds.c index 64eaad65e0..41f955af48 100644 --- a/nuttx/configs/nucleus2g/src/up_leds.c +++ b/nuttx/configs/nucleus2g/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/src/up_nsh.c b/nuttx/configs/nucleus2g/src/up_nsh.c index 0707eaa357..9986c82823 100644 --- a/nuttx/configs/nucleus2g/src/up_nsh.c +++ b/nuttx/configs/nucleus2g/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/src/up_ssp.c b/nuttx/configs/nucleus2g/src/up_ssp.c index 1c7e3b5b07..5515d49686 100644 --- a/nuttx/configs/nucleus2g/src/up_ssp.c +++ b/nuttx/configs/nucleus2g/src/up_ssp.c @@ -1,185 +1,185 @@ -/************************************************************************************ - * configs/nucleus2g/src/up_ssp.c - * arch/arm/src/board/up_ssp.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "lpc17_internal.h" -#include "nucleus2g_internal.h" - -/* The LM3S6965 Eval Kit microSD CS is on SSI0 */ - -#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSP_DEBUG /* Define to enable debug */ -#undef SSP_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSP_DEBUG -# define sspdbg lldbg -# ifdef SSP_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef SSP_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - -/* Dump GPIO registers */ - -#ifdef SSP_VERBOSE -# define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) -#else -# define ssp_dumpgpio(m) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: lpc17_sspinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. - * - ************************************************************************************/ - -void weak_function lpc17_sspinitialize(void) -{ - /* Configure the SPI-based microSD CS GPIO */ - - ssp_dumpgpio("lpc17_sspinitialize() Entry)"); - - /* SSP0 connects only to the MMC/SD slot on the Nucleus 1G board. - * P0[15]/TXD1/SCK0/SCK MMC_CLK - * P0[16]/RXD1/SSEL0/SSEL MMC_CD - * P0[17]/CTS1/MISO0/MISO MMC_DATA0 - * P0[18]/DCD1/MOSI0/MOSI MMC_MISO - * - * In SPI mode the MMC/SD DATA3/CD functions as the SPI chip select. - */ - -#ifdef CONFIG_LPC17_SSP0 - lpc17_configgpio(NUCLEUS2G_MMCSD_CS); -#endif - - /* SSP1 goes off the Nucleus 2G board to the Babel CAN board along with 3 chip - * select pins. However, it is currently not used on that board. - */ - -#ifdef CONFIG_LPC17_SSP1 -# warning "SSP1 chip selects not known" -#endif - ssp_dumpgpio("lpc17_sspinitialize() Exit"); -} - -/************************************************************************************ - * Name: lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status - * - * Description: - * The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status - * must be provided by board-specific logic. They are implementations of the select - * and status methods of the SPI interface defined by struct spi_ops_s (see - * include/nuttx/spi.h). All other methods (including up_spiinitialize()) - * are provided by common LPC17xx logic. To use this common SPI logic on your - * board: - * - * 1. Provide logic in lpc17_boardinitialize() to configure SPI/SSP chip select - * pins. - * 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions - * in your board-specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. - * 3. Add a calls to up_spiinitialize() in your low level application - * initialization logic - * 4. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling - * mmcsd_spislotinitialize(), for example, will bind the SPI driver to - * the SPI MMC/SD driver). - * - ************************************************************************************/ - -#ifdef CONFIG_LPC17_SSP0 -void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - ssp_dumpgpio("lpc17_spiselect() Entry"); - - if (devid == SPIDEV_MMCSD) - { - /* Assert the CS pin to the card */ - - lpc17_gpiowrite(NUCLEUS2G_MMCSD_CS, !selected); - } - ssp_dumpgpio("lpc17_spiselect() Exit"); -} - -uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - sspdbg("Returning SPI_STATUS_PRESENT\n"); - return SPI_STATUS_PRESENT; -} -#endif - -#ifdef CONFIG_LPC17_SSP1 -# warning "SSP1 chip selects not known" -#endif - -#endif /* CONFIG_LPC17_SSP0 || CONFIG_LPC17_SSP1 */ +/************************************************************************************ + * configs/nucleus2g/src/up_ssp.c + * arch/arm/src/board/up_ssp.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "lpc17_internal.h" +#include "nucleus2g_internal.h" + +/* The LM3S6965 Eval Kit microSD CS is on SSI0 */ + +#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ + +#undef SSP_DEBUG /* Define to enable debug */ +#undef SSP_VERBOSE /* Define to enable verbose debug */ + +#ifdef SSP_DEBUG +# define sspdbg lldbg +# ifdef SSP_VERBOSE +# define sspvdbg lldbg +# else +# define sspvdbg(x...) +# endif +#else +# undef SSP_VERBOSE +# define sspdbg(x...) +# define sspvdbg(x...) +#endif + +/* Dump GPIO registers */ + +#ifdef SSP_VERBOSE +# define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) +#else +# define ssp_dumpgpio(m) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: lpc17_sspinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit. + * + ************************************************************************************/ + +void weak_function lpc17_sspinitialize(void) +{ + /* Configure the SPI-based microSD CS GPIO */ + + ssp_dumpgpio("lpc17_sspinitialize() Entry)"); + + /* SSP0 connects only to the MMC/SD slot on the Nucleus 1G board. + * P0[15]/TXD1/SCK0/SCK MMC_CLK + * P0[16]/RXD1/SSEL0/SSEL MMC_CD + * P0[17]/CTS1/MISO0/MISO MMC_DATA0 + * P0[18]/DCD1/MOSI0/MOSI MMC_MISO + * + * In SPI mode the MMC/SD DATA3/CD functions as the SPI chip select. + */ + +#ifdef CONFIG_LPC17_SSP0 + lpc17_configgpio(NUCLEUS2G_MMCSD_CS); +#endif + + /* SSP1 goes off the Nucleus 2G board to the Babel CAN board along with 3 chip + * select pins. However, it is currently not used on that board. + */ + +#ifdef CONFIG_LPC17_SSP1 +# warning "SSP1 chip selects not known" +#endif + ssp_dumpgpio("lpc17_sspinitialize() Exit"); +} + +/************************************************************************************ + * Name: lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status + * + * Description: + * The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status + * must be provided by board-specific logic. They are implementations of the select + * and status methods of the SPI interface defined by struct spi_ops_s (see + * include/nuttx/spi.h). All other methods (including up_spiinitialize()) + * are provided by common LPC17xx logic. To use this common SPI logic on your + * board: + * + * 1. Provide logic in lpc17_boardinitialize() to configure SPI/SSP chip select + * pins. + * 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions + * in your board-specific logic. These functions will perform chip selection + * and status operations using GPIOs in the way your board is configured. + * 3. Add a calls to up_spiinitialize() in your low level application + * initialization logic + * 4. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). + * + ************************************************************************************/ + +#ifdef CONFIG_LPC17_SSP0 +void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + ssp_dumpgpio("lpc17_spiselect() Entry"); + + if (devid == SPIDEV_MMCSD) + { + /* Assert the CS pin to the card */ + + lpc17_gpiowrite(NUCLEUS2G_MMCSD_CS, !selected); + } + ssp_dumpgpio("lpc17_spiselect() Exit"); +} + +uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + sspdbg("Returning SPI_STATUS_PRESENT\n"); + return SPI_STATUS_PRESENT; +} +#endif + +#ifdef CONFIG_LPC17_SSP1 +# warning "SSP1 chip selects not known" +#endif + +#endif /* CONFIG_LPC17_SSP0 || CONFIG_LPC17_SSP1 */ diff --git a/nuttx/configs/nucleus2g/src/up_usbmsc.c b/nuttx/configs/nucleus2g/src/up_usbmsc.c index c3d074b54e..8c71a5ce71 100644 --- a/nuttx/configs/nucleus2g/src/up_usbmsc.c +++ b/nuttx/configs/nucleus2g/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/nucleus2g/src/up_usbmsc.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the LPC17xx MMC/SD SPI block driver. * diff --git a/nuttx/configs/nucleus2g/usbserial/Make.defs b/nuttx/configs/nucleus2g/usbserial/Make.defs index f711eac39d..92f540a1f6 100755 --- a/nuttx/configs/nucleus2g/usbserial/Make.defs +++ b/nuttx/configs/nucleus2g/usbserial/Make.defs @@ -2,7 +2,7 @@ # configs/nucleus2g/usbserial/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbserial/appconfig b/nuttx/configs/nucleus2g/usbserial/appconfig index dffbbd1fb5..fe16aa81fa 100644 --- a/nuttx/configs/nucleus2g/usbserial/appconfig +++ b/nuttx/configs/nucleus2g/usbserial/appconfig @@ -2,7 +2,7 @@ # configs/nucleus2g/usbserial/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbserial/ld.script b/nuttx/configs/nucleus2g/usbserial/ld.script index 2acba4f5ba..2fa9249ff7 100755 --- a/nuttx/configs/nucleus2g/usbserial/ld.script +++ b/nuttx/configs/nucleus2g/usbserial/ld.script @@ -2,7 +2,7 @@ * configs/nucleus2g/usbserial/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbserial/setenv.sh b/nuttx/configs/nucleus2g/usbserial/setenv.sh index 8f405b4195..9333b3a2f5 100755 --- a/nuttx/configs/nucleus2g/usbserial/setenv.sh +++ b/nuttx/configs/nucleus2g/usbserial/setenv.sh @@ -2,7 +2,7 @@ # configs/nucleus2g/usbserial/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbstorage/Make.defs b/nuttx/configs/nucleus2g/usbstorage/Make.defs index 272bdd88c2..c71349c740 100755 --- a/nuttx/configs/nucleus2g/usbstorage/Make.defs +++ b/nuttx/configs/nucleus2g/usbstorage/Make.defs @@ -2,7 +2,7 @@ # configs/nucleus2g/usbstorage/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbstorage/appconfig b/nuttx/configs/nucleus2g/usbstorage/appconfig index 24b3343490..9653e14a3f 100644 --- a/nuttx/configs/nucleus2g/usbstorage/appconfig +++ b/nuttx/configs/nucleus2g/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/nucleus2g/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbstorage/ld.script b/nuttx/configs/nucleus2g/usbstorage/ld.script index d5f0c086bd..a1056f8a7c 100755 --- a/nuttx/configs/nucleus2g/usbstorage/ld.script +++ b/nuttx/configs/nucleus2g/usbstorage/ld.script @@ -2,7 +2,7 @@ * configs/nucleus2g/usbstorage/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/nucleus2g/usbstorage/setenv.sh b/nuttx/configs/nucleus2g/usbstorage/setenv.sh index 702de2b023..e6f7197fd7 100755 --- a/nuttx/configs/nucleus2g/usbstorage/setenv.sh +++ b/nuttx/configs/nucleus2g/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/nucleus2g/usbstorage/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs b/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs index 255d832540..178287e8a6 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/ftpc/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh b/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh index 04c426b521..85d20db324 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/ftpc/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs b/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs index 036e5f40b8..50c8515cec 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/hidkbd/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig index 74c5006134..79a7c50abe 100644 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/hidkbd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh index 1add4fe5c3..7bdba25d76 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/hidkbd/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs b/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs index a9764339a2..69e01144b7 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nettest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/appconfig b/nuttx/configs/olimex-lpc1766stk/nettest/appconfig index 11b02d4c9e..a54371a1dc 100644 --- a/nuttx/configs/olimex-lpc1766stk/nettest/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh index f481146df9..58951dc840 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nettest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs b/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs index fcabaa38fa..241d3644a6 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh index 557d4ef6f7..4b9bec6d04 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nx/Make.defs b/nuttx/configs/olimex-lpc1766stk/nx/Make.defs index 5ca7cb0ea6..d6e00b56b6 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/nx/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nx/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nx/appconfig b/nuttx/configs/olimex-lpc1766stk/nx/appconfig index 37c3b34d62..24d3641978 100644 --- a/nuttx/configs/olimex-lpc1766stk/nx/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nx/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh index 3272035248..a2027d727c 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/nx/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs b/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs index f8a169db7a..f5cc92b55d 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/ostest/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/appconfig b/nuttx/configs/olimex-lpc1766stk/ostest/appconfig index fd93a1e657..b83368c475 100644 --- a/nuttx/configs/olimex-lpc1766stk/ostest/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh b/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh index e97d102b36..996cefc4e8 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/ostest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs b/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs index db632f4e2c..ccdc4879f4 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/slip-httpd/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig index 1bc609e76e..2daaefbce6 100644 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/slip-httpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh index f5598a8653..546ca1e3a4 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/slip-httpd/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_lcd.c b/nuttx/configs/olimex-lpc1766stk/src/up_lcd.c index e9fe0aa367..93923b91a3 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/up_lcd.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_lcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_lcd.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_ssp.c b/nuttx/configs/olimex-lpc1766stk/src/up_ssp.c index b3d1b05407..272a170650 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/up_ssp.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_ssp.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_ssp.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c index b92a9dc9e8..08c5fb8874 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/olimex-lpc1766stk/src/up_usbmsc.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the LPC17xx MMC/SD SPI block driver. * diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs b/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs index 312bceb2e6..3f00495f55 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/thttpd/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/appconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/appconfig index 6681a6bd96..8357e2cb24 100644 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/thttpd/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh index 80e519cc9d..09288f04c0 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/thttpd/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs b/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs index deb7525fab..18e30e664c 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbserial/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/appconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/appconfig index 5126ff19e0..2b73ffd794 100644 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbserial/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh b/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh index eff7d8483b..f755b6afe9 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbserial/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs b/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs index 6b719602d7..1999989f75 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbstorage/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/appconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/appconfig index 6b56f9785f..073634d41b 100644 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh b/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh index 5c150cf07d..e41283c438 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/usbstorage/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs b/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs index 0ae00ae6c2..0fcde7acce 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs +++ b/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/wlan/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/appconfig b/nuttx/configs/olimex-lpc1766stk/wlan/appconfig index 17055072ae..7fb2871aaf 100644 --- a/nuttx/configs/olimex-lpc1766stk/wlan/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/wlan/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh b/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh index 84cb7c5bba..1b87dab69c 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-lpc1766stk/wlan/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/include/board.h b/nuttx/configs/olimex-lpc2378/include/board.h index c6dd70c1d2..44919c46c8 100755 --- a/nuttx/configs/olimex-lpc2378/include/board.h +++ b/nuttx/configs/olimex-lpc2378/include/board.h @@ -1,90 +1,90 @@ -/**************************************************************************** - * configs/olimex-lpc2378/include/board.h - * - * Copyright (C) 2010 Rommel Marcelo. All rights reserved. - * Author: Rommel Marcelo - * - * This is part of the NuttX RTOS and based on the LPC2148 port: - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __ARCH_BOARD_BOARD_H -#define __ARCH_BOARD_BOARD_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* If USB is enabled, PLL must be configured for 48MHz to provide USB clocking */ -//-- F_pll = (2 * M * F_in)/N -//-- F_out = ((2 * (PLL_M + 1 ) * FOSC)/(0+1))/(CCLK_DIV+1) = 288/5 = 57 600 000 Hz -//~ #ifdef CONFIG_USBDEV - //~ # define FOSC (12000000) /* Oscillator frequency */ - //~ # define CCLK (57600000) /* CPU running clock */ - //~ # define FCCO (288000000) /* CPU CCO clock */ -//~ #else - # define FOSC (12000000) /* Oscillator frequency */ - # define CCLK (57600000) /* CPU running clock */ - # define FCCO (288000000) /* CPU CCO clock */ - //~ # define CCLK (72000000) /* CPU running clock */ - //~ # define FCCO (360000000) /* CPU CCO clock */ -//~ #endif - -//~#define PLL_M ( (FCCO / (2 * FOSC))-1 ) -//~ #define PLL_N ( ((2 * PLL_M * FOSC) / FCCO)-1 ) -#define PLL_M 11 -#define PLL_N 0 - -#define CCLK_DIV 4 -#define USBCLK_DIV 6 - - /* LED definitions **********************************************************/ - -#define LED_STARTED 0 -#define LED_HEAPALLOCATE 1 -#define LED_IRQSENABLED 2 -#define LED_STACKCREATED 3 -#define LED_INIRQ 4 -#define LED_SIGNAL 5 -#define LED_ASSERTION 6 -#define LED_PANIC 7 - -#ifdef __cplusplus - } -#endif - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -#endif /* __ARCH_BOARD_BOARD_H */ +/**************************************************************************** + * configs/olimex-lpc2378/include/board.h + * + * Copyright (C) 2010 Rommel Marcelo. All rights reserved. + * Author: Rommel Marcelo + * + * This is part of the NuttX RTOS and based on the LPC2148 port: + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __ARCH_BOARD_BOARD_H +#define __ARCH_BOARD_BOARD_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* If USB is enabled, PLL must be configured for 48MHz to provide USB clocking */ +//-- F_pll = (2 * M * F_in)/N +//-- F_out = ((2 * (PLL_M + 1 ) * FOSC)/(0+1))/(CCLK_DIV+1) = 288/5 = 57 600 000 Hz +//~ #ifdef CONFIG_USBDEV + //~ # define FOSC (12000000) /* Oscillator frequency */ + //~ # define CCLK (57600000) /* CPU running clock */ + //~ # define FCCO (288000000) /* CPU CCO clock */ +//~ #else + # define FOSC (12000000) /* Oscillator frequency */ + # define CCLK (57600000) /* CPU running clock */ + # define FCCO (288000000) /* CPU CCO clock */ + //~ # define CCLK (72000000) /* CPU running clock */ + //~ # define FCCO (360000000) /* CPU CCO clock */ +//~ #endif + +//~#define PLL_M ( (FCCO / (2 * FOSC))-1 ) +//~ #define PLL_N ( ((2 * PLL_M * FOSC) / FCCO)-1 ) +#define PLL_M 11 +#define PLL_N 0 + +#define CCLK_DIV 4 +#define USBCLK_DIV 6 + + /* LED definitions **********************************************************/ + +#define LED_STARTED 0 +#define LED_HEAPALLOCATE 1 +#define LED_IRQSENABLED 2 +#define LED_STACKCREATED 3 +#define LED_INIRQ 4 +#define LED_SIGNAL 5 +#define LED_ASSERTION 6 +#define LED_PANIC 7 + +#ifdef __cplusplus + } +#endif + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +#endif /* __ARCH_BOARD_BOARD_H */ diff --git a/nuttx/configs/olimex-lpc2378/nsh/Make.defs b/nuttx/configs/olimex-lpc2378/nsh/Make.defs index 956c7a1027..c970a93d16 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/Make.defs +++ b/nuttx/configs/olimex-lpc2378/nsh/Make.defs @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index a9ce391b34..98cd2b5fe1 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/nsh/ld.script b/nuttx/configs/olimex-lpc2378/nsh/ld.script index cf8ba46bd6..d591fcd663 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/ld.script +++ b/nuttx/configs/olimex-lpc2378/nsh/ld.script @@ -7,7 +7,7 @@ * This is part of the NuttX RTOS and based on the LPC2148 port: * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/nsh/setenv.sh b/nuttx/configs/olimex-lpc2378/nsh/setenv.sh index 90871fd623..9a2e92e432 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/setenv.sh +++ b/nuttx/configs/olimex-lpc2378/nsh/setenv.sh @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/ostest/Make.defs b/nuttx/configs/olimex-lpc2378/ostest/Make.defs index 4e1aa9d0de..ea41929083 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/Make.defs +++ b/nuttx/configs/olimex-lpc2378/ostest/Make.defs @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/ostest/appconfig b/nuttx/configs/olimex-lpc2378/ostest/appconfig index 2669ab4325..e745291161 100644 --- a/nuttx/configs/olimex-lpc2378/ostest/appconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-lpc2378/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index d1a4c83d68..df6c0e1cb0 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/ostest/ld.script b/nuttx/configs/olimex-lpc2378/ostest/ld.script index 74c798b57f..e9ffbb4508 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/ld.script +++ b/nuttx/configs/olimex-lpc2378/ostest/ld.script @@ -7,7 +7,7 @@ * This is part of the NuttX RTOS and based on the LPC2148 port: * * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/ostest/setenv.sh b/nuttx/configs/olimex-lpc2378/ostest/setenv.sh index c55ede833e..73bf3d2239 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/setenv.sh +++ b/nuttx/configs/olimex-lpc2378/ostest/setenv.sh @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/src/Makefile b/nuttx/configs/olimex-lpc2378/src/Makefile index 1319a49155..a9fa9fc70f 100644 --- a/nuttx/configs/olimex-lpc2378/src/Makefile +++ b/nuttx/configs/olimex-lpc2378/src/Makefile @@ -7,7 +7,7 @@ # This is part of the NuttX RTOS and based on the LPC2148 port: # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/src/up_leds.c b/nuttx/configs/olimex-lpc2378/src/up_leds.c index e360eb5cd1..a5bb955f51 100644 --- a/nuttx/configs/olimex-lpc2378/src/up_leds.c +++ b/nuttx/configs/olimex-lpc2378/src/up_leds.c @@ -7,7 +7,7 @@ * This is part of the NuttX RTOS and based on the LPC2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-lpc2378/src/up_nsh.c b/nuttx/configs/olimex-lpc2378/src/up_nsh.c index 9e3a0f6951..6279a7668f 100644 --- a/nuttx/configs/olimex-lpc2378/src/up_nsh.c +++ b/nuttx/configs/olimex-lpc2378/src/up_nsh.c @@ -8,7 +8,7 @@ * This is part of the NuttX RTOS and based on the LPC2148 port: * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-stm32-p107/nsh/appconfig b/nuttx/configs/olimex-stm32-p107/nsh/appconfig index 56daadc529..99e845ffbd 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/appconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/appconfig @@ -2,7 +2,7 @@ # configs/olimex-stm32-p107/nsh/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-stm32-p107/nsh/setenv.sh b/nuttx/configs/olimex-stm32-p107/nsh/setenv.sh index 6884313cda..004f025b8f 100755 --- a/nuttx/configs/olimex-stm32-p107/nsh/setenv.sh +++ b/nuttx/configs/olimex-stm32-p107/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-stm32-p107/nsh/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-stm32-p107/ostest/appconfig b/nuttx/configs/olimex-stm32-p107/ostest/appconfig index 18d8040abe..fca902395e 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/appconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-stm32-p107/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-stm32-p107/ostest/setenv.sh b/nuttx/configs/olimex-stm32-p107/ostest/setenv.sh index 009c5ce22f..fe40c0bc19 100755 --- a/nuttx/configs/olimex-stm32-p107/ostest/setenv.sh +++ b/nuttx/configs/olimex-stm32-p107/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-stm32-p107/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/include/board.h b/nuttx/configs/olimex-strp711/include/board.h index 1d4b503c4b..1a68ec7413 100644 --- a/nuttx/configs/olimex-strp711/include/board.h +++ b/nuttx/configs/olimex-strp711/include/board.h @@ -2,7 +2,7 @@ * configs/olimex-strp711/include/board.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nettest/Make.defs b/nuttx/configs/olimex-strp711/nettest/Make.defs index 6e6680dff0..f160c16f70 100755 --- a/nuttx/configs/olimex-strp711/nettest/Make.defs +++ b/nuttx/configs/olimex-strp711/nettest/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-strp711/nettest/Make.defs # # Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nettest/appconfig b/nuttx/configs/olimex-strp711/nettest/appconfig index 68aa1f56b1..bbe7abc022 100644 --- a/nuttx/configs/olimex-strp711/nettest/appconfig +++ b/nuttx/configs/olimex-strp711/nettest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-strp711/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nettest/ld.script b/nuttx/configs/olimex-strp711/nettest/ld.script index 4d91c5c751..b3b5c6ff87 100755 --- a/nuttx/configs/olimex-strp711/nettest/ld.script +++ b/nuttx/configs/olimex-strp711/nettest/ld.script @@ -2,7 +2,7 @@ * configs/olimex-strp711/nettest/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nettest/setenv.sh b/nuttx/configs/olimex-strp711/nettest/setenv.sh index 419731319b..bc47c3ed8a 100755 --- a/nuttx/configs/olimex-strp711/nettest/setenv.sh +++ b/nuttx/configs/olimex-strp711/nettest/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-strp711/nettest/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nsh/Make.defs b/nuttx/configs/olimex-strp711/nsh/Make.defs index 8dd122bcbe..229da6bff3 100644 --- a/nuttx/configs/olimex-strp711/nsh/Make.defs +++ b/nuttx/configs/olimex-strp711/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-strp711/nsh/Make.defs # # Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index a5eda6d013..985e3690ee 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -2,7 +2,7 @@ # configs/olimes-strp711/nsh/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nsh/ld.script b/nuttx/configs/olimex-strp711/nsh/ld.script index a4ee85eabe..7a95410f47 100644 --- a/nuttx/configs/olimex-strp711/nsh/ld.script +++ b/nuttx/configs/olimex-strp711/nsh/ld.script @@ -2,7 +2,7 @@ * configs/olimex-strp711/nsh/ld.script * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/nsh/setenv.sh b/nuttx/configs/olimex-strp711/nsh/setenv.sh index 42fef8da64..6724741f69 100755 --- a/nuttx/configs/olimex-strp711/nsh/setenv.sh +++ b/nuttx/configs/olimex-strp711/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-strp711/nsh/setenv.sh # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/ostest/Make.defs b/nuttx/configs/olimex-strp711/ostest/Make.defs index f126151b15..6c56329504 100644 --- a/nuttx/configs/olimex-strp711/ostest/Make.defs +++ b/nuttx/configs/olimex-strp711/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/olimex-strp711/ostest/Make.defs # # Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/ostest/appconfig b/nuttx/configs/olimex-strp711/ostest/appconfig index 52724f1cfe..4220143041 100644 --- a/nuttx/configs/olimex-strp711/ostest/appconfig +++ b/nuttx/configs/olimex-strp711/ostest/appconfig @@ -2,7 +2,7 @@ # configs/olimex-strp711/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index 87ce49749a..cdac22b9f6 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -2,7 +2,7 @@ # configs/olimes-strp711/ostest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/ostest/ld.script b/nuttx/configs/olimex-strp711/ostest/ld.script index 017d8f4dd5..9a5c457453 100644 --- a/nuttx/configs/olimex-strp711/ostest/ld.script +++ b/nuttx/configs/olimex-strp711/ostest/ld.script @@ -2,7 +2,7 @@ * configs/olimex-strp711/ostest/ld.script * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/ostest/setenv.sh b/nuttx/configs/olimex-strp711/ostest/setenv.sh index 726ef404db..c9454d26f6 100755 --- a/nuttx/configs/olimex-strp711/ostest/setenv.sh +++ b/nuttx/configs/olimex-strp711/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/olimex-strp711/ostest/setenv.sh # # Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/src/up_buttons.c b/nuttx/configs/olimex-strp711/src/up_buttons.c index 1a10fd4002..e8737954cc 100644 --- a/nuttx/configs/olimex-strp711/src/up_buttons.c +++ b/nuttx/configs/olimex-strp711/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/olimex-strp711/src/up_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/src/up_leds.c b/nuttx/configs/olimex-strp711/src/up_leds.c index 08b6cbb6fb..2d099f6bc6 100644 --- a/nuttx/configs/olimex-strp711/src/up_leds.c +++ b/nuttx/configs/olimex-strp711/src/up_leds.c @@ -2,7 +2,7 @@ * configs/olimex-strp711/src/up_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/olimex-strp711/src/up_nsh.c b/nuttx/configs/olimex-strp711/src/up_nsh.c index 249898933b..21c3efb83e 100644 --- a/nuttx/configs/olimex-strp711/src/up_nsh.c +++ b/nuttx/configs/olimex-strp711/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/Make.defs b/nuttx/configs/pcblogic-pic32mx/nsh/Make.defs index e6362ee874..ffefef7ff6 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/Make.defs +++ b/nuttx/configs/pcblogic-pic32mx/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/pcblogic-pic32mx/nsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/ld.script b/nuttx/configs/pcblogic-pic32mx/nsh/ld.script index 4d3b71b285..ff1618acfb 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/ld.script +++ b/nuttx/configs/pcblogic-pic32mx/nsh/ld.script @@ -2,7 +2,7 @@ * configs/pcblogic-pic32mx/nsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/Make.defs b/nuttx/configs/pcblogic-pic32mx/ostest/Make.defs index 488e7d4de7..639466f22b 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/Make.defs +++ b/nuttx/configs/pcblogic-pic32mx/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/pcblogic-pic32mx/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/appconfig b/nuttx/configs/pcblogic-pic32mx/ostest/appconfig index 048de1768c..fc81262497 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/appconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/appconfig @@ -2,7 +2,7 @@ # configs/pcblogic-pic32mx/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/ld.script b/nuttx/configs/pcblogic-pic32mx/ostest/ld.script index ff4015be16..dd181b4d98 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/ld.script +++ b/nuttx/configs/pcblogic-pic32mx/ostest/ld.script @@ -2,7 +2,7 @@ * configs/pcblogic-pic32mx/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/src/Makefile b/nuttx/configs/pcblogic-pic32mx/src/Makefile index 42301c59cb..9ca5c4f57d 100644 --- a/nuttx/configs/pcblogic-pic32mx/src/Makefile +++ b/nuttx/configs/pcblogic-pic32mx/src/Makefile @@ -2,7 +2,7 @@ # configs/pcblogic-pic32mx/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/src/pcblogic-internal.h b/nuttx/configs/pcblogic-pic32mx/src/pcblogic-internal.h index f01ec46ee9..2e0963e269 100644 --- a/nuttx/configs/pcblogic-pic32mx/src/pcblogic-internal.h +++ b/nuttx/configs/pcblogic-pic32mx/src/pcblogic-internal.h @@ -2,7 +2,7 @@ * configs/pcblogic-pic32mx/src/pcblogic-internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pcblogic-pic32mx/src/up_boot.c b/nuttx/configs/pcblogic-pic32mx/src/up_boot.c index a377d79ad6..2c9634fc06 100644 --- a/nuttx/configs/pcblogic-pic32mx/src/up_boot.c +++ b/nuttx/configs/pcblogic-pic32mx/src/up_boot.c @@ -3,7 +3,7 @@ * arch/mips/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/appconfig b/nuttx/configs/pjrc-8051/appconfig index d88edca753..7beb0d6910 100644 --- a/nuttx/configs/pjrc-8051/appconfig +++ b/nuttx/configs/pjrc-8051/appconfig @@ -2,7 +2,7 @@ # configs/pjrc-8051/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/include/board.h b/nuttx/configs/pjrc-8051/include/board.h index fe036da8c3..9f518f81ee 100644 --- a/nuttx/configs/pjrc-8051/include/board.h +++ b/nuttx/configs/pjrc-8051/include/board.h @@ -2,7 +2,7 @@ * board/board.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/include/pjrc.h b/nuttx/configs/pjrc-8051/include/pjrc.h index 50dfe01f2c..9d0d9482a1 100644 --- a/nuttx/configs/pjrc-8051/include/pjrc.h +++ b/nuttx/configs/pjrc-8051/include/pjrc.h @@ -2,7 +2,7 @@ * pjrc.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/setenv.sh b/nuttx/configs/pjrc-8051/setenv.sh index 35f5fffede..d71c234ba2 100755 --- a/nuttx/configs/pjrc-8051/setenv.sh +++ b/nuttx/configs/pjrc-8051/setenv.sh @@ -2,7 +2,7 @@ # pjrc-8051/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/src/Makefile b/nuttx/configs/pjrc-8051/src/Makefile index d6af2a6fe7..7783ad1fbc 100644 --- a/nuttx/configs/pjrc-8051/src/Makefile +++ b/nuttx/configs/pjrc-8051/src/Makefile @@ -2,7 +2,7 @@ # configs/pjrc-8051/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/pjrc-8051/src/up_leds.c b/nuttx/configs/pjrc-8051/src/up_leds.c index 5ac842d1e7..64446b5e39 100644 --- a/nuttx/configs/pjrc-8051/src/up_leds.c +++ b/nuttx/configs/pjrc-8051/src/up_leds.c @@ -2,7 +2,7 @@ * up_leds.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/include/board.h b/nuttx/configs/qemu-i486/include/board.h index 31ae72dc4d..4dcd9d7a8b 100755 --- a/nuttx/configs/qemu-i486/include/board.h +++ b/nuttx/configs/qemu-i486/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/nsh/Make.defs b/nuttx/configs/qemu-i486/nsh/Make.defs index 043c072bea..398c11496f 100644 --- a/nuttx/configs/qemu-i486/nsh/Make.defs +++ b/nuttx/configs/qemu-i486/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/qemu-i486/nsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index 8fb1fff89f..72e97539a3 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -2,7 +2,7 @@ # configs/qemu-i486/nsh/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/nsh/ld.script b/nuttx/configs/qemu-i486/nsh/ld.script index d0abd245db..3fffc84592 100755 --- a/nuttx/configs/qemu-i486/nsh/ld.script +++ b/nuttx/configs/qemu-i486/nsh/ld.script @@ -2,7 +2,7 @@ * configs/qemu-i486/nsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/nsh/setenv.sh b/nuttx/configs/qemu-i486/nsh/setenv.sh index de427d2b66..25ae59d71b 100755 --- a/nuttx/configs/qemu-i486/nsh/setenv.sh +++ b/nuttx/configs/qemu-i486/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/qemu-i486/nsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/ostest/Make.defs b/nuttx/configs/qemu-i486/ostest/Make.defs index 1221a83d47..1bd0b63d64 100644 --- a/nuttx/configs/qemu-i486/ostest/Make.defs +++ b/nuttx/configs/qemu-i486/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/qemu-i486/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/ostest/appconfig b/nuttx/configs/qemu-i486/ostest/appconfig index 73b5540a09..c78f650b27 100644 --- a/nuttx/configs/qemu-i486/ostest/appconfig +++ b/nuttx/configs/qemu-i486/ostest/appconfig @@ -2,7 +2,7 @@ # configs/qemu-i486/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig index 0fa5f5cb6d..3f87e11cd8 100644 --- a/nuttx/configs/qemu-i486/ostest/defconfig +++ b/nuttx/configs/qemu-i486/ostest/defconfig @@ -2,7 +2,7 @@ # configs/qemu-i486/ostest/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/ostest/ld.script b/nuttx/configs/qemu-i486/ostest/ld.script index 5b3053f56c..d597710783 100755 --- a/nuttx/configs/qemu-i486/ostest/ld.script +++ b/nuttx/configs/qemu-i486/ostest/ld.script @@ -2,7 +2,7 @@ * configs/qemu-i486/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/ostest/setenv.sh b/nuttx/configs/qemu-i486/ostest/setenv.sh index 50ace04dde..f9c3bdec8d 100755 --- a/nuttx/configs/qemu-i486/ostest/setenv.sh +++ b/nuttx/configs/qemu-i486/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/qemu-i486/ostest/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/src/Makefile b/nuttx/configs/qemu-i486/src/Makefile index 0271a6be5d..287e4e7285 100644 --- a/nuttx/configs/qemu-i486/src/Makefile +++ b/nuttx/configs/qemu-i486/src/Makefile @@ -2,7 +2,7 @@ # configs/qemu-i486/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/qemu-i486/src/qemui486_internal.h b/nuttx/configs/qemu-i486/src/qemui486_internal.h index b6a2fea487..6a0466149b 100644 --- a/nuttx/configs/qemu-i486/src/qemui486_internal.h +++ b/nuttx/configs/qemu-i486/src/qemui486_internal.h @@ -1,69 +1,69 @@ -/************************************************************************************ - * configs/qemu-i486/src/qemui486_internal.h - * arch/x86/src/board/qemui486_internal.n - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H -#define _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/* GPIO Pin Definitions *************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public data - ************************************************************************************/ - -#ifndef __ASSEMBLY__ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -#endif /* __ASSEMBLY__ */ -#endif /* _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H */ - +/************************************************************************************ + * configs/qemu-i486/src/qemui486_internal.h + * arch/x86/src/board/qemui486_internal.n + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H +#define _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/* GPIO Pin Definitions *************************************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ASSEMBLY__ */ +#endif /* _CONFIGS_QEMU_I486_SRC_QEMUI486_INTERNAL_H */ + diff --git a/nuttx/configs/qemu-i486/src/up_boot.c b/nuttx/configs/qemu-i486/src/up_boot.c index a3081bdf77..bd76469921 100644 --- a/nuttx/configs/qemu-i486/src/up_boot.c +++ b/nuttx/configs/qemu-i486/src/up_boot.c @@ -1,82 +1,82 @@ -/************************************************************************************ - * configs/qemu-i486/src/up_boot.c - * arch/x86/src/board/up_boot.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include - -#include - -#include "up_arch.h" -#include "up_internal.h" - -#include "qemu_internal.h" -#include "qemui486_internal.h" - -/************************************************************************************ - * Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: up_boardinitialize - * - * Description: - * All x86 architectures must provide the following entry point. This entry point - * is called early in the intitialization -- after all memory has been configured - * and mapped but before any devices have been initialized. - * - ************************************************************************************/ - -void up_boardinitialize(void) -{ - /* Configure on-board LEDs if LED support has been selected. */ - -#ifdef CONFIG_ARCH_LEDS - up_ledinit(); -#endif -} +/************************************************************************************ + * configs/qemu-i486/src/up_boot.c + * arch/x86/src/board/up_boot.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" +#include "up_internal.h" + +#include "qemu_internal.h" +#include "qemui486_internal.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: up_boardinitialize + * + * Description: + * All x86 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void up_boardinitialize(void) +{ + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + up_ledinit(); +#endif +} diff --git a/nuttx/configs/rgmp/arm/default/Make.defs b/nuttx/configs/rgmp/arm/default/Make.defs index 981872363c..fdb39e6d61 100644 --- a/nuttx/configs/rgmp/arm/default/Make.defs +++ b/nuttx/configs/rgmp/arm/default/Make.defs @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/default/appconfig b/nuttx/configs/rgmp/arm/default/appconfig index e1397db204..c57f8696b4 100644 --- a/nuttx/configs/rgmp/arm/default/appconfig +++ b/nuttx/configs/rgmp/arm/default/appconfig @@ -2,7 +2,7 @@ # configs/sim/default/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/default/defconfig b/nuttx/configs/rgmp/arm/default/defconfig index a44a750562..d722dd5e77 100644 --- a/nuttx/configs/rgmp/arm/default/defconfig +++ b/nuttx/configs/rgmp/arm/default/defconfig @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/default/setenv.sh b/nuttx/configs/rgmp/arm/default/setenv.sh index a6a533e477..bfb02549bd 100644 --- a/nuttx/configs/rgmp/arm/default/setenv.sh +++ b/nuttx/configs/rgmp/arm/default/setenv.sh @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/nsh/Make.defs b/nuttx/configs/rgmp/arm/nsh/Make.defs index 8ee0aad634..3e97c6153c 100644 --- a/nuttx/configs/rgmp/arm/nsh/Make.defs +++ b/nuttx/configs/rgmp/arm/nsh/Make.defs @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/nsh/appconfig b/nuttx/configs/rgmp/arm/nsh/appconfig index e5220a258e..b5e5d0203f 100644 --- a/nuttx/configs/rgmp/arm/nsh/appconfig +++ b/nuttx/configs/rgmp/arm/nsh/appconfig @@ -2,7 +2,7 @@ # configs/rgmp/nsh/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/nsh/defconfig b/nuttx/configs/rgmp/arm/nsh/defconfig index 23d2f43167..279437d477 100644 --- a/nuttx/configs/rgmp/arm/nsh/defconfig +++ b/nuttx/configs/rgmp/arm/nsh/defconfig @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/arm/nsh/setenv.sh b/nuttx/configs/rgmp/arm/nsh/setenv.sh index 6caf8de84b..b2180473be 100644 --- a/nuttx/configs/rgmp/arm/nsh/setenv.sh +++ b/nuttx/configs/rgmp/arm/nsh/setenv.sh @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/default/Make.defs b/nuttx/configs/rgmp/x86/default/Make.defs index 9f970a1980..e69ed70785 100644 --- a/nuttx/configs/rgmp/x86/default/Make.defs +++ b/nuttx/configs/rgmp/x86/default/Make.defs @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/default/appconfig b/nuttx/configs/rgmp/x86/default/appconfig index e1397db204..c57f8696b4 100644 --- a/nuttx/configs/rgmp/x86/default/appconfig +++ b/nuttx/configs/rgmp/x86/default/appconfig @@ -2,7 +2,7 @@ # configs/sim/default/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/default/defconfig b/nuttx/configs/rgmp/x86/default/defconfig index 6ecf662a90..4e37d90922 100644 --- a/nuttx/configs/rgmp/x86/default/defconfig +++ b/nuttx/configs/rgmp/x86/default/defconfig @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/default/setenv.sh b/nuttx/configs/rgmp/x86/default/setenv.sh index a6a533e477..bfb02549bd 100644 --- a/nuttx/configs/rgmp/x86/default/setenv.sh +++ b/nuttx/configs/rgmp/x86/default/setenv.sh @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/nsh/Make.defs b/nuttx/configs/rgmp/x86/nsh/Make.defs index 22ad89da98..8d1bde092f 100644 --- a/nuttx/configs/rgmp/x86/nsh/Make.defs +++ b/nuttx/configs/rgmp/x86/nsh/Make.defs @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/nsh/appconfig b/nuttx/configs/rgmp/x86/nsh/appconfig index e5220a258e..b5e5d0203f 100644 --- a/nuttx/configs/rgmp/x86/nsh/appconfig +++ b/nuttx/configs/rgmp/x86/nsh/appconfig @@ -2,7 +2,7 @@ # configs/rgmp/nsh/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/nsh/defconfig b/nuttx/configs/rgmp/x86/nsh/defconfig index 9c10ec9204..363ef609da 100644 --- a/nuttx/configs/rgmp/x86/nsh/defconfig +++ b/nuttx/configs/rgmp/x86/nsh/defconfig @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/rgmp/x86/nsh/setenv.sh b/nuttx/configs/rgmp/x86/nsh/setenv.sh index 6caf8de84b..b2180473be 100644 --- a/nuttx/configs/rgmp/x86/nsh/setenv.sh +++ b/nuttx/configs/rgmp/x86/nsh/setenv.sh @@ -4,7 +4,7 @@ # Copyright (C) 2011 Yu Qiang. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved. # Authors: Yu Qiang -# Gregory Nutt +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/kernel/Makefile b/nuttx/configs/sam3u-ek/kernel/Makefile index 64b53f2f05..24934c4794 100755 --- a/nuttx/configs/sam3u-ek/kernel/Makefile +++ b/nuttx/configs/sam3u-ek/kernel/Makefile @@ -2,7 +2,7 @@ # configs/sam3u-ek/kernel/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/kernel/kernel.ld b/nuttx/configs/sam3u-ek/kernel/kernel.ld index 8b0ea0244c..9388bf88c2 100644 --- a/nuttx/configs/sam3u-ek/kernel/kernel.ld +++ b/nuttx/configs/sam3u-ek/kernel/kernel.ld @@ -2,7 +2,7 @@ * configs/sam3u-ek/kernal/kernel.ld * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/knsh/Make.defs b/nuttx/configs/sam3u-ek/knsh/Make.defs index 16a292c295..313d15b520 100755 --- a/nuttx/configs/sam3u-ek/knsh/Make.defs +++ b/nuttx/configs/sam3u-ek/knsh/Make.defs @@ -2,7 +2,7 @@ # configs/sam3u-ek/knsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 6110732e4d..06b93cc13c 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/knsh/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/knsh/ld.script b/nuttx/configs/sam3u-ek/knsh/ld.script index c3a31090c2..34c4fbb322 100755 --- a/nuttx/configs/sam3u-ek/knsh/ld.script +++ b/nuttx/configs/sam3u-ek/knsh/ld.script @@ -2,7 +2,7 @@ * configs/sam3u-ek/knsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/knsh/setenv.sh b/nuttx/configs/sam3u-ek/knsh/setenv.sh index 14969737d0..3b27c3d9f9 100755 --- a/nuttx/configs/sam3u-ek/knsh/setenv.sh +++ b/nuttx/configs/sam3u-ek/knsh/setenv.sh @@ -2,7 +2,7 @@ # configs/sam3u-ek/knsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nsh/Make.defs b/nuttx/configs/sam3u-ek/nsh/Make.defs index 467e8298f4..ad48c1d828 100755 --- a/nuttx/configs/sam3u-ek/nsh/Make.defs +++ b/nuttx/configs/sam3u-ek/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/sam3u-ek/nsh/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index ba5b78b48b..a336861f58 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/nsh/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nsh/ld.script b/nuttx/configs/sam3u-ek/nsh/ld.script index 72aa4de3e7..94ae474033 100755 --- a/nuttx/configs/sam3u-ek/nsh/ld.script +++ b/nuttx/configs/sam3u-ek/nsh/ld.script @@ -2,7 +2,7 @@ * configs/sam3u-ek/nsh/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nsh/setenv.sh b/nuttx/configs/sam3u-ek/nsh/setenv.sh index d9f9e136e4..3f4e60221c 100755 --- a/nuttx/configs/sam3u-ek/nsh/setenv.sh +++ b/nuttx/configs/sam3u-ek/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/sam3u-ek/nsh/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nx/Make.defs b/nuttx/configs/sam3u-ek/nx/Make.defs index a4eb888759..119e4d321b 100755 --- a/nuttx/configs/sam3u-ek/nx/Make.defs +++ b/nuttx/configs/sam3u-ek/nx/Make.defs @@ -2,7 +2,7 @@ # configs/sam3u-ek/nx/Make.defs # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nx/appconfig b/nuttx/configs/sam3u-ek/nx/appconfig index 8c5e733743..a5ea3cccc4 100644 --- a/nuttx/configs/sam3u-ek/nx/appconfig +++ b/nuttx/configs/sam3u-ek/nx/appconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/nx/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 377d3ce1d9..5bf51a0fbb 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/nx/defconfig # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nx/ld.script b/nuttx/configs/sam3u-ek/nx/ld.script index 8d2c39cdb2..56ae5d6a4e 100755 --- a/nuttx/configs/sam3u-ek/nx/ld.script +++ b/nuttx/configs/sam3u-ek/nx/ld.script @@ -2,7 +2,7 @@ * configs/sam3u-ek/nx/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/nx/setenv.sh b/nuttx/configs/sam3u-ek/nx/setenv.sh index 28c6f48666..a7e9efc843 100755 --- a/nuttx/configs/sam3u-ek/nx/setenv.sh +++ b/nuttx/configs/sam3u-ek/nx/setenv.sh @@ -2,7 +2,7 @@ # configs/sam3u-ek/nx/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/ostest/Make.defs b/nuttx/configs/sam3u-ek/ostest/Make.defs index dc8bfca283..79ff50e140 100755 --- a/nuttx/configs/sam3u-ek/ostest/Make.defs +++ b/nuttx/configs/sam3u-ek/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/sam3u-ek/ostest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/ostest/appconfig b/nuttx/configs/sam3u-ek/ostest/appconfig index b46e563e57..687a5c13fc 100644 --- a/nuttx/configs/sam3u-ek/ostest/appconfig +++ b/nuttx/configs/sam3u-ek/ostest/appconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index a18c10ec23..2757531f02 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -2,7 +2,7 @@ # configs/sam3u-ek/ostest/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/ostest/ld.script b/nuttx/configs/sam3u-ek/ostest/ld.script index b447ef89f8..70fd611e74 100755 --- a/nuttx/configs/sam3u-ek/ostest/ld.script +++ b/nuttx/configs/sam3u-ek/ostest/ld.script @@ -2,7 +2,7 @@ * configs/sam3u-ek/ostest/ld.script * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/ostest/setenv.sh b/nuttx/configs/sam3u-ek/ostest/setenv.sh index 8a13a10c23..06d5eb5473 100755 --- a/nuttx/configs/sam3u-ek/ostest/setenv.sh +++ b/nuttx/configs/sam3u-ek/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/sam3u-ek/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/Makefile b/nuttx/configs/sam3u-ek/src/Makefile index 61826cc4a2..193be03d02 100644 --- a/nuttx/configs/sam3u-ek/src/Makefile +++ b/nuttx/configs/sam3u-ek/src/Makefile @@ -2,7 +2,7 @@ # configs/sam3u-ek/src/Makefile # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_buttons.c b/nuttx/configs/sam3u-ek/src/up_buttons.c index f56a685f80..a4b8e0fd7b 100644 --- a/nuttx/configs/sam3u-ek/src/up_buttons.c +++ b/nuttx/configs/sam3u-ek/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_leds.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c index 22cbeca88d..de897ab9f8 100644 --- a/nuttx/configs/sam3u-ek/src/up_lcd.c +++ b/nuttx/configs/sam3u-ek/src/up_lcd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_lcd.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_leds.c b/nuttx/configs/sam3u-ek/src/up_leds.c index c75896a364..28a2cead54 100644 --- a/nuttx/configs/sam3u-ek/src/up_leds.c +++ b/nuttx/configs/sam3u-ek/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_mmcsd.c b/nuttx/configs/sam3u-ek/src/up_mmcsd.c index 2f19c9cede..bfa4ce4a75 100644 --- a/nuttx/configs/sam3u-ek/src/up_mmcsd.c +++ b/nuttx/configs/sam3u-ek/src/up_mmcsd.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_mmcsd.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_nsh.c b/nuttx/configs/sam3u-ek/src/up_nsh.c index 5c8bf022d0..e8c0df87be 100644 --- a/nuttx/configs/sam3u-ek/src/up_nsh.c +++ b/nuttx/configs/sam3u-ek/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_usbdev.c b/nuttx/configs/sam3u-ek/src/up_usbdev.c index 9d97d65b55..0fc4a61ec4 100644 --- a/nuttx/configs/sam3u-ek/src/up_usbdev.c +++ b/nuttx/configs/sam3u-ek/src/up_usbdev.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_usbdev.c * * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/src/up_usbmsc.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c index 8f2e4b254d..7e04ee04a9 100644 --- a/nuttx/configs/sam3u-ek/src/up_usbmsc.c +++ b/nuttx/configs/sam3u-ek/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_usbmsc.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the SAM3U MMC/SD SDIO block driver. * diff --git a/nuttx/configs/sam3u-ek/touchscreen/Make.defs b/nuttx/configs/sam3u-ek/touchscreen/Make.defs index 07ba9085d6..aa1277da43 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/Make.defs +++ b/nuttx/configs/sam3u-ek/touchscreen/Make.defs @@ -2,7 +2,7 @@ # configs/sam3u-ek/touchscreen/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/touchscreen/ld.script b/nuttx/configs/sam3u-ek/touchscreen/ld.script index 91b0e4b314..dd30648a28 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/ld.script +++ b/nuttx/configs/sam3u-ek/touchscreen/ld.script @@ -2,7 +2,7 @@ * configs/sam3u-ek/touchscreen/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sam3u-ek/touchscreen/setenv.sh b/nuttx/configs/sam3u-ek/touchscreen/setenv.sh index 59ffbe6edc..d5af12280f 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/setenv.sh +++ b/nuttx/configs/sam3u-ek/touchscreen/setenv.sh @@ -2,7 +2,7 @@ # configs/sam3u-ek/toolchain/setenv.sh # # Copyright (C) 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/mount/appconfig b/nuttx/configs/sim/mount/appconfig index 47fb2cabc8..ca9cf3df44 100644 --- a/nuttx/configs/sim/mount/appconfig +++ b/nuttx/configs/sim/mount/appconfig @@ -2,7 +2,7 @@ # configs/sim/mount/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig index 3871fe3306..f5d28054fc 100644 --- a/nuttx/configs/sim/mount/defconfig +++ b/nuttx/configs/sim/mount/defconfig @@ -2,7 +2,7 @@ # sim/mount/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/mount/setenv.sh b/nuttx/configs/sim/mount/setenv.sh index cb28f8df79..318e1628e5 100755 --- a/nuttx/configs/sim/mount/setenv.sh +++ b/nuttx/configs/sim/mount/setenv.sh @@ -2,7 +2,7 @@ # sim/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nettest/appconfig b/nuttx/configs/sim/nettest/appconfig index a123273d77..ce5961c146 100644 --- a/nuttx/configs/sim/nettest/appconfig +++ b/nuttx/configs/sim/nettest/appconfig @@ -2,7 +2,7 @@ # configs/sim/nettest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig index 5965f02d82..83de44c368 100644 --- a/nuttx/configs/sim/nettest/defconfig +++ b/nuttx/configs/sim/nettest/defconfig @@ -2,7 +2,7 @@ # configs/sim/nettest/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nettest/setenv.sh b/nuttx/configs/sim/nettest/setenv.sh index 9b3df2015b..273e418ee1 100755 --- a/nuttx/configs/sim/nettest/setenv.sh +++ b/nuttx/configs/sim/nettest/setenv.sh @@ -2,7 +2,7 @@ # sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nsh/setenv.sh b/nuttx/configs/sim/nsh/setenv.sh index 006beb5e22..c629c5a1ec 100755 --- a/nuttx/configs/sim/nsh/setenv.sh +++ b/nuttx/configs/sim/nsh/setenv.sh @@ -2,7 +2,7 @@ # sim/nsh/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nx/setenv.sh b/nuttx/configs/sim/nx/setenv.sh index 6a5a7e6c09..764d2a8be7 100755 --- a/nuttx/configs/sim/nx/setenv.sh +++ b/nuttx/configs/sim/nx/setenv.sh @@ -2,7 +2,7 @@ # sim/nx/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nx11/setenv.sh b/nuttx/configs/sim/nx11/setenv.sh index dd51ecec25..a9371a9d23 100755 --- a/nuttx/configs/sim/nx11/setenv.sh +++ b/nuttx/configs/sim/nx11/setenv.sh @@ -2,7 +2,7 @@ # sim/nx11/setenv.sh # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nxffs/appconfig b/nuttx/configs/sim/nxffs/appconfig index 8170a0edd8..6eb93ac775 100644 --- a/nuttx/configs/sim/nxffs/appconfig +++ b/nuttx/configs/sim/nxffs/appconfig @@ -2,7 +2,7 @@ # configs/sim/nxffs/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nxffs/defconfig b/nuttx/configs/sim/nxffs/defconfig index 6b40cf3e4c..22746a2f60 100644 --- a/nuttx/configs/sim/nxffs/defconfig +++ b/nuttx/configs/sim/nxffs/defconfig @@ -2,7 +2,7 @@ # configs/sim/nxffs/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/nxffs/setenv.sh b/nuttx/configs/sim/nxffs/setenv.sh index 2733778439..3aa03bc988 100755 --- a/nuttx/configs/sim/nxffs/setenv.sh +++ b/nuttx/configs/sim/nxffs/setenv.sh @@ -2,7 +2,7 @@ # confisgs/sim/nxffs/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/ostest/appconfig b/nuttx/configs/sim/ostest/appconfig index 77707484ea..0827435048 100644 --- a/nuttx/configs/sim/ostest/appconfig +++ b/nuttx/configs/sim/ostest/appconfig @@ -2,7 +2,7 @@ # configs/sim/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 91316af6b9..92c696dc61 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -2,7 +2,7 @@ # configs/sim/ostest/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/ostest/setenv.sh b/nuttx/configs/sim/ostest/setenv.sh index 9b3df2015b..273e418ee1 100755 --- a/nuttx/configs/sim/ostest/setenv.sh +++ b/nuttx/configs/sim/ostest/setenv.sh @@ -2,7 +2,7 @@ # sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/pashello/appconfig b/nuttx/configs/sim/pashello/appconfig index d4adbcce11..85af74b20d 100644 --- a/nuttx/configs/sim/pashello/appconfig +++ b/nuttx/configs/sim/pashello/appconfig @@ -2,7 +2,7 @@ # configs/sim/pashello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig index a5c4a6f45d..57530d3bbc 100644 --- a/nuttx/configs/sim/pashello/defconfig +++ b/nuttx/configs/sim/pashello/defconfig @@ -2,7 +2,7 @@ # configs/sim/pashello/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/pashello/setenv.sh b/nuttx/configs/sim/pashello/setenv.sh index 9b3df2015b..273e418ee1 100755 --- a/nuttx/configs/sim/pashello/setenv.sh +++ b/nuttx/configs/sim/pashello/setenv.sh @@ -2,7 +2,7 @@ # sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/src/Makefile b/nuttx/configs/sim/src/Makefile index 5949427659..69e2ca9e71 100644 --- a/nuttx/configs/sim/src/Makefile +++ b/nuttx/configs/sim/src/Makefile @@ -2,7 +2,7 @@ # configs/sim/src/Makefile # # Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/src/up_touchscreen.c b/nuttx/configs/sim/src/up_touchscreen.c index ef36862884..c951c5c690 100644 --- a/nuttx/configs/sim/src/up_touchscreen.c +++ b/nuttx/configs/sim/src/up_touchscreen.c @@ -2,7 +2,7 @@ * config/sim/src/up_touchscreen.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/touchscreen/appconfig b/nuttx/configs/sim/touchscreen/appconfig index 5dc25b81a5..4bcbabeb43 100644 --- a/nuttx/configs/sim/touchscreen/appconfig +++ b/nuttx/configs/sim/touchscreen/appconfig @@ -2,7 +2,7 @@ # configs/sim/touchscreen/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/touchscreen/defconfig b/nuttx/configs/sim/touchscreen/defconfig index a78bbcc503..b9630c8e2c 100644 --- a/nuttx/configs/sim/touchscreen/defconfig +++ b/nuttx/configs/sim/touchscreen/defconfig @@ -2,7 +2,7 @@ # sim/touchscreen/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sim/touchscreen/setenv.sh b/nuttx/configs/sim/touchscreen/setenv.sh index ffaeb5126d..4cc3bba576 100755 --- a/nuttx/configs/sim/touchscreen/setenv.sh +++ b/nuttx/configs/sim/touchscreen/setenv.sh @@ -2,7 +2,7 @@ # sim/touchscreen/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/include/board.h b/nuttx/configs/skp16c26/include/board.h index 32a08f2ede..cf0a1c15be 100644 --- a/nuttx/configs/skp16c26/include/board.h +++ b/nuttx/configs/skp16c26/include/board.h @@ -3,7 +3,7 @@ * arch/board/board.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/ostest/Make.defs b/nuttx/configs/skp16c26/ostest/Make.defs index 22cee90f63..bad496656c 100644 --- a/nuttx/configs/skp16c26/ostest/Make.defs +++ b/nuttx/configs/skp16c26/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/skp16c26/ostest/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/ostest/appconfig b/nuttx/configs/skp16c26/ostest/appconfig index ad98de5db0..7475e58180 100644 --- a/nuttx/configs/skp16c26/ostest/appconfig +++ b/nuttx/configs/skp16c26/ostest/appconfig @@ -2,7 +2,7 @@ # configs/skp16c26/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig index fc7640ef85..91917f8f08 100644 --- a/nuttx/configs/skp16c26/ostest/defconfig +++ b/nuttx/configs/skp16c26/ostest/defconfig @@ -2,7 +2,7 @@ # configs/skp16c26/ostest/defconfig # # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/ostest/ld.script b/nuttx/configs/skp16c26/ostest/ld.script index f94ae9a27a..8ae1a8697d 100644 --- a/nuttx/configs/skp16c26/ostest/ld.script +++ b/nuttx/configs/skp16c26/ostest/ld.script @@ -2,7 +2,7 @@ * configs/skp16c26/ostest/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/ostest/setenv.sh b/nuttx/configs/skp16c26/ostest/setenv.sh index a6fd82439a..a74258fb84 100755 --- a/nuttx/configs/skp16c26/ostest/setenv.sh +++ b/nuttx/configs/skp16c26/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/skp16c26/ostest/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/src/Makefile b/nuttx/configs/skp16c26/src/Makefile index 5a983a2f70..483c244988 100644 --- a/nuttx/configs/skp16c26/src/Makefile +++ b/nuttx/configs/skp16c26/src/Makefile @@ -2,7 +2,7 @@ # configs/skp16c26/src/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/src/skp16c26_internal.h b/nuttx/configs/skp16c26/src/skp16c26_internal.h index 5d8f235f80..048292048d 100644 --- a/nuttx/configs/skp16c26/src/skp16c26_internal.h +++ b/nuttx/configs/skp16c26/src/skp16c26_internal.h @@ -2,7 +2,7 @@ * configs/skp16c26/src/scp16c26_internal.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/src/up_buttons.c b/nuttx/configs/skp16c26/src/up_buttons.c index 828269a8e9..a483aaeaa4 100644 --- a/nuttx/configs/skp16c26/src/up_buttons.c +++ b/nuttx/configs/skp16c26/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/skp16c26/src/up_buttons.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/src/up_lcd.c b/nuttx/configs/skp16c26/src/up_lcd.c index 197b670844..a47f4af510 100644 --- a/nuttx/configs/skp16c26/src/up_lcd.c +++ b/nuttx/configs/skp16c26/src/up_lcd.c @@ -2,7 +2,7 @@ * configs/scp16c26/src/up_lcd.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/skp16c26/src/up_leds.c b/nuttx/configs/skp16c26/src/up_leds.c index b64b8b7d0e..024d8f143b 100644 --- a/nuttx/configs/skp16c26/src/up_leds.c +++ b/nuttx/configs/skp16c26/src/up_leds.c @@ -2,7 +2,7 @@ * configs/scp16c26/src/up_leds.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sure-pic32mx/ostest/Make.defs b/nuttx/configs/sure-pic32mx/ostest/Make.defs index e0742562db..3a41786e4c 100644 --- a/nuttx/configs/sure-pic32mx/ostest/Make.defs +++ b/nuttx/configs/sure-pic32mx/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/sure-pic32mx/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sure-pic32mx/ostest/appconfig b/nuttx/configs/sure-pic32mx/ostest/appconfig index 2565d3b074..3b96b3d6d6 100644 --- a/nuttx/configs/sure-pic32mx/ostest/appconfig +++ b/nuttx/configs/sure-pic32mx/ostest/appconfig @@ -2,7 +2,7 @@ # configs/sure-pic32mx/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sure-pic32mx/ostest/ld.script b/nuttx/configs/sure-pic32mx/ostest/ld.script index 08bc50df1b..7b5ffa3c4a 100644 --- a/nuttx/configs/sure-pic32mx/ostest/ld.script +++ b/nuttx/configs/sure-pic32mx/ostest/ld.script @@ -2,7 +2,7 @@ * configs/sure-pic32mx/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/sure-pic32mx/src/up_boot.c b/nuttx/configs/sure-pic32mx/src/up_boot.c index fe633abd47..2982cdbf41 100644 --- a/nuttx/configs/sure-pic32mx/src/up_boot.c +++ b/nuttx/configs/sure-pic32mx/src/up_boot.c @@ -3,7 +3,7 @@ * arch/mips/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/hello/appconfig b/nuttx/configs/teensy/hello/appconfig index da49cbd292..c3440d8275 100644 --- a/nuttx/configs/teensy/hello/appconfig +++ b/nuttx/configs/teensy/hello/appconfig @@ -2,7 +2,7 @@ # configs/teensy/hello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index 5441e9005a..29c7194e3a 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -2,7 +2,7 @@ # configs/teensy/hello/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/hello/ld.script b/nuttx/configs/teensy/hello/ld.script index 791e96bfce..2115c848f6 100644 --- a/nuttx/configs/teensy/hello/ld.script +++ b/nuttx/configs/teensy/hello/ld.script @@ -2,7 +2,7 @@ * configs/teensy/hello/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/hello/setenv.sh b/nuttx/configs/teensy/hello/setenv.sh index 35827ca177..d0100778ac 100755 --- a/nuttx/configs/teensy/hello/setenv.sh +++ b/nuttx/configs/teensy/hello/setenv.sh @@ -2,7 +2,7 @@ # configs/teensy/hello/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/include/board.h b/nuttx/configs/teensy/include/board.h index 9e9c1205f1..4fe6911181 100755 --- a/nuttx/configs/teensy/include/board.h +++ b/nuttx/configs/teensy/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/nsh/ld.script b/nuttx/configs/teensy/nsh/ld.script index 272b24ea8f..eaeccd9ef5 100755 --- a/nuttx/configs/teensy/nsh/ld.script +++ b/nuttx/configs/teensy/nsh/ld.script @@ -2,7 +2,7 @@ * configs/teensy/nsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/nsh/setenv.sh b/nuttx/configs/teensy/nsh/setenv.sh index 9d232e53ee..f0c035bba5 100755 --- a/nuttx/configs/teensy/nsh/setenv.sh +++ b/nuttx/configs/teensy/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/teensy/nsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/src/Makefile b/nuttx/configs/teensy/src/Makefile index 36e887b74a..6b68e63bbe 100644 --- a/nuttx/configs/teensy/src/Makefile +++ b/nuttx/configs/teensy/src/Makefile @@ -2,7 +2,7 @@ # configs/teensy/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/src/teensy_internal.h b/nuttx/configs/teensy/src/teensy_internal.h index c593c49ce0..f253b590f8 100644 --- a/nuttx/configs/teensy/src/teensy_internal.h +++ b/nuttx/configs/teensy/src/teensy_internal.h @@ -1,101 +1,101 @@ -/**************************************************************************** - * configs/teensy/src/pcblogic-internal.h - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H -#define __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/************************************************************************************ - * Name: at90usb_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the Teensy++ 2.0 board. - * - ************************************************************************************/ - -#ifdef CONFIG_AVR_SPI -EXTERN void weak_function at90usb_spiinitialize(void); -#endif - -/************************************************************************************ - * Name: at90usb_ledinit - * - * Description: - * Configure on-board LEDs if LED support has been selected. - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_LEDS -EXTERN void at90usb_ledinit(void); -#endif - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H */ +/**************************************************************************** + * configs/teensy/src/pcblogic-internal.h + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H +#define __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Name: at90usb_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the Teensy++ 2.0 board. + * + ************************************************************************************/ + +#ifdef CONFIG_AVR_SPI +EXTERN void weak_function at90usb_spiinitialize(void); +#endif + +/************************************************************************************ + * Name: at90usb_ledinit + * + * Description: + * Configure on-board LEDs if LED support has been selected. + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +EXTERN void at90usb_ledinit(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_TEENSY_SRC_TEENSY_INTERNAL_H */ diff --git a/nuttx/configs/teensy/src/up_boot.c b/nuttx/configs/teensy/src/up_boot.c index ad054c7023..7c88112724 100644 --- a/nuttx/configs/teensy/src/up_boot.c +++ b/nuttx/configs/teensy/src/up_boot.c @@ -3,7 +3,7 @@ * arch/mips/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/src/up_leds.c b/nuttx/configs/teensy/src/up_leds.c index 7aabae5c3d..ce83b49992 100644 --- a/nuttx/configs/teensy/src/up_leds.c +++ b/nuttx/configs/teensy/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/src/up_spi.c b/nuttx/configs/teensy/src/up_spi.c index e3284be081..a4eed98364 100644 --- a/nuttx/configs/teensy/src/up_spi.c +++ b/nuttx/configs/teensy/src/up_spi.c @@ -1,202 +1,202 @@ -/************************************************************************************ - * configs/teensy/src/up_spi.c - * arch/arm/src/board/up_spi.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "up_arch.h" -#include "chip.h" -#include "at90usb_internal.h" -#include "teensy_internal.h" - -#ifdef CONFIG_AVR_SPI - -/************************************************************************************ - * Definitions - ************************************************************************************/ -/* Teensy SPI Connection - * - * -- ---- -- ------------------------- ------- - * J2 NAME PIN NAME PAD - * -- ---- -- ------------------------- ------- - * 1 VIN -- Connected to USB +RV - * 2 GND -- Connected to USB GND - * 3 3V3 -- Not used --- - * 4 NC -- Not used - * 5 CS 10 (SS/PCINT0) PB0 Pad B0 - * 6 DI 12 (PDI/PCINT2/MOSI) PB2 Pad B2 - * 7 SCK 11 (PCINT1/SCLK) PB1 Pad B1 - * 8 DO 13 (PDO/PCINT3/MISO) PB3 Pad B3 - * 9 IRQ -- Not used --- - * 10 CD 14 (PCINT4/OC.2A) PB4 Pad B4 - * 11 WP 15 (PCINT5/OC.1A) PB5 Pad B5 - * -- ---- -- ------------------------- ------- - */ - -#define TEENSY_CS (1 << 0) -#define TEENSY_CD (1 << 4) -#define TEENSY_WP (1 << 5) - -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_SPI_DEBUG - Define to enable basic SSP debug - * CONFIG_SPI_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_SPI_DEBUG -# define sspdbg lldbg -# ifdef CONFIG_SPI_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef CONFIG_SPI_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/************************************************************************************ - * Name: at90usb_spiinitialize - * - * Description: - * Called to configure SPI chip select GPIO pins for the LPC1766-STK. - * - ************************************************************************************/ - -void weak_function at90usb_spiinitialize(void) -{ - /* The Teensy board has no dedicated SPI devices so we assume that SS is used - * for chip select: - * - * "When the SPI is configured as a Master (MSTR in SPCR is set), the user - * can determine the direction of the SS pin. If SS is configured as an - * output, the pin is a general output pin which does not affect the SPI - * system. ... - * - * "If SS is configured as an input, it must be held high to ensure Master - * SPI operation. If the SS pin is driven low by peripheral circuitry when - * the SPI is configured as a Master with the SS pin defined as an input, - * the SPI system interprets this as another master selecting the SPI ... - */ - - DDRB |= TEENSY_CS; /* B0 is an output */ - PORTB |= TEENSY_CS; /* Low de-selects */ - DDRB &= ~(TEENSY_CD | TEENSY_WP); /* B4 and B5 are inputs */ - PORTB |= (TEENSY_CD | TEENSY_WP); /* Pull high */ -} - -/************************************************************************************ - * Name: avr_spiselect and avr_spistatus - * - * Description: - * The external functions, avr_spiselect and avr_spistatus must be provided by - * board-specific logic. They are implementations of the select and status methods - * of the SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). All - * other methods (including up_spiinitialize()) are provided by common AVR logic. - * To use this common SPI logic on your board: - * - * 1. Provide logic in avr_sspinitialize() to configure SPI chip select pins. - * 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific - * logic. These functions will perform chip selection and status operations - * in the way your board is configured. - * 3. Add a calls to at90usb_spiinitialize() in your low level application - * initialization logic - * 4. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling mmcsd_spislotinitialize(), - * for example, will bind the SPI driver to the SPI MMC/SD driver). - * - ************************************************************************************/ - -void avr_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) -{ - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); - - /* Assert/de-assert the CS pin to the card */ - - if (selected) - { - PORTB &= ~TEENSY_CS; - } - else - { - PORTB |= TEENSY_CS; - } -} - -uint8_t avr_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) -{ - uint8_t ret = 0; - uint8_t regval = PINB; - - /* Both the CD and WP pins are pull high by the AT90USB and will be - * grounded it a card is inserted or write protected. - */ - - if ((regval & TEENSY_CD) == 0) - { - ret |= SPI_STATUS_PRESENT; - } - - if ((regval & TEENSY_WP) == 0) - { - ret |= SPI_STATUS_WRPROTECTED; - } - - sspdbg("Returning %02x\n", ret); - return ret; -} - -#endif /* CONFIG_AVR_SPI */ +/************************************************************************************ + * configs/teensy/src/up_spi.c + * arch/arm/src/board/up_spi.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include + +#include "up_arch.h" +#include "chip.h" +#include "at90usb_internal.h" +#include "teensy_internal.h" + +#ifdef CONFIG_AVR_SPI + +/************************************************************************************ + * Definitions + ************************************************************************************/ +/* Teensy SPI Connection + * + * -- ---- -- ------------------------- ------- + * J2 NAME PIN NAME PAD + * -- ---- -- ------------------------- ------- + * 1 VIN -- Connected to USB +RV + * 2 GND -- Connected to USB GND + * 3 3V3 -- Not used --- + * 4 NC -- Not used + * 5 CS 10 (SS/PCINT0) PB0 Pad B0 + * 6 DI 12 (PDI/PCINT2/MOSI) PB2 Pad B2 + * 7 SCK 11 (PCINT1/SCLK) PB1 Pad B1 + * 8 DO 13 (PDO/PCINT3/MISO) PB3 Pad B3 + * 9 IRQ -- Not used --- + * 10 CD 14 (PCINT4/OC.2A) PB4 Pad B4 + * 11 WP 15 (PCINT5/OC.1A) PB5 Pad B5 + * -- ---- -- ------------------------- ------- + */ + +#define TEENSY_CS (1 << 0) +#define TEENSY_CD (1 << 4) +#define TEENSY_WP (1 << 5) + +/* The following enable debug output from this file (needs CONFIG_DEBUG too). + * + * CONFIG_SPI_DEBUG - Define to enable basic SSP debug + * CONFIG_SPI_VERBOSE - Define to enable verbose SSP debug + */ + +#ifdef CONFIG_SPI_DEBUG +# define sspdbg lldbg +# ifdef CONFIG_SPI_VERBOSE +# define sspvdbg lldbg +# else +# define sspvdbg(x...) +# endif +#else +# undef CONFIG_SPI_VERBOSE +# define sspdbg(x...) +# define sspvdbg(x...) +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: at90usb_spiinitialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the LPC1766-STK. + * + ************************************************************************************/ + +void weak_function at90usb_spiinitialize(void) +{ + /* The Teensy board has no dedicated SPI devices so we assume that SS is used + * for chip select: + * + * "When the SPI is configured as a Master (MSTR in SPCR is set), the user + * can determine the direction of the SS pin. If SS is configured as an + * output, the pin is a general output pin which does not affect the SPI + * system. ... + * + * "If SS is configured as an input, it must be held high to ensure Master + * SPI operation. If the SS pin is driven low by peripheral circuitry when + * the SPI is configured as a Master with the SS pin defined as an input, + * the SPI system interprets this as another master selecting the SPI ... + */ + + DDRB |= TEENSY_CS; /* B0 is an output */ + PORTB |= TEENSY_CS; /* Low de-selects */ + DDRB &= ~(TEENSY_CD | TEENSY_WP); /* B4 and B5 are inputs */ + PORTB |= (TEENSY_CD | TEENSY_WP); /* Pull high */ +} + +/************************************************************************************ + * Name: avr_spiselect and avr_spistatus + * + * Description: + * The external functions, avr_spiselect and avr_spistatus must be provided by + * board-specific logic. They are implementations of the select and status methods + * of the SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). All + * other methods (including up_spiinitialize()) are provided by common AVR logic. + * To use this common SPI logic on your board: + * + * 1. Provide logic in avr_sspinitialize() to configure SPI chip select pins. + * 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific + * logic. These functions will perform chip selection and status operations + * in the way your board is configured. + * 3. Add a calls to at90usb_spiinitialize() in your low level application + * initialization logic + * 4. The handle returned by up_spiinitialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling mmcsd_spislotinitialize(), + * for example, will bind the SPI driver to the SPI MMC/SD driver). + * + ************************************************************************************/ + +void avr_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + + /* Assert/de-assert the CS pin to the card */ + + if (selected) + { + PORTB &= ~TEENSY_CS; + } + else + { + PORTB |= TEENSY_CS; + } +} + +uint8_t avr_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + uint8_t ret = 0; + uint8_t regval = PINB; + + /* Both the CD and WP pins are pull high by the AT90USB and will be + * grounded it a card is inserted or write protected. + */ + + if ((regval & TEENSY_CD) == 0) + { + ret |= SPI_STATUS_PRESENT; + } + + if ((regval & TEENSY_WP) == 0) + { + ret |= SPI_STATUS_WRPROTECTED; + } + + sspdbg("Returning %02x\n", ret); + return ret; +} + +#endif /* CONFIG_AVR_SPI */ diff --git a/nuttx/configs/teensy/src/up_usbmsc.c b/nuttx/configs/teensy/src/up_usbmsc.c index 7eb3307c66..fcf7fe2f56 100644 --- a/nuttx/configs/teensy/src/up_usbmsc.c +++ b/nuttx/configs/teensy/src/up_usbmsc.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_usbmsc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the AVR MMC/SD SPI block driver. * diff --git a/nuttx/configs/teensy/usbstorage/appconfig b/nuttx/configs/teensy/usbstorage/appconfig index 3f25250305..76df13884b 100644 --- a/nuttx/configs/teensy/usbstorage/appconfig +++ b/nuttx/configs/teensy/usbstorage/appconfig @@ -2,7 +2,7 @@ # configs/teensy/usbstorage/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index 42ec5fd138..a0f9066653 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -2,7 +2,7 @@ # configs/teensy/usbstorage/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/usbstorage/ld.script b/nuttx/configs/teensy/usbstorage/ld.script index 7a57ef66cd..54163f002a 100755 --- a/nuttx/configs/teensy/usbstorage/ld.script +++ b/nuttx/configs/teensy/usbstorage/ld.script @@ -2,7 +2,7 @@ * configs/teensy/usbstorage/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/teensy/usbstorage/setenv.sh b/nuttx/configs/teensy/usbstorage/setenv.sh index 7cefcdaeca..a455f560a3 100755 --- a/nuttx/configs/teensy/usbstorage/setenv.sh +++ b/nuttx/configs/teensy/usbstorage/setenv.sh @@ -2,7 +2,7 @@ # configs/teensy/usbstorage/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/include/board.h b/nuttx/configs/twr-k60n512/include/board.h index 76039f7199..ca060c654d 100755 --- a/nuttx/configs/twr-k60n512/include/board.h +++ b/nuttx/configs/twr-k60n512/include/board.h @@ -3,7 +3,7 @@ * include/arch/board/board.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/nsh/Make.defs b/nuttx/configs/twr-k60n512/nsh/Make.defs index 5ae6ca061e..c055c9b45f 100644 --- a/nuttx/configs/twr-k60n512/nsh/Make.defs +++ b/nuttx/configs/twr-k60n512/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/twr-k60n512/nsh/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index 16e33799d7..0f91b67214 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -2,7 +2,7 @@ # configs/twr-k60n512/nsh/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/nsh/ld.script b/nuttx/configs/twr-k60n512/nsh/ld.script index fe6bd15501..e8e5e7de15 100644 --- a/nuttx/configs/twr-k60n512/nsh/ld.script +++ b/nuttx/configs/twr-k60n512/nsh/ld.script @@ -2,7 +2,7 @@ * configs/twr-k60n512/nsh/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/nsh/setenv.sh b/nuttx/configs/twr-k60n512/nsh/setenv.sh index 7acb0e7f60..a780a15a7d 100644 --- a/nuttx/configs/twr-k60n512/nsh/setenv.sh +++ b/nuttx/configs/twr-k60n512/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/twr-k60n512/nsh/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/ostest/Make.defs b/nuttx/configs/twr-k60n512/ostest/Make.defs index e737d71899..8c4a629bb2 100644 --- a/nuttx/configs/twr-k60n512/ostest/Make.defs +++ b/nuttx/configs/twr-k60n512/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/twr-k60n512/ostest/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/ostest/appconfig b/nuttx/configs/twr-k60n512/ostest/appconfig index efb1f2f333..d1ec3edb26 100644 --- a/nuttx/configs/twr-k60n512/ostest/appconfig +++ b/nuttx/configs/twr-k60n512/ostest/appconfig @@ -2,7 +2,7 @@ # configs/twr-k60n512/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index af92a0c3ec..461b795f1e 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -2,7 +2,7 @@ # configs/twr-k60n512/ostest/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/ostest/ld.script b/nuttx/configs/twr-k60n512/ostest/ld.script index d7692e1d38..717a457474 100644 --- a/nuttx/configs/twr-k60n512/ostest/ld.script +++ b/nuttx/configs/twr-k60n512/ostest/ld.script @@ -2,7 +2,7 @@ * configs/twr-k60n512/ostest/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/ostest/setenv.sh b/nuttx/configs/twr-k60n512/ostest/setenv.sh index 6dedfbded7..86b6099dcd 100644 --- a/nuttx/configs/twr-k60n512/ostest/setenv.sh +++ b/nuttx/configs/twr-k60n512/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/twr-k60n512/ostest/setenv.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/Makefile b/nuttx/configs/twr-k60n512/src/Makefile index 18a9c118f7..6e43aa69a4 100644 --- a/nuttx/configs/twr-k60n512/src/Makefile +++ b/nuttx/configs/twr-k60n512/src/Makefile @@ -2,7 +2,7 @@ # configs/twr-k60n512/src/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/twrk60-internal.h b/nuttx/configs/twr-k60n512/src/twrk60-internal.h index df60daae46..9a8b16c9ca 100644 --- a/nuttx/configs/twr-k60n512/src/twrk60-internal.h +++ b/nuttx/configs/twr-k60n512/src/twrk60-internal.h @@ -3,7 +3,7 @@ * arch/arm/src/board/twrk60-internal.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_boot.c b/nuttx/configs/twr-k60n512/src/up_boot.c index d6cd382d16..d811658c3c 100644 --- a/nuttx/configs/twr-k60n512/src/up_boot.c +++ b/nuttx/configs/twr-k60n512/src/up_boot.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_buttons.c b/nuttx/configs/twr-k60n512/src/up_buttons.c index c5f3209235..5b449dbe89 100644 --- a/nuttx/configs/twr-k60n512/src/up_buttons.c +++ b/nuttx/configs/twr-k60n512/src/up_buttons.c @@ -2,7 +2,7 @@ * configs/twr-k60n512/src/up_buttons.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_leds.c b/nuttx/configs/twr-k60n512/src/up_leds.c index fe03db3684..df7aeeaa58 100644 --- a/nuttx/configs/twr-k60n512/src/up_leds.c +++ b/nuttx/configs/twr-k60n512/src/up_leds.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_leds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_nsh.c b/nuttx/configs/twr-k60n512/src/up_nsh.c index e59265f912..3bb4e8527b 100644 --- a/nuttx/configs/twr-k60n512/src/up_nsh.c +++ b/nuttx/configs/twr-k60n512/src/up_nsh.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_nsh.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_spi.c b/nuttx/configs/twr-k60n512/src/up_spi.c index 6f8c3995b8..074dc5cd7f 100644 --- a/nuttx/configs/twr-k60n512/src/up_spi.c +++ b/nuttx/configs/twr-k60n512/src/up_spi.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_spi.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_usbdev.c b/nuttx/configs/twr-k60n512/src/up_usbdev.c index 938ef43b56..8a07e8f874 100644 --- a/nuttx/configs/twr-k60n512/src/up_usbdev.c +++ b/nuttx/configs/twr-k60n512/src/up_usbdev.c @@ -3,7 +3,7 @@ * arch/arm/src/board/up_boot.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/twr-k60n512/src/up_usbmsc.c b/nuttx/configs/twr-k60n512/src/up_usbmsc.c index bebedd02f6..1a8f7a70de 100644 --- a/nuttx/configs/twr-k60n512/src/up_usbmsc.c +++ b/nuttx/configs/twr-k60n512/src/up_usbmsc.c @@ -2,7 +2,7 @@ * configs/twr-k60n512/src/up_usbmsc.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Configure and register the Kinetis MMC/SD block driver. * diff --git a/nuttx/configs/us7032evb1/include/board.h b/nuttx/configs/us7032evb1/include/board.h index c0d03aad59..3ca3476dad 100644 --- a/nuttx/configs/us7032evb1/include/board.h +++ b/nuttx/configs/us7032evb1/include/board.h @@ -2,7 +2,7 @@ * configs/us7032evb1/include/board.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/nsh/Make.defs b/nuttx/configs/us7032evb1/nsh/Make.defs index 410d0cea67..623eb82d51 100644 --- a/nuttx/configs/us7032evb1/nsh/Make.defs +++ b/nuttx/configs/us7032evb1/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/us7032evb1/nsh/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index 51c967ce5a..02d42aebe5 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -2,7 +2,7 @@ # configs/us7032evb1/nsh/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/nsh/ld.script b/nuttx/configs/us7032evb1/nsh/ld.script index 6deaddeb60..e21bdfa006 100644 --- a/nuttx/configs/us7032evb1/nsh/ld.script +++ b/nuttx/configs/us7032evb1/nsh/ld.script @@ -2,7 +2,7 @@ * configs/us7032evb1/nsh/ld.script * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/nsh/setenv.sh b/nuttx/configs/us7032evb1/nsh/setenv.sh index 93f7c2b328..d231336128 100755 --- a/nuttx/configs/us7032evb1/nsh/setenv.sh +++ b/nuttx/configs/us7032evb1/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/us7032evb1/nsh/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/ostest/Make.defs b/nuttx/configs/us7032evb1/ostest/Make.defs index f924dc56fe..dcbaefdf85 100644 --- a/nuttx/configs/us7032evb1/ostest/Make.defs +++ b/nuttx/configs/us7032evb1/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/us7032evb1/ostest/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/ostest/appconfig b/nuttx/configs/us7032evb1/ostest/appconfig index 6381f59bc1..ba7253e3f1 100644 --- a/nuttx/configs/us7032evb1/ostest/appconfig +++ b/nuttx/configs/us7032evb1/ostest/appconfig @@ -2,7 +2,7 @@ # configs/us7032evb1/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index da3feb8b16..f92a55461e 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -2,7 +2,7 @@ # configs/us7032evb1/ostest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/ostest/ld.script b/nuttx/configs/us7032evb1/ostest/ld.script index 15bc1b2fdd..36c9b0d9a8 100644 --- a/nuttx/configs/us7032evb1/ostest/ld.script +++ b/nuttx/configs/us7032evb1/ostest/ld.script @@ -2,7 +2,7 @@ * configs/us7032evb1/ostest/ld.script * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/ostest/setenv.sh b/nuttx/configs/us7032evb1/ostest/setenv.sh index 9002ddff2c..ac37e9150f 100755 --- a/nuttx/configs/us7032evb1/ostest/setenv.sh +++ b/nuttx/configs/us7032evb1/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/us7032evb1/ostest/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/shterm/Makefile b/nuttx/configs/us7032evb1/shterm/Makefile index 9395f743de..2ea23db331 100644 --- a/nuttx/configs/us7032evb1/shterm/Makefile +++ b/nuttx/configs/us7032evb1/shterm/Makefile @@ -2,7 +2,7 @@ # config/us7032evb1/shterm/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/shterm/shterm.c b/nuttx/configs/us7032evb1/shterm/shterm.c index 0a1e143b1d..f9ff2994aa 100644 --- a/nuttx/configs/us7032evb1/shterm/shterm.c +++ b/nuttx/configs/us7032evb1/shterm/shterm.c @@ -2,7 +2,7 @@ * config/us7032evb1/shterm/shterm.c * * Copyright(C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/src/Makefile b/nuttx/configs/us7032evb1/src/Makefile index 421b67ac7e..4ced0ac9ed 100644 --- a/nuttx/configs/us7032evb1/src/Makefile +++ b/nuttx/configs/us7032evb1/src/Makefile @@ -2,7 +2,7 @@ # configs/us7032evb1/src/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/us7032evb1/src/up_leds.c b/nuttx/configs/us7032evb1/src/up_leds.c index 4d6e213dbd..d532bc3559 100644 --- a/nuttx/configs/us7032evb1/src/up_leds.c +++ b/nuttx/configs/us7032evb1/src/up_leds.c @@ -2,7 +2,7 @@ * configs/us7032evb1/src/up_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/vsn/include/board.h b/nuttx/configs/vsn/include/board.h index f2c6f48cb3..dbed25c191 100644 --- a/nuttx/configs/vsn/include/board.h +++ b/nuttx/configs/vsn/include/board.h @@ -5,7 +5,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved * - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/vsn/nsh/Make.defs b/nuttx/configs/vsn/nsh/Make.defs index 0487609ea7..db6f64896d 100644 --- a/nuttx/configs/vsn/nsh/Make.defs +++ b/nuttx/configs/vsn/nsh/Make.defs @@ -2,7 +2,7 @@ # configs/stm3210e-eval/nsh/Make.defs # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/vsn/nsh/ld.script b/nuttx/configs/vsn/nsh/ld.script index f7b4ba78ba..63c8585ebf 100755 --- a/nuttx/configs/vsn/nsh/ld.script +++ b/nuttx/configs/vsn/nsh/ld.script @@ -2,7 +2,7 @@ * configs/stm3210e-eval/nsh/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/vsn/nsh/ld.script.dfu b/nuttx/configs/vsn/nsh/ld.script.dfu index 2837fd04ce..aa077ba3b7 100755 --- a/nuttx/configs/vsn/nsh/ld.script.dfu +++ b/nuttx/configs/vsn/nsh/ld.script.dfu @@ -2,7 +2,7 @@ * configs/stm3210e-eval/nsh/ld.script.dfu * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/vsn/nsh/setenv.sh b/nuttx/configs/vsn/nsh/setenv.sh index cbd45aa50b..3b9f7f8967 100755 --- a/nuttx/configs/vsn/nsh/setenv.sh +++ b/nuttx/configs/vsn/nsh/setenv.sh @@ -2,7 +2,7 @@ # configs/stm3210e-eval/dfu/setenv.sh # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/vsn/src/Makefile b/nuttx/configs/vsn/src/Makefile index 03559cb4ab..fe40db2a71 100644 --- a/nuttx/configs/vsn/src/Makefile +++ b/nuttx/configs/vsn/src/Makefile @@ -4,7 +4,7 @@ # Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. # Copyright (c) 2011 Uros Platise. All rights reserved. # -# Authors: Gregory Nutt +# Authors: Gregory Nutt # Uros Platise # # Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/vsn/src/boot.c b/nuttx/configs/vsn/src/boot.c index 846f707b76..94dcd00435 100644 --- a/nuttx/configs/vsn/src/boot.c +++ b/nuttx/configs/vsn/src/boot.c @@ -5,7 +5,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (c) 2011 Uros Platise. All rights reserved. * - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/vsn/src/spi.c b/nuttx/configs/vsn/src/spi.c index f3be9f5bf6..e8e15e54b8 100644 --- a/nuttx/configs/vsn/src/spi.c +++ b/nuttx/configs/vsn/src/spi.c @@ -5,7 +5,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved. * - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/vsn/src/usbdev.c b/nuttx/configs/vsn/src/usbdev.c index db7fd1d9a2..deb1e9b2d6 100644 --- a/nuttx/configs/vsn/src/usbdev.c +++ b/nuttx/configs/vsn/src/usbdev.c @@ -5,7 +5,7 @@ * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. * Copyright (c) 2011 Uros Platise. All rights reserved. * - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Uros Platise * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/vsn/src/usbmsc.c b/nuttx/configs/vsn/src/usbmsc.c index 264ae77a66..c0eebf6bf0 100644 --- a/nuttx/configs/vsn/src/usbmsc.c +++ b/nuttx/configs/vsn/src/usbmsc.c @@ -4,7 +4,7 @@ * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (c) 2011 Uros Platise. All rights reserved. * - * Authors: Gregory Nutt + * Authors: Gregory Nutt * Uros Platise * * Configure and register the STM32 MMC/SD SDIO block driver. diff --git a/nuttx/configs/xtrs/include/board.h b/nuttx/configs/xtrs/include/board.h index 7a3050d6f9..f8f74b2193 100644 --- a/nuttx/configs/xtrs/include/board.h +++ b/nuttx/configs/xtrs/include/board.h @@ -2,7 +2,7 @@ * board/board.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/nsh/setenv.sh b/nuttx/configs/xtrs/nsh/setenv.sh index dadab845df..c59e0abc1f 100755 --- a/nuttx/configs/xtrs/nsh/setenv.sh +++ b/nuttx/configs/xtrs/nsh/setenv.sh @@ -2,7 +2,7 @@ # xtrs/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/ostest/appconfig b/nuttx/configs/xtrs/ostest/appconfig index 906020daed..d998929853 100644 --- a/nuttx/configs/xtrs/ostest/appconfig +++ b/nuttx/configs/xtrs/ostest/appconfig @@ -2,7 +2,7 @@ # configs/xtrs/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/ostest/setenv.sh b/nuttx/configs/xtrs/ostest/setenv.sh index d62ae86dee..cf7b5d796a 100755 --- a/nuttx/configs/xtrs/ostest/setenv.sh +++ b/nuttx/configs/xtrs/ostest/setenv.sh @@ -2,7 +2,7 @@ # xtrs/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/pashello/appconfig b/nuttx/configs/xtrs/pashello/appconfig index 0deb0b01b0..7cb5a7cf2a 100644 --- a/nuttx/configs/xtrs/pashello/appconfig +++ b/nuttx/configs/xtrs/pashello/appconfig @@ -2,7 +2,7 @@ # configs/xtrs/pashello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/pashello/setenv.sh b/nuttx/configs/xtrs/pashello/setenv.sh index d62ae86dee..cf7b5d796a 100755 --- a/nuttx/configs/xtrs/pashello/setenv.sh +++ b/nuttx/configs/xtrs/pashello/setenv.sh @@ -2,7 +2,7 @@ # xtrs/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/src/Make.defs b/nuttx/configs/xtrs/src/Make.defs index d077ca6459..e20f03a4e5 100644 --- a/nuttx/configs/xtrs/src/Make.defs +++ b/nuttx/configs/xtrs/src/Make.defs @@ -2,7 +2,7 @@ # configs/xtrs/src/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/src/Makefile b/nuttx/configs/xtrs/src/Makefile index ca08c9a339..9b14cf4178 100644 --- a/nuttx/configs/xtrs/src/Makefile +++ b/nuttx/configs/xtrs/src/Makefile @@ -2,7 +2,7 @@ # configs/xtrs/src/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/src/xtr_irq.c b/nuttx/configs/xtrs/src/xtr_irq.c index 1186f34f8e..4e17c37bca 100644 --- a/nuttx/configs/xtrs/src/xtr_irq.c +++ b/nuttx/configs/xtrs/src/xtr_irq.c @@ -2,7 +2,7 @@ * board/xtr_irq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/src/xtr_timerisr.c b/nuttx/configs/xtrs/src/xtr_timerisr.c index de0109534c..21a77706f6 100644 --- a/nuttx/configs/xtrs/src/xtr_timerisr.c +++ b/nuttx/configs/xtrs/src/xtr_timerisr.c @@ -2,7 +2,7 @@ * board/xtr_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/xtrs/src/xtrs_head.asm b/nuttx/configs/xtrs/src/xtrs_head.asm index 5fb33c3c8d..bd7156f590 100644 --- a/nuttx/configs/xtrs/src/xtrs_head.asm +++ b/nuttx/configs/xtrs/src/xtrs_head.asm @@ -2,7 +2,7 @@ ; configs/xtrs/src/xtrs_head.asm ; ; Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. -; Author: Gregory Nutt +; Author: Gregory Nutt ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/include/board.h b/nuttx/configs/z16f2800100zcog/include/board.h index f5e562e310..e9b37d85d9 100644 --- a/nuttx/configs/z16f2800100zcog/include/board.h +++ b/nuttx/configs/z16f2800100zcog/include/board.h @@ -2,7 +2,7 @@ * board/board.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/ostest/Make.defs b/nuttx/configs/z16f2800100zcog/ostest/Make.defs index 64eda832f8..8440224cab 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/Make.defs +++ b/nuttx/configs/z16f2800100zcog/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/ostest/Make.defs # # Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/ostest/appconfig b/nuttx/configs/z16f2800100zcog/ostest/appconfig index 627b24deb8..a0f5d2462f 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/appconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/appconfig @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index cf20002530..24cca2a6aa 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/ostest/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/ostest/ostest.linkcmd b/nuttx/configs/z16f2800100zcog/ostest/ostest.linkcmd index 5ab69bb46f..17539ad572 100755 --- a/nuttx/configs/z16f2800100zcog/ostest/ostest.linkcmd +++ b/nuttx/configs/z16f2800100zcog/ostest/ostest.linkcmd @@ -2,7 +2,7 @@ /* configs/z16f2800100zcog/ostest/ostest.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/z16f2800100zcog/ostest/setenv.sh b/nuttx/configs/z16f2800100zcog/ostest/setenv.sh index 5a7bf2779a..bddcad2b5b 100755 --- a/nuttx/configs/z16f2800100zcog/ostest/setenv.sh +++ b/nuttx/configs/z16f2800100zcog/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/ostest/setenv.sh # # Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/pashello/Make.defs b/nuttx/configs/z16f2800100zcog/pashello/Make.defs index 999f25e625..1c3e277ad9 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/Make.defs +++ b/nuttx/configs/z16f2800100zcog/pashello/Make.defs @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/pashello/Make.defs # # Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/pashello/appconfig b/nuttx/configs/z16f2800100zcog/pashello/appconfig index 07a95ee0fc..d35185f5f0 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/appconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/appconfig @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/pashello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index 176d3a3876..daf98c7d6e 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/pashello/defconfig # # Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/pashello/pashello.linkcmd b/nuttx/configs/z16f2800100zcog/pashello/pashello.linkcmd index e254578f1f..f519219fb2 100755 --- a/nuttx/configs/z16f2800100zcog/pashello/pashello.linkcmd +++ b/nuttx/configs/z16f2800100zcog/pashello/pashello.linkcmd @@ -2,7 +2,7 @@ /* configs/z16f2800100zcog/pashello/pashello.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/z16f2800100zcog/pashello/setenv.sh b/nuttx/configs/z16f2800100zcog/pashello/setenv.sh index 982461b246..f957b23cbb 100755 --- a/nuttx/configs/z16f2800100zcog/pashello/setenv.sh +++ b/nuttx/configs/z16f2800100zcog/pashello/setenv.sh @@ -2,7 +2,7 @@ # z16f2800100zcog/setenv.sh # # Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/src/Makefile b/nuttx/configs/z16f2800100zcog/src/Makefile index e683d4b719..b8eedadd4a 100644 --- a/nuttx/configs/z16f2800100zcog/src/Makefile +++ b/nuttx/configs/z16f2800100zcog/src/Makefile @@ -2,7 +2,7 @@ # configs/z16f2800100zcog/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/src/z16f_leds.c b/nuttx/configs/z16f2800100zcog/src/z16f_leds.c index 0d7f571acb..dfcf96fec0 100644 --- a/nuttx/configs/z16f2800100zcog/src/z16f_leds.c +++ b/nuttx/configs/z16f2800100zcog/src/z16f_leds.c @@ -2,7 +2,7 @@ * configs/z16f2800100zcog/z16f_leds.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z16f2800100zcog/src/z16f_lowinit.c b/nuttx/configs/z16f2800100zcog/src/z16f_lowinit.c index 3c2c43ec81..2eb7d701ba 100644 --- a/nuttx/configs/z16f2800100zcog/src/z16f_lowinit.c +++ b/nuttx/configs/z16f2800100zcog/src/z16f_lowinit.c @@ -1,90 +1,90 @@ -/*************************************************************************** - * configs/z16f2800100zcog/src/z16f_lowinit.c - * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include - -#include "chip/chip.h" - -/*************************************************************************** - * Definitions - ***************************************************************************/ - -/*************************************************************************** - * Private Functions - ***************************************************************************/ - -static void z16f_gpioinit(void) -{ - /* Configure LEDs and Run/Stop switch port */ - - putreg8(getreg8(Z16F_GPIOA_DD) | 0x87, Z16F_GPIOA_DD); - putreg8(getreg8(Z16F_GPIOA_OUT) | 0x07, Z16F_GPIOA_OUT); - putreg8(getreg8(Z16F_GPIOA_DD) & 0xF8, Z16F_GPIOA_DD); - - /* Configure rate switch port */ - - putreg8(getreg8(Z16F_GPIOB_DD) | 0x20, Z16F_GPIOB_DD); - putreg8(getreg8(Z16F_GPIOB_AFL) | 0x20, Z16F_GPIOB_AFL); - -#if 0 /* Not yet */ - putreg8(0x05, Z16F_ADC0_MAX); - putreg8(0xf5, Z16F_ADC0_CTL); -#endif - - /* Configure Direction switch port */ - - putreg8(getreg8(Z16F_GPIOC_DD) | 0x01, Z16F_GPIOC_DD); - - /* Configure to use both UART0 and 1 */ - - putreg8(getreg8(Z16F_GPIOA_AFL) | 0x30, Z16F_GPIOA_AFL); - putreg8(getreg8(Z16F_GPIOD_AFL) | 0x30, Z16F_GPIOD_AFL); -} - -/*************************************************************************** - * Public Functions - ***************************************************************************/ - -void z16f_lowinit(void) -{ - z16f_gpioinit(); -} - +/*************************************************************************** + * configs/z16f2800100zcog/src/z16f_lowinit.c + * + * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include + +#include "chip/chip.h" + +/*************************************************************************** + * Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +static void z16f_gpioinit(void) +{ + /* Configure LEDs and Run/Stop switch port */ + + putreg8(getreg8(Z16F_GPIOA_DD) | 0x87, Z16F_GPIOA_DD); + putreg8(getreg8(Z16F_GPIOA_OUT) | 0x07, Z16F_GPIOA_OUT); + putreg8(getreg8(Z16F_GPIOA_DD) & 0xF8, Z16F_GPIOA_DD); + + /* Configure rate switch port */ + + putreg8(getreg8(Z16F_GPIOB_DD) | 0x20, Z16F_GPIOB_DD); + putreg8(getreg8(Z16F_GPIOB_AFL) | 0x20, Z16F_GPIOB_AFL); + +#if 0 /* Not yet */ + putreg8(0x05, Z16F_ADC0_MAX); + putreg8(0xf5, Z16F_ADC0_CTL); +#endif + + /* Configure Direction switch port */ + + putreg8(getreg8(Z16F_GPIOC_DD) | 0x01, Z16F_GPIOC_DD); + + /* Configure to use both UART0 and 1 */ + + putreg8(getreg8(Z16F_GPIOA_AFL) | 0x30, Z16F_GPIOA_AFL); + putreg8(getreg8(Z16F_GPIOD_AFL) | 0x30, Z16F_GPIOD_AFL); +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +void z16f_lowinit(void) +{ + z16f_gpioinit(); +} + diff --git a/nuttx/configs/z80sim/include/board.h b/nuttx/configs/z80sim/include/board.h index 4cc4b97daf..5bf8eb82d6 100644 --- a/nuttx/configs/z80sim/include/board.h +++ b/nuttx/configs/z80sim/include/board.h @@ -2,7 +2,7 @@ * board/board.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index a87e7a9288..9d4d81a74c 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -2,7 +2,7 @@ # sim/z80sim/nsh/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/nsh/setenv.sh b/nuttx/configs/z80sim/nsh/setenv.sh index cdb5e67d76..fa65934f18 100755 --- a/nuttx/configs/z80sim/nsh/setenv.sh +++ b/nuttx/configs/z80sim/nsh/setenv.sh @@ -2,7 +2,7 @@ # z80sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/ostest/appconfig b/nuttx/configs/z80sim/ostest/appconfig index e4dda3c780..59f1211b12 100644 --- a/nuttx/configs/z80sim/ostest/appconfig +++ b/nuttx/configs/z80sim/ostest/appconfig @@ -2,7 +2,7 @@ # configs/z80sim/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/ostest/setenv.sh b/nuttx/configs/z80sim/ostest/setenv.sh index cdb5e67d76..fa65934f18 100755 --- a/nuttx/configs/z80sim/ostest/setenv.sh +++ b/nuttx/configs/z80sim/ostest/setenv.sh @@ -2,7 +2,7 @@ # z80sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/pashello/appconfig b/nuttx/configs/z80sim/pashello/appconfig index faa2589ab3..38d7b91f80 100644 --- a/nuttx/configs/z80sim/pashello/appconfig +++ b/nuttx/configs/z80sim/pashello/appconfig @@ -2,7 +2,7 @@ # configs/z80sim/pashello/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index 42ffdb0f3f..1c50f71ff0 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -2,7 +2,7 @@ # configs/z80sim/pashello/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/pashello/setenv.sh b/nuttx/configs/z80sim/pashello/setenv.sh index cdb5e67d76..fa65934f18 100755 --- a/nuttx/configs/z80sim/pashello/setenv.sh +++ b/nuttx/configs/z80sim/pashello/setenv.sh @@ -2,7 +2,7 @@ # z80sim/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/src/Makefile b/nuttx/configs/z80sim/src/Makefile index 46767d1395..0511d00fe6 100644 --- a/nuttx/configs/z80sim/src/Makefile +++ b/nuttx/configs/z80sim/src/Makefile @@ -2,7 +2,7 @@ # configs/z80sim/src/Makefile # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/src/z80_irq.c b/nuttx/configs/z80sim/src/z80_irq.c index 7312f66e30..0fc5d95de9 100644 --- a/nuttx/configs/z80sim/src/z80_irq.c +++ b/nuttx/configs/z80sim/src/z80_irq.c @@ -2,7 +2,7 @@ * board/z80_irq.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/src/z80_lowputc.c b/nuttx/configs/z80sim/src/z80_lowputc.c index 58615ea24e..0909929d77 100644 --- a/nuttx/configs/z80sim/src/z80_lowputc.c +++ b/nuttx/configs/z80sim/src/z80_lowputc.c @@ -2,7 +2,7 @@ * board/z80_lowputc.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z80sim/src/z80_timerisr.c b/nuttx/configs/z80sim/src/z80_timerisr.c index 85210eca49..1bcfda0498 100644 --- a/nuttx/configs/z80sim/src/z80_timerisr.c +++ b/nuttx/configs/z80sim/src/z80_timerisr.c @@ -2,7 +2,7 @@ * board/z80_timerisr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/include/board.h b/nuttx/configs/z8encore000zco/include/board.h index dca9ca7d8c..4690ee0933 100644 --- a/nuttx/configs/z8encore000zco/include/board.h +++ b/nuttx/configs/z8encore000zco/include/board.h @@ -2,7 +2,7 @@ * arch/z8encore000zco/include/board.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/ostest/Make.defs b/nuttx/configs/z8encore000zco/ostest/Make.defs index 000ee4a63f..cf310e0ff4 100644 --- a/nuttx/configs/z8encore000zco/ostest/Make.defs +++ b/nuttx/configs/z8encore000zco/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/z8encore000zco/ostest/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/ostest/appconfig b/nuttx/configs/z8encore000zco/ostest/appconfig index cf434eea6f..212b52f727 100644 --- a/nuttx/configs/z8encore000zco/ostest/appconfig +++ b/nuttx/configs/z8encore000zco/ostest/appconfig @@ -2,7 +2,7 @@ # configs/z8encore000zco/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd b/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd index befb1ac713..14fcd81f68 100755 --- a/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd +++ b/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd @@ -2,7 +2,7 @@ /* configs/z8encore000zco/ostest/ostest.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/z8encore000zco/ostest/setenv.sh b/nuttx/configs/z8encore000zco/ostest/setenv.sh index 50a1db1abd..5aa816dd96 100755 --- a/nuttx/configs/z8encore000zco/ostest/setenv.sh +++ b/nuttx/configs/z8encore000zco/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/z8encore000zco/ostest/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/src/Makefile b/nuttx/configs/z8encore000zco/src/Makefile index 6982efe172..ca9de460cf 100644 --- a/nuttx/configs/z8encore000zco/src/Makefile +++ b/nuttx/configs/z8encore000zco/src/Makefile @@ -2,7 +2,7 @@ # configs/z8encore000zco/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/src/z8_leds.c b/nuttx/configs/z8encore000zco/src/z8_leds.c index f14dae6efe..097b27efa9 100644 --- a/nuttx/configs/z8encore000zco/src/z8_leds.c +++ b/nuttx/configs/z8encore000zco/src/z8_leds.c @@ -2,7 +2,7 @@ * configs/z8encore000zco/src/z8_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8encore000zco/src/z8_lowinit.c b/nuttx/configs/z8encore000zco/src/z8_lowinit.c index 7443dbb654..1604fb82c6 100644 --- a/nuttx/configs/z8encore000zco/src/z8_lowinit.c +++ b/nuttx/configs/z8encore000zco/src/z8_lowinit.c @@ -1,66 +1,66 @@ -/*************************************************************************** - * configs/z8encore000zco/src/z8_lowinit.c - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include - -#include "chip/chip.h" - -/*************************************************************************** - * Definitions - ***************************************************************************/ - -/*************************************************************************** - * Private Functions - ***************************************************************************/ - -static void z8_gpioinit(void) -{ -} - -/*************************************************************************** - * Public Functions - ***************************************************************************/ - -void z8_lowinit(void) -{ - z8_gpioinit(); -} - +/*************************************************************************** + * configs/z8encore000zco/src/z8_lowinit.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include + +#include "chip/chip.h" + +/*************************************************************************** + * Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +static void z8_gpioinit(void) +{ +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +void z8_lowinit(void) +{ + z8_gpioinit(); +} + diff --git a/nuttx/configs/z8f64200100kit/include/board.h b/nuttx/configs/z8f64200100kit/include/board.h index 0b87c7c8b9..87ca98adcf 100644 --- a/nuttx/configs/z8f64200100kit/include/board.h +++ b/nuttx/configs/z8f64200100kit/include/board.h @@ -2,7 +2,7 @@ * arch/z8f64200100kit/include/board.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/ostest/Make.defs b/nuttx/configs/z8f64200100kit/ostest/Make.defs index 9334377a26..894df0855f 100644 --- a/nuttx/configs/z8f64200100kit/ostest/Make.defs +++ b/nuttx/configs/z8f64200100kit/ostest/Make.defs @@ -2,7 +2,7 @@ # configs/z8f64200100kit/ostest/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/ostest/appconfig b/nuttx/configs/z8f64200100kit/ostest/appconfig index 77aa777279..e6f0c23750 100644 --- a/nuttx/configs/z8f64200100kit/ostest/appconfig +++ b/nuttx/configs/z8f64200100kit/ostest/appconfig @@ -2,7 +2,7 @@ # configs/z8f64200100kit/ostest/appconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/ostest/ostest.linkcmd b/nuttx/configs/z8f64200100kit/ostest/ostest.linkcmd index dde2462209..87ea00085e 100755 --- a/nuttx/configs/z8f64200100kit/ostest/ostest.linkcmd +++ b/nuttx/configs/z8f64200100kit/ostest/ostest.linkcmd @@ -2,7 +2,7 @@ /* configs/z8f64200100kit/ostest/ostest.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/nuttx/configs/z8f64200100kit/ostest/setenv.sh b/nuttx/configs/z8f64200100kit/ostest/setenv.sh index 1c4e29504e..166ed9e0c9 100755 --- a/nuttx/configs/z8f64200100kit/ostest/setenv.sh +++ b/nuttx/configs/z8f64200100kit/ostest/setenv.sh @@ -2,7 +2,7 @@ # configs/z8f64200100kit/ostest/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/src/Makefile b/nuttx/configs/z8f64200100kit/src/Makefile index f4ce2333d8..c9c9b36e29 100644 --- a/nuttx/configs/z8f64200100kit/src/Makefile +++ b/nuttx/configs/z8f64200100kit/src/Makefile @@ -2,7 +2,7 @@ # configs/z8f64200100kit/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/src/z8_leds.c b/nuttx/configs/z8f64200100kit/src/z8_leds.c index b83167c0af..c5b6ec8af8 100644 --- a/nuttx/configs/z8f64200100kit/src/z8_leds.c +++ b/nuttx/configs/z8f64200100kit/src/z8_leds.c @@ -2,7 +2,7 @@ * configs/z8f64200100kit/src/z8_leds.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/configs/z8f64200100kit/src/z8_lowinit.c b/nuttx/configs/z8f64200100kit/src/z8_lowinit.c index a3cb0163a8..41782e69fe 100644 --- a/nuttx/configs/z8f64200100kit/src/z8_lowinit.c +++ b/nuttx/configs/z8f64200100kit/src/z8_lowinit.c @@ -1,66 +1,66 @@ -/*************************************************************************** - * configs/z8f64200100kit/src/z8_lowinit.c - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Based upon sample code included with the Zilog ZDS-II toolchain. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -/*************************************************************************** - * Included Files - ***************************************************************************/ - -#include - -#include "chip/chip.h" - -/*************************************************************************** - * Definitions - ***************************************************************************/ - -/*************************************************************************** - * Private Functions - ***************************************************************************/ - -static void z8_gpioinit(void) -{ -} - -/*************************************************************************** - * Public Functions - ***************************************************************************/ - -void z8_lowinit(void) -{ - z8_gpioinit(); -} - +/*************************************************************************** + * configs/z8f64200100kit/src/z8_lowinit.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include + +#include "chip/chip.h" + +/*************************************************************************** + * Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +static void z8_gpioinit(void) +{ +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +void z8_lowinit(void) +{ + z8_gpioinit(); +} + diff --git a/nuttx/drivers/analog/Make.defs b/nuttx/drivers/analog/Make.defs index 10b0db4785..d94e397587 100644 --- a/nuttx/drivers/analog/Make.defs +++ b/nuttx/drivers/analog/Make.defs @@ -2,7 +2,7 @@ # drivers/analog/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/analog/dac.c b/nuttx/drivers/analog/dac.c index 9371e3414c..e1fc3049ff 100644 --- a/nuttx/drivers/analog/dac.c +++ b/nuttx/drivers/analog/dac.c @@ -8,7 +8,7 @@ * Derived from drivers/can.c * * Copyright (C) 2008-2009Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/input/Make.defs b/nuttx/drivers/input/Make.defs index aaf08b8270..6dbae268e5 100644 --- a/nuttx/drivers/input/Make.defs +++ b/nuttx/drivers/input/Make.defs @@ -2,7 +2,7 @@ # drivers/input/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/lcd/nokia6100.c b/nuttx/drivers/lcd/nokia6100.c index d450e05dbf..7354b8a917 100644 --- a/nuttx/drivers/lcd/nokia6100.c +++ b/nuttx/drivers/lcd/nokia6100.c @@ -3,7 +3,7 @@ * Nokia 6100 LCD Display Driver * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * "Nokia 6100 LCD Display Driver," Revision 1, James P. Lynch ("Nokia 6100 LCD diff --git a/nuttx/drivers/lcd/pcf8833.h b/nuttx/drivers/lcd/pcf8833.h index b0a7e14d41..36dc65ac3f 100644 --- a/nuttx/drivers/lcd/pcf8833.h +++ b/nuttx/drivers/lcd/pcf8833.h @@ -1,152 +1,152 @@ -/************************************************************************************** - * drivers/lcd/pcf8833.h - * Definitions for the Phillips PCF8833 LCD controller - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * References: "Data Sheet, PCF8833 STN RGB 132x132x3 driver," Phillips, 2003 Feb 14. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************************/ - -#ifndef __DRIVERS_LCD_PCF8833_H -#define __DRIVERS_LCD_PCF8833_H - -/************************************************************************************** - * Included Files - **************************************************************************************/ - -/************************************************************************************** - * Pre-processor Definitions - **************************************************************************************/ -/* Pixel format codes */ - -#define PCF8833_FMT_8BPS (2) -#define PCF8833_FMT_12BPS (3) -#define PCF8833_FMT_16BPS (5) - -/* LCD Commands */ - -#define PCF8833_NOP 0x00 /* No operation; Data: none */ -#define PCF8833_SWRESET 0x01 /* Software reset ; Data: none */ -#define PCF8833_BSTROFF 0x02 /* Booster voltage off; Data: none */ -#define PCF8833_BSTRON 0x03 /* Booster voltage on; Data: none */ -#define PCF8833_RDDIDIF 0x04 /* Read display identification; Data: none */ -#define PCF8833_RDDST 0x09 /* Read display status; Data: none */ -#define PCF8833_SLEEPIN 0x10 /* Sleep_IN; Data: none */ -#define PCF8833_SLEEPOUT 0x11 /* Sleep_OUT; Data: none */ -#define PCF8833_PTLON 0x12 /* Partial mode on; Data: none */ -#define PCF8833_NORON 0x13 /* Normal Display mode on; Data: none */ -#define PCF8833_INVOFF 0x20 /* Display inversion off; Data: none */ -#define PCF8833_INVON 0x21 /* Display inversion on; Data: none */ -#define PCF8833_DALO 0x22 /* All pixel off; Data: none */ -#define PCF8833_DAL 0x23 /* All pixel on; Data: none */ -#define PCF8833_SETCON 0x25 /* Set contrast; Data: (1) contrast */ -#define PCF8833_DISPOFF 0x28 /* Display off; Data: none */ -#define PCF8833_DISPON 0x29 /* Display on; Data: none */ -#define PCF8833_CASET 0x2a /* Column address set; Data: (1) X start (2) X end */ -#define PCF8833_PASET 0x2b /* Page address set Data: (1) Y start (2) Y end */ -#define PCF8833_RAMWR 0x2c /* Memory write; Data: (1) write data */ -#define PCF8833_RGBSET 0x2d /* Colour set; Data: (1-8) red tones, (9-16) green tones, (17-20) blue tones */ -#define PCF8833_PTLAR 0x30 /* Partial area; Data: (1) start address (2) end address */ -#define PCF8833_VSCRDEF 0x33 /* Vertical scroll definition; Data: (1) top fixed, (2) scrol area, (3) bottom fixed */ -#define PCF8833_TEOFF 0x34 /* Tearing line off; Data: none */ -#define PCF8833_TEON 0x35 /* Tearing line on; Data: (1) don't care */ -#define PCF8833_MADCTL 0x36 /* Memory data access control; Data: (1) access control settings */ -#define PCF8833_SEP 0x37 /* Set Scroll Entry Point; Data: (1) scroll entry point */ -#define PCF8833_IDMOFF 0x38 /* Idle mode off; Data: none */ -#define PCF8833_IDMON 0x39 /* Idle mode on; Data: none */ -#define PCF8833_COLMOD 0x3a /* Interface pixel format; Data: (1) color interface format */ -#define PCF8833_SETVOP 0xb0 /* Set VOP; Data: (1) VOP5-8 (2) VOP0-4 */ -#define PCF8833_BRS 0xb4 /* Bottom Row Swap; Data: none */ -#define PCF8833_TRS 0xb6 /* Top Row Swap; Data: none */ -#define PCF8833_FINV 0xb9 /* Super Frame INVersion; Data: none */ -#define PCF8833_DOR 0xba /* Data ORder; Data: none */ -#define PCF8833_TCDFE 0xbd /* Enable/disable DF temp comp; Data: none */ -#define PCF8833_TCVOPE 0xbf /* Enable or disable VOP temp comp; Data: none */ -#define PCF8833_EC 0xc0 /* Internal or external oscillator; Data: none */ -#define PCF8833_SETMUL 0xc2 /* Set multiplication factor; Data: (1) Multiplication factor */ -#define PCF8833_TCVOPAB 0xc3 /* Set TCVOP slopes A and B; Data: (1) SLB and SLA */ -#define PCF8833_TCVOPCD 0xc4 /* Set TCVOP slopes C and D; Data: (1) SLD and SLC */ -#define PCF8833_TCDF 0xc5 /* Set divider frequency; Data: Divider factor in region (1) A (2) B (3) C (4) D */ -#define PCF8833_DF8COLOR 0xc6 /* Set divider frequency 8-colour mode; Data: (1) DF80-6 */ -#define PCF8833_SETBS 0xc7 /* Set bias system; Data: (1) Bias systems */ -#define PCF8833_RDTEMP 0xc8 /* Temperature read back; Data: none */ -#define PCF8833_NLI 0xc9 /* N-Line Inversion; Data: (1) NLI time slots invervsion */ -#define PCF8833_RDID1 0xda /* Read ID1; Data: none */ -#define PCF8833_RDID2 0xdb /* Read ID2; Data: none */ -#define PCF8833_RDID3 0xdc /* Read ID3; Data: none */ -#define PCF8833_SFD 0xef /* Select factory defaults; Data: none */ -#define PCF8833_ECM 0xf0 /* Enter Calibration mode; Data: (1) Calibration control settings */ -#define PCF8833_OTPSHTIN 0xf1 /* Shift data in OTP shift registers; Data: Any number of bytes */ - -/* Memory data access control (MADCTL) bit definitions */ - -#define MADCTL_RGB (1 << 3) /* Bit 3: BGR */ -#define MADCTL_LAO (1 << 4) /* Bit 4: Line address order bottom to top */ -#define MADCTL_V (1 << 5) /* Bit 5: Vertical RAM write; in Y direction */ -#define MADCTL_MX (1 << 6) /* Bit 6: Mirror X */ -#define MADCTL_MY (1 << 7) /* Bit 7: Mirror Y */ - -/* PCF8833 status register bit definitions */ -/* CMD format: RDDST command followed by four status bytes: */ -/* Byte 1: D31 d30 D29 D28 D27 D26 --- --- */ - -#define PCF8833_ST_RGB (1 << 2) /* Bit 2: D26 - RGB/BGR order */ -#define PCF8833_ST_LINEADDR (1 << 3) /* Bit 3: D27 - Line address order */ -#define PCF8833_ST_ADDRMODE (1 << 4) /* Bit 4: D28 - Vertical/horizontal addressing mode */ -#define PCF8833_ST_XADDR (1 << 5) /* Bit 5: D29 - X address order */ -#define PCF8833_ST_YADDR (1 << 6) /* Bit 6: D30 - Y address order */ -#define PCF8833_ST_BOOSTER (1 << 7) /* Bit 7: D31 - Booster voltage status */ - -/* Byte 2: --- D22 D21 D20 D19 D18 D17 D16 */ - -#define PCF8833_ST_NORMAL (1 << 0) /* Bit 0: D16 - Normal display mode */ -#define PCF8833_ST_SLEEPIN (1 << 1) /* Bit 1: D17 - Sleep in selected */ -#define PCF8833_ST_PARTIAL (1 << 2) /* Bit 2: D18 - Partial mode on */ -#define PCF8833_ST_IDLE (1 << 3) /* Bit 3: D19 - Idle mode selected */ -#define PCF8833_ST_PIXELFMT_SHIFT (4) /* Bits 4-6: D20-D22 - Interface pixel format */ -#define PCF8833_ST_PIXELFMT_MASK (7 << PCF8833_ST_PIXELFMT_SHIFT) -# define PCF8833_ST_PIXELFMT_8BPS (PCF8833_FMT_8BPS << PCF8833_ST_PIXELFMT_SHIFT) -# define PCF8833_ST_PIXELFMT_12BPS (PCF8833_FMT_12BPS << PCF8833_ST_PIXELFMT_SHIFT) -# define PCF8833_ST_PIXELFMT_16BPS (PCF8833_FMT_16BPS << PCF8833_ST_PIXELFMT_SHIFT) - -/* Byte 3: D15 -- D13 D12 D11 D10 D9 --- */ - -#define PCF8833_ST_TEARING (1 << 1) /* Bit 1: D9 - Tearing effect on */ -#define PCF8833_ST_DISPLAYON (1 << 2) /* Bit 2: D10 - Display on */ -#define PCF8833_ST_PIXELSOFF (1 << 3) /* Bit 3: D11 - All pixels off */ -#define PCF8833_ST_PIXELSON (1 << 4) /* Bit 4: D12 - All pixels on */ -#define PCF8833_ST_INV (1 << 5) /* Bit 5: D13 - Display inversion */ -#define PCF8833_ST_VSCROLL (1 << 7) /* Bit 6: D15 - Vertical scroll mode */ - -/* Byte 4: All zero */ - +/************************************************************************************** + * drivers/lcd/pcf8833.h + * Definitions for the Phillips PCF8833 LCD controller + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * References: "Data Sheet, PCF8833 STN RGB 132x132x3 driver," Phillips, 2003 Feb 14. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************************/ + +#ifndef __DRIVERS_LCD_PCF8833_H +#define __DRIVERS_LCD_PCF8833_H + +/************************************************************************************** + * Included Files + **************************************************************************************/ + +/************************************************************************************** + * Pre-processor Definitions + **************************************************************************************/ +/* Pixel format codes */ + +#define PCF8833_FMT_8BPS (2) +#define PCF8833_FMT_12BPS (3) +#define PCF8833_FMT_16BPS (5) + +/* LCD Commands */ + +#define PCF8833_NOP 0x00 /* No operation; Data: none */ +#define PCF8833_SWRESET 0x01 /* Software reset ; Data: none */ +#define PCF8833_BSTROFF 0x02 /* Booster voltage off; Data: none */ +#define PCF8833_BSTRON 0x03 /* Booster voltage on; Data: none */ +#define PCF8833_RDDIDIF 0x04 /* Read display identification; Data: none */ +#define PCF8833_RDDST 0x09 /* Read display status; Data: none */ +#define PCF8833_SLEEPIN 0x10 /* Sleep_IN; Data: none */ +#define PCF8833_SLEEPOUT 0x11 /* Sleep_OUT; Data: none */ +#define PCF8833_PTLON 0x12 /* Partial mode on; Data: none */ +#define PCF8833_NORON 0x13 /* Normal Display mode on; Data: none */ +#define PCF8833_INVOFF 0x20 /* Display inversion off; Data: none */ +#define PCF8833_INVON 0x21 /* Display inversion on; Data: none */ +#define PCF8833_DALO 0x22 /* All pixel off; Data: none */ +#define PCF8833_DAL 0x23 /* All pixel on; Data: none */ +#define PCF8833_SETCON 0x25 /* Set contrast; Data: (1) contrast */ +#define PCF8833_DISPOFF 0x28 /* Display off; Data: none */ +#define PCF8833_DISPON 0x29 /* Display on; Data: none */ +#define PCF8833_CASET 0x2a /* Column address set; Data: (1) X start (2) X end */ +#define PCF8833_PASET 0x2b /* Page address set Data: (1) Y start (2) Y end */ +#define PCF8833_RAMWR 0x2c /* Memory write; Data: (1) write data */ +#define PCF8833_RGBSET 0x2d /* Colour set; Data: (1-8) red tones, (9-16) green tones, (17-20) blue tones */ +#define PCF8833_PTLAR 0x30 /* Partial area; Data: (1) start address (2) end address */ +#define PCF8833_VSCRDEF 0x33 /* Vertical scroll definition; Data: (1) top fixed, (2) scrol area, (3) bottom fixed */ +#define PCF8833_TEOFF 0x34 /* Tearing line off; Data: none */ +#define PCF8833_TEON 0x35 /* Tearing line on; Data: (1) don't care */ +#define PCF8833_MADCTL 0x36 /* Memory data access control; Data: (1) access control settings */ +#define PCF8833_SEP 0x37 /* Set Scroll Entry Point; Data: (1) scroll entry point */ +#define PCF8833_IDMOFF 0x38 /* Idle mode off; Data: none */ +#define PCF8833_IDMON 0x39 /* Idle mode on; Data: none */ +#define PCF8833_COLMOD 0x3a /* Interface pixel format; Data: (1) color interface format */ +#define PCF8833_SETVOP 0xb0 /* Set VOP; Data: (1) VOP5-8 (2) VOP0-4 */ +#define PCF8833_BRS 0xb4 /* Bottom Row Swap; Data: none */ +#define PCF8833_TRS 0xb6 /* Top Row Swap; Data: none */ +#define PCF8833_FINV 0xb9 /* Super Frame INVersion; Data: none */ +#define PCF8833_DOR 0xba /* Data ORder; Data: none */ +#define PCF8833_TCDFE 0xbd /* Enable/disable DF temp comp; Data: none */ +#define PCF8833_TCVOPE 0xbf /* Enable or disable VOP temp comp; Data: none */ +#define PCF8833_EC 0xc0 /* Internal or external oscillator; Data: none */ +#define PCF8833_SETMUL 0xc2 /* Set multiplication factor; Data: (1) Multiplication factor */ +#define PCF8833_TCVOPAB 0xc3 /* Set TCVOP slopes A and B; Data: (1) SLB and SLA */ +#define PCF8833_TCVOPCD 0xc4 /* Set TCVOP slopes C and D; Data: (1) SLD and SLC */ +#define PCF8833_TCDF 0xc5 /* Set divider frequency; Data: Divider factor in region (1) A (2) B (3) C (4) D */ +#define PCF8833_DF8COLOR 0xc6 /* Set divider frequency 8-colour mode; Data: (1) DF80-6 */ +#define PCF8833_SETBS 0xc7 /* Set bias system; Data: (1) Bias systems */ +#define PCF8833_RDTEMP 0xc8 /* Temperature read back; Data: none */ +#define PCF8833_NLI 0xc9 /* N-Line Inversion; Data: (1) NLI time slots invervsion */ +#define PCF8833_RDID1 0xda /* Read ID1; Data: none */ +#define PCF8833_RDID2 0xdb /* Read ID2; Data: none */ +#define PCF8833_RDID3 0xdc /* Read ID3; Data: none */ +#define PCF8833_SFD 0xef /* Select factory defaults; Data: none */ +#define PCF8833_ECM 0xf0 /* Enter Calibration mode; Data: (1) Calibration control settings */ +#define PCF8833_OTPSHTIN 0xf1 /* Shift data in OTP shift registers; Data: Any number of bytes */ + +/* Memory data access control (MADCTL) bit definitions */ + +#define MADCTL_RGB (1 << 3) /* Bit 3: BGR */ +#define MADCTL_LAO (1 << 4) /* Bit 4: Line address order bottom to top */ +#define MADCTL_V (1 << 5) /* Bit 5: Vertical RAM write; in Y direction */ +#define MADCTL_MX (1 << 6) /* Bit 6: Mirror X */ +#define MADCTL_MY (1 << 7) /* Bit 7: Mirror Y */ + +/* PCF8833 status register bit definitions */ +/* CMD format: RDDST command followed by four status bytes: */ +/* Byte 1: D31 d30 D29 D28 D27 D26 --- --- */ + +#define PCF8833_ST_RGB (1 << 2) /* Bit 2: D26 - RGB/BGR order */ +#define PCF8833_ST_LINEADDR (1 << 3) /* Bit 3: D27 - Line address order */ +#define PCF8833_ST_ADDRMODE (1 << 4) /* Bit 4: D28 - Vertical/horizontal addressing mode */ +#define PCF8833_ST_XADDR (1 << 5) /* Bit 5: D29 - X address order */ +#define PCF8833_ST_YADDR (1 << 6) /* Bit 6: D30 - Y address order */ +#define PCF8833_ST_BOOSTER (1 << 7) /* Bit 7: D31 - Booster voltage status */ + +/* Byte 2: --- D22 D21 D20 D19 D18 D17 D16 */ + +#define PCF8833_ST_NORMAL (1 << 0) /* Bit 0: D16 - Normal display mode */ +#define PCF8833_ST_SLEEPIN (1 << 1) /* Bit 1: D17 - Sleep in selected */ +#define PCF8833_ST_PARTIAL (1 << 2) /* Bit 2: D18 - Partial mode on */ +#define PCF8833_ST_IDLE (1 << 3) /* Bit 3: D19 - Idle mode selected */ +#define PCF8833_ST_PIXELFMT_SHIFT (4) /* Bits 4-6: D20-D22 - Interface pixel format */ +#define PCF8833_ST_PIXELFMT_MASK (7 << PCF8833_ST_PIXELFMT_SHIFT) +# define PCF8833_ST_PIXELFMT_8BPS (PCF8833_FMT_8BPS << PCF8833_ST_PIXELFMT_SHIFT) +# define PCF8833_ST_PIXELFMT_12BPS (PCF8833_FMT_12BPS << PCF8833_ST_PIXELFMT_SHIFT) +# define PCF8833_ST_PIXELFMT_16BPS (PCF8833_FMT_16BPS << PCF8833_ST_PIXELFMT_SHIFT) + +/* Byte 3: D15 -- D13 D12 D11 D10 D9 --- */ + +#define PCF8833_ST_TEARING (1 << 1) /* Bit 1: D9 - Tearing effect on */ +#define PCF8833_ST_DISPLAYON (1 << 2) /* Bit 2: D10 - Display on */ +#define PCF8833_ST_PIXELSOFF (1 << 3) /* Bit 3: D11 - All pixels off */ +#define PCF8833_ST_PIXELSON (1 << 4) /* Bit 4: D12 - All pixels on */ +#define PCF8833_ST_INV (1 << 5) /* Bit 5: D13 - Display inversion */ +#define PCF8833_ST_VSCROLL (1 << 7) /* Bit 6: D15 - Vertical scroll mode */ + +/* Byte 4: All zero */ + #endif /* __DRIVERS_LCD_PCF8833_H */ \ No newline at end of file diff --git a/nuttx/drivers/lcd/s1d15g10.h b/nuttx/drivers/lcd/s1d15g10.h index df2dd8be27..9b5f7738fe 100644 --- a/nuttx/drivers/lcd/s1d15g10.h +++ b/nuttx/drivers/lcd/s1d15g10.h @@ -1,141 +1,141 @@ -/************************************************************************************** - * drivers/lcd/s1d15g10.h - * Definitions for the Epson S1D15G0 LCD controller - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * References: S1D15G0D08B000, Seiko Epson Corportation, 2002. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************************/ - -#ifndef __DRIVERS_LCD_S1D15G10_H -#define __DRIVERS_LCD_S1D15G10_H - -/************************************************************************************** - * Included Files - **************************************************************************************/ - -/************************************************************************************** - * Pre-processor Definitions - **************************************************************************************/ - -/* Epson S1D15G10 Command Set */ - -#define S1D15G10_DISON 0xaf /* Display on; Data: none */ -#define S1D15G10_DISOFF 0xae /* Display off; Data: none */ -#define S1D15G10_DISNOR 0xa6 /* Normal display; Data: none */ -#define S1D15G10_DISINV 0xa7 /* Inverse display; Data: none */ -#define S1D15G10_COMSCN 0xbb /* Common scan direction; Data: (1) common scan direction */ -#define S1D15G10_DISCTL 0xca /* Display control; Data: Data: (1) CL div, F1/2 pat, (2) duty, (3) FR inverse (4) dispersion */ -#define S1D15G10_SLPIN 0x95 /* Sleep in; Data: none */ -#define S1D15G10_SLPOUT 0x94 /* Sleep out; Data: none */ -#define S1D15G10_PASET 0x75 /* Page address set; Data: (1) start page, (2) end page */ -#define S1D15G10_CASET 0x15 /* Column address set; Data: (1) start addr, (2) end addr */ -#define S1D15G10_DATCTL 0xbc /* Data scan direction, etc.; Data: (1) inverse, scan dir (2) RGB, (3) gray-scale */ -#define S1D15G10_RGBSET8 0xce /* 256-color position set; Data: (1-8) red tones, (9-16) green tones, (17-20) blue tones */ -#define S1D15G10_RAMWR 0x5c /* Writing to memory; Data: (1) write data */ -#define S1D15G10_RAMRD 0x5d /* Reading from memory; Data: (1) read data */ -#define S1D15G10_PTLIN 0xa8 /* Partial display in; Data: (1) start addr, (2) end addr */ -#define S1D15G10_PTLOUT 0xa9 /* Partial display out; Data: none */ -#define S1D15G10_RMWIN 0xe0 /* Read and modify write; Data: none */ -#define S1D15G10_RMWOUT 0xee /* End; Data: none */ -#define S1D15G10_ASCSET 0xaa /* Area scroll set; Data: (1) top addr, (2) bottom addr, (3) Num blocks, (4) scroll mode */ -#define S1D15G10_SCSTART 0xab /* Scroll start set; Data: (1) start block addr */ -#define S1D15G10_OSCON 0xd1 /* Internal oscillation on; Data: none */ -#define S1D15G10_OSCOFF 0xd2 /* Internal oscillation off; Data: none */ -#define S1D15G10_PWRCTR 0x20 /* Power control; Data: (1) LCD drive power */ -#define S1D15G10_VOLCTR 0x81 /* Electronic volume control; Data: (1) volume value, (2) resistance ratio */ -#define S1D15G10_VOLUP 0xd6 /* Increment electronic control by 1; Data: none */ -#define S1D15G10_VOLDOWN 0xd7 /* Decrement electronic control by 1; Data: none */ -#define S1D15G10_TMPGRD 0x82 /* Temperature gradient set; Data: (1-14) temperature gradient */ -#define S1D15G10_EPCTIN 0xcd /* Control EEPROM; Data: (1) read/write */ -#define S1D15G10_EPCOUT 0xcc /* Cancel EEPROM control; Data: none */ -#define S1D15G10_EPMWR 0xfc /* Write into EEPROM; Data: none */ -#define S1D15G10_EPMRD 0xfd /* Read from EEPROM; Data: none */ -#define S1D15G10_EPSRRD1 0x7c /* Read register 1; Data: none */ -#define S1D15G10_EPSRRD2 0x7d /* Read regiser 2; Data: none */ -#define S1D15G10_NOP 0x25 /* NOP intruction (0x45?); Data: none */ -#define S1D15G10_STREAD 0x20 /* Status read; Data: none */ - -/* Display control (DISCTL) bit definitions */ - -#define DISCTL_PERIOD_SHIFT (0) /* P1: Bits 0-1, F1 and F2 drive-pattern switching period */ -#define DISCTL_PERIOD_MASK (3 << DISCTL_PERIOD_SHIFT) -# define DISCTL_PERIOD_8 (0 << DISCTL_PERIOD_SHIFT) -# define DISCTL_PERIOD_4 (1 << DISCTL_PERIOD_SHIFT) -# define DISCTL_PERIOD_16 (2 << DISCTL_PERIOD_SHIFT) -# define DISCTL_PERIOD_FLD (3 << DISCTL_PERIOD_SHIFT) -#define DISCTL_CLDIV_SHIFT (2) /* P1: Bits 2-4, Clock divider */ -#define DISCTL_CLDIV_MASK (7 << DISCTL_CLDIV_SHIFT) -# define DISCTL_CLDIV_2 (0 << DISCTL_CLDIV_SHIFT) -# define DISCTL_CLDIV_4 (1 << DISCTL_CLDIV_SHIFT) -# define DISCTL_CLDIV_8 (2 << DISCTL_CLDIV_SHIFT) -# define DISCTL_CLDIV_NONE (3 << DISCTL_CLDIV_SHIFT) - -/* Power control (PWRCTR) bit definitions */ - -#define PWCTR_REFVOLTAGE (1 << 0) /* P1: Bit 0, Turn on reference voltage generation circuit. */ -#define PWCTR_REGULATOR (1 << 1) /* P1: Bit 1, Turn on voltage regulator and circuit voltage follower. */ -#define PWCTR_BOOSTER2 (1 << 2) /* P1: Bit 2, Turn on secondary booster/step-down circuit. */ -#define PWCTR_BOOSTER1 (1 << 3) /* P1: Bit 3, Turn on primary booster circuit. */ -#define PWCTR_EXTR (1 << 4) /* P1: Bit 4, Use external resistance to adjust voltage. */ - -/* Data control (DATCTL) bit definitions */ - -#define DATCTL_PGADDR_INV (1 << 0) /* P1: Bit 0, Inverse display of the page address. */ -#define DATCTL_COLADDR_REV (1 << 1) /* P1: Bit 1, Reverse turn of column address. */ -#define DATCTL_ADDR_PGDIR (1 << 2) /* P1: Bit 2, Address-scan direction in page (vs column) direction. */ - -#define DATCTL_BGR (1 << 0) /* P2: Bit0, RGB->BGR */ - -#define DATCTL_8GRAY (1) /* P3: Bits 0-2 = 001, 8 gray-scale */ -#define DATCTL_16GRAY_A (2) /* P3: Bits 0-2 = 010, 16 gray-scale display type A */ -#define DATCTL_16GRAY_B (4) /* P3: Bits 0-2 = 100, 16 gray-scale display type B */ - -/* Status register bit definions (after reset or NOP) */ - -#define S1D15G10_SR_PARTIAL (1 << 0) /* Bit 0: Partial display */ -#define S1D15G10_SR_NORMAL (1 << 1) /* Bit 1: Normal (vs. inverse) display */ -#define S1D15G10_SR_EEPROM (1 << 2) /* Bit 2: EEPROM access */ -#define S1D15G10_SR_DISPON (1 << 3) /* Bit 3: Display on */ -#define S1D15G10_SR_COLSCAN (1 << 4) /* Bit 4: Column (vs. page) scan direction */ -#define S1D15G10_SR_RMW (1 << 5) /* Bit 5: Read modify write */ -#define S1D15G10_SR_SCROLL (3 << 6) /* Bits 6-7: Area scroll mode */ - -/* Status register bit definions (after EPSRRD1) */ - -#define S1D15G10_SR_VOLUME 0x3f /* Bits 0-5: Electronic volume control values */ - -/* Status register bit definions (after EPSRRD2) */ - -#define S1D15G10_SR_RRATIO 0x07 /* Bits 0-2: Built-in resistance ratio */ - +/************************************************************************************** + * drivers/lcd/s1d15g10.h + * Definitions for the Epson S1D15G0 LCD controller + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * References: S1D15G0D08B000, Seiko Epson Corportation, 2002. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************************/ + +#ifndef __DRIVERS_LCD_S1D15G10_H +#define __DRIVERS_LCD_S1D15G10_H + +/************************************************************************************** + * Included Files + **************************************************************************************/ + +/************************************************************************************** + * Pre-processor Definitions + **************************************************************************************/ + +/* Epson S1D15G10 Command Set */ + +#define S1D15G10_DISON 0xaf /* Display on; Data: none */ +#define S1D15G10_DISOFF 0xae /* Display off; Data: none */ +#define S1D15G10_DISNOR 0xa6 /* Normal display; Data: none */ +#define S1D15G10_DISINV 0xa7 /* Inverse display; Data: none */ +#define S1D15G10_COMSCN 0xbb /* Common scan direction; Data: (1) common scan direction */ +#define S1D15G10_DISCTL 0xca /* Display control; Data: Data: (1) CL div, F1/2 pat, (2) duty, (3) FR inverse (4) dispersion */ +#define S1D15G10_SLPIN 0x95 /* Sleep in; Data: none */ +#define S1D15G10_SLPOUT 0x94 /* Sleep out; Data: none */ +#define S1D15G10_PASET 0x75 /* Page address set; Data: (1) start page, (2) end page */ +#define S1D15G10_CASET 0x15 /* Column address set; Data: (1) start addr, (2) end addr */ +#define S1D15G10_DATCTL 0xbc /* Data scan direction, etc.; Data: (1) inverse, scan dir (2) RGB, (3) gray-scale */ +#define S1D15G10_RGBSET8 0xce /* 256-color position set; Data: (1-8) red tones, (9-16) green tones, (17-20) blue tones */ +#define S1D15G10_RAMWR 0x5c /* Writing to memory; Data: (1) write data */ +#define S1D15G10_RAMRD 0x5d /* Reading from memory; Data: (1) read data */ +#define S1D15G10_PTLIN 0xa8 /* Partial display in; Data: (1) start addr, (2) end addr */ +#define S1D15G10_PTLOUT 0xa9 /* Partial display out; Data: none */ +#define S1D15G10_RMWIN 0xe0 /* Read and modify write; Data: none */ +#define S1D15G10_RMWOUT 0xee /* End; Data: none */ +#define S1D15G10_ASCSET 0xaa /* Area scroll set; Data: (1) top addr, (2) bottom addr, (3) Num blocks, (4) scroll mode */ +#define S1D15G10_SCSTART 0xab /* Scroll start set; Data: (1) start block addr */ +#define S1D15G10_OSCON 0xd1 /* Internal oscillation on; Data: none */ +#define S1D15G10_OSCOFF 0xd2 /* Internal oscillation off; Data: none */ +#define S1D15G10_PWRCTR 0x20 /* Power control; Data: (1) LCD drive power */ +#define S1D15G10_VOLCTR 0x81 /* Electronic volume control; Data: (1) volume value, (2) resistance ratio */ +#define S1D15G10_VOLUP 0xd6 /* Increment electronic control by 1; Data: none */ +#define S1D15G10_VOLDOWN 0xd7 /* Decrement electronic control by 1; Data: none */ +#define S1D15G10_TMPGRD 0x82 /* Temperature gradient set; Data: (1-14) temperature gradient */ +#define S1D15G10_EPCTIN 0xcd /* Control EEPROM; Data: (1) read/write */ +#define S1D15G10_EPCOUT 0xcc /* Cancel EEPROM control; Data: none */ +#define S1D15G10_EPMWR 0xfc /* Write into EEPROM; Data: none */ +#define S1D15G10_EPMRD 0xfd /* Read from EEPROM; Data: none */ +#define S1D15G10_EPSRRD1 0x7c /* Read register 1; Data: none */ +#define S1D15G10_EPSRRD2 0x7d /* Read regiser 2; Data: none */ +#define S1D15G10_NOP 0x25 /* NOP intruction (0x45?); Data: none */ +#define S1D15G10_STREAD 0x20 /* Status read; Data: none */ + +/* Display control (DISCTL) bit definitions */ + +#define DISCTL_PERIOD_SHIFT (0) /* P1: Bits 0-1, F1 and F2 drive-pattern switching period */ +#define DISCTL_PERIOD_MASK (3 << DISCTL_PERIOD_SHIFT) +# define DISCTL_PERIOD_8 (0 << DISCTL_PERIOD_SHIFT) +# define DISCTL_PERIOD_4 (1 << DISCTL_PERIOD_SHIFT) +# define DISCTL_PERIOD_16 (2 << DISCTL_PERIOD_SHIFT) +# define DISCTL_PERIOD_FLD (3 << DISCTL_PERIOD_SHIFT) +#define DISCTL_CLDIV_SHIFT (2) /* P1: Bits 2-4, Clock divider */ +#define DISCTL_CLDIV_MASK (7 << DISCTL_CLDIV_SHIFT) +# define DISCTL_CLDIV_2 (0 << DISCTL_CLDIV_SHIFT) +# define DISCTL_CLDIV_4 (1 << DISCTL_CLDIV_SHIFT) +# define DISCTL_CLDIV_8 (2 << DISCTL_CLDIV_SHIFT) +# define DISCTL_CLDIV_NONE (3 << DISCTL_CLDIV_SHIFT) + +/* Power control (PWRCTR) bit definitions */ + +#define PWCTR_REFVOLTAGE (1 << 0) /* P1: Bit 0, Turn on reference voltage generation circuit. */ +#define PWCTR_REGULATOR (1 << 1) /* P1: Bit 1, Turn on voltage regulator and circuit voltage follower. */ +#define PWCTR_BOOSTER2 (1 << 2) /* P1: Bit 2, Turn on secondary booster/step-down circuit. */ +#define PWCTR_BOOSTER1 (1 << 3) /* P1: Bit 3, Turn on primary booster circuit. */ +#define PWCTR_EXTR (1 << 4) /* P1: Bit 4, Use external resistance to adjust voltage. */ + +/* Data control (DATCTL) bit definitions */ + +#define DATCTL_PGADDR_INV (1 << 0) /* P1: Bit 0, Inverse display of the page address. */ +#define DATCTL_COLADDR_REV (1 << 1) /* P1: Bit 1, Reverse turn of column address. */ +#define DATCTL_ADDR_PGDIR (1 << 2) /* P1: Bit 2, Address-scan direction in page (vs column) direction. */ + +#define DATCTL_BGR (1 << 0) /* P2: Bit0, RGB->BGR */ + +#define DATCTL_8GRAY (1) /* P3: Bits 0-2 = 001, 8 gray-scale */ +#define DATCTL_16GRAY_A (2) /* P3: Bits 0-2 = 010, 16 gray-scale display type A */ +#define DATCTL_16GRAY_B (4) /* P3: Bits 0-2 = 100, 16 gray-scale display type B */ + +/* Status register bit definions (after reset or NOP) */ + +#define S1D15G10_SR_PARTIAL (1 << 0) /* Bit 0: Partial display */ +#define S1D15G10_SR_NORMAL (1 << 1) /* Bit 1: Normal (vs. inverse) display */ +#define S1D15G10_SR_EEPROM (1 << 2) /* Bit 2: EEPROM access */ +#define S1D15G10_SR_DISPON (1 << 3) /* Bit 3: Display on */ +#define S1D15G10_SR_COLSCAN (1 << 4) /* Bit 4: Column (vs. page) scan direction */ +#define S1D15G10_SR_RMW (1 << 5) /* Bit 5: Read modify write */ +#define S1D15G10_SR_SCROLL (3 << 6) /* Bits 6-7: Area scroll mode */ + +/* Status register bit definions (after EPSRRD1) */ + +#define S1D15G10_SR_VOLUME 0x3f /* Bits 0-5: Electronic volume control values */ + +/* Status register bit definions (after EPSRRD2) */ + +#define S1D15G10_SR_RRATIO 0x07 /* Bits 0-2: Built-in resistance ratio */ + #endif /* __DRIVERS_LCD_S1D15G10_H */ \ No newline at end of file diff --git a/nuttx/drivers/lcd/skeleton.c b/nuttx/drivers/lcd/skeleton.c index 1cb8b5955b..83aa92018c 100644 --- a/nuttx/drivers/lcd/skeleton.c +++ b/nuttx/drivers/lcd/skeleton.c @@ -2,7 +2,7 @@ * drivers/lcd/skeleton.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/lcd/ssd1305.h b/nuttx/drivers/lcd/ssd1305.h index 87c955de4d..34678fa80d 100644 --- a/nuttx/drivers/lcd/ssd1305.h +++ b/nuttx/drivers/lcd/ssd1305.h @@ -1,211 +1,211 @@ -/************************************************************************************** - * drivers/lcd/ssd1305.h - * Definitions for the Solomon Systech SSD1305 132x64 Dot Matrix OLED/PLED - * Segment/Common Driver with C - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * References: SSD1305.pdf, "Solomon Systech SSD1305 132x64 Dot Matrix OLED/PLED - * Segment/Common Driver with Controller," Solomon Systech Limited, - * http://www.solomon-systech.com, May, 2008. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - **************************************************************************************/ - -#ifndef __DRIVERS_LCD_SSD1305_H -#define __DRIVERS_LCD_SSD1305_H - -/************************************************************************************** - * Included Files - **************************************************************************************/ - -/************************************************************************************** - * Pre-processor Definitions - **************************************************************************************/ -/* General Definitions ******************************************************/ - -#define SSD1305_COLORA 0 -#define SSD1305_COLORB 1 -#define SSD1305_COLORC 2 -#define SSD1305_COLORD 3 - -/* Fundamental Commands *****************************************************/ -#define SSD1305_SETCOLL 0x00 /* 0x00-0x0f: Set lower column address */ -# define SSD1305_COLL_MASK 0x0f -#define SSD1305_SETCOLH 0x10 /* 0x10-0x1f: Set higher column address */ -# define SSD1305_COLH_MASK 0x0f -#define SSD1305_ADDRMODE 0x20 /* 0x20: Set memory address mode */ -# define SSD1305_ADDRMODE_HOR 0x00 /* Data 1: Set horizontal address mode */ -# define SSD1305_ADDRMODE_VIRT 0x01 /* Data 1: Set virtal address mode */ -# define SSD1305_ADDRMODE_PAGE 0x02 /* Data 1: Set page address mode */ -#define SSD1305_SETCOLADDR 0x21 /* 0x21: Set column address */ - /* Data 1: Column start address: 0-131 */ - /* Data 2: Column end address: 0-131 */ -#define SSD1305_SETPAGEADDR 0x22 /* 0x22: Set page address */ - /* Data 1: Page start address: 0x00-0x7d */ - /* Data 2: Page end address: 0x00-0x7d */ -#define SSD1305_SETSTARTLINE 0x40 /* 0x40-7f: Set display start line */ -# define SSD1305_STARTLINE_MASK 0x3f - -#define SSD1305_SETCONTRAST 0x81 /* 0x81: Set contrast control */ - /* Data 1: Set 1 of 256 contrast steps */ -#define SSD1305_SETBRIGHTNESS 0x82 /* 0x82: Set brightness */ - /* Data 1: Set 1 of 256 contrast steps */ -#define SSD1305_SETLUT 0x91 /* 0x01: Set lookup table */ - /* Data 1: Pulse width: 31-63 */ - /* Data 2: Color A: 31-63 */ - /* Data 3: Color B: 31-63 */ - /* Data 4: Color C: 31-63 */ -#define SSD1305_SETBANKCOLOR1 0x92 /* 0x92: Set bank 1-16 color */ -# define SSD1305_SETBANK1(c) (c) /* Data 1, Bits 0-1: Bank 1 color */ -# define SSD1305_SETBANK2(c) (c << 2) /* Data 1, Bits 2-3: Bank 2 color */ -# define SSD1305_SETBANK3(c) (c << 4) /* Data 1, Bits 4-5: Bank 3 color */ -# define SSD1305_SETBANK4(c) (c << 6) /* Data 1, Bits 6-7: Bank 4 color */ -# define SSD1305_SETBANK5(c) (c) /* Data 2, Bits 0-1: Bank 5 color */ -# define SSD1305_SETBANK6(c) (c << 2) /* Data 2, Bits 2-3: Bank 6 color */ -# define SSD1305_SETBANK7(c) (c << 4) /* Data 2, Bits 4-5: Bank 7 color */ -# define SSD1305_SETBANK8(c) (c << 6) /* Data 2, Bits 6-7: Bank 8 color */ -# define SSD1305_SETBANK9(c) (c) /* Data 3, Bits 0-1: Bank 9 color */ -# define SSD1305_SETBANK10(c) (c << 2) /* Data 3, Bits 2-3: Bank 10 color */ -# define SSD1305_SETBANK11(c) (c << 4) /* Data 3, Bits 4-5: Bank 11 color */ -# define SSD1305_SETBANK12(c) (c << 6) /* Data 3, Bits 6-7: Bank 12 color */ -# define SSD1305_SETBANK13(c) (c) /* Data 4, Bits 0-1: Bank 13 color */ -# define SSD1305_SETBANK14(c) (c << 2) /* Data 4, Bits 2-3: Bank 14 color */ -# define SSD1305_SETBANK15(c) (c << 4) /* Data 4, Bits 4-5: Bank 15 color */ -# define SSD1305_SETBANK16(c) (c << 6) /* Data 4, Bits 6-7: Bank 16 color */ -#define SSD1305_SETBANKCOLOR2 0x93 /* 0x93: Set bank 17-32 color */ -# define SSD1305_SETBANK17(c) (c) /* Data 1, Bits 0-1: Bank 17 color */ -# define SSD1305_SETBANK18(c) (c << 2) /* Data 1, Bits 2-3: Bank 18 color */ -# define SSD1305_SETBANK19(c) (c << 4) /* Data 1, Bits 4-5: Bank 19 color */ -# define SSD1305_SETBANK20(c) (c << 6) /* Data 1, Bits 6-7: Bank 20 color */ -# define SSD1305_SETBANK21(c) (c) /* Data 2, Bits 0-1: Bank 21 color */ -# define SSD1305_SETBANK22(c) (c << 2) /* Data 2, Bits 2-3: Bank 22 color */ -# define SSD1305_SETBANK23(c) (c << 4) /* Data 2, Bits 4-5: Bank 23 color */ -# define SSD1305_SETBANK24(c) (c << 6) /* Data 2, Bits 6-7: Bank 24 color */ -# define SSD1305_SETBANK25(c) (c) /* Data 3, Bits 0-1: Bank 25 color */ -# define SSD1305_SETBANK26(c) (c << 2) /* Data 3, Bits 2-3: Bank 26 color */ -# define SSD1305_SETBANK27(c) (c << 4) /* Data 3, Bits 4-5: Bank 27 color */ -# define SSD1305_SETBANK28(c) (c << 6) /* Data 3, Bits 6-7: Bank 28 color */ -# define SSD1305_SETBANK29(c) (c) /* Data 4, Bits 0-1: Bank 29 color */ -# define SSD1305_SETBANK30(c) (c << 2) /* Data 4, Bits 2-3: Bank 30 color */ -# define SSD1305_SETBANK31(c) (c << 4) /* Data 4, Bits 4-5: Bank 31 color */ -# define SSD1305_SETBANK32(c) (c << 6) /* Data 4, Bits 6-7: Bank 32 color */ -#define SSD1305_MAPCOL0 0xa0 /* 0xa0: Column address 0 is mapped to SEG0 */ -#define SSD1305_MAPCOL131 0xa1 /* 0xa1: Column address 131 is mapped to SEG0 */ -#define SSD1305_DISPRAM 0xa4 /* 0xa4: Resume to RAM content display */ -#define SSD1305_DISPENTIRE 0xa5 /* 0xa5: Entire display ON */ -#define SSD1305_DISPNORMAL 0xa6 /* 0xa6: Normal display */ -#define SSD1305_DISPINVERTED 0xa7 /* 0xa7: Inverse display */ - -#define SSD1305_SETMUX 0xa8 /* 0xa8: Set Multiplex Ratio*/ - /* Data 1: MUX ratio -1: 15-63 */ -#define SSD1305_DIMMODE 0xab /* 0xab: Dim mode setting */ - /* Data 1: Reserverd, must be zero */ - /* Data 2: Contrast for bank1: 0-255 */ - /* Data 3: Brightness for color bank: 0-255 */ -#define SSD1305_MSTRCONFIG 0xad /* 0xad: Master configuration */ -# define SSD1305_MSTRCONFIG_EXTVCC 0x8e /* Data 1: Select external Vcc */ -#define SSD1305_DISPONDIM 0xac /* 0xac: Display ON in dim mode */ -#define SSD1305_DISPOFF 0xae /* 0xae: Display OFF (sleep mode) */ -#define SSD1305_DISPON 0xaf /* 0xaf: Display ON in normal mode */ -#define SSD1305_SETPAGESTART 0xb0 /* 0xb0-b7: Set page start address */ -# define SSD1305_PAGESTART_MASK 0x07 -#define SSD1305_SETCOMNORMAL 0xc0 /* 0xc0: Set COM output, normal mode */ -#define SSD1305_SETCOMREMAPPED 0xc8 /* 0xc8: Set COM output, remapped mode */ - -#define SSD1305_SETOFFSET 0xd3 /* 0xd3: Set display offset */ - /* Data 1: Vertical shift by COM: 0-63 */ -#define SSD1305_SETDCLK 0xd5 /* 0xd5: Set display clock divide ratio/oscillator */ -# define SSD1305_DCLKDIV_SHIFT (0) /* Data 1, Bits 0-3: DCLK divide ratio/frequency*/ -# define SSD1305_DCLKDIV_MASK 0x0f -# define SSD1305_DCLKFREQ_SHIFT (4) /* Data 1, Bits 4-7: DCLK divide oscillator frequency */ -# define SSD1305_DCLKFREQ_MASK 0xf0 -#define SSD1305_SETCOLORMODE 0xd8 /* 0xd: Set area color and low power display modes */ -# define SSD1305_COLORMODE_MONO 0x00 /* Data 1, Bits 4-5: 00=monochrome */ -# define SSD1305_COLORMODE_COLOR 0x30 /* Data 1, Bits 4-5: 11=area color enable */ -# define SSD1305_POWERMODE_NORMAL 0x00 /* Data 1, Bits 0,2: 00=normal power mode */ -# define SSD1305_POWERMODE_LOW 0x05 /* Data 1, Bits 0,2: 11=low power display mode */ -#define SSD1305_SETPRECHARGE 0xd9 /* 0xd9: Set pre-charge period */ -# define SSD1305_PHASE1_SHIFT (0) /* Data 1, Bits 0-3: Phase 1 period of up to 15 DCLK clocks */ -# define SSD1305_PHASE1_MASK 0x0f -# define SSD1305_PHASE2_SHIFT (4) /* Data 1, Bits 4-7: Phase 2 period of up to 15 DCLK clocks */ -# define SSD1305_PHASE2_MASK 0xf0 -#define SSD1305_SETCOMCONFIG 0xda /* 0xda: Set COM configuration */ -# define SSD1305_COMCONFIG_SEQ 0x02 /* Data 1, Bit 4: 0=Sequential COM pin configuration */ -# define SSD1305_COMCONFIG_ALT 0x12 /* Data 1, Bit 4: 1=Alternative COM pin configuration */ -# define SSD1305_COMCONFIG_NOREMAP 0x02 /* Data 1, Bit 5: 0=Disable COM Left/Right remap */ -# define SSD1305_COMCONFIG_REMAP 0x22 /* Data 1, Bit 5: 1=Enable COM Left/Right remap */ -#define SSD1305_SETVCOMHDESEL 0xdb /* 0xdb: Set VCOMH delselect level */ -# define SSD1305_VCOMH_x4p3 0x00 /* Data 1: ~0.43 x Vcc */ -# define SSD1305_VCOMH_x7p7 0x34 /* Data 1: ~0.77 x Vcc */ -# define SSD1305_VCOMH_x8p3 0x3c /* Data 1: ~0.83 x Vcc */ -#define SSD1305_ENTER_RMWMODE 0xe0 /* 0xe0: Enter the Read Modify Write mode */ -#define SSD1305_NOP 0xe3 /* 0xe3: NOP Command for no operation */ -#define SSD1305_EXIT_RMWMODE 0xee /* 0xee: Leave the Read Modify Write mode */ - -/* Graphic Acceleration Commands ********************************************/ - -#define SSD1305_HSCROLL_RIGHT 0x26 /* 0x26: Right horizontal scroll */ -#define SSD1305_HSCROLL_LEFT 0x27 /* 0x27: Left horizontal scroll */ - /* Data 1, Bits 0-2: Column scroll offset: 0-4 */ - /* Data 2, Bits 0-2: Start page address: 0-7 */ -#define SSD1305_HSCROLL_FRAMES6 0x00 /* Data 3, Bits 0-2: Timer interval, 000=6 frames */ -#define SSD1305_HSCROLL_FRAMES32 0x01 /* Data 3, Bits 0-2: Timer interval, 001=32 frames */ -#define SSD1305_HSCROLL_FRAMES64 0x02 /* Data 3, Bits 0-2: Timer interval, 010=64 frames */ -#define SSD1305_HSCROLL_FRAMES128 0x03 /* Data 3, Bits 0-2: Timer interval, 011=128 frames */ -#define SSD1305_HSCROLL_FRAMES3 0x04 /* Data 3, Bits 0-2: Timer interval, 100=3 frames */ -#define SSD1305_HSCROLL_FRAMES4 0x05 /* Data 3, Bits 0-2: Timer interval, 101=4 frames */ -#define SSD1305_HSCROLL_FRAMES2 0x06 /* Data 3, Bits 0-2: Timer interval, 110=2 frames */ - /* Data 4, Bits 0-2: End page address: 0-7 */ - -#define SSD1305_VSCROLL_RIGHT 0x29 /* 0x26: Vertical and right horizontal scroll */ -#define SSD1305_VSCROLL_LEFT 0x2a /* 0x27: Vertical and left horizontal scroll */ - /* Data 1, Bits 0-2: Column scroll offset: 0-4 */ - /* Data 2, Bits 0-2: Start page address: 0-7 */ -#define SSD1305_VSCROLL_FRAMES6 0x00 /* Data 3, Bits 0-2: Timer interval, 000=6 frames */ -#define SSD1305_VSCROLL_FRAMES32 0x01 /* Data 3, Bits 0-2: Timer interval, 001=32 frames */ -#define SSD1305_VSCROLL_FRAMES64 0x02 /* Data 3, Bits 0-2: Timer interval, 010=64 frames */ -#define SSD1305_VSCROLL_FRAMES128 0x03 /* Data 3, Bits 0-2: Timer interval, 011=128 frames */ -#define SSD1305_VSCROLL_FRAMES3 0x04 /* Data 3, Bits 0-2: Timer interval, 100=3 frames */ -#define SSD1305_VSCROLL_FRAMES4 0x05 /* Data 3, Bits 0-2: Timer interval, 101=4 frames */ -#define SSD1305_VSCROLL_FRAMES2 0x06 /* Data 3, Bits 0-2: Timer interval, 110=2 frames */ - /* Data 4, Bits 0-2: End page address: 0-7 */ - /* Data 5, Bits 0-5: Vertical scrolling offset: 0-63 */ -#define SSD1305_SCROLL_STOP 0x2e /* 0x2e: Deactivate scroll */ -#define SSD1305_SCROLL_START 0x2f /* 0x2f: Activate scroll */ -#define SSD1305_VSCROLL_AREA 0xa3 /* 0xa3: Set vertical scroll area */ - /* Data 1: Number of rows in the top fixed area */ - /* Data 1: Number of rows in the scroll area */ - -/* Status register bit definitions ******************************************/ - -#define SSD1305_STATUS_DISPOFF (1 << 6) /* Bit 6: 1=Display off */ - -#endif /* __DRIVERS_LCD_SSD1305_H */ +/************************************************************************************** + * drivers/lcd/ssd1305.h + * Definitions for the Solomon Systech SSD1305 132x64 Dot Matrix OLED/PLED + * Segment/Common Driver with C + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * References: SSD1305.pdf, "Solomon Systech SSD1305 132x64 Dot Matrix OLED/PLED + * Segment/Common Driver with Controller," Solomon Systech Limited, + * http://www.solomon-systech.com, May, 2008. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + **************************************************************************************/ + +#ifndef __DRIVERS_LCD_SSD1305_H +#define __DRIVERS_LCD_SSD1305_H + +/************************************************************************************** + * Included Files + **************************************************************************************/ + +/************************************************************************************** + * Pre-processor Definitions + **************************************************************************************/ +/* General Definitions ******************************************************/ + +#define SSD1305_COLORA 0 +#define SSD1305_COLORB 1 +#define SSD1305_COLORC 2 +#define SSD1305_COLORD 3 + +/* Fundamental Commands *****************************************************/ +#define SSD1305_SETCOLL 0x00 /* 0x00-0x0f: Set lower column address */ +# define SSD1305_COLL_MASK 0x0f +#define SSD1305_SETCOLH 0x10 /* 0x10-0x1f: Set higher column address */ +# define SSD1305_COLH_MASK 0x0f +#define SSD1305_ADDRMODE 0x20 /* 0x20: Set memory address mode */ +# define SSD1305_ADDRMODE_HOR 0x00 /* Data 1: Set horizontal address mode */ +# define SSD1305_ADDRMODE_VIRT 0x01 /* Data 1: Set virtal address mode */ +# define SSD1305_ADDRMODE_PAGE 0x02 /* Data 1: Set page address mode */ +#define SSD1305_SETCOLADDR 0x21 /* 0x21: Set column address */ + /* Data 1: Column start address: 0-131 */ + /* Data 2: Column end address: 0-131 */ +#define SSD1305_SETPAGEADDR 0x22 /* 0x22: Set page address */ + /* Data 1: Page start address: 0x00-0x7d */ + /* Data 2: Page end address: 0x00-0x7d */ +#define SSD1305_SETSTARTLINE 0x40 /* 0x40-7f: Set display start line */ +# define SSD1305_STARTLINE_MASK 0x3f + +#define SSD1305_SETCONTRAST 0x81 /* 0x81: Set contrast control */ + /* Data 1: Set 1 of 256 contrast steps */ +#define SSD1305_SETBRIGHTNESS 0x82 /* 0x82: Set brightness */ + /* Data 1: Set 1 of 256 contrast steps */ +#define SSD1305_SETLUT 0x91 /* 0x01: Set lookup table */ + /* Data 1: Pulse width: 31-63 */ + /* Data 2: Color A: 31-63 */ + /* Data 3: Color B: 31-63 */ + /* Data 4: Color C: 31-63 */ +#define SSD1305_SETBANKCOLOR1 0x92 /* 0x92: Set bank 1-16 color */ +# define SSD1305_SETBANK1(c) (c) /* Data 1, Bits 0-1: Bank 1 color */ +# define SSD1305_SETBANK2(c) (c << 2) /* Data 1, Bits 2-3: Bank 2 color */ +# define SSD1305_SETBANK3(c) (c << 4) /* Data 1, Bits 4-5: Bank 3 color */ +# define SSD1305_SETBANK4(c) (c << 6) /* Data 1, Bits 6-7: Bank 4 color */ +# define SSD1305_SETBANK5(c) (c) /* Data 2, Bits 0-1: Bank 5 color */ +# define SSD1305_SETBANK6(c) (c << 2) /* Data 2, Bits 2-3: Bank 6 color */ +# define SSD1305_SETBANK7(c) (c << 4) /* Data 2, Bits 4-5: Bank 7 color */ +# define SSD1305_SETBANK8(c) (c << 6) /* Data 2, Bits 6-7: Bank 8 color */ +# define SSD1305_SETBANK9(c) (c) /* Data 3, Bits 0-1: Bank 9 color */ +# define SSD1305_SETBANK10(c) (c << 2) /* Data 3, Bits 2-3: Bank 10 color */ +# define SSD1305_SETBANK11(c) (c << 4) /* Data 3, Bits 4-5: Bank 11 color */ +# define SSD1305_SETBANK12(c) (c << 6) /* Data 3, Bits 6-7: Bank 12 color */ +# define SSD1305_SETBANK13(c) (c) /* Data 4, Bits 0-1: Bank 13 color */ +# define SSD1305_SETBANK14(c) (c << 2) /* Data 4, Bits 2-3: Bank 14 color */ +# define SSD1305_SETBANK15(c) (c << 4) /* Data 4, Bits 4-5: Bank 15 color */ +# define SSD1305_SETBANK16(c) (c << 6) /* Data 4, Bits 6-7: Bank 16 color */ +#define SSD1305_SETBANKCOLOR2 0x93 /* 0x93: Set bank 17-32 color */ +# define SSD1305_SETBANK17(c) (c) /* Data 1, Bits 0-1: Bank 17 color */ +# define SSD1305_SETBANK18(c) (c << 2) /* Data 1, Bits 2-3: Bank 18 color */ +# define SSD1305_SETBANK19(c) (c << 4) /* Data 1, Bits 4-5: Bank 19 color */ +# define SSD1305_SETBANK20(c) (c << 6) /* Data 1, Bits 6-7: Bank 20 color */ +# define SSD1305_SETBANK21(c) (c) /* Data 2, Bits 0-1: Bank 21 color */ +# define SSD1305_SETBANK22(c) (c << 2) /* Data 2, Bits 2-3: Bank 22 color */ +# define SSD1305_SETBANK23(c) (c << 4) /* Data 2, Bits 4-5: Bank 23 color */ +# define SSD1305_SETBANK24(c) (c << 6) /* Data 2, Bits 6-7: Bank 24 color */ +# define SSD1305_SETBANK25(c) (c) /* Data 3, Bits 0-1: Bank 25 color */ +# define SSD1305_SETBANK26(c) (c << 2) /* Data 3, Bits 2-3: Bank 26 color */ +# define SSD1305_SETBANK27(c) (c << 4) /* Data 3, Bits 4-5: Bank 27 color */ +# define SSD1305_SETBANK28(c) (c << 6) /* Data 3, Bits 6-7: Bank 28 color */ +# define SSD1305_SETBANK29(c) (c) /* Data 4, Bits 0-1: Bank 29 color */ +# define SSD1305_SETBANK30(c) (c << 2) /* Data 4, Bits 2-3: Bank 30 color */ +# define SSD1305_SETBANK31(c) (c << 4) /* Data 4, Bits 4-5: Bank 31 color */ +# define SSD1305_SETBANK32(c) (c << 6) /* Data 4, Bits 6-7: Bank 32 color */ +#define SSD1305_MAPCOL0 0xa0 /* 0xa0: Column address 0 is mapped to SEG0 */ +#define SSD1305_MAPCOL131 0xa1 /* 0xa1: Column address 131 is mapped to SEG0 */ +#define SSD1305_DISPRAM 0xa4 /* 0xa4: Resume to RAM content display */ +#define SSD1305_DISPENTIRE 0xa5 /* 0xa5: Entire display ON */ +#define SSD1305_DISPNORMAL 0xa6 /* 0xa6: Normal display */ +#define SSD1305_DISPINVERTED 0xa7 /* 0xa7: Inverse display */ + +#define SSD1305_SETMUX 0xa8 /* 0xa8: Set Multiplex Ratio*/ + /* Data 1: MUX ratio -1: 15-63 */ +#define SSD1305_DIMMODE 0xab /* 0xab: Dim mode setting */ + /* Data 1: Reserverd, must be zero */ + /* Data 2: Contrast for bank1: 0-255 */ + /* Data 3: Brightness for color bank: 0-255 */ +#define SSD1305_MSTRCONFIG 0xad /* 0xad: Master configuration */ +# define SSD1305_MSTRCONFIG_EXTVCC 0x8e /* Data 1: Select external Vcc */ +#define SSD1305_DISPONDIM 0xac /* 0xac: Display ON in dim mode */ +#define SSD1305_DISPOFF 0xae /* 0xae: Display OFF (sleep mode) */ +#define SSD1305_DISPON 0xaf /* 0xaf: Display ON in normal mode */ +#define SSD1305_SETPAGESTART 0xb0 /* 0xb0-b7: Set page start address */ +# define SSD1305_PAGESTART_MASK 0x07 +#define SSD1305_SETCOMNORMAL 0xc0 /* 0xc0: Set COM output, normal mode */ +#define SSD1305_SETCOMREMAPPED 0xc8 /* 0xc8: Set COM output, remapped mode */ + +#define SSD1305_SETOFFSET 0xd3 /* 0xd3: Set display offset */ + /* Data 1: Vertical shift by COM: 0-63 */ +#define SSD1305_SETDCLK 0xd5 /* 0xd5: Set display clock divide ratio/oscillator */ +# define SSD1305_DCLKDIV_SHIFT (0) /* Data 1, Bits 0-3: DCLK divide ratio/frequency*/ +# define SSD1305_DCLKDIV_MASK 0x0f +# define SSD1305_DCLKFREQ_SHIFT (4) /* Data 1, Bits 4-7: DCLK divide oscillator frequency */ +# define SSD1305_DCLKFREQ_MASK 0xf0 +#define SSD1305_SETCOLORMODE 0xd8 /* 0xd: Set area color and low power display modes */ +# define SSD1305_COLORMODE_MONO 0x00 /* Data 1, Bits 4-5: 00=monochrome */ +# define SSD1305_COLORMODE_COLOR 0x30 /* Data 1, Bits 4-5: 11=area color enable */ +# define SSD1305_POWERMODE_NORMAL 0x00 /* Data 1, Bits 0,2: 00=normal power mode */ +# define SSD1305_POWERMODE_LOW 0x05 /* Data 1, Bits 0,2: 11=low power display mode */ +#define SSD1305_SETPRECHARGE 0xd9 /* 0xd9: Set pre-charge period */ +# define SSD1305_PHASE1_SHIFT (0) /* Data 1, Bits 0-3: Phase 1 period of up to 15 DCLK clocks */ +# define SSD1305_PHASE1_MASK 0x0f +# define SSD1305_PHASE2_SHIFT (4) /* Data 1, Bits 4-7: Phase 2 period of up to 15 DCLK clocks */ +# define SSD1305_PHASE2_MASK 0xf0 +#define SSD1305_SETCOMCONFIG 0xda /* 0xda: Set COM configuration */ +# define SSD1305_COMCONFIG_SEQ 0x02 /* Data 1, Bit 4: 0=Sequential COM pin configuration */ +# define SSD1305_COMCONFIG_ALT 0x12 /* Data 1, Bit 4: 1=Alternative COM pin configuration */ +# define SSD1305_COMCONFIG_NOREMAP 0x02 /* Data 1, Bit 5: 0=Disable COM Left/Right remap */ +# define SSD1305_COMCONFIG_REMAP 0x22 /* Data 1, Bit 5: 1=Enable COM Left/Right remap */ +#define SSD1305_SETVCOMHDESEL 0xdb /* 0xdb: Set VCOMH delselect level */ +# define SSD1305_VCOMH_x4p3 0x00 /* Data 1: ~0.43 x Vcc */ +# define SSD1305_VCOMH_x7p7 0x34 /* Data 1: ~0.77 x Vcc */ +# define SSD1305_VCOMH_x8p3 0x3c /* Data 1: ~0.83 x Vcc */ +#define SSD1305_ENTER_RMWMODE 0xe0 /* 0xe0: Enter the Read Modify Write mode */ +#define SSD1305_NOP 0xe3 /* 0xe3: NOP Command for no operation */ +#define SSD1305_EXIT_RMWMODE 0xee /* 0xee: Leave the Read Modify Write mode */ + +/* Graphic Acceleration Commands ********************************************/ + +#define SSD1305_HSCROLL_RIGHT 0x26 /* 0x26: Right horizontal scroll */ +#define SSD1305_HSCROLL_LEFT 0x27 /* 0x27: Left horizontal scroll */ + /* Data 1, Bits 0-2: Column scroll offset: 0-4 */ + /* Data 2, Bits 0-2: Start page address: 0-7 */ +#define SSD1305_HSCROLL_FRAMES6 0x00 /* Data 3, Bits 0-2: Timer interval, 000=6 frames */ +#define SSD1305_HSCROLL_FRAMES32 0x01 /* Data 3, Bits 0-2: Timer interval, 001=32 frames */ +#define SSD1305_HSCROLL_FRAMES64 0x02 /* Data 3, Bits 0-2: Timer interval, 010=64 frames */ +#define SSD1305_HSCROLL_FRAMES128 0x03 /* Data 3, Bits 0-2: Timer interval, 011=128 frames */ +#define SSD1305_HSCROLL_FRAMES3 0x04 /* Data 3, Bits 0-2: Timer interval, 100=3 frames */ +#define SSD1305_HSCROLL_FRAMES4 0x05 /* Data 3, Bits 0-2: Timer interval, 101=4 frames */ +#define SSD1305_HSCROLL_FRAMES2 0x06 /* Data 3, Bits 0-2: Timer interval, 110=2 frames */ + /* Data 4, Bits 0-2: End page address: 0-7 */ + +#define SSD1305_VSCROLL_RIGHT 0x29 /* 0x26: Vertical and right horizontal scroll */ +#define SSD1305_VSCROLL_LEFT 0x2a /* 0x27: Vertical and left horizontal scroll */ + /* Data 1, Bits 0-2: Column scroll offset: 0-4 */ + /* Data 2, Bits 0-2: Start page address: 0-7 */ +#define SSD1305_VSCROLL_FRAMES6 0x00 /* Data 3, Bits 0-2: Timer interval, 000=6 frames */ +#define SSD1305_VSCROLL_FRAMES32 0x01 /* Data 3, Bits 0-2: Timer interval, 001=32 frames */ +#define SSD1305_VSCROLL_FRAMES64 0x02 /* Data 3, Bits 0-2: Timer interval, 010=64 frames */ +#define SSD1305_VSCROLL_FRAMES128 0x03 /* Data 3, Bits 0-2: Timer interval, 011=128 frames */ +#define SSD1305_VSCROLL_FRAMES3 0x04 /* Data 3, Bits 0-2: Timer interval, 100=3 frames */ +#define SSD1305_VSCROLL_FRAMES4 0x05 /* Data 3, Bits 0-2: Timer interval, 101=4 frames */ +#define SSD1305_VSCROLL_FRAMES2 0x06 /* Data 3, Bits 0-2: Timer interval, 110=2 frames */ + /* Data 4, Bits 0-2: End page address: 0-7 */ + /* Data 5, Bits 0-5: Vertical scrolling offset: 0-63 */ +#define SSD1305_SCROLL_STOP 0x2e /* 0x2e: Deactivate scroll */ +#define SSD1305_SCROLL_START 0x2f /* 0x2f: Activate scroll */ +#define SSD1305_VSCROLL_AREA 0xa3 /* 0xa3: Set vertical scroll area */ + /* Data 1: Number of rows in the top fixed area */ + /* Data 1: Number of rows in the scroll area */ + +/* Status register bit definitions ******************************************/ + +#define SSD1305_STATUS_DISPOFF (1 << 6) /* Bit 6: 1=Display off */ + +#endif /* __DRIVERS_LCD_SSD1305_H */ diff --git a/nuttx/drivers/lcd/ug-9664hswag01.c b/nuttx/drivers/lcd/ug-9664hswag01.c index bb49f20e6b..e0e8e8e3a0 100644 --- a/nuttx/drivers/lcd/ug-9664hswag01.c +++ b/nuttx/drivers/lcd/ug-9664hswag01.c @@ -4,7 +4,7 @@ * controller. * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Reference: "Product Specification, OEL Display Module, UG-9664HSWAG01", Univision * Technology Inc., SAS1-6020-B, January 3, 2008. diff --git a/nuttx/drivers/mmcsd/Make.defs b/nuttx/drivers/mmcsd/Make.defs index 48e5d4fb6e..8504565972 100644 --- a/nuttx/drivers/mmcsd/Make.defs +++ b/nuttx/drivers/mmcsd/Make.defs @@ -2,7 +2,7 @@ # drivers/mmcsd/Make.defs # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mmcsd/mmcsd_csd.h b/nuttx/drivers/mmcsd/mmcsd_csd.h index e35eacad5b..d5343aa841 100644 --- a/nuttx/drivers/mmcsd/mmcsd_csd.h +++ b/nuttx/drivers/mmcsd/mmcsd_csd.h @@ -2,7 +2,7 @@ * drivers/mmcsd/mmcsd_csd.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mmcsd/mmcsd_debug.c b/nuttx/drivers/mmcsd/mmcsd_debug.c index 03872f5cf9..0bd7f896eb 100644 --- a/nuttx/drivers/mmcsd/mmcsd_debug.c +++ b/nuttx/drivers/mmcsd/mmcsd_debug.c @@ -2,7 +2,7 @@ * drivers/mmcsd/mmcsd_debug.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mmcsd/mmcsd_internal.h b/nuttx/drivers/mmcsd/mmcsd_internal.h index 577ebbba93..ed669cdfac 100644 --- a/nuttx/drivers/mmcsd/mmcsd_internal.h +++ b/nuttx/drivers/mmcsd/mmcsd_internal.h @@ -2,7 +2,7 @@ * drivers/mmcsd/mmcsd_internal.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.h b/nuttx/drivers/mmcsd/mmcsd_sdio.h index 75c97bd65a..9e3794e257 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.h +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.h @@ -1,339 +1,339 @@ -/******************************************************************************************** - * drivers/mmcsd/mmcsd_sdio.h - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ********************************************************************************************/ - -#ifndef __DRIVERS_MMCSD_MMCSD_SDIO_H -#define __DRIVERS_MMCSD_MMCSD_SDIO_H - -/******************************************************************************************** - * Included Files - ********************************************************************************************/ - -#include -#include - -/******************************************************************************************** - * Pre-Processor Definitions - ********************************************************************************************/ - -/* CMD8 Argument: - * [31:12]: Reserved (shall be set to '0') - * [11:8]: Supply Voltage (VHS) 0x1 (Range: 2.7-3.6 V) - * [7:0]: Check Pattern (recommended 0xaa) - * CMD8 Response: R7 - */ - -#define MMCSD_CMD8VOLTAGE_SHIFT (8) /* Bits 8-11: Supply voltage */ -#define MMCSD_CMD8VOLTAGE_MASK ((uint32_t)0x0f << MMCSD_CMD8VOLTAGE_SHIFT) -# define MMCSD_CMD8VOLTAGE_27 ((uint32_t)0x01 << MMCSD_CMD8VOLTAGE_SHIFT) /* 2.7-3.6V */ -#define MMCSD_CMD8ECHO_SHIFT (0) /* Bits 0-7: Check pattern */ -#define MMCSD_CMD8ECHO_MASK ((uint32_t)0xff << MMCSD_CMD8ECHO_SHIFT) -# define MMCSD_CMD8CHECKPATTERN ((uint32_t)0xaa << MMCSD_CMD8ECHO_SHIFT) - -/* ACMD6 argument */ - -#define MMCSD_ACMD6_BUSWIDTH_1 ((uint32_t)0) /* Bus width = 1-bit */ -#define MMCSD_ACMD6_BUSWIDTH_4 ((uint32_t)2) /* Bus width = 4-bit */ - -/* ACMD41 argument */ - -#define MMCSD_ACMD41_VOLTAGEWINDOW ((uint32_t)0x80100000) -#define MMCSD_ACMD41_HIGHCAPACITY ((uint32_t)1 << 30) -#define MMCSD_ACMD41_STDCAPACITY ((uint32_t)0) - -/* ACMD42 argument */ - -#define MMCSD_ACMD42_CD_DISCONNECT ((uint32_t)0) /* Disconnect card detection logic */ -#define MMCSD_ACMD42_CD_CONNECT ((uint32_t)1) /* Connect card detection logic */ - -/* R1 Card Status bit definitions */ - -#define MMCSD_R1_OUTOFRANGE ((uint32_t)1 << 31) /* Bad argument */ -#define MMCSD_R1_ADDRESSERROR ((uint32_t)1 << 30) /* Bad address */ -#define MMCSD_R1_BLOCKLENERROR ((uint32_t)1 << 29) /* Bad block length */ -#define MMCSD_R1_ERASESEQERROR ((uint32_t)1 << 28) /* Erase cmd error */ -#define MMCSD_R1_ERASEPARAM ((uint32_t)1 << 27) /* Bad write blocks */ -#define MMCSD_R1_WPVIOLATION ((uint32_t)1 << 26) /* Erase access failure */ -#define MMCSD_R1_CARDISLOCKED ((uint32_t)1 << 25) /* Card is locked */ -#define MMCSD_R1_LOCKUNLOCKFAILED ((uint32_t)1 << 24) /* Password error */ -#define MMCSD_R1_COMCRCERROR ((uint32_t)1 << 23) /* CRC error */ -#define MMCSD_R1_ILLEGALCOMMAND ((uint32_t)1 << 22) /* Bad command */ -#define MMCSD_R1_CARDECCFAILED ((uint32_t)1 << 21) /* Failed to correct data */ -#define MMCSD_R1_CCERROR ((uint32_t)1 << 20) /* Card controller error */ -#define MMCSD_R1_ERROR ((uint32_t)1 << 19) /* General error */ -#define MMCSD_R1_UNDERRUN ((uint32_t)1 << 18) /* Underrun (MMC only) */ -#define MMCSD_R1_OVERRRUN ((uint32_t)1 << 17) /* Overrun (MMC only) */ -#define MMCSD_R1_CIDCSDOVERWRITE ((uint32_t)1 << 16) /* CID/CSD error */ -#define MMCSD_R1_WPERASESKIP ((uint32_t)1 << 15) /* Not all erased */ -#define MMCSD_R1_CARDECCDISABLED ((uint32_t)1 << 14) /* Internal ECC not used */ -#define MMCSD_R1_ERASERESET ((uint32_t)1 << 13) /* Reset sequence cleared */ -#define MMCSD_R1_STATE_SHIFT (9) /* Current card state */ -#define MMCSD_R1_STATE_MASK ((uint32_t)15 << MMCSD_R1_STATE_SHIFT) - /* Card identification mode states */ -# define MMCSD_R1_STATE_IDLE ((uint32_t)0 << MMCSD_R1_STATE_SHIFT) /* 0=Idle state */ -# define MMCSD_R1_STATE_READY ((uint32_t)1 << MMCSD_R1_STATE_SHIFT) /* 1=Ready state */ -# define MMCSD_R1_STATE_IDENT ((uint32_t)2 << MMCSD_R1_STATE_SHIFT) /* 2=Identification state */ - /* Data transfer states */ -# define MMCSD_R1_STATE_STBY ((uint32_t)3 << MMCSD_R1_STATE_SHIFT) /* 3=Standby state */ -# define MMCSD_R1_STATE_TRAN ((uint32_t)4 << MMCSD_R1_STATE_SHIFT) /* 4=Transfer state */ -# define MMCSD_R1_STATE_DATA ((uint32_t)5 << MMCSD_R1_STATE_SHIFT) /* 5=Sending data state */ -# define MMCSD_R1_STATE_RCV ((uint32_t)6 << MMCSD_R1_STATE_SHIFT) /* 6=Receiving data state */ -# define MMCSD_R1_STATE_PRG ((uint32_t)7 << MMCSD_R1_STATE_SHIFT) /* 7=Programming state */ -# define MMCSD_R1_STATE_DIS ((uint32_t)8 << MMCSD_R1_STATE_SHIFT) /* 8=Disconnect state */ -#define MMCSD_R1_READYFORDATA ((uint32_t)1 << 8) /* Buffer empty */ -#define MMCSD_R1_APPCMD ((uint32_t)1 << 5) /* Next CMD is ACMD */ -#define MMCSD_R1_AKESEQERROR ((uint32_t)1 << 3) /* Authentication error */ -#define MMCSD_R1_ERRORMASK ((uint32_t)0xfdffe008) /* Error mask */ - -#define IS_STATE(v,s) ((((uint32_t)v)&MMCSD_R1_STATE_MASK)==(s)) - -/* R3 (OCR) */ - -#define MMC_VDD_20_36 ((uint32_t)0x00ffff00) /* VDD voltage 2.0-3.6 */ - -#define MMCSD_VDD_145_150 ((uint32_t)1 << 0) /* VDD voltage 1.45 - 1.50 */ -#define MMCSD_VDD_150_155 ((uint32_t)1 << 1) /* VDD voltage 1.50 - 1.55 */ -#define MMCSD_VDD_155_160 ((uint32_t)1 << 2) /* VDD voltage 1.55 - 1.60 */ -#define MMCSD_VDD_160_165 ((uint32_t)1 << 3) /* VDD voltage 1.60 - 1.65 */ -#define MMCSD_VDD_165_170 ((uint32_t)1 << 4) /* VDD voltage 1.65 - 1.70 */ -#define MMCSD_VDD_17_18 ((uint32_t)1 << 5) /* VDD voltage 1.7 - 1.8 */ -#define MMCSD_VDD_18_19 ((uint32_t)1 << 6) /* VDD voltage 1.8 - 1.9 */ -#define MMCSD_VDD_19_20 ((uint32_t)1 << 7) /* VDD voltage 1.9 - 2.0 */ -#define MMCSD_VDD_20_21 ((uint32_t)1 << 8) /* VDD voltage 2.0-2.1 */ -#define MMCSD_VDD_21_22 ((uint32_t)1 << 9) /* VDD voltage 2.1-2.2 */ -#define MMCSD_VDD_22_23 ((uint32_t)1 << 10) /* VDD voltage 2.2-2.3 */ -#define MMCSD_VDD_23_24 ((uint32_t)1 << 11) /* VDD voltage 2.3-2.4 */ -#define MMCSD_VDD_24_25 ((uint32_t)1 << 12) /* VDD voltage 2.4-2.5 */ -#define MMCSD_VDD_25_26 ((uint32_t)1 << 13) /* VDD voltage 2.5-2.6 */ -#define MMCSD_VDD_26_27 ((uint32_t)1 << 14) /* VDD voltage 2.6-2.7 */ -#define MMCSD_VDD_27_28 ((uint32_t)1 << 15) /* VDD voltage 2.7-2.8 */ -#define MMCSD_VDD_28_29 ((uint32_t)1 << 16) /* VDD voltage 2.8-2.9 */ -#define MMCSD_VDD_29_30 ((uint32_t)1 << 17) /* VDD voltage 2.9-3.0 */ -#define MMCSD_VDD_30_31 ((uint32_t)1 << 18) /* VDD voltage 3.0-3.1 */ -#define MMCSD_VDD_31_32 ((uint32_t)1 << 19) /* VDD voltage 3.1-3.2 */ -#define MMCSD_VDD_32_33 ((uint32_t)1 << 20) /* VDD voltage 3.2-3.3 */ -#define MMCSD_VDD_33_34 ((uint32_t)1 << 21) /* VDD voltage 3.3-3.4 */ -#define MMCSD_VDD_34_35 ((uint32_t)1 << 22) /* VDD voltage 3.4-3.5 */ -#define MMCSD_VDD_35_36 ((uint32_t)1 << 23) /* VDD voltage 3.5-3.6 */ -#define MMCSD_R3_HIGHCAPACITY ((uint32_t)1 << 30) /* true: Card supports block addressing */ -#define MMCSD_CARD_BUSY ((uint32_t)1 << 31) /* Card power-up busy bit */ - -/* R6 Card Status bit definitions */ - -#define MMCSD_R6_RCA_SHIFT (16) /* New published RCA */ -#define MMCSD_R6_RCA_MASK ((uint32_t)0xffff << MMCSD_R6_RCA_SHIFT) -#define MMCSD_R6_COMCRCERROR ((uint32_t)1 << 15) /* CRC error */ -#define MMCSD_R6_ILLEGALCOMMAND ((uint32_t)1 << 14) /* Bad command */ -#define MMCSD_R6_ERROR ((uint32_t)1 << 13) /* General error */ -#define MMCSD_R6_STATE_SHIFT (9) /* Current card state */ -#define MMCSD_R6_STATE_MASK ((uint32_t)15 << MMCSD_R6_STATE_SHIFT) - /* Card identification mode states */ -# define MMCSD_R6_STATE_IDLE ((uint32_t)0 << MMCSD_R6_STATE_SHIFT) /* 0=Idle state */ -# define MMCSD_R6_STATE_READY ((uint32_t)1 << MMCSD_R6_STATE_SHIFT) /* 1=Ready state */ -# define MMCSD_R6_STATE_IDENT ((uint32_t)2 << MMCSD_R6_STATE_SHIFT) /* 2=Identification state */ - /* Data transfer states */ -# define MMCSD_R6_STATE_STBY ((uint32_t)3 << MMCSD_R6_STATE_SHIFT) /* 3=Standby state */ -# define MMCSD_R6_STATE_TRAN ((uint32_t)4 << MMCSD_R6_STATE_SHIFT) /* 4=Transfer state */ -# define MMCSD_R6_STATE_DATA (5(uint32_t) << MMCSD_R6_STATE_SHIFT) /* 5=Sending data state */ -# define MMCSD_R6_STATE_RCV ((uint32_t)6 << MMCSD_R6_STATE_SHIFT) /* 6=Receiving data state */ -# define MMCSD_R6_STATE_PRG ((uint32_t)7 << MMCSD_R6_STATE_SHIFT) /* 7=Programming state */ -# define MMCSD_R6_STATE_DIS ((uint32_t) << MMCSD_R6_STATE_SHIFT) /* 8=Disconnect state */ -#define MMCSD_R6_ERRORMASK ((uint32_t)0x0000e000) /* Error mask */ - -/* SD Configuration Register (SCR) encoding */ - -#define MMCSD_SCR_BUSWIDTH_1BIT (1) -#define MMCSD_SCR_BUSWIDTH_2BIT (2) -#define MMCSD_SCR_BUSWIDTH_4BIT (4) -#define MMCSD_SCR_BUSWIDTH_8BIT (8) - -/* Last 4 bytes of the 48-bit R7 response */ - -#define MMCSD_R7VERSION_SHIFT (28) /* Bits 28-31: Command version number */ -#define MMCSD_R7VERSION_MASK ((uint32_t)0x0f << MMCSD_R7VERSION_SHIFT) -#define MMCSD_R7VOLTAGE_SHIFT (8) /* Bits 8-11: Voltage accepted */ -#define MMCSD_R7VOLTAGE_MASK ((uint32_t)0x0f << MMCSD_R7VOLTAGE_SHIFT) -# define MMCSD_R7VOLTAGE_27 ((uint32_t)0x01 << MMCSD_R7VOLTAGE_SHIFT) /* 2.7-3.6V */ -#define MMCSD_R7ECHO_SHIFT (0) /* Bits 0-7: Echoed check pattern */ -#define MMCSD_R7ECHO_MASK ((uint32_t)0xff << MMCSD_R7ECHO_SHIFT) -# define MMCSD_R7CHECKPATTERN ((uint32_t)0xaa << MMCSD_R7ECHO_SHIFT) - -/******************************************************************************************** - * Public Types - ********************************************************************************************/ - -/* Decoded Card Identification (CID) register */ - -struct mmcsd_cid_s -{ - uint8_t mid; /* 127:120 8-bit Manufacturer ID */ - uint16_t oid; /* 119:104 16-bit OEM/Application ID (ascii) */ - uint8_t pnm[6]; /* 103:64 40-bit Product Name (ascii) + null terminator */ - uint8_t prv; /* 63:56 8-bit Product revision */ - uint32_t psn; /* 55:24 32-bit Product serial number */ - /* 23:20 4-bit (reserved) */ - uint16_t mdt; /* 19:8 12-bit Manufacturing date */ - uint8_t crc; /* 7:1 7-bit CRC7 */ - /* 0:0 1-bit (not used) */ -}; - -/* Decoded Card Specific Data (CSD) register */ - -struct mmcsd_csd_s -{ - uint8_t csdstructure; /* 127:126 CSD structure */ - uint8_t mmcspecvers; /* 125:122 MMC Spec version (MMC only) */ - - struct - { - uint8_t timeunit; /* 2:0 Time exponent */ - uint8_t timevalue; /* 6:3 Time mantissa */ - } taac; /* 119:112 Data read access-time-1 */ - - uint8_t nsac; /* 111:104 Data read access-time-2 in CLK cycle(NSAC*100) */ - - struct - { - uint8_t transferrateunit; /* 2:0 Rate exponent */ - uint8_t timevalue; /* 6:3 Rate mantissa */ - } transpeed; /* 103:96 Max. data transfer rate */ - - uint16_t ccc; /* 95:84 Card command classes */ - uint8_t readbllen; /* 83:80 Max. read data block length */ - uint8_t readblpartial; /* 79:79 Partial blocks for read allowed */ - uint8_t writeblkmisalign; /* 78:78 Write block misalignment */ - uint8_t readblkmisalign; /* 77:77 Read block misalignment */ - uint8_t dsrimp; /* 76:76 DSR implemented */ - - union - { -#ifdef CONFIG_MMCSD_MMCSUPPORT - struct - { - uint16_t csize; /* 73:62 Device size */ - uint8_t vddrcurrmin; /* 61:59 Max. read current at Vdd min */ - uint8_t vddrcurrmax; /* 58:56 Max. read current at Vdd max */ - uint8_t vddwcurrmin; /* 55:53 Max. write current at Vdd min */ - uint8_t vddwcurrmax; /* 52:50 Max. write current at Vdd max */ - uint8_t csizemult; /* 49:47 Device size multiplier */ - - union - { - struct /* MMC system specification version 3.1 */ - { - uint8_t ergrpsize; /* 46:42 Erase group size (MMC 3.1) */ - uint8_t ergrpmult; /* 41:37 Erase group multiplier (MMC 3.1) */ - } mmc31; - struct /* MMC system specification version 2.2 */ - { - uint8_t sectorsize; /* 46:42 Erase sector size (MMC 2.2) */ - uint8_t ergrpsize; /* 41:37 Erase group size (MMC 2.2) */ - } mmc22; - } er; - - uint8_t mmcwpgrpsize; /* 36:32 Write protect group size (MMC) */ - } mmc; -#endif - struct - { - uint16_t csize; /* 73:62 Device size */ - uint8_t vddrcurrmin; /* 61:59 Max. read current at Vdd min */ - uint8_t vddrcurrmax; /* 58:56 Max. read current at Vdd max */ - uint8_t vddwcurrmin; /* 55:53 Max. write current at Vdd min */ - uint8_t vddwcurrmax; /* 52:50 Max. write current at Vdd max */ - uint8_t csizemult; /* 49:47 Device size multiplier */ - uint8_t sderblen; /* 46:46 Erase single block enable (SD) */ - uint8_t sdsectorsize; /* 45:39 Erase sector size (SD) */ - uint8_t sdwpgrpsize; /* 38:32 Write protect group size (SD) */ - } sdbyte; - - struct - { - /* 73:70 (reserved) */ - uint32_t csize; /* 69:48 Device size */ - /* 47:47 (reserved) */ - uint8_t sderblen; /* 46:46 Erase single block enable (SD) */ - uint8_t sdsectorsize; /* 45:39 Erase sector size (SD) */ - uint8_t sdwpgrpsize; /* 38:32 Write protect group size (SD) */ - } sdblock; - } u; - - uint8_t wpgrpen; /* 31:31 Write protect group enable */ - uint8_t mmcdfltecc; /* 30:29 Manufacturer default ECC (MMC) */ - uint8_t r2wfactor; /* 28:26 Write speed factor */ - uint8_t writebllen; /* 25:22 Max. write data block length */ - uint8_t writeblpartial; /* 21:21 Partial blocks for write allowed */ - uint8_t fileformatgrp; /* 15:15 File format group */ - uint8_t copy; /* 14:14 Copy flag (OTP) */ - uint8_t permwriteprotect; /* 13:13 Permanent write protection */ - uint8_t tmpwriteprotect; /* 12:12 Temporary write protection */ - uint8_t fileformat; /* 10:11 File format */ - uint8_t mmcecc; /* 9:8 ECC (MMC) */ - uint8_t crc; /* 7:1 CRC */ - /* 0:0 Not used */ -}; - -struct mmcsd_scr_s -{ - uint8_t scrversion; /* 63:60 Version of SCR structure */ - uint8_t sdversion; /* 59:56 SD memory card physical layer version */ - uint8_t erasestate; /* 55:55 Data state after erase (1 or 0) */ - uint8_t security; /* 54:52 SD security support */ - uint8_t buswidth; /* 51:48 DAT bus widthes supported */ - /* 47:32 SD reserved space */ - uint32_t mfgdata; /* 31:0 Reserved for manufacturing data */ -}; - -/******************************************************************************************** - * Public Data - ********************************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/******************************************************************************************** - * Public Functions - ********************************************************************************************/ - - -#undef EXTERN -#if defined(__cplusplus) -} -#endif -#endif /* __DRIVERS_MMCSD_MMCSD_SDIO_H */ +/******************************************************************************************** + * drivers/mmcsd/mmcsd_sdio.h + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +#ifndef __DRIVERS_MMCSD_MMCSD_SDIO_H +#define __DRIVERS_MMCSD_MMCSD_SDIO_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include +#include + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ + +/* CMD8 Argument: + * [31:12]: Reserved (shall be set to '0') + * [11:8]: Supply Voltage (VHS) 0x1 (Range: 2.7-3.6 V) + * [7:0]: Check Pattern (recommended 0xaa) + * CMD8 Response: R7 + */ + +#define MMCSD_CMD8VOLTAGE_SHIFT (8) /* Bits 8-11: Supply voltage */ +#define MMCSD_CMD8VOLTAGE_MASK ((uint32_t)0x0f << MMCSD_CMD8VOLTAGE_SHIFT) +# define MMCSD_CMD8VOLTAGE_27 ((uint32_t)0x01 << MMCSD_CMD8VOLTAGE_SHIFT) /* 2.7-3.6V */ +#define MMCSD_CMD8ECHO_SHIFT (0) /* Bits 0-7: Check pattern */ +#define MMCSD_CMD8ECHO_MASK ((uint32_t)0xff << MMCSD_CMD8ECHO_SHIFT) +# define MMCSD_CMD8CHECKPATTERN ((uint32_t)0xaa << MMCSD_CMD8ECHO_SHIFT) + +/* ACMD6 argument */ + +#define MMCSD_ACMD6_BUSWIDTH_1 ((uint32_t)0) /* Bus width = 1-bit */ +#define MMCSD_ACMD6_BUSWIDTH_4 ((uint32_t)2) /* Bus width = 4-bit */ + +/* ACMD41 argument */ + +#define MMCSD_ACMD41_VOLTAGEWINDOW ((uint32_t)0x80100000) +#define MMCSD_ACMD41_HIGHCAPACITY ((uint32_t)1 << 30) +#define MMCSD_ACMD41_STDCAPACITY ((uint32_t)0) + +/* ACMD42 argument */ + +#define MMCSD_ACMD42_CD_DISCONNECT ((uint32_t)0) /* Disconnect card detection logic */ +#define MMCSD_ACMD42_CD_CONNECT ((uint32_t)1) /* Connect card detection logic */ + +/* R1 Card Status bit definitions */ + +#define MMCSD_R1_OUTOFRANGE ((uint32_t)1 << 31) /* Bad argument */ +#define MMCSD_R1_ADDRESSERROR ((uint32_t)1 << 30) /* Bad address */ +#define MMCSD_R1_BLOCKLENERROR ((uint32_t)1 << 29) /* Bad block length */ +#define MMCSD_R1_ERASESEQERROR ((uint32_t)1 << 28) /* Erase cmd error */ +#define MMCSD_R1_ERASEPARAM ((uint32_t)1 << 27) /* Bad write blocks */ +#define MMCSD_R1_WPVIOLATION ((uint32_t)1 << 26) /* Erase access failure */ +#define MMCSD_R1_CARDISLOCKED ((uint32_t)1 << 25) /* Card is locked */ +#define MMCSD_R1_LOCKUNLOCKFAILED ((uint32_t)1 << 24) /* Password error */ +#define MMCSD_R1_COMCRCERROR ((uint32_t)1 << 23) /* CRC error */ +#define MMCSD_R1_ILLEGALCOMMAND ((uint32_t)1 << 22) /* Bad command */ +#define MMCSD_R1_CARDECCFAILED ((uint32_t)1 << 21) /* Failed to correct data */ +#define MMCSD_R1_CCERROR ((uint32_t)1 << 20) /* Card controller error */ +#define MMCSD_R1_ERROR ((uint32_t)1 << 19) /* General error */ +#define MMCSD_R1_UNDERRUN ((uint32_t)1 << 18) /* Underrun (MMC only) */ +#define MMCSD_R1_OVERRRUN ((uint32_t)1 << 17) /* Overrun (MMC only) */ +#define MMCSD_R1_CIDCSDOVERWRITE ((uint32_t)1 << 16) /* CID/CSD error */ +#define MMCSD_R1_WPERASESKIP ((uint32_t)1 << 15) /* Not all erased */ +#define MMCSD_R1_CARDECCDISABLED ((uint32_t)1 << 14) /* Internal ECC not used */ +#define MMCSD_R1_ERASERESET ((uint32_t)1 << 13) /* Reset sequence cleared */ +#define MMCSD_R1_STATE_SHIFT (9) /* Current card state */ +#define MMCSD_R1_STATE_MASK ((uint32_t)15 << MMCSD_R1_STATE_SHIFT) + /* Card identification mode states */ +# define MMCSD_R1_STATE_IDLE ((uint32_t)0 << MMCSD_R1_STATE_SHIFT) /* 0=Idle state */ +# define MMCSD_R1_STATE_READY ((uint32_t)1 << MMCSD_R1_STATE_SHIFT) /* 1=Ready state */ +# define MMCSD_R1_STATE_IDENT ((uint32_t)2 << MMCSD_R1_STATE_SHIFT) /* 2=Identification state */ + /* Data transfer states */ +# define MMCSD_R1_STATE_STBY ((uint32_t)3 << MMCSD_R1_STATE_SHIFT) /* 3=Standby state */ +# define MMCSD_R1_STATE_TRAN ((uint32_t)4 << MMCSD_R1_STATE_SHIFT) /* 4=Transfer state */ +# define MMCSD_R1_STATE_DATA ((uint32_t)5 << MMCSD_R1_STATE_SHIFT) /* 5=Sending data state */ +# define MMCSD_R1_STATE_RCV ((uint32_t)6 << MMCSD_R1_STATE_SHIFT) /* 6=Receiving data state */ +# define MMCSD_R1_STATE_PRG ((uint32_t)7 << MMCSD_R1_STATE_SHIFT) /* 7=Programming state */ +# define MMCSD_R1_STATE_DIS ((uint32_t)8 << MMCSD_R1_STATE_SHIFT) /* 8=Disconnect state */ +#define MMCSD_R1_READYFORDATA ((uint32_t)1 << 8) /* Buffer empty */ +#define MMCSD_R1_APPCMD ((uint32_t)1 << 5) /* Next CMD is ACMD */ +#define MMCSD_R1_AKESEQERROR ((uint32_t)1 << 3) /* Authentication error */ +#define MMCSD_R1_ERRORMASK ((uint32_t)0xfdffe008) /* Error mask */ + +#define IS_STATE(v,s) ((((uint32_t)v)&MMCSD_R1_STATE_MASK)==(s)) + +/* R3 (OCR) */ + +#define MMC_VDD_20_36 ((uint32_t)0x00ffff00) /* VDD voltage 2.0-3.6 */ + +#define MMCSD_VDD_145_150 ((uint32_t)1 << 0) /* VDD voltage 1.45 - 1.50 */ +#define MMCSD_VDD_150_155 ((uint32_t)1 << 1) /* VDD voltage 1.50 - 1.55 */ +#define MMCSD_VDD_155_160 ((uint32_t)1 << 2) /* VDD voltage 1.55 - 1.60 */ +#define MMCSD_VDD_160_165 ((uint32_t)1 << 3) /* VDD voltage 1.60 - 1.65 */ +#define MMCSD_VDD_165_170 ((uint32_t)1 << 4) /* VDD voltage 1.65 - 1.70 */ +#define MMCSD_VDD_17_18 ((uint32_t)1 << 5) /* VDD voltage 1.7 - 1.8 */ +#define MMCSD_VDD_18_19 ((uint32_t)1 << 6) /* VDD voltage 1.8 - 1.9 */ +#define MMCSD_VDD_19_20 ((uint32_t)1 << 7) /* VDD voltage 1.9 - 2.0 */ +#define MMCSD_VDD_20_21 ((uint32_t)1 << 8) /* VDD voltage 2.0-2.1 */ +#define MMCSD_VDD_21_22 ((uint32_t)1 << 9) /* VDD voltage 2.1-2.2 */ +#define MMCSD_VDD_22_23 ((uint32_t)1 << 10) /* VDD voltage 2.2-2.3 */ +#define MMCSD_VDD_23_24 ((uint32_t)1 << 11) /* VDD voltage 2.3-2.4 */ +#define MMCSD_VDD_24_25 ((uint32_t)1 << 12) /* VDD voltage 2.4-2.5 */ +#define MMCSD_VDD_25_26 ((uint32_t)1 << 13) /* VDD voltage 2.5-2.6 */ +#define MMCSD_VDD_26_27 ((uint32_t)1 << 14) /* VDD voltage 2.6-2.7 */ +#define MMCSD_VDD_27_28 ((uint32_t)1 << 15) /* VDD voltage 2.7-2.8 */ +#define MMCSD_VDD_28_29 ((uint32_t)1 << 16) /* VDD voltage 2.8-2.9 */ +#define MMCSD_VDD_29_30 ((uint32_t)1 << 17) /* VDD voltage 2.9-3.0 */ +#define MMCSD_VDD_30_31 ((uint32_t)1 << 18) /* VDD voltage 3.0-3.1 */ +#define MMCSD_VDD_31_32 ((uint32_t)1 << 19) /* VDD voltage 3.1-3.2 */ +#define MMCSD_VDD_32_33 ((uint32_t)1 << 20) /* VDD voltage 3.2-3.3 */ +#define MMCSD_VDD_33_34 ((uint32_t)1 << 21) /* VDD voltage 3.3-3.4 */ +#define MMCSD_VDD_34_35 ((uint32_t)1 << 22) /* VDD voltage 3.4-3.5 */ +#define MMCSD_VDD_35_36 ((uint32_t)1 << 23) /* VDD voltage 3.5-3.6 */ +#define MMCSD_R3_HIGHCAPACITY ((uint32_t)1 << 30) /* true: Card supports block addressing */ +#define MMCSD_CARD_BUSY ((uint32_t)1 << 31) /* Card power-up busy bit */ + +/* R6 Card Status bit definitions */ + +#define MMCSD_R6_RCA_SHIFT (16) /* New published RCA */ +#define MMCSD_R6_RCA_MASK ((uint32_t)0xffff << MMCSD_R6_RCA_SHIFT) +#define MMCSD_R6_COMCRCERROR ((uint32_t)1 << 15) /* CRC error */ +#define MMCSD_R6_ILLEGALCOMMAND ((uint32_t)1 << 14) /* Bad command */ +#define MMCSD_R6_ERROR ((uint32_t)1 << 13) /* General error */ +#define MMCSD_R6_STATE_SHIFT (9) /* Current card state */ +#define MMCSD_R6_STATE_MASK ((uint32_t)15 << MMCSD_R6_STATE_SHIFT) + /* Card identification mode states */ +# define MMCSD_R6_STATE_IDLE ((uint32_t)0 << MMCSD_R6_STATE_SHIFT) /* 0=Idle state */ +# define MMCSD_R6_STATE_READY ((uint32_t)1 << MMCSD_R6_STATE_SHIFT) /* 1=Ready state */ +# define MMCSD_R6_STATE_IDENT ((uint32_t)2 << MMCSD_R6_STATE_SHIFT) /* 2=Identification state */ + /* Data transfer states */ +# define MMCSD_R6_STATE_STBY ((uint32_t)3 << MMCSD_R6_STATE_SHIFT) /* 3=Standby state */ +# define MMCSD_R6_STATE_TRAN ((uint32_t)4 << MMCSD_R6_STATE_SHIFT) /* 4=Transfer state */ +# define MMCSD_R6_STATE_DATA (5(uint32_t) << MMCSD_R6_STATE_SHIFT) /* 5=Sending data state */ +# define MMCSD_R6_STATE_RCV ((uint32_t)6 << MMCSD_R6_STATE_SHIFT) /* 6=Receiving data state */ +# define MMCSD_R6_STATE_PRG ((uint32_t)7 << MMCSD_R6_STATE_SHIFT) /* 7=Programming state */ +# define MMCSD_R6_STATE_DIS ((uint32_t) << MMCSD_R6_STATE_SHIFT) /* 8=Disconnect state */ +#define MMCSD_R6_ERRORMASK ((uint32_t)0x0000e000) /* Error mask */ + +/* SD Configuration Register (SCR) encoding */ + +#define MMCSD_SCR_BUSWIDTH_1BIT (1) +#define MMCSD_SCR_BUSWIDTH_2BIT (2) +#define MMCSD_SCR_BUSWIDTH_4BIT (4) +#define MMCSD_SCR_BUSWIDTH_8BIT (8) + +/* Last 4 bytes of the 48-bit R7 response */ + +#define MMCSD_R7VERSION_SHIFT (28) /* Bits 28-31: Command version number */ +#define MMCSD_R7VERSION_MASK ((uint32_t)0x0f << MMCSD_R7VERSION_SHIFT) +#define MMCSD_R7VOLTAGE_SHIFT (8) /* Bits 8-11: Voltage accepted */ +#define MMCSD_R7VOLTAGE_MASK ((uint32_t)0x0f << MMCSD_R7VOLTAGE_SHIFT) +# define MMCSD_R7VOLTAGE_27 ((uint32_t)0x01 << MMCSD_R7VOLTAGE_SHIFT) /* 2.7-3.6V */ +#define MMCSD_R7ECHO_SHIFT (0) /* Bits 0-7: Echoed check pattern */ +#define MMCSD_R7ECHO_MASK ((uint32_t)0xff << MMCSD_R7ECHO_SHIFT) +# define MMCSD_R7CHECKPATTERN ((uint32_t)0xaa << MMCSD_R7ECHO_SHIFT) + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +/* Decoded Card Identification (CID) register */ + +struct mmcsd_cid_s +{ + uint8_t mid; /* 127:120 8-bit Manufacturer ID */ + uint16_t oid; /* 119:104 16-bit OEM/Application ID (ascii) */ + uint8_t pnm[6]; /* 103:64 40-bit Product Name (ascii) + null terminator */ + uint8_t prv; /* 63:56 8-bit Product revision */ + uint32_t psn; /* 55:24 32-bit Product serial number */ + /* 23:20 4-bit (reserved) */ + uint16_t mdt; /* 19:8 12-bit Manufacturing date */ + uint8_t crc; /* 7:1 7-bit CRC7 */ + /* 0:0 1-bit (not used) */ +}; + +/* Decoded Card Specific Data (CSD) register */ + +struct mmcsd_csd_s +{ + uint8_t csdstructure; /* 127:126 CSD structure */ + uint8_t mmcspecvers; /* 125:122 MMC Spec version (MMC only) */ + + struct + { + uint8_t timeunit; /* 2:0 Time exponent */ + uint8_t timevalue; /* 6:3 Time mantissa */ + } taac; /* 119:112 Data read access-time-1 */ + + uint8_t nsac; /* 111:104 Data read access-time-2 in CLK cycle(NSAC*100) */ + + struct + { + uint8_t transferrateunit; /* 2:0 Rate exponent */ + uint8_t timevalue; /* 6:3 Rate mantissa */ + } transpeed; /* 103:96 Max. data transfer rate */ + + uint16_t ccc; /* 95:84 Card command classes */ + uint8_t readbllen; /* 83:80 Max. read data block length */ + uint8_t readblpartial; /* 79:79 Partial blocks for read allowed */ + uint8_t writeblkmisalign; /* 78:78 Write block misalignment */ + uint8_t readblkmisalign; /* 77:77 Read block misalignment */ + uint8_t dsrimp; /* 76:76 DSR implemented */ + + union + { +#ifdef CONFIG_MMCSD_MMCSUPPORT + struct + { + uint16_t csize; /* 73:62 Device size */ + uint8_t vddrcurrmin; /* 61:59 Max. read current at Vdd min */ + uint8_t vddrcurrmax; /* 58:56 Max. read current at Vdd max */ + uint8_t vddwcurrmin; /* 55:53 Max. write current at Vdd min */ + uint8_t vddwcurrmax; /* 52:50 Max. write current at Vdd max */ + uint8_t csizemult; /* 49:47 Device size multiplier */ + + union + { + struct /* MMC system specification version 3.1 */ + { + uint8_t ergrpsize; /* 46:42 Erase group size (MMC 3.1) */ + uint8_t ergrpmult; /* 41:37 Erase group multiplier (MMC 3.1) */ + } mmc31; + struct /* MMC system specification version 2.2 */ + { + uint8_t sectorsize; /* 46:42 Erase sector size (MMC 2.2) */ + uint8_t ergrpsize; /* 41:37 Erase group size (MMC 2.2) */ + } mmc22; + } er; + + uint8_t mmcwpgrpsize; /* 36:32 Write protect group size (MMC) */ + } mmc; +#endif + struct + { + uint16_t csize; /* 73:62 Device size */ + uint8_t vddrcurrmin; /* 61:59 Max. read current at Vdd min */ + uint8_t vddrcurrmax; /* 58:56 Max. read current at Vdd max */ + uint8_t vddwcurrmin; /* 55:53 Max. write current at Vdd min */ + uint8_t vddwcurrmax; /* 52:50 Max. write current at Vdd max */ + uint8_t csizemult; /* 49:47 Device size multiplier */ + uint8_t sderblen; /* 46:46 Erase single block enable (SD) */ + uint8_t sdsectorsize; /* 45:39 Erase sector size (SD) */ + uint8_t sdwpgrpsize; /* 38:32 Write protect group size (SD) */ + } sdbyte; + + struct + { + /* 73:70 (reserved) */ + uint32_t csize; /* 69:48 Device size */ + /* 47:47 (reserved) */ + uint8_t sderblen; /* 46:46 Erase single block enable (SD) */ + uint8_t sdsectorsize; /* 45:39 Erase sector size (SD) */ + uint8_t sdwpgrpsize; /* 38:32 Write protect group size (SD) */ + } sdblock; + } u; + + uint8_t wpgrpen; /* 31:31 Write protect group enable */ + uint8_t mmcdfltecc; /* 30:29 Manufacturer default ECC (MMC) */ + uint8_t r2wfactor; /* 28:26 Write speed factor */ + uint8_t writebllen; /* 25:22 Max. write data block length */ + uint8_t writeblpartial; /* 21:21 Partial blocks for write allowed */ + uint8_t fileformatgrp; /* 15:15 File format group */ + uint8_t copy; /* 14:14 Copy flag (OTP) */ + uint8_t permwriteprotect; /* 13:13 Permanent write protection */ + uint8_t tmpwriteprotect; /* 12:12 Temporary write protection */ + uint8_t fileformat; /* 10:11 File format */ + uint8_t mmcecc; /* 9:8 ECC (MMC) */ + uint8_t crc; /* 7:1 CRC */ + /* 0:0 Not used */ +}; + +struct mmcsd_scr_s +{ + uint8_t scrversion; /* 63:60 Version of SCR structure */ + uint8_t sdversion; /* 59:56 SD memory card physical layer version */ + uint8_t erasestate; /* 55:55 Data state after erase (1 or 0) */ + uint8_t security; /* 54:52 SD security support */ + uint8_t buswidth; /* 51:48 DAT bus widthes supported */ + /* 47:32 SD reserved space */ + uint32_t mfgdata; /* 31:0 Reserved for manufacturing data */ +}; + +/******************************************************************************************** + * Public Data + ********************************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/******************************************************************************************** + * Public Functions + ********************************************************************************************/ + + +#undef EXTERN +#if defined(__cplusplus) +} +#endif +#endif /* __DRIVERS_MMCSD_MMCSD_SDIO_H */ diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.h b/nuttx/drivers/mmcsd/mmcsd_spi.h index 055862bebd..8c6f9bae71 100644 --- a/nuttx/drivers/mmcsd/mmcsd_spi.h +++ b/nuttx/drivers/mmcsd/mmcsd_spi.h @@ -2,7 +2,7 @@ * drivers/mmcsd/mmcsd_spi.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mtd/at45db.c b/nuttx/drivers/mtd/at45db.c index f4a695de01..f3c0c72c14 100644 --- a/nuttx/drivers/mtd/at45db.c +++ b/nuttx/drivers/mtd/at45db.c @@ -3,7 +3,7 @@ * Driver for SPI-based AT45DB161D (16Mbit) * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mtd/flash_eraseall.c b/nuttx/drivers/mtd/flash_eraseall.c index 77666ff03d..ce0cfe6491 100644 --- a/nuttx/drivers/mtd/flash_eraseall.c +++ b/nuttx/drivers/mtd/flash_eraseall.c @@ -2,7 +2,7 @@ * drivers/mtd/flash_eraseall.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mtd/ftl.c b/nuttx/drivers/mtd/ftl.c index b16397883f..cdb35aa5cd 100644 --- a/nuttx/drivers/mtd/ftl.c +++ b/nuttx/drivers/mtd/ftl.c @@ -2,7 +2,7 @@ * drivers/mtd/ftl.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/mtd/skeleton.c b/nuttx/drivers/mtd/skeleton.c index 673ddadb35..a2fb982387 100644 --- a/nuttx/drivers/mtd/skeleton.c +++ b/nuttx/drivers/mtd/skeleton.c @@ -2,7 +2,7 @@ * drivers/mtd/skeleton.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/net/cs89x0.c b/nuttx/drivers/net/cs89x0.c index 0f301ee003..22b9b87a5f 100644 --- a/nuttx/drivers/net/cs89x0.c +++ b/nuttx/drivers/net/cs89x0.c @@ -2,7 +2,7 @@ * drivers/net/cs89x0.c * * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/net/cs89x0.h b/nuttx/drivers/net/cs89x0.h index c2073eb988..f6d99120ab 100644 --- a/nuttx/drivers/net/cs89x0.h +++ b/nuttx/drivers/net/cs89x0.h @@ -1,326 +1,326 @@ -/**************************************************************************** - * drivers/net/cs89x0.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __DRIVERS_NET_CS89x0_H -#define __DRIVERS_NET_CS89x0_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* CONFIG_CS89x0_ALIGN16/32 determines if the 16-bit CS89x0 registers are - * aligned to 16-bit or 32-bit address boundaries. NOTE: If there multiple - * CS89x00 parts in the board architecture, we assume that the address - * alignment is the same for all implementations. If that is not the - * case, then it will be necessary to move a shift value into - * the cs89x0_driver_s structure and calculate the offsets dynamically in - * the putreg and getreg functions. - */ - -#if defined(CONFIG_CS89x0_ALIGN16) -# define CS89x0_RTDATA_OFFSET (0 << 1) -# define CS89x0_TxCMD_OFFSET (2 << 1) -# define CS89x0_TxLEN_OFFSET (3 << 1) -# define CS89x0_ISQ_OFFSET (4 << 1) -# define CS89x0_PPTR_OFFSET (5 << 1) -# define CS89x0_PDATA_OFFSET (6 << 1) -#elif defined(CONFIG_CS89x0_ALIGN32) -# define CS89x0_RTDATA_OFFSET (0 << 2) -# define CS89x0_TxCMD_OFFSET (2 << 2) -# define CS89x0_TxLEN_OFFSET (3 << 2) -# define CS89x0_ISQ_OFFSET (4 << 2) -# define CS89x0_PPTR_OFFSET (5 << 2) -# define CS89x0_PDATA_OFFSET (6 << 2) -#else -# error "CS89x00 address alignment is not defined" -#endif - -/* ISQ register bit definitions */ - -#define ISQ_EVENTMASK 0x003f /* Bits 0-5 indicate the status register */ -#define ISQ_RXEVENT 0x0004 -#define ISQ_TXEVENT 0x0008 -#define ISQ_BUFEVENT 0x000c -#define ISQ_RXMISSEVENT 0x0010 -#define ISQ_TXCOLEVENT 0x0012 - -/* ISQ register TxEVENT bit definitions*/ - -#define ISQ_RXEVENT_IAHASH (1 << 6) -#define ISQ_RXEVENT_DRIBBLE (1 << 7) -#define ISQ_RXEVENT_RXOK (1 << 8) -#define ISQ_RXEVENT_HASHED (1 << 9) -#define ISQ_RXEVENT_HASHNDX_SHIFT 10 -#define ISQ_RXEVENT_HASHNDX_MASK (0x3f << ISQ_RXEVENT_HASHNDX_SHIFT) - -/* ISQ register TxEVENT bit definitions*/ - -#define ISQ_TXEVENT_LOSSOFCRS (1 << 6) -#define ISQ_TXEVENT_SQEERROR (1 << 7) -#define ISQ_TXEVENT_TXOK (1 << 8) -#define ISQ_TXEVENT_OUTWINDOW (1 << 9) -#define ISQ_TXEVENT_JABBER (1 << 10) -#define ISQ_TXEVENT_NCOLLISION_SHIFT 11 -#define ISQ_TXEVENT_NCOLLISION_MASK (15 << ISQ_TXEVENT_NCOLLISION_SHIFT) -#define ISQ_TXEVENT_16COLL (1 << 15) - -/* ISQ register BufEVENT bit definitions */ - -#define ISQ_BUFEVENT_SWINT (1 << 6) -#define ISQ_BUFEVENT_RXDMAFRAME (1 << 7) -#define ISQ_BUFEVENT_RDY4TX (1 << 8) -#define ISQ_BUFEVENT_TXUNDERRUN (1 << 9) -#define ISQ_BUFEVENT_RXMISS (1 << 10) -#define ISQ_BUFEVENT_RX128 (1 << 11) -#define ISQ_BUFEVENT_RXDEST (1 << 15) - -/* Packet page register offsets *********************************************/ - -/* 0x0000 Bus interface registers */ - -#define PPR_CHIPID 0x0000 /* Chip identifier - must be 0x630E */ -#define PPR_CHIPREV 0x0002 /* Chip revision, model codes */ -#define PPR_IOBASEADDRESS 0x0020 /* I/O Base Address */ -#define PPR_INTREG 0x0022 /* Interrupt configuration */ -# define PPR_INTREG_IRQ0 0x0000 /* Use INTR0 pin */ -# define PPR_INTREG_IRQ1 0x0001 /* Use INTR1 pin */ -# define PPR_INTREG_IRQ2 0x0002 /* Use INTR2 pin */ -# define PPR_INTREG_IRQ3 0x0003 /* Use INTR3 pin */ - -#define PPR_DMACHANNELNUMBER 0x0024 /* DMA Channel Number (0,1, or 2) */ -#define PPR_DMASTARTOFFRAME 0x0026 /* DMA Start of Frame */ -#define PPR_DMAFRAMECOUNT 0x0028 /* DMA Frame Count (12-bits) */ -#define PPR_RXDMABYTECOUNT 0x002a /* Rx DMA Byte Count */ -#define PPR_MEMORYBASEADDRESS 0x002c /* Memory Base Address Register (20-bit) */ -#define PPR_BOOTPROMBASEADDRESS 0x0030 /* Boot PROM Base Address */ -#define PPR_BOOTPROMADDRESSMASK 0x0034 /* Boot PROM Address Mask */ -#define PPR_EEPROMCOMMAND 0x0040 /* EEPROM Command */ -#define PPR_EEPROMDATA 0x0042 /* EEPROM Data */ -#define PPR_RECVFRAMEBYTES 0x0050 /* Received Frame Byte Counter */ - -/* 0x0100 - Configuration and control registers */ - -#define PPR_RXCFG 0x0102 /* Receiver configuration */ -# define PPR_RXCFG_SKIP1 (1 << 6) /* Skip (discard) current frame */ -# define PPR_RXCFG_STREAM (1 << 7) /* Enable streaming mode */ -# define PPR_RXCFG_RXOK (1 << 8) /* RxOK interrupt enable */ -# define PPR_RxCFG_RxDMAonly (1 << 9) /* Use RxDMA for all frames */ -# define PPR_RxCFG_AutoRxDMA (1 << 10) /* Select RxDMA automatically */ -# define PPR_RxCFG_BufferCRC (1 << 11) /* Include CRC characters in frame */ -# define PPR_RxCFG_CRC (1 << 12) /* Enable interrupt on CRC error */ -# define PPR_RxCFG_RUNT (1 << 13) /* Enable interrupt on RUNT frames */ -# define PPR_RxCFG_EXTRA (1 << 14) /* Enable interrupt on frames with extra data */ - -#define PPR_RXCTL 0x0104 /* Receiver control */ -# define PPR_RXCTL_IAHASH (1 << 6) /* Accept frames that match hash */ -# define PPR_RXCTL_PROMISCUOUS (1 << 7) /* Accept any frame */ -# define PPR_RXCTL_RXOK (1 << 8) /* Accept well formed frames */ -# define PPR_RXCTL_MULTICAST (1 << 9) /* Accept multicast frames */ -# define PPR_RXCTL_IA (1 << 10) /* Accept frame that matches IA */ -# define PPR_RXCTL_BROADCAST (1 << 11) /* Accept broadcast frames */ -# define PPR_RXCTL_CRC (1 << 12) /* Accept frames with bad CRC */ -# define PPR_RXCTL_RUNT (1 << 13) /* Accept runt frames */ -# define PPR_RXCTL_EXTRA (1 << 14) /* Accept frames that are too long */ - -#define PPR_TXCFG 0x0106 /* Transmit configuration */ -# define PPR_TXCFG_CRS (1 << 6) /* Enable interrupt on loss of carrier */ -# define PPR_TXCFG_SQE (1 << 7) /* Enable interrupt on Signal Quality Error */ -# define PPR_TXCFG_TXOK (1 << 8) /* Enable interrupt on successful xmits */ -# define PPR_TXCFG_LATE (1 << 9) /* Enable interrupt on "out of window" */ -# define PPR_TXCFG_JABBER (1 << 10) /* Enable interrupt on jabber detect */ -# define PPR_TXCFG_COLLISION (1 << 11) /* Enable interrupt if collision */ -# define PPR_TXCFG_16COLLISIONS (1 << 15) /* Enable interrupt if > 16 collisions */ - -#define PPR_TXCMD 0x0108 /* Transmit command status */ -# define PPR_TXCMD_TXSTART5 (0 << 6) /* Start after 5 bytes in buffer */ -# define PPR_TXCMD_TXSTART381 (1 << 6) /* Start after 381 bytes in buffer */ -# define PPR_TXCMD_TXSTART1021 (2 << 6) /* Start after 1021 bytes in buffer */ -# define PPR_TXCMD_TXSTARTFULL (3 << 6) /* Start after all bytes loaded */ -# define PPR_TXCMD_FORCE (1 << 8) /* Discard any pending packets */ -# define PPR_TXCMD_ONECOLLISION (1 << 9) /* Abort after a single collision */ -# define PPR_TXCMD_NOCRC (1 << 12) /* Do not add CRC */ -# define PPR_TXCMD_NOPAD (1 << 13) /* Do not pad short packets */ - -#define PPR_BUFCFG 0x010a /* Buffer configuration */ -# define PPR_BUFCFG_SWI (1 << 6) /* Force interrupt via software */ -# define PPR_BUFCFG_RXDMA (1 << 7) /* Enable interrupt on Rx DMA */ -# define PPR_BUFCFG_TXRDY (1 << 8) /* Enable interrupt when ready for Tx */ -# define PPR_BUFCFG_TXUE (1 << 9) /* Enable interrupt in Tx underrun */ -# define PPR_BUFCFG_RXMISS (1 << 10) /* Enable interrupt on missed Rx packets */ -# define PPR_BUFCFG_RX128 (1 << 11) /* Enable Rx interrupt after 128 bytes */ -# define PPR_BUFCFG_TXCOL (1 << 12) /* Enable int on Tx collision ctr overflow */ -# define PPR_BUFCFG_MISS (1 << 13) /* Enable int on Rx miss ctr overflow */ -# define PPR_BUFCFG_RXDEST (1 << 15) /* Enable int on Rx dest addr match */ - -#define PPR_LINECTL 0x0112 /* Line control */ -# define PPR_LINECTL_RX (1 << 6) /* Enable receiver */ -# define PPR_LINECTL_TX (1 << 7) /* Enable transmitter */ -# define PPR_LINECTL_AUIONLY (1 << 8) /* AUI interface only */ -# define PPR_LINECTL_AUTOAUI10BT (1 << 9) /* Autodetect AUI or 10BaseT interface */ -# define PPR_LINECTL_MODBACKOFFE (1 << 11) /* Enable modified backoff algorithm */ -# define PPR_LINECTL_POLARITYDIS (1 << 12) /* Disable Rx polarity autodetect */ -# define PPR_LINECTL_2PARTDEFDIS (1 << 13) /* Disable two-part defferal */ -# define PPR_LINECTL_LORXSQUELCH (1 << 14) /* Reduce receiver squelch threshold */ - -#define PPR_SELFCTL 0x0114 /* Chip self control */ -# define PPR_SELFCTL_RESET (1 << 6) /* Self-clearing reset */ -# define PPR_SELFCTL_SWSUSPEND (1 << 8) /* Initiate suspend mode */ -# define PPR_SELFCTL_HWSLEEPE (1 << 9) /* Enable SLEEP input */ -# define PPR_SELFCTL_HWSTANDBYE (1 << 10) /* Enable standby mode */ -# define PPR_SELFCTL_HC0E (1 << 12) /* Use HCB0 for LINK LED */ -# define PPR_SELFCTL_HC1E (1 << 13) /* Use HCB1 for BSTATUS LED */ -# define PPR_SELFCTL_HCB0 (1 << 14) /* Control LINK LED if HC0E set */ -# define PPR_SELFCTL_HCB1 (1 << 15) /* Cntrol BSTATUS LED if HC1E set */ - -#define PPR_BUSCTL 0x0116 /* Bus control */ -# define PPR_BUSCTL_RESETRXDMA (1 << 6) /* Reset RxDMA pointer */ -# define PPR_BUSCTL_DMAEXTEND (1 << 8) /* Extend DMA cycle */ -# define PPR_BUSCTL_USESA (1 << 9) /* Assert MEMCS16 on address decode */ -# define PPR_BUSCTL_MEMORYE (1 << 10) /* Enable memory mode */ -# define PPR_BUSCTL_DMABURST (1 << 11) /* Limit DMA access burst */ -# define PPR_BUSCTL_IOCHRDYE (1 << 12) /* Set IOCHRDY high impedence */ -# define PPR_BUSCTL_RXDMASIZE (1 << 13) /* Set DMA buffer size 64KB */ -# define PPR_BUSCTL_ENABLEIRQ (1 << 15) /* Generate interrupt on interrupt event */ - -#define PPR_TESTCTL 0x0118 /* Test control */ -# define PPR_TESTCTL_DISABLELT (1 << 7) /* Disable link status */ -# define PPR_TESTCTL_ENDECLOOP (1 << 9) /* Internal loopback */ -# define PPR_TESTCTL_AUILOOP (1 << 10) /* AUI loopback */ -# define PPR_TESTCTL_DISBACKOFF (1 << 11) /* Disable backoff algorithm */ -# define PPR_TESTCTL_FDX (1 << 14) /* Enable full duplex mode */ - -/* 0x0120 - Status and Event Registers */ - -#define PPR_ISQ 0x0120 /* Interrupt Status Queue */ -#define PPR_RER 0x0124 /* Receive event */ -# define PPR_RER_IAHASH (1 << 6) /* Frame hash match */ -# define PPR_RER_DRIBBLE (1 << 7) /* Frame had 1-7 extra bits after last byte */ -# define PPR_RER_RXOK (1 << 8) /* Frame received with no errors */ -# define PPR_RER_HASHED (1 << 9) /* Frame address hashed OK */ -# define PPR_RER_IA (1 << 10) /* Frame address matched IA */ -# define PPR_RER_BROADCAST (1 << 11) /* Broadcast frame */ -# define PPR_RER_CRC (1 << 12) /* Frame had CRC error */ -# define PPR_RER_RUNT (1 << 13) /* Runt frame */ -# define PPR_RER_EXTRA (1 << 14) /* Frame was too long */ - -#define PPR_TER 0x0128 /* Transmit event */ -# define PPR_TER_CRS (1 << 6) /* Carrier lost */ -# define PPR_TER_SQE (1 << 7) /* Signal Quality Error */ -# define PPR_TER_TXOK (1 << 8) /* Packet sent without error */ -# define PPR_TER_LATE (1 << 9) /* Out of window */ -# define PPR_TER_JABBER (1 << 10) /* Stuck transmit? */ -# define PPR_TER_NUMCOLLISIONS_SHIFT 11 -# define PPR_TER_NUMCOLLISIONS_MASK (15 << PPR_TER_NUMCOLLISIONS_SHIFT) -# define PPR_TER_16COLLISIONS (1 << 15) /* > 16 collisions */ - -#define PPR_BER 0x012C /* Buffer event */ -# define PPR_BER_SWINT (1 << 6) /* Software interrupt */ -# define PPR_BER_RXDMAFRAME (1 << 7) /* Received framed DMAed */ -# define PPR_BER_RDY4TX (1 << 8) /* Ready for transmission */ -# define PPR_BER_TXUNDERRUN (1 << 9) /* Transmit underrun */ -# define PPR_BER_RXMISS (1 << 10) /* Received frame missed */ -# define PPR_BER_RX128 (1 << 11) /* 128 bytes received */ -# define PPR_BER_RXDEST (1 << 15) /* Received framed passed address filter */ - -#define PPR_RXMISS 0x0130 /* Receiver miss counter */ -#define PPR_TXCOL 0x0132 /* Transmit collision counter */ -#define PPR_LINESTAT 0x0134 /* Line status */ -# define PPR_LINESTAT_LINKOK (1 << 7) /* Line is connected and working */ -# define PPR_LINESTAT_AUI (1 << 8) /* Connected via AUI */ -# define PPR_LINESTAT_10BT (1 << 9) /* Connected via twisted pair */ -# define PPR_LINESTAT_POLARITY (1 << 12) /* Line polarity OK (10BT only) */ -# define PPR_LINESTAT_CRS (1 << 14) /* Frame being received */ - -#define PPR_SELFSTAT 0x0136 /* Chip self status */ -# define PPR_SELFSTAT_33VACTIVE (1 << 6) /* supply voltage is 3.3V */ -# define PPR_SELFSTAT_INITD (1 << 7) /* Chip initialization complete */ -# define PPR_SELFSTAT_SIBSY (1 << 8) /* EEPROM is busy */ -# define PPR_SELFSTAT_EEPROM (1 << 9) /* EEPROM present */ -# define PPR_SELFSTAT_EEPROMOK (1 << 10) /* EEPROM checks out */ -# define PPR_SELFSTAT_ELPRESENT (1 << 11) /* External address latch logic available */ -# define PPR_SELFSTAT_EESIZE (1 << 12) /* Size of EEPROM */ - -#define PPR_BUSSTAT 0x0138 /* Bus status */ -# define PPR_BUSSTAT_TXBID (1 << 7) /* Tx error */ -# define PPR_BUSSTAT_TXRDY (1 << 8) /* Ready for Tx data */ - -#define PPR_TDR 0x013C /* AUI Time Domain Reflectometer */ - -/* 0x0144 - Initiate transmit registers */ - -#define PPR_TXCOMMAND 0x0144 /* Tx Command */ -#define PPR_TXLENGTH 0x0146 /* Tx Length */ - -/* 0x0150 - Address filter registers */ - -#define PPR_LAF 0x0150 /* Logical address filter (6 bytes) */ -#define PPR_IA 0x0158 /* Individual address (MAC) */ - -/* 0x0400 - Frame location registers */ - -#define PPR_RXSTATUS 0x0400 /* Rx Status */ -#define PPR_RXLENGTH 0x0402 /* Rx Length */ -#define PPR_RXFRAMELOCATION 0x0404 /* Rx Frame Location */ -#define PPR_TXFRAMELOCATION 0x0a00 /* Tx Frame Location */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __DRIVERS_NET_CS89x0_H */ +/**************************************************************************** + * drivers/net/cs89x0.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __DRIVERS_NET_CS89x0_H +#define __DRIVERS_NET_CS89x0_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* CONFIG_CS89x0_ALIGN16/32 determines if the 16-bit CS89x0 registers are + * aligned to 16-bit or 32-bit address boundaries. NOTE: If there multiple + * CS89x00 parts in the board architecture, we assume that the address + * alignment is the same for all implementations. If that is not the + * case, then it will be necessary to move a shift value into + * the cs89x0_driver_s structure and calculate the offsets dynamically in + * the putreg and getreg functions. + */ + +#if defined(CONFIG_CS89x0_ALIGN16) +# define CS89x0_RTDATA_OFFSET (0 << 1) +# define CS89x0_TxCMD_OFFSET (2 << 1) +# define CS89x0_TxLEN_OFFSET (3 << 1) +# define CS89x0_ISQ_OFFSET (4 << 1) +# define CS89x0_PPTR_OFFSET (5 << 1) +# define CS89x0_PDATA_OFFSET (6 << 1) +#elif defined(CONFIG_CS89x0_ALIGN32) +# define CS89x0_RTDATA_OFFSET (0 << 2) +# define CS89x0_TxCMD_OFFSET (2 << 2) +# define CS89x0_TxLEN_OFFSET (3 << 2) +# define CS89x0_ISQ_OFFSET (4 << 2) +# define CS89x0_PPTR_OFFSET (5 << 2) +# define CS89x0_PDATA_OFFSET (6 << 2) +#else +# error "CS89x00 address alignment is not defined" +#endif + +/* ISQ register bit definitions */ + +#define ISQ_EVENTMASK 0x003f /* Bits 0-5 indicate the status register */ +#define ISQ_RXEVENT 0x0004 +#define ISQ_TXEVENT 0x0008 +#define ISQ_BUFEVENT 0x000c +#define ISQ_RXMISSEVENT 0x0010 +#define ISQ_TXCOLEVENT 0x0012 + +/* ISQ register TxEVENT bit definitions*/ + +#define ISQ_RXEVENT_IAHASH (1 << 6) +#define ISQ_RXEVENT_DRIBBLE (1 << 7) +#define ISQ_RXEVENT_RXOK (1 << 8) +#define ISQ_RXEVENT_HASHED (1 << 9) +#define ISQ_RXEVENT_HASHNDX_SHIFT 10 +#define ISQ_RXEVENT_HASHNDX_MASK (0x3f << ISQ_RXEVENT_HASHNDX_SHIFT) + +/* ISQ register TxEVENT bit definitions*/ + +#define ISQ_TXEVENT_LOSSOFCRS (1 << 6) +#define ISQ_TXEVENT_SQEERROR (1 << 7) +#define ISQ_TXEVENT_TXOK (1 << 8) +#define ISQ_TXEVENT_OUTWINDOW (1 << 9) +#define ISQ_TXEVENT_JABBER (1 << 10) +#define ISQ_TXEVENT_NCOLLISION_SHIFT 11 +#define ISQ_TXEVENT_NCOLLISION_MASK (15 << ISQ_TXEVENT_NCOLLISION_SHIFT) +#define ISQ_TXEVENT_16COLL (1 << 15) + +/* ISQ register BufEVENT bit definitions */ + +#define ISQ_BUFEVENT_SWINT (1 << 6) +#define ISQ_BUFEVENT_RXDMAFRAME (1 << 7) +#define ISQ_BUFEVENT_RDY4TX (1 << 8) +#define ISQ_BUFEVENT_TXUNDERRUN (1 << 9) +#define ISQ_BUFEVENT_RXMISS (1 << 10) +#define ISQ_BUFEVENT_RX128 (1 << 11) +#define ISQ_BUFEVENT_RXDEST (1 << 15) + +/* Packet page register offsets *********************************************/ + +/* 0x0000 Bus interface registers */ + +#define PPR_CHIPID 0x0000 /* Chip identifier - must be 0x630E */ +#define PPR_CHIPREV 0x0002 /* Chip revision, model codes */ +#define PPR_IOBASEADDRESS 0x0020 /* I/O Base Address */ +#define PPR_INTREG 0x0022 /* Interrupt configuration */ +# define PPR_INTREG_IRQ0 0x0000 /* Use INTR0 pin */ +# define PPR_INTREG_IRQ1 0x0001 /* Use INTR1 pin */ +# define PPR_INTREG_IRQ2 0x0002 /* Use INTR2 pin */ +# define PPR_INTREG_IRQ3 0x0003 /* Use INTR3 pin */ + +#define PPR_DMACHANNELNUMBER 0x0024 /* DMA Channel Number (0,1, or 2) */ +#define PPR_DMASTARTOFFRAME 0x0026 /* DMA Start of Frame */ +#define PPR_DMAFRAMECOUNT 0x0028 /* DMA Frame Count (12-bits) */ +#define PPR_RXDMABYTECOUNT 0x002a /* Rx DMA Byte Count */ +#define PPR_MEMORYBASEADDRESS 0x002c /* Memory Base Address Register (20-bit) */ +#define PPR_BOOTPROMBASEADDRESS 0x0030 /* Boot PROM Base Address */ +#define PPR_BOOTPROMADDRESSMASK 0x0034 /* Boot PROM Address Mask */ +#define PPR_EEPROMCOMMAND 0x0040 /* EEPROM Command */ +#define PPR_EEPROMDATA 0x0042 /* EEPROM Data */ +#define PPR_RECVFRAMEBYTES 0x0050 /* Received Frame Byte Counter */ + +/* 0x0100 - Configuration and control registers */ + +#define PPR_RXCFG 0x0102 /* Receiver configuration */ +# define PPR_RXCFG_SKIP1 (1 << 6) /* Skip (discard) current frame */ +# define PPR_RXCFG_STREAM (1 << 7) /* Enable streaming mode */ +# define PPR_RXCFG_RXOK (1 << 8) /* RxOK interrupt enable */ +# define PPR_RxCFG_RxDMAonly (1 << 9) /* Use RxDMA for all frames */ +# define PPR_RxCFG_AutoRxDMA (1 << 10) /* Select RxDMA automatically */ +# define PPR_RxCFG_BufferCRC (1 << 11) /* Include CRC characters in frame */ +# define PPR_RxCFG_CRC (1 << 12) /* Enable interrupt on CRC error */ +# define PPR_RxCFG_RUNT (1 << 13) /* Enable interrupt on RUNT frames */ +# define PPR_RxCFG_EXTRA (1 << 14) /* Enable interrupt on frames with extra data */ + +#define PPR_RXCTL 0x0104 /* Receiver control */ +# define PPR_RXCTL_IAHASH (1 << 6) /* Accept frames that match hash */ +# define PPR_RXCTL_PROMISCUOUS (1 << 7) /* Accept any frame */ +# define PPR_RXCTL_RXOK (1 << 8) /* Accept well formed frames */ +# define PPR_RXCTL_MULTICAST (1 << 9) /* Accept multicast frames */ +# define PPR_RXCTL_IA (1 << 10) /* Accept frame that matches IA */ +# define PPR_RXCTL_BROADCAST (1 << 11) /* Accept broadcast frames */ +# define PPR_RXCTL_CRC (1 << 12) /* Accept frames with bad CRC */ +# define PPR_RXCTL_RUNT (1 << 13) /* Accept runt frames */ +# define PPR_RXCTL_EXTRA (1 << 14) /* Accept frames that are too long */ + +#define PPR_TXCFG 0x0106 /* Transmit configuration */ +# define PPR_TXCFG_CRS (1 << 6) /* Enable interrupt on loss of carrier */ +# define PPR_TXCFG_SQE (1 << 7) /* Enable interrupt on Signal Quality Error */ +# define PPR_TXCFG_TXOK (1 << 8) /* Enable interrupt on successful xmits */ +# define PPR_TXCFG_LATE (1 << 9) /* Enable interrupt on "out of window" */ +# define PPR_TXCFG_JABBER (1 << 10) /* Enable interrupt on jabber detect */ +# define PPR_TXCFG_COLLISION (1 << 11) /* Enable interrupt if collision */ +# define PPR_TXCFG_16COLLISIONS (1 << 15) /* Enable interrupt if > 16 collisions */ + +#define PPR_TXCMD 0x0108 /* Transmit command status */ +# define PPR_TXCMD_TXSTART5 (0 << 6) /* Start after 5 bytes in buffer */ +# define PPR_TXCMD_TXSTART381 (1 << 6) /* Start after 381 bytes in buffer */ +# define PPR_TXCMD_TXSTART1021 (2 << 6) /* Start after 1021 bytes in buffer */ +# define PPR_TXCMD_TXSTARTFULL (3 << 6) /* Start after all bytes loaded */ +# define PPR_TXCMD_FORCE (1 << 8) /* Discard any pending packets */ +# define PPR_TXCMD_ONECOLLISION (1 << 9) /* Abort after a single collision */ +# define PPR_TXCMD_NOCRC (1 << 12) /* Do not add CRC */ +# define PPR_TXCMD_NOPAD (1 << 13) /* Do not pad short packets */ + +#define PPR_BUFCFG 0x010a /* Buffer configuration */ +# define PPR_BUFCFG_SWI (1 << 6) /* Force interrupt via software */ +# define PPR_BUFCFG_RXDMA (1 << 7) /* Enable interrupt on Rx DMA */ +# define PPR_BUFCFG_TXRDY (1 << 8) /* Enable interrupt when ready for Tx */ +# define PPR_BUFCFG_TXUE (1 << 9) /* Enable interrupt in Tx underrun */ +# define PPR_BUFCFG_RXMISS (1 << 10) /* Enable interrupt on missed Rx packets */ +# define PPR_BUFCFG_RX128 (1 << 11) /* Enable Rx interrupt after 128 bytes */ +# define PPR_BUFCFG_TXCOL (1 << 12) /* Enable int on Tx collision ctr overflow */ +# define PPR_BUFCFG_MISS (1 << 13) /* Enable int on Rx miss ctr overflow */ +# define PPR_BUFCFG_RXDEST (1 << 15) /* Enable int on Rx dest addr match */ + +#define PPR_LINECTL 0x0112 /* Line control */ +# define PPR_LINECTL_RX (1 << 6) /* Enable receiver */ +# define PPR_LINECTL_TX (1 << 7) /* Enable transmitter */ +# define PPR_LINECTL_AUIONLY (1 << 8) /* AUI interface only */ +# define PPR_LINECTL_AUTOAUI10BT (1 << 9) /* Autodetect AUI or 10BaseT interface */ +# define PPR_LINECTL_MODBACKOFFE (1 << 11) /* Enable modified backoff algorithm */ +# define PPR_LINECTL_POLARITYDIS (1 << 12) /* Disable Rx polarity autodetect */ +# define PPR_LINECTL_2PARTDEFDIS (1 << 13) /* Disable two-part defferal */ +# define PPR_LINECTL_LORXSQUELCH (1 << 14) /* Reduce receiver squelch threshold */ + +#define PPR_SELFCTL 0x0114 /* Chip self control */ +# define PPR_SELFCTL_RESET (1 << 6) /* Self-clearing reset */ +# define PPR_SELFCTL_SWSUSPEND (1 << 8) /* Initiate suspend mode */ +# define PPR_SELFCTL_HWSLEEPE (1 << 9) /* Enable SLEEP input */ +# define PPR_SELFCTL_HWSTANDBYE (1 << 10) /* Enable standby mode */ +# define PPR_SELFCTL_HC0E (1 << 12) /* Use HCB0 for LINK LED */ +# define PPR_SELFCTL_HC1E (1 << 13) /* Use HCB1 for BSTATUS LED */ +# define PPR_SELFCTL_HCB0 (1 << 14) /* Control LINK LED if HC0E set */ +# define PPR_SELFCTL_HCB1 (1 << 15) /* Cntrol BSTATUS LED if HC1E set */ + +#define PPR_BUSCTL 0x0116 /* Bus control */ +# define PPR_BUSCTL_RESETRXDMA (1 << 6) /* Reset RxDMA pointer */ +# define PPR_BUSCTL_DMAEXTEND (1 << 8) /* Extend DMA cycle */ +# define PPR_BUSCTL_USESA (1 << 9) /* Assert MEMCS16 on address decode */ +# define PPR_BUSCTL_MEMORYE (1 << 10) /* Enable memory mode */ +# define PPR_BUSCTL_DMABURST (1 << 11) /* Limit DMA access burst */ +# define PPR_BUSCTL_IOCHRDYE (1 << 12) /* Set IOCHRDY high impedence */ +# define PPR_BUSCTL_RXDMASIZE (1 << 13) /* Set DMA buffer size 64KB */ +# define PPR_BUSCTL_ENABLEIRQ (1 << 15) /* Generate interrupt on interrupt event */ + +#define PPR_TESTCTL 0x0118 /* Test control */ +# define PPR_TESTCTL_DISABLELT (1 << 7) /* Disable link status */ +# define PPR_TESTCTL_ENDECLOOP (1 << 9) /* Internal loopback */ +# define PPR_TESTCTL_AUILOOP (1 << 10) /* AUI loopback */ +# define PPR_TESTCTL_DISBACKOFF (1 << 11) /* Disable backoff algorithm */ +# define PPR_TESTCTL_FDX (1 << 14) /* Enable full duplex mode */ + +/* 0x0120 - Status and Event Registers */ + +#define PPR_ISQ 0x0120 /* Interrupt Status Queue */ +#define PPR_RER 0x0124 /* Receive event */ +# define PPR_RER_IAHASH (1 << 6) /* Frame hash match */ +# define PPR_RER_DRIBBLE (1 << 7) /* Frame had 1-7 extra bits after last byte */ +# define PPR_RER_RXOK (1 << 8) /* Frame received with no errors */ +# define PPR_RER_HASHED (1 << 9) /* Frame address hashed OK */ +# define PPR_RER_IA (1 << 10) /* Frame address matched IA */ +# define PPR_RER_BROADCAST (1 << 11) /* Broadcast frame */ +# define PPR_RER_CRC (1 << 12) /* Frame had CRC error */ +# define PPR_RER_RUNT (1 << 13) /* Runt frame */ +# define PPR_RER_EXTRA (1 << 14) /* Frame was too long */ + +#define PPR_TER 0x0128 /* Transmit event */ +# define PPR_TER_CRS (1 << 6) /* Carrier lost */ +# define PPR_TER_SQE (1 << 7) /* Signal Quality Error */ +# define PPR_TER_TXOK (1 << 8) /* Packet sent without error */ +# define PPR_TER_LATE (1 << 9) /* Out of window */ +# define PPR_TER_JABBER (1 << 10) /* Stuck transmit? */ +# define PPR_TER_NUMCOLLISIONS_SHIFT 11 +# define PPR_TER_NUMCOLLISIONS_MASK (15 << PPR_TER_NUMCOLLISIONS_SHIFT) +# define PPR_TER_16COLLISIONS (1 << 15) /* > 16 collisions */ + +#define PPR_BER 0x012C /* Buffer event */ +# define PPR_BER_SWINT (1 << 6) /* Software interrupt */ +# define PPR_BER_RXDMAFRAME (1 << 7) /* Received framed DMAed */ +# define PPR_BER_RDY4TX (1 << 8) /* Ready for transmission */ +# define PPR_BER_TXUNDERRUN (1 << 9) /* Transmit underrun */ +# define PPR_BER_RXMISS (1 << 10) /* Received frame missed */ +# define PPR_BER_RX128 (1 << 11) /* 128 bytes received */ +# define PPR_BER_RXDEST (1 << 15) /* Received framed passed address filter */ + +#define PPR_RXMISS 0x0130 /* Receiver miss counter */ +#define PPR_TXCOL 0x0132 /* Transmit collision counter */ +#define PPR_LINESTAT 0x0134 /* Line status */ +# define PPR_LINESTAT_LINKOK (1 << 7) /* Line is connected and working */ +# define PPR_LINESTAT_AUI (1 << 8) /* Connected via AUI */ +# define PPR_LINESTAT_10BT (1 << 9) /* Connected via twisted pair */ +# define PPR_LINESTAT_POLARITY (1 << 12) /* Line polarity OK (10BT only) */ +# define PPR_LINESTAT_CRS (1 << 14) /* Frame being received */ + +#define PPR_SELFSTAT 0x0136 /* Chip self status */ +# define PPR_SELFSTAT_33VACTIVE (1 << 6) /* supply voltage is 3.3V */ +# define PPR_SELFSTAT_INITD (1 << 7) /* Chip initialization complete */ +# define PPR_SELFSTAT_SIBSY (1 << 8) /* EEPROM is busy */ +# define PPR_SELFSTAT_EEPROM (1 << 9) /* EEPROM present */ +# define PPR_SELFSTAT_EEPROMOK (1 << 10) /* EEPROM checks out */ +# define PPR_SELFSTAT_ELPRESENT (1 << 11) /* External address latch logic available */ +# define PPR_SELFSTAT_EESIZE (1 << 12) /* Size of EEPROM */ + +#define PPR_BUSSTAT 0x0138 /* Bus status */ +# define PPR_BUSSTAT_TXBID (1 << 7) /* Tx error */ +# define PPR_BUSSTAT_TXRDY (1 << 8) /* Ready for Tx data */ + +#define PPR_TDR 0x013C /* AUI Time Domain Reflectometer */ + +/* 0x0144 - Initiate transmit registers */ + +#define PPR_TXCOMMAND 0x0144 /* Tx Command */ +#define PPR_TXLENGTH 0x0146 /* Tx Length */ + +/* 0x0150 - Address filter registers */ + +#define PPR_LAF 0x0150 /* Logical address filter (6 bytes) */ +#define PPR_IA 0x0158 /* Individual address (MAC) */ + +/* 0x0400 - Frame location registers */ + +#define PPR_RXSTATUS 0x0400 /* Rx Status */ +#define PPR_RXLENGTH 0x0402 /* Rx Length */ +#define PPR_RXFRAMELOCATION 0x0404 /* Rx Frame Location */ +#define PPR_TXFRAMELOCATION 0x0a00 /* Tx Frame Location */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __DRIVERS_NET_CS89x0_H */ diff --git a/nuttx/drivers/net/dm90x0.c b/nuttx/drivers/net/dm90x0.c index 15433e0f80..2f5b26abb6 100644 --- a/nuttx/drivers/net/dm90x0.c +++ b/nuttx/drivers/net/dm90x0.c @@ -2,7 +2,7 @@ * drivers/net/dm9x.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Davicom data sheets (DM9000-DS-F03-041906.pdf, * DM9010-DS-F01-103006.pdf) and looking at lots of other DM90x0 diff --git a/nuttx/drivers/net/enc28j60.h b/nuttx/drivers/net/enc28j60.h index 6ca1a524d1..3c787c5339 100644 --- a/nuttx/drivers/net/enc28j60.h +++ b/nuttx/drivers/net/enc28j60.h @@ -2,7 +2,7 @@ * drivers/net/enc28j60.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: * - ENC28J60 Data Sheet, Stand-Alone Ethernet Controller with SPI Interface, diff --git a/nuttx/drivers/power/pm_activity.c b/nuttx/drivers/power/pm_activity.c index f52fc93ff3..d3c8a52e77 100644 --- a/nuttx/drivers/power/pm_activity.c +++ b/nuttx/drivers/power/pm_activity.c @@ -2,7 +2,7 @@ * drivers/power/pm_activity.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/sensors/Make.defs b/nuttx/drivers/sensors/Make.defs index d04e7541e1..866ccb0536 100644 --- a/nuttx/drivers/sensors/Make.defs +++ b/nuttx/drivers/sensors/Make.defs @@ -2,7 +2,7 @@ # drivers/sensors/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/sensors/lm75.c b/nuttx/drivers/sensors/lm75.c index 8e1a0fb4b6..2d3346447b 100644 --- a/nuttx/drivers/sensors/lm75.c +++ b/nuttx/drivers/sensors/lm75.c @@ -3,7 +3,7 @@ * Character driver for the STMicro LM-75 Temperature Sensor * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/sercomm/Make.defs b/nuttx/drivers/sercomm/Make.defs index 3585f53146..0cf93d4c80 100644 --- a/nuttx/drivers/sercomm/Make.defs +++ b/nuttx/drivers/sercomm/Make.defs @@ -2,7 +2,7 @@ # drivers/serial/Make.defs # # Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/Make.defs b/nuttx/drivers/usbhost/Make.defs index cc28e874d4..fd54ab53e7 100644 --- a/nuttx/drivers/usbhost/Make.defs +++ b/nuttx/drivers/usbhost/Make.defs @@ -2,7 +2,7 @@ # drivers/usbhost/Make.defs # # Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/usbhost_findclass.c b/nuttx/drivers/usbhost/usbhost_findclass.c index f08aff580e..3e38670cf8 100644 --- a/nuttx/drivers/usbhost/usbhost_findclass.c +++ b/nuttx/drivers/usbhost/usbhost_findclass.c @@ -2,7 +2,7 @@ * drivers/usbhost/usbhost_findclass.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c index bb3ecad9e4..e69d68e7b2 100644 --- a/nuttx/drivers/usbhost/usbhost_hidkbd.c +++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c @@ -2,7 +2,7 @@ * drivers/usbhost/usbhost_hidkbd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/usbhost_registerclass.c b/nuttx/drivers/usbhost/usbhost_registerclass.c index 76ef511af8..f4d1b64afb 100644 --- a/nuttx/drivers/usbhost/usbhost_registerclass.c +++ b/nuttx/drivers/usbhost/usbhost_registerclass.c @@ -2,7 +2,7 @@ * drivers/usbhost/usbhost_registerclass.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/usbhost_registry.c b/nuttx/drivers/usbhost/usbhost_registry.c index 56c03e2dc5..fb2e900e26 100644 --- a/nuttx/drivers/usbhost/usbhost_registry.c +++ b/nuttx/drivers/usbhost/usbhost_registry.c @@ -2,7 +2,7 @@ * drivers/usbhost/usbhost_registry.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/usbhost/usbhost_registry.h b/nuttx/drivers/usbhost/usbhost_registry.h index 63436af5d6..759a1c66e7 100644 --- a/nuttx/drivers/usbhost/usbhost_registry.h +++ b/nuttx/drivers/usbhost/usbhost_registry.h @@ -2,7 +2,7 @@ * drivers/usbhost/usbdev_registry.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/drivers/wireless/Make.defs b/nuttx/drivers/wireless/Make.defs index ac73c8d85e..f47f7666a5 100644 --- a/nuttx/drivers/wireless/Make.defs +++ b/nuttx/drivers/wireless/Make.defs @@ -2,7 +2,7 @@ # drivers/wireless/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/Make.defs b/nuttx/fs/fat/Make.defs index 96be439614..136302b86f 100644 --- a/nuttx/fs/fat/Make.defs +++ b/nuttx/fs/fat/Make.defs @@ -2,7 +2,7 @@ # Make.defs # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/fs_configfat.c b/nuttx/fs/fat/fs_configfat.c index 3a55a5215c..2075caa9fa 100644 --- a/nuttx/fs/fat/fs_configfat.c +++ b/nuttx/fs/fat/fs_configfat.c @@ -2,7 +2,7 @@ * fs/fat/fs_configfat.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/fs_fat32dirent.c b/nuttx/fs/fat/fs_fat32dirent.c index 742fa1eeb3..18cf678479 100644 --- a/nuttx/fs/fat/fs_fat32dirent.c +++ b/nuttx/fs/fat/fs_fat32dirent.c @@ -2,7 +2,7 @@ * fs/fat/fs_fat32dirent.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/fs_mkfatfs.c b/nuttx/fs/fat/fs_mkfatfs.c index 7a8b2ab921..384aa93567 100644 --- a/nuttx/fs/fat/fs_mkfatfs.c +++ b/nuttx/fs/fat/fs_mkfatfs.c @@ -2,7 +2,7 @@ * fs/fat/fs_writefat.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/fs_mkfatfs.h b/nuttx/fs/fat/fs_mkfatfs.h index 214697c519..05801c92d7 100644 --- a/nuttx/fs/fat/fs_mkfatfs.h +++ b/nuttx/fs/fat/fs_mkfatfs.h @@ -2,7 +2,7 @@ * fs/fat/fs_mkfat.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/fat/fs_writefat.c b/nuttx/fs/fat/fs_writefat.c index 02d55d6258..564be5b50c 100644 --- a/nuttx/fs/fat/fs_writefat.c +++ b/nuttx/fs/fat/fs_writefat.c @@ -2,7 +2,7 @@ * fs/fat/fs_writefat.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/mmap/Make.defs b/nuttx/fs/mmap/Make.defs index 2d3d006949..59857fe9c4 100644 --- a/nuttx/fs/mmap/Make.defs +++ b/nuttx/fs/mmap/Make.defs @@ -2,7 +2,7 @@ # fs/mmap/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/fs/mmap/fs_mmap.c b/nuttx/fs/mmap/fs_mmap.c index 5764b16f1d..85d796586a 100644 --- a/nuttx/fs/mmap/fs_mmap.c +++ b/nuttx/fs/mmap/fs_mmap.c @@ -2,7 +2,7 @@ * fs/mmap/fs_mmap.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/mmap/fs_munmap.c b/nuttx/fs/mmap/fs_munmap.c index a4b9dc6091..5d9416d454 100644 --- a/nuttx/fs/mmap/fs_munmap.c +++ b/nuttx/fs/mmap/fs_munmap.c @@ -2,7 +2,7 @@ * fs/mmap/fs_munmap.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/mmap/fs_rammap.c b/nuttx/fs/mmap/fs_rammap.c index d2bda4fb5b..f43541cc9b 100644 --- a/nuttx/fs/mmap/fs_rammap.c +++ b/nuttx/fs/mmap/fs_rammap.c @@ -2,7 +2,7 @@ * fs/mmap/fs_rammmap.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/mmap/fs_rammap.h b/nuttx/fs/mmap/fs_rammap.h index 9076d73432..293a91ffb1 100644 --- a/nuttx/fs/mmap/fs_rammap.h +++ b/nuttx/fs/mmap/fs_rammap.h @@ -2,7 +2,7 @@ * fs/mmap/rammap.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nfs/nfs_util.c b/nuttx/fs/nfs/nfs_util.c index 33c5f0a899..73fda72a7d 100644 --- a/nuttx/fs/nfs/nfs_util.c +++ b/nuttx/fs/nfs/nfs_util.c @@ -2,7 +2,7 @@ * fs/nfs/nfs_util.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/fs/nxffs/Make.defs b/nuttx/fs/nxffs/Make.defs index a73950c3f6..b67ae4472d 100644 --- a/nuttx/fs/nxffs/Make.defs +++ b/nuttx/fs/nxffs/Make.defs @@ -2,7 +2,7 @@ # fs/nxffs/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/fs/nxffs/nxffs_block.c b/nuttx/fs/nxffs/nxffs_block.c index a069048b89..6701b6e6be 100644 --- a/nuttx/fs/nxffs/nxffs_block.c +++ b/nuttx/fs/nxffs/nxffs_block.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_block.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_blockstats.c b/nuttx/fs/nxffs/nxffs_blockstats.c index 590aa2ad03..348374e670 100644 --- a/nuttx/fs/nxffs/nxffs_blockstats.c +++ b/nuttx/fs/nxffs/nxffs_blockstats.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_blockstats.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_cache.c b/nuttx/fs/nxffs/nxffs_cache.c index 5c5cbaa187..0cc97980ea 100644 --- a/nuttx/fs/nxffs/nxffs_cache.c +++ b/nuttx/fs/nxffs/nxffs_cache.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_cache.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_dirent.c b/nuttx/fs/nxffs/nxffs_dirent.c index 562a5320b9..221549438f 100644 --- a/nuttx/fs/nxffs/nxffs_dirent.c +++ b/nuttx/fs/nxffs/nxffs_dirent.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_dirent.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_dump.c b/nuttx/fs/nxffs/nxffs_dump.c index d816ba6ca9..6a89aaf1da 100644 --- a/nuttx/fs/nxffs/nxffs_dump.c +++ b/nuttx/fs/nxffs/nxffs_dump.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_dump.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_ioctl.c b/nuttx/fs/nxffs/nxffs_ioctl.c index 41fabfbeef..332878eb0c 100644 --- a/nuttx/fs/nxffs/nxffs_ioctl.c +++ b/nuttx/fs/nxffs/nxffs_ioctl.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_ioctl.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c index 339e25edc7..eb7817c57e 100644 --- a/nuttx/fs/nxffs/nxffs_open.c +++ b/nuttx/fs/nxffs/nxffs_open.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_open.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_read.c b/nuttx/fs/nxffs/nxffs_read.c index 6ba49ca72f..b638dbfd4f 100644 --- a/nuttx/fs/nxffs/nxffs_read.c +++ b/nuttx/fs/nxffs/nxffs_read.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_read.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_reformat.c b/nuttx/fs/nxffs/nxffs_reformat.c index cb10862ff0..d3c00893d1 100644 --- a/nuttx/fs/nxffs/nxffs_reformat.c +++ b/nuttx/fs/nxffs/nxffs_reformat.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_reformat.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_stat.c b/nuttx/fs/nxffs/nxffs_stat.c index afb18093ca..d4d58a72c9 100644 --- a/nuttx/fs/nxffs/nxffs_stat.c +++ b/nuttx/fs/nxffs/nxffs_stat.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_stat.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_unlink.c b/nuttx/fs/nxffs/nxffs_unlink.c index 9d0d5b49e3..73b0f360a3 100644 --- a/nuttx/fs/nxffs/nxffs_unlink.c +++ b/nuttx/fs/nxffs/nxffs_unlink.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_unlink.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/nxffs/nxffs_util.c b/nuttx/fs/nxffs/nxffs_util.c index ea2e97967e..f424e71e07 100644 --- a/nuttx/fs/nxffs/nxffs_util.c +++ b/nuttx/fs/nxffs/nxffs_util.c @@ -2,7 +2,7 @@ * fs/nxffs/nxffs_util.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/romfs/Make.defs b/nuttx/fs/romfs/Make.defs index 56b4c9862a..77de93c054 100644 --- a/nuttx/fs/romfs/Make.defs +++ b/nuttx/fs/romfs/Make.defs @@ -2,7 +2,7 @@ # fs/romfs/Make.defs # # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c index 8a2e696654..b95619d759 100644 --- a/nuttx/fs/romfs/fs_romfs.c +++ b/nuttx/fs/romfs/fs_romfs.c @@ -2,7 +2,7 @@ * rm/romfs/fs_romfs.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/romfs/fs_romfs.h b/nuttx/fs/romfs/fs_romfs.h index f89196ff7a..4081517fb8 100644 --- a/nuttx/fs/romfs/fs_romfs.h +++ b/nuttx/fs/romfs/fs_romfs.h @@ -2,7 +2,7 @@ * fs/romfs/fs_romfs.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/fs/romfs/fs_romfsutil.c b/nuttx/fs/romfs/fs_romfsutil.c index cb3f9f9ace..6ea114b5e1 100644 --- a/nuttx/fs/romfs/fs_romfsutil.c +++ b/nuttx/fs/romfs/fs_romfsutil.c @@ -2,7 +2,7 @@ * rm/romfs/fs_romfsutil.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * References: Linux/Documentation/filesystems/romfs.txt * diff --git a/nuttx/graphics/nxbe/nxbe_clipper.c b/nuttx/graphics/nxbe/nxbe_clipper.c index 580c8bc4c8..cdbd421c05 100644 --- a/nuttx/graphics/nxbe/nxbe_clipper.c +++ b/nuttx/graphics/nxbe/nxbe_clipper.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_clipper.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_closewindow.c b/nuttx/graphics/nxbe/nxbe_closewindow.c index 3c583fcfbf..e632ebf011 100644 --- a/nuttx/graphics/nxbe/nxbe_closewindow.c +++ b/nuttx/graphics/nxbe/nxbe_closewindow.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_closewindow.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_colormap.c b/nuttx/graphics/nxbe/nxbe_colormap.c index 1443175190..e338773820 100644 --- a/nuttx/graphics/nxbe/nxbe_colormap.c +++ b/nuttx/graphics/nxbe/nxbe_colormap.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_colormap.c * * Copyright (C) 2008-2009,2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_fill.c b/nuttx/graphics/nxbe/nxbe_fill.c index f4aec74773..c2b4266b04 100644 --- a/nuttx/graphics/nxbe/nxbe_fill.c +++ b/nuttx/graphics/nxbe/nxbe_fill.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_fill.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_redraw.c b/nuttx/graphics/nxbe/nxbe_redraw.c index 3226ccf328..d52ff71e58 100644 --- a/nuttx/graphics/nxbe/nxbe_redraw.c +++ b/nuttx/graphics/nxbe/nxbe_redraw.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_redraw.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_setposition.c b/nuttx/graphics/nxbe/nxbe_setposition.c index f407eea3fa..6f680df040 100644 --- a/nuttx/graphics/nxbe/nxbe_setposition.c +++ b/nuttx/graphics/nxbe/nxbe_setposition.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_setposition.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_setsize.c b/nuttx/graphics/nxbe/nxbe_setsize.c index 367f5d7dc9..99775c715b 100644 --- a/nuttx/graphics/nxbe/nxbe_setsize.c +++ b/nuttx/graphics/nxbe/nxbe_setsize.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_setsize.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxbe/nxbe_visible.c b/nuttx/graphics/nxbe/nxbe_visible.c index 6b8b9291bb..ca62aeab6c 100644 --- a/nuttx/graphics/nxbe/nxbe_visible.c +++ b/nuttx/graphics/nxbe/nxbe_visible.c @@ -2,7 +2,7 @@ * graphics/nxbe/nxbe_redraw.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/Make.defs b/nuttx/graphics/nxfonts/Make.defs index 95665ad362..bc65d7ad7a 100644 --- a/nuttx/graphics/nxfonts/Make.defs +++ b/nuttx/graphics/nxfonts/Make.defs @@ -2,7 +2,7 @@ # graphics/nxfonts/Make.defs # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/Makefile.sources b/nuttx/graphics/nxfonts/Makefile.sources index 2867425798..f2aa87cafd 100644 --- a/nuttx/graphics/nxfonts/Makefile.sources +++ b/nuttx/graphics/nxfonts/Makefile.sources @@ -2,7 +2,7 @@ # graphics/nxfonts/Makefile.sources # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c index 9b255b97a6..2efc34b87f 100644 --- a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c +++ b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c @@ -2,7 +2,7 @@ * graphics/nxfonts/nxfonts_bitmaps.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/nxfonts_convert.c b/nuttx/graphics/nxfonts/nxfonts_convert.c index 00cd61a6cd..a3c3199644 100644 --- a/nuttx/graphics/nxfonts/nxfonts_convert.c +++ b/nuttx/graphics/nxfonts/nxfonts_convert.c @@ -2,7 +2,7 @@ * graphics/nxfonts/nxfonts_convert.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/nxfonts_getfont.c b/nuttx/graphics/nxfonts/nxfonts_getfont.c index e17d3be310..23e5c44744 100644 --- a/nuttx/graphics/nxfonts/nxfonts_getfont.c +++ b/nuttx/graphics/nxfonts/nxfonts_getfont.c @@ -2,7 +2,7 @@ * graphics/nxfonts/nxfonts_getfont.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxfonts/nxfonts_internal.h b/nuttx/graphics/nxfonts/nxfonts_internal.h index fa7864170d..057200cd56 100644 --- a/nuttx/graphics/nxfonts/nxfonts_internal.h +++ b/nuttx/graphics/nxfonts/nxfonts_internal.h @@ -2,7 +2,7 @@ * graphics/nxfonts/nxfonts_internal.h * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/fb/nxglib_copyrectangle.c b/nuttx/graphics/nxglib/fb/nxglib_copyrectangle.c index 4ad792a4cb..bf9812ac37 100644 --- a/nuttx/graphics/nxglib/fb/nxglib_copyrectangle.c +++ b/nuttx/graphics/nxglib/fb/nxglib_copyrectangle.c @@ -2,7 +2,7 @@ * graphics/nxglib/fb/nxsglib_copyrectangle.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/fb/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/fb/nxglib_fillrectangle.c index cb9483c989..777a906a4f 100644 --- a/nuttx/graphics/nxglib/fb/nxglib_fillrectangle.c +++ b/nuttx/graphics/nxglib/fb/nxglib_fillrectangle.c @@ -2,7 +2,7 @@ * graphics/nxglib/fb/nxglib_fillrectangle.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/lcd/nxglib_copyrectangle.c b/nuttx/graphics/nxglib/lcd/nxglib_copyrectangle.c index 988b6cb944..40989acef2 100644 --- a/nuttx/graphics/nxglib/lcd/nxglib_copyrectangle.c +++ b/nuttx/graphics/nxglib/lcd/nxglib_copyrectangle.c @@ -2,7 +2,7 @@ * graphics/nxglib/lcd/nxsglib_copyrectangle.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c index c1a30d66ff..b9554e1cc3 100644 --- a/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c +++ b/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c @@ -2,7 +2,7 @@ * graphics/nxglib/lcd/nxglib_fillrectangle.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/lcd/nxglib_moverectangle.c b/nuttx/graphics/nxglib/lcd/nxglib_moverectangle.c index f82187ae3b..b46a17e61a 100644 --- a/nuttx/graphics/nxglib/lcd/nxglib_moverectangle.c +++ b/nuttx/graphics/nxglib/lcd/nxglib_moverectangle.c @@ -2,7 +2,7 @@ * graphics/nxglib/lcd/nxglib_moverectangle.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_bitblit.h b/nuttx/graphics/nxglib/nxglib_bitblit.h index a737a06474..0182337d1b 100644 --- a/nuttx/graphics/nxglib/nxglib_bitblit.h +++ b/nuttx/graphics/nxglib/nxglib_bitblit.h @@ -2,7 +2,7 @@ * graphics/nxglib/nxglib_bitblit.h * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_circlepts.c b/nuttx/graphics/nxglib/nxglib_circlepts.c index a6d59280d7..811953dfc6 100644 --- a/nuttx/graphics/nxglib/nxglib_circlepts.c +++ b/nuttx/graphics/nxglib/nxglib_circlepts.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxglib_circlepts.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_circletraps.c b/nuttx/graphics/nxglib/nxglib_circletraps.c index 7c2cd1d7b5..8ee287795f 100644 --- a/nuttx/graphics/nxglib/nxglib_circletraps.c +++ b/nuttx/graphics/nxglib/nxglib_circletraps.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxglib_circletraps.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_colorcopy.c b/nuttx/graphics/nxglib/nxglib_colorcopy.c index f99b995050..42c0d0d451 100644 --- a/nuttx/graphics/nxglib/nxglib_colorcopy.c +++ b/nuttx/graphics/nxglib/nxglib_colorcopy.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_colorcopy.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_copyrun.h b/nuttx/graphics/nxglib/nxglib_copyrun.h index b97372bf77..a52af22463 100644 --- a/nuttx/graphics/nxglib/nxglib_copyrun.h +++ b/nuttx/graphics/nxglib/nxglib_copyrun.h @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_copyrun.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_fillrun.h b/nuttx/graphics/nxglib/nxglib_fillrun.h index b1d8a3a7fb..1dcf85dd97 100644 --- a/nuttx/graphics/nxglib/nxglib_fillrun.h +++ b/nuttx/graphics/nxglib/nxglib_fillrun.h @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_fullrun.h * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_intersecting.c b/nuttx/graphics/nxglib/nxglib_intersecting.c index c495a9e3d9..e1370c1404 100644 --- a/nuttx/graphics/nxglib/nxglib_intersecting.c +++ b/nuttx/graphics/nxglib/nxglib_intersecting.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_intersecting.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_nonintersecting.c b/nuttx/graphics/nxglib/nxglib_nonintersecting.c index 9cb2ec29c5..d78da994e8 100644 --- a/nuttx/graphics/nxglib/nxglib_nonintersecting.c +++ b/nuttx/graphics/nxglib/nxglib_nonintersecting.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectnonintersecting.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectadd.c b/nuttx/graphics/nxglib/nxglib_rectadd.c index b53e6b04c6..f4eda341d5 100644 --- a/nuttx/graphics/nxglib/nxglib_rectadd.c +++ b/nuttx/graphics/nxglib/nxglib_rectadd.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectadd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectcopy.c b/nuttx/graphics/nxglib/nxglib_rectcopy.c index 998f5b716f..67e5f6d691 100644 --- a/nuttx/graphics/nxglib/nxglib_rectcopy.c +++ b/nuttx/graphics/nxglib/nxglib_rectcopy.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectcopy.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectinside.c b/nuttx/graphics/nxglib/nxglib_rectinside.c index 1c1f17a2e3..6ca29ddb6e 100644 --- a/nuttx/graphics/nxglib/nxglib_rectinside.c +++ b/nuttx/graphics/nxglib/nxglib_rectinside.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectinside.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectintersect.c b/nuttx/graphics/nxglib/nxglib_rectintersect.c index 9616357104..6af24ee268 100644 --- a/nuttx/graphics/nxglib/nxglib_rectintersect.c +++ b/nuttx/graphics/nxglib/nxglib_rectintersect.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectintersect.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectoffset.c b/nuttx/graphics/nxglib/nxglib_rectoffset.c index 93481b0de5..2392d64486 100644 --- a/nuttx/graphics/nxglib/nxglib_rectoffset.c +++ b/nuttx/graphics/nxglib/nxglib_rectoffset.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectoffset.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectoverlap.c b/nuttx/graphics/nxglib/nxglib_rectoverlap.c index 75d7a46411..779951881b 100644 --- a/nuttx/graphics/nxglib/nxglib_rectoverlap.c +++ b/nuttx/graphics/nxglib/nxglib_rectoverlap.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_nulloverlap.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectsize.c b/nuttx/graphics/nxglib/nxglib_rectsize.c index 17a6c9214a..37d8635968 100644 --- a/nuttx/graphics/nxglib/nxglib_rectsize.c +++ b/nuttx/graphics/nxglib/nxglib_rectsize.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxglib_rectsize.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rectunion.c b/nuttx/graphics/nxglib/nxglib_rectunion.c index 8500c919cf..36c0968fa3 100644 --- a/nuttx/graphics/nxglib/nxglib_rectunion.c +++ b/nuttx/graphics/nxglib/nxglib_rectunion.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_rectunion.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_rgb2yuv.c b/nuttx/graphics/nxglib/nxglib_rgb2yuv.c index c439c4fe00..31eff23fa7 100644 --- a/nuttx/graphics/nxglib/nxglib_rgb2yuv.c +++ b/nuttx/graphics/nxglib/nxglib_rgb2yuv.c @@ -2,7 +2,7 @@ * graphics/color/nxglib_rgb2yuv.c * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_runcopy.c b/nuttx/graphics/nxglib/nxglib_runcopy.c index 4b5372f149..b6170638c2 100644 --- a/nuttx/graphics/nxglib/nxglib_runcopy.c +++ b/nuttx/graphics/nxglib/nxglib_runcopy.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_runcopy.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_runoffset.c b/nuttx/graphics/nxglib/nxglib_runoffset.c index f66d736741..0c569ce2f2 100644 --- a/nuttx/graphics/nxglib/nxglib_runoffset.c +++ b/nuttx/graphics/nxglib/nxglib_runoffset.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_runoffset.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_splitline.c b/nuttx/graphics/nxglib/nxglib_splitline.c index eff516db38..84892b67e3 100644 --- a/nuttx/graphics/nxglib/nxglib_splitline.c +++ b/nuttx/graphics/nxglib/nxglib_splitline.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxglib_splitline.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_trapcopy.c b/nuttx/graphics/nxglib/nxglib_trapcopy.c index 63bc0ecd81..f35da18e1e 100644 --- a/nuttx/graphics/nxglib/nxglib_trapcopy.c +++ b/nuttx/graphics/nxglib/nxglib_trapcopy.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_trapcopy.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_trapoffset.c b/nuttx/graphics/nxglib/nxglib_trapoffset.c index 872a310728..a90631f065 100644 --- a/nuttx/graphics/nxglib/nxglib_trapoffset.c +++ b/nuttx/graphics/nxglib/nxglib_trapoffset.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_trapoffset.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_vectoradd.c b/nuttx/graphics/nxglib/nxglib_vectoradd.c index b206effa60..7da5eb1371 100644 --- a/nuttx/graphics/nxglib/nxglib_vectoradd.c +++ b/nuttx/graphics/nxglib/nxglib_vectoradd.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_vectoradd.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_vectsubtract.c b/nuttx/graphics/nxglib/nxglib_vectsubtract.c index 81ffc86fb0..c830a1a33b 100644 --- a/nuttx/graphics/nxglib/nxglib_vectsubtract.c +++ b/nuttx/graphics/nxglib/nxglib_vectsubtract.c @@ -2,7 +2,7 @@ * graphics/nxglib/nxsglib_vectorsubtract.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxglib/nxglib_yuv2rgb.c b/nuttx/graphics/nxglib/nxglib_yuv2rgb.c index 9a3cb1f228..cb4bb9f2fb 100644 --- a/nuttx/graphics/nxglib/nxglib_yuv2rgb.c +++ b/nuttx/graphics/nxglib/nxglib_yuv2rgb.c @@ -2,7 +2,7 @@ * graphics/color/nxglib_yuv2rgb.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nx_drawcircle.c b/nuttx/graphics/nxmu/nx_drawcircle.c index 5a0780e1a0..22424c19d9 100644 --- a/nuttx/graphics/nxmu/nx_drawcircle.c +++ b/nuttx/graphics/nxmu/nx_drawcircle.c @@ -2,7 +2,7 @@ * graphics/nxmu/nx_drawcircle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nx_drawline.c b/nuttx/graphics/nxmu/nx_drawline.c index 0267d8058b..7de0af1c1d 100644 --- a/nuttx/graphics/nxmu/nx_drawline.c +++ b/nuttx/graphics/nxmu/nx_drawline.c @@ -2,7 +2,7 @@ * graphics/nxmu/nx_drawline.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nx_eventnotify.c b/nuttx/graphics/nxmu/nx_eventnotify.c index 1892413618..556c9fa93b 100644 --- a/nuttx/graphics/nxmu/nx_eventnotify.c +++ b/nuttx/graphics/nxmu/nx_eventnotify.c @@ -2,7 +2,7 @@ * graphics/nxmu/nx_eventnotify.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nx_fillcircle.c b/nuttx/graphics/nxmu/nx_fillcircle.c index bfc1dc9e39..5c96716953 100644 --- a/nuttx/graphics/nxmu/nx_fillcircle.c +++ b/nuttx/graphics/nxmu/nx_fillcircle.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_fillcircle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nxmu_openwindow.c b/nuttx/graphics/nxmu/nxmu_openwindow.c index 4cd6e661ce..395f0a7701 100644 --- a/nuttx/graphics/nxmu/nxmu_openwindow.c +++ b/nuttx/graphics/nxmu/nxmu_openwindow.c @@ -2,7 +2,7 @@ * graphics/nxmu/nxmu_openwindow.c * * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nxmu_releasebkgd.c b/nuttx/graphics/nxmu/nxmu_releasebkgd.c index 3d1f24b792..4183b223d3 100644 --- a/nuttx/graphics/nxmu/nxmu_releasebkgd.c +++ b/nuttx/graphics/nxmu/nxmu_releasebkgd.c @@ -2,7 +2,7 @@ * graphics/nxmu/nxmu_releasebkgd.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nxmu_requestbkgd.c b/nuttx/graphics/nxmu/nxmu_requestbkgd.c index 0e69351e6f..47b1ad13fb 100644 --- a/nuttx/graphics/nxmu/nxmu_requestbkgd.c +++ b/nuttx/graphics/nxmu/nxmu_requestbkgd.c @@ -2,7 +2,7 @@ * graphics/nxmu/nxmu_requestbkgd.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxmu/nxmu_semtake.c b/nuttx/graphics/nxmu/nxmu_semtake.c index 10fd5bd4a6..164a099b87 100644 --- a/nuttx/graphics/nxmu/nxmu_semtake.c +++ b/nuttx/graphics/nxmu/nxmu_semtake.c @@ -2,7 +2,7 @@ * graphics/nxmu/nxmu_semtake.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_bitmap.c b/nuttx/graphics/nxsu/nx_bitmap.c index 696b94afe0..99fcbbb701 100644 --- a/nuttx/graphics/nxsu/nx_bitmap.c +++ b/nuttx/graphics/nxsu/nx_bitmap.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_bitmap.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_close.c b/nuttx/graphics/nxsu/nx_close.c index a3fa9b74d2..b48a2fca2d 100644 --- a/nuttx/graphics/nxsu/nx_close.c +++ b/nuttx/graphics/nxsu/nx_close.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_close.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_closewindow.c b/nuttx/graphics/nxsu/nx_closewindow.c index c5a2799eaf..879d049d4d 100644 --- a/nuttx/graphics/nxsu/nx_closewindow.c +++ b/nuttx/graphics/nxsu/nx_closewindow.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_closewindow.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_drawcircle.c b/nuttx/graphics/nxsu/nx_drawcircle.c index 8d5c124549..30b3072190 100644 --- a/nuttx/graphics/nxsu/nx_drawcircle.c +++ b/nuttx/graphics/nxsu/nx_drawcircle.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_drawcircle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_drawline.c b/nuttx/graphics/nxsu/nx_drawline.c index ca4ddaf188..99e3494b9e 100644 --- a/nuttx/graphics/nxsu/nx_drawline.c +++ b/nuttx/graphics/nxsu/nx_drawline.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_drawline.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_fill.c b/nuttx/graphics/nxsu/nx_fill.c index 9075f82c01..037cb5e13b 100644 --- a/nuttx/graphics/nxsu/nx_fill.c +++ b/nuttx/graphics/nxsu/nx_fill.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_fill.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_fillcircle.c b/nuttx/graphics/nxsu/nx_fillcircle.c index 12c47f80a1..f3876057a2 100644 --- a/nuttx/graphics/nxsu/nx_fillcircle.c +++ b/nuttx/graphics/nxsu/nx_fillcircle.c @@ -2,7 +2,7 @@ * graphics/nxmu/nx_fillcircle.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_filltrapezoid.c b/nuttx/graphics/nxsu/nx_filltrapezoid.c index 869ce3e1a0..353b91f6e4 100644 --- a/nuttx/graphics/nxsu/nx_filltrapezoid.c +++ b/nuttx/graphics/nxsu/nx_filltrapezoid.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_filltrapezoid.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_getposition.c b/nuttx/graphics/nxsu/nx_getposition.c index 8760d84c16..acc6330871 100644 --- a/nuttx/graphics/nxsu/nx_getposition.c +++ b/nuttx/graphics/nxsu/nx_getposition.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_getposition.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_kbdchin.c b/nuttx/graphics/nxsu/nx_kbdchin.c index 7ecea5db95..f07462f229 100644 --- a/nuttx/graphics/nxsu/nx_kbdchin.c +++ b/nuttx/graphics/nxsu/nx_kbdchin.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_kbdchin.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_kbdin.c b/nuttx/graphics/nxsu/nx_kbdin.c index 9fc8460bdd..6acd96a72f 100644 --- a/nuttx/graphics/nxsu/nx_kbdin.c +++ b/nuttx/graphics/nxsu/nx_kbdin.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_kbdin.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_lower.c b/nuttx/graphics/nxsu/nx_lower.c index dbfd278c41..5c47185f8d 100644 --- a/nuttx/graphics/nxsu/nx_lower.c +++ b/nuttx/graphics/nxsu/nx_lower.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_lower.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_move.c b/nuttx/graphics/nxsu/nx_move.c index b16cf3525e..9fb303147a 100644 --- a/nuttx/graphics/nxsu/nx_move.c +++ b/nuttx/graphics/nxsu/nx_move.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_move.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_open.c b/nuttx/graphics/nxsu/nx_open.c index f5e07dc5ec..72a2db0589 100644 --- a/nuttx/graphics/nxsu/nx_open.c +++ b/nuttx/graphics/nxsu/nx_open.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_open.c * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_raise.c b/nuttx/graphics/nxsu/nx_raise.c index cf4e38b64c..e0ede54006 100644 --- a/nuttx/graphics/nxsu/nx_raise.c +++ b/nuttx/graphics/nxsu/nx_raise.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_raise.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_requestbkgd.c b/nuttx/graphics/nxsu/nx_requestbkgd.c index 5bd4554bc9..7f0ab12f25 100644 --- a/nuttx/graphics/nxsu/nx_requestbkgd.c +++ b/nuttx/graphics/nxsu/nx_requestbkgd.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_requestbkgd.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_setbgcolor.c b/nuttx/graphics/nxsu/nx_setbgcolor.c index d8c2159efa..5f9818855f 100644 --- a/nuttx/graphics/nxsu/nx_setbgcolor.c +++ b/nuttx/graphics/nxsu/nx_setbgcolor.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_setbgcolor.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nx_setsize.c b/nuttx/graphics/nxsu/nx_setsize.c index 171e26faed..4872abf034 100644 --- a/nuttx/graphics/nxsu/nx_setsize.c +++ b/nuttx/graphics/nxsu/nx_setsize.c @@ -2,7 +2,7 @@ * graphics/nxsu/nx_setsize.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h index 59f5b7e61c..528224fc16 100644 --- a/nuttx/graphics/nxsu/nxfe.h +++ b/nuttx/graphics/nxsu/nxfe.h @@ -2,7 +2,7 @@ * graphics/nxsu/nxfe.h * * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nxsu_redrawreq.c b/nuttx/graphics/nxsu/nxsu_redrawreq.c index 9efa828a51..21845f16fa 100644 --- a/nuttx/graphics/nxsu/nxsu_redrawreq.c +++ b/nuttx/graphics/nxsu/nxsu_redrawreq.c @@ -2,7 +2,7 @@ * graphics/nxsu/nxsu_redrawreq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxsu/nxsu_reportposition.c b/nuttx/graphics/nxsu/nxsu_reportposition.c index d87dac0f6b..b795a81e63 100644 --- a/nuttx/graphics/nxsu/nxsu_reportposition.c +++ b/nuttx/graphics/nxsu/nxsu_reportposition.c @@ -2,7 +2,7 @@ * graphics/nxsu/nxsu_reportposition.c * * Copyright (C) 2008-2009,2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_bitmapwindow.c b/nuttx/graphics/nxtk/nxtk_bitmapwindow.c index a439f5f797..6847c44d46 100644 --- a/nuttx/graphics/nxtk/nxtk_bitmapwindow.c +++ b/nuttx/graphics/nxtk/nxtk_bitmapwindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_bitmapwindow.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_closetoolbar.c b/nuttx/graphics/nxtk/nxtk_closetoolbar.c index dff621a44f..7ad36f9d87 100644 --- a/nuttx/graphics/nxtk/nxtk_closetoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_closetoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_closetoolbar.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_closewindow.c b/nuttx/graphics/nxtk/nxtk_closewindow.c index e921f669e0..e80cd0c665 100644 --- a/nuttx/graphics/nxtk/nxtk_closewindow.c +++ b/nuttx/graphics/nxtk/nxtk_closewindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_closewindow.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_containerclip.c b/nuttx/graphics/nxtk/nxtk_containerclip.c index 3671851f17..a2fbcd0f8f 100644 --- a/nuttx/graphics/nxtk/nxtk_containerclip.c +++ b/nuttx/graphics/nxtk/nxtk_containerclip.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_containerclip.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_drawcircletoolbar.c b/nuttx/graphics/nxtk/nxtk_drawcircletoolbar.c index e9d9ca8ffb..a36ed32eef 100644 --- a/nuttx/graphics/nxtk/nxtk_drawcircletoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_drawcircletoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_drawcircletoolbar.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_drawcirclewindow.c b/nuttx/graphics/nxtk/nxtk_drawcirclewindow.c index f70c1c3515..080e802ec1 100644 --- a/nuttx/graphics/nxtk/nxtk_drawcirclewindow.c +++ b/nuttx/graphics/nxtk/nxtk_drawcirclewindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_drawcirclewindow.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_drawlinetoolbar.c b/nuttx/graphics/nxtk/nxtk_drawlinetoolbar.c index 4af8b37327..f2a559d690 100644 --- a/nuttx/graphics/nxtk/nxtk_drawlinetoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_drawlinetoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_drawlinetoolbar.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_drawlinewindow.c b/nuttx/graphics/nxtk/nxtk_drawlinewindow.c index 2dfd7e8452..a5534fa59e 100644 --- a/nuttx/graphics/nxtk/nxtk_drawlinewindow.c +++ b/nuttx/graphics/nxtk/nxtk_drawlinewindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_drawlinewindow.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_fillcircletoolbar.c b/nuttx/graphics/nxtk/nxtk_fillcircletoolbar.c index d0bb09edd2..92dee7e27f 100644 --- a/nuttx/graphics/nxtk/nxtk_fillcircletoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_fillcircletoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_fillcircletoolbar.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_fillcirclewindow.c b/nuttx/graphics/nxtk/nxtk_fillcirclewindow.c index 34c9458650..5f093e0354 100644 --- a/nuttx/graphics/nxtk/nxtk_fillcirclewindow.c +++ b/nuttx/graphics/nxtk/nxtk_fillcirclewindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_fillcirclewindow.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_filltoolbar.c b/nuttx/graphics/nxtk/nxtk_filltoolbar.c index c39199e6a8..931fa7decb 100644 --- a/nuttx/graphics/nxtk/nxtk_filltoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_filltoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_filltoolbar.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c b/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c index 1f04e9b43e..7108f42eb6 100644 --- a/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_filltraptoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_filltraptoolbar.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_filltrapwindow.c b/nuttx/graphics/nxtk/nxtk_filltrapwindow.c index c84c055f88..c1032f1e75 100644 --- a/nuttx/graphics/nxtk/nxtk_filltrapwindow.c +++ b/nuttx/graphics/nxtk/nxtk_filltrapwindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_filltrapwindow.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_fillwindow.c b/nuttx/graphics/nxtk/nxtk_fillwindow.c index e971ce06bc..c76dbfbb46 100644 --- a/nuttx/graphics/nxtk/nxtk_fillwindow.c +++ b/nuttx/graphics/nxtk/nxtk_fillwindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_fillwindow.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_getposition.c b/nuttx/graphics/nxtk/nxtk_getposition.c index e6cce60262..7850f77144 100644 --- a/nuttx/graphics/nxtk/nxtk_getposition.c +++ b/nuttx/graphics/nxtk/nxtk_getposition.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_getposition.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_lower.c b/nuttx/graphics/nxtk/nxtk_lower.c index 256ed27dab..e37e020fc0 100644 --- a/nuttx/graphics/nxtk/nxtk_lower.c +++ b/nuttx/graphics/nxtk/nxtk_lower.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_lower.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_movetoolbar.c b/nuttx/graphics/nxtk/nxtk_movetoolbar.c index 088611382a..9170394f1d 100644 --- a/nuttx/graphics/nxtk/nxtk_movetoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_movetoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_movetoolbar.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_movewindow.c b/nuttx/graphics/nxtk/nxtk_movewindow.c index 4c45c101c5..83d95b3a4e 100644 --- a/nuttx/graphics/nxtk/nxtk_movewindow.c +++ b/nuttx/graphics/nxtk/nxtk_movewindow.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_movewindow.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_opentoolbar.c b/nuttx/graphics/nxtk/nxtk_opentoolbar.c index 56ca941b8f..e82dbed6fd 100644 --- a/nuttx/graphics/nxtk/nxtk_opentoolbar.c +++ b/nuttx/graphics/nxtk/nxtk_opentoolbar.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_opentoolbar.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_raise.c b/nuttx/graphics/nxtk/nxtk_raise.c index 1e35f3ab2a..f20b258992 100644 --- a/nuttx/graphics/nxtk/nxtk_raise.c +++ b/nuttx/graphics/nxtk/nxtk_raise.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_raise.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_setsize.c b/nuttx/graphics/nxtk/nxtk_setsize.c index aeeebf1500..332ea00b57 100644 --- a/nuttx/graphics/nxtk/nxtk_setsize.c +++ b/nuttx/graphics/nxtk/nxtk_setsize.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_setsize.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_setsubwindows.c b/nuttx/graphics/nxtk/nxtk_setsubwindows.c index 2510083610..143909ea4c 100644 --- a/nuttx/graphics/nxtk/nxtk_setsubwindows.c +++ b/nuttx/graphics/nxtk/nxtk_setsubwindows.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_setsubwindows.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_subwindowclip.c b/nuttx/graphics/nxtk/nxtk_subwindowclip.c index 4d453eecaf..2dbefb6481 100644 --- a/nuttx/graphics/nxtk/nxtk_subwindowclip.c +++ b/nuttx/graphics/nxtk/nxtk_subwindowclip.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_subwindowclip.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/graphics/nxtk/nxtk_subwindowmove.c b/nuttx/graphics/nxtk/nxtk_subwindowmove.c index ed6a264e73..a6fd9f5ddb 100644 --- a/nuttx/graphics/nxtk/nxtk_subwindowmove.c +++ b/nuttx/graphics/nxtk/nxtk_subwindowmove.c @@ -2,7 +2,7 @@ * graphics/nxtk/nxtk_subwindowmove.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/mqueue/mq_getattr.c b/nuttx/lib/mqueue/mq_getattr.c index 005ec0f245..9c9f47fdce 100644 --- a/nuttx/lib/mqueue/mq_getattr.c +++ b/nuttx/lib/mqueue/mq_getattr.c @@ -2,7 +2,7 @@ * lib/mqueue/mq_getattr.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/mqueue/mq_setattr.c b/nuttx/lib/mqueue/mq_setattr.c index 5d82299fe7..1276d64e8a 100644 --- a/nuttx/lib/mqueue/mq_setattr.c +++ b/nuttx/lib/mqueue/mq_setattr.c @@ -2,7 +2,7 @@ * lib/mqueue/mq_setattr.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_addafter.c b/nuttx/lib/queue/dq_addafter.c index e9f0d9a3ec..bfbe0052d8 100644 --- a/nuttx/lib/queue/dq_addafter.c +++ b/nuttx/lib/queue/dq_addafter.c @@ -2,7 +2,7 @@ * lib/queue/dq_addafter.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_addbefore.c b/nuttx/lib/queue/dq_addbefore.c index c49dff78b7..d740ea8309 100644 --- a/nuttx/lib/queue/dq_addbefore.c +++ b/nuttx/lib/queue/dq_addbefore.c @@ -2,7 +2,7 @@ * lib/queue/dq_addbefore.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_addfirst.c b/nuttx/lib/queue/dq_addfirst.c index 27da2c491c..7c7312de3b 100644 --- a/nuttx/lib/queue/dq_addfirst.c +++ b/nuttx/lib/queue/dq_addfirst.c @@ -2,7 +2,7 @@ * lib/queue/dq_addfirst.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_addlast.c b/nuttx/lib/queue/dq_addlast.c index c7a0609612..745deb27d1 100644 --- a/nuttx/lib/queue/dq_addlast.c +++ b/nuttx/lib/queue/dq_addlast.c @@ -2,7 +2,7 @@ * lib/queue/dq_addlast.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_rem.c b/nuttx/lib/queue/dq_rem.c index adf99efed2..218427bf84 100644 --- a/nuttx/lib/queue/dq_rem.c +++ b/nuttx/lib/queue/dq_rem.c @@ -2,7 +2,7 @@ * lib/queue/dq_rem.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_remfirst.c b/nuttx/lib/queue/dq_remfirst.c index c42f3f2cc5..26c5fd7a67 100644 --- a/nuttx/lib/queue/dq_remfirst.c +++ b/nuttx/lib/queue/dq_remfirst.c @@ -2,7 +2,7 @@ * lib/queue/dq_remfirst.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/dq_remlast.c b/nuttx/lib/queue/dq_remlast.c index 6280a0e516..35adc73e2d 100644 --- a/nuttx/lib/queue/dq_remlast.c +++ b/nuttx/lib/queue/dq_remlast.c @@ -2,7 +2,7 @@ * lib/queue/dq_remlast.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_addafter.c b/nuttx/lib/queue/sq_addafter.c index 05e1157fd4..965ac28444 100644 --- a/nuttx/lib/queue/sq_addafter.c +++ b/nuttx/lib/queue/sq_addafter.c @@ -2,7 +2,7 @@ * lib/queue/sq_addafter.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_addfirst.c b/nuttx/lib/queue/sq_addfirst.c index 8f55053d41..8fc8e06199 100644 --- a/nuttx/lib/queue/sq_addfirst.c +++ b/nuttx/lib/queue/sq_addfirst.c @@ -2,7 +2,7 @@ * lib/queue/sq_addfirst.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_addlast.c b/nuttx/lib/queue/sq_addlast.c index 15054a7033..f9f9625cc0 100644 --- a/nuttx/lib/queue/sq_addlast.c +++ b/nuttx/lib/queue/sq_addlast.c @@ -2,7 +2,7 @@ * lib/queue/sq_addlast.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_rem.c b/nuttx/lib/queue/sq_rem.c index 972e8e1c32..6ba52354d4 100644 --- a/nuttx/lib/queue/sq_rem.c +++ b/nuttx/lib/queue/sq_rem.c @@ -2,7 +2,7 @@ * lib/queue/sq_rem.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_remafter.c b/nuttx/lib/queue/sq_remafter.c index 781a2b6ad2..4dcfb06e44 100644 --- a/nuttx/lib/queue/sq_remafter.c +++ b/nuttx/lib/queue/sq_remafter.c @@ -2,7 +2,7 @@ * lib/queue/sq_remafter.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_remfirst.c b/nuttx/lib/queue/sq_remfirst.c index 5a273ad6af..43df6de417 100644 --- a/nuttx/lib/queue/sq_remfirst.c +++ b/nuttx/lib/queue/sq_remfirst.c @@ -2,7 +2,7 @@ * lib/queue/sq_remfirst.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/queue/sq_remlast.c b/nuttx/lib/queue/sq_remlast.c index a66c6bcbb7..92cdbde985 100644 --- a/nuttx/lib/queue/sq_remlast.c +++ b/nuttx/lib/queue/sq_remlast.c @@ -2,7 +2,7 @@ * lib/queue/sq_remlast.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_checkbase.c b/nuttx/lib/string/lib_checkbase.c index bec131b5c7..bc79ab2cec 100644 --- a/nuttx/lib/string/lib_checkbase.c +++ b/nuttx/lib/string/lib_checkbase.c @@ -2,7 +2,7 @@ * lib/string/lib_checkbase.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_isbasedigit.c b/nuttx/lib/string/lib_isbasedigit.c index 26426e8213..a2421bf2a4 100644 --- a/nuttx/lib/string/lib_isbasedigit.c +++ b/nuttx/lib/string/lib_isbasedigit.c @@ -2,7 +2,7 @@ * lib/string/lib_isbasedigit.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_memcmp.c b/nuttx/lib/string/lib_memcmp.c index cd874a85e4..eb2e1fd125 100644 --- a/nuttx/lib/string/lib_memcmp.c +++ b/nuttx/lib/string/lib_memcmp.c @@ -2,7 +2,7 @@ * lib/string/lib_memcmp.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_memmove.c b/nuttx/lib/string/lib_memmove.c index 97bac99ed9..ecaeb54cf2 100644 --- a/nuttx/lib/string/lib_memmove.c +++ b/nuttx/lib/string/lib_memmove.c @@ -2,7 +2,7 @@ * lib/string/lib_memmove.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_memset.c b/nuttx/lib/string/lib_memset.c index f3a5497a9a..916351b974 100644 --- a/nuttx/lib/string/lib_memset.c +++ b/nuttx/lib/string/lib_memset.c @@ -2,7 +2,7 @@ * lib/string/lib_memset.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_skipspace.c b/nuttx/lib/string/lib_skipspace.c index 826559efed..b4e6588e59 100644 --- a/nuttx/lib/string/lib_skipspace.c +++ b/nuttx/lib/string/lib_skipspace.c @@ -2,7 +2,7 @@ * lib/string/lib_skipspace.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strcasecmp.c b/nuttx/lib/string/lib_strcasecmp.c index ed5217831f..d4aa8cc031 100644 --- a/nuttx/lib/string/lib_strcasecmp.c +++ b/nuttx/lib/string/lib_strcasecmp.c @@ -2,7 +2,7 @@ * lib/string/lib_strcasecmp.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strcat.c b/nuttx/lib/string/lib_strcat.c index 2d12dd5a64..20350fec07 100644 --- a/nuttx/lib/string/lib_strcat.c +++ b/nuttx/lib/string/lib_strcat.c @@ -1,62 +1,62 @@ -/**************************************************************************** - * lib/string/lib_strcat.c - * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -/**************************************************************************** - * Global Functions - ****************************************************************************/ - -#ifndef CONFIG_ARCH_STRCAT -char *strcat(char *dest, const char *src) -{ - char *ret = dest; - - dest += strlen(dest); - while (*src != '\0') - { - *dest++ = *src++; - } - *dest = '\0'; - - return ret; -} -#endif +/**************************************************************************** + * lib/string/lib_strcat.c + * + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Global Functions + ****************************************************************************/ + +#ifndef CONFIG_ARCH_STRCAT +char *strcat(char *dest, const char *src) +{ + char *ret = dest; + + dest += strlen(dest); + while (*src != '\0') + { + *dest++ = *src++; + } + *dest = '\0'; + + return ret; +} +#endif diff --git a/nuttx/lib/string/lib_strcmp.c b/nuttx/lib/string/lib_strcmp.c index 1d78cb0495..0e3eee8900 100644 --- a/nuttx/lib/string/lib_strcmp.c +++ b/nuttx/lib/string/lib_strcmp.c @@ -2,7 +2,7 @@ * lib/string/lib_strcmp.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strcpy.c b/nuttx/lib/string/lib_strcpy.c index 774e155347..e2f70b94e3 100644 --- a/nuttx/lib/string/lib_strcpy.c +++ b/nuttx/lib/string/lib_strcpy.c @@ -2,7 +2,7 @@ * lib/string/lib_strcpy.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strcspn.c b/nuttx/lib/string/lib_strcspn.c index b28f223431..9da89241c5 100644 --- a/nuttx/lib/string/lib_strcspn.c +++ b/nuttx/lib/string/lib_strcspn.c @@ -2,7 +2,7 @@ * lib/string/lib_strcspn.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strdup.c b/nuttx/lib/string/lib_strdup.c index a353c629da..44a0cbc0d8 100644 --- a/nuttx/lib/string/lib_strdup.c +++ b/nuttx/lib/string/lib_strdup.c @@ -2,7 +2,7 @@ * lib/string//lib_strdup.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strlen.c b/nuttx/lib/string/lib_strlen.c index ee964c1371..8333058091 100644 --- a/nuttx/lib/string/lib_strlen.c +++ b/nuttx/lib/string/lib_strlen.c @@ -2,7 +2,7 @@ * lib/string/lib_strlen.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strncasecmp.c b/nuttx/lib/string/lib_strncasecmp.c index 78b18a3fb8..be369cf0d8 100644 --- a/nuttx/lib/string/lib_strncasecmp.c +++ b/nuttx/lib/string/lib_strncasecmp.c @@ -2,7 +2,7 @@ * lib/string/lib_strncasecmp.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strncat.c b/nuttx/lib/string/lib_strncat.c index 6b7d54f816..af893e0f9b 100644 --- a/nuttx/lib/string/lib_strncat.c +++ b/nuttx/lib/string/lib_strncat.c @@ -2,7 +2,7 @@ * lib/string/lib_strncat.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strncmp.c b/nuttx/lib/string/lib_strncmp.c index 147dfc5369..ce22820249 100644 --- a/nuttx/lib/string/lib_strncmp.c +++ b/nuttx/lib/string/lib_strncmp.c @@ -2,7 +2,7 @@ * lib/lib_strncmp.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strncpy.c b/nuttx/lib/string/lib_strncpy.c index b5702cae21..149369d508 100644 --- a/nuttx/lib/string/lib_strncpy.c +++ b/nuttx/lib/string/lib_strncpy.c @@ -2,7 +2,7 @@ * lib/string/lib_strncpy.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strndup.c b/nuttx/lib/string/lib_strndup.c index 68b7c74c36..ffaf892eaa 100644 --- a/nuttx/lib/string/lib_strndup.c +++ b/nuttx/lib/string/lib_strndup.c @@ -2,7 +2,7 @@ * lib/string//lib_strndup.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strnlen.c b/nuttx/lib/string/lib_strnlen.c index c2ffc248e6..2b64fe9845 100644 --- a/nuttx/lib/string/lib_strnlen.c +++ b/nuttx/lib/string/lib_strnlen.c @@ -9,7 +9,7 @@ * Derives from the file lib/lib_strlen.c: * * Copyright (C) 2007, 2008, 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strpbrk.c b/nuttx/lib/string/lib_strpbrk.c index 1340587750..02e2ea2c70 100644 --- a/nuttx/lib/string/lib_strpbrk.c +++ b/nuttx/lib/string/lib_strpbrk.c @@ -2,7 +2,7 @@ * lib/string/lib_strpbrk.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use str source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strrchr.c b/nuttx/lib/string/lib_strrchr.c index e89b26d523..91243ce589 100644 --- a/nuttx/lib/string/lib_strrchr.c +++ b/nuttx/lib/string/lib_strrchr.c @@ -2,7 +2,7 @@ * lib/string/lib_strrchr.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strspn.c b/nuttx/lib/string/lib_strspn.c index e5cab9ad65..e7b5ea0a5b 100644 --- a/nuttx/lib/string/lib_strspn.c +++ b/nuttx/lib/string/lib_strspn.c @@ -2,7 +2,7 @@ * lib/string/lib_strspn.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strstr.c b/nuttx/lib/string/lib_strstr.c index 27ca6e19bb..b8c896fa2e 100644 --- a/nuttx/lib/string/lib_strstr.c +++ b/nuttx/lib/string/lib_strstr.c @@ -2,7 +2,7 @@ * lib/string/lib_strstr.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use str source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtok.c b/nuttx/lib/string/lib_strtok.c index bafa94853e..c409931359 100644 --- a/nuttx/lib/string/lib_strtok.c +++ b/nuttx/lib/string/lib_strtok.c @@ -2,7 +2,7 @@ * lib/string/lib_strtok.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtokr.c b/nuttx/lib/string/lib_strtokr.c index 0d12a23815..1c571b6ae5 100644 --- a/nuttx/lib/string/lib_strtokr.c +++ b/nuttx/lib/string/lib_strtokr.c @@ -2,7 +2,7 @@ * lib/string/lib_strtokr.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtol.c b/nuttx/lib/string/lib_strtol.c index 4f69047934..c17d87e635 100644 --- a/nuttx/lib/string/lib_strtol.c +++ b/nuttx/lib/string/lib_strtol.c @@ -2,7 +2,7 @@ * lib/string/lib_strtol.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtoll.c b/nuttx/lib/string/lib_strtoll.c index 9c730b4310..242e025c07 100644 --- a/nuttx/lib/string/lib_strtoll.c +++ b/nuttx/lib/string/lib_strtoll.c @@ -2,7 +2,7 @@ * lib/string/lib_strtoll.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtoul.c b/nuttx/lib/string/lib_strtoul.c index 2aacc7cea8..b0d2d090e6 100644 --- a/nuttx/lib/string/lib_strtoul.c +++ b/nuttx/lib/string/lib_strtoul.c @@ -2,7 +2,7 @@ * /lib/string/lib_strtoul.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/lib/string/lib_strtoull.c b/nuttx/lib/string/lib_strtoull.c index 3341621481..6567457c0e 100644 --- a/nuttx/lib/string/lib_strtoull.c +++ b/nuttx/lib/string/lib_strtoull.c @@ -2,7 +2,7 @@ * /lib/string/lib_strtoull.c * * Copyright (C) 2009, 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/libxx/Makefile b/nuttx/libxx/Makefile index f34a526000..4122931ac9 100644 --- a/nuttx/libxx/Makefile +++ b/nuttx/libxx/Makefile @@ -2,7 +2,7 @@ # libxx/Makefile # # Copyright (C) 2009 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/libxx/libxx_delete.cxx b/nuttx/libxx/libxx_delete.cxx index 223a7bea90..d9203a2280 100644 --- a/nuttx/libxx/libxx_delete.cxx +++ b/nuttx/libxx/libxx_delete.cxx @@ -2,7 +2,7 @@ // libxx/libxx_new.cxx // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/nuttx/libxx/libxx_deletea.cxx b/nuttx/libxx/libxx_deletea.cxx index 3c519bd2ce..e7cfee647b 100644 --- a/nuttx/libxx/libxx_deletea.cxx +++ b/nuttx/libxx/libxx_deletea.cxx @@ -2,7 +2,7 @@ // libxx/libxx_newa.cxx // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/nuttx/libxx/libxx_new.cxx b/nuttx/libxx/libxx_new.cxx index 8ec725ca8b..0563b65805 100644 --- a/nuttx/libxx/libxx_new.cxx +++ b/nuttx/libxx/libxx_new.cxx @@ -2,7 +2,7 @@ // libxx/libxx_new.cxx // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/nuttx/libxx/libxx_newa.cxx b/nuttx/libxx/libxx_newa.cxx index 855160c412..ad78068653 100644 --- a/nuttx/libxx/libxx_newa.cxx +++ b/nuttx/libxx/libxx_newa.cxx @@ -2,7 +2,7 @@ // libxx/libxx_newa.cxx // // Copyright (C) 2009 Gregory Nutt. All rights reserved. -// Author: Gregory Nutt +// Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions diff --git a/nuttx/net/listen.c b/nuttx/net/listen.c index bddb0ab080..5e3c62f692 100644 --- a/nuttx/net/listen.c +++ b/nuttx/net/listen.c @@ -2,7 +2,7 @@ * net/listen.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_arptimer.c b/nuttx/net/net_arptimer.c index 89db9f6562..2c5d33c914 100644 --- a/nuttx/net/net_arptimer.c +++ b/nuttx/net/net_arptimer.c @@ -2,7 +2,7 @@ * net/net_arptimer.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_checksd.c b/nuttx/net/net_checksd.c index 3da3cea62f..0a6975cad4 100644 --- a/nuttx/net/net_checksd.c +++ b/nuttx/net/net_checksd.c @@ -2,7 +2,7 @@ * net/net_checksd.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_dsec2timeval.c b/nuttx/net/net_dsec2timeval.c index c9d3aeb66f..0f570cb394 100644 --- a/nuttx/net/net_dsec2timeval.c +++ b/nuttx/net/net_dsec2timeval.c @@ -2,7 +2,7 @@ * net/net_dsec2timeval.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_dup.c b/nuttx/net/net_dup.c index 8465b7ce44..3004595445 100644 --- a/nuttx/net/net_dup.c +++ b/nuttx/net/net_dup.c @@ -2,7 +2,7 @@ * net/net_dup.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_dup2.c b/nuttx/net/net_dup2.c index b27bb69675..3403a70c31 100644 --- a/nuttx/net/net_dup2.c +++ b/nuttx/net/net_dup2.c @@ -2,7 +2,7 @@ * net/net_dup2.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/net_timeval2dsec.c b/nuttx/net/net_timeval2dsec.c index 4ca5ecb5f1..e0b25db981 100644 --- a/nuttx/net/net_timeval2dsec.c +++ b/nuttx/net/net_timeval2dsec.c @@ -2,7 +2,7 @@ * net/net_timeval2dsec.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/netdev_count.c b/nuttx/net/netdev_count.c index 17f0894da6..8db1191a29 100644 --- a/nuttx/net/netdev_count.c +++ b/nuttx/net/netdev_count.c @@ -2,7 +2,7 @@ * net/netdev_count.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/netdev_findbyaddr.c b/nuttx/net/netdev_findbyaddr.c index 50a246f67e..e8083e4d0c 100644 --- a/nuttx/net/netdev_findbyaddr.c +++ b/nuttx/net/netdev_findbyaddr.c @@ -2,7 +2,7 @@ * net/netdev_findbyaddr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/netdev_findbyname.c b/nuttx/net/netdev_findbyname.c index a6ddf0452d..9f6f895aca 100644 --- a/nuttx/net/netdev_findbyname.c +++ b/nuttx/net/netdev_findbyname.c @@ -2,7 +2,7 @@ * net/netdev_findbyname.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/netdev_unregister.c b/nuttx/net/netdev_unregister.c index e1aec0e4d8..39927340a7 100644 --- a/nuttx/net/netdev_unregister.c +++ b/nuttx/net/netdev_unregister.c @@ -2,7 +2,7 @@ * net/netdev_unregister.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/Make.defs b/nuttx/net/uip/Make.defs index 8bd8d18396..c5d915e614 100644 --- a/nuttx/net/uip/Make.defs +++ b/nuttx/net/uip/Make.defs @@ -2,7 +2,7 @@ # Make.defs # # Copyright (C) 2007, 2009-20010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_arptab.c b/nuttx/net/uip/uip_arptab.c index 1a29f25df4..3dff970702 100644 --- a/nuttx/net/uip/uip_arptab.c +++ b/nuttx/net/uip/uip_arptab.c @@ -3,7 +3,7 @@ * Implementation of the ARP Address Resolution Protocol. * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based originally on uIP which also has a BSD style license: * diff --git a/nuttx/net/uip/uip_callback.c b/nuttx/net/uip/uip_callback.c index 730aa7758c..0c8c3aaa01 100644 --- a/nuttx/net/uip/uip_callback.c +++ b/nuttx/net/uip/uip_callback.c @@ -2,7 +2,7 @@ * net/uip/uip_callback.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_icmppoll.c b/nuttx/net/uip/uip_icmppoll.c index ca1d684c01..bcf7fe94b3 100644 --- a/nuttx/net/uip/uip_icmppoll.c +++ b/nuttx/net/uip/uip_icmppoll.c @@ -2,7 +2,7 @@ * net/uip/uip_icmppoll.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_igmpgroup.c b/nuttx/net/uip/uip_igmpgroup.c index 220de047e5..b92db5476c 100755 --- a/nuttx/net/uip/uip_igmpgroup.c +++ b/nuttx/net/uip/uip_igmpgroup.c @@ -3,7 +3,7 @@ * IGMP group data structure management logic * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpinit.c b/nuttx/net/uip/uip_igmpinit.c index 7954e7b3e8..740ddf44b5 100755 --- a/nuttx/net/uip/uip_igmpinit.c +++ b/nuttx/net/uip/uip_igmpinit.c @@ -3,7 +3,7 @@ * IGMP initialization logic * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpinput.c b/nuttx/net/uip/uip_igmpinput.c index 5b4fbefa42..40c1cf3ba2 100755 --- a/nuttx/net/uip/uip_igmpinput.c +++ b/nuttx/net/uip/uip_igmpinput.c @@ -2,7 +2,7 @@ * net/uip/uip_igminput.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpjoin.c b/nuttx/net/uip/uip_igmpjoin.c index eb6e888379..c02b0bb8f4 100755 --- a/nuttx/net/uip/uip_igmpjoin.c +++ b/nuttx/net/uip/uip_igmpjoin.c @@ -2,7 +2,7 @@ * net/uip/uip_igmpjoin.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpleave.c b/nuttx/net/uip/uip_igmpleave.c index 7e2a31a196..4e08df5767 100755 --- a/nuttx/net/uip/uip_igmpleave.c +++ b/nuttx/net/uip/uip_igmpleave.c @@ -2,7 +2,7 @@ * net/uip/uip_igmpleave.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpmsg.c b/nuttx/net/uip/uip_igmpmsg.c index 9ea3daa4eb..5209eaf7aa 100755 --- a/nuttx/net/uip/uip_igmpmsg.c +++ b/nuttx/net/uip/uip_igmpmsg.c @@ -2,7 +2,7 @@ * net/uip/uip_igmpmgs.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmppoll.c b/nuttx/net/uip/uip_igmppoll.c index cec2a5e1b7..e86eb687be 100755 --- a/nuttx/net/uip/uip_igmppoll.c +++ b/nuttx/net/uip/uip_igmppoll.c @@ -2,7 +2,7 @@ * net/uip/uip_igmppoll.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_igmpsend.c b/nuttx/net/uip/uip_igmpsend.c index 21fc2beb03..f22282b62a 100755 --- a/nuttx/net/uip/uip_igmpsend.c +++ b/nuttx/net/uip/uip_igmpsend.c @@ -2,7 +2,7 @@ * net/uip/uip_igmpsend.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_igmptimer.c b/nuttx/net/uip/uip_igmptimer.c index 27e2f9ff05..4655f3a2f3 100755 --- a/nuttx/net/uip/uip_igmptimer.c +++ b/nuttx/net/uip/uip_igmptimer.c @@ -2,7 +2,7 @@ * net/uip/uip_igmptimer.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_initialize.c b/nuttx/net/uip/uip_initialize.c index 8839836c44..e737d646ed 100644 --- a/nuttx/net/uip/uip_initialize.c +++ b/nuttx/net/uip/uip_initialize.c @@ -2,7 +2,7 @@ * net/uip/uip_initialize.c * * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_listen.c b/nuttx/net/uip/uip_listen.c index 5f867fef2d..420fbb0706 100644 --- a/nuttx/net/uip/uip_listen.c +++ b/nuttx/net/uip/uip_listen.c @@ -2,7 +2,7 @@ * net/uip/uip_listen.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * A direct leverage of logic from uIP which also has b BSD style license * diff --git a/nuttx/net/uip/uip_mcastmac.c b/nuttx/net/uip/uip_mcastmac.c index 7795becab5..9bd1461987 100755 --- a/nuttx/net/uip/uip_mcastmac.c +++ b/nuttx/net/uip/uip_mcastmac.c @@ -2,7 +2,7 @@ * net/uip/uip_mcastmac.c * * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the * lwIP TCP/IP stack by Steve Reynolds: diff --git a/nuttx/net/uip/uip_neighbor.h b/nuttx/net/uip/uip_neighbor.h index eac08f9382..b55835b74e 100644 --- a/nuttx/net/uip/uip_neighbor.h +++ b/nuttx/net/uip/uip_neighbor.h @@ -3,7 +3,7 @@ * to be used by future ARP code. * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * A direct leverage of logic from uIP which also has b BSD style license * diff --git a/nuttx/net/uip/uip_send.c b/nuttx/net/uip/uip_send.c index fd0f4f7da2..b26c799a04 100644 --- a/nuttx/net/uip/uip_send.c +++ b/nuttx/net/uip/uip_send.c @@ -2,7 +2,7 @@ * net/uip/uip_send.c * * Copyright (C) 2007i, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Based in part on uIP which also has a BSD stylie license: * diff --git a/nuttx/net/uip/uip_setipid.c b/nuttx/net/uip/uip_setipid.c index f9d13cc9d7..12a94860b8 100644 --- a/nuttx/net/uip/uip_setipid.c +++ b/nuttx/net/uip/uip_setipid.c @@ -2,7 +2,7 @@ * net/uip/uip_setipid.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/net/uip/uip_tcpappsend.c b/nuttx/net/uip/uip_tcpappsend.c index d8a1875034..dfddbcff9b 100644 --- a/nuttx/net/uip/uip_tcpappsend.c +++ b/nuttx/net/uip/uip_tcpappsend.c @@ -2,7 +2,7 @@ * net/uip/uip_tcpappsend.c * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_tcpcallback.c b/nuttx/net/uip/uip_tcpcallback.c index 9ce8eb132a..8ac1351f70 100644 --- a/nuttx/net/uip/uip_tcpcallback.c +++ b/nuttx/net/uip/uip_tcpcallback.c @@ -2,7 +2,7 @@ * net/uip/uip_tcpcallback.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_tcpconn.c b/nuttx/net/uip/uip_tcpconn.c index c2b64ad898..31e020f631 100644 --- a/nuttx/net/uip/uip_tcpconn.c +++ b/nuttx/net/uip/uip_tcpconn.c @@ -2,7 +2,7 @@ * net/uip/uip_tcpconn.c * * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Large parts of this file were leveraged from uIP logic: * diff --git a/nuttx/net/uip/uip_tcppoll.c b/nuttx/net/uip/uip_tcppoll.c index 29cb6d4b43..ddc8ab029b 100644 --- a/nuttx/net/uip/uip_tcppoll.c +++ b/nuttx/net/uip/uip_tcppoll.c @@ -3,7 +3,7 @@ * Poll for the availability of TCP TX data * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_tcpreadahead.c b/nuttx/net/uip/uip_tcpreadahead.c index 21ed58b99c..a304925a87 100644 --- a/nuttx/net/uip/uip_tcpreadahead.c +++ b/nuttx/net/uip/uip_tcpreadahead.c @@ -2,7 +2,7 @@ * net/uip/uip_tcpreadahead.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_tcpseqno.c b/nuttx/net/uip/uip_tcpseqno.c index eab3a054a6..2eca06e85b 100755 --- a/nuttx/net/uip/uip_tcpseqno.c +++ b/nuttx/net/uip/uip_tcpseqno.c @@ -2,7 +2,7 @@ * net/uip/uip_tcpseqno.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Large parts of this file were leveraged from uIP logic: * diff --git a/nuttx/net/uip/uip_tcptimer.c b/nuttx/net/uip/uip_tcptimer.c index c95376ab0c..a0772136e8 100644 --- a/nuttx/net/uip/uip_tcptimer.c +++ b/nuttx/net/uip/uip_tcptimer.c @@ -3,7 +3,7 @@ * Poll for the availability of TCP TX data * * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_udpcallback.c b/nuttx/net/uip/uip_udpcallback.c index f00c5e0f81..ef4b36e495 100644 --- a/nuttx/net/uip/uip_udpcallback.c +++ b/nuttx/net/uip/uip_udpcallback.c @@ -2,7 +2,7 @@ * net/uip/uip_udpcallback.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/uip/uip_udpinput.c b/nuttx/net/uip/uip_udpinput.c index 456c34799b..fa7bf8c41c 100644 --- a/nuttx/net/uip/uip_udpinput.c +++ b/nuttx/net/uip/uip_udpinput.c @@ -3,7 +3,7 @@ * Handling incoming UDP input * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_udppoll.c b/nuttx/net/uip/uip_udppoll.c index 984566ed46..05c2508bca 100644 --- a/nuttx/net/uip/uip_udppoll.c +++ b/nuttx/net/uip/uip_udppoll.c @@ -3,7 +3,7 @@ * Poll for the availability of UDP TX data * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/net/uip/uip_udpsend.c b/nuttx/net/uip/uip_udpsend.c index 1dc33bbd18..9ba8ec8f56 100644 --- a/nuttx/net/uip/uip_udpsend.c +++ b/nuttx/net/uip/uip_udpsend.c @@ -2,7 +2,7 @@ * net/uip/uip_udpsend.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Adapted for NuttX from logic in uIP which also has a BSD-like license: * diff --git a/nuttx/syscall/Makefile b/nuttx/syscall/Makefile index 7ef1a46295..88365759d1 100644 --- a/nuttx/syscall/Makefile +++ b/nuttx/syscall/Makefile @@ -2,7 +2,7 @@ # syscall/Makefile # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/syscall/proxies/Make.defs b/nuttx/syscall/proxies/Make.defs index abd6c01026..a14e3562e1 100644 --- a/nuttx/syscall/proxies/Make.defs +++ b/nuttx/syscall/proxies/Make.defs @@ -2,7 +2,7 @@ # syscall/proxies/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/syscall/stub_lookup.h b/nuttx/syscall/stub_lookup.h index 9b4a928144..1c749ee621 100644 --- a/nuttx/syscall/stub_lookup.h +++ b/nuttx/syscall/stub_lookup.h @@ -2,7 +2,7 @@ * syscall/stub_lookup.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/syscall/stubs/Make.defs b/nuttx/syscall/stubs/Make.defs index 10d10c08a2..0f40052c0a 100644 --- a/nuttx/syscall/stubs/Make.defs +++ b/nuttx/syscall/stubs/Make.defs @@ -2,7 +2,7 @@ # syscall/stubs/Make.defs # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/tools/unlink.sh b/nuttx/tools/unlink.sh index 47079f0852..485db36917 100755 --- a/nuttx/tools/unlink.sh +++ b/nuttx/tools/unlink.sh @@ -3,7 +3,7 @@ # tools/unlink.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/tools/version.sh b/nuttx/tools/version.sh index 7cad7ee032..d15adb186c 100755 --- a/nuttx/tools/version.sh +++ b/nuttx/tools/version.sh @@ -2,7 +2,7 @@ # version.sh # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/tools/winlink.sh b/nuttx/tools/winlink.sh index c081cee35f..f79eda2bd7 100755 --- a/nuttx/tools/winlink.sh +++ b/nuttx/tools/winlink.sh @@ -3,7 +3,7 @@ # tools/winlink.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/nuttx/tools/zipme.sh b/nuttx/tools/zipme.sh index a10beaaab4..a8cd160ab3 100755 --- a/nuttx/tools/zipme.sh +++ b/nuttx/tools/zipme.sh @@ -2,7 +2,7 @@ # zipme.sh # # Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From 2aa4af7139bc71e3a55d75b06ec4caf35069ced8 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 18:46:10 +0000 Subject: [PATCH 67/95] Remove executable property from source and make files git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5146 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 0 apps/examples/igmp/Makefile | 0 apps/examples/nximage/Makefile | 0 apps/examples/thttpd/content/netstat/netstat.c | 0 apps/examples/thttpd/content/tasks/Makefile | 0 apps/examples/thttpd/content/tasks/tasks.c | 0 apps/examples/wlan/Makefile | 0 apps/include/netutils/ftpd.h | 0 apps/include/netutils/ipmsfilter.h | 0 apps/interpreters/ficl/README.txt | 0 apps/netutils/ftpd/ftpd.c | 0 apps/netutils/ftpd/ftpd.h | 0 apps/netutils/thttpd/thttpd_alloc.c | 0 apps/netutils/thttpd/thttpd_alloc.h | 0 apps/netutils/thttpd/thttpd_cgi.c | 0 apps/netutils/thttpd/thttpd_cgi.h | 0 apps/netutils/thttpd/thttpd_strings.c | 0 apps/netutils/thttpd/thttpd_strings.h | 0 apps/netutils/uiplib/uip_ipmsfilter.c | 0 apps/system/i2c/README.txt | 0 apps/system/install/Makefile | 0 apps/system/install/README.txt | 0 apps/system/install/install.c | 0 misc/drivers/rtl8187x/rtl8187x.c | 0 misc/drivers/rtl8187x/rtl8187x.h | 0 misc/tools/kconfig-language.txt | 0 nuttx/Documentation/NxWidgets.html | 0 nuttx/arch/arm/include/lpc17xx/irq.h | 0 nuttx/arch/arm/include/lpc2378/irq.h | 0 nuttx/arch/arm/include/lpc31xx/irq.h | 0 nuttx/arch/arm/include/sam3u/irq.h | 0 nuttx/arch/arm/src/arm/up_allocpage.c | 0 nuttx/arch/arm/src/arm/up_blocktask.c | 0 nuttx/arch/arm/src/arm/up_checkmapping.c | 0 nuttx/arch/arm/src/arm/up_pginitialize.c | 0 nuttx/arch/arm/src/arm/up_releasepending.c | 0 nuttx/arch/arm/src/arm/up_reprioritizertr.c | 0 nuttx/arch/arm/src/arm/up_unblocktask.c | 0 nuttx/arch/arm/src/arm/up_va2pte.c | 0 nuttx/arch/arm/src/armv7-m/up_blocktask.c | 0 nuttx/arch/arm/src/armv7-m/up_releasepending.c | 0 nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c | 0 nuttx/arch/arm/src/armv7-m/up_unblocktask.c | 0 nuttx/arch/arm/src/common/up_etherstub.c | 0 nuttx/arch/arm/src/imx/imx_cspi.h | 0 nuttx/arch/arm/src/imx/imx_dma.h | 0 nuttx/arch/arm/src/imx/imx_eim.h | 0 nuttx/arch/arm/src/imx/imx_gpio.h | 0 nuttx/arch/arm/src/imx/imx_i2c.h | 0 nuttx/arch/arm/src/imx/imx_rtc.h | 0 nuttx/arch/arm/src/imx/imx_spi.c | 0 nuttx/arch/arm/src/imx/imx_system.h | 0 nuttx/arch/arm/src/imx/imx_usbd.h | 0 nuttx/arch/arm/src/imx/imx_wdog.h | 0 nuttx/arch/arm/src/lm3s/lm3s_epi.h | 0 nuttx/arch/arm/src/lm3s/lm3s_ssi.c | 0 nuttx/arch/arm/src/lm3s/lm3s_timer.h | 0 nuttx/arch/arm/src/lpc214x/lpc214x_uart.h | 0 nuttx/arch/arm/src/lpc214x/lpc214x_vic.h | 0 nuttx/arch/arm/src/lpc2378/Make.defs | 0 nuttx/arch/arm/src/lpc2378/chip.h | 0 nuttx/arch/arm/src/lpc2378/internal.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_io.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_pllsetup.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h | 0 nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h | 0 nuttx/arch/arm/src/lpc31xx/Make.defs | 0 nuttx/arch/arm/src/lpc31xx/chip.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_adc.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_boot.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_dma.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_intc.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_internal.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_irq.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_lowputc.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_mci.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_nand.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_otp.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_rng.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_serial.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_spi.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_timer.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_uart.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c | 0 nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h | 0 nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h | 0 nuttx/arch/arm/src/str71x/str71x_xti.c | 0 nuttx/arch/avr/include/at32uc3/irq.h | 0 nuttx/arch/avr/include/avr/avr.h | 0 nuttx/arch/avr/include/avr32/avr32.h | 0 nuttx/arch/avr/src/avr/excptmacros.h | 0 nuttx/arch/avr/src/avr/up_blocktask.c | 0 nuttx/arch/avr/src/avr/up_releasepending.c | 0 nuttx/arch/avr/src/avr/up_reprioritizertr.c | 0 nuttx/arch/avr/src/avr/up_unblocktask.c | 0 nuttx/arch/avr/src/avr32/up_blocktask.c | 0 nuttx/arch/avr/src/avr32/up_releasepending.c | 0 nuttx/arch/avr/src/avr32/up_reprioritizertr.c | 0 nuttx/arch/avr/src/avr32/up_unblocktask.c | 0 nuttx/arch/hc/include/arch.h | 0 nuttx/arch/hc/include/hc12/irq.h | 0 nuttx/arch/hc/include/hc12/limits.h | 0 nuttx/arch/hc/include/hc12/types.h | 0 nuttx/arch/hc/include/hcs12/irq.h | 0 nuttx/arch/hc/include/hcs12/limits.h | 0 nuttx/arch/hc/include/hcs12/types.h | 0 nuttx/arch/hc/include/irq.h | 0 nuttx/arch/hc/include/limits.h | 0 nuttx/arch/hc/include/m9s12/irq.h | 0 nuttx/arch/hc/include/types.h | 0 nuttx/arch/hc/src/Makefile | 0 nuttx/arch/hc/src/common/up_allocateheap.c | 0 nuttx/arch/hc/src/common/up_arch.h | 0 nuttx/arch/hc/src/common/up_blocktask.c | 0 nuttx/arch/hc/src/common/up_createstack.c | 0 nuttx/arch/hc/src/common/up_idle.c | 0 nuttx/arch/hc/src/common/up_initialize.c | 0 nuttx/arch/hc/src/common/up_internal.h | 0 nuttx/arch/hc/src/common/up_interruptcontext.c | 0 nuttx/arch/hc/src/common/up_mdelay.c | 0 nuttx/arch/hc/src/common/up_modifyreg16.c | 0 nuttx/arch/hc/src/common/up_modifyreg32.c | 0 nuttx/arch/hc/src/common/up_modifyreg8.c | 0 nuttx/arch/hc/src/common/up_puts.c | 0 nuttx/arch/hc/src/common/up_releasepending.c | 0 nuttx/arch/hc/src/common/up_releasestack.c | 0 nuttx/arch/hc/src/common/up_reprioritizertr.c | 0 nuttx/arch/hc/src/common/up_udelay.c | 0 nuttx/arch/hc/src/common/up_unblocktask.c | 0 nuttx/arch/hc/src/common/up_usestack.c | 0 nuttx/arch/hc/src/m9s12/Make.defs | 0 nuttx/arch/hc/src/m9s12/chip.h | 0 nuttx/arch/hc/src/m9s12/m9s12_atd.h | 0 nuttx/arch/hc/src/m9s12/m9s12_crg.h | 0 nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c | 0 nuttx/arch/hc/src/m9s12/m9s12_emac.h | 0 nuttx/arch/hc/src/m9s12/m9s12_flash.h | 0 nuttx/arch/hc/src/m9s12/m9s12_gpio.c | 0 nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c | 0 nuttx/arch/hc/src/m9s12/m9s12_iic.h | 0 nuttx/arch/hc/src/m9s12/m9s12_int.h | 0 nuttx/arch/hc/src/m9s12/m9s12_internal.h | 0 nuttx/arch/hc/src/m9s12/m9s12_irq.c | 0 nuttx/arch/hc/src/m9s12/m9s12_mebi.h | 0 nuttx/arch/hc/src/m9s12/m9s12_mmc.h | 0 nuttx/arch/hc/src/m9s12/m9s12_phy.h | 0 nuttx/arch/hc/src/m9s12/m9s12_pim.h | 0 nuttx/arch/hc/src/m9s12/m9s12_sci.h | 0 nuttx/arch/hc/src/m9s12/m9s12_serial.c | 0 nuttx/arch/hc/src/m9s12/m9s12_serial.h | 0 nuttx/arch/hc/src/m9s12/m9s12_spi.h | 0 nuttx/arch/hc/src/m9s12/m9s12_tim.h | 0 nuttx/arch/hc/src/m9s12/m9s12_timerisr.c | 0 nuttx/arch/sh/src/m16c/m16c_dumpstate.c | 0 nuttx/arch/sh/src/sh1/sh1_dumpstate.c | 0 nuttx/arch/x86/include/README.txt | 0 nuttx/arch/x86/include/arch.h | 0 nuttx/arch/x86/include/i486/arch.h | 0 nuttx/arch/x86/include/i486/irq.h | 0 nuttx/arch/x86/include/i486/limits.h | 0 nuttx/arch/x86/include/i486/types.h | 0 nuttx/arch/x86/include/io.h | 0 nuttx/arch/x86/include/irq.h | 0 nuttx/arch/x86/include/limits.h | 0 nuttx/arch/x86/include/qemu/arch.h | 0 nuttx/arch/x86/include/qemu/irq.h | 0 nuttx/arch/x86/include/types.h | 0 nuttx/arch/x86/src/README.txt | 0 nuttx/arch/x86/src/common/up_blocktask.c | 0 nuttx/arch/x86/src/common/up_releasepending.c | 0 nuttx/arch/x86/src/common/up_reprioritizertr.c | 0 nuttx/arch/x86/src/common/up_unblocktask.c | 0 nuttx/arch/x86/src/i486/up_irq.c | 0 nuttx/arch/x86/src/qemu/Make.defs | 0 nuttx/arch/x86/src/qemu/chip.h | 0 nuttx/arch/x86/src/qemu/qemu_internal.h | 0 nuttx/arch/x86/src/qemu/qemu_memorymap.h | 0 nuttx/arch/x86/src/qemu/qemu_timerisr.c | 0 nuttx/arch/z80/include/ez80/limits.h | 0 nuttx/arch/z80/include/z8/limits.h | 0 nuttx/arch/z80/include/z80/limits.h | 0 nuttx/arch/z80/src/ez80/ez80_spi.c | 0 nuttx/arch/z80/src/z8/z8_i2c.c | 0 nuttx/arch/z80/src/z8/z8_serial.c | 0 nuttx/configs/amber/include/board.h | 0 nuttx/configs/avr32dev1/README.txt | 0 nuttx/configs/avr32dev1/include/board.h | 0 nuttx/configs/avr32dev1/nsh/Make.defs | 0 nuttx/configs/avr32dev1/ostest/Make.defs | 0 nuttx/configs/avr32dev1/ostest/test-result.txt | 0 nuttx/configs/compal_e88/README.txt | 0 nuttx/configs/compal_e99/README.txt | 0 nuttx/configs/demo9s12ne64/README.txt | 0 nuttx/configs/demo9s12ne64/include/board.h | 0 nuttx/configs/demo9s12ne64/ostest/Make.defs | 0 nuttx/configs/ez80f910200zco/nsh/sample-run.txt | 0 nuttx/configs/hymini-stm32v/README.txt | 0 nuttx/configs/hymini-stm32v/include/README.txt | 0 nuttx/configs/hymini-stm32v/include/board.h | 0 nuttx/configs/hymini-stm32v/usbstorage/Make.defs | 0 nuttx/configs/kwikstik-k40/include/board.h | 0 nuttx/configs/lm3s6965-ek/README.txt | 0 nuttx/configs/lm3s6965-ek/include/README.txt | 0 nuttx/configs/lm3s6965-ek/include/board.h | 0 nuttx/configs/lm3s6965-ek/nsh/Make.defs | 0 nuttx/configs/lm3s6965-ek/nx/Make.defs | 0 nuttx/configs/lm3s6965-ek/ostest/Make.defs | 0 nuttx/configs/lm3s8962-ek/README.txt | 0 nuttx/configs/lm3s8962-ek/include/README.txt | 0 nuttx/configs/lm3s8962-ek/include/board.h | 0 nuttx/configs/lm3s8962-ek/nsh/Make.defs | 0 nuttx/configs/lm3s8962-ek/nx/Make.defs | 0 nuttx/configs/lm3s8962-ek/ostest/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/README.txt | 0 nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/include/board.h | 0 nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs | 0 nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs | 0 nuttx/configs/mbed/README.txt | 0 nuttx/configs/mbed/include/board.h | 0 nuttx/configs/mbed/nsh/Make.defs | 0 nuttx/configs/micropendous3/include/board.h | 0 nuttx/configs/ne64badge/README.txt | 0 nuttx/configs/ne64badge/include/board.h | 0 nuttx/configs/ne64badge/ostest/Make.defs | 0 nuttx/configs/nucleus2g/README.txt | 0 nuttx/configs/nucleus2g/include/board.h | 0 nuttx/configs/nucleus2g/nsh/Make.defs | 0 nuttx/configs/nucleus2g/ostest/Make.defs | 0 nuttx/configs/nucleus2g/ostest/test-result.txt | 0 nuttx/configs/nucleus2g/usbserial/Make.defs | 0 nuttx/configs/nucleus2g/usbstorage/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/README.txt | 0 nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/include/board.h | 0 nuttx/configs/olimex-lpc1766stk/nettest/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/nsh/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/nx/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/ostest/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs | 0 nuttx/configs/olimex-lpc1766stk/wlan/Make.defs | 0 nuttx/configs/olimex-lpc2378/include/board.h | 0 nuttx/configs/olimex-lpc2378/nsh/Make.defs | 0 nuttx/configs/olimex-lpc2378/ostest/Make.defs | 0 nuttx/configs/olimex-strp711/nettest/Make.defs | 0 nuttx/configs/qemu-i486/include/board.h | 0 nuttx/configs/rgmp/README.txt | 0 nuttx/configs/rgmp/include/README.txt | 0 nuttx/configs/rgmp/include/stdarg.h | 0 nuttx/configs/rgmp/src/README.txt | 0 nuttx/configs/sam3u-ek/README.txt | 0 nuttx/configs/sam3u-ek/include/board.h | 0 nuttx/configs/sam3u-ek/kernel/Makefile | 0 nuttx/configs/sam3u-ek/knsh/Make.defs | 0 nuttx/configs/sam3u-ek/nsh/Make.defs | 0 nuttx/configs/sam3u-ek/nx/Make.defs | 0 nuttx/configs/sam3u-ek/ostest/Make.defs | 0 nuttx/configs/sam3u-ek/touchscreen/Make.defs | 0 nuttx/configs/shenzhou/README.txt | 0 nuttx/configs/skp16c26/README.txt | 0 nuttx/configs/stm3210e-eval/README.txt | 0 nuttx/configs/stm3210e-eval/RIDE/README.txt | 0 nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c | 0 nuttx/configs/stm3210e-eval/composite/Make.defs | 0 nuttx/configs/stm3210e-eval/include/README.txt | 0 nuttx/configs/stm3210e-eval/include/board.h | 0 nuttx/configs/stm3210e-eval/usbstorage/Make.defs | 0 nuttx/configs/stm3240g-eval/README.txt | 0 nuttx/configs/stm3240g-eval/include/board.h | 0 nuttx/configs/stm32f4discovery/README.txt | 0 nuttx/configs/stm32f4discovery/src/up_idle.c | 0 nuttx/configs/stm32f4discovery/src/up_pm.c | 0 nuttx/configs/stm32f4discovery/src/up_pmbuttons.c | 0 nuttx/configs/teensy/include/board.h | 0 nuttx/configs/teensy/nsh/Make.defs | 0 nuttx/configs/teensy/usbstorage/Make.defs | 0 nuttx/configs/twr-k60n512/include/board.h | 0 nuttx/configs/vsn/include/nsh_romfsimg.h | 0 nuttx/configs/z16f2800100zcog/pashello/README.txt | 0 nuttx/drivers/sercomm/README.txt | 0 nuttx/drivers/wireless/cc1101/cc1101.c | 0 nuttx/fs/mmap/README.txt | 0 nuttx/fs/nxffs/README.txt | 0 nuttx/graphics/nxconsole/nxcon_driver.c | 0 nuttx/graphics/nxconsole/nxcon_redraw.c | 0 nuttx/graphics/nxconsole/nxcon_scroll.c | 0 nuttx/graphics/nxfonts/nxfonts_sans28x37b.h | 0 nuttx/graphics/nxfonts/nxfonts_sans40x49b.h | 0 nuttx/graphics/nxfonts/nxfonts_serif27x38b.h | 0 nuttx/graphics/nxfonts/nxfonts_serif29x37.h | 0 nuttx/include/nuttx/usb/cdc.h | 0 nuttx/include/nuttx/watchdog.h | 0 nuttx/net/uip/uip_igmpgroup.c | 0 nuttx/net/uip/uip_igmpinit.c | 0 nuttx/net/uip/uip_igmpinput.c | 0 nuttx/net/uip/uip_igmpjoin.c | 0 nuttx/net/uip/uip_igmpleave.c | 0 nuttx/net/uip/uip_igmpmsg.c | 0 nuttx/net/uip/uip_igmppoll.c | 0 nuttx/net/uip/uip_igmpsend.c | 0 nuttx/net/uip/uip_igmptimer.c | 0 nuttx/net/uip/uip_mcastmac.c | 0 nuttx/net/uip/uip_tcpseqno.c | 0 nuttx/tools/README.txt | 0 350 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 apps/ChangeLog.txt mode change 100755 => 100644 apps/examples/igmp/Makefile mode change 100755 => 100644 apps/examples/nximage/Makefile mode change 100755 => 100644 apps/examples/thttpd/content/netstat/netstat.c mode change 100755 => 100644 apps/examples/thttpd/content/tasks/Makefile mode change 100755 => 100644 apps/examples/thttpd/content/tasks/tasks.c mode change 100755 => 100644 apps/examples/wlan/Makefile mode change 100755 => 100644 apps/include/netutils/ftpd.h mode change 100755 => 100644 apps/include/netutils/ipmsfilter.h mode change 100755 => 100644 apps/interpreters/ficl/README.txt mode change 100755 => 100644 apps/netutils/ftpd/ftpd.c mode change 100755 => 100644 apps/netutils/ftpd/ftpd.h mode change 100755 => 100644 apps/netutils/thttpd/thttpd_alloc.c mode change 100755 => 100644 apps/netutils/thttpd/thttpd_alloc.h mode change 100755 => 100644 apps/netutils/thttpd/thttpd_cgi.c mode change 100755 => 100644 apps/netutils/thttpd/thttpd_cgi.h mode change 100755 => 100644 apps/netutils/thttpd/thttpd_strings.c mode change 100755 => 100644 apps/netutils/thttpd/thttpd_strings.h mode change 100755 => 100644 apps/netutils/uiplib/uip_ipmsfilter.c mode change 100755 => 100644 apps/system/i2c/README.txt mode change 100755 => 100644 apps/system/install/Makefile mode change 100755 => 100644 apps/system/install/README.txt mode change 100755 => 100644 apps/system/install/install.c mode change 100755 => 100644 misc/drivers/rtl8187x/rtl8187x.c mode change 100755 => 100644 misc/drivers/rtl8187x/rtl8187x.h mode change 100755 => 100644 misc/tools/kconfig-language.txt mode change 100755 => 100644 nuttx/Documentation/NxWidgets.html mode change 100755 => 100644 nuttx/arch/arm/include/lpc17xx/irq.h mode change 100755 => 100644 nuttx/arch/arm/include/lpc2378/irq.h mode change 100755 => 100644 nuttx/arch/arm/include/lpc31xx/irq.h mode change 100755 => 100644 nuttx/arch/arm/include/sam3u/irq.h mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_allocpage.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_blocktask.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_checkmapping.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_pginitialize.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_releasepending.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/arm/src/arm/up_va2pte.c mode change 100755 => 100644 nuttx/arch/arm/src/armv7-m/up_blocktask.c mode change 100755 => 100644 nuttx/arch/arm/src/armv7-m/up_releasepending.c mode change 100755 => 100644 nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/arm/src/armv7-m/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/arm/src/common/up_etherstub.c mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_cspi.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_dma.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_eim.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_gpio.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_i2c.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_rtc.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_spi.c mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_system.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_usbd.h mode change 100755 => 100644 nuttx/arch/arm/src/imx/imx_wdog.h mode change 100755 => 100644 nuttx/arch/arm/src/lm3s/lm3s_epi.h mode change 100755 => 100644 nuttx/arch/arm/src/lm3s/lm3s_ssi.c mode change 100755 => 100644 nuttx/arch/arm/src/lm3s/lm3s_timer.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc214x/lpc214x_uart.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc214x/lpc214x_vic.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/Make.defs mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/chip.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/internal.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_io.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_pllsetup.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/Make.defs mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/chip.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_adc.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_boot.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_dma.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_intc.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_internal.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_irq.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_lowputc.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_mci.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_nand.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_otp.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_rng.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_serial.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_spi.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_timer.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_uart.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h mode change 100755 => 100644 nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h mode change 100755 => 100644 nuttx/arch/arm/src/str71x/str71x_xti.c mode change 100755 => 100644 nuttx/arch/avr/include/at32uc3/irq.h mode change 100755 => 100644 nuttx/arch/avr/include/avr/avr.h mode change 100755 => 100644 nuttx/arch/avr/include/avr32/avr32.h mode change 100755 => 100644 nuttx/arch/avr/src/avr/excptmacros.h mode change 100755 => 100644 nuttx/arch/avr/src/avr/up_blocktask.c mode change 100755 => 100644 nuttx/arch/avr/src/avr/up_releasepending.c mode change 100755 => 100644 nuttx/arch/avr/src/avr/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/avr/src/avr/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/avr/src/avr32/up_blocktask.c mode change 100755 => 100644 nuttx/arch/avr/src/avr32/up_releasepending.c mode change 100755 => 100644 nuttx/arch/avr/src/avr32/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/avr/src/avr32/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/hc/include/arch.h mode change 100755 => 100644 nuttx/arch/hc/include/hc12/irq.h mode change 100755 => 100644 nuttx/arch/hc/include/hc12/limits.h mode change 100755 => 100644 nuttx/arch/hc/include/hc12/types.h mode change 100755 => 100644 nuttx/arch/hc/include/hcs12/irq.h mode change 100755 => 100644 nuttx/arch/hc/include/hcs12/limits.h mode change 100755 => 100644 nuttx/arch/hc/include/hcs12/types.h mode change 100755 => 100644 nuttx/arch/hc/include/irq.h mode change 100755 => 100644 nuttx/arch/hc/include/limits.h mode change 100755 => 100644 nuttx/arch/hc/include/m9s12/irq.h mode change 100755 => 100644 nuttx/arch/hc/include/types.h mode change 100755 => 100644 nuttx/arch/hc/src/Makefile mode change 100755 => 100644 nuttx/arch/hc/src/common/up_allocateheap.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_arch.h mode change 100755 => 100644 nuttx/arch/hc/src/common/up_blocktask.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_createstack.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_idle.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_initialize.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_internal.h mode change 100755 => 100644 nuttx/arch/hc/src/common/up_interruptcontext.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_mdelay.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_modifyreg16.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_modifyreg32.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_modifyreg8.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_puts.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_releasepending.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_releasestack.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_udelay.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/hc/src/common/up_usestack.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/Make.defs mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/chip.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_atd.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_crg.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_emac.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_flash.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_gpio.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_iic.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_int.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_internal.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_irq.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_mebi.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_mmc.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_phy.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_pim.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_sci.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_serial.c mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_serial.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_spi.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_tim.h mode change 100755 => 100644 nuttx/arch/hc/src/m9s12/m9s12_timerisr.c mode change 100755 => 100644 nuttx/arch/sh/src/m16c/m16c_dumpstate.c mode change 100755 => 100644 nuttx/arch/sh/src/sh1/sh1_dumpstate.c mode change 100755 => 100644 nuttx/arch/x86/include/README.txt mode change 100755 => 100644 nuttx/arch/x86/include/arch.h mode change 100755 => 100644 nuttx/arch/x86/include/i486/arch.h mode change 100755 => 100644 nuttx/arch/x86/include/i486/irq.h mode change 100755 => 100644 nuttx/arch/x86/include/i486/limits.h mode change 100755 => 100644 nuttx/arch/x86/include/i486/types.h mode change 100755 => 100644 nuttx/arch/x86/include/io.h mode change 100755 => 100644 nuttx/arch/x86/include/irq.h mode change 100755 => 100644 nuttx/arch/x86/include/limits.h mode change 100755 => 100644 nuttx/arch/x86/include/qemu/arch.h mode change 100755 => 100644 nuttx/arch/x86/include/qemu/irq.h mode change 100755 => 100644 nuttx/arch/x86/include/types.h mode change 100755 => 100644 nuttx/arch/x86/src/README.txt mode change 100755 => 100644 nuttx/arch/x86/src/common/up_blocktask.c mode change 100755 => 100644 nuttx/arch/x86/src/common/up_releasepending.c mode change 100755 => 100644 nuttx/arch/x86/src/common/up_reprioritizertr.c mode change 100755 => 100644 nuttx/arch/x86/src/common/up_unblocktask.c mode change 100755 => 100644 nuttx/arch/x86/src/i486/up_irq.c mode change 100755 => 100644 nuttx/arch/x86/src/qemu/Make.defs mode change 100755 => 100644 nuttx/arch/x86/src/qemu/chip.h mode change 100755 => 100644 nuttx/arch/x86/src/qemu/qemu_internal.h mode change 100755 => 100644 nuttx/arch/x86/src/qemu/qemu_memorymap.h mode change 100755 => 100644 nuttx/arch/x86/src/qemu/qemu_timerisr.c mode change 100755 => 100644 nuttx/arch/z80/include/ez80/limits.h mode change 100755 => 100644 nuttx/arch/z80/include/z8/limits.h mode change 100755 => 100644 nuttx/arch/z80/include/z80/limits.h mode change 100755 => 100644 nuttx/arch/z80/src/ez80/ez80_spi.c mode change 100755 => 100644 nuttx/arch/z80/src/z8/z8_i2c.c mode change 100755 => 100644 nuttx/arch/z80/src/z8/z8_serial.c mode change 100755 => 100644 nuttx/configs/amber/include/board.h mode change 100755 => 100644 nuttx/configs/avr32dev1/README.txt mode change 100755 => 100644 nuttx/configs/avr32dev1/include/board.h mode change 100755 => 100644 nuttx/configs/avr32dev1/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/avr32dev1/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/avr32dev1/ostest/test-result.txt mode change 100755 => 100644 nuttx/configs/compal_e88/README.txt mode change 100755 => 100644 nuttx/configs/compal_e99/README.txt mode change 100755 => 100644 nuttx/configs/demo9s12ne64/README.txt mode change 100755 => 100644 nuttx/configs/demo9s12ne64/include/board.h mode change 100755 => 100644 nuttx/configs/demo9s12ne64/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/ez80f910200zco/nsh/sample-run.txt mode change 100755 => 100644 nuttx/configs/hymini-stm32v/README.txt mode change 100755 => 100644 nuttx/configs/hymini-stm32v/include/README.txt mode change 100755 => 100644 nuttx/configs/hymini-stm32v/include/board.h mode change 100755 => 100644 nuttx/configs/hymini-stm32v/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/kwikstik-k40/include/board.h mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/README.txt mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/include/README.txt mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/include/board.h mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/nx/Make.defs mode change 100755 => 100644 nuttx/configs/lm3s6965-ek/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/README.txt mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/include/README.txt mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/include/board.h mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/nx/Make.defs mode change 100755 => 100644 nuttx/configs/lm3s8962-ek/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/README.txt mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/include/board.h mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs mode change 100755 => 100644 nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/mbed/README.txt mode change 100755 => 100644 nuttx/configs/mbed/include/board.h mode change 100755 => 100644 nuttx/configs/mbed/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/micropendous3/include/board.h mode change 100755 => 100644 nuttx/configs/ne64badge/README.txt mode change 100755 => 100644 nuttx/configs/ne64badge/include/board.h mode change 100755 => 100644 nuttx/configs/ne64badge/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/nucleus2g/README.txt mode change 100755 => 100644 nuttx/configs/nucleus2g/include/board.h mode change 100755 => 100644 nuttx/configs/nucleus2g/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/nucleus2g/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/nucleus2g/ostest/test-result.txt mode change 100755 => 100644 nuttx/configs/nucleus2g/usbserial/Make.defs mode change 100755 => 100644 nuttx/configs/nucleus2g/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/README.txt mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/include/board.h mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/nettest/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/nx/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc1766stk/wlan/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc2378/include/board.h mode change 100755 => 100644 nuttx/configs/olimex-lpc2378/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-lpc2378/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/olimex-strp711/nettest/Make.defs mode change 100755 => 100644 nuttx/configs/qemu-i486/include/board.h mode change 100755 => 100644 nuttx/configs/rgmp/README.txt mode change 100755 => 100644 nuttx/configs/rgmp/include/README.txt mode change 100755 => 100644 nuttx/configs/rgmp/include/stdarg.h mode change 100755 => 100644 nuttx/configs/rgmp/src/README.txt mode change 100755 => 100644 nuttx/configs/sam3u-ek/README.txt mode change 100755 => 100644 nuttx/configs/sam3u-ek/include/board.h mode change 100755 => 100644 nuttx/configs/sam3u-ek/kernel/Makefile mode change 100755 => 100644 nuttx/configs/sam3u-ek/knsh/Make.defs mode change 100755 => 100644 nuttx/configs/sam3u-ek/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/sam3u-ek/nx/Make.defs mode change 100755 => 100644 nuttx/configs/sam3u-ek/ostest/Make.defs mode change 100755 => 100644 nuttx/configs/sam3u-ek/touchscreen/Make.defs mode change 100755 => 100644 nuttx/configs/shenzhou/README.txt mode change 100755 => 100644 nuttx/configs/skp16c26/README.txt mode change 100755 => 100644 nuttx/configs/stm3210e-eval/README.txt mode change 100755 => 100644 nuttx/configs/stm3210e-eval/RIDE/README.txt mode change 100755 => 100644 nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c mode change 100755 => 100644 nuttx/configs/stm3210e-eval/composite/Make.defs mode change 100755 => 100644 nuttx/configs/stm3210e-eval/include/README.txt mode change 100755 => 100644 nuttx/configs/stm3210e-eval/include/board.h mode change 100755 => 100644 nuttx/configs/stm3210e-eval/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/stm3240g-eval/README.txt mode change 100755 => 100644 nuttx/configs/stm3240g-eval/include/board.h mode change 100755 => 100644 nuttx/configs/stm32f4discovery/README.txt mode change 100755 => 100644 nuttx/configs/stm32f4discovery/src/up_idle.c mode change 100755 => 100644 nuttx/configs/stm32f4discovery/src/up_pm.c mode change 100755 => 100644 nuttx/configs/stm32f4discovery/src/up_pmbuttons.c mode change 100755 => 100644 nuttx/configs/teensy/include/board.h mode change 100755 => 100644 nuttx/configs/teensy/nsh/Make.defs mode change 100755 => 100644 nuttx/configs/teensy/usbstorage/Make.defs mode change 100755 => 100644 nuttx/configs/twr-k60n512/include/board.h mode change 100755 => 100644 nuttx/configs/vsn/include/nsh_romfsimg.h mode change 100755 => 100644 nuttx/configs/z16f2800100zcog/pashello/README.txt mode change 100755 => 100644 nuttx/drivers/sercomm/README.txt mode change 100755 => 100644 nuttx/drivers/wireless/cc1101/cc1101.c mode change 100755 => 100644 nuttx/fs/mmap/README.txt mode change 100755 => 100644 nuttx/fs/nxffs/README.txt mode change 100755 => 100644 nuttx/graphics/nxconsole/nxcon_driver.c mode change 100755 => 100644 nuttx/graphics/nxconsole/nxcon_redraw.c mode change 100755 => 100644 nuttx/graphics/nxconsole/nxcon_scroll.c mode change 100755 => 100644 nuttx/graphics/nxfonts/nxfonts_sans28x37b.h mode change 100755 => 100644 nuttx/graphics/nxfonts/nxfonts_sans40x49b.h mode change 100755 => 100644 nuttx/graphics/nxfonts/nxfonts_serif27x38b.h mode change 100755 => 100644 nuttx/graphics/nxfonts/nxfonts_serif29x37.h mode change 100755 => 100644 nuttx/include/nuttx/usb/cdc.h mode change 100755 => 100644 nuttx/include/nuttx/watchdog.h mode change 100755 => 100644 nuttx/net/uip/uip_igmpgroup.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpinit.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpinput.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpjoin.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpleave.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpmsg.c mode change 100755 => 100644 nuttx/net/uip/uip_igmppoll.c mode change 100755 => 100644 nuttx/net/uip/uip_igmpsend.c mode change 100755 => 100644 nuttx/net/uip/uip_igmptimer.c mode change 100755 => 100644 nuttx/net/uip/uip_mcastmac.c mode change 100755 => 100644 nuttx/net/uip/uip_tcpseqno.c mode change 100755 => 100644 nuttx/tools/README.txt diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt old mode 100755 new mode 100644 diff --git a/apps/examples/igmp/Makefile b/apps/examples/igmp/Makefile old mode 100755 new mode 100644 diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile old mode 100755 new mode 100644 diff --git a/apps/examples/thttpd/content/netstat/netstat.c b/apps/examples/thttpd/content/netstat/netstat.c old mode 100755 new mode 100644 diff --git a/apps/examples/thttpd/content/tasks/Makefile b/apps/examples/thttpd/content/tasks/Makefile old mode 100755 new mode 100644 diff --git a/apps/examples/thttpd/content/tasks/tasks.c b/apps/examples/thttpd/content/tasks/tasks.c old mode 100755 new mode 100644 diff --git a/apps/examples/wlan/Makefile b/apps/examples/wlan/Makefile old mode 100755 new mode 100644 diff --git a/apps/include/netutils/ftpd.h b/apps/include/netutils/ftpd.h old mode 100755 new mode 100644 diff --git a/apps/include/netutils/ipmsfilter.h b/apps/include/netutils/ipmsfilter.h old mode 100755 new mode 100644 diff --git a/apps/interpreters/ficl/README.txt b/apps/interpreters/ficl/README.txt old mode 100755 new mode 100644 diff --git a/apps/netutils/ftpd/ftpd.c b/apps/netutils/ftpd/ftpd.c old mode 100755 new mode 100644 diff --git a/apps/netutils/ftpd/ftpd.h b/apps/netutils/ftpd/ftpd.h old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_alloc.c b/apps/netutils/thttpd/thttpd_alloc.c old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_alloc.h b/apps/netutils/thttpd/thttpd_alloc.h old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_cgi.c b/apps/netutils/thttpd/thttpd_cgi.c old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_cgi.h b/apps/netutils/thttpd/thttpd_cgi.h old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_strings.c b/apps/netutils/thttpd/thttpd_strings.c old mode 100755 new mode 100644 diff --git a/apps/netutils/thttpd/thttpd_strings.h b/apps/netutils/thttpd/thttpd_strings.h old mode 100755 new mode 100644 diff --git a/apps/netutils/uiplib/uip_ipmsfilter.c b/apps/netutils/uiplib/uip_ipmsfilter.c old mode 100755 new mode 100644 diff --git a/apps/system/i2c/README.txt b/apps/system/i2c/README.txt old mode 100755 new mode 100644 diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile old mode 100755 new mode 100644 diff --git a/apps/system/install/README.txt b/apps/system/install/README.txt old mode 100755 new mode 100644 diff --git a/apps/system/install/install.c b/apps/system/install/install.c old mode 100755 new mode 100644 diff --git a/misc/drivers/rtl8187x/rtl8187x.c b/misc/drivers/rtl8187x/rtl8187x.c old mode 100755 new mode 100644 diff --git a/misc/drivers/rtl8187x/rtl8187x.h b/misc/drivers/rtl8187x/rtl8187x.h old mode 100755 new mode 100644 diff --git a/misc/tools/kconfig-language.txt b/misc/tools/kconfig-language.txt old mode 100755 new mode 100644 diff --git a/nuttx/Documentation/NxWidgets.html b/nuttx/Documentation/NxWidgets.html old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/include/lpc17xx/irq.h b/nuttx/arch/arm/include/lpc17xx/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/include/lpc2378/irq.h b/nuttx/arch/arm/include/lpc2378/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/include/lpc31xx/irq.h b/nuttx/arch/arm/include/lpc31xx/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/include/sam3u/irq.h b/nuttx/arch/arm/include/sam3u/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_allocpage.c b/nuttx/arch/arm/src/arm/up_allocpage.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_blocktask.c b/nuttx/arch/arm/src/arm/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_checkmapping.c b/nuttx/arch/arm/src/arm/up_checkmapping.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_pginitialize.c b/nuttx/arch/arm/src/arm/up_pginitialize.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_releasepending.c b/nuttx/arch/arm/src/arm/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_reprioritizertr.c b/nuttx/arch/arm/src/arm/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_unblocktask.c b/nuttx/arch/arm/src/arm/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/arm/up_va2pte.c b/nuttx/arch/arm/src/arm/up_va2pte.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/armv7-m/up_blocktask.c b/nuttx/arch/arm/src/armv7-m/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/armv7-m/up_releasepending.c b/nuttx/arch/arm/src/armv7-m/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c b/nuttx/arch/arm/src/armv7-m/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/armv7-m/up_unblocktask.c b/nuttx/arch/arm/src/armv7-m/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/common/up_etherstub.c b/nuttx/arch/arm/src/common/up_etherstub.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_cspi.h b/nuttx/arch/arm/src/imx/imx_cspi.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_dma.h b/nuttx/arch/arm/src/imx/imx_dma.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_eim.h b/nuttx/arch/arm/src/imx/imx_eim.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_gpio.h b/nuttx/arch/arm/src/imx/imx_gpio.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_i2c.h b/nuttx/arch/arm/src/imx/imx_i2c.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_rtc.h b/nuttx/arch/arm/src/imx/imx_rtc.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_spi.c b/nuttx/arch/arm/src/imx/imx_spi.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_system.h b/nuttx/arch/arm/src/imx/imx_system.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_usbd.h b/nuttx/arch/arm/src/imx/imx_usbd.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/imx/imx_wdog.h b/nuttx/arch/arm/src/imx/imx_wdog.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lm3s/lm3s_epi.h b/nuttx/arch/arm/src/lm3s/lm3s_epi.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lm3s/lm3s_ssi.c b/nuttx/arch/arm/src/lm3s/lm3s_ssi.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lm3s/lm3s_timer.h b/nuttx/arch/arm/src/lm3s/lm3s_timer.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h b/nuttx/arch/arm/src/lpc214x/lpc214x_uart.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h b/nuttx/arch/arm/src/lpc214x/lpc214x_vic.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/Make.defs b/nuttx/arch/arm/src/lpc2378/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/chip.h b/nuttx/arch/arm/src/lpc2378/chip.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/internal.h b/nuttx/arch/arm/src/lpc2378/internal.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_decodeirq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_gpio.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_io.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_io.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_irq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_pinsel.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_pllsetup.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_pllsetup.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_scb.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_timer.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_timerisr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_uart.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h b/nuttx/arch/arm/src/lpc2378/lpc23xx_vic.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/Make.defs b/nuttx/arch/arm/src/lpc31xx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/chip.h b/nuttx/arch/arm/src/lpc31xx/chip.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_adc.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h b/nuttx/arch/arm/src/lpc31xx/lpc31_analogdie.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_bcrndx.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_boot.c b/nuttx/arch/arm/src/lpc31xx/lpc31_boot.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h b/nuttx/arch/arm/src/lpc31xx/lpc31_cgu.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h b/nuttx/arch/arm/src/lpc31xx/lpc31_cgudrvr.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkdomain.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkexten.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkfreq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c b/nuttx/arch/arm/src/lpc31xx/lpc31_clkinit.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_decodeirq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c b/nuttx/arch/arm/src/lpc31xx/lpc31_defclk.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h b/nuttx/arch/arm/src/lpc31xx/lpc31_dma.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_esrndx.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h b/nuttx/arch/arm/src/lpc31xx/lpc31_evntrtr.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c b/nuttx/arch/arm/src/lpc31xx/lpc31_fdcndx.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c b/nuttx/arch/arm/src/lpc31xx/lpc31_fdivinit.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c b/nuttx/arch/arm/src/lpc31xx/lpc31_freqin.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h b/nuttx/arch/arm/src/lpc31xx/lpc31_i2c.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h b/nuttx/arch/arm/src/lpc31xx/lpc31_i2s.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_intc.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h b/nuttx/arch/arm/src/lpc31xx/lpc31_internal.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h b/nuttx/arch/arm/src/lpc31xx/lpc31_ioconfig.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c b/nuttx/arch/arm/src/lpc31xx/lpc31_irq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h b/nuttx/arch/arm/src/lpc31xx/lpc31_lcd.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_lowputc.c b/nuttx/arch/arm/src/lpc31xx/lpc31_lowputc.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h b/nuttx/arch/arm/src/lpc31xx/lpc31_mci.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h b/nuttx/arch/arm/src/lpc31xx/lpc31_memorymap.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h b/nuttx/arch/arm/src/lpc31xx/lpc31_mpmc.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h b/nuttx/arch/arm/src/lpc31xx/lpc31_nand.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h b/nuttx/arch/arm/src/lpc31xx/lpc31_otp.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h b/nuttx/arch/arm/src/lpc31xx/lpc31_pcm.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c b/nuttx/arch/arm/src/lpc31xx/lpc31_pllconfig.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h b/nuttx/arch/arm/src/lpc31xx/lpc31_pwm.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c b/nuttx/arch/arm/src/lpc31xx/lpc31_resetclks.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h b/nuttx/arch/arm/src/lpc31xx/lpc31_rng.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c b/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c b/nuttx/arch/arm/src/lpc31xx/lpc31_setfdiv.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c b/nuttx/arch/arm/src/lpc31xx/lpc31_setfreqin.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c b/nuttx/arch/arm/src/lpc31xx/lpc31_softreset.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h b/nuttx/arch/arm/src/lpc31xx/lpc31_spi.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h b/nuttx/arch/arm/src/lpc31xx/lpc31_syscreg.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h b/nuttx/arch/arm/src/lpc31xx/lpc31_timer.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c b/nuttx/arch/arm/src/lpc31xx/lpc31_timerisr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h b/nuttx/arch/arm/src/lpc31xx/lpc31_uart.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c b/nuttx/arch/arm/src/lpc31xx/lpc31_usbdev.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h b/nuttx/arch/arm/src/lpc31xx/lpc31_usbotg.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h b/nuttx/arch/arm/src/lpc31xx/lpc31_wdt.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/arm/src/str71x/str71x_xti.c b/nuttx/arch/arm/src/str71x/str71x_xti.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/include/at32uc3/irq.h b/nuttx/arch/avr/include/at32uc3/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/include/avr/avr.h b/nuttx/arch/avr/include/avr/avr.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/include/avr32/avr32.h b/nuttx/arch/avr/include/avr32/avr32.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr/excptmacros.h b/nuttx/arch/avr/src/avr/excptmacros.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr/up_blocktask.c b/nuttx/arch/avr/src/avr/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr/up_releasepending.c b/nuttx/arch/avr/src/avr/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr/up_reprioritizertr.c b/nuttx/arch/avr/src/avr/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr/up_unblocktask.c b/nuttx/arch/avr/src/avr/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr32/up_blocktask.c b/nuttx/arch/avr/src/avr32/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr32/up_releasepending.c b/nuttx/arch/avr/src/avr32/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr32/up_reprioritizertr.c b/nuttx/arch/avr/src/avr32/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/avr/src/avr32/up_unblocktask.c b/nuttx/arch/avr/src/avr32/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/arch.h b/nuttx/arch/hc/include/arch.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hc12/irq.h b/nuttx/arch/hc/include/hc12/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hc12/limits.h b/nuttx/arch/hc/include/hc12/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hc12/types.h b/nuttx/arch/hc/include/hc12/types.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hcs12/irq.h b/nuttx/arch/hc/include/hcs12/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hcs12/limits.h b/nuttx/arch/hc/include/hcs12/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/hcs12/types.h b/nuttx/arch/hc/include/hcs12/types.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/irq.h b/nuttx/arch/hc/include/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/limits.h b/nuttx/arch/hc/include/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/m9s12/irq.h b/nuttx/arch/hc/include/m9s12/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/include/types.h b/nuttx/arch/hc/include/types.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_allocateheap.c b/nuttx/arch/hc/src/common/up_allocateheap.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_arch.h b/nuttx/arch/hc/src/common/up_arch.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_blocktask.c b/nuttx/arch/hc/src/common/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_createstack.c b/nuttx/arch/hc/src/common/up_createstack.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_idle.c b/nuttx/arch/hc/src/common/up_idle.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_initialize.c b/nuttx/arch/hc/src/common/up_initialize.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_internal.h b/nuttx/arch/hc/src/common/up_internal.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_interruptcontext.c b/nuttx/arch/hc/src/common/up_interruptcontext.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_mdelay.c b/nuttx/arch/hc/src/common/up_mdelay.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_modifyreg16.c b/nuttx/arch/hc/src/common/up_modifyreg16.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_modifyreg32.c b/nuttx/arch/hc/src/common/up_modifyreg32.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_modifyreg8.c b/nuttx/arch/hc/src/common/up_modifyreg8.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_puts.c b/nuttx/arch/hc/src/common/up_puts.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_releasepending.c b/nuttx/arch/hc/src/common/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_releasestack.c b/nuttx/arch/hc/src/common/up_releasestack.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_reprioritizertr.c b/nuttx/arch/hc/src/common/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_udelay.c b/nuttx/arch/hc/src/common/up_udelay.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_unblocktask.c b/nuttx/arch/hc/src/common/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/common/up_usestack.c b/nuttx/arch/hc/src/common/up_usestack.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/Make.defs b/nuttx/arch/hc/src/m9s12/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/chip.h b/nuttx/arch/hc/src/m9s12/chip.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_atd.h b/nuttx/arch/hc/src/m9s12/m9s12_atd.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_crg.h b/nuttx/arch/hc/src/m9s12/m9s12_crg.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c b/nuttx/arch/hc/src/m9s12/m9s12_dumpgpio.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_emac.h b/nuttx/arch/hc/src/m9s12/m9s12_emac.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_flash.h b/nuttx/arch/hc/src/m9s12/m9s12_flash.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_gpio.c b/nuttx/arch/hc/src/m9s12/m9s12_gpio.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c b/nuttx/arch/hc/src/m9s12/m9s12_gpioirq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_iic.h b/nuttx/arch/hc/src/m9s12/m9s12_iic.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_int.h b/nuttx/arch/hc/src/m9s12/m9s12_int.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_internal.h b/nuttx/arch/hc/src/m9s12/m9s12_internal.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_irq.c b/nuttx/arch/hc/src/m9s12/m9s12_irq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_mebi.h b/nuttx/arch/hc/src/m9s12/m9s12_mebi.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_mmc.h b/nuttx/arch/hc/src/m9s12/m9s12_mmc.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_phy.h b/nuttx/arch/hc/src/m9s12/m9s12_phy.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_pim.h b/nuttx/arch/hc/src/m9s12/m9s12_pim.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_sci.h b/nuttx/arch/hc/src/m9s12/m9s12_sci.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_serial.c b/nuttx/arch/hc/src/m9s12/m9s12_serial.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_serial.h b/nuttx/arch/hc/src/m9s12/m9s12_serial.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_spi.h b/nuttx/arch/hc/src/m9s12/m9s12_spi.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_tim.h b/nuttx/arch/hc/src/m9s12/m9s12_tim.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c b/nuttx/arch/hc/src/m9s12/m9s12_timerisr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/README.txt b/nuttx/arch/x86/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/arch.h b/nuttx/arch/x86/include/arch.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/i486/arch.h b/nuttx/arch/x86/include/i486/arch.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/i486/irq.h b/nuttx/arch/x86/include/i486/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/i486/limits.h b/nuttx/arch/x86/include/i486/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/i486/types.h b/nuttx/arch/x86/include/i486/types.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/io.h b/nuttx/arch/x86/include/io.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/irq.h b/nuttx/arch/x86/include/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/limits.h b/nuttx/arch/x86/include/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/qemu/arch.h b/nuttx/arch/x86/include/qemu/arch.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/qemu/irq.h b/nuttx/arch/x86/include/qemu/irq.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/include/types.h b/nuttx/arch/x86/include/types.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/README.txt b/nuttx/arch/x86/src/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/common/up_blocktask.c b/nuttx/arch/x86/src/common/up_blocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/common/up_releasepending.c b/nuttx/arch/x86/src/common/up_releasepending.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/common/up_reprioritizertr.c b/nuttx/arch/x86/src/common/up_reprioritizertr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/common/up_unblocktask.c b/nuttx/arch/x86/src/common/up_unblocktask.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/i486/up_irq.c b/nuttx/arch/x86/src/i486/up_irq.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/qemu/Make.defs b/nuttx/arch/x86/src/qemu/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/qemu/chip.h b/nuttx/arch/x86/src/qemu/chip.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/qemu/qemu_internal.h b/nuttx/arch/x86/src/qemu/qemu_internal.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/qemu/qemu_memorymap.h b/nuttx/arch/x86/src/qemu/qemu_memorymap.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/x86/src/qemu/qemu_timerisr.c b/nuttx/arch/x86/src/qemu/qemu_timerisr.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/include/ez80/limits.h b/nuttx/arch/z80/include/ez80/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/include/z8/limits.h b/nuttx/arch/z80/include/z8/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/include/z80/limits.h b/nuttx/arch/z80/include/z80/limits.h old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/src/ez80/ez80_spi.c b/nuttx/arch/z80/src/ez80/ez80_spi.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/src/z8/z8_i2c.c b/nuttx/arch/z80/src/z8/z8_i2c.c old mode 100755 new mode 100644 diff --git a/nuttx/arch/z80/src/z8/z8_serial.c b/nuttx/arch/z80/src/z8/z8_serial.c old mode 100755 new mode 100644 diff --git a/nuttx/configs/amber/include/board.h b/nuttx/configs/amber/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/avr32dev1/README.txt b/nuttx/configs/avr32dev1/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/avr32dev1/include/board.h b/nuttx/configs/avr32dev1/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/avr32dev1/nsh/Make.defs b/nuttx/configs/avr32dev1/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/avr32dev1/ostest/Make.defs b/nuttx/configs/avr32dev1/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/avr32dev1/ostest/test-result.txt b/nuttx/configs/avr32dev1/ostest/test-result.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/compal_e88/README.txt b/nuttx/configs/compal_e88/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/compal_e99/README.txt b/nuttx/configs/compal_e99/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/demo9s12ne64/README.txt b/nuttx/configs/demo9s12ne64/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/demo9s12ne64/include/board.h b/nuttx/configs/demo9s12ne64/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/demo9s12ne64/ostest/Make.defs b/nuttx/configs/demo9s12ne64/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/ez80f910200zco/nsh/sample-run.txt b/nuttx/configs/ez80f910200zco/nsh/sample-run.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/hymini-stm32v/README.txt b/nuttx/configs/hymini-stm32v/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/hymini-stm32v/include/README.txt b/nuttx/configs/hymini-stm32v/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/hymini-stm32v/include/board.h b/nuttx/configs/hymini-stm32v/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/hymini-stm32v/usbstorage/Make.defs b/nuttx/configs/hymini-stm32v/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/kwikstik-k40/include/board.h b/nuttx/configs/kwikstik-k40/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/README.txt b/nuttx/configs/lm3s6965-ek/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/include/README.txt b/nuttx/configs/lm3s6965-ek/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/include/board.h b/nuttx/configs/lm3s6965-ek/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/nsh/Make.defs b/nuttx/configs/lm3s6965-ek/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/nx/Make.defs b/nuttx/configs/lm3s6965-ek/nx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s6965-ek/ostest/Make.defs b/nuttx/configs/lm3s6965-ek/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/README.txt b/nuttx/configs/lm3s8962-ek/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/include/README.txt b/nuttx/configs/lm3s8962-ek/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/include/board.h b/nuttx/configs/lm3s8962-ek/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/nsh/Make.defs b/nuttx/configs/lm3s8962-ek/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/nx/Make.defs b/nuttx/configs/lm3s8962-ek/nx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lm3s8962-ek/ostest/Make.defs b/nuttx/configs/lm3s8962-ek/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/README.txt b/nuttx/configs/lpcxpresso-lpc1768/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/include/board.h b/nuttx/configs/lpcxpresso-lpc1768/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/nx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/thttpd/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/mbed/README.txt b/nuttx/configs/mbed/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/mbed/include/board.h b/nuttx/configs/mbed/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/mbed/nsh/Make.defs b/nuttx/configs/mbed/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/micropendous3/include/board.h b/nuttx/configs/micropendous3/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/ne64badge/README.txt b/nuttx/configs/ne64badge/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/ne64badge/include/board.h b/nuttx/configs/ne64badge/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/ne64badge/ostest/Make.defs b/nuttx/configs/ne64badge/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/README.txt b/nuttx/configs/nucleus2g/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/include/board.h b/nuttx/configs/nucleus2g/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/nsh/Make.defs b/nuttx/configs/nucleus2g/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/ostest/Make.defs b/nuttx/configs/nucleus2g/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/ostest/test-result.txt b/nuttx/configs/nucleus2g/ostest/test-result.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/usbserial/Make.defs b/nuttx/configs/nucleus2g/usbserial/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/nucleus2g/usbstorage/Make.defs b/nuttx/configs/nucleus2g/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs b/nuttx/configs/olimex-lpc1766stk/ftpc/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs b/nuttx/configs/olimex-lpc1766stk/hidkbd/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/include/board.h b/nuttx/configs/olimex-lpc1766stk/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs b/nuttx/configs/olimex-lpc1766stk/nettest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs b/nuttx/configs/olimex-lpc1766stk/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/nx/Make.defs b/nuttx/configs/olimex-lpc1766stk/nx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs b/nuttx/configs/olimex-lpc1766stk/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs b/nuttx/configs/olimex-lpc1766stk/slip-httpd/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs b/nuttx/configs/olimex-lpc1766stk/thttpd/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs b/nuttx/configs/olimex-lpc1766stk/usbserial/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs b/nuttx/configs/olimex-lpc1766stk/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs b/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc2378/include/board.h b/nuttx/configs/olimex-lpc2378/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc2378/nsh/Make.defs b/nuttx/configs/olimex-lpc2378/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-lpc2378/ostest/Make.defs b/nuttx/configs/olimex-lpc2378/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/olimex-strp711/nettest/Make.defs b/nuttx/configs/olimex-strp711/nettest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/qemu-i486/include/board.h b/nuttx/configs/qemu-i486/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/rgmp/README.txt b/nuttx/configs/rgmp/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/rgmp/include/README.txt b/nuttx/configs/rgmp/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/rgmp/include/stdarg.h b/nuttx/configs/rgmp/include/stdarg.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/rgmp/src/README.txt b/nuttx/configs/rgmp/src/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/README.txt b/nuttx/configs/sam3u-ek/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/include/board.h b/nuttx/configs/sam3u-ek/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/kernel/Makefile b/nuttx/configs/sam3u-ek/kernel/Makefile old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/knsh/Make.defs b/nuttx/configs/sam3u-ek/knsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/nsh/Make.defs b/nuttx/configs/sam3u-ek/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/nx/Make.defs b/nuttx/configs/sam3u-ek/nx/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/ostest/Make.defs b/nuttx/configs/sam3u-ek/ostest/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/sam3u-ek/touchscreen/Make.defs b/nuttx/configs/sam3u-ek/touchscreen/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/skp16c26/README.txt b/nuttx/configs/skp16c26/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/RIDE/README.txt b/nuttx/configs/stm3210e-eval/RIDE/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c b/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/composite/Make.defs b/nuttx/configs/stm3210e-eval/composite/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/include/README.txt b/nuttx/configs/stm3210e-eval/include/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/include/board.h b/nuttx/configs/stm3210e-eval/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3210e-eval/usbstorage/Make.defs b/nuttx/configs/stm3210e-eval/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm3240g-eval/include/board.h b/nuttx/configs/stm3240g-eval/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm32f4discovery/src/up_idle.c b/nuttx/configs/stm32f4discovery/src/up_idle.c old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm32f4discovery/src/up_pm.c b/nuttx/configs/stm32f4discovery/src/up_pm.c old mode 100755 new mode 100644 diff --git a/nuttx/configs/stm32f4discovery/src/up_pmbuttons.c b/nuttx/configs/stm32f4discovery/src/up_pmbuttons.c old mode 100755 new mode 100644 diff --git a/nuttx/configs/teensy/include/board.h b/nuttx/configs/teensy/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/teensy/nsh/Make.defs b/nuttx/configs/teensy/nsh/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/teensy/usbstorage/Make.defs b/nuttx/configs/teensy/usbstorage/Make.defs old mode 100755 new mode 100644 diff --git a/nuttx/configs/twr-k60n512/include/board.h b/nuttx/configs/twr-k60n512/include/board.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/vsn/include/nsh_romfsimg.h b/nuttx/configs/vsn/include/nsh_romfsimg.h old mode 100755 new mode 100644 diff --git a/nuttx/configs/z16f2800100zcog/pashello/README.txt b/nuttx/configs/z16f2800100zcog/pashello/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/drivers/sercomm/README.txt b/nuttx/drivers/sercomm/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/drivers/wireless/cc1101/cc1101.c b/nuttx/drivers/wireless/cc1101/cc1101.c old mode 100755 new mode 100644 diff --git a/nuttx/fs/mmap/README.txt b/nuttx/fs/mmap/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/fs/nxffs/README.txt b/nuttx/fs/nxffs/README.txt old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxconsole/nxcon_driver.c b/nuttx/graphics/nxconsole/nxcon_driver.c old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxconsole/nxcon_redraw.c b/nuttx/graphics/nxconsole/nxcon_redraw.c old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxconsole/nxcon_scroll.c b/nuttx/graphics/nxconsole/nxcon_scroll.c old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxfonts/nxfonts_sans28x37b.h b/nuttx/graphics/nxfonts/nxfonts_sans28x37b.h old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxfonts/nxfonts_sans40x49b.h b/nuttx/graphics/nxfonts/nxfonts_sans40x49b.h old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxfonts/nxfonts_serif27x38b.h b/nuttx/graphics/nxfonts/nxfonts_serif27x38b.h old mode 100755 new mode 100644 diff --git a/nuttx/graphics/nxfonts/nxfonts_serif29x37.h b/nuttx/graphics/nxfonts/nxfonts_serif29x37.h old mode 100755 new mode 100644 diff --git a/nuttx/include/nuttx/usb/cdc.h b/nuttx/include/nuttx/usb/cdc.h old mode 100755 new mode 100644 diff --git a/nuttx/include/nuttx/watchdog.h b/nuttx/include/nuttx/watchdog.h old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpgroup.c b/nuttx/net/uip/uip_igmpgroup.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpinit.c b/nuttx/net/uip/uip_igmpinit.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpinput.c b/nuttx/net/uip/uip_igmpinput.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpjoin.c b/nuttx/net/uip/uip_igmpjoin.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpleave.c b/nuttx/net/uip/uip_igmpleave.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpmsg.c b/nuttx/net/uip/uip_igmpmsg.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmppoll.c b/nuttx/net/uip/uip_igmppoll.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmpsend.c b/nuttx/net/uip/uip_igmpsend.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_igmptimer.c b/nuttx/net/uip/uip_igmptimer.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_mcastmac.c b/nuttx/net/uip/uip_mcastmac.c old mode 100755 new mode 100644 diff --git a/nuttx/net/uip/uip_tcpseqno.c b/nuttx/net/uip/uip_tcpseqno.c old mode 100755 new mode 100644 diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt old mode 100755 new mode 100644 From 0fb57027de6ac07300fae4e57a0beee7a78a18bd Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 19:33:47 +0000 Subject: [PATCH 68/95] Changes needed for clean ez80 compile with ZDS toolchain git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5147 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/nshlib/nsh_consolemain.c | 3 ++- apps/nshlib/nsh_mntcmds.c | 2 +- nuttx/configs/ez80f910200zco/README.txt | 1 + nuttx/include/nuttx/vt100.h | 4 ++-- nuttx/lib/stdio/lib_fopen.c | 2 +- nuttx/sched/task_exithook.c | 1 + 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/nshlib/nsh_consolemain.c b/apps/nshlib/nsh_consolemain.c index baf2e74b4d..6b51be4705 100644 --- a/apps/nshlib/nsh_consolemain.c +++ b/apps/nshlib/nsh_consolemain.c @@ -97,9 +97,10 @@ int nsh_consolemain(int argc, char *argv[]) { FAR struct console_stdio_s *pstate = nsh_newconsole(); - DEBUGASSERT(pstate); int ret; + DEBUGASSERT(pstate); + /* If we are using a USB serial console, then we will have to wait for the * USB to be connected to the host. */ diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c index 027046c77c..690d027cae 100644 --- a/apps/nshlib/nsh_mntcmds.c +++ b/apps/nshlib/nsh_mntcmds.c @@ -199,6 +199,7 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *target; FAR char *filesystem = NULL; bool badarg = false; + int option; int ret; /* The mount command behaves differently if no parameters are provided */ @@ -214,7 +215,6 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) * logic just sets 'badarg' and continues. */ - int option; while ((option = getopt(argc, argv, ":t:")) != ERROR) { switch (option) diff --git a/nuttx/configs/ez80f910200zco/README.txt b/nuttx/configs/ez80f910200zco/README.txt index 1b28177046..51b219493c 100644 --- a/nuttx/configs/ez80f910200zco/README.txt +++ b/nuttx/configs/ez80f910200zco/README.txt @@ -49,6 +49,7 @@ Version 5.1.1 Windows 7 system. Other Versions + If you use any version of ZDS-II other than 4.11.0 or if you install ZDS-II at any location other than the default location, you will have to modify two files: (1) configs/ez80f910200zco/*/setenv.sh and (2) diff --git a/nuttx/include/nuttx/vt100.h b/nuttx/include/nuttx/vt100.h index a0254e88a6..d834f48f0c 100644 --- a/nuttx/include/nuttx/vt100.h +++ b/nuttx/include/nuttx/vt100.h @@ -105,7 +105,7 @@ #define VT100_CURSORPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'H'} /* Move cursor to screen location v,h */ #define VT100_HVHOME {ASCII_ESC, '[', 'f'} /* Move cursor to upper left corner */ -#define VT100_HVHOME_ {ASCII_ESC, '[', ;', 'f'} /* Move cursor to upper left corner */ +#define VT100_HVHOME_ {ASCII_ESC, '[', ';', 'f'} /* Move cursor to upper left corner */ #define VT100_HVPOS(v,h) {ASCII_ESC, '[', (v), ';', (h), 'f'} /* Move cursor to screen location v,h */ #define VT100_INDEX {ASCII_ESC, 'D'} /* Move/scroll window up one line */ #define VT100_REVINDEX {ASCII_ESC, 'M'} /* Move/scroll window down one line */ @@ -138,7 +138,7 @@ #define VT100_TERMNOK {ASCII_ESC, '3', 'n'} /* Response: terminal is not OK */ #define VT100_GETCURSOR {ASCII_ESC, '6', 'n'} /* Get cursor position */ -#define VT100_CURSORPOS {ASCII_ESC, (v), ';', (h), 'R'} /* Response: cursor is at v,h */ +#define VT100_CURSORPOSAT {ASCII_ESC, (v), ';', (h), 'R'} /* Response: cursor is at v,h */ #define VT100_IDENT {ASCII_ESC, '[', 'c'} /* Identify what terminal type */ #define VT100_IDENT_ {ASCII_ESC, '[', '0', 'c'} /* Identify what terminal type */ diff --git a/nuttx/lib/stdio/lib_fopen.c b/nuttx/lib/stdio/lib_fopen.c index 52e44c59de..29ff4569c2 100644 --- a/nuttx/lib/stdio/lib_fopen.c +++ b/nuttx/lib/stdio/lib_fopen.c @@ -64,7 +64,7 @@ enum open_mode_e MODE_A, /* "a" or "ab" open for writing, appending to file */ MODE_RPLUS, /* "r+", "rb+", or "r+b" open for update (reading and writing) */ MODE_WPLUS, /* "w+", "wb+", or "w+b" open for update, truncating or creating file */ - MODE_APLUS, /* "a+", "ab+", or "a+b" open for update, appending to file */ + MODE_APLUS /* "a+", "ab+", or "a+b" open for update, appending to file */ }; /**************************************************************************** diff --git a/nuttx/sched/task_exithook.c b/nuttx/sched/task_exithook.c index 63dc28aa05..8497af7ee9 100644 --- a/nuttx/sched/task_exithook.c +++ b/nuttx/sched/task_exithook.c @@ -44,6 +44,7 @@ #include #include +#include #include #include "os_internal.h" From 491a83acb40aa1fa87c1c6894c3ecbe957c19e54 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 20:37:24 +0000 Subject: [PATCH 69/95] Fix for recvfrom() hang when the new CONFIG_NET_TCP_RECVDELAY is set to zero (from Max Holtzberg) git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5148 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 4 ++++ nuttx/net/recvfrom.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 5728e117f6..1375bea434 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3337,4 +3337,8 @@ * include/nuttx/usb/usb.h, arch/*/src/*usb.c, and arch/*/src/*otg*.c: Add hooks to to use common, external DMA buffer allocation implementation. + * net/recvfrom.c: Don't block in recvfrom if (1) read-ahead buffering + is enabled and (2) some data was obtained from read-ahead buffers. + Blocking is a bad idea in that case because there is no timeout! + (submitted by Max Holtzberg). diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 51027e0f8a..78990fd39e 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -1079,7 +1079,25 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, else #endif + + /* We get here when we we decide that we need to setup the wait for incoming + * TCP/IP data. Just a few more conditions to check: + * + * 1) Make sure thet there is buffer space to receive additional data + * (state.rf_buflen > 0). This could be zero, for example, if read-ahead + * buffering was enabled and we filled the user buffer with data from + * the read-ahead buffers. Aand + * 2) if read-ahead buffering is enabled (CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0) + * and delay logic is disabled (CONFIG_NET_TCP_RECVDELAY == 0), then we + * not want to wait if we already obtained some data from the read-ahead + * buffer. In that case, return now with what we have. + */ + +#if CONFIG_NET_TCP_RECVDELAY == 0 && CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0 + if (state.rf_recvlen == 0 && state.rf_buflen > 0) +#else if (state.rf_buflen > 0) +#endif { struct uip_conn *conn = (struct uip_conn *)psock->s_conn; From ae33fc3ed02ad0c56612124a26028123c353bee0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 22:04:47 +0000 Subject: [PATCH 70/95] Fixes for z80 compilation with SDCC toolchain. There are still a few header file and linker issues git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5149 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/z80/src/Makefile.sdcc | 2 +- nuttx/arch/z80/src/z80/z80_io.c | 28 +++++++++++---- nuttx/arch/z80/src/z80/z80_irq.c | 18 +++++++--- nuttx/configs/xtrs/README.txt | 48 +++++++++++++++---------- nuttx/configs/xtrs/include/board.h | 2 +- nuttx/configs/xtrs/include/trs80-m3.h | 2 +- nuttx/configs/xtrs/nsh/Make.defs | 39 ++++++++++++-------- nuttx/configs/xtrs/nsh/defconfig | 2 +- nuttx/configs/xtrs/nsh/setenv.sh | 2 +- nuttx/configs/xtrs/ostest/Make.defs | 39 ++++++++++++-------- nuttx/configs/xtrs/ostest/setenv.sh | 2 +- nuttx/configs/xtrs/pashello/Make.defs | 39 ++++++++++++-------- nuttx/configs/xtrs/pashello/setenv.sh | 2 +- nuttx/configs/xtrs/src/xtr_irq.c | 2 +- nuttx/configs/xtrs/src/xtr_lowputc.c | 2 +- nuttx/configs/xtrs/src/xtr_serial.c | 2 +- nuttx/configs/xtrs/src/xtr_timerisr.c | 2 +- nuttx/configs/z80sim/README.txt | 48 +++++++++++++++---------- nuttx/configs/z80sim/include/board.h | 2 +- nuttx/configs/z80sim/nsh/Make.defs | 37 ++++++++++++------- nuttx/configs/z80sim/nsh/defconfig | 2 +- nuttx/configs/z80sim/nsh/setenv.sh | 2 +- nuttx/configs/z80sim/ostest/Make.defs | 37 ++++++++++++------- nuttx/configs/z80sim/ostest/setenv.sh | 2 +- nuttx/configs/z80sim/pashello/Make.defs | 37 ++++++++++++------- nuttx/configs/z80sim/pashello/setenv.sh | 2 +- nuttx/configs/z80sim/src/z80_irq.c | 2 +- nuttx/configs/z80sim/src/z80_lowputc.c | 2 +- nuttx/configs/z80sim/src/z80_serial.c | 2 +- nuttx/configs/z80sim/src/z80_timerisr.c | 2 +- nuttx/lib/stdio/lib_lowinstream.c | 4 +-- nuttx/lib/stdio/lib_sscanf.c | 10 +++--- nuttx/lib/string/Make.defs | 18 ++++++---- nuttx/net/recvfrom.c | 3 +- nuttx/sched/prctl.c | 2 +- 35 files changed, 282 insertions(+), 165 deletions(-) diff --git a/nuttx/arch/z80/src/Makefile.sdcc b/nuttx/arch/z80/src/Makefile.sdcc index d5ff3b7930..522c8d6f90 100644 --- a/nuttx/arch/z80/src/Makefile.sdcc +++ b/nuttx/arch/z80/src/Makefile.sdcc @@ -94,7 +94,7 @@ $(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT) $(COBJS): %$(OBJEXT): %.c $(call COMPILE, $<, $@) -# This is a kludge to work around some conflicting symbols in libsdcc.liXqueb +# This is a kludge to work around some conflicting symbols in libsdcc.lib $(SDCCLIBDIR)/myz80.lib: $(SDCCLIBDIR)/$(SDCCLIB) @cat $(SDCCLIBDIR)/$(SDCCLIB) | \ diff --git a/nuttx/arch/z80/src/z80/z80_io.c b/nuttx/arch/z80/src/z80/z80_io.c index cddaa6831f..bdd55bc6b8 100644 --- a/nuttx/arch/z80/src/z80/z80_io.c +++ b/nuttx/arch/z80/src/z80/z80_io.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/z80/z80_io.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,9 +44,23 @@ #include "up_internal.h" /**************************************************************************** - * Private Definitions + * Pre-processor Definitions ****************************************************************************/ +#undef ASM +#undef ENDASM +#undef NAKED + +#ifdef CONFIG_SDCC_OLD +# define ASM _asm +# define ENDASM _endasm +# define NAKED +#else +# define ASM __asm +# define ENDASM __endasm +# define NAKED __naked +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -69,11 +83,11 @@ void outp(char p, char c) { - _asm + ASM ld c, 4(ix) ; port ld a, 5(ix) ; value out (c), a - _endasm; + ENDASM; } @@ -85,10 +99,10 @@ void outp(char p, char c) * ****************************************************************************/ -char inp(char p) +char inp(char p) NAKED { - _asm + ASM ld c, 4(ix) ;port in l, (c) - _endasm; + ENDASM; } diff --git a/nuttx/arch/z80/src/z80/z80_irq.c b/nuttx/arch/z80/src/z80/z80_irq.c index 08b426235d..87ea7063ac 100644 --- a/nuttx/arch/z80/src/z80/z80_irq.c +++ b/nuttx/arch/z80/src/z80/z80_irq.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/z80/z80_irq.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,14 @@ * Private Definitions ****************************************************************************/ +#ifdef CONFIG_SDCC_OLD +# define ASM _asm +# define ENDASM _endasm +#else +# define ASM __asm +# define ENDASM __endasm +#endif + /**************************************************************************** * Public Data ****************************************************************************/ @@ -80,13 +88,13 @@ volatile chipreg_t *current_regs; irqstate_t irqsave(void) __naked { - _asm + ASM ld a, i ; AF Parity bit holds interrupt state di ; Interrupts are disabled push af ; Return AF in HL pop hl ; ret ; - _endasm; + ENDASM; } /**************************************************************************** @@ -99,7 +107,7 @@ irqstate_t irqsave(void) __naked void irqrestore(irqstate_t flags) __naked { - _asm + ASM di ; Assume disabled pop hl ; HL = return address pop af ; AF Parity bit holds interrupt state @@ -109,5 +117,5 @@ statedisable: push af ; Restore stack push hl ; ret ; and return - _endasm; + ENDASM; } diff --git a/nuttx/configs/xtrs/README.txt b/nuttx/configs/xtrs/README.txt index a4067b3e43..ecd44e4e21 100644 --- a/nuttx/configs/xtrs/README.txt +++ b/nuttx/configs/xtrs/README.txt @@ -50,11 +50,10 @@ Configuring NuttX This configuration performs a simple, minimal OS test using examples/ostest. This can be configurated as follows: - cd tools - ./configure.sh xtrs/ostest - cd - - . ./setenv.sh - + cd tools + ./configure.sh xtrs/ostest + cd - + . ./setenv.sh nsh This configuration file builds NSH (examples/nsh). This @@ -63,10 +62,10 @@ Configuring NuttX This configuration can be selected by: - cd tools - ./configure.sh xtrs/nsh - cd - - . ./setenv.sh + cd tools + ./configure.sh xtrs/nsh + cd - + . ./setenv.sh pashello Configures to use examples/pashello for execution from FLASH @@ -77,10 +76,10 @@ Configuring NuttX This configuration can be selected by: - cd tools - ./configure.sh xtrs/pashello - cd - - . ./setenv.sh + cd tools + ./configure.sh xtrs/pashello + cd - + . ./setenv.sh Building the SDCC toolchain ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -122,11 +121,11 @@ has some compatibilty problems with the older SDCC compiler. For one, you will need to change the Z80 assember name and options in the Make.defs files as follows: --AS = as-z80 -+AS = sdasz80 +-AS = as-z80 ++AS = sdasz80 -- @$(AS) $(ASFLAGS) $2 $1 -+ $(AS) $(ASFLAGS) $1 +- @$(AS) $(ASFLAGS) $2 $1 ++ $(AS) $(ASFLAGS) $1 For another, I had other problems building with that 20091106 that look like compiler bugs. If you are using UBUNTU 9.10, you may have to either @@ -134,6 +133,9 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either the older stable releases, or (2) wait for the next stable SDCC release after 2.9.0. +See below: If you wish to continue using the older SDCC toolchain, you +must now also add CONFIG_SDCC_OLD=y to your configuration file. + Newer SDCC Versions ^^^^^^^^^^^^^^^^^^^ @@ -154,4 +156,14 @@ This is the text of bug 3468951 reported on the SourceForge website: sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding section from the README can be removed. -These changes have not yet been incorporated or verified. \ No newline at end of file +These changes *have* been incorporated but only partially verified. In order +to get a successful compilation, I had to copy stdarg.h out of the SDCC source +(at sdcc/device/include/stdarg.h) to include/nuttx/stdarg.h. + +There are also some library related issues when you get to the final build +that I have not looked into yet. + +If you want to back out these change and continue to use the older toolchain +in your build, simpy define the following in your configuration file: + + CONFIG_SDCC_OLD=y diff --git a/nuttx/configs/xtrs/include/board.h b/nuttx/configs/xtrs/include/board.h index f8f74b2193..02ab012f83 100644 --- a/nuttx/configs/xtrs/include/board.h +++ b/nuttx/configs/xtrs/include/board.h @@ -1,5 +1,5 @@ /************************************************************ - * board/board.h + * configs/xtrs/include/board.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/include/trs80-m3.h b/nuttx/configs/xtrs/include/trs80-m3.h index 4a2a453329..1a23b2d7b2 100644 --- a/nuttx/configs/xtrs/include/trs80-m3.h +++ b/nuttx/configs/xtrs/include/trs80-m3.h @@ -1,5 +1,5 @@ /**************************************************************************** - * board/trs80-m3.h + * configs/xtrs/include/trs80-m3.h * * Copyright (C) 2008 Jacques Pelletier. All rights reserved. * Author: Jacques Pelletier diff --git a/nuttx/configs/xtrs/nsh/Make.defs b/nuttx/configs/xtrs/nsh/Make.defs index e1d147dc40..947deb5af0 100644 --- a/nuttx/configs/xtrs/nsh/Make.defs +++ b/nuttx/configs/xtrs/nsh/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/xtrs/Make.defs +# configs/xtrs/nsh/Make.defs # # Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 76f4e7fa97..b8bd5d6f28 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -1,5 +1,5 @@ ############################################################################ -# sim/xtrs/nsh/defconfig +# configs/xtrs/nsh/defconfig # # Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/nsh/setenv.sh b/nuttx/configs/xtrs/nsh/setenv.sh index c59e0abc1f..99d45f97a7 100755 --- a/nuttx/configs/xtrs/nsh/setenv.sh +++ b/nuttx/configs/xtrs/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# xtrs/setenv.sh +# configs/xtrs/nsh/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/ostest/Make.defs b/nuttx/configs/xtrs/ostest/Make.defs index 773b97d9d1..06cc05db0b 100644 --- a/nuttx/configs/xtrs/ostest/Make.defs +++ b/nuttx/configs/xtrs/ostest/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/xtrs/Make.defs +# configs/xtrs/ostest/Make.defs # # Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/xtrs/ostest/setenv.sh b/nuttx/configs/xtrs/ostest/setenv.sh index cf7b5d796a..73454b772c 100755 --- a/nuttx/configs/xtrs/ostest/setenv.sh +++ b/nuttx/configs/xtrs/ostest/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# xtrs/setenv.sh +# configs/xtrs/ostest/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/pashello/Make.defs b/nuttx/configs/xtrs/pashello/Make.defs index 773b97d9d1..2c2fb47ce5 100644 --- a/nuttx/configs/xtrs/pashello/Make.defs +++ b/nuttx/configs/xtrs/pashello/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/xtrs/Make.defs +# configs/xtrs/pashello/Make.defs # # Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/xtrs/pashello/setenv.sh b/nuttx/configs/xtrs/pashello/setenv.sh index cf7b5d796a..4e2e98e316 100755 --- a/nuttx/configs/xtrs/pashello/setenv.sh +++ b/nuttx/configs/xtrs/pashello/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# xtrs/setenv.sh +# configs/xtrs/pashello/setenv.sh # # Copyright (C) 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/src/xtr_irq.c b/nuttx/configs/xtrs/src/xtr_irq.c index 4e17c37bca..72f6c10e29 100644 --- a/nuttx/configs/xtrs/src/xtr_irq.c +++ b/nuttx/configs/xtrs/src/xtr_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/xtr_irq.c + * configs/xtrs/src/xtr_irq.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/src/xtr_lowputc.c b/nuttx/configs/xtrs/src/xtr_lowputc.c index 344f220615..8ed166211e 100644 --- a/nuttx/configs/xtrs/src/xtr_lowputc.c +++ b/nuttx/configs/xtrs/src/xtr_lowputc.c @@ -1,5 +1,5 @@ /******************************************************************************** - * board/xtr_lowputc.c + * configs/xtrs/src//xtr_lowputc.c * * Copyright (C) 2008 Jacques Pelletier. All rights reserved. * Author: Jacques Pelletier diff --git a/nuttx/configs/xtrs/src/xtr_serial.c b/nuttx/configs/xtrs/src/xtr_serial.c index df76b1e3f9..42cffb7404 100644 --- a/nuttx/configs/xtrs/src/xtr_serial.c +++ b/nuttx/configs/xtrs/src/xtr_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/xtr_serial.c + * config/xtrs/src/xtr_serial.c * * Copyright (C) 2008 Jacques Pelletier. All rights reserved. * Author: Jacques Pelletier diff --git a/nuttx/configs/xtrs/src/xtr_timerisr.c b/nuttx/configs/xtrs/src/xtr_timerisr.c index 21a77706f6..295bc65d78 100644 --- a/nuttx/configs/xtrs/src/xtr_timerisr.c +++ b/nuttx/configs/xtrs/src/xtr_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/xtr_timerisr.c + * configs/xtrs/src/xtr_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/README.txt b/nuttx/configs/z80sim/README.txt index 2a610899c4..3edc6ad716 100644 --- a/nuttx/configs/z80sim/README.txt +++ b/nuttx/configs/z80sim/README.txt @@ -23,11 +23,10 @@ Configuring NuttX This configuration performs a simple, minimal OS test using examples/ostest. This can be configurated as follows: - cd tools - ./configure.sh z80sim/ostest - cd - - . ./setenv.sh - + cd tools + ./configure.sh z80sim/ostest + cd - + . ./setenv.sh nsh This configuration file builds NSH (examples/nsh). This @@ -36,10 +35,10 @@ Configuring NuttX This configuration can be selected by: - cd tools - ./configure.sh z80sim/nsh - cd - - . ./setenv.sh + cd tools + ./configure.sh z80sim/nsh + cd - + . ./setenv.sh pashello Configures to use examples/pashello for execution from FLASH @@ -50,10 +49,10 @@ Configuring NuttX This configuration can be selected by: - cd tools - ./configure.sh z80sim/pashello - cd - - . ./setenv.sh + cd tools + ./configure.sh z80sim/pashello + cd - + . ./setenv.sh Building the SDCC toolchain ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -95,11 +94,11 @@ has some compatibilty problems with the older SDCC compiler. For one, you will need to change the Z80 assember name and options in the Make.defs files as follows: --AS = as-z80 -+AS = sdasz80 +-AS = as-z80 ++AS = sdasz80 -- @$(AS) $(ASFLAGS) $2 $1 -+ $(AS) $(ASFLAGS) $1 +- @$(AS) $(ASFLAGS) $2 $1 ++ $(AS) $(ASFLAGS) $1 For another, I had other problems building with that 20091106 that look like compiler bugs. If you are using UBUNTU 9.10, you may have to either @@ -107,6 +106,9 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either the older stable releases, or (2) wait for the next stable SDCC release after 2.9.0. +See below: If you wish to continue using the older SDCC toolchain, you +must now also add CONFIG_SDCC_OLD=y to your configuration file. + Newer SDCC Versions ^^^^^^^^^^^^^^^^^^^ @@ -127,4 +129,14 @@ This is the text of bug 3468951 reported on the SourceForge website: sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding section from the README can be removed. -These changes have not yet been incorporated or verified. \ No newline at end of file +These changes *have* been incorporated but only partially verified. In order +to get a successful compilation, I had to copy stdarg.h out of the SDCC source +(at sdcc/device/include/stdarg.h) to include/nuttx/stdarg.h. + +There are also some library related issues when you get to the final build +that I have not looked into yet. + +If you want to back out these change and continue to use the older toolchain +in your build, simpy define the following in your configuration file: + + CONFIG_SDCC_OLD=y diff --git a/nuttx/configs/z80sim/include/board.h b/nuttx/configs/z80sim/include/board.h index 5bf8eb82d6..f581242cb3 100644 --- a/nuttx/configs/z80sim/include/board.h +++ b/nuttx/configs/z80sim/include/board.h @@ -1,5 +1,5 @@ /************************************************************ - * board/board.h + * configs/z80sim/include/board.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/nsh/Make.defs b/nuttx/configs/z80sim/nsh/Make.defs index d20096ea15..7bdc9663d0 100644 --- a/nuttx/configs/z80sim/nsh/Make.defs +++ b/nuttx/configs/z80sim/nsh/Make.defs @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index 9d4d81a74c..87195b6e86 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -1,5 +1,5 @@ ############################################################################ -# sim/z80sim/nsh/defconfig +# configs/z80sim/nsh/defconfig # # Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/nsh/setenv.sh b/nuttx/configs/z80sim/nsh/setenv.sh index fa65934f18..48373b0f20 100755 --- a/nuttx/configs/z80sim/nsh/setenv.sh +++ b/nuttx/configs/z80sim/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# z80sim/setenv.sh +# configs/z80sim/nsh/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/ostest/Make.defs b/nuttx/configs/z80sim/ostest/Make.defs index 0eb90879b1..f19ae8dd5f 100644 --- a/nuttx/configs/z80sim/ostest/Make.defs +++ b/nuttx/configs/z80sim/ostest/Make.defs @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/z80sim/ostest/setenv.sh b/nuttx/configs/z80sim/ostest/setenv.sh index fa65934f18..239e352861 100755 --- a/nuttx/configs/z80sim/ostest/setenv.sh +++ b/nuttx/configs/z80sim/ostest/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# z80sim/setenv.sh +# configs/z80sim/ostest/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/pashello/Make.defs b/nuttx/configs/z80sim/pashello/Make.defs index b1f2b62cb2..0617b8d8a7 100644 --- a/nuttx/configs/z80sim/pashello/Make.defs +++ b/nuttx/configs/z80sim/pashello/Make.defs @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +CROSSDEV = +CC = sdcc +CPP = sdcpp +AR = sdcclib -a + +ifeq ($(CONFIG_SDCC_OLD),y) + +LD = link-z80 +AS = as-z80 +ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/z80sim/pashello/setenv.sh b/nuttx/configs/z80sim/pashello/setenv.sh index fa65934f18..b9de2b9e0f 100755 --- a/nuttx/configs/z80sim/pashello/setenv.sh +++ b/nuttx/configs/z80sim/pashello/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# z80sim/setenv.sh +# configs/z80sim/pashello/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/src/z80_irq.c b/nuttx/configs/z80sim/src/z80_irq.c index 0fc5d95de9..eb1901d27c 100644 --- a/nuttx/configs/z80sim/src/z80_irq.c +++ b/nuttx/configs/z80sim/src/z80_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/z80_irq.c + * configs/z80sim/src/z80_irq.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/src/z80_lowputc.c b/nuttx/configs/z80sim/src/z80_lowputc.c index 0909929d77..e23caeb0f3 100644 --- a/nuttx/configs/z80sim/src/z80_lowputc.c +++ b/nuttx/configs/z80sim/src/z80_lowputc.c @@ -1,5 +1,5 @@ /******************************************************************************** - * board/z80_lowputc.c + * configs/z80sim/src//z80_lowputc.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/src/z80_serial.c b/nuttx/configs/z80sim/src/z80_serial.c index d699b45987..1e5d98b29c 100644 --- a/nuttx/configs/z80sim/src/z80_serial.c +++ b/nuttx/configs/z80sim/src/z80_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/z80_serial.c + * configs/z80sim/src/z80_serial.c * * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/configs/z80sim/src/z80_timerisr.c b/nuttx/configs/z80sim/src/z80_timerisr.c index 1bcfda0498..e6357e8e0b 100644 --- a/nuttx/configs/z80sim/src/z80_timerisr.c +++ b/nuttx/configs/z80sim/src/z80_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * board/z80_timerisr.c + * configs/z80sim/src/z80_timerisr.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/nuttx/lib/stdio/lib_lowinstream.c b/nuttx/lib/stdio/lib_lowinstream.c index c97a4721fd..499a647ea2 100644 --- a/nuttx/lib/stdio/lib_lowinstream.c +++ b/nuttx/lib/stdio/lib_lowinstream.c @@ -39,8 +39,6 @@ #include -#ifdef CONFIG_ARCH_LOWGETC - #include #include #include @@ -49,6 +47,8 @@ #include "lib_internal.h" +#ifdef CONFIG_ARCH_LOWGETC + /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/nuttx/lib/stdio/lib_sscanf.c b/nuttx/lib/stdio/lib_sscanf.c index c779077112..01c96c21dd 100644 --- a/nuttx/lib/stdio/lib_sscanf.c +++ b/nuttx/lib/stdio/lib_sscanf.c @@ -91,13 +91,13 @@ static const char spaces[] = " \t\n\r\f\v"; * ****************************************************************************/ -int sscanf(const char *buf, const char *fmt, ...) +int sscanf(FAR const char *buf, FAR const char *fmt, ...) { va_list ap; int count; va_start(ap, fmt); - count = vsscanf((char*)buf, fmt, ap); + count = vsscanf((FAR char*)buf, fmt, ap); va_end(ap); return count; } @@ -109,15 +109,15 @@ int sscanf(const char *buf, const char *fmt, ...) * ANSI standard vsscanf implementation. * ****************************************************************************/ -int vsscanf(char *buf, const char *s, va_list ap) +int vsscanf(FAR char *buf, FAR const char *s, va_list ap) { int count; int noassign; int width; int base = 10; int lflag; - char *tv; - const char *tc; + FAR char *tv; + FAR const char *tc; char tmp[MAXLN]; lvdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s); diff --git a/nuttx/lib/string/Make.defs b/nuttx/lib/string/Make.defs index 495634a9ee..014623eef7 100644 --- a/nuttx/lib/string/Make.defs +++ b/nuttx/lib/string/Make.defs @@ -36,13 +36,17 @@ # Add the string C files to the build CSRCS += lib_checkbase.c lib_isbasedigit.c lib_memset.c lib_memchr.c \ - lib_memccpy.c lib_memcpy.c lib_memcmp.c lib_memmove.c lib_skipspace.c \ - lib_strcasecmp.c lib_strcat.c lib_strchr.c lib_strcpy.c lib_strcmp.c \ - lib_strcspn.c lib_strdup.c lib_strerror.c lib_strlen.c lib_strnlen.c \ - lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \ - lib_strndup.c lib_strcasestr.c lib_strpbrk.c lib_strrchr.c\ - lib_strspn.c lib_strstr.c lib_strtok.c lib_strtokr.c lib_strtol.c \ - lib_strtoll.c lib_strtoul.c lib_strtoull.c lib_strtod.c + lib_memccpy.c lib_memcpy.c lib_memcmp.c lib_memmove.c lib_skipspace.c \ + lib_strcasecmp.c lib_strcat.c lib_strchr.c lib_strcpy.c lib_strcmp.c \ + lib_strcspn.c lib_strdup.c lib_strerror.c lib_strlen.c lib_strnlen.c \ + lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \ + lib_strndup.c lib_strcasestr.c lib_strpbrk.c lib_strrchr.c\ + lib_strspn.c lib_strstr.c lib_strtok.c lib_strtokr.c lib_strtol.c \ + lib_strtoll.c lib_strtoul.c lib_strtoull.c + +ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y) +CSRCS += lib_strtod.c +endif # Add the string directory to the build diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 78990fd39e..91dbcce81f 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -1090,7 +1090,8 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, * 2) if read-ahead buffering is enabled (CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0) * and delay logic is disabled (CONFIG_NET_TCP_RECVDELAY == 0), then we * not want to wait if we already obtained some data from the read-ahead - * buffer. In that case, return now with what we have. + * buffer. In that case, return now with what we have (don't want for more + * because there may be no timeout). */ #if CONFIG_NET_TCP_RECVDELAY == 0 && CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0 diff --git a/nuttx/sched/prctl.c b/nuttx/sched/prctl.c index b340d0ec88..d71a0e1746 100644 --- a/nuttx/sched/prctl.c +++ b/nuttx/sched/prctl.c @@ -91,7 +91,7 @@ int prctl(int option, ...) { /* Get the prctl arguments */ - char *name = va_arg(ap, char *); + FAR char *name = va_arg(ap, FAR char *); int pid = va_arg(ap, int); FAR _TCB *tcb; From cc0c42dd3194dc1742369d7fd8aaa8ad65f1ae26 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 14 Sep 2012 14:07:21 +0000 Subject: [PATCH 71/95] Add XML RPC server plus NXWM build fixes from Max Holtzberg git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5150 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 4 + apps/examples/Kconfig | 4 + apps/examples/Make.defs | 4 + apps/examples/README.txt | 25 +- apps/examples/xmlrpc/Kconfig | 45 + apps/examples/xmlrpc/Makefile | 106 +++ apps/examples/xmlrpc/calls.c | 122 +++ apps/examples/xmlrpc/xmlrpc_main.c | 419 +++++++++ apps/include/netutils/xmlrpc.h | 123 +++ apps/netutils/Kconfig | 4 + apps/netutils/Make.defs | 4 + apps/netutils/Makefile | 2 +- apps/netutils/README.txt | 2 + apps/netutils/xmlrpc/Kconfig | 23 + apps/netutils/xmlrpc/Makefile | 99 ++ apps/netutils/xmlrpc/response.c | 287 ++++++ apps/netutils/xmlrpc/xmlparser.c | 416 +++++++++ nuttx/ChangeLog | 9 +- nuttx/Makefile | 2 +- nuttx/arch/arm/src/stm32/Kconfig | 38 + nuttx/arch/arm/src/stm32/stm32_eth.c | 62 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- nuttx/configs/sim/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/README.txt | 8 + nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/xmlrpc/Make.defs | 198 ++++ nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 866 ++++++++++++++++++ nuttx/configs/stm3240g-eval/xmlrpc/setenv.sh | 75 ++ nuttx/lib/string/Make.defs | 6 +- nuttx/lib/string/lib_strtod.c | 7 + nuttx/sched/task_exithook.c | 1 + nuttx/tools/xmlrpc_test.py | 48 + 33 files changed, 2991 insertions(+), 26 deletions(-) create mode 100644 apps/examples/xmlrpc/Kconfig create mode 100644 apps/examples/xmlrpc/Makefile create mode 100644 apps/examples/xmlrpc/calls.c create mode 100644 apps/examples/xmlrpc/xmlrpc_main.c create mode 100644 apps/include/netutils/xmlrpc.h create mode 100644 apps/netutils/xmlrpc/Kconfig create mode 100644 apps/netutils/xmlrpc/Makefile create mode 100644 apps/netutils/xmlrpc/response.c create mode 100644 apps/netutils/xmlrpc/xmlparser.c create mode 100644 nuttx/configs/stm3240g-eval/xmlrpc/Make.defs create mode 100644 nuttx/configs/stm3240g-eval/xmlrpc/defconfig create mode 100644 nuttx/configs/stm3240g-eval/xmlrpc/setenv.sh create mode 100644 nuttx/tools/xmlrpc_test.py diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index b7b71862ec..7650b0ff4a 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -325,4 +325,8 @@ utility (also contribed by Max Holtzberg). * apps/examples/*/main.c: Too many files called main.c. Each renamed to something unique so that they will not collide in the archive. + * apps/netutils/xmlrpc: The Embeddable Lightweight XML-RPC Server + discussed at http://www.drdobbs.com/web-development/\ + an-embeddable-lightweight-xml-rpc-server/184405364. Contributed by + Max Holtzberg. diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index 7860125934..865268addb 100644 --- a/apps/examples/Kconfig +++ b/apps/examples/Kconfig @@ -202,3 +202,7 @@ endmenu menu "WLAN Example" source "$APPSDIR/examples/wlan/Kconfig" endmenu + +menu "XML RPC Example" +source "$APPSDIR/examples/xmlrpc/Kconfig" +endmenu diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index 3bc72b52e6..a6e0ae88e4 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -225,3 +225,7 @@ endif ifeq ($(CONFIG_EXAMPLES_WLAN),y) CONFIGURED_APPS += examples/wlan endif + +ifeq ($(CONFIG_EXAMPLES_XMLRPC),y) +CONFIGURED_APPS += examples/xmlrpc +endif diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 934eded4d8..12d6d38929 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -1668,8 +1668,27 @@ examples/wget file in the configuration driver with instruction to build applications like: - CONFIGURED_APPS += uiplib - CONFIGURED_APPS += resolv - CONFIGURED_APPS += webclient + CONFIGURED_APPS += uiplib + CONFIGURED_APPS += resolv + CONFIGURED_APPS += webclient +examples/xmlrpc + This example exercises the "Embeddable Lightweight XML-RPC Server" which + is discussed at: + + http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364 + + Configuration options: + + CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE - HTTP buffer size. Default 1024 + CONFIG_EXAMPLES_XMLRPC_DHCPC - Use DHCP Client. Default n. Ignored + if CONFIG_NSH_BUILTIN_APPS is selected. + CONFIG_EXAMPLES_XMLRPC_NOMAC - Use Canned MAC Address. Defaul n. Ignored + if CONFIG_NSH_BUILTIN_APPS is selected. + CONFIG_EXAMPLES_XMLRPC_IPADDR - Target IP address. Default 0x0a000002. + Ignored if CONFIG_NSH_BUILTIN_APPS is selected. + CONFIG_EXAMPLES_XMLRPC_DRIPADDR - Default Router IP address (Gateway). + Default 0x0a000001. Ignored if CONFIG_NSH_BUILTIN_APPS is selected. + CONFIG_EXAMPLES_XMLRPC_NETMASK - Network Mask. Default 0xffffff00 + Ignored if CONFIG_NSH_BUILTIN_APPS is selected. diff --git a/apps/examples/xmlrpc/Kconfig b/apps/examples/xmlrpc/Kconfig new file mode 100644 index 0000000000..ee61feb50d --- /dev/null +++ b/apps/examples/xmlrpc/Kconfig @@ -0,0 +1,45 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config EXAMPLES_XMLRPC + bool "XML RPC example" + default n + depends on NET_TCP && !DISABLE_POLL + select NETUTILS_XMLRPC + ---help--- + An example for the netutils/xmlrpc library. + This example implements a lightweight HTTP server and uses the xmlrpc lib + for parsing xml remote procedure calls. + +config EXAMPLES_XMLRPC_BUFFERSIZE + int "HTTP buffer size" + default 1024 + +config EXAMPLES_XMLRPC_DHCPC + bool "DHCP Client" + default n + depends on EXAMPLES_XMLRPC && !NSH_BUILTIN_APPS + select NETUTILS_DHCPC + select NETUTILS_RESOLV + +config EXAMPLES_XMLRPC_NOMAC + bool "Use Canned MAC Address" + default n + depends on EXAMPLES_XMLRPC && !NSH_BUILTIN_APPS + +config EXAMPLES_XMLRPC_IPADDR + hex "Target IP address" + default 0x0a000002 + depends on EXAMPLES_XMLRPC && !NSH_BUILTIN_APPS && !EXAMPLES_XMLRPC_DHCPC + +config EXAMPLES_XMLRPC_DRIPADDR + hex "Default Router IP address (Gateway)" + default 0x0a000001 + depends on EXAMPLES_XMLRPC && !NSH_BUILTIN_APPS + +config EXAMPLES_XMLRPC_NETMASK + hex "Network Mask" + default 0xffffff00 + depends on EXAMPLES_XMLRPC && !NSH_BUILTIN_APPS diff --git a/apps/examples/xmlrpc/Makefile b/apps/examples/xmlrpc/Makefile new file mode 100644 index 0000000000..9fa03bf7ee --- /dev/null +++ b/apps/examples/xmlrpc/Makefile @@ -0,0 +1,106 @@ +############################################################################ +# apps/examples/xmlrpc/Makefile +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. +# +# Authors: Max Holtzberg +# Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# XML RPC built-in application info + +APPNAME = xmlrpc +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 + +ASRCS = +CSRCS = xmlrpc_main.c calls.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(WINTOOL),y) + BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}" +else + BIN = "$(APPDIR)/libapps$(LIBEXT)" +endif + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: clean depend distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $(BIN), $${obj}); \ + done ; ) + @touch .built + +.context: +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + @touch $@ +endif + +context: .context + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f *.o *~ .*.swp .built + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/apps/examples/xmlrpc/calls.c b/apps/examples/xmlrpc/calls.c new file mode 100644 index 0000000000..bda164f4d3 --- /dev/null +++ b/apps/examples/xmlrpc/calls.c @@ -0,0 +1,122 @@ +/**************************************************************************** + * apps/examples/xmlrpc/calls.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Based on the embeddable lightweight XML-RPC server code discussed + * in the article at: http://www.drdobbs.com/web-development/\ + * an-embeddable-lightweight-xml-rpc-server/184405364 + * + * Copyright (c) 2002 Cogito LLC. All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, is hereby granted without fee provided + * that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * 3. Neither the name of Cogito LLC nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int calls_get_device_stats(struct xmlrpc_s *xmlcall); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +struct xmlrpc_entry_s get_device_stats = +{ + .name = "get_device_stats", + .func = calls_get_device_stats +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int calls_get_device_stats(struct xmlrpc_s *xmlcall) +{ + char username[80], password[80]; + char lastCommand[80], curState[80]; + int request = 0, status, ret; + + do + { + ret = xmlrpc_getstring(xmlcall, username); + if (ret != XMLRPC_NO_ERROR) + { + break; + } + + ret = xmlrpc_getstring(xmlcall, password); + if (ret != XMLRPC_NO_ERROR) + { + break; + } + + ret = xmlrpc_getinteger(xmlcall, &request); + if (ret != XMLRPC_NO_ERROR) + { + break; + } + } + while (0); + + if (ret == XMLRPC_NO_ERROR) + { + /* Dummy up some data... */ + + status = 1; + strcpy(lastCommand, "reboot"); + strcpy(curState, "Normal Operation"); + + ret = xmlrpc_buildresponse(xmlcall, "{iss}", + "status", status, + "lastCommand", lastCommand, + "currentState", curState); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +void calls_register(void) +{ + xmlrpc_register(&get_device_stats); +} diff --git a/apps/examples/xmlrpc/xmlrpc_main.c b/apps/examples/xmlrpc/xmlrpc_main.c new file mode 100644 index 0000000000..5f5ce5f06a --- /dev/null +++ b/apps/examples/xmlrpc/xmlrpc_main.c @@ -0,0 +1,419 @@ +/**************************************************************************** + * apps/examples/xmlrpc/xmlrpc_main.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Based on the embeddable lightweight XML-RPC server code discussed + * in the article at: http://www.drdobbs.com/web-development/\ + * an-embeddable-lightweight-xml-rpc-server/184405364 + * + * Copyright (c) 2002 Cogito LLC. All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, is hereby granted without fee provided + * that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * 3. Neither the name of Cogito LLC nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/* + * Lightweight Embedded XML-RPC Server main + * + * mtj@cogitollc.com + * + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC +# include +#endif + +/* Here we include the header file for the application(s) we use in + * our project as defined in the config//defconfig file + */ + +/* DHCPC may be used in conjunction with any other feature (or not) */ + +#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC +# include +# include +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const char *notimplemented = { "HTTP/1.1 501 Not Implemented\n\n" }; +static const char *separator = { "\015\012\015\012" }; + +/**************************************************************************** + * External Function Prototypes + ****************************************************************************/ + +extern void calls_register(void); + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: xmlrpc_findbody + * + * Description: + * Find the message body of an HTTP Request Message + * + ****************************************************************************/ + +static char *xmlrpc_findbody(char *buf) +{ + char *temp; + + temp = strstr(buf, separator); + + if (temp == NULL) + { + return NULL; + } + else + { + return temp + 4; + } +} + +/**************************************************************************** + * Name: xmlrpc_getheader + * + * Description: + * Find the HTTP header and return it's value. + * + ****************************************************************************/ + +static int xmlrpc_getheader(char *buffer, char *header, char *value, int size) +{ + char *temp; + int i = 0; + + temp = strstr(buffer, header); + if (temp) + { + /* Skip the header element */ + + temp += strlen(header); + + /* Skip any white-space */ + + while (*temp == ' ') + { + temp++; + } + + /* Copy the rest to the value parameter */ + + while ((*temp != ' ') && (*temp != '\n') && (i < size)) + { + value[i++] = *temp++; + } + + value[i] = 0; + return i; + } + + return -1; +} + +/**************************************************************************** + * Name: xmlrpc_handler + * + * Description: + * Parse and handle the current HTTP request message. + * + ****************************************************************************/ + +static void xmlrpc_handler(int fd) +{ + fd_set rfds; + struct timeval tv; + int ret, len, max = 0, loadlen = -1; + char buffer[CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE] = { 0 }; + char value[CONFIG_XMLRPC_STRINGSIZE + 1]; + char *temp; + + /* Read in the Request Header */ + + do + { + FD_ZERO(&rfds); + FD_SET(fd, &rfds); + + tv.tv_sec = 1; + tv.tv_usec = 0; + + ndbg("[%d] select...\n", fd); + ret = select(fd + 1, &rfds, NULL, NULL, &tv); + ndbg("[%d] data ready\n", fd); + + if (ret > 0) + { + if (FD_ISSET(fd, &rfds)) + { + len = recv(fd, &buffer[max], 1024, 0); + ndbg("[%d] %d bytes received\n", fd, len); + + if (len > 0) + { + max += len; + buffer[max] = 0; + + ret = xmlrpc_getheader(buffer, "Content-Length:", value, + CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE); + if (ret > 0) + loadlen = atoi(value); + } + else + { + ret = -1; + break; + } + } + } + else + { + /* Timeout... */ + + ndbg("[%d] timeout\n", fd); + ret = -1; + break; + } + + temp = strstr(buffer, separator); + + if (temp) + { + if (strlen(temp) - 4 == loadlen) + break; + } + + } + while (1); + + /* Determine request */ + + if (!strncmp(buffer, "POST", 4)) + { + temp = xmlrpc_findbody(buffer); + xmlrpc_parse(fd, temp); + } + else + { + write(fd, notimplemented, strlen(notimplemented)); + } +} + +/**************************************************************************** + * Name: xmlrpc_netinit + * + * Description: + * Setup network configuration. + * + ****************************************************************************/ + +static int xmlrpc_netinit(void) +{ + /* If this task is excecutated as an NSH built-in function, then the network + * has already been configured by NSH's start-up logic. + */ + +#ifndef CONFIG_NSH_BUILTIN_APPS + struct in_addr addr; +#if defined(CONFIG_EXAMPLES_XMLRPC_DHCPC) || defined(CONFIG_EXAMPLES_XMLRPC_NOMAC) + uint8_t mac[IFHWADDRLEN]; +#endif +#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC + void *handle; +#endif + +/* Many embedded network interfaces must have a software assigned MAC */ + +#ifdef CONFIG_EXAMPLES_XMLRPC_NOMAC + mac[0] = 0x00; + mac[1] = 0xe0; + mac[2] = 0xde; + mac[3] = 0xad; + mac[4] = 0xbe; + mac[5] = 0xef; + uip_setmacaddr("eth0", mac); +#endif + + /* Set up our host address */ + +#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC + addr.s_addr = 0; +#else + addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_IPADDR); +#endif + uip_sethostaddr("eth0", &addr); + + /* Set up the default router address */ + + addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_DRIPADDR); + uip_setdraddr("eth0", &addr); + + /* Setup the subnet mask */ + + addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_NETMASK); + uip_setnetmask("eth0", &addr); + +#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC + /* Set up the resolver */ + + resolv_init(); + + /* Get the MAC address of the NIC */ + + uip_getmacaddr("eth0", mac); + + /* Set up the DHCPC modules */ + + handle = dhcpc_open(&mac, IFHWADDRLEN); + + /* Get an IP address. Note: there is no logic here for renewing the address + * in this example. The address should be renewed in ds.lease_time/2 + * seconds. + */ + + printf("Getting IP address\n"); + if (handle) + { + struct dhcpc_state ds; + (void)dhcpc_request(handle, &ds); + uip_sethostaddr("eth1", &ds.ipaddr); + + if (ds.netmask.s_addr != 0) + { + uip_setnetmask("eth0", &ds.netmask); + } + + if (ds.default_router.s_addr != 0) + { + uip_setdraddr("eth0", &ds.default_router); + } + + if (ds.dnsaddr.s_addr != 0) + { + resolv_conf(&ds.dnsaddr); + } + + dhcpc_close(handle); + printf("IP: %s\n", inet_ntoa(ds.ipaddr)); + } + +#endif /* CONFIG_EXAMPLES_XMLRPC_DHCPC */ +#endif /* CONFIG_NSH_BUILTIN_APPS */ + + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: xmlrpc_main + * + * Description: + * The embedded HTTP server main + * + ****************************************************************************/ + +int xmlrpc_main(int argc, char *argv[]) +{ + int listenfd, connfd, on = 1; + socklen_t clilen; + struct sockaddr_in cliaddr, servaddr; + + if (xmlrpc_netinit() < 0) + { + ndbg("Could not initialize the network interface\n"); + return ERROR; + } + + /* Register RPC functions. */ + + calls_register(); + + listenfd = socket(AF_INET, SOCK_STREAM, 0); + + setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); + + bzero((void *)&servaddr, sizeof(servaddr)); + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(80); + + bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)); + + listen(listenfd, 5); + + for (;;) + { + clilen = sizeof(cliaddr); + connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &clilen); + if (connfd <= 0) + { + break; + } + ndbg("Connection accepted: %d\n", connfd); + + xmlrpc_handler(connfd); + close(connfd); + ndbg("[%d] connection closed\n", connfd); + } + + close(listenfd); + return (0); +} diff --git a/apps/include/netutils/xmlrpc.h b/apps/include/netutils/xmlrpc.h new file mode 100644 index 0000000000..3136e35eff --- /dev/null +++ b/apps/include/netutils/xmlrpc.h @@ -0,0 +1,123 @@ +/**************************************************************************** + * apps/include/netutils/xmlrpc.h + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Based on the embeddable lightweight XML-RPC server code discussed + * in the article at: http://www.drdobbs.com/web-development/\ + * an-embeddable-lightweight-xml-rpc-server/184405364 + * + * Copyright (c) 2002 Cogito LLC. All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, is hereby granted without fee provided + * that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * 3. Neither the name of Cogito LLC nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/* + * Lightweight Embedded XML-RPC Server Types and Definitions + * + * mtj@cogitollc.com + * + */ + +#ifndef __APPS_INCLUDE_NETUTILS_XMLRPC_H +#define __APPS_INCLUDE_NETUTILS_XMLRPC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Error definitions. */ + +#define XMLRPC_NO_ERROR (0) +#define XMLRPC_PARSE_ERROR (-1) +#define XMLRPC_NO_SUCH_FUNCTION (-2) +#define XMLRPC_UNEXPECTED_INTEGER_ARG (-3) +#define XMLRPC_UNEXPECTED_BOOLEAN_ARG (-4) +#define XMLRPC_UNEXPECTED_DOUBLE_ARG (-5) +#define XMLRPC_UNEXPECTED_STRING_ARG (-6) +#define XMLRPC_BAD_RESPONSE_ARG (-7) +#define XMLRPC_INTERNAL_ERROR (-99) + +#define MAX_ARGS 10 +#define MAX_RESPONSE 2048 + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +struct xmlrpc_arg_s +{ + union + { + int i; + char boolean; + double d; + char string[CONFIG_XMLRPC_STRINGSIZE+1]; + } u; +}; + +struct xmlrpc_s +{ + char name[CONFIG_XMLRPC_STRINGSIZE+1]; + struct xmlrpc_arg_s arguments[MAX_ARGS]; + char args[MAX_ARGS]; + int argsize; + int arg; + char response[MAX_RESPONSE]; + int error; +}; + +struct xmlrpc_entry_s +{ + struct xmlrpc_entry_s *next; + int (*func)(struct xmlrpc_s*); + char *name; +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +void xmlrpc_register(struct xmlrpc_entry_s *call); +int xmlrpc_parse(int sock, char *buffer); +int xmlrpc_getinteger(struct xmlrpc_s *xmlcall, int *arg); +int xmlrpc_getbool(struct xmlrpc_s *xmlcall, int *arg); +int xmlrpc_getdouble(struct xmlrpc_s *xmlcall, double *arg); +int xmlrpc_getstring(struct xmlrpc_s *xmlcall, char *arg); +int xmlrpc_buildresponse(struct xmlrpc_s *, char *, ...); + +#endif /* __APPS_INCLUDE_NETUTILS_XMLRPC_H */ diff --git a/apps/netutils/Kconfig b/apps/netutils/Kconfig index aa0f14963b..4141e5b031 100644 --- a/apps/netutils/Kconfig +++ b/apps/netutils/Kconfig @@ -56,3 +56,7 @@ endmenu menu "UDP Discovery Utility" source "$APPSDIR/netutils/discover/Kconfig" endmenu + +menu "XML-RPC library" +source "$APPSDIR/netutils/xmlrpc/Kconfig" +endmenu diff --git a/apps/netutils/Make.defs b/apps/netutils/Make.defs index f957009b50..ae72ab0fd6 100644 --- a/apps/netutils/Make.defs +++ b/apps/netutils/Make.defs @@ -85,3 +85,7 @@ endif ifeq ($(CONFIG_NETUTILS_DISCOVER),y) CONFIGURED_APPS += netutils/discover endif + +ifeq ($(CONFIG_NETUTILS_XMLRPC),y) +CONFIGURED_APPS += netutils/xmlrpc +endif diff --git a/apps/netutils/Makefile b/apps/netutils/Makefile index 03261c7a34..058b0f6294 100644 --- a/apps/netutils/Makefile +++ b/apps/netutils/Makefile @@ -39,7 +39,7 @@ ifeq ($(CONFIG_NET),y) SUBDIRS = uiplib dhcpc dhcpd discover ftpc ftpd resolv smtp telnetd -SUBDIRS += webclient webserver tftpc thttpd +SUBDIRS += webclient webserver tftpc thttpd xmlrpc endif all: nothing diff --git a/apps/netutils/README.txt b/apps/netutils/README.txt index 231cf62c18..73e6689fec 100644 --- a/apps/netutils/README.txt +++ b/apps/netutils/README.txt @@ -66,6 +66,8 @@ highly influenced by uIP) include: CONFIGURED_APPS += uiplib CONFIGURED_APPS += thttpd + xmlrpc - The Embeddable Lightweight XML-RPC Server discussed at + http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364 Tips for Using Telnetd ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/apps/netutils/xmlrpc/Kconfig b/apps/netutils/xmlrpc/Kconfig new file mode 100644 index 0000000000..6765bda077 --- /dev/null +++ b/apps/netutils/xmlrpc/Kconfig @@ -0,0 +1,23 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config NETUTILS_XMLRPC + bool "XML RPC library" + default n + depends on NET_TCP + select NETUTILS_UIPLIB + ---help--- + Enables the Embeddable Lightweight XML-RPC Server discussed at + http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364 + +if NETUTILS_XMLRPC + +config XMLRPC_STRINGSIZE + int "Maximum string length" + default 64 + ---help--- + Maximum string length for method names and XML RPC string values. + +endif diff --git a/apps/netutils/xmlrpc/Makefile b/apps/netutils/xmlrpc/Makefile new file mode 100644 index 0000000000..903506f46a --- /dev/null +++ b/apps/netutils/xmlrpc/Makefile @@ -0,0 +1,99 @@ +############################################################################ +# apps/netutils/xmlrpc/Makefile +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# +# Authors: Max Holtzberg +# Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + + +ASRCS = +CSRCS = + +ifeq ($(CONFIG_NET_TCP),y) +CSRCS += xmlparser.c response.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(WINTOOL),y) + BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}" +else + BIN = "$(APPDIR)/libapps$(LIBEXT)" +endif + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: context depend clean distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $(BIN), $${obj}); \ + done ; ) + @touch .built + +context: + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f *.o *~ .*.swp .built + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep diff --git a/apps/netutils/xmlrpc/response.c b/apps/netutils/xmlrpc/response.c new file mode 100644 index 0000000000..2ae7414a77 --- /dev/null +++ b/apps/netutils/xmlrpc/response.c @@ -0,0 +1,287 @@ +/**************************************************************************** + * apps/netutils/xmlrpc/response.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Based on the embeddable lightweight XML-RPC server code discussed + * in the article at: http://www.drdobbs.com/web-development/\ + * an-embeddable-lightweight-xml-rpc-server/184405364 + * + * Copyright (c) 2002 Cogito LLC. All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, is hereby granted without fee provided + * that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * 3. Neither the name of Cogito LLC nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/* + * Lightweight Embedded XML-RPC Server Response Generator + * + * mtj@cogitollc.com + * + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int xmlrpc_insertlength(struct xmlrpc_s * xmlcall) +{ + int len, digit, xdigit = 1000, i = 0; + char *temp; + + temp = strstr(xmlcall->response, "response, "xyza"); + + do + { + digit = (len / xdigit); + len -= (digit * xdigit); + xdigit /= 10; + + if ((digit == 0) && (xdigit > 1)) + temp[i++] = ' '; + else + temp[i++] = (0x30 + digit); + } + while (i < 4); + + return 0; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +int xmlrpc_getinteger(struct xmlrpc_s * xmlcall, int *arg) +{ + if ((xmlcall == NULL) || (arg == NULL)) + { + return XMLRPC_INTERNAL_ERROR; + } + + if ((xmlcall->arg < xmlcall->argsize) && + (xmlcall->args[xmlcall->arg] == 'i')) + { + *arg = xmlcall->arguments[xmlcall->arg++].u.i; + return 0; + } + + return XMLRPC_UNEXPECTED_INTEGER_ARG; +} + +int xmlrpc_getbool(struct xmlrpc_s * xmlcall, int *arg) +{ + if ((xmlcall == NULL) || (arg == NULL)) + { + return XMLRPC_INTERNAL_ERROR; + } + + if ((xmlcall->arg < xmlcall->argsize) && + (xmlcall->args[xmlcall->arg] == 'b')) + { + *arg = xmlcall->arguments[xmlcall->arg++].u.i; + return 0; + } + + return XMLRPC_UNEXPECTED_BOOLEAN_ARG; +} + +int xmlrpc_getdouble(struct xmlrpc_s * xmlcall, double *arg) +{ + if ((xmlcall == NULL) || (arg == NULL)) + { + return XMLRPC_INTERNAL_ERROR; + } + + if ((xmlcall->arg < xmlcall->argsize) && + (xmlcall->args[xmlcall->arg] == 'd')) + { + *arg = xmlcall->arguments[xmlcall->arg++].u.d; + return 0; + } + + return XMLRPC_UNEXPECTED_DOUBLE_ARG; +} + +int xmlrpc_getstring(struct xmlrpc_s* xmlcall, char *arg) +{ + if ((xmlcall == NULL) || (arg == NULL)) + { + return XMLRPC_INTERNAL_ERROR; + } + + if ((xmlcall->arg < xmlcall->argsize) && + (xmlcall->args[xmlcall->arg] == 's')) + { + strcpy(arg, xmlcall->arguments[xmlcall->arg++].u.string); + return 0; + } + + return XMLRPC_UNEXPECTED_STRING_ARG; +} + +int xmlrpc_buildresponse(struct xmlrpc_s* xmlcall, char *args, ...) +{ + va_list argp; + int i, ret = 0, index = 0, close = 0; + double d; + char *s; + int isStruct = 0; + + if ((xmlcall == NULL) || (args == NULL)) + { + return -1; + } + + strcpy(xmlcall->response, "HTTP/1.1 200 OK\n" + "Connection: close\n" + "Content-length: xyza\n" + "Content-Type: text/xml\n" + "Server: Lightweight XMLRPC\n\n" + "\n" "\n"); + + if (xmlcall->error) + { + strcat(&xmlcall->response[strlen(xmlcall->response)], " \n"); + } + else + { + strcat(&xmlcall->response[strlen(xmlcall->response)], + " \n"); + } + + va_start(argp, args); + + while (args[index]) + { + if (isStruct) + { + if ((args[index] != '{') && (args[index] != '}')) + { + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " \n"); + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " %s\n", va_arg(argp, char *)); + close = 1; + } + } + + switch (args[index]) + { + case '{': + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " \n"); + isStruct = 1; + break; + + case '}': + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " \n"); + isStruct = 0; + break; + + case 'i': + i = va_arg(argp, int); + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " %d\r\n", i); + break; + + case 'b': + i = va_arg(argp, int); + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " %d\r\n", i); + break; + + case 'd': + d = va_arg(argp, double); + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " %f\r\n", d); + break; + + case 's': + s = va_arg(argp, char *); + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " %s\r\n", s); + break; + + default: + return (XMLRPC_BAD_RESPONSE_ARG); + break; + + } + + if (close) + { + sprintf(&xmlcall->response[strlen(xmlcall->response)], + " \n"); + close = 0; + } + + index++; + } + + va_end(argp); + + if (xmlcall->error) + { + strcat(&xmlcall->response[strlen(xmlcall->response)], " \r\n"); + } + else + { + strcat(&xmlcall->response[strlen(xmlcall->response)], + " \r\n"); + } + + if (ret == 0) + { + strcat(&xmlcall->response[strlen(xmlcall->response)], + "\r\n"); + + xmlrpc_insertlength(xmlcall); + } + else + { + xmlcall->response[0] = 0; + } + + return ret; +} diff --git a/apps/netutils/xmlrpc/xmlparser.c b/apps/netutils/xmlrpc/xmlparser.c new file mode 100644 index 0000000000..72387a08ed --- /dev/null +++ b/apps/netutils/xmlrpc/xmlparser.c @@ -0,0 +1,416 @@ +/**************************************************************************** + * apps/netutils/xmlrpc/xmlparser.c + * + * Copyright (C) 2012 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * Based on the embeddable lightweight XML-RPC server code discussed + * in the article at: http://www.drdobbs.com/web-development/\ + * an-embeddable-lightweight-xml-rpc-server/184405364 + * + * Copyright (c) 2002 Cogito LLC. All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, is hereby granted without fee provided + * that the following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * 3. Neither the name of Cogito LLC nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY COGITO LLC AND CONTRIBUTERS 'AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COGITO LLC + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARAY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/* + * Lightweight Embedded XML-RPC Server XML Parser + * + * mtj@cogitollc.com + * + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define TAG 0 +#define VALUE 1 +#define DONE 2 + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct xmlrpc_s g_xmlcall; +static char g_data[CONFIG_XMLRPC_STRINGSIZE+1]; +static struct xmlrpc_entry_s *g_entries = NULL; + +static const char *errorStrings[] = +{ + /* 0 */ "Internal error (unknown)", + /* 1 */ "Parse Error...", + /* 2 */ "Function not found...", + /* 3 */ "Unexpected Integer Argument...", + /* 4 */ "Unexpected Boolean Argument...", + /* 5 */ "Unexpected Double Argument...", + /* 6 */ "Unexpected String Argument...", + /* 7 */ "Bad Response Argument..." +}; + +#define MAX_ERROR_CODE (sizeof(errorStrings)/sizeof(char *)) + +struct parsebuf_s +{ + char *buf; + int len; + int index; +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int xmlrpc_call(struct xmlrpc_s * call) +{ + int ret = XMLRPC_NO_SUCH_FUNCTION; + struct xmlrpc_entry_s *entry = g_entries; + + while (entry != NULL) + { + if (strcmp(call->name, entry->name) == 0) + { + ret = entry->func(call); + break; + } + else + { + entry = entry->next; + } + } + + return ret; +} + +static int xmlrpc_getelement(struct parsebuf_s * pbuf, char *data, int dataSize) +{ + int j = 0; + int ret = XMLRPC_NO_ERROR; + + while (!isprint(pbuf->buf[pbuf->index])) + { + pbuf->index++; + } + + if (pbuf->index >= pbuf->len) + { + return DONE; + } + + if (pbuf->buf[pbuf->index] == '<') + { + ret = TAG; + } + else + { + ret = VALUE; + } + + data[j++] = pbuf->buf[pbuf->index++]; + + while (j < dataSize) + { + if (pbuf->buf[pbuf->index] == '>') + { + data[j++] = pbuf->buf[pbuf->index++]; + break; + } + else if ((pbuf->buf[pbuf->index] == '\n') || + (pbuf->buf[pbuf->index] == '<')) + { + break; + } + else + { + data[j++] = pbuf->buf[pbuf->index++]; + if (j >= dataSize) + ret = XMLRPC_PARSE_ERROR; + } + } + + data[j] = 0; + return ret; +} + +static int xmlrpc_parseparam(struct parsebuf_s * pbuf) +{ + int type; + + /* Next, we need a tag */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (!((type == TAG) && (!strncmp(g_data, "", 7)))) + { + return XMLRPC_PARSE_ERROR; + } + + /* Now we get a variable tag, the type of the value */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (type != TAG) + { + return XMLRPC_PARSE_ERROR; + } + + if (!strncmp(g_data, "", 4)) + { + g_xmlcall.args[g_xmlcall.argsize] = 'i'; + } + else if (!strncmp(g_data, "", 5)) + { + g_xmlcall.args[g_xmlcall.argsize] = 'i'; + } + else if (!strncmp(g_data, "", 9)) + { + g_xmlcall.args[g_xmlcall.argsize] = 'b'; + } + else if (!strncmp(g_data, "", 8)) + { + g_xmlcall.args[g_xmlcall.argsize] = 'd'; + } + else if (!strncmp(g_data, "", 8)) + { + g_xmlcall.args[g_xmlcall.argsize] = 's'; + } + else + { + return XMLRPC_PARSE_ERROR; + } + + /* Now, parse the actual value */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (type != VALUE) + { + return XMLRPC_PARSE_ERROR; + } + + switch (g_xmlcall.args[g_xmlcall.argsize]) + { + case 'i': + case 'b': + g_xmlcall.arguments[g_xmlcall.argsize].u.i = atoi(g_data); + break; + case 'd': + g_xmlcall.arguments[g_xmlcall.argsize].u.d = atof(g_data); + break; + case 's': + strcpy(g_xmlcall.arguments[g_xmlcall.argsize].u.string, g_data); + break; + default: + return XMLRPC_PARSE_ERROR; + } + + g_xmlcall.argsize++; + + /* Now we close out the tag, starting with the type */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (!((type == TAG) && (!strncmp(g_data, " close */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (!((type == TAG) && (!strncmp(g_data, "", 8)))) + { + return XMLRPC_PARSE_ERROR; + } + + /* Finally, close out the tag */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (!((type == TAG) && (!strncmp(g_data, "", 8)))) + { + return XMLRPC_PARSE_ERROR; + } + + return XMLRPC_NO_ERROR; +} + +static int xmlrpc_parseparams(struct parsebuf_s * pbuf) +{ + int type, ret = XMLRPC_PARSE_ERROR; + + /* First, look for the params tag */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 8))) + { + while (1) + { + /* Get next tag */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 7))) + { + ret = xmlrpc_parseparam(pbuf); + } + else if ((type == TAG) && (!strncmp(g_data, "", 9))) + { + return XMLRPC_NO_ERROR; + } + else + { + return XMLRPC_PARSE_ERROR; + } + } + } + + return ret; +} + +static int xmlrpc_parsemethod(struct parsebuf_s * pbuf) +{ + int type, ret = XMLRPC_PARSE_ERROR; + + bzero((void *)&g_xmlcall, sizeof(struct xmlrpc_s)); + + /* Look for the methodName tag */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 12))) + { + /* Get the method name for the call */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if (type == VALUE) + { + /* Save the method name */ + + strcpy(g_xmlcall.name, g_data); + + /* Find the closing /methodCall */ + + type = xmlrpc_getelement(pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 13))) + { + /* Now, it's time to parse the parameters */ + + ret = xmlrpc_parseparams(pbuf); + } + } + } + + return ret; +} + +static void xmlrpc_sendfault(int fault) +{ + fault = -fault; + if (fault >= MAX_ERROR_CODE) + { + fault = 0; + } + + xmlrpc_buildresponse(&g_xmlcall, "{is}", + "faultCode", fault, "faultString", errorStrings[fault]); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +int xmlrpc_parse(int sock, char *buffer) +{ + struct parsebuf_s pbuf; + int type; + int ret = XMLRPC_PARSE_ERROR; + + pbuf.buf = buffer; + pbuf.len = strlen(buffer); + pbuf.index = 0; + + /* Parse the xml header tag */ + + type = xmlrpc_getelement(&pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 12))) + { + /* Parse the remaining tags within the methodCall tag */ + + xmlrpc_parsemethod(&pbuf); + + /* Check for the closing /methodCall */ + + type = xmlrpc_getelement(&pbuf, g_data, CONFIG_XMLRPC_STRINGSIZE); + if ((type == TAG) && (!strncmp(g_data, "", 13))) + { + /* Successful parse, try to call a user function */ + + ret = xmlrpc_call(&g_xmlcall); + } + } + } + + if (ret == 0) + { + write(sock, g_xmlcall.response, strlen(g_xmlcall.response)); + } + else + { + /* Send fault response */ + + g_xmlcall.error = 1; + xmlrpc_sendfault(ret); + write(sock, g_xmlcall.response, strlen(g_xmlcall.response)); + } + + return ret; +} + +void xmlrpc_register(struct xmlrpc_entry_s *entry) +{ + if (g_entries == NULL) + { + g_entries = entry; + entry->next = NULL; + } + else + { + entry->next = g_entries; + g_entries = entry; + } +} diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 1375bea434..b6817eab23 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3341,4 +3341,11 @@ is enabled and (2) some data was obtained from read-ahead buffers. Blocking is a bad idea in that case because there is no timeout! (submitted by Max Holtzberg). - + * configs/stm3240g-eval/xmlrpc: An example configuration for the + Embeddable Lightweight XML-RPC Server at apps/examples/xmlrpc. + See http://www.drdobbs.com/web-development/\ + an-embeddable-lightweight-xml-rpc-server/184405364 for more info. + Contributed by Max Holtzberg. + * configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for + bugs that crept in during recent changes. (Submitted by Max + Holtzberg). diff --git a/nuttx/Makefile b/nuttx/Makefile index 0f3413cb1e..375538919b 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -603,7 +603,7 @@ distclean: clean subdir_distclean clean_context ifeq ($(CONFIG_BUILD_2PASS),y) @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif - @rm -f Make.defs setenv.sh .config + @rm -f Make.defs setenv.sh .config .config.old # Application housekeeping targets. The APPDIR variable refers to the user # application directory. A sample apps/ directory is included with NuttX, diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 6b2ac39d3f..b5d0306dab 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -1670,6 +1670,12 @@ config STM32_MII_MCO2 ---help--- Use MCO2 to clock the MII interface. Default: Use MC01 +config STM32_MII_EXTCLK + bool "External MII clock" + ---help--- + Clocking is provided by external logic. Don't use MCO for MII + clock. Default: Use MC0[1] + endchoice config STM32_AUTONEG @@ -1746,6 +1752,38 @@ config STM32_RMII default y if !STM32_MII depends on STM32_ETHMAC +choice + prompt "RMII clock configuration" + default STM32_RMII_MCO if STM32_STM32F10XX + default STM32_RMII_MCO1 if STM32_STM32F20XX || STM32_STM32F40XX + depends on STM32_RMII + +config STM32_RMII_MCO + bool "Use MC0 as RMII clock" + depends on STM32_STM32F10XX + ---help--- + Use MCO to clock the RMII interface. Default: Use MC0 + +config STM32_RMII_MCO1 + bool "Use MC01 as RMII clock" + depends on (STM32_STM32F20XX || STM32_STM32F40XX) + ---help--- + Use MCO1 to clock the RMII interface. Default: Use MC01 + +config STM32_RMII_MCO2 + bool "Use MC02 as RMII clock" + depends on (STM32_STM32F20XX || STM32_STM32F40XX) + ---help--- + Use MCO2 to clock the RMII interface. Default: Use MC01 + +config STM32_RMII_EXTCLK + bool "External RMII clock" + ---help--- + Clocking is provided by external logic. Don't use MCO for RMII + clock. Default: Use MC0[1] + +endchoice + menu "USB Host Configuration" config STM32_OTGFS_RXFIFO_SIZE diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c index 4493983ade..59f3def7f6 100644 --- a/nuttx/arch/arm/src/stm32/stm32_eth.c +++ b/nuttx/arch/arm/src/stm32/stm32_eth.c @@ -103,15 +103,30 @@ #ifdef CONFIG_STM32_MII # if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) -# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) -# warning "Neither CONFIG_STM32_MII_MCO1 nor CONFIG_STM32_MII_MCO2 defined" +# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) && !defined(CONFIG_STM32_MII_EXTCLK) +# warning "Neither CONFIG_STM32_MII_MCO1, CONFIG_STM32_MII_MCO2, nor CONFIG_STM32_MII_EXTCLK defined" # endif # if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2) # error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined" # endif # elif defined(CONFIG_STM32_CONNECTIVITYLINE) -# if !defined(CONFIG_STM32_MII_MCO) -# warning "CONFIG_STM32_MII_MCO not defined" +# if !defined(CONFIG_STM32_MII_MCO) && !defined(CONFIG_STM32_MII_EXTCLK) +# warning "Neither CONFIG_STM32_MII_MCO nor CONFIG_STM32_MII_EXTCLK defined" +# endif +# endif +#endif + +#ifdef CONFIG_STM32_RMII +# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) +# if !defined(CONFIG_STM32_RMII_MCO1) && !defined(CONFIG_STM32_RMII_MCO2) && !defined(CONFIG_STM32_RMII_EXTCLK) +# warning "Neither CONFIG_STM32_RMII_MCO1, CONFIG_STM32_RMII_MCO2, nor CONFIG_STM32_RMII_EXTCLK defined" +# endif +# if defined(CONFIG_STM32_RMII_MCO1) && defined(CONFIG_STM32_RMII_MCO2) +# error "Both CONFIG_STM32_RMII_MCO1 and CONFIG_STM32_RMII_MCO2 defined" +# endif +# elif defined(CONFIG_STM32_CONNECTIVITYLINE) +# if !defined(CONFIG_STM32_RMII_MCO) && !defined(CONFIG_STM32_RMII_EXTCLK) +# warning "Neither CONFIG_STM32_RMII_MCO nor CONFIG_STM32_RMII_EXTCLK defined" # endif # endif #endif @@ -2735,17 +2750,42 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv) #elif defined(CONFIG_STM32_RMII) - /* Setup MCO pin for alternative usage */ - -#if defined(CONFIG_STM32_MII_MCO) - stm32_configgpio(GPIO_MCO); - stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE); -#endif - /* Select the RMII interface */ stm32_selectrmii(); + /* Provide clocking via MCO, MCO1 or MCO2: + * + * "MCO1 (microcontroller clock output), used to output HSI, LSE, HSE or PLL + * clock (through a configurable prescaler) on PA8 pin." + * + * "MCO2 (microcontroller clock output), used to output HSE, PLL, SYSCLK or + * PLLI2S clock (through a configurable prescaler) on PC9 pin." + */ + +# if defined(CONFIG_STM32_RMII_MCO1) + /* Configure MC01 to drive the PHY. Board logic must provide MC01 clocking + * info. + */ + + stm32_configgpio(GPIO_MCO1); + stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER); + +# elif defined(CONFIG_STM32_RMII_MCO2) + /* Configure MC02 to drive the PHY. Board logic must provide MC02 clocking + * info. + */ + + stm32_configgpio(GPIO_MCO2); + stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER); + +# elif defined(CONFIG_STM32_RMII_MCO) + /* Setup MCO pin for alternative usage */ + + stm32_configgpio(GPIO_MCO); + stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE); +# endif + /* RMII interface pins (7): * * RMII_TXD[1:0], RMII_TX_EN, RMII_RXD[1:0], RMII_CRS_DV, MDC, MDIO, diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 87c3e829a1..91e757cf1b 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -370,7 +370,7 @@ CONFIG_NET_MULTICAST=n CONFIG_STM32_PHYADDR=1 CONFIG_STM32_MII=n CONFIG_STM32_RMII=y -CONFIG_STM32_MII_MCO=y +CONFIG_STM32_RMII_MCO=y CONFIG_STM32_AUTONEG=y #CONFIG_STM32_ETHFD #CONFIG_STM32_ETH100MB diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig index 84c2f713ee..4ce5a70c68 100644 --- a/nuttx/configs/sim/nxwm/defconfig +++ b/nuttx/configs/sim/nxwm/defconfig @@ -67,7 +67,7 @@ CONFIG_SIM_TOUCHSCREEN=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_USER_ENTRYPOINT="user_start" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=y diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index a6452094cd..681f8c7661 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -256,7 +256,7 @@ CONFIG_HAVE_LIBM=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_USER_ENTRYPOINT="user_start" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=n diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index e0238f4def..9193b94500 100644 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -1320,3 +1320,11 @@ Where is one of the following: use NSH, then you don't care about this. This test is good for testing the Telnet daemon only because it works in a simpler environment than does the nsh configuration. + + xmlrpc + ------ + + An example configuration for the Embeddable Lightweight XML-RPC + Server at apps/examples/xmlrpc. See http://www.drdobbs.com/web-development/\ + an-embeddable-lightweight-xml-rpc-server/184405364 for more info. + Contributed by Max Holtzberg. \ No newline at end of file diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 6e891f3421..8252f53712 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -262,7 +262,7 @@ CONFIG_HAVE_LIBM=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_USER_ENTRYPOINT="user_start" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=n diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/Make.defs b/nuttx/configs/stm3240g-eval/xmlrpc/Make.defs new file mode 100644 index 0000000000..0a97a215da --- /dev/null +++ b/nuttx/configs/stm3240g-eval/xmlrpc/Make.defs @@ -0,0 +1,198 @@ +############################################################################ +# configs/stm3240g-eval/xmlrpc/Make.defs +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk + +# Setup for the selected toolchain + +ifeq ($(CONFIG_STM32_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = + WINTOOL = y +ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard +else + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +endif +ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y) + # Atollic toolchain under Windows + CROSSDEV = arm-atollic-eabi- + ARCROSSDEV = arm-atollic-eabi- + WINTOOL = y +ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard +else + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +endif +ifeq ($(CONFIG_STM32_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + ARCROSSDEV = arm-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_RAISONANCE),y) + # Raisonance RIDE7 under Windows + CROSSDEV = arm-none-eabi- + ARCROSSDEV = arm-none-eabi- + WINTOOL = y + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft +endif +ifeq ($(CONFIG_STM32_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + ARCROSSDEV = arm-elf- + ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + MAXOPTIMIZATION = -Os +endif + +LDSCRIPT = ld.script + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" + MAXOPTIMIZATION = -O2 +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") + ARCHOPTIMIZATION = -g +else + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +define PREPROCESS + @echo "CPP: $1->$2" + @$(CPP) $(CPPFLAGS) $1 -o $2 +endef + +define COMPILE + @echo "CC: $1" + @$(CC) -c $(CFLAGS) $1 -o $2 +endef + +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + +define ASSEMBLE + @echo "AS: $1" + @$(CC) -c $(AFLAGS) $1 -o $2 +endef + +define ARCHIVE + echo "AR: $2"; \ + $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } +endef + +define CLEAN + @rm -f *.o *.a +endef + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe +HOSTLDFLAGS = + diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig new file mode 100644 index 0000000000..5c70327b9c --- /dev/null +++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig @@ -0,0 +1,866 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG=y +# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_ENABLE is not set +# CONFIG_DEBUG_SCHED is not set +# CONFIG_DEBUG_MM is not set +CONFIG_DEBUG_NET=y +# CONFIG_DEBUG_USB is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_GRAPHICS is not set +# CONFIG_DEBUG_I2C is not set +# CONFIG_DEBUG_SPI is not set +# CONFIG_DEBUG_WATCHDOG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_IMX is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_LM3S is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_SAM3U is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STR71X is not set +CONFIG_ARCH_CORTEXM4=y +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARCH_FPU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARMV7M_MPU is not set +CONFIG_ARCH_IRQPRIO=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +# CONFIG_ARCH_CALIBRATION is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_NET_MULTICAST is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F103RET6 is not set +# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set +# CONFIG_ARCH_CHIP_STM32F103VET6 is not set +# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set +# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +CONFIG_ARCH_CHIP_STM32F407IG=y +CONFIG_STM32_STM32F40XX=y +# CONFIG_STM32_CODESOURCERYW is not set +CONFIG_STM32_CODESOURCERYL=y +# CONFIG_STM32_ATOLLIC_LITE is not set +# CONFIG_STM32_ATOLLIC_PRO is not set +# CONFIG_STM32_DEVKITARM is not set +# CONFIG_STM32_RAISONANCE is not set +# CONFIG_STM32_BUILDROOT is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_BKPSRAM is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CCMDATARAM is not set +# CONFIG_STM32_CRYP is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_DCMI is not set +CONFIG_STM32_ETHMAC=y +# CONFIG_STM32_FSMC is not set +# CONFIG_STM32_HASH is not set +CONFIG_STM32_I2C1=y +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_I2C3 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_OTGFS is not set +# CONFIG_STM32_OTGHS is not set +CONFIG_STM32_PWR=y +# CONFIG_STM32_RNG is not set +# CONFIG_STM32_SDIO is not set +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +# CONFIG_STM32_TIM9 is not set +# CONFIG_STM32_TIM10 is not set +# CONFIG_STM32_TIM11 is not set +# CONFIG_STM32_TIM12 is not set +# CONFIG_STM32_TIM13 is not set +# CONFIG_STM32_TIM14 is not set +# CONFIG_STM32_USART1 is not set +# CONFIG_STM32_USART2 is not set +CONFIG_STM32_USART3=y +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_USART6 is not set +# CONFIG_STM32_WWDG is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCMEXCLUDE is not set + +# +# Ethernet MAC configuration +# +CONFIG_STM32_PHYADDR=1 +CONFIG_STM32_MII=y +CONFIG_STM32_MII_MCO1=y +# CONFIG_STM32_MII_MCO2 is not set +# CONFIG_STM32_MII_EXTCLK is not set +CONFIG_STM32_AUTONEG=y +CONFIG_STM32_PHYSR=16 +CONFIG_STM32_PHYSR_SPEED=0x0002 +CONFIG_STM32_PHYSR_100MBPS=0x0000 +CONFIG_STM32_PHYSR_MODE=0x0004 +CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004 +# CONFIG_STM32_ETH_PTP is not set + +# +# USB Host Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_STACKDUMP=y + +# +# Board Settings +# +CONFIG_DRAM_START=0x20000000 +CONFIG_DRAM_SIZE=196608 +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +# CONFIG_ARCH_INTERRUPTSTACK is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_STM3240G_EVAL=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm3240g-eval" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +# CONFIG_ARCH_BUTTONS is not set +CONFIG_ARCH_HAVE_IRQBUTTONS=y + +# +# Board-Specific Options +# + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=6 +CONFIG_DEV_CONSOLE=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +CONFIG_SCHED_WAITPID=y +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="xmlrpc_main" +# CONFIG_DISABLE_OS_API is not set + +# +# Sizes of configurable things (0 disables) +# +CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASK_ARGS=4 +CONFIG_NPTHREAD_KEYS=4 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_PREALLOC_TIMERS=4 + +# +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=4096 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 + +# +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +CONFIG_I2C_TRANSFER=y +# CONFIG_I2C_WRITEREAD is not set +CONFIG_I2C_POLLED=y +# CONFIG_I2C_TRACE is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_NETDEVICES is not set +# CONFIG_NET_SLIP is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_USART3=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_CONFIG_SERIAL_NPOLLWAITERS=2 +CONFIG_USART3_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART3 Configuration +# +CONFIG_USART3_RXBUFSIZE=128 +CONFIG_USART3_TXBUFSIZE=128 +CONFIG_USART3_BAUD=115200 +CONFIG_USART3_BITS=8 +CONFIG_USART3_PARITY=0 +CONFIG_USART3_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +CONFIG_NET=y +# CONFIG_NET_NOINTS is not set +CONFIG_NET_MULTIBUFFER=y +# CONFIG_NET_IPv6 is not set +CONFIG_NSOCKET_DESCRIPTORS=10 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +CONFIG_NET_BUFSIZE=650 +# CONFIG_NET_TCPURGDATA is not set +CONFIG_NET_TCP=y +CONFIG_NET_TCP_CONNS=40 +CONFIG_NET_MAX_LISTENPORTS=40 +CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=16 +CONFIG_NET_TCP_RECVDELAY=0 +CONFIG_NET_TCPBACKLOG=y +CONFIG_NET_UDP=y +CONFIG_NET_UDP_CHECKSUMS=y +CONFIG_NET_UDP_CONNS=8 +CONFIG_NET_BROADCAST=y +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y +# CONFIG_NET_PINGADDRCONF is not set +# CONFIG_NET_IGMP is not set +CONFIG_NET_STATISTICS=y +CONFIG_NET_RECEIVE_WINDOW=562 +CONFIG_NET_ARPTAB_SIZE=16 +CONFIG_NET_ARP_IPIN=y + +# +# File Systems +# + +# +# File system configuration +# +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_NFS is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=2 +# CONFIG_GRAN is not set + +# +# Library Routines +# +CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_HAVE_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# Application Configuration +# + +# +# Named Applications +# +# CONFIG_NAMEDAPP is not set + +# +# Examples +# + +# +# ADC Example +# +# CONFIG_EXAMPLES_ADC is not set + +# +# Buttons Example +# +# CONFIG_EXAMPLES_BUTTONS is not set + +# +# CAN Example +# +# CONFIG_EXAMPLES_CAN is not set + +# +# USB CDC/ACM Class Driver Example +# +# CONFIG_EXAMPLES_CDCACM is not set + +# +# USB composite Class Driver Example +# +# CONFIG_EXAMPLES_COMPOSITE is not set + +# +# DHCP Server Example +# +# CONFIG_EXAMPLES_DHCPD is not set + +# +# FTP Client Example +# +# CONFIG_EXAMPLES_FTPC is not set + +# +# FTP Server Example +# +# CONFIG_EXAMPLES_FTPD is not set + +# +# "Hello, World!" Example +# +# CONFIG_EXAMPLES_HELLO is not set + +# +# "Hello, World!" C++ Example +# +# CONFIG_EXAMPLES_HELLOXX is not set + +# +# USB HID Keyboard Example +# +# CONFIG_EXAMPLES_HIDKBD is not set + +# +# IGMP Example +# +# CONFIG_EXAMPLES_IGMP is not set + +# +# LCD Read/Write Example +# +# CONFIG_EXAMPLES_LCDRW is not set + +# +# Memory Management Example +# +# CONFIG_EXAMPLES_MM is not set + +# +# File System Mount Example +# +# CONFIG_EXAMPLES_MOUNT is not set + +# +# FreeModBus Example +# +# CONFIG_EXAMPLES_MODBUS is not set + +# +# Network Test Example +# +# CONFIG_EXAMPLES_NETTEST is not set + +# +# NuttShell (NSH) Example +# +# CONFIG_EXAMPLES_NSH is not set + +# +# NULL Example +# +# CONFIG_EXAMPLES_NULL is not set + +# +# NX Graphics Example +# +# CONFIG_EXAMPLES_NX is not set + +# +# NxConsole Example +# +# CONFIG_EXAMPLES_NXCONSOLE is not set + +# +# NXFFS File System Example +# +# CONFIG_EXAMPLES_NXFFS is not set + +# +# NXFLAT Example +# +# CONFIG_EXAMPLES_NXFLAT is not set + +# +# NX Graphics "Hello, World!" Example +# +# CONFIG_EXAMPLES_NXHELLO is not set + +# +# NX Graphics image Example +# +# CONFIG_EXAMPLES_NXIMAGE is not set + +# +# NX Graphics lines Example +# +# CONFIG_EXAMPLES_NXLINES is not set + +# +# NX Graphics Text Example +# +# CONFIG_EXAMPLES_NXTEXT is not set + +# +# OS Test Example +# +# CONFIG_EXAMPLES_OSTEST is not set + +# +# Pascal "Hello, World!"example +# +# CONFIG_EXAMPLES_PASHELLO is not set + +# +# Pipe Example +# +# CONFIG_EXAMPLES_PIPE is not set + +# +# Poll Example +# +# CONFIG_EXAMPLES_POLL is not set + +# +# Pulse Width Modulation (PWM) Example +# + +# +# Quadrature Encoder Example +# +# CONFIG_EXAMPLES_QENCODER is not set + +# +# RGMP Example +# +# CONFIG_EXAMPLES_RGMP is not set + +# +# ROMFS Example +# +# CONFIG_EXAMPLES_ROMFS is not set + +# +# sendmail Example +# +# CONFIG_EXAMPLES_SENDMAIL is not set + +# +# Serial Loopback Example +# +# CONFIG_EXAMPLES_SERLOOP is not set + +# +# Telnet Daemon Example +# +# CONFIG_EXAMPLES_TELNETD is not set + +# +# THTTPD Web Server Example +# +# CONFIG_EXAMPLES_THTTPD is not set + +# +# TIFF Generation Example +# +# CONFIG_EXAMPLES_TIFF is not set + +# +# Touchscreen Example +# +# CONFIG_EXAMPLES_TOUCHSCREEN is not set + +# +# UDP Example +# +# CONFIG_EXAMPLES_UDP is not set + +# +# UDP Discovery Daemon Example +# +# CONFIG_EXAMPLE_DISCOVER is not set + +# +# uIP Web Server Example +# +# CONFIG_EXAMPLES_UIP is not set + +# +# USB Serial Test Example +# +# CONFIG_EXAMPLES_USBSERIAL is not set + +# +# USB Mass Storage Class Example +# +# CONFIG_EXAMPLES_USBMSC is not set + +# +# USB Serial Terminal Example +# +# CONFIG_EXAMPLES_USBTERM is not set + +# +# Watchdog timer Example +# +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# wget Example +# +# CONFIG_EXAMPLES_WGET is not set + +# +# WLAN Example +# +# CONFIG_EXAMPLES_WLAN is not set + +# +# XML RPC Example +# +CONFIG_EXAMPLES_XMLRPC=y +CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE=1024 +CONFIG_EXAMPLES_XMLRPC_DHCPC=y +CONFIG_EXAMPLES_XMLRPC_NOMAC=y +CONFIG_EXAMPLES_XMLRPC_DRIPADDR=0x0a000001 +CONFIG_EXAMPLES_XMLRPC_NETMASK=0xffffff00 + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_FICL is not set +# CONFIG_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# + +# +# DHCP client +# +CONFIG_NETUTILS_DHCPC=y + +# +# DHCP server +# +# CONFIG_NETUTILS_DHCPD is not set + +# +# FTP client +# +# CONFIG_NETUTILS_FTPC is not set + +# +# FTP server +# +# CONFIG_NETUTILS_FTPD is not set + +# +# Name resolution +# +CONFIG_NETUTILS_RESOLV=y +CONFIG_NET_RESOLV_ENTRIES=4 + +# +# SMTP +# +# CONFIG_NETUTILS_SMTP is not set + +# +# TFTP client +# +# CONFIG_NETUTILS_TELNETD is not set + +# +# TFTP client +# +# CONFIG_NETUTILS_TFTPC is not set + +# +# THTTPD web server +# +# CONFIG_NETUTILS_THTTPD is not set + +# +# uIP support library +# +CONFIG_NETUTILS_UIPLIB=y + +# +# uIP web client +# +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# uIP web server +# +# CONFIG_NETUTILS_WEBSERVER is not set + +# +# UDP Discovery Utility +# +# CONFIG_NETUTILS_DISCOVER is not set + +# +# XML-RPC library +# +CONFIG_NETUTILS_XMLRPC=y +CONFIG_XMLRPC_STRINGSIZE=64 + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +# CONFIG_NSH_LIBRARY is not set + +# +# System NSH Add-Ons +# + +# +# Custom free memory command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# +# CONFIG_SYSTEM_I2CTOOL is not set + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() support +# +# CONFIG_SYSTEM_READLINE is not set + +# +# VSN board Add-Ons +# + +# +# VSN board add-ons +# +# CONFIG_VSN_POWEROFF is not set +# CONFIG_VSN_RAMTRON is not set +# CONFIG_VSN_SDCARD is not set +# CONFIG_VSN_SYSINFO is not set diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/setenv.sh b/nuttx/configs/stm3240g-eval/xmlrpc/setenv.sh new file mode 100644 index 0000000000..847be2a89e --- /dev/null +++ b/nuttx/configs/stm3240g-eval/xmlrpc/setenv.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# configs/stm3240g-eval/xmlrpc/setenv.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the RIDE +# toolchain under windows. You will also have to edit this if you install +# the RIDE toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/nuttx/lib/string/Make.defs b/nuttx/lib/string/Make.defs index 014623eef7..6b21c7f146 100644 --- a/nuttx/lib/string/Make.defs +++ b/nuttx/lib/string/Make.defs @@ -42,11 +42,7 @@ CSRCS += lib_checkbase.c lib_isbasedigit.c lib_memset.c lib_memchr.c \ lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \ lib_strndup.c lib_strcasestr.c lib_strpbrk.c lib_strrchr.c\ lib_strspn.c lib_strstr.c lib_strtok.c lib_strtokr.c lib_strtol.c \ - lib_strtoll.c lib_strtoul.c lib_strtoull.c - -ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y) -CSRCS += lib_strtod.c -endif + lib_strtoll.c lib_strtoul.c lib_strtoull.c lib_strtod.c # Add the string directory to the build diff --git a/nuttx/lib/string/lib_strtod.c b/nuttx/lib/string/lib_strtod.c index 86719c5105..8fecd45713 100644 --- a/nuttx/lib/string/lib_strtod.c +++ b/nuttx/lib/string/lib_strtod.c @@ -37,10 +37,15 @@ * Included Files ****************************************************************************/ +#include +#include + #include #include #include +#ifdef CONFIG_HAVE_DOUBLE + /**************************************************************************** * Pre-processor definitions ****************************************************************************/ @@ -232,3 +237,5 @@ double_t strtod(const char *str, char **endptr) return number; } +#endif /* CONFIG_HAVE_DOUBLE */ + diff --git a/nuttx/sched/task_exithook.c b/nuttx/sched/task_exithook.c index 8497af7ee9..e94476f2a7 100644 --- a/nuttx/sched/task_exithook.c +++ b/nuttx/sched/task_exithook.c @@ -181,6 +181,7 @@ static inline void task_onexit(FAR _TCB *tcb, int status) tcb->onexitfunc = NULL; } #endif +} #else # define task_onexit(tcb,status) #endif diff --git a/nuttx/tools/xmlrpc_test.py b/nuttx/tools/xmlrpc_test.py new file mode 100644 index 0000000000..64cc89dc99 --- /dev/null +++ b/nuttx/tools/xmlrpc_test.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +############################################################################ +# tools/xmlrpc_test.py +# +# Copyright (C) 2012 Max Holtzberg. All rights reserved. +# Author: Max Holtzberg +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +import sys +import xmlrpclib + +if __name__ == '__main__': + if len(sys.argv) != 2: + print 'Usage: %s ' % sys.argv[0] + quit(1) + + server_url = 'http://%s/device' % sys.argv[1] + server = xmlrpclib.ServerProxy(server_url) + result = server.get_device_stats("username", "password", 0) + print result From 857d2a770b39162c43604bfc1cccf431d592ff9b Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 14 Sep 2012 15:23:54 +0000 Subject: [PATCH 72/95] Update all unit tests to conform to recent naming convention changes in NuttX git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5151 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- NxWidgets/ChangeLog.txt | 4 ++ NxWidgets/UnitTests/CButton/Makefile | 2 +- .../CButton/{main.cxx => cbutton_main.cxx} | 28 ++++---- NxWidgets/UnitTests/CButton/cbuttontest.hxx | 10 --- NxWidgets/UnitTests/CButtonArray/Makefile | 2 +- .../{main.cxx => cbuttonarray_main.cxx} | 32 ++++----- .../CButtonArray/cbuttonarraytest.hxx | 10 --- NxWidgets/UnitTests/CCheckBox/Makefile | 2 +- .../{main.cxx => ccheckbox_main.cxx} | 28 ++++---- .../UnitTests/CCheckBox/ccheckboxtest.hxx | 10 --- NxWidgets/UnitTests/CGlyphButton/Makefile | 2 +- .../{main.cxx => cglyphbutton_main.cxx} | 28 ++++---- .../CGlyphButton/cglyphbuttontest.hxx | 10 --- NxWidgets/UnitTests/CImage/Makefile | 2 +- .../CImage/{main.cxx => cimage_main.cxx} | 20 +++--- NxWidgets/UnitTests/CImage/cimagetest.hxx | 10 --- NxWidgets/UnitTests/CKeypad/Makefile | 2 +- .../CKeypad/{main.cxx => ckeypad_main.cxx} | 32 ++++----- NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx | 10 --- NxWidgets/UnitTests/CLabel/Makefile | 2 +- .../CLabel/{main.cxx => clabel_main.cxx} | 20 +++--- NxWidgets/UnitTests/CLabel/clabeltest.hxx | 10 --- NxWidgets/UnitTests/CLatchButton/Makefile | 2 +- .../{main.cxx => clatchbutton_main.cxx} | 30 ++++---- .../CLatchButton/clatchbuttontest.hxx | 10 --- .../UnitTests/CLatchButtonArray/Makefile | 2 +- .../{main.cxx => clatchbuttonarray_main.cxx} | 30 ++++---- .../clatchbuttonarraytest.hxx | 10 --- NxWidgets/UnitTests/CListBox/Makefile | 2 +- .../CListBox/{main.cxx => clistbox_main.cxx} | 70 +++++++++---------- NxWidgets/UnitTests/CListBox/clistboxtest.hxx | 10 --- NxWidgets/UnitTests/CProgressBar/Makefile | 2 +- .../{main.cxx => cprogressbar_main.cxx} | 38 +++++----- .../CProgressBar/cprogressbartest.hxx | 10 --- NxWidgets/UnitTests/CRadioButton/Makefile | 2 +- .../{main.cxx => cradiobutton_main.cxx} | 40 +++++------ .../CRadioButton/cradiobuttontest.hxx | 10 --- .../UnitTests/CScrollbarHorizontal/Makefile | 2 +- .../cscrollbarhorizontaltest.hxx | 10 --- .../UnitTests/CScrollbarVertical/Makefile | 2 +- .../{main.cxx => cscrollbarvertical_main.cxx} | 38 +++++----- .../cscrollbarverticaltest.hxx | 10 --- NxWidgets/UnitTests/CSliderHorizonal/Makefile | 2 +- .../{main.cxx => csliderhorizontal_main.cxx} | 38 +++++----- .../csliderhorizontaltest.hxx | 10 --- NxWidgets/UnitTests/CSliderVertical/Makefile | 2 +- .../{main.cxx => cslidervertical_main.cxx} | 38 +++++----- .../CSliderVertical/csliderverticaltest.hxx | 10 --- NxWidgets/UnitTests/CTextBox/Makefile | 2 +- .../CTextBox/{main.cxx => ctextbox_main.cxx} | 20 +++--- NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx | 10 --- NxWidgets/UnitTests/nxwm/Makefile | 2 +- .../nxwm/{main.cxx => nxwm_main.cxx} | 52 ++++++-------- nuttx/configs/sim/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- 56 files changed, 311 insertions(+), 487 deletions(-) rename NxWidgets/UnitTests/CButton/{main.cxx => cbutton_main.cxx} (84%) rename NxWidgets/UnitTests/CButtonArray/{main.cxx => cbuttonarray_main.cxx} (89%) rename NxWidgets/UnitTests/CCheckBox/{main.cxx => ccheckbox_main.cxx} (87%) rename NxWidgets/UnitTests/CGlyphButton/{main.cxx => cglyphbutton_main.cxx} (87%) rename NxWidgets/UnitTests/CImage/{main.cxx => cimage_main.cxx} (92%) rename NxWidgets/UnitTests/CKeypad/{main.cxx => ckeypad_main.cxx} (88%) rename NxWidgets/UnitTests/CLabel/{main.cxx => clabel_main.cxx} (87%) rename NxWidgets/UnitTests/CLatchButton/{main.cxx => clatchbutton_main.cxx} (85%) rename NxWidgets/UnitTests/CLatchButtonArray/{main.cxx => clatchbuttonarray_main.cxx} (89%) rename NxWidgets/UnitTests/CListBox/{main.cxx => clistbox_main.cxx} (78%) rename NxWidgets/UnitTests/CProgressBar/{main.cxx => cprogressbar_main.cxx} (82%) rename NxWidgets/UnitTests/CRadioButton/{main.cxx => cradiobutton_main.cxx} (82%) rename NxWidgets/UnitTests/CScrollbarVertical/{main.cxx => cscrollbarvertical_main.cxx} (80%) rename NxWidgets/UnitTests/CSliderHorizonal/{main.cxx => csliderhorizontal_main.cxx} (81%) rename NxWidgets/UnitTests/CSliderVertical/{main.cxx => cslidervertical_main.cxx} (81%) rename NxWidgets/UnitTests/CTextBox/{main.cxx => ctextbox_main.cxx} (87%) rename NxWidgets/UnitTests/nxwm/{main.cxx => nxwm_main.cxx} (93%) diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt index b74ba32bca..cdd26cb896 100644 --- a/NxWidgets/ChangeLog.txt +++ b/NxWidgets/ChangeLog.txt @@ -159,3 +159,7 @@ recent check-ins. 1.3 2012-xx-xx Gregory Nutt + +* UnitTests/*/main.cxx: Change entry point name to be consistent + with with entry point naming conventions introduced in NuttX + 6.22. diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile index 4e1ae042f4..77ba7e9865 100644 --- a/NxWidgets/UnitTests/CButton/Makefile +++ b/NxWidgets/UnitTests/CButton/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cbuttontest.cxx +CXXSRCS = cbutton_main.cxx cbuttontest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CButton/main.cxx b/NxWidgets/UnitTests/CButton/cbutton_main.cxx similarity index 84% rename from NxWidgets/UnitTests/CButton/main.cxx rename to NxWidgets/UnitTests/CButton/cbutton_main.cxx index 13e9099d94..973a2cd8a8 100644 --- a/NxWidgets/UnitTests/CButton/main.cxx +++ b/NxWidgets/UnitTests/CButton/cbutton_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CButton/main.cxx +// NxWidgets/UnitTests/CButton/cbutton_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -68,7 +68,7 @@ static const char g_pushme[] = "Push Me"; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cbutton_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Public Functions @@ -78,29 +78,29 @@ extern "C" int MAIN_NAME(int argc, char *argv[]); // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cbutton_main(int argc, char *argv[]) { // Create an instance of the font test - printf(MAIN_STRING "Create CButtonTest instance\n"); + printf("cbutton_main: Create CButtonTest instance\n"); CButtonTest *test = new CButtonTest(); // Connect the NX server - printf(MAIN_STRING "Connect the CButtonTest instance to the NX server\n"); + printf("cbutton_main: Connect the CButtonTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CButtonTest instance to the NX server\n"); + printf("cbutton_main: Failed to connect the CButtonTest instance to the NX server\n"); delete test; return 1; } // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("cbutton_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("cbutton_main: Failed to create a window\n"); delete test; return 1; } @@ -110,26 +110,26 @@ int MAIN_NAME(int argc, char *argv[]) CButton *button = test->createButton(g_pushme); if (!button) { - printf(MAIN_STRING "Failed to create a button\n"); + printf("cbutton_main: Failed to create a button\n"); delete test; return 1; } // Show the button - printf(MAIN_STRING "Show the button\n"); + printf("cbutton_main: Show the button\n"); test->showButton(button); // Wait two seconds, then perform a simulated mouse click on the button sleep(2); - printf(MAIN_STRING "Click the button\n"); + printf("cbutton_main: Click the button\n"); test->click(); // Poll for the mouse click event (of course this can hang if something fails) bool clicked = test->poll(button); - printf(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + printf("cbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a second, then release the mouse buttone @@ -139,7 +139,7 @@ int MAIN_NAME(int argc, char *argv[]) // Poll for the mouse release event (of course this can hang if something fails) clicked = test->poll(button); - printf(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + printf("cbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a few more seconds so that the tester can ponder the result @@ -147,7 +147,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("cbutton_main: Clean-up and exit\n"); delete button; delete test; return 0; diff --git a/NxWidgets/UnitTests/CButton/cbuttontest.hxx b/NxWidgets/UnitTests/CButton/cbuttontest.hxx index cba947b734..10465c06ec 100644 --- a/NxWidgets/UnitTests/CButton/cbuttontest.hxx +++ b/NxWidgets/UnitTests/CButton/cbuttontest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cbutton_main -# define MAIN_STRING "cbutton_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// diff --git a/NxWidgets/UnitTests/CButtonArray/Makefile b/NxWidgets/UnitTests/CButtonArray/Makefile index a37e491421..a5a33b3b01 100644 --- a/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/NxWidgets/UnitTests/CButtonArray/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cbuttonarraytest.cxx +CXXSRCS = cbuttonarray_main.cxx cbuttonarraytest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CButtonArray/main.cxx b/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx similarity index 89% rename from NxWidgets/UnitTests/CButtonArray/main.cxx rename to NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx index fa02413a4f..c247d73e5a 100644 --- a/NxWidgets/UnitTests/CButtonArray/main.cxx +++ b/NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CButtonArray/main.cxx +// NxWidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -82,7 +82,7 @@ static FAR const char *g_buttonLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cbuttonarray_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -196,7 +196,7 @@ static void checkHighlighting(CButtonArray *buttonArray) // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cbuttonarray_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -204,16 +204,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the button array test - printf(MAIN_STRING "Create CButtonArrayTest instance\n"); + printf("cbuttonarray_main: Create CButtonArrayTest instance\n"); CButtonArrayTest *test = new CButtonArrayTest(); updateMemoryUsage(g_mmPrevious, "After creating CButtonArrayTest"); // Connect the NX server - printf(MAIN_STRING "Connect the CButtonArrayTest instance to the NX server\n"); + printf("cbuttonarray_main: Connect the CButtonArrayTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CButtonArrayTest instance to the NX server\n"); + printf("cbuttonarray_main: Failed to connect the CButtonArrayTest instance to the NX server\n"); delete test; return 1; } @@ -221,10 +221,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("cbuttonarray_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("cbuttonarray_main: Failed to create a window\n"); delete test; return 1; } @@ -235,7 +235,7 @@ int MAIN_NAME(int argc, char *argv[]) CButtonArray *buttonArray = test->createButtonArray(); if (!buttonArray) { - printf(MAIN_STRING "Failed to create a button array\n"); + printf("cbuttonarray_main: Failed to create a button array\n"); delete test; return 1; } @@ -248,7 +248,7 @@ int MAIN_NAME(int argc, char *argv[]) { for (int i = 0; i < BUTTONARRAY_NCOLUMNS; i++) { - printf(MAIN_STRING "Label (%d,%d): %s\n", i, j, *ptr); + printf("cbuttonarray_main: Label (%d,%d): %s\n", i, j, *ptr); CNxString string = *ptr++; buttonArray->setText(i, j, string); } @@ -257,7 +257,7 @@ int MAIN_NAME(int argc, char *argv[]) // Show the button array - printf(MAIN_STRING "Show the button array\n"); + printf("cbuttonarray_main: Show the button array\n"); test->showButton(buttonArray); sleep(1); @@ -272,7 +272,7 @@ int MAIN_NAME(int argc, char *argv[]) { for (int i = 0; i < BUTTONARRAY_NCOLUMNS; i++) { - printf(MAIN_STRING "Click the button (%d,%d)\n", i, j); + printf("cbuttonarray_main: Click the button (%d,%d)\n", i, j); test->click(buttonArray, i, j); // Poll for the mouse click event @@ -285,13 +285,13 @@ int MAIN_NAME(int argc, char *argv[]) int clickRow; if (buttonArray->isButtonClicked(clickColumn, clickRow)) { - printf(MAIN_STRING "%s: Button (%d, %d) is clicked\n", + printf("cbuttonarray_main: %s: Button (%d, %d) is clicked\n", clickColumn == i && clickRow == j ? "OK" : "ERROR", clickColumn, clickRow); } else { - printf(MAIN_STRING "ERROR: No button is clicked\n"); + printf("cbuttonarray_main: ERROR: No button is clicked\n"); } // Wait a bit, then release the mouse button @@ -304,7 +304,7 @@ int MAIN_NAME(int argc, char *argv[]) test->poll(buttonArray); if (buttonArray->isButtonClicked(clickColumn, clickRow)) { - printf(MAIN_STRING "ERROR: Button (%d, %d) is clicked\n", + printf("cbuttonarray_main: ERROR: Button (%d, %d) is clicked\n", clickColumn, clickRow); } @@ -315,7 +315,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("cbuttonarray_main: Clean-up and exit\n"); delete buttonArray; updateMemoryUsage(g_mmPrevious, "After deleting the button array"); delete test; diff --git a/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx b/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx index 1a75ac2c36..b8a9e15e50 100644 --- a/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx +++ b/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CBUTTONARRAYTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cbuttonarray_main -# define MAIN_STRING "cbuttonarray_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile index 6b31286dff..9b46cef8d9 100644 --- a/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/NxWidgets/UnitTests/CCheckBox/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx ccheckboxtest.cxx +CXXSRCS = ccheckbox_main.cxx ccheckboxtest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CCheckBox/main.cxx b/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx similarity index 87% rename from NxWidgets/UnitTests/CCheckBox/main.cxx rename to NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx index e9e8b516fe..949cbc35f5 100644 --- a/NxWidgets/UnitTests/CCheckBox/main.cxx +++ b/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CCheckBox/main.cxx +// NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int ccheckbox_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int ccheckbox_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,31 +143,31 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CCheckBoxTest instance\n"); + message("ccheckbox_main: Create CCheckBoxTest instance\n"); CCheckBoxTest *test = new CCheckBoxTest(); updateMemoryUsage(g_mmprevious, "After creating CCheckBoxTest"); // Connect the NX server - message(MAIN_STRING "Connect the CCheckBoxTest instance to the NX server\n"); + message("ccheckbox_main: Connect the CCheckBoxTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CCheckBoxTest instance to the NX server\n"); + message("ccheckbox_main: Failed to connect the CCheckBoxTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "ccheckbox_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("ccheckbox_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("ccheckbox_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "ccheckbox_main: After creating a window"); // Show the initial state of the checkbox @@ -177,21 +177,21 @@ int MAIN_NAME(int argc, char *argv[]) // Now click the checkbox - message(MAIN_STRING "Click 1\n"); + message("ccheckbox_main: Click 1\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); updateMemoryUsage(g_mmprevious, "After click 1"); usleep(500*1000); - message(MAIN_STRING "Click 2\n"); + message("ccheckbox_main: Click 2\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); updateMemoryUsage(g_mmprevious, "After click 2"); usleep(500*1000); - message(MAIN_STRING "Click 3\n"); + message("ccheckbox_main: Click 3\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); @@ -200,7 +200,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("ccheckbox_main: Clean-up and exit\n"); delete test; updateMemoryUsage(g_mmprevious, "After deleting the test"); updateMemoryUsage(g_mmInitial, "Final memory usage"); diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx index 73e72e2824..0397b37dd6 100644 --- a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx +++ b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CCHECKBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME ccheckbox_main -# define MAIN_STRING "ccheckbox_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile index 01e8435557..5f2522e494 100644 --- a/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cglyphbuttontest.cxx +CXXSRCS = cglyphbutton_main.cxx cglyphbuttontest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CGlyphButton/main.cxx b/NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx similarity index 87% rename from NxWidgets/UnitTests/CGlyphButton/main.cxx rename to NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx index 7812fa9e97..95e255dccf 100644 --- a/NxWidgets/UnitTests/CGlyphButton/main.cxx +++ b/NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CGlyphButton/main.cxx +// NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -72,7 +72,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cglyphbutton_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -134,7 +134,7 @@ static void initMemoryUsage(void) // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cglyphbutton_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -142,16 +142,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the font test - message(MAIN_STRING "Create CGlyphButtonTest instance\n"); + message("cglyphbutton_main: Create CGlyphButtonTest instance\n"); CGlyphButtonTest *test = new CGlyphButtonTest(); updateMemoryUsage(g_mmprevious, "After creating CGlyphButtonTest"); // Connect the NX server - message(MAIN_STRING "Connect the CGlyphButtonTest instance to the NX server\n"); + message("cglyphbutton_main: Connect the CGlyphButtonTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CGlyphButtonTest instance to the NX server\n"); + message("cglyphbutton_main: Failed to connect the CGlyphButtonTest instance to the NX server\n"); delete test; return 1; } @@ -159,10 +159,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cglyphbutton_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cglyphbutton_main: Failed to create a window\n"); delete test; return 1; } @@ -173,7 +173,7 @@ int MAIN_NAME(int argc, char *argv[]) CGlyphButton *button = test->createButton(&g_arrowDown, &g_arrowUp); if (!button) { - message(MAIN_STRING "Failed to create a button\n"); + message("cglyphbutton_main: Failed to create a button\n"); delete test; return 1; } @@ -181,21 +181,21 @@ int MAIN_NAME(int argc, char *argv[]) // Show the button - message(MAIN_STRING "Show the button\n"); + message("cglyphbutton_main: Show the button\n"); test->showButton(button); updateMemoryUsage(g_mmprevious, "After showing the glyph button"); // Wait two seconds, then perform a simulated mouse click on the button sleep(2); - message(MAIN_STRING "Click the button\n"); + message("cglyphbutton_main: Click the button\n"); test->click(); updateMemoryUsage(g_mmprevious, "After clicking glyph button"); // Poll for the mouse click event (of course this can hang if something fails) bool clicked = test->poll(button); - message(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + message("cglyphbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a second, then release the mouse buttone @@ -206,7 +206,7 @@ int MAIN_NAME(int argc, char *argv[]) // Poll for the mouse release event (of course this can hang if something fails) clicked = test->poll(button); - message(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + message("cglyphbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a few more seconds so that the tester can ponder the result @@ -214,7 +214,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cglyphbutton_main: Clean-up and exit\n"); delete button; updateMemoryUsage(g_mmprevious, "After deleting the glyph button"); delete test; diff --git a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx index 940d82a9f5..b3e5bb656b 100644 --- a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx +++ b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx @@ -76,16 +76,6 @@ # define CONFIG_CGLYPHBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cglyphbutton_main -# define MAIN_STRING "cglyphbutton_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile index 8db783364e..46e69c495f 100644 --- a/NxWidgets/UnitTests/CImage/Makefile +++ b/NxWidgets/UnitTests/CImage/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cimagetest.cxx +CXXSRCS = cimage_main.cxx cimagetest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CImage/main.cxx b/NxWidgets/UnitTests/CImage/cimage_main.cxx similarity index 92% rename from NxWidgets/UnitTests/CImage/main.cxx rename to NxWidgets/UnitTests/CImage/cimage_main.cxx index dd066b809d..30cf49d3ef 100644 --- a/NxWidgets/UnitTests/CImage/main.cxx +++ b/NxWidgets/UnitTests/CImage/cimage_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CImage/main.cxx +// NxWidgets/UnitTests/CImage/cimage_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static struct mallinfo g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cimage_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -149,7 +149,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cimage_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -157,16 +157,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the font test - message(MAIN_STRING "Create CImageTest instance\n"); + message("cimage_main: Create CImageTest instance\n"); CImageTest *test = new CImageTest(); updateMemoryUsage(&g_mmprevious, "After creating CImageTest"); // Connect the NX server - message(MAIN_STRING "Connect the CImageTest instance to the NX server\n"); + message("cimage_main: Connect the CImageTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CImageTest instance to the NX server\n"); + message("cimage_main: Failed to connect the CImageTest instance to the NX server\n"); delete test; return 1; } @@ -174,10 +174,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cimage_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cimage_main: Failed to create a window\n"); delete test; return 1; } @@ -193,7 +193,7 @@ int MAIN_NAME(int argc, char *argv[]) CImage *image = test->createImage(static_cast(nuttxBitmap)); if (!image) { - message(MAIN_STRING "Failed to create a image\n"); + message("cimage_main: Failed to create a image\n"); delete test; return 1; } @@ -207,7 +207,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cimage_main: Clean-up and exit\n"); delete image; updateMemoryUsage(&g_mmprevious, "After deleting CImage"); diff --git a/NxWidgets/UnitTests/CImage/cimagetest.hxx b/NxWidgets/UnitTests/CImage/cimagetest.hxx index 64592ee23f..9592f29362 100644 --- a/NxWidgets/UnitTests/CImage/cimagetest.hxx +++ b/NxWidgets/UnitTests/CImage/cimagetest.hxx @@ -71,16 +71,6 @@ # define CONFIG_CIMAGETEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cimage_main -# define MAIN_STRING "cimage_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CKeypad/Makefile b/NxWidgets/UnitTests/CKeypad/Makefile index ddb8fb9625..3d37c26fe3 100644 --- a/NxWidgets/UnitTests/CKeypad/Makefile +++ b/NxWidgets/UnitTests/CKeypad/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx ckeypadtest.cxx +CXXSRCS = ckeypad_main.cxx ckeypadtest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CKeypad/main.cxx b/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx similarity index 88% rename from NxWidgets/UnitTests/CKeypad/main.cxx rename to NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx index 1c7679ee26..896ef50138 100644 --- a/NxWidgets/UnitTests/CKeypad/main.cxx +++ b/NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CKeypad/main.cxx +// NxWidgets/UnitTests/CKeypad/ckeypad_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -72,7 +72,7 @@ static unsigned int g_mmPeak; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int ckeypad_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -142,7 +142,7 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) { for (int i = 0; i < KEYPAD_NCOLUMNS; i++) { - printf(MAIN_STRING "Click the button (%d,%d)\n", i, j); + printf("clickButtons: Click the button (%d,%d)\n", i, j); test->click(keypad, i, j); // Poll for the mouse click event @@ -155,13 +155,13 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) int clickRow; if (keypad->isButtonClicked(clickColumn, clickRow)) { - printf(MAIN_STRING "%s: Button (%d, %d) is clicked\n", + printf("clickButtons: %s: Button (%d, %d) is clicked\n", clickColumn == i && clickRow == j ? "OK" : "ERROR", clickColumn, clickRow); } else { - printf(MAIN_STRING "ERROR: No button is clicked\n"); + printf("clickButtons: ERROR: No button is clicked\n"); } // Wait a bit, then release the mouse button @@ -174,7 +174,7 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) test->poll(keypad); if (keypad->isButtonClicked(clickColumn, clickRow)) { - printf(MAIN_STRING "ERROR: Button (%d, %d) is clicked\n", + printf("clickButtons: ERROR: Button (%d, %d) is clicked\n", clickColumn, clickRow); } @@ -192,7 +192,7 @@ static void clickButtons(CKeypadTest *test, CKeypad *keypad) // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int ckeypad_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -200,16 +200,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the keypad test - printf(MAIN_STRING "Create CKeypadTest instance\n"); + printf("ckeypad_main: Create CKeypadTest instance\n"); CKeypadTest *test = new CKeypadTest(); updateMemoryUsage(g_mmPrevious, "After creating CKeypadTest"); // Connect the NX server - printf(MAIN_STRING "Connect the CKeypadTest instance to the NX server\n"); + printf("ckeypad_main: Connect the CKeypadTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CKeypadTest instance to the NX server\n"); + printf("ckeypad_main: Failed to connect the CKeypadTest instance to the NX server\n"); delete test; return 1; } @@ -217,10 +217,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("ckeypad_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("ckeypad_main: Failed to create a window\n"); delete test; return 1; } @@ -231,7 +231,7 @@ int MAIN_NAME(int argc, char *argv[]) CKeypad *keypad = test->createKeypad(); if (!keypad) { - printf(MAIN_STRING "Failed to create a keypad\n"); + printf("ckeypad_main: Failed to create a keypad\n"); delete test; return 1; } @@ -239,7 +239,7 @@ int MAIN_NAME(int argc, char *argv[]) // Show the keypad in alphabetic mode - printf(MAIN_STRING "Show the keypad in alphabetic mode\n"); + printf("ckeypad_main: Show the keypad in alphabetic mode\n"); keypad->setKeypadMode(false); test->showKeypad(keypad); sleep(1); @@ -251,7 +251,7 @@ int MAIN_NAME(int argc, char *argv[]) // Show the keypad in numeric mode - printf(MAIN_STRING "Show the keypad in numeric mode\n"); + printf("ckeypad_main: Show the keypad in numeric mode\n"); keypad->setKeypadMode(true); sleep(1); @@ -262,7 +262,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("ckeypad_main: Clean-up and exit\n"); delete keypad; updateMemoryUsage(g_mmPrevious, "After deleting the keypad"); delete test; diff --git a/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx b/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx index c1c7ba79e1..d11c923752 100644 --- a/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx +++ b/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx @@ -72,16 +72,6 @@ # define CONFIG_CKEYPADTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME ckeypad_main -# define MAIN_STRING "ckeypad_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CLabel/Makefile b/NxWidgets/UnitTests/CLabel/Makefile index 4e49a7f5cd..e04adc7de2 100644 --- a/NxWidgets/UnitTests/CLabel/Makefile +++ b/NxWidgets/UnitTests/CLabel/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx clabeltest.cxx +CXXSRCS = clabel_main.cxx clabeltest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CLabel/main.cxx b/NxWidgets/UnitTests/CLabel/clabel_main.cxx similarity index 87% rename from NxWidgets/UnitTests/CLabel/main.cxx rename to NxWidgets/UnitTests/CLabel/clabel_main.cxx index 953e6afbc4..2b800dcabb 100644 --- a/NxWidgets/UnitTests/CLabel/main.cxx +++ b/NxWidgets/UnitTests/CLabel/clabel_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CLabel/main.cxx +// NxWidgets/UnitTests/CLabel/clabel_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -68,7 +68,7 @@ static const char g_hello[] = "Hello, World!"; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int clabel_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Public Functions @@ -78,29 +78,29 @@ extern "C" int MAIN_NAME(int argc, char *argv[]); // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int clabel_main(int argc, char *argv[]) { // Create an instance of the font test - printf(MAIN_STRING "Create CLabelTest instance\n"); + printf("clabel_main: Create CLabelTest instance\n"); CLabelTest *test = new CLabelTest(); // Connect the NX server - printf(MAIN_STRING "Connect the CLabelTest instance to the NX server\n"); + printf("clabel_main: Connect the CLabelTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CLabelTest instance to the NX server\n"); + printf("clabel_main: Failed to connect the CLabelTest instance to the NX server\n"); delete test; return 1; } // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("clabel_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("clabel_main: Failed to create a window\n"); delete test; return 1; } @@ -110,7 +110,7 @@ int MAIN_NAME(int argc, char *argv[]) CLabel *label = test->createLabel(g_hello); if (!label) { - printf(MAIN_STRING "Failed to create a label\n"); + printf("clabel_main: Failed to create a label\n"); delete test; return 1; } @@ -122,7 +122,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("clabel_main: Clean-up and exit\n"); delete label; delete test; return 0; diff --git a/NxWidgets/UnitTests/CLabel/clabeltest.hxx b/NxWidgets/UnitTests/CLabel/clabeltest.hxx index f7e13fdfbb..47bb7684b5 100644 --- a/NxWidgets/UnitTests/CLabel/clabeltest.hxx +++ b/NxWidgets/UnitTests/CLabel/clabeltest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CLABELTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME clabel_main -# define MAIN_STRING "clabel_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// diff --git a/NxWidgets/UnitTests/CLatchButton/Makefile b/NxWidgets/UnitTests/CLatchButton/Makefile index d953c3e994..7444c50be3 100644 --- a/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/NxWidgets/UnitTests/CLatchButton/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx clatchbuttontest.cxx +CXXSRCS = clatchbutton_main.cxx clatchbuttontest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CLatchButton/main.cxx b/NxWidgets/UnitTests/CLatchButton/clatchbutton_main.cxx similarity index 85% rename from NxWidgets/UnitTests/CLatchButton/main.cxx rename to NxWidgets/UnitTests/CLatchButton/clatchbutton_main.cxx index d51f613c16..13ed0613e2 100644 --- a/NxWidgets/UnitTests/CLatchButton/main.cxx +++ b/NxWidgets/UnitTests/CLatchButton/clatchbutton_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CLatchButton/main.cxx +// NxWidgets/UnitTests/CLatchButton/clatchbutton_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -68,7 +68,7 @@ static const char g_pushme[] = "Push Me"; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int clatchbutton_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -83,13 +83,13 @@ static void showButtonState(CLatchButton *button, bool &clicked, bool &latched) bool nowClicked = button->isClicked(); bool nowLatched = button->isLatched(); - printf(MAIN_STRING "Button state: %s and %s\n", + printf("showButtonState: Button state: %s and %s\n", nowClicked ? "clicked" : "released", nowLatched ? "latched" : "unlatched"); if (clicked != nowClicked || latched != nowLatched) { - printf(MAIN_STRING "ERROR: Expected %s and %s\n", + printf("showButtonState: ERROR: Expected %s and %s\n", clicked ? "clicked" : "released", latched ? "latched" : "unlatched"); @@ -106,29 +106,29 @@ static void showButtonState(CLatchButton *button, bool &clicked, bool &latched) // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int clatchbutton_main(int argc, char *argv[]) { // Create an instance of the font test - printf(MAIN_STRING "Create CLatchButtonTest instance\n"); + printf("clatchbutton_main: Create CLatchButtonTest instance\n"); CLatchButtonTest *test = new CLatchButtonTest(); // Connect the NX server - printf(MAIN_STRING "Connect the CLatchButtonTest instance to the NX server\n"); + printf("clatchbutton_main: Connect the CLatchButtonTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CLatchButtonTest instance to the NX server\n"); + printf("clatchbutton_main: Failed to connect the CLatchButtonTest instance to the NX server\n"); delete test; return 1; } // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("clatchbutton_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("clatchbutton_main: Failed to create a window\n"); delete test; return 1; } @@ -138,14 +138,14 @@ int MAIN_NAME(int argc, char *argv[]) CLatchButton *button = test->createButton(g_pushme); if (!button) { - printf(MAIN_STRING "Failed to create a button\n"); + printf("clatchbutton_main: Failed to create a button\n"); delete test; return 1; } // Show the button - printf(MAIN_STRING "Show the button\n"); + printf("clatchbutton_main: Show the button\n"); test->showButton(button); bool clicked = false; @@ -159,7 +159,7 @@ int MAIN_NAME(int argc, char *argv[]) // Wait two seconds, then perform a simulated mouse click on the button sleep(2); - printf(MAIN_STRING "Click the button\n"); + printf("clatchbutton_main: Click the button\n"); test->click(); test->poll(button); @@ -173,7 +173,7 @@ int MAIN_NAME(int argc, char *argv[]) // And release the button after 0.5 seconds usleep(500 * 1000); - printf(MAIN_STRING "Release the button\n"); + printf("clatchbutton_main: Release the button\n"); test->release(); test->poll(button); @@ -191,7 +191,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("clatchbutton_main: Clean-up and exit\n"); delete button; delete test; return 0; diff --git a/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx b/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx index 62405ac883..783b1a57c1 100644 --- a/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx +++ b/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CLATCHBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME clatchbutton_main -# define MAIN_STRING "clatchbutton_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// diff --git a/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/NxWidgets/UnitTests/CLatchButtonArray/Makefile index ddd44f8b35..a6ac9118bb 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx clatchbuttonarraytest.cxx +CXXSRCS = clatchbuttonarray_main.cxx clatchbuttonarraytest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CLatchButtonArray/main.cxx b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx similarity index 89% rename from NxWidgets/UnitTests/CLatchButtonArray/main.cxx rename to NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx index d38651ae94..ad7646560b 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/main.cxx +++ b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CLatchButtonArray/main.cxx +// NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarry_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -82,7 +82,7 @@ static FAR const char *g_buttonLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int clatchbuttonarray_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -98,14 +98,14 @@ static void showButtonState(CLatchButtonArray *buttonArray, int i, int j, bool nowClicked = buttonArray->isThisButtonClicked(i,j); bool nowLatched = buttonArray->isThisButtonLatched(i,j); - printf(MAIN_STRING "Button(%d,%d) state: %s and %s\n", + printf("showButtonState: Button(%d,%d) state: %s and %s\n", i, j, nowClicked ? "clicked" : "released", nowLatched ? "latched" : "unlatched"); if (clicked != nowClicked || latched != nowLatched) { - printf(MAIN_STRING "ERROR: Expected %s and %s\n", + printf("showButtonState: ERROR: Expected %s and %s\n", clicked ? "clicked" : "released", latched ? "latched" : "unlatched"); @@ -174,7 +174,7 @@ static void initMemoryUsage(void) // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int clatchbuttonarray_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -182,16 +182,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the button array test - printf(MAIN_STRING "Create CLatchButtonArrayTest instance\n"); + printf("clatchbuttonarray_main: Create CLatchButtonArrayTest instance\n"); CLatchButtonArrayTest *test = new CLatchButtonArrayTest(); updateMemoryUsage(g_mmPrevious, "After creating CLatchButtonArrayTest"); // Connect the NX server - printf(MAIN_STRING "Connect the CLatchButtonArrayTest instance to the NX server\n"); + printf("clatchbuttonarray_main: Connect the CLatchButtonArrayTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CLatchButtonArrayTest instance to the NX server\n"); + printf("clatchbuttonarray_main: Failed to connect the CLatchButtonArrayTest instance to the NX server\n"); delete test; return 1; } @@ -199,10 +199,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("clatchbuttonarray_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("clatchbuttonarray_main: Failed to create a window\n"); delete test; return 1; } @@ -213,7 +213,7 @@ int MAIN_NAME(int argc, char *argv[]) CLatchButtonArray *buttonArray = test->createButtonArray(); if (!buttonArray) { - printf(MAIN_STRING "Failed to create a button array\n"); + printf("clatchbuttonarray_main: Failed to create a button array\n"); delete test; return 1; } @@ -226,7 +226,7 @@ int MAIN_NAME(int argc, char *argv[]) { for (int i = 0; i < BUTTONARRAY_NCOLUMNS; i++) { - printf(MAIN_STRING "Label (%d,%d): %s\n", i, j, *ptr); + printf("clatchbuttonarray_main: Label (%d,%d): %s\n", i, j, *ptr); CNxString string = *ptr++; buttonArray->setText(i, j, string); } @@ -235,7 +235,7 @@ int MAIN_NAME(int argc, char *argv[]) // Show the button array - printf(MAIN_STRING "Show the button array\n"); + printf("clatchbuttonarray_main: Show the button array\n"); test->showButton(buttonArray); sleep(1); @@ -254,7 +254,7 @@ int MAIN_NAME(int argc, char *argv[]) latched = false; showButtonState(buttonArray, i, j, clicked, latched); - printf(MAIN_STRING "Click the button (%d,%d)\n", i, j); + printf("clatchbuttonarray_main: Click the button (%d,%d)\n", i, j); test->click(buttonArray, i, j); // Poll for the mouse click event @@ -289,7 +289,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("clatchbuttonarray_main: Clean-up and exit\n"); delete buttonArray; updateMemoryUsage(g_mmPrevious, "After deleting the button array"); delete test; diff --git a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx index f8642f0897..98c0a3bb37 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx +++ b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CLATCHBUTTONARRAYTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME clatchbuttonarray_main -# define MAIN_STRING "clatchbuttonarray_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CListBox/Makefile b/NxWidgets/UnitTests/CListBox/Makefile index 4f933ad982..f068738175 100644 --- a/NxWidgets/UnitTests/CListBox/Makefile +++ b/NxWidgets/UnitTests/CListBox/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx clistboxtest.cxx +CXXSRCS = clistbox_main.cxx clistboxtest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CListBox/main.cxx b/NxWidgets/UnitTests/CListBox/clistbox_main.cxx similarity index 78% rename from NxWidgets/UnitTests/CListBox/main.cxx rename to NxWidgets/UnitTests/CListBox/clistbox_main.cxx index 5783e255d8..8711f06e86 100644 --- a/NxWidgets/UnitTests/CListBox/main.cxx +++ b/NxWidgets/UnitTests/CListBox/clistbox_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CListBox/main.cxx +// NxWidgets/UnitTests/CListBox/clistbox_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -108,7 +108,7 @@ static FAR const char *g_options[] = // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int clistbox_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -174,7 +174,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int clistbox_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -182,43 +182,43 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the listbox test - message(MAIN_STRING "Create CListBoxTest instance\n"); + message("clistbox_main: Create CListBoxTest instance\n"); CListBoxTest *test = new CListBoxTest(); updateMemoryUsage(g_mmPrevious, "After creating CListBoxTest"); // Connect the NX server - message(MAIN_STRING "Connect the CListBoxTest instance to the NX server\n"); + message("clistbox_main: Connect the CListBoxTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CListBoxTest instance to the NX server\n"); + message("clistbox_main: Failed to connect the CListBoxTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("clistbox_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("clistbox_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After creating a window"); // Create a listbox - message(MAIN_STRING "Create a ListBox\n"); + message("clistbox_main: Create a ListBox\n"); CListBox *listbox = test->createListBox(); if (!listbox) { - message(MAIN_STRING "Failed to create a listbox\n"); + message("clistbox_main: Failed to create a listbox\n"); delete test; return 1; } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After creating a listbox"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After creating a listbox"); // Show the initial state of the listbox @@ -228,23 +228,23 @@ int MAIN_NAME(int argc, char *argv[]) // Now add items to the list box (in reverse alphabetical order) - message(MAIN_STRING "Add options to the ListBox\n"); + message("clistbox_main: Add options to the ListBox\n"); for (int i = NOPTIONS - 1; i >= 0; i--) { listbox->addOption(g_options[i],i); test->showListBox(listbox); - message(MAIN_STRING "%d. New option %s\n", i, g_options[i]); + message("clistbox_main: %d. New option %s\n", i, g_options[i]); usleep(500000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After adding the listbox items"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After adding the listbox items"); sleep(1); // Sort the list box - message(MAIN_STRING "Sort the ListBox\n"); + message("clistbox_main: Sort the ListBox\n"); listbox->sort(); test->showListBox(listbox); - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After sorting the listbox"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After sorting the listbox"); sleep(1); // Select and remove items from the listbox @@ -253,69 +253,69 @@ int MAIN_NAME(int argc, char *argv[]) int nOptions; while ((nOptions = listbox->getOptionCount()) > 0) { - message(MAIN_STRING "Option count: %d\n", nOptions); + message("clistbox_main: Option count: %d\n", nOptions); if (nOptions <= 5) { - message(MAIN_STRING "Selecting all remaining options\n"); + message("clistbox_main: Selecting all remaining options\n"); listbox->selectAllOptions(); test->showListBox(listbox); - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After selecting all options"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After selecting all options"); sleep(1); - message(MAIN_STRING "Removing all remaining options\n"); + message("clistbox_main: Removing all remaining options\n"); listbox->removeAllOptions(); - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After removing all options"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After removing all options"); test->showListBox(listbox); } else { int selected[5]; - message(MAIN_STRING "Selecting five options\n"); + message("clistbox_main: Selecting five options\n"); for (int i = 0; i < 5; i++) { selected[i] = ((nOptions - 1) * rand()) / MAX_RAND; - message(MAIN_STRING "Selecting option %d\n", selected[i]); + message("clistbox_main: Selecting option %d\n", selected[i]); listbox->removeOption(selected[i]); test->showListBox(listbox); usleep(500000); } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After selecting five options"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After selecting five options"); - message(MAIN_STRING "De-selecting options\n"); + message("clistbox_main: De-selecting options\n"); int index; int count = 0; while ((index = listbox->getSelectedIndex()) >= 0) { - message(MAIN_STRING "De-selecting option %d\n", index); + message("clistbox_main: De-selecting option %d\n", index); listbox->deselectOption(index); test->showListBox(listbox); count++; usleep(500000); } - message(MAIN_STRING "%s: %d options de-selected\n", + message("clistbox_main: %s: %d options de-selected\n", count == 5 ? "OK" : "ERROR", count); - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After de-selecting options"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After de-selecting options"); - message(MAIN_STRING "Removing the selected options\n"); + message("clistbox_main: Removing the selected options\n"); for (int i = 0; i < 5; i++) { - message(MAIN_STRING "Removing option %d\n", selected[i]); + message("clistbox_main: Removing option %d\n", selected[i]); listbox->removeOption(selected[i]); test->showListBox(listbox); usleep(500000); } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After removing five options"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After removing five options"); } sleep(1); } - updateMemoryUsage(g_mmPrevious, MAIN_STRING "After the listbox is empty again"); + updateMemoryUsage(g_mmPrevious, "clistbox_main: After the listbox is empty again"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("clistbox_main: Clean-up and exit\n"); delete listbox; updateMemoryUsage(g_mmPrevious, "After deleting the listbox"); delete test; diff --git a/NxWidgets/UnitTests/CListBox/clistboxtest.hxx b/NxWidgets/UnitTests/CListBox/clistboxtest.hxx index 88e41f3bf1..a19a2fabc2 100644 --- a/NxWidgets/UnitTests/CListBox/clistboxtest.hxx +++ b/NxWidgets/UnitTests/CListBox/clistboxtest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CLISTBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME clistbox_main -# define MAIN_STRING "clistbox_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CProgressBar/Makefile b/NxWidgets/UnitTests/CProgressBar/Makefile index a1e09ed572..5ee346b520 100644 --- a/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/NxWidgets/UnitTests/CProgressBar/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cprogressbartest.cxx +CXXSRCS = cprogressbar_main.cxx cprogressbartest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CProgressBar/main.cxx b/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx similarity index 82% rename from NxWidgets/UnitTests/CProgressBar/main.cxx rename to NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx index 525c509d32..cb5fa130e8 100644 --- a/NxWidgets/UnitTests/CProgressBar/main.cxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CProgressBar/main.cxx +// NxWidgets/UnitTests/CProgressBar/cprogressbar_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cprogressbar_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cprogressbar_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,43 +143,43 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CProgressBarTest instance\n"); + message("cprogressbar_main: Create CProgressBarTest instance\n"); CProgressBarTest *test = new CProgressBarTest(); updateMemoryUsage(g_mmprevious, "After creating CProgressBarTest"); // Connect the NX server - message(MAIN_STRING "Connect the CProgressBarTest instance to the NX server\n"); + message("cprogressbar_main: Connect the CProgressBarTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CProgressBarTest instance to the NX server\n"); + message("cprogressbar_main: Failed to connect the CProgressBarTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "cprogressbar_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cprogressbar_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cprogressbar_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "cprogressbar_main: After creating a window"); // Create a progress bar - message(MAIN_STRING "Create a ProgressBar\n"); + message("cprogressbar_main: Create a ProgressBar\n"); CProgressBar *bar = test->createProgressBar(); if (!bar) { - message(MAIN_STRING "Failed to create a progress bar\n"); + message("cprogressbar_main: Failed to create a progress bar\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a progress bar"); + updateMemoryUsage(g_mmprevious, "cprogressbar_main: After creating a progress bar"); // Set the progress bar minimum and maximum values @@ -187,7 +187,7 @@ int MAIN_NAME(int argc, char *argv[]) bar->setMaximumValue(MAX_PROGRESSBAR); bar->setValue(0); bar->hidePercentageText(); - message(MAIN_STRING "ProgressBar range %d->%d Initial value %d\n", + message("cprogressbar_main: ProgressBar range %d->%d Initial value %d\n", bar->getMinimumValue(), bar->getMaximumValue(), bar->getValue()); @@ -202,10 +202,10 @@ int MAIN_NAME(int argc, char *argv[]) { bar->setValue(i); test->showProgressBar(bar); - message(MAIN_STRING "%d. New value %d\n", i, bar->getValue()); + message("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the progress bar up #1"); + updateMemoryUsage(g_mmprevious, "cprogressbar_main: After moving the progress bar up #1"); usleep(500*1000); // Now move the progress bar up from 0 to 100% (with percentages off) @@ -219,15 +219,15 @@ int MAIN_NAME(int argc, char *argv[]) { bar->setValue(i); test->showProgressBar(bar); - message(MAIN_STRING "%d. New value %d\n", i, bar->getValue()); + message("cprogressbar_main: %d. New value %d\n", i, bar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the progress bar up #2"); + updateMemoryUsage(g_mmprevious, "cprogressbar_main: After moving the progress bar up #2"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cprogressbar_main: Clean-up and exit\n"); delete bar; updateMemoryUsage(g_mmprevious, "After deleting the progress bar"); delete test; diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx index 99312cf8f1..a7a4238e75 100644 --- a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CPROGRESSBARTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cprogressbar_main -# define MAIN_STRING "cprogressbar_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CRadioButton/Makefile b/NxWidgets/UnitTests/CRadioButton/Makefile index f861326e99..57190e8d30 100644 --- a/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/NxWidgets/UnitTests/CRadioButton/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cradiobuttontest.cxx +CXXSRCS = cradiobutton_main.cxx cradiobuttontest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CRadioButton/main.cxx b/NxWidgets/UnitTests/CRadioButton/cradiobutton_main.cxx similarity index 82% rename from NxWidgets/UnitTests/CRadioButton/main.cxx rename to NxWidgets/UnitTests/CRadioButton/cradiobutton_main.cxx index d53cd4a098..0ec1ca1961 100644 --- a/NxWidgets/UnitTests/CRadioButton/main.cxx +++ b/NxWidgets/UnitTests/CRadioButton/cradiobutton_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CRadioButton/main.cxx +// NxWidgets/UnitTests/CRadioButton/cradiobutton_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cradiobutton_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cradiobutton_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,60 +143,60 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the radio button test - message(MAIN_STRING "Create CRadioButtonTest instance\n"); + message("cradiobutton_main: Create CRadioButtonTest instance\n"); CRadioButtonTest *test = new CRadioButtonTest(); updateMemoryUsage(g_mmprevious, "After creating CRadioButtonTest"); // Connect the NX server - message(MAIN_STRING "Connect the CRadioButtonTest instance to the NX server\n"); + message("cradiobutton_main: Connect the CRadioButtonTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CRadioButtonTest instance to the NX server\n"); + message("cradiobutton_main: Failed to connect the CRadioButtonTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "cradiobutton_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cradiobutton_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cradiobutton_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "cradiobutton_main: After creating a window"); // Create three radio buttons CRadioButton *button1 = test->newRadioButton(); if (!button1) { - message(MAIN_STRING "Failed to create radio button 1\n"); + message("cradiobutton_main: Failed to create radio button 1\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating radio button 1"); + updateMemoryUsage(g_mmprevious, "cradiobutton_main: After creating radio button 1"); CRadioButton *button2 = test->newRadioButton(); if (!button2) { - message(MAIN_STRING "Failed to create radio button 2\n"); + message("cradiobutton_main: Failed to create radio button 2\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating radio button 2"); + updateMemoryUsage(g_mmprevious, "cradiobutton_main: After creating radio button 2"); CRadioButton *button3 = test->newRadioButton(); if (!button3) { - message(MAIN_STRING "Failed to create radio button 3\n"); + message("cradiobutton_main: Failed to create radio button 3\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating radio button 3"); + updateMemoryUsage(g_mmprevious, "cradiobutton_main: After creating radio button 3"); // Show the initial state of the buttons @@ -206,21 +206,21 @@ int MAIN_NAME(int argc, char *argv[]) // Now push some buttons - message(MAIN_STRING "Pushing button 1\n"); + message("cradiobutton_main: Pushing button 1\n"); test->pushButton(button1); usleep(500*1000); test->showButtonState(); updateMemoryUsage(g_mmprevious, "After pushing button 1"); usleep(500*1000); - message(MAIN_STRING "Pushing button 2\n"); + message("cradiobutton_main: Pushing button 2\n"); test->pushButton(button2); usleep(500*1000); test->showButtonState(); updateMemoryUsage(g_mmprevious, "After pushing button 2"); usleep(500*1000); - message(MAIN_STRING "Pushing button 3\n"); + message("cradiobutton_main: Pushing button 3\n"); test->pushButton(button3); usleep(500*1000); test->showButtonState(); @@ -229,7 +229,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cradiobutton_main: Clean-up and exit\n"); delete test; updateMemoryUsage(g_mmprevious, "After deleting the test"); updateMemoryUsage(g_mmInitial, "Final memory usage"); diff --git a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx index 00cded78c2..540d5019b5 100644 --- a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx +++ b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx @@ -70,16 +70,6 @@ # define CONFIG_CRADIOBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cradiobutton_main -# define MAIN_STRING "cradiobutton_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index a6abb461bd..191324a96c 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cscrollbarhorizontaltest.cxx +CXXSRCS = cscrollbarhorizontal_main.cxx cscrollbarhorizontaltest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx index fac1650338..7742250914 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CSCROLLBARHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cscrollbarhorizontal_main -# define MAIN_STRING "cscrollbarhorizontal_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/NxWidgets/UnitTests/CScrollbarVertical/Makefile index ad7ae2a38d..a2777e7525 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cscrollbarverticaltest.cxx +CXXSRCS = cscrollbarvertical_main.cxx cscrollbarverticaltest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CScrollbarVertical/main.cxx b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx similarity index 80% rename from NxWidgets/UnitTests/CScrollbarVertical/main.cxx rename to NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx index 16bd9eea6a..26dc70dbd3 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/main.cxx +++ b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CScrollbarVertical/main.cxx +// NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cscrollbarvertical_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cscrollbarvertical_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,50 +143,50 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CScrollbarVerticalTest instance\n"); + message("cscrollbarvertical_main: Create CScrollbarVerticalTest instance\n"); CScrollbarVerticalTest *test = new CScrollbarVerticalTest(); updateMemoryUsage(g_mmprevious, "After creating CScrollbarVerticalTest"); // Connect the NX server - message(MAIN_STRING "Connect the CScrollbarVerticalTest instance to the NX server\n"); + message("cscrollbarvertical_main: Connect the CScrollbarVerticalTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CScrollbarVerticalTest instance to the NX server\n"); + message("cscrollbarvertical_main: Failed to connect the CScrollbarVerticalTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "cscrollbarvertical_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cscrollbarvertical_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cscrollbarvertical_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "cscrollbarvertical_main: After creating a window"); // Create a scrollbar - message(MAIN_STRING "Create a Scrollbar\n"); + message("cscrollbarvertical_main: Create a Scrollbar\n"); CScrollbarVertical *scrollbar = test->createScrollbar(); if (!scrollbar) { - message(MAIN_STRING "Failed to create a scrollbar\n"); + message("cscrollbarvertical_main: Failed to create a scrollbar\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a scrollbar"); + updateMemoryUsage(g_mmprevious, "cscrollbarvertical_main: After creating a scrollbar"); // Set the scrollbar minimum and maximum values scrollbar->setMinimumValue(0); scrollbar->setMaximumValue(MAX_SCROLLBAR); scrollbar->setValue(0); - message(MAIN_STRING "Scrollbar range %d->%d Initial value %d\n", + message("cscrollbarvertical_main: Scrollbar range %d->%d Initial value %d\n", scrollbar->getMinimumValue(), scrollbar->getMaximumValue(), scrollbar->getValue()); @@ -201,10 +201,10 @@ int MAIN_NAME(int argc, char *argv[]) { scrollbar->setValue(i); test->showScrollbar(scrollbar); - message(MAIN_STRING "%d. New value %d\n", i, scrollbar->getValue()); + message("cscrollbarvertical_main: %d. New value %d\n", i, scrollbar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the scrollbar up"); + updateMemoryUsage(g_mmprevious, "cscrollbarvertical_main: After moving the scrollbar up"); // And move the scrollbar down @@ -212,15 +212,15 @@ int MAIN_NAME(int argc, char *argv[]) { scrollbar->setValue(i); test->showScrollbar(scrollbar); - message(MAIN_STRING "%d. New value %d\n", i, scrollbar->getValue()); + message("cscrollbarvertical_main: %d. New value %d\n", i, scrollbar->getValue()); usleep(5000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the scrollbar down"); + updateMemoryUsage(g_mmprevious, "cscrollbarvertical_main: After moving the scrollbar down"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cscrollbarvertical_main: Clean-up and exit\n"); delete scrollbar; updateMemoryUsage(g_mmprevious, "After deleting the scrollbar"); delete test; diff --git a/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx index e6005ced97..8b9fb1ee88 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx +++ b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CSCROLLBARVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cscrollbarvertical_main -# define MAIN_STRING "cscrollbarvertical_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/NxWidgets/UnitTests/CSliderHorizonal/Makefile index 0a86aaf5fe..0578510d32 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx csliderhorizontaltest.cxx +CXXSRCS = csliderhorizontal_main.cxx csliderhorizontaltest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CSliderHorizonal/main.cxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx similarity index 81% rename from NxWidgets/UnitTests/CSliderHorizonal/main.cxx rename to NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx index b99d1c5477..a336ba94a7 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/main.cxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CSliderHorizontal/main.cxx +// NxWidgets/UnitTests/CSliderHorizontal/csliderhorizontal_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int csliderhorizontal_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int csliderhorizontal_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,50 +143,50 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CSliderHorizontalTest instance\n"); + message("csliderhorizontal_main: Create CSliderHorizontalTest instance\n"); CSliderHorizontalTest *test = new CSliderHorizontalTest(); updateMemoryUsage(g_mmprevious, "After creating CSliderHorizontalTest"); // Connect the NX server - message(MAIN_STRING "Connect the CSliderHorizontalTest instance to the NX server\n"); + message("csliderhorizontal_main: Connect the CSliderHorizontalTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CSliderHorizontalTest instance to the NX server\n"); + message("csliderhorizontal_main: Failed to connect the CSliderHorizontalTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("csliderhorizontal_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("csliderhorizontal_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After creating a window"); // Create a slider - message(MAIN_STRING "Create a Slider\n"); + message("csliderhorizontal_main: Create a Slider\n"); CSliderHorizontal *slider = test->createSlider(); if (!slider) { - message(MAIN_STRING "Failed to create a slider\n"); + message("csliderhorizontal_main: Failed to create a slider\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a slider"); + updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After creating a slider"); // Set the slider minimum and maximum values slider->setMinimumValue(0); slider->setMaximumValue(MAX_SLIDER); slider->setValue(0); - message(MAIN_STRING "Slider range %d->%d Initial value %d\n", + message("csliderhorizontal_main: Slider range %d->%d Initial value %d\n", slider->getMinimumValue(), slider->getMaximumValue(), slider->getValue()); @@ -201,10 +201,10 @@ int MAIN_NAME(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message(MAIN_STRING "%d. New value %d\n", i, slider->getValue()); + message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the slider up"); + updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider up"); // And move the slider down @@ -212,15 +212,15 @@ int MAIN_NAME(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message(MAIN_STRING "%d. New value %d\n", i, slider->getValue()); + message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the slider down"); + updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider down"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("csliderhorizontal_main: Clean-up and exit\n"); delete slider; updateMemoryUsage(g_mmprevious, "After deleting the slider"); delete test; diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx index 99d6f739ea..9709a2b7c7 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME csliderhorizontal_main -# define MAIN_STRING "csliderhorizontal_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CSliderVertical/Makefile b/NxWidgets/UnitTests/CSliderVertical/Makefile index 76fd0da571..f37cc86191 100644 --- a/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx csliderverticaltest.cxx +CXXSRCS = cslidervertical_main.cxx csliderverticaltest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CSliderVertical/main.cxx b/NxWidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx similarity index 81% rename from NxWidgets/UnitTests/CSliderVertical/main.cxx rename to NxWidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx index f5a53f0189..df356718b1 100644 --- a/NxWidgets/UnitTests/CSliderVertical/main.cxx +++ b/NxWidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CSliderVertical/main.cxx +// NxWidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cslidervertical_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cslidervertical_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,50 +143,50 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CSliderVerticalTest instance\n"); + message("cslidervertical_main: Create CSliderVerticalTest instance\n"); CSliderVerticalTest *test = new CSliderVerticalTest(); updateMemoryUsage(g_mmprevious, "After creating CSliderVerticalTest"); // Connect the NX server - message(MAIN_STRING "Connect the CSliderVerticalTest instance to the NX server\n"); + message("cslidervertical_main: Connect the CSliderVerticalTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CSliderVerticalTest instance to the NX server\n"); + message("cslidervertical_main: Failed to connect the CSliderVerticalTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "cslidervertical_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cslidervertical_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cslidervertical_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "cslidervertical_main: After creating a window"); // Create a slider - message(MAIN_STRING "Create a Slider\n"); + message("cslidervertical_main: Create a Slider\n"); CSliderVertical *slider = test->createSlider(); if (!slider) { - message(MAIN_STRING "Failed to create a slider\n"); + message("cslidervertical_main: Failed to create a slider\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a slider"); + updateMemoryUsage(g_mmprevious, "cslidervertical_main: After creating a slider"); // Set the slider minimum and maximum values slider->setMinimumValue(0); slider->setMaximumValue(MAX_SLIDER); slider->setValue(0); - message(MAIN_STRING "Slider range %d->%d Initial value %d\n", + message("cslidervertical_main: Slider range %d->%d Initial value %d\n", slider->getMinimumValue(), slider->getMaximumValue(), slider->getValue()); @@ -201,10 +201,10 @@ int MAIN_NAME(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message(MAIN_STRING "%d. New value %d\n", i, slider->getValue()); + message("cslidervertical_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the slider up"); + updateMemoryUsage(g_mmprevious, "cslidervertical_main: After moving the slider up"); // And move the slider down @@ -212,15 +212,15 @@ int MAIN_NAME(int argc, char *argv[]) { slider->setValue(i); test->showSlider(slider); - message(MAIN_STRING "%d. New value %d\n", i, slider->getValue()); + message("cslidervertical_main: %d. New value %d\n", i, slider->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the slider down"); + updateMemoryUsage(g_mmprevious, "cslidervertical_main: After moving the slider down"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cslidervertical_main: Clean-up and exit\n"); delete slider; updateMemoryUsage(g_mmprevious, "After deleting the slider"); delete test; diff --git a/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx b/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx index a0d3df801a..3bb174ba0b 100644 --- a/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx +++ b/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CSLIDERVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cslidervertical_main -# define MAIN_STRING "cslidervertical_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - // If debug is enabled, use the debug function, lib_rawprintf() instead // of printf() so that the output is synchronized. diff --git a/NxWidgets/UnitTests/CTextBox/Makefile b/NxWidgets/UnitTests/CTextBox/Makefile index bd7d984912..c368cc4970 100644 --- a/NxWidgets/UnitTests/CTextBox/Makefile +++ b/NxWidgets/UnitTests/CTextBox/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx ctextboxtest.cxx +CXXSRCS = ctextbox_main.cxx ctextboxtest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CTextBox/main.cxx b/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx similarity index 87% rename from NxWidgets/UnitTests/CTextBox/main.cxx rename to NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx index b5b8ec4d51..da76c88cf3 100644 --- a/NxWidgets/UnitTests/CTextBox/main.cxx +++ b/NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CTextBox/main.cxx +// NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -69,7 +69,7 @@ static const char string2[] = "\b\b\bn Doe\r"; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int ctextbox_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Public Functions @@ -79,29 +79,29 @@ extern "C" int MAIN_NAME(int argc, char *argv[]); // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int ctextbox_main(int argc, char *argv[]) { // Create an instance of the font test - printf(MAIN_STRING "Create CTextBoxTest instance\n"); + printf("ctextbox_main: Create CTextBoxTest instance\n"); CTextBoxTest *test = new CTextBoxTest(); // Connect the NX server - printf(MAIN_STRING "Connect the CTextBoxTest instance to the NX server\n"); + printf("ctextbox_main: Connect the CTextBoxTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CTextBoxTest instance to the NX server\n"); + printf("ctextbox_main: Failed to connect the CTextBoxTest instance to the NX server\n"); delete test; return 1; } // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("ctextbox_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("ctextbox_main: Failed to create a window\n"); delete test; return 1; } @@ -111,7 +111,7 @@ int MAIN_NAME(int argc, char *argv[]) CTextBox *textbox = test->createTextBox(); if (!textbox) { - printf(MAIN_STRING "Failed to create a text box\n"); + printf("ctextbox_main: Failed to create a text box\n"); delete test; return 1; } @@ -133,7 +133,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit sleep(2); - printf(MAIN_STRING "Clean-up and exit\n"); + printf("ctextbox_main: Clean-up and exit\n"); delete textbox; delete test; return 0; diff --git a/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx b/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx index 1d470a1a8e..9da8ce09fa 100644 --- a/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx +++ b/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CTEXTBOXTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME ctextbox_main -# define MAIN_STRING "ctextbox_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// diff --git a/NxWidgets/UnitTests/nxwm/Makefile b/NxWidgets/UnitTests/nxwm/Makefile index 9648ad807d..11c670ece3 100644 --- a/NxWidgets/UnitTests/nxwm/Makefile +++ b/NxWidgets/UnitTests/nxwm/Makefile @@ -77,7 +77,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx +CXXSRCS = nxwm_main.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/nxwm/main.cxx b/NxWidgets/UnitTests/nxwm/nxwm_main.cxx similarity index 93% rename from NxWidgets/UnitTests/nxwm/main.cxx rename to NxWidgets/UnitTests/nxwm/nxwm_main.cxx index f61252904c..eefc44494e 100644 --- a/NxWidgets/UnitTests/nxwm/main.cxx +++ b/NxWidgets/UnitTests/nxwm/nxwm_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/nxwm/main.cxx +// NxWidgets/UnitTests/nxwm/nxwm_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -62,16 +62,6 @@ // Pre-processor Definitions ///////////////////////////////////////////////////////////////////////////// -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME nxwm_main -# define MAIN_STRING "nxwm_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - #ifdef CONFIG_HAVE_FILENAME # define showTestStepMemory(msg) \ _showTestStepMemory((FAR const char*)__FILE__, (int)__LINE__, msg) @@ -121,7 +111,7 @@ static struct SNxWmTest g_nxwmtest; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int nxwm_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Public Functions @@ -503,7 +493,7 @@ static bool createCalibration(void) printf("createCalibration: Start the calibration application\n"); if (!g_nxwmtest.taskbar->startApplication(calibration, false)) { - printf(MAIN_STRING "ERROR: Failed to start the calibration application\n"); + printf("createCalibration ERROR: Failed to start the calibration application\n"); delete calibration; return false; } @@ -599,7 +589,7 @@ void showTestStepMemory(FAR const char *msg) // user_start/nxwm_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int nxwm_main(int argc, char *argv[]) { // Call all C++ static constructors @@ -613,19 +603,19 @@ int MAIN_NAME(int argc, char *argv[]) // Initialize the NSH library - printf(MAIN_STRING "Initialize the NSH library\n"); + printf("nxwm_main: Initialize the NSH library\n"); if (!NxWM::nshlibInitialize()) { - printf(MAIN_STRING "ERROR: Failed to initialize the NSH library\n"); + printf("nxwm_main: ERROR: Failed to initialize the NSH library\n"); return EXIT_FAILURE; } - showTestCaseMemory(MAIN_STRING "After initializing the NSH library"); + showTestCaseMemory("nxwm_main: After initializing the NSH library"); // Create the task bar. if (!createTaskbar()) { - printf(MAIN_STRING "ERROR: Failed to create the task bar\n"); + printf("nxwm_main: ERROR: Failed to create the task bar\n"); testCleanUpAndExit(EXIT_FAILURE); } @@ -633,7 +623,7 @@ int MAIN_NAME(int argc, char *argv[]) if (!createStartWindow()) { - printf(MAIN_STRING "ERROR: Failed to create the start window\n"); + printf("nxwm_main: ERROR: Failed to create the start window\n"); testCleanUpAndExit(EXIT_FAILURE); } @@ -642,7 +632,7 @@ int MAIN_NAME(int argc, char *argv[]) #ifdef CONFIG_NXWM_KEYBOARD if (!createKeyboard()) { - printf(MAIN_STRING "ERROR: Failed to create the keyboard\n"); + printf("nxwm_main: ERROR: Failed to create the keyboard\n"); testCleanUpAndExit(EXIT_FAILURE); } #endif @@ -652,7 +642,7 @@ int MAIN_NAME(int argc, char *argv[]) #ifdef CONFIG_NXWM_TOUCHSCREEN if (!createTouchScreen()) { - printf(MAIN_STRING "ERROR: Failed to create the touchscreen\n"); + printf("nxwm_main ERROR: Failed to create the touchscreen\n"); testCleanUpAndExit(EXIT_FAILURE); } #endif @@ -662,7 +652,7 @@ int MAIN_NAME(int argc, char *argv[]) #ifdef CONFIG_NXWM_TOUCHSCREEN if (!createCalibration()) { - printf(MAIN_STRING "ERROR: Failed to create the calibration application\n"); + printf("nxwm_main ERROR: Failed to create the calibration application\n"); testCleanUpAndExit(EXIT_FAILURE); } #endif @@ -671,7 +661,7 @@ int MAIN_NAME(int argc, char *argv[]) if (!createNxConsole()) { - printf(MAIN_STRING "ERROR: Failed to create the NxConsole application\n"); + printf("nxwm_main: ERROR: Failed to create the NxConsole application\n"); testCleanUpAndExit(EXIT_FAILURE); } @@ -679,7 +669,7 @@ int MAIN_NAME(int argc, char *argv[]) if (!createHexCalculator()) { - printf(MAIN_STRING "ERROR: Failed to create the hex calculator application\n"); + printf("nxwm_main: ERROR: Failed to create the hex calculator application\n"); testCleanUpAndExit(EXIT_FAILURE); } @@ -687,7 +677,7 @@ int MAIN_NAME(int argc, char *argv[]) if (!startWindowManager()) { - printf(MAIN_STRING "ERROR: Failed to start the window manager\n"); + printf("nxwm_main: ERROR: Failed to start the window manager\n"); testCleanUpAndExit(EXIT_FAILURE); } @@ -697,7 +687,7 @@ int MAIN_NAME(int argc, char *argv[]) // to know whenthe touchscreen has been calibrated. If we really want to know, // we have to poll - printf(MAIN_STRING "Waiting for touchscreen calibration\n"); + printf("nxwm_main: Waiting for touchscreen calibration\n"); while (!g_nxwmtest.touchscreen->isCalibrated()) { std::sleep(2); @@ -708,10 +698,10 @@ int MAIN_NAME(int argc, char *argv[]) // After the touchscreen driver gets it, it will report isCalibrated() == true // and then we can read the calibration data from the touchscreen driver. - printf(MAIN_STRING "Getting calibration data from the touchscreen\n"); + printf("nxwm_main: Getting calibration data from the touchscreen\n"); if (!g_nxwmtest.touchscreen->getCalibrationData(g_nxwmtest.calibData)) { - printf(MAIN_STRING "ERROR: Failed to get calibration data from the touchscreen\n"); + printf("nxwm_main: ERROR: Failed to get calibration data from the touchscreen\n"); } #endif @@ -723,7 +713,7 @@ int MAIN_NAME(int argc, char *argv[]) g_nxwmtest.taskbar->clickIcon(0, true); usleep(500*1000); g_nxwmtest.taskbar->clickIcon(0, false); - showTestCaseMemory(MAIN_STRING "After clicking the start window icon"); + showTestCaseMemory("nxwm_main: After clicking the start window icon"); // Wait bit to see the result of the button press. Then press the first icon // in the start menu. That should be the NxConsole icon. @@ -732,13 +722,13 @@ int MAIN_NAME(int argc, char *argv[]) g_nxwmtest.startwindow->clickIcon(0, true); usleep(500*1000); g_nxwmtest.startwindow->clickIcon(0, false); - showTestCaseMemory(MAIN_STRING "After clicking the NxConsole icon"); + showTestCaseMemory("nxwm_main: After clicking the NxConsole icon"); #endif // Wait bit to see the result of the button press. sleep(2); - showTestMemory(MAIN_STRING "Final memory usage"); + showTestMemory("nxwm_main: Final memory usage"); return EXIT_SUCCESS; } diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig index 4ce5a70c68..812233cbfe 100644 --- a/nuttx/configs/sim/nxwm/defconfig +++ b/nuttx/configs/sim/nxwm/defconfig @@ -67,7 +67,7 @@ CONFIG_SIM_TOUCHSCREEN=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="user_start" +CONFIG_USER_ENTRYPOINT="nxwm_main" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=y diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index 681f8c7661..4ce770bf16 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -256,7 +256,7 @@ CONFIG_HAVE_LIBM=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="user_start" +CONFIG_USER_ENTRYPOINT="nxwm_main" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=n diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 8252f53712..2ace5113d8 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -262,7 +262,7 @@ CONFIG_HAVE_LIBM=n # # General OS setup # -CONFIG_USER_ENTRYPOINT="user_start" +CONFIG_USER_ENTRYPOINT="nxwm_main" CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_DEBUG_SYMBOLS=n From 2c2ba7f0c5f99aef3fac0eaa8a2c7a79c5faa74d Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 14 Sep 2012 18:14:40 +0000 Subject: [PATCH 73/95] Missed one file in last checking; Gran allocator alignment decoupled from granule size git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5152 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- ...main.cxx => cscrollbarhorizontal_main.cxx} | 38 ++++----- nuttx/include/nuttx/gran.h | 41 ++++++++-- nuttx/mm/mm_graninit.c | 77 +++++++++++++++---- 3 files changed, 118 insertions(+), 38 deletions(-) rename NxWidgets/UnitTests/CScrollbarHorizontal/{main.cxx => cscrollbarhorizontal_main.cxx} (80%) diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/main.cxx b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx similarity index 80% rename from NxWidgets/UnitTests/CScrollbarHorizontal/main.cxx rename to NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx index a6a08cdbd5..2b9adab11d 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/main.cxx +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CScrollbarHorizontal/main.cxx +// NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cscrollbarhorizontal_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cscrollbarhorizontal_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,50 +143,50 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CScrollbarHorizontalTest instance\n"); + message("cscrollbarhorizontal_main: Create CScrollbarHorizontalTest instance\n"); CScrollbarHorizontalTest *test = new CScrollbarHorizontalTest(); updateMemoryUsage(g_mmprevious, "After creating CScrollbarHorizontalTest"); // Connect the NX server - message(MAIN_STRING "Connect the CScrollbarHorizontalTest instance to the NX server\n"); + message("cscrollbarhorizontal_main: Connect the CScrollbarHorizontalTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CScrollbarHorizontalTest instance to the NX server\n"); + message("cscrollbarhorizontal_main: Failed to connect the CScrollbarHorizontalTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "cscrollbarhorizontal_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cscrollbarhorizontal_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cscrollbarhorizontal_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "cscrollbarhorizontal_main: After creating a window"); // Create a scrollbar - message(MAIN_STRING "Create a Scrollbar\n"); + message("cscrollbarhorizontal_main: Create a Scrollbar\n"); CScrollbarHorizontal *scrollbar = test->createScrollbar(); if (!scrollbar) { - message(MAIN_STRING "Failed to create a scrollbar\n"); + message("cscrollbarhorizontal_main: Failed to create a scrollbar\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a scrollbar"); + updateMemoryUsage(g_mmprevious, "cscrollbarhorizontal_main: After creating a scrollbar"); // Set the scrollbar minimum and maximum values scrollbar->setMinimumValue(0); scrollbar->setMaximumValue(MAX_SCROLLBAR); scrollbar->setValue(0); - message(MAIN_STRING "Scrollbar range %d->%d Initial value %d\n", + message("cscrollbarhorizontal_main: Scrollbar range %d->%d Initial value %d\n", scrollbar->getMinimumValue(), scrollbar->getMaximumValue(), scrollbar->getValue()); @@ -201,10 +201,10 @@ int MAIN_NAME(int argc, char *argv[]) { scrollbar->setValue(i); test->showScrollbar(scrollbar); - message(MAIN_STRING "%d. New value %d\n", i, scrollbar->getValue()); + message("cscrollbarhorizontal_main: %d. New value %d\n", i, scrollbar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the scrollbar up"); + updateMemoryUsage(g_mmprevious, "cscrollbarhorizontal_main: After moving the scrollbar up"); // And move the scrollbar down @@ -212,15 +212,15 @@ int MAIN_NAME(int argc, char *argv[]) { scrollbar->setValue(i); test->showScrollbar(scrollbar); - message(MAIN_STRING "%d. New value %d\n", i, scrollbar->getValue()); + message("cscrollbarhorizontal_main: %d. New value %d\n", i, scrollbar->getValue()); usleep(1000); // The simulation needs this to let the X11 event loop run } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After moving the scrollbar down"); + updateMemoryUsage(g_mmprevious, "cscrollbarhorizontal_main: After moving the scrollbar down"); sleep(1); // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cscrollbarhorizontal_main: Clean-up and exit\n"); delete scrollbar; updateMemoryUsage(g_mmprevious, "After deleting the scrollbar"); delete test; diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index f3a6d0fe9b..5390618a32 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -90,9 +90,32 @@ extern "C" { * * Description: * Set up one granule allocator instance. Allocations will be aligned to - * the granule size; allocations will be in units of the granule size. - * Larger granules will give better performance and less overhead but more - * losses of memory due to alignment and quantization waste. + * the alignment size (log2align; allocations will be in units of the + * granule size (log2gran). Larger granules will give better performance + * and less overhead but more losses of memory due to alignment + * quantization waste. Additional memory waste can occur form alignment; + * log2align should be set to 0 unless you are using the granule allocator + * to manage DMA memory and your hardware has specific memory alignment + * requirements. + * + * Geneneral Usage Summary. This is an example using the GCC section + * attribute to position a DMA heap in memory (logic in the linker script + * would assign the section .dmaheap to the DMA memory. + * + * FAR uint32_t g_dmaheap[DMAHEAP_SIZE] __attribute__((section(.dmaheap))); + * + * The heap is created by calling gran_initialize. Here the granual size + * is set to 64 bytes and the alignment to 16 bytes: + * + * GRAN_HANDLE handle = gran_initialize(g_dmaheap, DMAHEAP_SIZE, 6, 4); + * + * Then the GRAN_HANDLE can be used to allocate memory (There is no + * GRAN_HANDLE if CONFIG_GRAN_SINGLE=y): + * + * FAR uint8_t *dma_memory = (FAR uint8_t *)gran_alloc(handle, 47); + * + * The actual memory allocates will be 64 byte (wasting 17 bytes) and + * will be aligned at least to (1 << log2align). * * NOTE: The current implementation also restricts the maximum allocation * size to 32 granules. That restriction could be eliminated with some @@ -102,7 +125,13 @@ extern "C" { * heapstart - Start of the granule allocation heap * heapsize - Size of heap in bytes * log2gran - Log base 2 of the size of one granule. 0->1 byte, - * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. + * log2align - Log base 2 of required alignment. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. Note that + * log2gran must be greater than or equal to log2align + * so that all contiguous granules in memory will meet + * the minimum alignment requirement. A value of zero + * would mean that no alignment is required. * * Returned Value: * On success, a non-NULL handle is returned that may be used with other @@ -112,10 +141,10 @@ extern "C" { #ifdef CONFIG_GRAN_SINGLE EXTERN int gran_initialize(FAR void *heapstart, size_t heapsize, - uint8_t log2gran); + uint8_t log2gran, uint8_t log2align); #else EXTERN GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, - uint8_t log2gran); + uint8_t log2gran, uint8_t log2align); #endif /**************************************************************************** diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index cde2370d0b..16cebdcf39 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -78,7 +78,13 @@ FAR struct gran_s *g_graninfo; * heapstart - Start of the granule allocation heap * heapsize - Size of heap in bytes * log2gran - Log base 2 of the size of one granule. 0->1 byte, - * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. + * log2align - Log base 2 of required alignment. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. Note that + * log2gran must be greater than or equal to log2align + * so that all contiguous granules in memory will meet + * the minimum alignment requirement. A value of zero + * would mean that no alignment is required. * * Returned Value: * On success, a non-NULL info structure is returned that may be used with @@ -86,9 +92,9 @@ FAR struct gran_s *g_graninfo; * ****************************************************************************/ -static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, - size_t heapsize, - uint8_t log2gran) +static inline FAR struct gran_s * +gran_common_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran, + uint8_t log2align) { FAR struct gran_s *priv; uintptr_t heapend; @@ -97,13 +103,24 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, unsigned int alignedsize; unsigned int ngranules; - DEBUGASSERT(heapstart && heapsize > 0 && log2gran > 0 && log2gran < 32); + /* Check parameters if debug is on. Note the the size of a granual is + * limited to 2**31 bytes and that the size of the granule must be greater + * than the alignment size. + */ + DEBUGASSERT(heapstart && heapsize > 0 && + log2gran > 0 && log2gran < 32 && + log2gran > log2align); + + /* Get the aligned start of the heap */ + + mask = (1 << log2align) - 1; + alignedstart = ((uintptr_t)heapstart + mask) & ~mask; + /* Determine the number of granules */ mask = (1 << log2gran) - 1; heapend = (uintptr_t)heapstart + heapsize; - alignedstart = ((uintptr_t)heapstart + mask) & ~mask; alignedsize = (heapend - alignedstart) & ~mask; ngranules = alignedsize >> log2gran; @@ -139,9 +156,32 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, * * Description: * Set up one granule allocator instance. Allocations will be aligned to - * the granule size; allocations will be in units of the granule size. - * Larger granules will give better performance and less overhead but more - * losses of memory due to alignment and quantization waste. + * the alignment size (log2align; allocations will be in units of the + * granule size (log2gran). Larger granules will give better performance + * and less overhead but more losses of memory due to alignment + * quantization waste. Additional memory waste can occur form alignment; + * log2align should be set to 0 unless you are using the granule allocator + * to manage DMA memory and your hardware has specific memory alignment + * requirements. + * + * Geneneral Usage Summary. This is an example using the GCC section + * attribute to position a DMA heap in memory (logic in the linker script + * would assign the section .dmaheap to the DMA memory. + * + * FAR uint32_t g_dmaheap[DMAHEAP_SIZE] __attribute__((section(.dmaheap))); + * + * The heap is created by calling gran_initialize(). Here the granual size + * is set to 64 bytes (2**6) and the alignment to 16 bytes (2**4): + * + * GRAN_HANDLE handle = gran_initialize(g_dmaheap, DMAHEAP_SIZE, 6, 4); + * + * Then the GRAN_HANDLE can be used to allocate memory (There is no + * GRAN_HANDLE if CONFIG_GRAN_SINGLE=y): + * + * FAR uint8_t *dma_memory = (FAR uint8_t *)gran_alloc(handle, 47); + * + * The actual memory allocates will be 64 byte (wasting 17 bytes) and + * will be aligned at least to (1 << log2align). * * NOTE: The current implementation also restricts the maximum allocation * size to 32 granules. That restriction could be eliminated with some @@ -151,7 +191,13 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, * heapstart - Start of the granule allocation heap * heapsize - Size of heap in bytes * log2gran - Log base 2 of the size of one granule. 0->1 byte, - * 1->2 bytes, 2->4 bytes, 3-> 8bytes, etc. + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. + * log2align - Log base 2 of required alignment. 0->1 byte, + * 1->2 bytes, 2->4 bytes, 3-> 8 bytes, etc. Note that + * log2gran must be greater than or equal to log2align + * so that all contiguous granules in memory will meet + * the minimum alignment requirement. A value of zero + * would mean that no alignment is required. * * Returned Value: * On success, a non-NULL handle is returned that may be used with other @@ -160,9 +206,12 @@ static inline FAR struct gran_s *gran_common_initialize(FAR void *heapstart, ****************************************************************************/ #ifdef CONFIG_GRAN_SINGLE +int gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran, + uint8_t log2align) int gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) { - g_graninfo = gran_common_initialize(heapstart, heapsize, log2gran); + g_graninfo = gran_common_initialize(heapstart, heapsize, log2gran, + log2align); if (!g_graninfo) { return -ENOMEM; @@ -171,9 +220,11 @@ int gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) return OK; } #else -GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran) +GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize, + uint8_t log2gran, uint8_t log2align) { - return (GRAN_HANDLE)gran_common_initialize(heapstart, heapsize, log2gran); + return (GRAN_HANDLE)gran_common_initialize(heapstart, heapsize, + log2gran, log2align); } #endif From 7c82cf692476202eb80d4caa4122c4cd390d2b2d Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 14 Sep 2012 20:16:06 +0000 Subject: [PATCH 74/95] Fix ENC28J60 chip enable issue git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5153 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/fire-stm32v2/README.txt | 10 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 126 +++++++++++++--------- nuttx/configs/fire-stm32v2/src/up_mmcsd.c | 1 + nuttx/drivers/mtd/sst25.c | 2 +- nuttx/drivers/net/enc28j60.c | 12 +-- nuttx/include/nuttx/gran.h | 9 +- nuttx/mm/README.txt | 35 ++++-- nuttx/mm/mm_graninit.c | 9 +- 8 files changed, 128 insertions(+), 76 deletions(-) diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index d01ba3219a..3a94365afc 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -765,10 +765,18 @@ Where is one of the following: contains support for some built-in applications that can be enabled by making some additional minor change to the configuration file. - NOTE: This configuration uses to the mconf configuration tool to control + Reconfiguring: This configuration uses to the mconf configuration tool to control the configuration. See the section entitled "NuttX Configuration Tool" in the top-level README.txt file. + Start Delays: If no SD card is present in the slot, or if the network is not + connected, then there will be long start-up delays before you get the NSH + prompt. If I am focused on ENC28J60 debug, I usually disable MMC/SD so that + I don't have to bother with the SD card: + + CONFIG_STM32_SDIO=n + CONFIG_MMCSD=n + STATUS: The board port is basically functional. Not all features have been verified. The ENC28J60 network is not yet functional. Networking is enabled by default in this configuration for testing purposes. To use this diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index 1a849ad367..d7cd910a24 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -289,8 +289,8 @@ CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=16 +CONFIG_PREALLOC_TIMERS=8 # # Stack and heap information @@ -387,12 +387,17 @@ CONFIG_USART2_BITS=8 CONFIG_USART2_PARITY=0 CONFIG_USART2_2STOP=0 CONFIG_USBDEV=y -# CONFIG_USBDEV_COMPOSITE is not set + +# +# Device Controller Driver Options +# # CONFIG_USBDEV_ISOCHRONOUS is not set # CONFIG_USBDEV_DUALSPEED is not set CONFIG_USBDEV_SELFPOWERED=y # CONFIG_USBDEV_BUSPOWERED is not set +# CONFIG_USBDEV_DMA is not set # CONFIG_USBDEV_TRACE is not set +# CONFIG_USBDEV_COMPOSITE is not set # CONFIG_PL2303 is not set # CONFIG_CDCACM is not set CONFIG_USBMSC=y @@ -521,142 +526,142 @@ CONFIG_NAMEDAPP=y # # -# ADC example +# ADC Example # # CONFIG_EXAMPLES_ADC is not set # -# Buttons example +# Buttons Example # # CONFIG_EXAMPLES_BUTTONS is not set # -# CAN example +# CAN Example # # CONFIG_EXAMPLES_CAN is not set # -# USB CDC/ACM class driver example +# USB CDC/ACM Class Driver Example # # CONFIG_EXAMPLES_CDCACM is not set # -# USB composite class driver example +# USB composite Class Driver Example # # CONFIG_EXAMPLES_COMPOSITE is not set # -# DHCP server example +# DHCP Server Example # # CONFIG_EXAMPLES_DHCPD is not set # -# FTP client example +# FTP Client Example # # CONFIG_EXAMPLES_FTPC is not set # -# FTP server example +# FTP Server Example # # CONFIG_EXAMPLES_FTPD is not set # -# "Hello, World!" example +# "Hello, World!" Example # # CONFIG_EXAMPLES_HELLO is not set # -# "Hello, World!" C++ example +# "Hello, World!" C++ Example # # CONFIG_EXAMPLES_HELLOXX is not set # -# USB HID keyboard example +# USB HID Keyboard Example # # CONFIG_EXAMPLES_HIDKBD is not set # -# IGMP example +# IGMP Example # # CONFIG_EXAMPLES_IGMP is not set # -# LCD read/write example +# LCD Read/Write Example # # CONFIG_EXAMPLES_LCDRW is not set # -# Memory management example +# Memory Management Example # # CONFIG_EXAMPLES_MM is not set # -# File system mount example +# File System Mount Example # # CONFIG_EXAMPLES_MOUNT is not set # -# FreeModBus example +# FreeModBus Example # # CONFIG_EXAMPLES_MODBUS is not set # -# Network test example +# Network Test Example # # CONFIG_EXAMPLES_NETTEST is not set # -# NuttShell (NSH) example +# NuttShell (NSH) Example # CONFIG_EXAMPLES_NSH=y # -# NULL example +# NULL Example # # CONFIG_EXAMPLES_NULL is not set # -# NX graphics example +# NX Graphics Example # # CONFIG_EXAMPLES_NX is not set # -# NxConsole example +# NxConsole Example # # CONFIG_EXAMPLES_NXCONSOLE is not set # -# NXFFS file system example +# NXFFS File System Example # # CONFIG_EXAMPLES_NXFFS is not set # -# NXFLAT example +# NXFLAT Example # # CONFIG_EXAMPLES_NXFLAT is not set # -# NX graphics "Hello, World!" example +# NX Graphics "Hello, World!" Example # # CONFIG_EXAMPLES_NXHELLO is not set # -# NX graphics image example +# NX Graphics image Example # # CONFIG_EXAMPLES_NXIMAGE is not set # -# NX graphics lines example +# NX Graphics lines Example # # CONFIG_EXAMPLES_NXLINES is not set # -# NX graphics text example +# NX Graphics Text Example # # CONFIG_EXAMPLES_NXTEXT is not set # -# OS test example +# OS Test Example # # CONFIG_EXAMPLES_OSTEST is not set @@ -666,81 +671,86 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_PASHELLO is not set # -# Pipe example +# Pipe Example # # CONFIG_EXAMPLES_PIPE is not set # -# Poll example +# Poll Example # # CONFIG_EXAMPLES_POLL is not set # -# Pulse width modulation (PWM) example +# Pulse Width Modulation (PWM) Example # # -# Quadrature encoder example +# Quadrature Encoder Example # # CONFIG_EXAMPLES_QENCODER is not set # -# RGMP example +# RGMP Example # # CONFIG_EXAMPLES_RGMP is not set # -# ROMFS example +# ROMFS Example # # CONFIG_EXAMPLES_ROMFS is not set # -# sendmail example +# sendmail Example # # CONFIG_EXAMPLES_SENDMAIL is not set # -# Serial loopback example +# Serial Loopback Example # # CONFIG_EXAMPLES_SERLOOP is not set # -# Telnet daemon example +# Telnet Daemon Example # # CONFIG_EXAMPLES_TELNETD is not set # -# THTTPD web server example +# THTTPD Web Server Example # # CONFIG_EXAMPLES_THTTPD is not set # -# TIFF generation example +# TIFF Generation Example # # CONFIG_EXAMPLES_TIFF is not set # -# Touchscreen example +# Touchscreen Example # # CONFIG_EXAMPLES_TOUCHSCREEN is not set # -# UDP example +# UDP Example # # CONFIG_EXAMPLES_UDP is not set # -# uIP web server example +# UDP Discovery Daemon Example +# +# CONFIG_EXAMPLE_DISCOVER is not set + +# +# uIP Web Server Example # # CONFIG_EXAMPLES_UIP is not set # -# USB serial test example +# USB Serial Test Example # # CONFIG_EXAMPLES_USBSERIAL is not set # -# USB mass storage class example +# USB Mass Storage Class Example # CONFIG_EXAMPLES_USBMSC=y CONFIG_EXAMPLES_USBMSC_BUILTIN=y @@ -759,25 +769,29 @@ CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS is not set # -# USB serial terminal example +# USB Serial Terminal Example # # CONFIG_EXAMPLES_USBTERM is not set # -# Watchdog timer example +# Watchdog timer Example # # CONFIG_EXAMPLES_WATCHDOG is not set # -# wget example +# wget Example # # CONFIG_EXAMPLES_WGET is not set # -# WLAN example +# WLAN Example # # CONFIG_EXAMPLES_WLAN is not set +# +# XML RPC Example +# + # # Interpreters # @@ -857,6 +871,16 @@ CONFIG_NETUTILS_WEBCLIENT=y # # CONFIG_NETUTILS_WEBSERVER is not set +# +# UDP Discovery Utility +# +# CONFIG_NETUTILS_DISCOVER is not set + +# +# XML-RPC library +# +# CONFIG_NETUTILS_XMLRPC is not set + # # ModBus # diff --git a/nuttx/configs/fire-stm32v2/src/up_mmcsd.c b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c index c0c6693d34..e06a17e89a 100644 --- a/nuttx/configs/fire-stm32v2/src/up_mmcsd.c +++ b/nuttx/configs/fire-stm32v2/src/up_mmcsd.c @@ -47,6 +47,7 @@ #include #include +#include "stm32_sdio.h" #include "fire-internal.h" /**************************************************************************** diff --git a/nuttx/drivers/mtd/sst25.c b/nuttx/drivers/mtd/sst25.c index 01838f078e..66d201add2 100644 --- a/nuttx/drivers/mtd/sst25.c +++ b/nuttx/drivers/mtd/sst25.c @@ -1,5 +1,5 @@ /************************************************************************************ - * drivers/mtd/m25px.c + * drivers/mtd/sst25.c * Driver for SPI-based SST25 FLASH. * * Copyright (C) 2012 Gregory Nutt. All rights reserved. diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index d3c735b11e..6ac399a197 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -652,14 +652,14 @@ static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) DEBUGASSERT(priv && priv->spi); - /* Select ENC28J60 chip */ - - enc_select(priv); - /* Set the bank */ enc_setbank(priv, GETBANK(ctrlreg)); + /* Select ENC28J60 chip */ + + enc_select(priv); + /* Send the RCR command and collect the data. How we collect the data * depends on if this is a PHY/CAN or not. The normal sequence requires * 16-clocks: 8 to clock out the cmd and 8 to clock in the data. @@ -672,10 +672,10 @@ static uint8_t enc_rdbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg) * 8 dummy bits, and 8 to clock in the PHY/MAC data. */ - (void)SPI_SEND(priv->spi, 0); /* Clock in the dummy byte */ + (void)SPI_SEND(priv->spi, 0); /* Clock in the dummy byte */ } - rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ + rddata = SPI_SEND(priv->spi, 0); /* Clock in the data */ /* De-select ENC28J60 chip */ diff --git a/nuttx/include/nuttx/gran.h b/nuttx/include/nuttx/gran.h index 5390618a32..5e980dd9cf 100644 --- a/nuttx/include/nuttx/gran.h +++ b/nuttx/include/nuttx/gran.h @@ -92,11 +92,10 @@ extern "C" { * Set up one granule allocator instance. Allocations will be aligned to * the alignment size (log2align; allocations will be in units of the * granule size (log2gran). Larger granules will give better performance - * and less overhead but more losses of memory due to alignment - * quantization waste. Additional memory waste can occur form alignment; - * log2align should be set to 0 unless you are using the granule allocator - * to manage DMA memory and your hardware has specific memory alignment - * requirements. + * and less overhead but more losses of memory due to quantization waste. + * Additional memory waste can occur from alignment; log2align should be + * set to 0 unless you are using the granule allocator to manage DMA memory + * and your hardware has specific memory alignment requirements. * * Geneneral Usage Summary. This is an example using the GCC section * attribute to position a DMA heap in memory (logic in the linker script diff --git a/nuttx/mm/README.txt b/nuttx/mm/README.txt index b0b80deae2..2668432e3c 100644 --- a/nuttx/mm/README.txt +++ b/nuttx/mm/README.txt @@ -46,8 +46,8 @@ This directory contains the NuttX memory management logic. This include: 3) Granule Allocator. A non-standard granule allocator is also available in this directory The granule allocator allocates memory in units - of a fixed sized block ("granule"). All memory is aligned to the size - of one granule. + of a fixed sized block ("granule"). Allocations may be aligned to a user- + provided address boundary. The granule allocator interfaces are defined in nuttx/include/nuttx/gran.h. The granule allocator consists of these files in this directory: @@ -59,13 +59,34 @@ This directory contains the NuttX memory management logic. This include: as of this writing. The intent of the granule allocator is to provide a tool to support platform-specific management of aligned DMA memory. - NOTE: Because each granule is aligned to the granule size and each - allocations is in units of the granule size, selection of the granule - size is important: Larger granules will give better performance and - less overhead but more losses of memory due to alignment and quantization - waste. + NOTE: Because each granule may be aligned and each allocation is in + units of the granule size, selection of the granule size is important: + Larger granules will give better performance and less overhead but more + losses of memory due to quantization waste. Additional memory waste + can occur from alignment; Of course, heap alignment should no be + used unless (a) you are using the granule allocator to manage DMA memory + and (b) your hardware has specific memory alignment requirements. The current implementation also restricts the maximum allocation size to 32 granules. That restriction could be eliminated with some additional coding effort, but currently requires larger granule sizes for larger allocations. + + Geneneral Usage Example. This is an example using the GCC section + attribute to position a DMA heap in memory (logic in the linker script + would assign the section .dmaheap to the DMA memory. + + FAR uint32_t g_dmaheap[DMAHEAP_SIZE] __attribute__((section(.dmaheap))); + + The heap is created by calling gran_initialize. Here the granual size + is set to 64 bytes and the alignment to 16 bytes: + + GRAN_HANDLE handle = gran_initialize(g_dmaheap, DMAHEAP_SIZE, 6, 4); + + Then the GRAN_HANDLE can be used to allocate memory (There is no + GRAN_HANDLE if CONFIG_GRAN_SINGLE=y): + + FAR uint8_t *dma_memory = (FAR uint8_t *)gran_alloc(handle, 47); + + The actual memory allocates will be 64 byte (wasting 17 bytes) and + will be aligned at least to (1 << log2align). diff --git a/nuttx/mm/mm_graninit.c b/nuttx/mm/mm_graninit.c index 16cebdcf39..e43839ad60 100644 --- a/nuttx/mm/mm_graninit.c +++ b/nuttx/mm/mm_graninit.c @@ -158,11 +158,10 @@ gran_common_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran, * Set up one granule allocator instance. Allocations will be aligned to * the alignment size (log2align; allocations will be in units of the * granule size (log2gran). Larger granules will give better performance - * and less overhead but more losses of memory due to alignment - * quantization waste. Additional memory waste can occur form alignment; - * log2align should be set to 0 unless you are using the granule allocator - * to manage DMA memory and your hardware has specific memory alignment - * requirements. + * and less overhead but more losses of memory due to quantization waste. + * Additional memory waste can occur from alignment; log2align should be + * set to 0 unless you are using the granule allocator to manage DMA memory + * and your hardware has specific memory alignment requirements. * * Geneneral Usage Summary. This is an example using the GCC section * attribute to position a DMA heap in memory (logic in the linker script From cfa24e37d6f153dbb5c7e2e0de6484719ea4a9b0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 14 Sep 2012 21:48:07 +0000 Subject: [PATCH 75/95] Some ENC28J60-related fixes git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5154 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/examples/xmlrpc/Kconfig | 1 + apps/nshlib/nsh_netinit.c | 1 + nuttx/configs/fire-stm32v2/nsh/defconfig | 2 +- nuttx/configs/fire-stm32v2/src/up_autoleds.c | 16 ++++++------- nuttx/configs/fire-stm32v2/src/up_enc28j60.c | 4 ++-- nuttx/drivers/net/enc28j60.c | 24 ++++++++++++++++++-- nuttx/include/nuttx/net/enc28j60.h | 16 +++++++++++++ 7 files changed, 51 insertions(+), 13 deletions(-) diff --git a/apps/examples/xmlrpc/Kconfig b/apps/examples/xmlrpc/Kconfig index ee61feb50d..80ee5a2254 100644 --- a/apps/examples/xmlrpc/Kconfig +++ b/apps/examples/xmlrpc/Kconfig @@ -16,6 +16,7 @@ config EXAMPLES_XMLRPC config EXAMPLES_XMLRPC_BUFFERSIZE int "HTTP buffer size" default 1024 + depends on EXAMPLES_XMLRPC config EXAMPLES_XMLRPC_DHCPC bool "DHCP Client" diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c index 5d74b30d77..bc845c4ed3 100644 --- a/apps/nshlib/nsh_netinit.c +++ b/apps/nshlib/nsh_netinit.c @@ -164,6 +164,7 @@ int nsh_netinit(void) dhcpc_close(handle); } #endif + return OK; } diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index d7cd910a24..292fe6ccb2 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -260,7 +260,7 @@ CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 -CONFIG_SCHED_WORKSTACKSIZE=1024 +CONFIG_SCHED_WORKSTACKSIZE=2048 CONFIG_SIG_SIGWORK=4 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y diff --git a/nuttx/configs/fire-stm32v2/src/up_autoleds.c b/nuttx/configs/fire-stm32v2/src/up_autoleds.c index 4e70b01dd2..5ecef46c0e 100644 --- a/nuttx/configs/fire-stm32v2/src/up_autoleds.c +++ b/nuttx/configs/fire-stm32v2/src/up_autoleds.c @@ -115,23 +115,23 @@ #define LED_STARTED_ON_SETBITS (0) #define LED_STARTED_ON_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) -#define LED_STARTED_OFF_SETBITS LED_STARTED_ON_SETBITS -#define LED_STARTED_OFF_CLRBITS LED_STARTED_ON_CLRBITS +#define LED_STARTED_OFF_SETBITS (0) +#define LED_STARTED_OFF_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << OFF_CLRBITS_SHIFT) #define LED_HEAPALLOCATE_ON_SETBITS ((FIRE_LED1) << ON_SETBITS_SHIFT) #define LED_HEAPALLOCATE_ON_CLRBITS ((FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) -#define LED_HEAPALLOCATE_OFF_SETBITS LED_STARTED_ON_SETBITS -#define LED_HEAPALLOCATE_OFF_CLRBITS LED_STARTED_ON_CLRBITS +#define LED_HEAPALLOCATE_OFF_SETBITS (0) +#define LED_HEAPALLOCATE_OFF_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << OFF_CLRBITS_SHIFT) #define LED_IRQSENABLED_ON_SETBITS ((FIRE_LED2) << ON_SETBITS_SHIFT) #define LED_IRQSENABLED_ON_CLRBITS ((FIRE_LED1|FIRE_LED3) << ON_CLRBITS_SHIFT) -#define LED_IRQSENABLED_OFF_SETBITS LED_HEAPALLOCATE_ON_SETBITS -#define LED_IRQSENABLED_OFF_CLRBITS LED_HEAPALLOCATE_ON_CLRBITS +#define LED_IRQSENABLED_OFF_SETBITS ((FIRE_LED1) << OFF_SETBITS_SHIFT) +#define LED_IRQSENABLED_OFF_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << OFF_CLRBITS_SHIFT) #define LED_STACKCREATED_ON_SETBITS (0) #define LED_STACKCREATED_ON_CLRBITS ((FIRE_LED1|FIRE_LED2|FIRE_LED3) << ON_CLRBITS_SHIFT) -#define LED_STACKCREATED_OFF_SETBITS LED_IRQSENABLED_ON_SETBITS -#define LED_STACKCREATED_OFF_CLRBITS LED_IRQSENABLED_ON_CLRBITS +#define LED_STACKCREATED_OFF_SETBITS ((FIRE_LED2) << OFF_SETBITS_SHIFT) +#define LED_STACKCREATED_OFF_CLRBITS ((FIRE_LED1|FIRE_LED3) << OFF_CLRBITS_SHIFT) #define LED_FLASH_ON_SETBITS ((FIRE_LED3) << ON_SETBITS_SHIFT) #define LED_FLASH_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) diff --git a/nuttx/configs/fire-stm32v2/src/up_enc28j60.c b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c index 5247f5886e..d930d01129 100644 --- a/nuttx/configs/fire-stm32v2/src/up_enc28j60.c +++ b/nuttx/configs/fire-stm32v2/src/up_enc28j60.c @@ -157,12 +157,12 @@ static void up_enable(FAR const struct enc_lower_s *lower) FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler); - (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, priv->handler); + (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, priv->handler); } static void up_disable(FAR const struct enc_lower_s *lower) { - (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, true, true, true, NULL); + (void)stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, NULL); } /**************************************************************************** diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 6ac399a197..47a84ec9f8 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -1383,7 +1383,14 @@ static void enc_worker(FAR void *arg) DEBUGASSERT(priv); - /* Disable further interrupts by clearing the global interrup enable bit */ + /* Disable further interrupts by clearing the global interrupt enable bit. + * "After an interrupt occurs, the host controller should clear the global + * enable bit for the interrupt pin before servicing the interrupt. Clearing + * the enable bit will cause the interrupt pin to return to the non-asserted + * state (high). Doing so will prevent the host controller from missing a + * falling edge should another interrupt occur while the immediate interrupt + * is being serviced." + */ enc_bfcgreg(priv, ENC_EIE, EIE_INTIE); @@ -1551,12 +1558,17 @@ static void enc_worker(FAR void *arg) enc_rxerif(priv); /* Handle the RX error */ enc_bfcgreg(priv, ENC_EIR, EIR_RXERIF); /* Clear the RXERIF interrupt */ } - } /* Enable Ethernet interrupts */ enc_bfsgreg(priv, ENC_EIE, EIE_INTIE); + + /* Enable GPIO interrupts if they were disbled in enc_interrupt */ + +#ifndef CONFIG_SPI_OWNBUS + priv->lower->enable(priv->lower); +#endif } /**************************************************************************** @@ -1596,6 +1608,14 @@ static int enc_interrupt(int irq, FAR void *context) * a good thing to do in any event. */ + DEBUGASSERT(work_available(&priv->work)); + + /* Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in enc_worker() when the work is completed. + */ + + priv->lower->disable(priv->lower); return work_queue(HPWORK, &priv->work, enc_worker, (FAR void *)priv, 0); #endif } diff --git a/nuttx/include/nuttx/net/enc28j60.h b/nuttx/include/nuttx/net/enc28j60.h index 2e39d88ac2..7d0d7c3e5c 100644 --- a/nuttx/include/nuttx/net/enc28j60.h +++ b/nuttx/include/nuttx/net/enc28j60.h @@ -85,6 +85,22 @@ struct enc_stats_s /* The ENC28J60 normal provides interrupts to the MCU via a GPIO pin. The * following structure provides an MCU-independent mechanixm for controlling * the ENC28J60 GPIO interrupt. + * + * The ENC32J60 interrupt is an active low, *level* interrupt. "When an + * interrupt occurs, the interrupt flag is set. If the interrupt is enabled + * in the EIE register and the INTIE global interrupt enable bit is set, the + * INT pin will be driven low" + * + * "When an enabled interrupt occurs, the interrupt pin will remain low until + * all flags which are causing the interrupt are cleared or masked off + * (enable bit is cleared) by the host controller." However, the interrupt + * will behave like a falling edge interrupt because "After an interrupt + * occurs, the host controller [clears] the global enable bit for the + * interrupt pin before servicing the interrupt. Clearing the enable bit + * will cause the interrupt pin to return to the non-asserted state (high). + * Doing so will prevent the host controller from missing a falling edge + * should another interrupt occur while the immediate interrupt is being + * serviced." */ struct enc_lower_s From 53fe61a6211a86597834d5d8d7e90187f84717b0 Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 14 Sep 2012 20:15:29 -0700 Subject: [PATCH 76/95] Fix gyro/mag parameter names in calibration routines. Thanks to AngeloDP for spotting this. --- apps/commander/commander.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/commander/commander.c b/apps/commander/commander.c index d551bffcc1..c8564792f8 100644 --- a/apps/commander/commander.c +++ b/apps/commander/commander.c @@ -453,15 +453,15 @@ void do_mag_calibration(int status_pub, struct vehicle_status_s *status) // sprintf(offset_output, "[commander] mag cal: %8.4f %8.4f %8.4f", (double)mag_offset[0], (double)mag_offset[1], (double)mag_offset[2]); // mavlink_log_info(mavlink_fd, offset_output); - if (param_set(param_find("SENSOR_MAG_XOFF"), &(mag_offset[0]))) { + if (param_set(param_find("SENS_MAG_XOFF"), &(mag_offset[0]))) { fprintf(stderr, "[commander] Setting X mag offset failed!\n"); } - if (param_set(param_find("SENSOR_MAG_YOFF"), &(mag_offset[1]))) { + if (param_set(param_find("SENS_MAG_YOFF"), &(mag_offset[1]))) { fprintf(stderr, "[commander] Setting Y mag offset failed!\n"); } - if (param_set(param_find("SENSOR_MAG_ZOFF"), &(mag_offset[2]))) { + if (param_set(param_find("SENS_MAG_ZOFF"), &(mag_offset[2]))) { fprintf(stderr, "[commander] Setting Z mag offset failed!\n"); } } @@ -540,15 +540,15 @@ void do_gyro_calibration(int status_pub, struct vehicle_status_s *status) gyro_offset[1] = gyro_offset[1] / calibration_count; gyro_offset[2] = gyro_offset[2] / calibration_count; - if (param_set(param_find("SENSOR_GYRO_XOFF"), &(gyro_offset[0]))) { + if (param_set(param_find("SENS_GYRO_XOFF"), &(gyro_offset[0]))) { mavlink_log_critical(mavlink_fd, "[commander] Setting X gyro offset failed!"); } - if (param_set(param_find("SENSOR_GYRO_YOFF"), &(gyro_offset[1]))) { + if (param_set(param_find("SENS_GYRO_YOFF"), &(gyro_offset[1]))) { mavlink_log_critical(mavlink_fd, "[commander] Setting Y gyro offset failed!"); } - if (param_set(param_find("SENSOR_GYRO_ZOFF"), &(gyro_offset[2]))) { + if (param_set(param_find("SENS_GYRO_ZOFF"), &(gyro_offset[2]))) { mavlink_log_critical(mavlink_fd, "[commander] Setting Z gyro offset failed!"); } From 22537447dbd1664492549e16e65bfe3294493bca Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 14 Sep 2012 22:59:42 -0700 Subject: [PATCH 77/95] Adjust to changes in the work queue API. --- apps/drivers/hmc5883/hmc5883.cpp | 10 +++--- apps/drivers/ms5611/ms5611.cpp | 54 +++++++++++++++++--------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/apps/drivers/hmc5883/hmc5883.cpp b/apps/drivers/hmc5883/hmc5883.cpp index da3b837771..c0a5f4049a 100644 --- a/apps/drivers/hmc5883/hmc5883.cpp +++ b/apps/drivers/hmc5883/hmc5883.cpp @@ -527,13 +527,13 @@ HMC5883::start() _oldest_report = _next_report = 0; /* schedule a cycle to start things */ - work_queue(&_work, (worker_t)&HMC5883::cycle_trampoline, this, 1); + work_queue(HPWORK, &_work, (worker_t)&HMC5883::cycle_trampoline, this, 1); } void HMC5883::stop() { - work_cancel(&_work); + work_cancel(HPWORK, &_work); } void @@ -567,7 +567,8 @@ HMC5883::cycle() if (_measure_ticks > USEC2TICK(HMC5883_CONVERSION_INTERVAL)) { /* schedule a fresh cycle call when we are ready to measure again */ - work_queue(&_work, + work_queue(HPWORK, + &_work, (worker_t)&HMC5883::cycle_trampoline, this, _measure_ticks - USEC2TICK(HMC5883_CONVERSION_INTERVAL)); @@ -584,7 +585,8 @@ HMC5883::cycle() _collect_phase = true; /* schedule a fresh cycle call when the measurement is done */ - work_queue(&_work, + work_queue(HPWORK, + &_work, (worker_t)&HMC5883::cycle_trampoline, this, USEC2TICK(HMC5883_CONVERSION_INTERVAL)); diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp index 7a5c48716f..4df9de94c2 100644 --- a/apps/drivers/ms5611/ms5611.cpp +++ b/apps/drivers/ms5611/ms5611.cpp @@ -541,13 +541,13 @@ MS5611::start() _oldest_report = _next_report = 0; /* schedule a cycle to start things */ - work_queue(&_work, (worker_t)&MS5611::cycle_trampoline, this, 1); + work_queue(HPWORK, &_work, (worker_t)&MS5611::cycle_trampoline, this, 1); } void MS5611::stop() { - work_cancel(&_work); + work_cancel(HPWORK, &_work); } void @@ -585,7 +585,8 @@ MS5611::cycle() (_measure_ticks > USEC2TICK(MS5611_CONVERSION_INTERVAL))) { /* schedule a fresh cycle call when we are ready to measure again */ - work_queue(&_work, + work_queue(HPWORK, + &_work, (worker_t)&MS5611::cycle_trampoline, this, _measure_ticks - USEC2TICK(MS5611_CONVERSION_INTERVAL)); @@ -602,7 +603,8 @@ MS5611::cycle() _collect_phase = true; /* schedule a fresh cycle call when the measurement is done */ - work_queue(&_work, + work_queue(HPWORK, + &_work, (worker_t)&MS5611::cycle_trampoline, this, USEC2TICK(MS5611_CONVERSION_INTERVAL)); @@ -713,30 +715,30 @@ MS5611::collect() * double precision: ms5611_read: 992 events, 258641us elapsed, min 202us max 305us * single precision: ms5611_read: 963 events, 208066us elapsed, min 202us max 241us */ +#if 0/* USE_FLOAT */ + /* tropospheric properties (0-11km) for standard atmosphere */ + const float T1 = 15.0f + 273.15f; /* temperature at base height in Kelvin */ + const float a = -6.5f / 1000f; /* temperature gradient in degrees per metre */ + const float g = 9.80665f; /* gravity constant in m/s/s */ + const float R = 287.05f; /* ideal gas constant in J/kg/K */ - // /* tropospheric properties (0-11km) for standard atmosphere */ - // const float T1 = 15.0f + 273.15f; /* temperature at base height in Kelvin */ - // const float a = -6.5f / 1000f; /* temperature gradient in degrees per metre */ - // const float g = 9.80665f; /* gravity constant in m/s/s */ - // const float R = 287.05f; /* ideal gas constant in J/kg/K */ + /* current pressure at MSL in kPa */ + float p1 = _msl_pressure / 1000.0f; - // /* current pressure at MSL in kPa */ - // float p1 = _msl_pressure / 1000.0f; - - // /* measured pressure in kPa */ - // float p = P / 1000.0f; - - // /* - // * Solve: - // * - // * / -(aR / g) \ - // * | (p / p1) . T1 | - T1 - // * \ / - // * h = ------------------------------- + h1 - // * a - // */ - // _reports[_next_report].altitude = (((powf((p / p1), (-(a * R) / g))) * T1) - T1) / a; + /* measured pressure in kPa */ + float p = P / 1000.0f; + /* + * Solve: + * + * / -(aR / g) \ + * | (p / p1) . T1 | - T1 + * \ / + * h = ------------------------------- + h1 + * a + */ + _reports[_next_report].altitude = (((powf((p / p1), (-(a * R) / g))) * T1) - T1) / a; +#else /* tropospheric properties (0-11km) for standard atmosphere */ const double T1 = 15.0 + 273.15; /* temperature at base height in Kelvin */ const double a = -6.5 / 1000; /* temperature gradient in degrees per metre */ @@ -759,7 +761,7 @@ MS5611::collect() * a */ _reports[_next_report].altitude = (((pow((p / p1), (-(a * R) / g))) * T1) - T1) / a; - +#endif /* publish it */ orb_publish(ORB_ID(sensor_baro), _baro_topic, &_reports[_next_report]); From 273b6cf08593b23b101f0a98213a07de6c0a4ff7 Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 14 Sep 2012 23:00:30 -0700 Subject: [PATCH 78/95] Enable the low-priority work queue; we're going to want to use it. Adjust to changes in the naming of UART4/UART5 --- nuttx/configs/px4fmu/nsh/defconfig | 78 ++++++++++++++++++------------ 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig index 74acb38883..bc1543d569 100755 --- a/nuttx/configs/px4fmu/nsh/defconfig +++ b/nuttx/configs/px4fmu/nsh/defconfig @@ -93,9 +93,6 @@ CONFIG_ARCH_MATH_H=y CONFIG_ARMV7M_CMNVECTOR=y - - - # # JTAG Enable settings (by default JTAG-DP and SW-DP are enabled): # @@ -242,58 +239,59 @@ CONFIG_SERIAL_CONSOLE_REINIT=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n -CONFIG_USART4_SERIAL_CONSOLE=n -CONFIG_USART5_SERIAL_CONSOLE=n +CONFIG_UART4_SERIAL_CONSOLE=n +CONFIG_UART5_SERIAL_CONSOLE=n CONFIG_USART6_SERIAL_CONSOLE=n #Mavlink messages can be bigger than 128 CONFIG_USART1_TXBUFSIZE=512 CONFIG_USART2_TXBUFSIZE=128 CONFIG_USART3_TXBUFSIZE=128 -CONFIG_USART4_TXBUFSIZE=128 -CONFIG_USART5_TXBUFSIZE=64 +CONFIG_UART4_TXBUFSIZE=128 +CONFIG_UART5_TXBUFSIZE=64 CONFIG_USART6_TXBUFSIZE=128 CONFIG_USART1_RXBUFSIZE=512 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART3_RXBUFSIZE=128 -CONFIG_USART4_RXBUFSIZE=128 -CONFIG_USART5_RXBUFSIZE=128 +CONFIG_UART4_RXBUFSIZE=128 +CONFIG_UART5_RXBUFSIZE=128 CONFIG_USART6_RXBUFSIZE=128 CONFIG_USART1_BAUD=57600 CONFIG_USART2_BAUD=115200 CONFIG_USART3_BAUD=115200 -CONFIG_USART4_BAUD=115200 -CONFIG_USART5_BAUD=115200 +CONFIG_UART4_BAUD=115200 +CONFIG_UART5_BAUD=115200 CONFIG_USART6_BAUD=9600 CONFIG_USART1_BITS=8 CONFIG_USART2_BITS=8 CONFIG_USART3_BITS=8 -CONFIG_USART4_BITS=8 -CONFIG_USART5_BITS=8 +CONFIG_UART4_BITS=8 +CONFIG_UART5_BITS=8 CONFIG_USART6_BITS=8 CONFIG_USART1_PARITY=0 CONFIG_USART2_PARITY=0 CONFIG_USART3_PARITY=0 -CONFIG_USART4_PARITY=0 -CONFIG_USART5_PARITY=0 +CONFIG_UART4_PARITY=0 +CONFIG_UART5_PARITY=0 CONFIG_USART6_PARITY=0 CONFIG_USART1_2STOP=0 CONFIG_USART2_2STOP=0 CONFIG_USART3_2STOP=0 -CONFIG_USART4_2STOP=0 -CONFIG_USART5_2STOP=0 +CONFIG_UART4_2STOP=0 +CONFIG_UART5_2STOP=0 CONFIG_USART6_2STOP=0 CONFIG_USART1_RXDMA=y +SERIAL_HAVE_CONSOLE_DMA=y CONFIG_USART2_RXDMA=y CONFIG_USART3_RXDMA=n -CONFIG_USART4_RXDMA=n -CONFIG_USART5_RXDMA=y +CONFIG_UART4_RXDMA=n +CONFIG_UART5_RXDMA=y CONFIG_USART6_RXDMA=y # @@ -494,23 +492,35 @@ CONFIG_HAVE_LIBM=y # desciptors by task_create() when a new task is started. If # set, all sockets will appear to be closed in the new task. # CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to -# handle delayed processing from interrupt handlers. This feature -# is required for some drivers but, if there are not complaints, -# can be safely disabled. The worker thread also performs -# garbage collection -- completing any delayed memory deallocations -# from interrupt handlers. If the worker thread is disabled, -# then that clean will be performed by the IDLE thread instead -# (which runs at the lowest of priority and may not be appropriate -# if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE -# is enabled, then the following options can also be used: +# handle delayed processing from interrupt handlers. This feature +# is required for some drivers but, if there are not complaints, +# can be safely disabled. The worker thread also performs +# garbage collection -- completing any delayed memory deallocations +# from interrupt handlers. If the worker thread is disabled, +# then that clean will be performed by the IDLE thread instead +# (which runs at the lowest of priority and may not be appropriate +# if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE +# is enabled, then the following options can also be used: # CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker -# thread. Default: 50 +# thread. Default: 192 # CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for -# work in units of microseconds. Default: 50000 (50 MS). +# work in units of microseconds. Default: 50*1000 (50 MS). # CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker -# thread. Default: CONFIG_IDLETHREAD_STACKSIZE. +# thread. Default: CONFIG_IDLETHREAD_STACKSIZE. # CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up -# the worker thread. Default: 4 +# the worker thread. Default: 4 +# +# CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single +# work queue is created by default. If CONFIG_SCHED_LPWORK is also defined +# then an additional, lower-priority work queue will also be created. This +# lower priority work queue is better suited for more extended processing +# (such as file system clean-up operations) +# CONFIG_SCHED_LPWORKPRIORITY - The execution priority of the lower priority +# worker thread. Default: 50 +# CONFIG_SCHED_LPWORKPERIOD - How often the lower priority worker thread +# checks for work in units of microseconds. Default: 50*1000 (50 MS). +# CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower +# priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. # CONFIG_SCHED_WAITPID - Enable the waitpid() API # CONFIG_SCHED_ATEXIT - Enabled the atexit() API # @@ -557,6 +567,10 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=5000 CONFIG_SCHED_WORKSTACKSIZE=2048 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPWORKPRIORITY=50 +CONFIG_SCHED_LPWORKPERIOD=50000 +CONFIG_SCHED_LPWORKSTACKSIZE=2048 CONFIG_SIG_SIGWORK=4 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n From 4070ce05feae09331156c64b882bead55831f5e3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 16:02:58 +0000 Subject: [PATCH 79/95] Fix a ARMv7-M interrupt disable/optimization bug git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5155 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- NxWidgets/UnitTests/README.txt | 30 ++++- nuttx/TODO | 9 +- nuttx/arch/arm/include/armv7-m/irq.h | 112 +++++++++--------- nuttx/arch/arm/src/stm32/stm32_spi.c | 26 ++-- .../configs/fire-stm32v2/src/fire-internal.h | 7 +- nuttx/drivers/net/enc28j60.c | 4 +- 6 files changed, 112 insertions(+), 76 deletions(-) diff --git a/NxWidgets/UnitTests/README.txt b/NxWidgets/UnitTests/README.txt index cc01c38556..9952af0121 100644 --- a/NxWidgets/UnitTests/README.txt +++ b/NxWidgets/UnitTests/README.txt @@ -74,7 +74,7 @@ Installing and Building the Unit Tests writing *ONLY* the sim/nsh2 and stm321-e-eval configurations have C++ support pre-enabled). - c) Enable Debug Options + d) Enable Debug Options If you are running on a simulated target, then you might also want to enable debug symbols: @@ -84,12 +84,12 @@ Installing and Building the Unit Tests Then you can run the simulation using GDB or DDD which is a very powerful debugging environment! - d) Special configuration requirements for the nxwm unit test: + e) Special configuration requirements for the nxwm unit test: CONFIG_NXCONSOLE=y CONFIG_NX_MULTIUSER=y - e) Other nuttx/.config changes -- NSH configurations only. + f) Other nuttx/.config changes -- NSH configurations only. If the configuration that you are using supports NSH and NSH built-in tasks then all is well. If it is an NSH configuration, then you will have to define @@ -101,7 +101,26 @@ Installing and Building the Unit Tests to change anything further in the nuttx/.config file if you are using either of these configurations. - f) Other apps/.config changes -- NON-NSH configurations only. + g) Other apps/.config changes -- NON-NSH configurations only. + + Entry Point. You will need to set the entry point in the .config file. + For NSH configurations, the entry point will always be "nsh_main" and you + will see that setting like: + + CONFIG_USER_ENTRYPOINT="nsh_main" + + If you are not using in NSH, then each unit test has a unique entry point. + That entry point is the name of the unit test directory in all lower case + plus the suffix "_main". So, for example, the correct entry for the + UnitTests/CButton would be: + + CONFIG_USER_ENTRYPOINT="cbutton_main" + + And the correct entry point for UnitTests/nxwm would be: + + CONFIG_USER_ENTRYPOINT="nxwm_main" + + etc. For non-NSH configurations (such as the sim/touchscreen) you will have to remove the CONFIGURED_APPS seting that contains the user_start function so @@ -306,6 +325,9 @@ Example Do nothing... sim/nsh2 already has C++ support enabled. + Since this is an NSH configuration, the entry point does not need to be + changed. + 3. Install the CButton C++ application (for example) Where: /tool diff --git a/nuttx/TODO b/nuttx/TODO index 543d15f707..ae42d6c1c7 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -6,7 +6,7 @@ standards, things that could be improved, and ideas for enhancements. nuttx/ - (5) Task/Scheduler (sched/) + (6) Task/Scheduler (sched/) (1) On-demand paging (sched/) (1) Memory Managment (mm/) (2) Signals (sched/, arch/) @@ -110,6 +110,13 @@ o Task/Scheduler (sched/) Status: Open Priority: Low + Title: posix_spawn() + Description: This would be a good interface to add to NuttX. It is really + just a re-packaging of the existing, non-standard NuttX exec() + function. + Status: Open + Priority: Medium low. + o On-demand paging (sched/) ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/arch/arm/include/armv7-m/irq.h b/nuttx/arch/arm/include/armv7-m/irq.h index 6cef85c02a..950ce80ca4 100644 --- a/nuttx/arch/arm/include/armv7-m/irq.h +++ b/nuttx/arch/arm/include/armv7-m/irq.h @@ -129,61 +129,9 @@ struct xcptcontext #ifndef __ASSEMBLY__ -/* Disable IRQs */ - -static inline void irqdisable(void) -{ - __asm__ __volatile__ ("\tcpsid i\n"); -} - -/* Save the current primask state & disable IRQs */ - -static inline irqstate_t irqsave(void) -{ - unsigned short primask; - - /* Return the current value of primask register and set - * bit 0 of the primask register to disable interrupts - */ - - __asm__ __volatile__ - ( - "\tmrs %0, primask\n" - "\tcpsid i\n" - : "=r" (primask) - : - : "memory"); - return primask; -} - -/* Enable IRQs */ - -static inline void irqenable(void) -{ - __asm__ __volatile__ ("\tcpsie i\n"); -} - -/* Restore saved primask state */ - -static inline void irqrestore(irqstate_t primask) -{ - /* If bit 0 of the primask is 0, then we need to restore - * interupts. - */ - - __asm__ __volatile__ - ( - "\ttst %0, #1\n" - "\tbne 1f\n" - "\tcpsie i\n" - "1:\n" - : - : "r" (primask) - : "memory"); -} - /* Get/set the primask register */ +static inline uint8_t getprimask(void) __attribute__((always_inline)); static inline uint8_t getprimask(void) { uint32_t primask; @@ -193,9 +141,44 @@ static inline uint8_t getprimask(void) : "=r" (primask) : : "memory"); + return (uint8_t)primask; } +/* Disable IRQs */ + +static inline void irqdisable(void) __attribute__((always_inline)); +static inline void irqdisable(void) +{ + __asm__ __volatile__ ("\tcpsid i\n"); +} + +/* Save the current primask state & disable IRQs */ + +static inline irqstate_t irqsave(void) __attribute__((always_inline)); +static inline irqstate_t irqsave(void) +{ + /* Return the current value of primask register (before disabling) */ + + uint8_t primask = getprimask(); + + /* Then set bit 0 of the primask register to disable interrupts */ + + irqdisable(); + return primask; +} + +/* Enable IRQs */ + +static inline void irqenable(void) __attribute__((always_inline)); +static inline void irqenable(void) +{ + __asm__ __volatile__ ("\tcpsie i\n"); +} + +/* Restore saved primask state */ + +static inline void setprimask(uint32_t primask) __attribute__((always_inline)); static inline void setprimask(uint32_t primask) { __asm__ __volatile__ @@ -206,20 +189,37 @@ static inline void setprimask(uint32_t primask) : "memory"); } +static inline void irqrestore(irqstate_t primask) __attribute__((always_inline)); +static inline void irqrestore(irqstate_t primask) +{ + /* If bit 0 of the primask is 0, then we need to restore + * interrupts. + */ + + if ((primask & 1) == 0) + { + setprimask(primask); + } +} + /* Get/set the basepri register */ +static inline uint8_t getbasepri(void) __attribute__((always_inline)); static inline uint8_t getbasepri(void) { uint32_t basepri; + __asm__ __volatile__ ( "\tmrs %0, basepri\n" : "=r" (basepri) : : "memory"); + return (uint8_t)basepri; } +static inline void setbasepri(uint32_t basepri) __attribute__((always_inline)); static inline void setbasepri(uint32_t basepri) { __asm__ __volatile__ @@ -232,6 +232,7 @@ static inline void setbasepri(uint32_t basepri) /* Get/set IPSR */ +static inline uint32_t getipsr(void) __attribute__((always_inline)); static inline uint32_t getipsr(void) { uint32_t ipsr; @@ -241,9 +242,11 @@ static inline uint32_t getipsr(void) : "=r" (ipsr) : : "memory"); + return ipsr; } +static inline void setipsr(uint32_t ipsr) __attribute__((always_inline)); static inline void setipsr(uint32_t ipsr) { __asm__ __volatile__ @@ -256,6 +259,7 @@ static inline void setipsr(uint32_t ipsr) /* Get/set CONTROL */ +static inline uint32_t getcontrol(void) __attribute__((always_inline)); static inline uint32_t getcontrol(void) { uint32_t control; @@ -265,9 +269,11 @@ static inline uint32_t getcontrol(void) : "=r" (control) : : "memory"); + return control; } +static inline void setcontrol(uint32_t control) __attribute__((always_inline)); static inline void setcontrol(uint32_t control) { __asm__ __volatile__ diff --git a/nuttx/arch/arm/src/stm32/stm32_spi.c b/nuttx/arch/arm/src/stm32/stm32_spi.c index 40b1a29a09..2d907bfca7 100644 --- a/nuttx/arch/arm/src/stm32/stm32_spi.c +++ b/nuttx/arch/arm/src/stm32/stm32_spi.c @@ -49,7 +49,7 @@ * 3. Add a calls to up_spiinitialize() in your low level application * initialization logic * 4. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling + * SPI driver to higher level logic (e.g., calling * mmcsd_spislotinitialize(), for example, will bind the SPI driver to * the SPI MMC/SD driver). * @@ -881,7 +881,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) else { /* Less than fPCLK/128. This is as slow as we can go */ - + setbits = SPI_CR1_FPCLCKd256; /* 111: fPCLK/256 */ actual = priv->spiclock >> 8; } @@ -941,22 +941,22 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) setbits = 0; clrbits = SPI_CR1_CPOL|SPI_CR1_CPHA; break; - + case SPIDEV_MODE1: /* CPOL=0; CPHA=1 */ setbits = SPI_CR1_CPHA; clrbits = SPI_CR1_CPOL; break; - + case SPIDEV_MODE2: /* CPOL=1; CPHA=0 */ setbits = SPI_CR1_CPOL; clrbits = SPI_CR1_CPHA; break; - + case SPIDEV_MODE3: /* CPOL=1; CPHA=1 */ setbits = SPI_CR1_CPOL|SPI_CR1_CPHA; clrbits = 0; break; - + default: return; } @@ -1008,7 +1008,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) setbits = 0; clrbits = SPI_CR1_DFF; break; - + case 16: setbits = SPI_CR1_DFF; clrbits = 0; @@ -1111,7 +1111,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, } /* Exchange one word */ - + word = spi_send(dev, word); /* Is there a buffer to receive the return value? */ @@ -1120,7 +1120,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, { *dest++ = word; } - } + } } else { @@ -1144,7 +1144,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, } /* Exchange one word */ - + word = (uint8_t)spi_send(dev, (uint16_t)word); /* Is there a buffer to receive the return value? */ @@ -1152,7 +1152,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, if (dest) { *dest++ = word; - } + } } } } @@ -1331,7 +1331,7 @@ static void spi_portinitialize(FAR struct stm32_spidev_s *priv) priv->txdma = stm32_dmachannel(priv->txch); DEBUGASSERT(priv->rxdma && priv->txdma); #endif - + /* Enable spi */ spi_modifycr1(priv, SPI_CR1_SPE, 0); @@ -1360,7 +1360,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port) FAR struct stm32_spidev_s *priv = NULL; irqstate_t flags = irqsave(); - + #ifdef CONFIG_STM32_SPI1 if (port == 1) { diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index 801fb127ea..0260d8e33c 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -214,15 +214,16 @@ # warning "TFT LCD and ENCJ2860 shared PE1" #endif -/* CS and Reset are active low. Initial states are not selected and not in - * reset (driver does a soft reset). +/* CS and Reset are active low. Initial states are not selected and in + * reset. The ENC28J60 is taken out of reset when the driver is + * initialized (thedriver does a soft reset too). */ #ifdef CONFIG_ENC28J60 # define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) # define GPIO_ENC28J60_RESET (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ - GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN1) + GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN1) # define GPIO_ENC28J60_INTR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_EXTI|GPIO_PORTE|GPIO_PIN5) #endif diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 47a84ec9f8..df4353b9de 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -171,7 +171,7 @@ enum enc_state_e { - ENCSTATE_UNIT = 0, /* The interface is in an unknown state */ + ENCSTATE_UNINIT = 0, /* The interface is in an uninitialized state */ ENCSTATE_DOWN, /* The interface is down */ ENCSTATE_UP /* The interface is up */ }; @@ -2265,7 +2265,7 @@ int enc_initialize(FAR struct spi_dev_s *spi, * bringing the interface up. */ - priv->ifstate = ENCSTATE_UNIT; + priv->ifstate = ENCSTATE_UNINIT; /* Attach the interrupt to the driver (but don't enable it yet) */ From 33aa07a7266d4fe9c80a4d8d8aba203b3f75e0fb Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 16:46:50 +0000 Subject: [PATCH 80/95] CONFIG_ARCH_INTERRUPTSTACK is an integer. If not used, it should the value 0 or be undefined. Not 'n' git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5156 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/amber/hello/defconfig | 2 +- nuttx/configs/avr32dev1/nsh/defconfig | 2 +- nuttx/configs/avr32dev1/ostest/defconfig | 2 +- nuttx/configs/demo9s12ne64/ostest/defconfig | 2 +- nuttx/configs/ea3131/nsh/defconfig | 2 +- nuttx/configs/ea3131/ostest/defconfig | 2 +- nuttx/configs/ea3131/pgnsh/defconfig | 2 +- nuttx/configs/ea3131/usbserial/defconfig | 2 +- nuttx/configs/ea3131/usbstorage/defconfig | 2 +- nuttx/configs/ea3152/ostest/defconfig | 2 +- nuttx/configs/eagle100/httpd/defconfig | 2 +- nuttx/configs/eagle100/nettest/defconfig | 2 +- nuttx/configs/eagle100/nsh/defconfig | 2 +- nuttx/configs/eagle100/nxflat/defconfig | 2 +- nuttx/configs/eagle100/ostest/defconfig | 2 +- nuttx/configs/eagle100/thttpd/defconfig | 2 +- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 2 +- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 2 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh2/defconfig | 2 +- nuttx/configs/hymini-stm32v/nx/defconfig | 2 +- nuttx/configs/hymini-stm32v/nxlines/defconfig | 2 +- nuttx/configs/hymini-stm32v/usbserial/defconfig | 2 +- nuttx/configs/hymini-stm32v/usbstorage/defconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 +- nuttx/configs/lincoln60/nsh/defconfig | 2 +- nuttx/configs/lincoln60/ostest/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/nsh/defconfig | 2 +- nuttx/configs/lm3s6432-s2e/ostest/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nx/defconfig | 2 +- nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s8962-ek/nx/defconfig | 2 +- nuttx/configs/lm3s8962-ek/ostest/defconfig | 2 +- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 2 +- nuttx/configs/lpc4330-xplorer/ostest/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig | 2 +- nuttx/configs/mbed/hidkbd/defconfig | 2 +- nuttx/configs/mbed/nsh/defconfig | 2 +- nuttx/configs/micropendous3/hello/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 2 +- nuttx/configs/mirtoo/nxffs/defconfig | 2 +- nuttx/configs/mirtoo/ostest/defconfig | 2 +- nuttx/configs/mx1ads/ostest/defconfig | 2 +- nuttx/configs/ne64badge/ostest/defconfig | 2 +- nuttx/configs/nucleus2g/nsh/defconfig | 2 +- nuttx/configs/nucleus2g/ostest/defconfig | 2 +- nuttx/configs/nucleus2g/usbserial/defconfig | 2 +- nuttx/configs/nucleus2g/usbstorage/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/ftpc/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/thttpd/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/usbserial/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 2 +- nuttx/configs/olimex-lpc2378/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc2378/ostest/defconfig | 2 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- nuttx/configs/olimex-stm32-p107/ostest/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/ostest/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh2/defconfig | 2 +- nuttx/configs/pic32-starterkit/ostest/defconfig | 2 +- nuttx/configs/pic32mx7mmb/nsh/defconfig | 2 +- nuttx/configs/pic32mx7mmb/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nx/defconfig | 2 +- nuttx/configs/sam3u-ek/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/touchscreen/defconfig | 2 +- nuttx/configs/stm3210e-eval/RIDE/defconfig | 2 +- nuttx/configs/stm3210e-eval/buttons/defconfig | 2 +- nuttx/configs/stm3210e-eval/composite/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3210e-eval/nx/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxlines/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxtext/defconfig | 2 +- nuttx/configs/stm3210e-eval/ostest/defconfig | 2 +- nuttx/configs/stm3210e-eval/pm/defconfig | 2 +- nuttx/configs/stm3210e-eval/usbserial/defconfig | 2 +- nuttx/configs/stm3210e-eval/usbstorage/defconfig | 2 +- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3220g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 +- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3240g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3240g-eval/telnetd/defconfig | 2 +- nuttx/configs/stm3240g-eval/webserver/defconfig | 2 +- nuttx/configs/stm32f4discovery/nsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/nxlines/defconfig | 2 +- nuttx/configs/stm32f4discovery/ostest/defconfig | 2 +- nuttx/configs/stm32f4discovery/pm/defconfig | 2 +- nuttx/configs/sure-pic32mx/nsh/defconfig | 2 +- nuttx/configs/sure-pic32mx/ostest/defconfig | 2 +- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 2 +- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/nsh/defconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/ubw32/nsh/defconfig | 2 +- nuttx/configs/ubw32/ostest/defconfig | 2 +- nuttx/configs/vsn/nsh/defconfig | 2 +- 127 files changed, 127 insertions(+), 127 deletions(-) diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index b148b1e0d7..66127604ec 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=4096 CONFIG_DRAM_START=0x800100 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index 730d843918..b9f6e35a6c 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x00000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index e8d8e378ad..74ac8f0722 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x00000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index e3b6cac17b..6265e6e53f 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 928fdb2392..32521f012f 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 6b6b9b584e..1ef35f969b 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index 8f49d59a85..995bc90d98 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 7dae3c2cfd..4e45989dfa 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index 6ee7bb40db..772de7e694 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index 5af1310f4c..845faf60b5 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x11028000 CONFIG_DRAM_VSTART=0x11028000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index 3ad9220977..0fdddc2df1 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index 78994b11ea..943f462230 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index fb2fcf5ffd..2e04850b3c 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index 7befde172c..d4228f16b4 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index 6bcde74b93..6cffe1450d 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index b329609459..afb7dbce83 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index e1422da7fd..1e162a4a12 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=98304 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index 4eebaca3a3..d08e990774 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=98304 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index b03997e423..59b7b111fc 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index 98849c1b83..1b0944d022 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index 95e7f8b953..fbd9d23b36 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index d4f468d327..645feac1b5 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index 01da0ea84c..689b17376a 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 15f0695cfb..379e51a5ef 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 8e5cc1b53e..b56f627544 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=49152 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 4d90473398..29bed1244f 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=9535 CONFIG_DRAM_START=0x1fff8000 CONFIG_DRAM_SIZE= 0x00010000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index 035c8f0741..a120e2c748 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 90f980a137..6c74a9f541 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig index a5f2466c20..b4dd453ac6 100644 --- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig +++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig index bc9ce20f05..e04f3da8d5 100644 --- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig +++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 145c992c9a..bfad857f08 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index c6340c76b5..4bc7d73a60 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 1ef498dd8e..8aeef4a002 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index 439165c904..8c3d834f5d 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index 823d62ae95..49bbe06753 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index 291f4e1f26..adb806b9c7 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_CALIBRATION=n diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index b0a1f736f2..406f6f2ba0 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=73728 CONFIG_DRAM_START=0x10080000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 267d46af5c..560e3327b0 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_SIZE=73728 CONFIG_DRAM_START=0x10080000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index c2d7fc336e..0b7f1c153f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index 425c4134e3..cb78f88cc6 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index c0289a08f9..54c6828a82 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index 0c5104ca74..a808333ff5 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 80ff88e8be..227bbdebdf 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 1b1c97f593..4aca6768cd 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index e65a2fd186..edcf8e181d 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index a073c8886a..c1a35e4b1a 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index 091e9147ef..4563a12e3a 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=4096 CONFIG_DRAM_START=0x800100 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index bcc18dc3c8..c210c134ba 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index d7454bda60..1dbb2c02c5 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index fdbc4b5612..702b01bc8b 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index f20216aa81..c699aab510 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=16777216 CONFIG_DRAM_START=0x08000000 CONFIG_DRAM_VSTART=0x00000000 CONFIG_DRAM_NUTTXENTRY=0x01004000 -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y # diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 4f480675d1..59f52f6615 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=y CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index 6dcef15a7a..9397820cde 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 622db2a5fd..848fafdbaa 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index 36b1ff47b5..d0decf903f 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 5dfe474573..ec79e8fd33 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index c34f0b9996..3498195b11 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index 10dc25101a..9acf60d9d7 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 6ac19b8e74..040b3ecff6 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 37e2b9bf08..1324ca5d47 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index a3a912b2aa..de5763c0e9 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index a01564222f..f36f911e60 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index f2074597c2..a30c2b9a6c 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index f699180255..1c287cfca9 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index 506ef91d76..4ead7ffebe 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index eaf51a8f41..53cf8001c5 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 4b7b2942db..0df5f2cf72 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -47,7 +47,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8111 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x10000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index 98cd2b5fe1..7311d0c20f 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -52,7 +52,7 @@ CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 -CONFIG_ARCH_INTERRUPTSTACK= +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y # Identify toolchain and linker options diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index df6c0e1cb0..b96aadd87f 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -52,7 +52,7 @@ CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x40000000 -CONFIG_ARCH_INTERRUPTSTACK= +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y # Identify toolchain and linker options diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 91e757cf1b..5c38a49efa 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index 0a8d66455d..3710ee95b7 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index 74242863f0..09febe7b1d 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index d012b4a248..dc76a54bb4 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index 2f0248f41c..5c19d2e439 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index be8ef53a02..8d9bd8e271 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index bcd26cce54..687b63970a 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index 53ad041da2..bb95316943 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index ac6b9a82da..a14fa99480 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 06b93cc13c..82616f338a 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index a336861f58..56071d2230 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 5bf51a0fbb..943c47cfcc 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index 2757531f02..098fc3600a 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index e70b710ac5..2165dec4bc 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768 CONFIG_DRAM_SIZE=32768 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index dd0a89ecca..a5b60fe4e3 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index b355f4067c..fbfac0dc64 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 2a76e5caf3..84ed18494a 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 886b2aa078..27d26ff731 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 3c0fb3d703..d4fa891fb3 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 79a3fe7f9a..cab297583b 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index 243e4ad081..35ba0dcc1d 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index bd2968e679..b81f4127ca 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index 5d4b1f061b..22dd209a92 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index cabd5fa273..7a2e5b528c 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 73f7ae52ae..6ca7cda871 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index b3d182bde6..99a5e25728 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 3a2a2d571d..812226ee6d 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 3abf0bdab0..3958aa8015 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 47a560f4fa..0b19651cd4 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 6e019875d5..c2cf20a5ca 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index 980fc1930b..de7e59bca2 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index 4ce770bf16..0182a15d6b 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index b2d36c9cd9..46e82d6e1a 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 024b4d1a5f..823f455c1c 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index 83678b12a2..09bab66b9c 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 3446e8c351..2560310da4 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 03f4d3c0fb..dad3b38543 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index d0e628cc48..86504cc835 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index dc3ba7ced6..70f7465b00 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 2ace5113d8..ec98c273b5 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 449a143a5a..33bb63d5da 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 67762012c1..5609f0d18d 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 07d8cfa7be..0bde916e47 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 8e1861d731..a5c5035910 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 45d819e8a2..c6bd3f5df6 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 5640cebd11..39675a166a 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index fb03c477e7..8960253f90 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=196608 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_FPU=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=n diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index ded591f3ea..ffd95e4ac6 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -50,7 +50,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index d6e3f894fc..731529df87 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -50,7 +50,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index e1873b4c75..0abcd72b86 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -50,7 +50,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index 29c7194e3a..dee8b264e9 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=8192 CONFIG_DRAM_START=0x800100 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index 4f13b93514..32b7e5a41f 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=8192 CONFIG_DRAM_START=0x800100 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index a0f9066653..68d54b8704 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -47,7 +47,7 @@ CONFIG_DRAM_SIZE=8192 CONFIG_DRAM_START=0x800100 CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index 0f91b67214..47aecfea60 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=9535 CONFIG_DRAM_START=0x1fff0000 CONFIG_DRAM_SIZE=131072 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index 461b795f1e..984ff5cff8 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -46,7 +46,7 @@ CONFIG_BOARD_LOOPSPERMSEC=9535 CONFIG_DRAM_START=0x1fff0000 CONFIG_DRAM_SIZE=131072 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index 174d7c9a8f..cfc0dad304 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index 2a51efc25b..0fc2984bc6 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -48,7 +48,7 @@ CONFIG_DRAM_START=0xa0000000 CONFIG_ARCH_NOINTC=n CONFIG_ARCH_VECNOTIRQ=y CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index 48af2e07cc..c55fae0f3e 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -49,7 +49,7 @@ CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y -CONFIG_ARCH_INTERRUPTSTACK=n +CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y From 3364b55f864dbe05f8e9b86714331364d6f62bca Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 16:49:51 +0000 Subject: [PATCH 81/95] CONFIG_ARCH_INTERRUPTSTACK is an integer. If not used, it should the value 0 or be undefined. It is not a boolean git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5157 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index b445e56209..bbe99c17c2 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -153,13 +153,14 @@ config ARCH_HAVE_INTERRUPTSTACK bool config ARCH_INTERRUPTSTACK - bool "Use interrupt stack" + int "Interrupt Stack Size" depends on ARCH_HAVE_INTERRUPTSTACK - default y + default 0 ---help--- This architecture supports an interrupt stack. If defined, this symbol - is the size of the interrupt stack in bytes. If not defined, the user - task stacks will be used during interrupt handling. + will be the size of the interrupt stack in bytes. If not defined (or + defined to be zero), the user task stacks will be used during interrupt + handling. comment "Boot options" From fd63baf0fa18ba78a9b303a30b636775b210a2ac Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 18:09:50 +0000 Subject: [PATCH 82/95] Fix logic in STM32 SPI driver that leaves interrupts disabled; back out earlier change to irqsave() git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5158 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 12 ++++ nuttx/arch/arm/include/armv7-m/irq.h | 104 +++++++++++++++------------ nuttx/arch/arm/src/stm32/stm32_spi.c | 5 ++ 3 files changed, 75 insertions(+), 46 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index b6817eab23..309fd05966 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3349,3 +3349,15 @@ * configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for bugs that crept in during recent changes. (Submitted by Max Holtzberg). + * arch/arm/include/armv7-m/irq.h: Fix a critical bug in irqsave(). + It looks like sometimes the compile will re-order some instructions + inapproapriately. This end result is that interrupts will get + stuff off. + * drivers/mtd/w25.c: Beginning of a driver for the Windbond SPI + FLASH family (W25x16, W25x32, and W25x64). The initial check-in + is basically just the SST25 driver with some name changes. + * arch/arm/include/armv7-m/irq.h and arch/arm/src/stm32/stm32_spi.c: + Back out the last change in irq.h. It is (most likely) fine the + way it was. The really interrupt related problem was in stm32_spi.c: + When SPI3 is not enabled, then the irqrestore() falls in the + else clause. diff --git a/nuttx/arch/arm/include/armv7-m/irq.h b/nuttx/arch/arm/include/armv7-m/irq.h index 950ce80ca4..b6306d3390 100644 --- a/nuttx/arch/arm/include/armv7-m/irq.h +++ b/nuttx/arch/arm/include/armv7-m/irq.h @@ -129,6 +129,64 @@ struct xcptcontext #ifndef __ASSEMBLY__ +/* Disable IRQs */ + +static inline void irqdisable(void) __attribute__((always_inline)); +static inline void irqdisable(void) +{ + __asm__ __volatile__ ("\tcpsid i\n"); +} + +/* Save the current primask state & disable IRQs */ + +static inline irqstate_t irqsave(void) __attribute__((always_inline)); +static inline irqstate_t irqsave(void) +{ + unsigned short primask; + + /* Return the current value of primask register and set + * bit 0 of the primask register to disable interrupts + */ + + __asm__ __volatile__ + ( + "\tmrs %0, primask\n" + "\tcpsid i\n" + : "=r" (primask) + : + : "memory"); + + return primask; +} + +/* Enable IRQs */ + +static inline void irqenable(void) __attribute__((always_inline)); +static inline void irqenable(void) +{ + __asm__ __volatile__ ("\tcpsie i\n"); +} + +/* Restore saved primask state */ + +static inline void irqrestore(irqstate_t primask) __attribute__((always_inline)); +static inline void irqrestore(irqstate_t primask) +{ + /* If bit 0 of the primask is 0, then we need to restore + * interupts. + */ + + __asm__ __volatile__ + ( + "\ttst %0, #1\n" + "\tbne 1f\n" + "\tcpsie i\n" + "1:\n" + : + : "r" (primask) + : "memory"); +} + /* Get/set the primask register */ static inline uint8_t getprimask(void) __attribute__((always_inline)); @@ -145,39 +203,6 @@ static inline uint8_t getprimask(void) return (uint8_t)primask; } -/* Disable IRQs */ - -static inline void irqdisable(void) __attribute__((always_inline)); -static inline void irqdisable(void) -{ - __asm__ __volatile__ ("\tcpsid i\n"); -} - -/* Save the current primask state & disable IRQs */ - -static inline irqstate_t irqsave(void) __attribute__((always_inline)); -static inline irqstate_t irqsave(void) -{ - /* Return the current value of primask register (before disabling) */ - - uint8_t primask = getprimask(); - - /* Then set bit 0 of the primask register to disable interrupts */ - - irqdisable(); - return primask; -} - -/* Enable IRQs */ - -static inline void irqenable(void) __attribute__((always_inline)); -static inline void irqenable(void) -{ - __asm__ __volatile__ ("\tcpsie i\n"); -} - -/* Restore saved primask state */ - static inline void setprimask(uint32_t primask) __attribute__((always_inline)); static inline void setprimask(uint32_t primask) { @@ -189,19 +214,6 @@ static inline void setprimask(uint32_t primask) : "memory"); } -static inline void irqrestore(irqstate_t primask) __attribute__((always_inline)); -static inline void irqrestore(irqstate_t primask) -{ - /* If bit 0 of the primask is 0, then we need to restore - * interrupts. - */ - - if ((primask & 1) == 0) - { - setprimask(primask); - } -} - /* Get/set the basepri register */ static inline uint8_t getbasepri(void) __attribute__((always_inline)); diff --git a/nuttx/arch/arm/src/stm32/stm32_spi.c b/nuttx/arch/arm/src/stm32/stm32_spi.c index 2d907bfca7..8de698cd5a 100644 --- a/nuttx/arch/arm/src/stm32/stm32_spi.c +++ b/nuttx/arch/arm/src/stm32/stm32_spi.c @@ -1431,7 +1431,12 @@ FAR struct spi_dev_s *up_spiinitialize(int port) spi_portinitialize(priv); } } + else #endif + { + spidbg("ERROR: Unsupported SPI port: %d\n", port); + return NULL; + } irqrestore(flags); return (FAR struct spi_dev_s *)priv; From 3deb02acb8f1bc5acf3f3a94d154044c728d2ea9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 20:51:42 +0000 Subject: [PATCH 83/95] ENC28J60: All work is now performed on worker thread, not the in interrupt handler git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5159 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/fire-stm32v2/nsh/defconfig | 4 +- nuttx/drivers/net/enc28j60.c | 231 +++++++++++++++++------ nuttx/net/Kconfig | 2 +- 3 files changed, 173 insertions(+), 64 deletions(-) diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index 292fe6ccb2..86fe9b4576 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -201,7 +201,7 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -# CONFIG_ARCH_INTERRUPTSTACK is not set +CONFIG_ARCH_INTERRUPTSTACK=0 # # Boot options @@ -430,7 +430,7 @@ CONFIG_USBMSC_REMOVABLE=y # Networking Support # CONFIG_NET=y -# CONFIG_NET_NOINTS is not set +CONFIG_NET_NOINTS=y # CONFIG_NET_MULTIBUFFER is not set # CONFIG_NET_IPv6 is not set CONFIG_NSOCKET_DESCRIPTORS=16 diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index df4353b9de..654d0ae61e 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -110,7 +110,7 @@ /* We need to have the work queue to handle SPI interrupts */ -#if !defined(CONFIG_SCHED_WORKQUEUE) && !defined(CONFIG_SPI_OWNBUS) +#ifndef CONFIG_SCHED_WORKQUEUE # error "Worker thread support is required (CONFIG_SCHED_WORKQUEUE)" #endif @@ -122,6 +122,12 @@ # define enc_dumppacket(m,a,n) #endif +/* The ENC28J60 will not do interrupt level processing */ + +#ifndef CONFIG_NET_NOINTS +# warrning "CONFIG_NET_NOINTS should be set" +#endif + /* Timing *******************************************************************/ /* TX poll deley = 1 seconds. CLK_TCK is the number of clock ticks per second */ @@ -200,10 +206,10 @@ struct enc_driver_s /* If we don't own the SPI bus, then we cannot do SPI accesses from the * interrupt handler. */ - -#ifndef CONFIG_SPI_OWNBUS - struct work_s work; /* Work queue support */ -#endif + + struct work_s irqwork; /* Interrupt continuation work queue support */ + struct work_s towork; /* Tx timeout work queue support */ + struct work_s pollwork; /* Poll timeout work queue support */ /* This is the contained SPI driver intstance */ @@ -279,15 +285,17 @@ static void enc_txif(FAR struct enc_driver_s *priv); static void enc_txerif(FAR struct enc_driver_s *priv); static void enc_txerif(FAR struct enc_driver_s *priv); static void enc_rxerif(FAR struct enc_driver_s *priv); -static void enc_rxdispath(FAR struct enc_driver_s *priv); +static void enc_rxdispatch(FAR struct enc_driver_s *priv); static void enc_pktif(FAR struct enc_driver_s *priv); -static void enc_worker(FAR void *arg); +static void enc_irqworker(FAR void *arg); static int enc_interrupt(int irq, FAR void *context); /* Watchdog timer expirations */ -static void enc_polltimer(int argc, uint32_t arg, ...); +static void enc_toworker(FAR void *arg); static void enc_txtimeout(int argc, uint32_t arg, ...); +static void enc_pollworker(FAR void *arg); +static void enc_polltimer(int argc, uint32_t arg, ...); /* NuttX callback functions */ @@ -1026,6 +1034,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * OK on success; a negated errno on failure * * Assumptions: + * Interrupts are enabled but the caller holds the uIP lock. * ****************************************************************************/ @@ -1095,6 +1104,7 @@ static void enc_linkstatus(FAR struct enc_driver_s *priv) * None * * Assumptions: + * Interrupts are enabled but the caller holds the uIP lock. * ****************************************************************************/ @@ -1195,7 +1205,7 @@ static void enc_rxerif(FAR struct enc_driver_s *priv) } /**************************************************************************** - * Function: enc_rxdispath + * Function: enc_rxdispatch * * Description: * Give the newly received packet to uIP. @@ -1207,10 +1217,11 @@ static void enc_rxerif(FAR struct enc_driver_s *priv) * None * * Assumptions: + * Interrupts are enabled but the caller holds the uIP lock. * ****************************************************************************/ -static void enc_rxdispath(FAR struct enc_driver_s *priv) +static void enc_rxdispatch(FAR struct enc_driver_s *priv) { /* We only accept IP packets of the configured type and ARP packets */ @@ -1267,6 +1278,7 @@ static void enc_rxdispath(FAR struct enc_driver_s *priv) * None * * Assumptions: + * Interrupts are enabled but the caller holds the uIP lock. * ****************************************************************************/ @@ -1326,7 +1338,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) nlldbg("Bad packet size dropped (%d)\n", pktlen); #ifdef CONFIG_ENC28J60_STATS priv->stats.rxpktlen++; -#endif +#endif } /* Otherwise, read and process the packet */ @@ -1344,7 +1356,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) /* Dispatch the packet to uIP */ - enc_rxdispath(priv); + enc_rxdispatch(priv); } /* Move the RX read pointer to the start of the next received packet. @@ -1360,7 +1372,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) } /**************************************************************************** - * Function: enc_worker + * Function: enc_irqworker * * Description: * Perform interrupt handling logic outside of the interrupt handler (on @@ -1376,13 +1388,18 @@ static void enc_pktif(FAR struct enc_driver_s *priv) * ****************************************************************************/ -static void enc_worker(FAR void *arg) +static void enc_irqworker(FAR void *arg) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg; + uip_lock_t lock; uint8_t eir; DEBUGASSERT(priv); + /* Get exclusive access to uIP. */ + + lock = uip_lock(); + /* Disable further interrupts by clearing the global interrupt enable bit. * "After an interrupt occurs, the host controller should clear the global * enable bit for the interrupt pin before servicing the interrupt. Clearing @@ -1560,15 +1577,17 @@ static void enc_worker(FAR void *arg) } } + /* Release lock on uIP */ + + uip_unlock(lock); + /* Enable Ethernet interrupts */ enc_bfsgreg(priv, ENC_EIE, EIE_INTIE); - /* Enable GPIO interrupts if they were disbled in enc_interrupt */ + /* Enable GPIO interrupts */ -#ifndef CONFIG_SPI_OWNBUS priv->lower->enable(priv->lower); -#endif } /**************************************************************************** @@ -1592,15 +1611,6 @@ static int enc_interrupt(int irq, FAR void *context) { register FAR struct enc_driver_s *priv = &g_enc28j60[0]; -#ifdef CONFIG_SPI_OWNBUS - /* In very simple environments, we own the SPI and can do data transfers - * from the interrupt handler. That is actually a very bad idea in any - * case because it keeps interrupts disabled for a long time. - */ - - enc_worker((FAR void*)priv); - return OK; -#else /* In complex environments, we cannot do SPI transfers from the interrupt * handler because semaphores are probably used to lock the SPI bus. In * this case, we will defer processing to the worker thread. This is also @@ -1608,16 +1618,69 @@ static int enc_interrupt(int irq, FAR void *context) * a good thing to do in any event. */ - DEBUGASSERT(work_available(&priv->work)); + DEBUGASSERT(work_available(&priv->irqwork)); /* Notice that further GPIO interrupts are disabled until the work is * actually performed. This is to prevent overrun of the worker thread. - * Interrupts are re-enabled in enc_worker() when the work is completed. + * Interrupts are re-enabled in enc_irqworker() when the work is completed. */ priv->lower->disable(priv->lower); - return work_queue(HPWORK, &priv->work, enc_worker, (FAR void *)priv, 0); + return work_queue(HPWORK, &priv->irqwork, enc_irqworker, (FAR void *)priv, 0); +} + +/**************************************************************************** + * Function: enc_toworker + * + * Description: + * Our TX watchdog timed out. This is the worker thread continuation of + * the watchdog timer interrupt. Reset the hardware and start again. + * + * Parameters: + * arg - The reference to the driver structure (case to void*) + * + * Returned Value: + * None + * + * Assumptions: + * + ****************************************************************************/ + +static void enc_toworker(FAR void *arg) +{ + FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg; + uip_lock_t lock; + int ret; + + nlldbg("Tx timeout\n"); + DEBUGASSERT(priv); + + /* Get exclusive access to uIP. */ + + lock = uip_lock(); + + /* Increment statistics and dump debug info */ + +#ifdef CONFIG_ENC28J60_STATS + priv->stats.txtimeouts++; #endif + + /* Then reset the hardware: Take the interface down, then bring it + * back up + */ + + ret = enc_ifdown(&priv->dev); + DEBUGASSERT(ret == OK); + ret = enc_ifup(&priv->dev); + DEBUGASSERT(ret == OK); + + /* Then poll uIP for new XMIT data */ + + (void)uip_poll(&priv->dev, enc_uiptxpoll); + + /* Release lock on uIP */ + + uip_unlock(lock); } /**************************************************************************** @@ -1625,7 +1688,7 @@ static int enc_interrupt(int irq, FAR void *context) * * Description: * Our TX watchdog timed out. Called from the timer interrupt handler. - * The last TX never completed. Reset the hardware and start again. + * The last TX never completed. Perform work on the worker thread. * * Parameters: * argc - The number of available arguments @@ -1643,25 +1706,74 @@ static void enc_txtimeout(int argc, uint32_t arg, ...) FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg; int ret; - /* Increment statistics and dump debug info */ - - nlldbg("Tx timeout\n"); -#ifdef CONFIG_ENC28J60_STATS - priv->stats.txtimeouts++; -#endif - - /* Then reset the hardware: Take the interface down, then bring it - * back up + /* In complex environments, we cannot do SPI transfers from the timout + * handler because semaphores are probably used to lock the SPI bus. In + * this case, we will defer processing to the worker thread. This is also + * much kinder in the use of system resources and is, therefore, probably + * a good thing to do in any event. */ - - ret = enc_ifdown(&priv->dev); - DEBUGASSERT(ret == OK); - ret = enc_ifup(&priv->dev); - DEBUGASSERT(ret == OK); - /* Then poll uIP for new XMIT data */ + DEBUGASSERT(priv && work_available(&priv->towork)); - (void)uip_poll(&priv->dev, enc_uiptxpoll); + /* Notice that Tx timeout watchdog is not active so further Tx timeouts + * can occur until we restart the Tx timeout watchdog. + */ + + ret = work_queue(HPWORK, &priv->towork, enc_toworker, (FAR void *)priv, 0); + DEBUGASSERT(ret == OK); +} + +/**************************************************************************** + * Function: enc_pollworker + * + * Description: + * Periodic timer handler continuation. + * + * Parameters: + * argc - The number of available arguments + * arg - The first argument + * + * Returned Value: + * None + * + * Assumptions: + * + ****************************************************************************/ + +static void enc_pollworker(FAR void *arg) +{ + FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg; + uip_lock_t lock; + + DEBUGASSERT(priv); + + /* Get exclusive access to uIP. */ + + lock = uip_lock(); + + /* Verify that the hardware is ready to send another packet. The driver + * start a transmission process by setting ECON1.TXRTS. When the packet is + * finished transmitting or is aborted due to an error/cancellation, the + * ECON1.TXRTS bit will be cleared. + */ + + if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) + { + /* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. + * looks like a bug here to me. Does this mean if there is a transmit + * in progress, we will missing TCP time state updates? + */ + + (void)uip_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); + } + + /* Release lock on uIP */ + + uip_unlock(lock); + + /* Setup the watchdog poll timer again */ + + (void)wd_start(priv->txpoll, ENC_WDDELAY, enc_polltimer, 1, arg); } /**************************************************************************** @@ -1684,26 +1796,23 @@ static void enc_txtimeout(int argc, uint32_t arg, ...) static void enc_polltimer(int argc, uint32_t arg, ...) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg; + int ret; - /* Verify that the hardware is ready to send another packet. The driver - * start a transmission process by setting ECON1.TXRTS. When the packet is - * finished transmitting or is aborted due to an error/cancellation, the - * ECON1.TXRTS bit will be cleared. + /* In complex environments, we cannot do SPI transfers from the timout + * handler because semaphores are probably used to lock the SPI bus. In + * this case, we will defer processing to the worker thread. This is also + * much kinder in the use of system resources and is, therefore, probably + * a good thing to do in any event. */ - if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) - { - /* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. - * looks like a bug here to me. Does this mean if there is a transmit - * in progress, we will missing TCP time state updates? - */ + DEBUGASSERT(priv && work_available(&priv->pollwork)); - (void)uip_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); - } + /* Notice that poll watchdog is not active so further poll timeouts can + * occur until we restart the poll timeout watchdog. + */ - /* Setup the watchdog poll timer again */ - - (void)wd_start(priv->txpoll, ENC_WDDELAY, enc_polltimer, 1, arg); + ret = work_queue(HPWORK, &priv->pollwork, enc_pollworker, (FAR void *)priv, 0); + DEBUGASSERT(ret == OK); } /**************************************************************************** diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig index 2670454026..718b28b8fd 100644 --- a/nuttx/net/Kconfig +++ b/nuttx/net/Kconfig @@ -34,7 +34,7 @@ config NET_NOINTS bool "Not interrupt driven" default n ---help--- - NET_NOINT indicates that uIP not called from the interrupt level. + NET_NOINT indicates that uIP is not called from the interrupt level. If NET_NOINTS is defined, critical sections will be managed with semaphores; Otherwise, it assumed that uIP will be called from interrupt level handling and critical sections will be managed by enabling and disabling interrupts. From 62f6889f929002e32865650a92a083698424cd49 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 15 Sep 2012 22:22:40 +0000 Subject: [PATCH 84/95] ENC28J60 does not have a MAC address git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5160 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/include/netutils/resolv.h | 23 ++++++++++++------- nuttx/configs/fire-stm32v2/nsh/defconfig | 4 ++-- .../configs/olimex-strp711/nettest/defconfig | 12 ++++++---- nuttx/net/uip/uip_lock.c | 1 + 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/apps/include/netutils/resolv.h b/apps/include/netutils/resolv.h index 81798558c7..bf71e3b6e8 100644 --- a/apps/include/netutils/resolv.h +++ b/apps/include/netutils/resolv.h @@ -3,8 +3,13 @@ * DNS resolver code header file. * Author Adam Dunkels * - * Copyright (c) 2002-2003, Adam Dunkels. - * All rights reserved. + * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Inspired by/based on uIP logic by Adam Dunkels: + * + * Copyright (c) 2002-2003, Adam Dunkels. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,6 +46,8 @@ #include +#include + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -58,13 +65,13 @@ extern "C" { EXTERN int resolv_init(void); #ifdef CONFIG_NET_IPv6 -EXTERN void resolv_conf(const struct in6_addr *dnsserver); -EXTERN void resolv_getserver(const struct in_addr *dnsserver); -EXTERN int resolv_query(const char *name, struct sockaddr_in6 *addr); +EXTERN void resolv_conf(FAR const struct in6_addr *dnsserver); +EXTERN void resolv_getserver(FAR const struct in_addr *dnsserver); +EXTERN int resolv_query(FAR const char *name, FAR struct sockaddr_in6 *addr); #else -EXTERN void resolv_conf(const struct in_addr *dnsserver); -EXTERN void resolv_getserver(struct in_addr *dnsserver); -EXTERN int resolv_query(const char *name, struct sockaddr_in *addr); +EXTERN void resolv_conf(FAR const struct in_addr *dnsserver); +EXTERN void resolv_getserver(FAR struct in_addr *dnsserver); +EXTERN int resolv_query(FAR const char *name, FAR struct sockaddr_in *addr); #endif #undef EXTERN diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index 86fe9b4576..fd51878010 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -260,7 +260,7 @@ CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 -CONFIG_SCHED_WORKSTACKSIZE=2048 +CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y @@ -957,7 +957,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 CONFIG_NSH_IPADDR=0x0a000002 CONFIG_NSH_DRIPADDR=0x0a000001 CONFIG_NSH_NETMASK=0xffffff00 -# CONFIG_NSH_NOMAC is not set +CONFIG_NSH_NOMAC=y # # System NSH Add-Ons diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index f69d3f8cb4..e8455ab941 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -223,8 +223,8 @@ CONFIG_NUNGET_CHARS=2 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=16 +CONFIG_PREALLOC_TIMERS=8 # # Filesystem configuration @@ -235,6 +235,7 @@ CONFIG_FS_ROMFS=n # # ENC28J60 configuration # +CONFIG_NETDEVICES=y CONFIG_ENC28J60=y #CONFIG_ENC28J60_SPIMODE CONFIG_ENC28J60_FREQUENCY=20000000 @@ -252,10 +253,11 @@ CONFIG_MMCSD_READONLY=n # TCP/IP and UDP support via uIP # CONFIG_NET=y +CONFIG_NET_NOINTS=y CONFIG_NET_IPv6=n -CONFIG_NSOCKET_DESCRIPTORS=8 +CONFIG_NSOCKET_DESCRIPTORS=16 CONFIG_NET_SOCKOPTS=y -CONFIG_NET_BUFSIZE=420 +CONFIG_NET_BUFSIZE=562 CONFIG_NET_TCP=y CONFIG_NET_TCP_CONNS=8 CONFIG_NET_NTCP_READAHEAD_BUFFERS=8 @@ -365,7 +367,7 @@ CONFIG_NSH_TELNET=n CONFIG_NSH_ARCHINIT=n CONFIG_NSH_IOBUFFER_SIZE=512 CONFIG_NSH_DHCPC=n -CONFIG_NSH_NOMAC=n +CONFIG_NSH_NOMAC=y CONFIG_NSH_IPADDR=0x0a000002 CONFIG_NSH_DRIPADDR=0x0a000001 CONFIG_NSH_NETMASK=0xffffff00 diff --git a/nuttx/net/uip/uip_lock.c b/nuttx/net/uip/uip_lock.c index 0e770cef79..5abcda2698 100644 --- a/nuttx/net/uip/uip_lock.c +++ b/nuttx/net/uip/uip_lock.c @@ -39,6 +39,7 @@ #include +#include #include #include #include From 9d0992d2a738016d38657ce4b5c463acba2fccf6 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 15 Sep 2012 17:21:26 -0700 Subject: [PATCH 85/95] Make irqsave/irqrestore (much) cheaper. --- nuttx/arch/arm/include/armv7-m/irq.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nuttx/arch/arm/include/armv7-m/irq.h b/nuttx/arch/arm/include/armv7-m/irq.h index 6cef85c02a..e74e06be67 100644 --- a/nuttx/arch/arm/include/armv7-m/irq.h +++ b/nuttx/arch/arm/include/armv7-m/irq.h @@ -131,6 +131,8 @@ struct xcptcontext /* Disable IRQs */ +static inline void irqdisable(void) __attribute__((always_inline, no_instrument_function)); + static inline void irqdisable(void) { __asm__ __volatile__ ("\tcpsid i\n"); @@ -138,6 +140,8 @@ static inline void irqdisable(void) /* Save the current primask state & disable IRQs */ +static inline irqstate_t irqsave(void) __attribute__((always_inline, no_instrument_function)); + static inline irqstate_t irqsave(void) { unsigned short primask; @@ -158,6 +162,8 @@ static inline irqstate_t irqsave(void) /* Enable IRQs */ +static inline void irqenable(void) __attribute__((always_inline, no_instrument_function)); + static inline void irqenable(void) { __asm__ __volatile__ ("\tcpsie i\n"); @@ -165,6 +171,8 @@ static inline void irqenable(void) /* Restore saved primask state */ +static inline void irqrestore(irqstate_t primask) __attribute__((always_inline, no_instrument_function)); + static inline void irqrestore(irqstate_t primask) { /* If bit 0 of the primask is 0, then we need to restore From 561bea65a2032c2c510a6dd5e118924f21b3d86e Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 15 Sep 2012 17:22:47 -0700 Subject: [PATCH 86/95] Ignore a turd that the kconfig stuff generates --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8d468a56da..885ca02f78 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ Firmware.sublime-workspace .DS_Store nsh_romfsimg.h cscope.out +.configX-e From c30e21fed6f3b199764a92d4d1f97503305eb5df Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 16 Sep 2012 14:04:14 +0200 Subject: [PATCH 87/95] Removed stupid Eclipse project, as its of course generating conflicts --- .cproject | 116 --------------------------------------------- .gitignore | 2 + .project | 135 ----------------------------------------------------- 3 files changed, 2 insertions(+), 251 deletions(-) delete mode 100644 .cproject delete mode 100644 .project diff --git a/.cproject b/.cproject deleted file mode 100644 index b0c8d5a9dd..0000000000 --- a/.cproject +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - make - all - true - true - true - - - make - - clean - true - true - true - - - make - - distclean - true - true - true - - - make - - upload - true - true - true - - - make - - install - true - true - true - - - - diff --git a/.gitignore b/.gitignore index 8d468a56da..c3b36f45f2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ .depend .config .version +.project +.cproject apps/namedapp/namedapp_list.h apps/namedapp/namedapp_proto.h Make.dep diff --git a/.project b/.project deleted file mode 100644 index 62e37139e4..0000000000 --- a/.project +++ /dev/null @@ -1,135 +0,0 @@ - - - PX4 Firmware - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - 1344101890673 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-*.o - - - - 1344101890683 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-.dep - - - - 1344101890687 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-.context - - - - 1344101890691 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-.depend - - - - 1344101890695 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-.built - - - - 1344101890698 - - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-*.a - - - - From c09094ccfc6e51b0de4e045a9bfe51bf1b178667 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 16 Sep 2012 15:46:54 +0000 Subject: [PATCH 88/95] Add W25 FLASH driver; Use attribute definitions in nuttx/compiler.h git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5161 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 7 + nuttx/arch/8051/src/up_assert.c | 4 +- nuttx/arch/arm/include/armv7-m/irq.h | 27 +- nuttx/arch/arm/src/arm/up_assert.c | 4 +- nuttx/arch/arm/src/armv7-m/svcall.h | 2 +- nuttx/arch/arm/src/armv7-m/up_assert.c | 4 +- .../arm/src/armv7-m/up_fullcontextrestore.S | 2 +- nuttx/arch/arm/src/armv7-m/up_svcall.c | 2 +- nuttx/arch/arm/src/common/up_internal.h | 5 +- nuttx/arch/avr/src/avr/avr_internal.h | 7 +- nuttx/arch/avr/src/avr32/avr32_internal.h | 7 +- nuttx/arch/avr/src/common/up_assert.c | 2 +- nuttx/arch/hc/src/common/up_internal.h | 4 +- nuttx/arch/hc/src/m9s12/m9s12_assert.c | 4 +- nuttx/arch/mips/include/mips32/syscall.h | 4 +- nuttx/arch/mips/src/mips32/up_assert.c | 4 +- nuttx/arch/mips/src/mips32/up_swint0.c | 4 +- nuttx/arch/sh/src/common/up_assert.c | 4 +- nuttx/arch/sh/src/common/up_internal.h | 5 +- nuttx/arch/sim/src/up_internal.h | 3 +- nuttx/arch/x86/include/i486/arch.h | 10 +- nuttx/arch/x86/src/common/up_assert.c | 4 +- nuttx/arch/x86/src/common/up_internal.h | 5 +- nuttx/arch/x86/src/i486/up_irq.c | 3 +- .../x86/src/qemu/qemu_fullcontextrestore.S | 4 +- nuttx/arch/x86/src/qemu/qemu_handlers.c | 5 +- nuttx/arch/z16/src/common/up_assert.c | 4 +- nuttx/arch/z80/src/common/up_assert.c | 4 +- nuttx/drivers/mtd/Kconfig | 73 +- nuttx/drivers/mtd/Make.defs | 4 + nuttx/drivers/mtd/w25.c | 1188 +++++++++++++++++ nuttx/include/nuttx/analog/adc.h | 3 +- nuttx/include/nuttx/compiler.h | 24 +- nuttx/include/nuttx/mtd.h | 13 + 34 files changed, 1383 insertions(+), 66 deletions(-) create mode 100644 nuttx/drivers/mtd/w25.c diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 309fd05966..59736290a7 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3361,3 +3361,10 @@ way it was. The really interrupt related problem was in stm32_spi.c: When SPI3 is not enabled, then the irqrestore() falls in the else clause. + * include/nuttx/compiler.h and other files: Moved always_inline + and noinline __attributes__ here. Also replaced all occurrences + of explicit __atributes__ in other files with definitions from + this header file. + * drivers/mtd/w25.c: The Windbond SPI FLASH W25 FLASH driver is + code complete (but still untested). + diff --git a/nuttx/arch/8051/src/up_assert.c b/nuttx/arch/8051/src/up_assert.c index 10a5daf356..46d7310415 100644 --- a/nuttx/arch/8051/src/up_assert.c +++ b/nuttx/arch/8051/src/up_assert.c @@ -1,7 +1,7 @@ /************************************************************************ * up_assert.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ * Name: _up_assert ************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/arm/include/armv7-m/irq.h b/nuttx/arch/arm/include/armv7-m/irq.h index b6306d3390..606b3988f4 100644 --- a/nuttx/arch/arm/include/armv7-m/irq.h +++ b/nuttx/arch/arm/include/armv7-m/irq.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/include/armv7-m/irq.h * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ #include #ifndef __ASSEMBLY__ +# include # include #endif @@ -131,7 +132,7 @@ struct xcptcontext /* Disable IRQs */ -static inline void irqdisable(void) __attribute__((always_inline)); +static inline void irqdisable(void) inline_function; static inline void irqdisable(void) { __asm__ __volatile__ ("\tcpsid i\n"); @@ -139,7 +140,7 @@ static inline void irqdisable(void) /* Save the current primask state & disable IRQs */ -static inline irqstate_t irqsave(void) __attribute__((always_inline)); +static inline irqstate_t irqsave(void) inline_function; static inline irqstate_t irqsave(void) { unsigned short primask; @@ -161,7 +162,7 @@ static inline irqstate_t irqsave(void) /* Enable IRQs */ -static inline void irqenable(void) __attribute__((always_inline)); +static inline void irqenable(void) inline_function; static inline void irqenable(void) { __asm__ __volatile__ ("\tcpsie i\n"); @@ -169,7 +170,7 @@ static inline void irqenable(void) /* Restore saved primask state */ -static inline void irqrestore(irqstate_t primask) __attribute__((always_inline)); +static inline void irqrestore(irqstate_t primask) inline_function; static inline void irqrestore(irqstate_t primask) { /* If bit 0 of the primask is 0, then we need to restore @@ -189,7 +190,7 @@ static inline void irqrestore(irqstate_t primask) /* Get/set the primask register */ -static inline uint8_t getprimask(void) __attribute__((always_inline)); +static inline uint8_t getprimask(void) inline_function; static inline uint8_t getprimask(void) { uint32_t primask; @@ -203,7 +204,7 @@ static inline uint8_t getprimask(void) return (uint8_t)primask; } -static inline void setprimask(uint32_t primask) __attribute__((always_inline)); +static inline void setprimask(uint32_t primask) inline_function; static inline void setprimask(uint32_t primask) { __asm__ __volatile__ @@ -216,7 +217,7 @@ static inline void setprimask(uint32_t primask) /* Get/set the basepri register */ -static inline uint8_t getbasepri(void) __attribute__((always_inline)); +static inline uint8_t getbasepri(void) inline_function; static inline uint8_t getbasepri(void) { uint32_t basepri; @@ -231,7 +232,7 @@ static inline uint8_t getbasepri(void) return (uint8_t)basepri; } -static inline void setbasepri(uint32_t basepri) __attribute__((always_inline)); +static inline void setbasepri(uint32_t basepri) inline_function; static inline void setbasepri(uint32_t basepri) { __asm__ __volatile__ @@ -244,7 +245,7 @@ static inline void setbasepri(uint32_t basepri) /* Get/set IPSR */ -static inline uint32_t getipsr(void) __attribute__((always_inline)); +static inline uint32_t getipsr(void) inline_function; static inline uint32_t getipsr(void) { uint32_t ipsr; @@ -258,7 +259,7 @@ static inline uint32_t getipsr(void) return ipsr; } -static inline void setipsr(uint32_t ipsr) __attribute__((always_inline)); +static inline void setipsr(uint32_t ipsr) inline_function; static inline void setipsr(uint32_t ipsr) { __asm__ __volatile__ @@ -271,7 +272,7 @@ static inline void setipsr(uint32_t ipsr) /* Get/set CONTROL */ -static inline uint32_t getcontrol(void) __attribute__((always_inline)); +static inline uint32_t getcontrol(void) inline_function; static inline uint32_t getcontrol(void) { uint32_t control; @@ -285,7 +286,7 @@ static inline uint32_t getcontrol(void) return control; } -static inline void setcontrol(uint32_t control) __attribute__((always_inline)); +static inline void setcontrol(uint32_t control) inline_function; static inline void setcontrol(uint32_t control) { __asm__ __volatile__ diff --git a/nuttx/arch/arm/src/arm/up_assert.c b/nuttx/arch/arm/src/arm/up_assert.c index 023e6e22d4..3d75a4655a 100644 --- a/nuttx/arch/arm/src/arm/up_assert.c +++ b/nuttx/arch/arm/src/arm/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_assert.c * - * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -252,7 +252,7 @@ static void up_dumpstate(void) * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/arm/src/armv7-m/svcall.h b/nuttx/arch/arm/src/armv7-m/svcall.h index 9a4db89b13..6758297999 100644 --- a/nuttx/arch/arm/src/armv7-m/svcall.h +++ b/nuttx/arch/arm/src/armv7-m/svcall.h @@ -74,7 +74,7 @@ /* SYS call 1: * - * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; */ #define SYS_restore_context (1) diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c index 2662cbe37f..282ff6a57d 100644 --- a/nuttx/arch/arm/src/armv7-m/up_assert.c +++ b/nuttx/arch/arm/src/armv7-m/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-m/up_assert.c * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -262,7 +262,7 @@ static void up_dumpstate(void) * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S b/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S index 3ce51c9cd6..4c77b66b89 100755 --- a/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S +++ b/nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S @@ -69,7 +69,7 @@ * Description: * Restore the current thread context. Full prototype is: * - * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; * * Return: * None diff --git a/nuttx/arch/arm/src/armv7-m/up_svcall.c b/nuttx/arch/arm/src/armv7-m/up_svcall.c index 5a4d64fe20..d32f0afc2a 100644 --- a/nuttx/arch/arm/src/armv7-m/up_svcall.c +++ b/nuttx/arch/arm/src/armv7-m/up_svcall.c @@ -280,7 +280,7 @@ int up_svcall(int irq, FAR void *context) /* R0=SYS_restore_context: This a restore context command: * - * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; * * At this point, the following values are saved in context: * diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h index 45cb1dcc09..9f20775c09 100644 --- a/nuttx/arch/arm/src/common/up_internal.h +++ b/nuttx/arch/arm/src/common/up_internal.h @@ -40,7 +40,10 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ +# include # include # include #endif @@ -223,7 +226,7 @@ extern void up_boot(void); extern void up_copystate(uint32_t *dest, uint32_t *src); extern void up_decodeirq(uint32_t *regs); extern int up_saveusercontext(uint32_t *saveregs); -extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); +extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); /* Signal handling **********************************************************/ diff --git a/nuttx/arch/avr/src/avr/avr_internal.h b/nuttx/arch/avr/src/avr/avr_internal.h index c87254b770..031000cd19 100644 --- a/nuttx/arch/avr/src/avr/avr_internal.h +++ b/nuttx/arch/avr/src/avr/avr_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/avr/avr_internal.h * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,10 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ +# include # include # include # include @@ -111,7 +114,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src); * ************************************************************************************/ -extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn)); +extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function; /************************************************************************************ * Name: up_switchcontext diff --git a/nuttx/arch/avr/src/avr32/avr32_internal.h b/nuttx/arch/avr/src/avr32/avr32_internal.h index 680e2c804f..3d45f6c54d 100644 --- a/nuttx/arch/avr/src/avr32/avr32_internal.h +++ b/nuttx/arch/avr/src/avr32/avr32_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/avr32/up_internal.h * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,10 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ +# include # include #endif @@ -109,7 +112,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src); * ************************************************************************************/ -extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); +extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; /************************************************************************************ * Name: up_switchcontext diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c index 82c58d6587..12bb564d36 100644 --- a/nuttx/arch/avr/src/common/up_assert.c +++ b/nuttx/arch/avr/src/common/up_assert.c @@ -90,7 +90,7 @@ * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/hc/src/common/up_internal.h b/nuttx/arch/hc/src/common/up_internal.h index e54b86dec2..f1daf690ff 100644 --- a/nuttx/arch/hc/src/common/up_internal.h +++ b/nuttx/arch/hc/src/common/up_internal.h @@ -41,7 +41,9 @@ ****************************************************************************/ #include + #ifndef __ASSEMBLY__ +# include # include #endif @@ -152,7 +154,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src); extern void up_decodeirq(uint8_t *regs); extern void up_irqinitialize(void); extern int up_saveusercontext(uint8_t *saveregs); -extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn)); +extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function; extern void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); /* Interrupt handling */ diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c index 386bcb2dfc..ff9ce5ca4d 100644 --- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/hc/src/m9s12/m9s12_assert.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -247,7 +247,7 @@ static void up_dumpstate(void) * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/mips/include/mips32/syscall.h b/nuttx/arch/mips/include/mips32/syscall.h index 9c497c8b6c..d91eed9932 100644 --- a/nuttx/arch/mips/include/mips32/syscall.h +++ b/nuttx/arch/mips/include/mips32/syscall.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/mips/include/mips32/syscall.h * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -150,7 +150,7 @@ /* SYS call 1: * - * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; */ #define SYS_restore_context (1) diff --git a/nuttx/arch/mips/src/mips32/up_assert.c b/nuttx/arch/mips/src/mips32/up_assert.c index 881ec12cb7..ed4ee4cf7d 100644 --- a/nuttx/arch/mips/src/mips32/up_assert.c +++ b/nuttx/arch/mips/src/mips32/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/mips/src/mips32/up_assert.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -90,7 +90,7 @@ * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c index 6a10427218..87ccddf719 100644 --- a/nuttx/arch/mips/src/mips32/up_swint0.c +++ b/nuttx/arch/mips/src/mips32/up_swint0.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/mips/src/mips32/up_swint0.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -290,7 +290,7 @@ int up_swint0(int irq, FAR void *context) { /* R4=SYS_restore_context: This a restore context command: * - * void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; * * At this point, the following values are saved in context: * diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c index cfd7854dff..ccc0c98e65 100644 --- a/nuttx/arch/sh/src/common/up_assert.c +++ b/nuttx/arch/sh/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/common/up_assert.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -76,7 +76,7 @@ * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/sh/src/common/up_internal.h b/nuttx/arch/sh/src/common/up_internal.h index 0504755f6d..f47b1078f4 100644 --- a/nuttx/arch/sh/src/common/up_internal.h +++ b/nuttx/arch/sh/src/common/up_internal.h @@ -40,7 +40,10 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ +# include # include #endif @@ -144,7 +147,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src); extern void up_dataabort(uint32_t *regs); extern void up_decodeirq(uint32_t *regs); extern uint32_t *up_doirq(int irq, uint32_t *regs); -extern void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn)); +extern void up_fullcontextrestore(uint32_t *regs) noreturn_function; extern void up_irqinitialize(void); extern void up_prefetchabort(uint32_t *regs); extern int up_saveusercontext(uint32_t *regs); diff --git a/nuttx/arch/sim/src/up_internal.h b/nuttx/arch/sim/src/up_internal.h index 04fd71efc0..dff51b9cf7 100644 --- a/nuttx/arch/sim/src/up_internal.h +++ b/nuttx/arch/sim/src/up_internal.h @@ -41,6 +41,7 @@ **************************************************************************/ #include +#include #include #include @@ -150,7 +151,7 @@ extern volatile int g_eventloop; /* up_setjmp.S ************************************************************/ extern int up_setjmp(int *jb); -extern void up_longjmp(int *jb, int val) __attribute__ ((noreturn)); +extern void up_longjmp(int *jb, int val) noreturn_function; /* up_devconsole.c ********************************************************/ diff --git a/nuttx/arch/x86/include/i486/arch.h b/nuttx/arch/x86/include/i486/arch.h index 64d9d85bf2..6bb2418d7c 100644 --- a/nuttx/arch/x86/include/i486/arch.h +++ b/nuttx/arch/x86/include/i486/arch.h @@ -45,7 +45,9 @@ ****************************************************************************/ #include + #ifndef __ASSEMBLY__ +# include # include #endif @@ -323,7 +325,7 @@ struct gdt_entry_s uint8_t access; /* Access flags, determine ring segment can be used in */ uint8_t granularity; uint8_t hibase; /* The last 8 bits of the base */ -} __attribute__((packed)); +} packed_struct; /* This structure refers to the array of GDT entries, and is in the format * required by the lgdt instruction. @@ -333,7 +335,7 @@ struct gdt_ptr_s { uint16_t limit; /* The upper 16 bits of all selector limits */ uint32_t base; /* The address of the first GDT entry */ -} __attribute__((packed)); +} packed_struct; /* IDT data structures ****************************************************** * @@ -349,7 +351,7 @@ struct idt_entry_s uint8_t zero; /* This must always be zero */ uint8_t flags; /* (See documentation) */ uint16_t hibase; /* Upper 16-bits of vector address for interrupt */ -} __attribute__((packed)); +} packed_struct; /* A struct describing a pointer to an array of interrupt handlers. This is * in a format suitable for giving to 'lidt'. @@ -359,7 +361,7 @@ struct idt_ptr_s { uint16_t limit; uint32_t base; /* The address of the first GDT entry */ -} __attribute__((packed)); +} packed_struct; /**************************************************************************** * Inline functions diff --git a/nuttx/arch/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c index be82a36169..aa752f84e7 100644 --- a/nuttx/arch/x86/src/common/up_assert.c +++ b/nuttx/arch/x86/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/x86/src/common/up_assert.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -209,7 +209,7 @@ static void up_dumpstate(void) * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/x86/src/common/up_internal.h b/nuttx/arch/x86/src/common/up_internal.h index 22956ecb38..df43ca1a8f 100644 --- a/nuttx/arch/x86/src/common/up_internal.h +++ b/nuttx/arch/x86/src/common/up_internal.h @@ -40,7 +40,10 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ +# include # include #endif @@ -174,7 +177,7 @@ extern void up_irqinitialize(void); 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_fullcontextrestore(uint32_t *restoreregs) noreturn_function; extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); extern void up_sigdeliver(void); extern void up_lowputc(char ch); diff --git a/nuttx/arch/x86/src/i486/up_irq.c b/nuttx/arch/x86/src/i486/up_irq.c index 3eb6d6070c..a160379e27 100644 --- a/nuttx/arch/x86/src/i486/up_irq.c +++ b/nuttx/arch/x86/src/i486/up_irq.c @@ -39,6 +39,7 @@ ****************************************************************************/ #include +#include #include #include @@ -62,7 +63,7 @@ * Private Function Prototypes ****************************************************************************/ -static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline)); +static void idt_outb(uint8_t val, uint16_t addr) noinline_function; static void up_remappic(void); static void up_idtentry(unsigned int index, uint32_t base, uint16_t sel, uint8_t flags); diff --git a/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S b/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S index 50ebdc0411..8ba59a5a76 100644 --- a/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S +++ b/nuttx/arch/x86/src/qemu/qemu_fullcontextrestore.S @@ -1,7 +1,7 @@ /************************************************************************** * arch/x86/src/qemu/qemu_fullcontextrestore.S * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -89,7 +89,7 @@ * Name: up_fullcontextrestore * * Full C prototype: - * void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn)); + * void up_fullcontextrestore(uint32_t *regs) noreturn_function; * **************************************************************************/ diff --git a/nuttx/arch/x86/src/qemu/qemu_handlers.c b/nuttx/arch/x86/src/qemu/qemu_handlers.c index aeb9b8b1fa..a0d6028aaa 100644 --- a/nuttx/arch/x86/src/qemu/qemu_handlers.c +++ b/nuttx/arch/x86/src/qemu/qemu_handlers.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/x86/src/qemu/qemu_handlers.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,7 @@ ****************************************************************************/ #include +#include #include #include @@ -52,7 +53,7 @@ * Private Function Prototypes ****************************************************************************/ -static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline)); +static void idt_outb(uint8_t val, uint16_t addr) noinline_function; /**************************************************************************** * Private Data diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c index d7d614a919..5832ead45b 100644 --- a/nuttx/arch/z16/src/common/up_assert.c +++ b/nuttx/arch/z16/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_assert.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -77,7 +77,7 @@ * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c index b35e8dd33a..ff4e569fb3 100644 --- a/nuttx/arch/z80/src/common/up_assert.c +++ b/nuttx/arch/z80/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_assert.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -77,7 +77,7 @@ * Name: _up_assert ****************************************************************************/ -static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ +static void _up_assert(int errorcode) /* noreturn_function */ { /* Are we in an interrupt handler or the idle task? */ diff --git a/nuttx/drivers/mtd/Kconfig b/nuttx/drivers/mtd/Kconfig index bda5afa84d..ae656c474e 100644 --- a/nuttx/drivers/mtd/Kconfig +++ b/nuttx/drivers/mtd/Kconfig @@ -36,19 +36,19 @@ config AT45DB_PWRSAVE bool "enables power save" default n depends on MTD_AT45DB - + config MTD_MP25P - bool "SPI-based M25P1 falsh" + bool "SPI-based M25P FLASH" default n select SPI config MP25P_SPIMODE - int "mp25p spi mode" + int "MP25P SPI mode" default 0 depends on MTD_MP25P config MP25P_MANUFACTURER - hex "mp25p manufacturers ID" + hex "MP25P manufacturers ID" default 0x20 depends on MTD_MP25P ---help--- @@ -66,3 +66,68 @@ config MTD_RAMTRON config MTD_RAM bool "Memory bus ram" default n + +config MTD_SST25 + bool "SPI-based SST25 FLASH" + default n + select SPI + +config SST25_SPIMODE + int "SST25 SPI Mode" + default 0 + depends on MTD_SST25 + +config SST25_SPIFREQUENCY + int "SST25 SPI Frequency" + default 20000000 + depends on MTD_SST25 + +config SST25_READONLY + bool "SST25 Read-Only FLASH" + default n + depends on MTD_SST25 + +config SST25_SECTOR512 + bool "Simulate 512 byte Erase Blocks" + default n + depends on MTD_SST25 + +config SST25_SLOWWRITE + bool + default y + depends on MTD_SST25 + +config SST25_SLOWREAD + bool + default n + depends on MTD_SST25 + +config MTD_W25 + bool "SPI-based W25 FLASH" + default n + select SPI + +config W25_SPIMODE + int "W25 SPI Mode" + default 0 + depends on MTD_W25 + +config W25_SPIFREQUENCY + int "W25 SPI Frequency" + default 20000000 + depends on MTD_W25 + +config W25_READONLY + bool "W25 Read-Only FLASH" + default n + depends on MTD_W25 + +config W25_SECTOR512 + bool "Simulate 512 byte Erase Blocks" + default n + depends on MTD_W25 + +config W25_SLOWREAD + bool + default n + depends on MTD_W25 diff --git a/nuttx/drivers/mtd/Make.defs b/nuttx/drivers/mtd/Make.defs index 866d7c713e..258e77ec91 100644 --- a/nuttx/drivers/mtd/Make.defs +++ b/nuttx/drivers/mtd/Make.defs @@ -47,6 +47,10 @@ ifeq ($(CONFIG_MTD_SST25),y) CSRCS += sst25.c endif +ifeq ($(CONFIG_MTD_W25),y) +CSRCS += w25.c +endif + # Include MTD driver support DEPPATH += --dep-path mtd diff --git a/nuttx/drivers/mtd/w25.c b/nuttx/drivers/mtd/w25.c new file mode 100644 index 0000000000..0d7028fec1 --- /dev/null +++ b/nuttx/drivers/mtd/w25.c @@ -0,0 +1,1188 @@ +/************************************************************************************ + * drivers/mtd/w25.c + * Driver for SPI-based W25x16, x32, and x64 and W25q16, q32, q64, and q128 FLASH + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration ********************************************************************/ +/* Per the data sheet, the W25 parts can be driven with either SPI mode 0 (CPOL=0 + * and CPHA=0) or mode 3 (CPOL=1 and CPHA=1). But I have heard that other devices + * can operate in mode 0 or 1. So you may need to specify CONFIG_W25_SPIMODE to + * select the best mode for your device. If CONFIG_W25_SPIMODE is not defined, + * mode 0 will be used. + */ + +#ifndef CONFIG_W25_SPIMODE +# define CONFIG_W25_SPIMODE SPIDEV_MODE0 +#endif + +/* SPI Frequency. May be up to 25MHz. */ + +#ifndef CONFIG_W25_SPIFREQUENCY +# define CONFIG_W25_SPIFREQUENCY 20000000 +#endif + +/* W25 Instructions *****************************************************************/ +/* Command Value Description */ +/* */ +#define W25_WREN 0x06 /* Write enable */ +#define W25_WRDI 0x04 /* Write Disable */ +#define W25_RDSR 0x05 /* Read status register */ +#define W25_WRSR 0x01 /* Write Status Register */ +#define W25_RDDATA 0x03 /* Read data bytes */ +#define W25_FRD 0x0b /* Higher speed read */ +#define W25_FRDD 0x3b /* Fast read, dual output */ +#define W25_PP 0x02 /* Program page */ +#define W25_BE 0xd8 /* Block Erase (64KB) */ +#define W25_SE 0x20 /* Sector erase (4KB) */ +#define W25_CE 0xc7 /* Chip erase */ +#define W25_PD 0xb9 /* Power down */ +#define W25_PURDID 0xab /* Release PD, Device ID */ +#define W25_RDMFID 0x90 /* Read Manufacturer / Device */ +#define W25_JEDEC_ID 0x9f /* JEDEC ID read */ + +/* W25 Registers ********************************************************************/ +/* Read ID (RDID) register values */ + +#define W25_MANUFACTURER 0xef /* Winbond Serial Flash */ +#define W25X16_DEVID 0x14 /* W25X16 device ID (0xab, 0x90) */ +#define W25X32_DEVID 0x15 /* W25X16 device ID (0xab, 0x90) */ +#define W25X64_DEVID 0x16 /* W25X16 device ID (0xab, 0x90) */ + +/* JEDEC Read ID register values */ + +#define W25_JEDEC_MANUFACTURER 0xef /* SST manufacturer ID */ +#define W25X_JEDEC_MEMORY_TYPE 0x30 /* W25X memory type */ +#define W25Q_JEDEC_MEMORY_TYPE_A 0x40 /* W25Q memory type */ +#define W25Q_JEDEC_MEMORY_TYPE_B 0x60 /* W25Q memory type */ + +#define W25_JEDEC_CAPACITY_16MBIT 0x15 /* 512x4096 = 16Mbit memory capacity */ +#define W25_JEDEC_CAPACITY_32MBIT 0x16 /* 1024x4096 = 32Mbit memory capacity */ +#define W25_JEDEC_CAPACITY_64MBIT 0x17 /* 2048x4096 = 64Mbit memory capacity */ +#define W25_JEDEC_CAPACITY_128MBIT 0x18 /* 4096x4096 = 128Mbit memory capacity */ + +#define NSECTORS_16MBIT 512 /* 512 sectors x 4096 bytes/sector = 2Mb */ +#define NSECTORS_32MBIT 1024 /* 1024 sectors x 4096 bytes/sector = 4Mb */ +#define NSECTORS_64MBIT 2048 /* 2048 sectors x 4096 bytes/sector = 8Mb */ +#define NSECTORS_128MBIT 4096 /* 4096 sectors x 4096 bytes/sector = 16Mb */ + +/* Status register bit definitions */ + +#define W25_SR_BUSY (1 << 0) /* Bit 0: Write in progress */ +#define W25_SR_WEL (1 << 1) /* Bit 1: Write enable latch bit */ +#define W25_SR_BP_SHIFT (2) /* Bits 2-5: Block protect bits */ +#define W25_SR_BP_MASK (15 << W25_SR_BP_SHIFT) +# define W25X16_SR_BP_NONE (0 << W25_SR_BP_SHIFT) /* Unprotected */ +# define W25X16_SR_BP_UPPER32nd (1 << W25_SR_BP_SHIFT) /* Upper 32nd */ +# define W25X16_SR_BP_UPPER16th (2 << W25_SR_BP_SHIFT) /* Upper 16th */ +# define W25X16_SR_BP_UPPER8th (3 << W25_SR_BP_SHIFT) /* Upper 8th */ +# define W25X16_SR_BP_UPPERQTR (4 << W25_SR_BP_SHIFT) /* Upper quarter */ +# define W25X16_SR_BP_UPPERHALF (5 << W25_SR_BP_SHIFT) /* Upper half */ +# define W25X16_SR_BP_ALL (6 << W25_SR_BP_SHIFT) /* All sectors */ +# define W25X16_SR_BP_LOWER32nd (9 << W25_SR_BP_SHIFT) /* Lower 32nd */ +# define W25X16_SR_BP_LOWER16th (10 << W25_SR_BP_SHIFT) /* Lower 16th */ +# define W25X16_SR_BP_LOWER8th (11 << W25_SR_BP_SHIFT) /* Lower 8th */ +# define W25X16_SR_BP_LOWERQTR (12 << W25_SR_BP_SHIFT) /* Lower quarter */ +# define W25X16_SR_BP_LOWERHALF (13 << W25_SR_BP_SHIFT) /* Lower half */ + +# define W25X32_SR_BP_NONE (0 << W25_SR_BP_SHIFT) /* Unprotected */ +# define W25X32_SR_BP_UPPER64th (1 << W25_SR_BP_SHIFT) /* Upper 64th */ +# define W25X32_SR_BP_UPPER32nd (2 << W25_SR_BP_SHIFT) /* Upper 32nd */ +# define W25X32_SR_BP_UPPER16th (3 << W25_SR_BP_SHIFT) /* Upper 16th */ +# define W25X32_SR_BP_UPPER8th (4 << W25_SR_BP_SHIFT) /* Upper 8th */ +# define W25X32_SR_BP_UPPERQTR (5 << W25_SR_BP_SHIFT) /* Upper quarter */ +# define W25X32_SR_BP_UPPERHALF (6 << W25_SR_BP_SHIFT) /* Upper half */ +# define W25X32_SR_BP_ALL (7 << W25_SR_BP_SHIFT) /* All sectors */ +# define W25X32_SR_BP_LOWER64th (9 << W25_SR_BP_SHIFT) /* Lower 64th */ +# define W25X32_SR_BP_LOWER32nd (10 << W25_SR_BP_SHIFT) /* Lower 32nd */ +# define W25X32_SR_BP_LOWER16th (11 << W25_SR_BP_SHIFT) /* Lower 16th */ +# define W25X32_SR_BP_LOWER8th (12 << W25_SR_BP_SHIFT) /* Lower 8th */ +# define W25X32_SR_BP_LOWERQTR (13 << W25_SR_BP_SHIFT) /* Lower quarter */ +# define W25X32_SR_BP_LOWERHALF (14 << W25_SR_BP_SHIFT) /* Lower half */ + +# define W25X64_SR_BP_NONE (0 << W25_SR_BP_SHIFT) /* Unprotected */ +# define W25X64_SR_BP_UPPER64th (1 << W25_SR_BP_SHIFT) /* Upper 64th */ +# define W25X64_SR_BP_UPPER32nd (2 << W25_SR_BP_SHIFT) /* Upper 32nd */ +# define W25X64_SR_BP_UPPER16th (3 << W25_SR_BP_SHIFT) /* Upper 16th */ +# define W25X64_SR_BP_UPPER8th (4 << W25_SR_BP_SHIFT) /* Upper 8th */ +# define W25X64_SR_BP_UPPERQTR (5 << W25_SR_BP_SHIFT) /* Upper quarter */ +# define W25X64_SR_BP_UPPERHALF (6 << W25_SR_BP_SHIFT) /* Upper half */ +# define W25X46_SR_BP_ALL (7 << W25_SR_BP_SHIFT) /* All sectors */ +# define W25X64_SR_BP_LOWER64th (9 << W25_SR_BP_SHIFT) /* Lower 64th */ +# define W25X64_SR_BP_LOWER32nd (10 << W25_SR_BP_SHIFT) /* Lower 32nd */ +# define W25X64_SR_BP_LOWER16th (11 << W25_SR_BP_SHIFT) /* Lower 16th */ +# define W25X64_SR_BP_LOWER8th (12 << W25_SR_BP_SHIFT) /* Lower 8th */ +# define W25X64_SR_BP_LOWERQTR (13 << W25_SR_BP_SHIFT) /* Lower quarter */ +# define W25X64_SR_BP_LOWERHALF (14 << W25_SR_BP_SHIFT) /* Lower half */ + /* Bit 6: Reserved */ +#define W25_SR_SRP (1 << 7) /* Bit 7: Status register write protect */ + +#define W25_DUMMY 0xa5 + +/* Chip Geometries ******************************************************************/ +/* All members of the family support uniform 4K-byte sectors and 256 byte pages */ + +#define W25_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4Kb */ +#define W25_SECTOR_SIZE (1 << 12) /* Sector size 1 << 12 = 4Kb */ +#define W25_PAGE_SHIFT 8 /* Sector size 1 << 8 = 256b */ +#define W25_PAGE_SIZE (1 << 8) /* Sector size 1 << 8 = 256b */ + +#ifdef CONFIG_W25_SECTOR512 /* Simulate a 512 byte sector */ +# define W25_SECTOR512_SHIFT 9 /* Sector size 1 << 9 = 512 bytes */ +# define W25_SECTOR512_SIZE (1 << 9) /* Sector size 1 << 9 = 512 bytes */ +#endif + +#define W25_ERASED_STATE 0xff /* State of FLASH when erased */ + +/* Cache flags */ + +#define W25_CACHE_VALID (1 << 0) /* 1=Cache has valid data */ +#define W25_CACHE_DIRTY (1 << 1) /* 1=Cache is dirty */ +#define W25_CACHE_ERASED (1 << 2) /* 1=Backing FLASH is erased */ + +#define IS_VALID(p) ((((p)->flags) & W25_CACHE_VALID) != 0) +#define IS_DIRTY(p) ((((p)->flags) & W25_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & W25_CACHE_DIRTY) != 0) + +#define SET_VALID(p) do { (p)->flags |= W25_CACHE_VALID; } while (0) +#define SET_DIRTY(p) do { (p)->flags |= W25_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= W25_CACHE_DIRTY; } while (0) + +#define CLR_VALID(p) do { (p)->flags &= ~W25_CACHE_VALID; } while (0) +#define CLR_DIRTY(p) do { (p)->flags &= ~W25_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~W25_CACHE_DIRTY; } while (0) + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +/* This type represents the state of the MTD device. The struct mtd_dev_s must + * appear at the beginning of the definition so that you can freely cast between + * pointers to struct mtd_dev_s and struct w25_dev_s. + */ + +struct w25_dev_s +{ + struct mtd_dev_s mtd; /* MTD interface */ + FAR struct spi_dev_s *spi; /* Saved SPI interface instance */ + uint16_t nsectors; /* Number of erase sectors */ + +#if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY) + uint8_t flags; /* Buffered sector flags */ + uint16_t esectno; /* Erase sector number in the cache*/ + FAR uint8_t *sector; /* Allocated sector data */ +#endif +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +/* Helpers */ + +static void w25_lock(FAR struct spi_dev_s *spi); +static inline void w25_unlock(FAR struct spi_dev_s *spi); +static inline int w25_readid(FAR struct w25_dev_s *priv); +#ifndef CONFIG_W25_READONLY +static void w25_unprotect(FAR struct w25_dev_s *priv); +#endif +static uint8_t w25_waitwritecomplete(FAR struct w25_dev_s *priv); +static inline void w25_wren(FAR struct w25_dev_s *priv); +static inline void w25_wrdi(FAR struct w25_dev_s *priv); +static void w25_sectorerase(FAR struct w25_dev_s *priv, off_t offset); +static inline int w25_chiperase(FAR struct w25_dev_s *priv); +static void w25_byteread(FAR struct w25_dev_s *priv, FAR uint8_t *buffer, + off_t address, size_t nbytes); +#ifndef CONFIG_W25_READONLY +static void w25_pagewrite(FAR struct w25_dev_s *priv, FAR const uint8_t *buffer, + off_t address, size_t nbytes); +#endif +#ifdef CONFIG_W25_SECTOR512 +static void w25_cacheflush(struct w25_dev_s *priv); +static FAR uint8_t *w25_cacheread(struct w25_dev_s *priv, off_t sector); +static void w25_cacheerase(struct w25_dev_s *priv, off_t sector); +static void w25_cachewrite(FAR struct w25_dev_s *priv, FAR const uint8_t *buffer, + off_t sector, size_t nsectors); +#endif + +/* MTD driver methods */ + +static int w25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks); +static ssize_t w25_bread(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR uint8_t *buf); +static ssize_t w25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR const uint8_t *buf); +static ssize_t w25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer); +static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg); + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: w25_lock + ************************************************************************************/ + +static void w25_lock(FAR struct spi_dev_s *spi) +{ + /* On SPI busses where there are multiple devices, it will be necessary to + * lock SPI to have exclusive access to the busses for a sequence of + * transfers. The bus should be locked before the chip is selected. + * + * This is a blocking call and will not return until we have exclusiv access to + * the SPI buss. We will retain that exclusive access until the bus is unlocked. + */ + + (void)SPI_LOCK(spi, true); + + /* After locking the SPI bus, the we also need call the setfrequency, setbits, and + * setmode methods to make sure that the SPI is properly configured for the device. + * If the SPI buss is being shared, then it may have been left in an incompatible + * state. + */ + + SPI_SETMODE(spi, CONFIG_W25_SPIMODE); + SPI_SETBITS(spi, 8); + (void)SPI_SETFREQUENCY(spi, CONFIG_W25_SPIFREQUENCY); +} + +/************************************************************************************ + * Name: w25_unlock + ************************************************************************************/ + +static inline void w25_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + +/************************************************************************************ + * Name: w25_readid + ************************************************************************************/ + +static inline int w25_readid(struct w25_dev_s *priv) +{ + uint16_t manufacturer; + uint16_t memory; + uint16_t capacity; + + fvdbg("priv: %p\n", priv); + + /* Lock the SPI bus, configure the bus, and select this FLASH part. */ + + w25_lock(priv->spi); + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send the "Read ID (RDID)" command and read the first three ID bytes */ + + (void)SPI_SEND(priv->spi, W25_JEDEC_ID); + manufacturer = SPI_SEND(priv->spi, W25_DUMMY); + memory = SPI_SEND(priv->spi, W25_DUMMY); + capacity = SPI_SEND(priv->spi, W25_DUMMY); + + /* Deselect the FLASH and unlock the bus */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + w25_unlock(priv->spi); + + fvdbg("manufacturer: %02x memory: %02x capacity: %02x\n", + manufacturer, memory, capacity); + + /* Check for a valid manufacturer and memory type */ + + if (manufacturer == W25_JEDEC_MANUFACTURER && + (memory == W25X_JEDEC_MEMORY_TYPE || + memory == W25Q_JEDEC_MEMORY_TYPE_A || + memory == W25Q_JEDEC_MEMORY_TYPE_B)) + { + /* Okay.. is it a FLASH capacity that we understand? If so, save + * the FLASH capacity. + */ + + /* 16M-bit / 2M-byte (2,097,152) + * + * W24X16, W25Q16BV, W25Q16CL, W25Q16CV, W25Q16DW + */ + + if (capacity == W25_JEDEC_CAPACITY_16MBIT) + { + priv->nsectors = NSECTORS_16MBIT; + } + + /* 32M-bit / M-byte (4,194,304) + * + * W25X32, W25Q32BV, W25Q32DW + */ + + else if (capacity == W25_JEDEC_CAPACITY_32MBIT) + { + priv->nsectors = NSECTORS_32MBIT; + } + + /* 64M-bit / 8M-byte (8,388,608) + * + * W25X64, W25Q64BV, W25Q64CV, W25Q64DW + */ + + else if (capacity == W25_JEDEC_CAPACITY_64MBIT) + { + priv->nsectors = NSECTORS_64MBIT; + } + + /* 128M-bit / 16M-byte (16,777,216) + * + * W25Q128BV + */ + + else if (capacity == W25_JEDEC_CAPACITY_128MBIT) + { + priv->nsectors = NSECTORS_128MBIT; + } + else + { + /* Nope.. we don't understand this capacity. */ + + return -ENODEV; + } + + return OK; + } + + /* We don't understand the manufacturer or the memory type */ + + return -ENODEV; +} + +/************************************************************************************ + * Name: w25_unprotect + ************************************************************************************/ + +#ifndef CONFIG_W25_READONLY +static void w25_unprotect(FAR struct w25_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Write enable (WREN)" */ + + w25_wren(priv); + + /* Re-select this FLASH part (This might not be necessary... but is it shown in + * the SST25 timing diagrams from which this code was leveraged.) + */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Write enable status (EWSR)" */ + + SPI_SEND(priv->spi, W25_WRSR); + + /* Following by the new status value */ + + SPI_SEND(priv->spi, 0); + SPI_SEND(priv->spi, 0); +} +#endif + +/************************************************************************************ + * Name: w25_waitwritecomplete + ************************************************************************************/ + +static uint8_t w25_waitwritecomplete(struct w25_dev_s *priv) +{ + uint8_t status; + + /* Are we the only device on the bus? */ + +#ifdef CONFIG_SPI_OWNBUS + + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Read Status Register (RDSR)" command */ + + (void)SPI_SEND(priv->spi, W25_RDSR); + + /* Loop as long as the memory is busy with a write cycle */ + + do + { + /* Send a dummy byte to generate the clock needed to shift out the status */ + + status = SPI_SEND(priv->spi, W25_DUMMY); + } + while ((status & W25_SR_BUSY) != 0); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + +#else + + /* Loop as long as the memory is busy with a write cycle */ + + do + { + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Read Status Register (RDSR)" command */ + + (void)SPI_SEND(priv->spi, W25_RDSR); + + /* Send a dummy byte to generate the clock needed to shift out the status */ + + status = SPI_SEND(priv->spi, W25_DUMMY); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + + /* Given that writing could take up to few tens of milliseconds, and erasing + * could take more. The following short delay in the "busy" case will allow + * other peripherals to access the SPI bus. + */ + +#if 0 /* Makes writes too slow */ + if ((status & W25_SR_BUSY) != 0) + { + w25_unlock(priv->spi); + usleep(1000); + w25_lock(priv->spi); + } +#endif + } + while ((status & W25_SR_BUSY) != 0); +#endif + + return status; +} + +/************************************************************************************ + * Name: w25_wren + ************************************************************************************/ + +static inline void w25_wren(struct w25_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Write Enable (WREN)" command */ + + (void)SPI_SEND(priv->spi, W25_WREN); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: w25_wrdi + ************************************************************************************/ + +static inline void w25_wrdi(struct w25_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Write Disable (WRDI)" command */ + + (void)SPI_SEND(priv->spi, W25_WRDI); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: w25_sectorerase + ************************************************************************************/ + +static void w25_sectorerase(struct w25_dev_s *priv, off_t sector) +{ + off_t address = sector << W25_SECTOR_SHIFT; + + fvdbg("sector: %08lx\n", (long)sector); + + /* Wait for any preceding write or erase operation to complete. */ + + (void)w25_waitwritecomplete(priv); + + /* Send write enable instruction */ + + w25_wren(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send the "Sector Erase (SE)" instruction */ + + (void)SPI_SEND(priv->spi, W25_SE); + + /* Send the sector address high byte first. Only the most significant bits (those + * corresponding to the sector) have any meaning. + */ + + (void)SPI_SEND(priv->spi, (address >> 16) & 0xff); + (void)SPI_SEND(priv->spi, (address >> 8) & 0xff); + (void)SPI_SEND(priv->spi, address & 0xff); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: w25_chiperase + ************************************************************************************/ + +static inline int w25_chiperase(struct w25_dev_s *priv) +{ + fvdbg("priv: %p\n", priv); + + /* Wait for any preceding write or erase operation to complete. */ + + (void)w25_waitwritecomplete(priv); + + /* Send write enable instruction */ + + w25_wren(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send the "Chip Erase (CE)" instruction */ + + (void)SPI_SEND(priv->spi, W25_CE); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + fvdbg("Return: OK\n"); + return OK; +} + +/************************************************************************************ + * Name: w25_byteread + ************************************************************************************/ + +static void w25_byteread(FAR struct w25_dev_s *priv, FAR uint8_t *buffer, + off_t address, size_t nbytes) +{ + uint8_t status; + + fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); + + /* Wait for any preceding write or erase operation to complete. */ + + status = w25_waitwritecomplete(priv); + DEBUGASSERT((status & (W25_SR_WEL|W25_SR_BP_MASK)) == 0); + + /* Make sure that writing is disabled */ + + w25_wrdi(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send "Read from Memory " instruction */ + +#ifdef CONFIG_W25_SLOWREAD + (void)SPI_SEND(priv->spi, W25_RDDATA); +#else + (void)SPI_SEND(priv->spi, W25_FRD); +#endif + + /* Send the address high byte first. */ + + (void)SPI_SEND(priv->spi, (address >> 16) & 0xff); + (void)SPI_SEND(priv->spi, (address >> 8) & 0xff); + (void)SPI_SEND(priv->spi, address & 0xff); + + /* Send a dummy byte */ + +#ifndef CONFIG_W25_SLOWREAD + (void)SPI_SEND(priv->spi, W25_DUMMY); +#endif + + /* Then read all of the requested bytes */ + + SPI_RECVBLOCK(priv->spi, buffer, nbytes); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: w25_pagewrite + ************************************************************************************/ + +#ifndef CONFIG_W25_READONLY +static void w25_pagewrite(struct w25_dev_s *priv, FAR const uint8_t *buffer, + off_t address, size_t nbytes) +{ + uint8_t status; + + fvdbg("address: %08lx nwords: %d\n", (long)address, (int)nbytes); + DEBUGASSERT(priv && buffer && ((uintptr_t)buffer & 0xff) == 0 && + (nbytes & 0xff) == 0); + + for (; nbytes > 0; nbytes -= W25_PAGE_SIZE) + { + /* Wait for any preceding write or erase operation to complete. */ + + status = w25_waitwritecomplete(priv); + DEBUGASSERT((status & (W25_SR_WEL|W25_SR_BP_MASK)) == 0); + + /* Enable write access to the FLASH */ + + w25_wren(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); + + /* Send the "Page Program (W25_PP)" Command */ + + SPI_SEND(priv->spi, W25_PP); + + /* Send the address high byte first. */ + + (void)SPI_SEND(priv->spi, (address >> 16) & 0xff); + (void)SPI_SEND(priv->spi, (address >> 8) & 0xff); + (void)SPI_SEND(priv->spi, address & 0xff); + + /* Then send the page of data */ + + SPI_SNDBLOCK(priv->spi, buffer, W25_PAGE_SIZE); + + /* Deselect the FLASH and setup for the next pass through the loop */ + + SPI_SELECT(priv->spi, SPIDEV_FLASH, false); + + /* Update addresses */ + + address += W25_PAGE_SIZE; + buffer += W25_PAGE_SIZE; + } + + /* Disable writing */ + + w25_wrdi(priv); +} +#endif + +/************************************************************************************ + * Name: w25_cacheflush + ************************************************************************************/ + +#if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY) +static void w25_cacheflush(struct w25_dev_s *priv) +{ + /* If the cached is dirty (meaning that it no longer matches the old FLASH contents) + * or was erased (with the cache containing the correct FLASH contents), then write + * the cached erase block to FLASH. + */ + + if (IS_DIRTY(priv) || IS_ERASED(priv)) + { + /* Write entire erase block to FLASH */ + + w25_pagewrite(priv, priv->sector, (off_t)priv->esectno << W25_SECTOR_SHIFT, + W25_SECTOR_SIZE); + + /* The case is no long dirty and the FLASH is no longer erased */ + + CLR_DIRTY(priv); + CLR_ERASED(priv); + } +} +#endif + +/************************************************************************************ + * Name: w25_cacheread + ************************************************************************************/ + +#if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY) +static FAR uint8_t *w25_cacheread(struct w25_dev_s *priv, off_t sector) +{ + off_t esectno; + int shift; + int index; + + /* Convert from the 512 byte sector to the erase sector size of the device. For + * exmample, if the actual erase sector size if 4Kb (1 << 12), then we first + * shift to the right by 3 to get the sector number in 4096 increments. + */ + + shift = W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT; + esectno = sector >> shift; + fvdbg("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + + /* Check if the requested erase block is already in the cache */ + + if (!IS_VALID(priv) || esectno != priv->esectno) + { + /* No.. Flush any dirty erase block currently in the cache */ + + w25_cacheflush(priv); + + /* Read the erase block into the cache */ + + w25_byteread(priv, priv->sector, (esectno << W25_SECTOR_SHIFT), W25_SECTOR_SIZE); + + /* Mark the sector as cached */ + + priv->esectno = esectno; + + SET_VALID(priv); /* The data in the cache is valid */ + CLR_DIRTY(priv); /* It should match the FLASH contents */ + CLR_ERASED(priv); /* The underlying FLASH has not been erased */ + } + + /* Get the index to the 512 sector in the erase block that holds the argument */ + + index = sector & ((1 << shift) - 1); + + /* Return the address in the cache that holds this sector */ + + return &priv->sector[index << W25_SECTOR512_SHIFT]; +} +#endif + +/************************************************************************************ + * Name: w25_cacheerase + ************************************************************************************/ + +#if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY) +static void w25_cacheerase(struct w25_dev_s *priv, off_t sector) +{ + FAR uint8_t *dest; + + /* First, make sure that the erase block containing the 512 byte sector is in + * the cache. + */ + + dest = w25_cacheread(priv, sector); + + /* Erase the block containing this sector if it is not already erased. + * The erased indicated will be cleared when the data from the erase sector + * is read into the cache and set here when we erase the block. + */ + + if (!IS_ERASED(priv)) + { + off_t esectno = sector >> (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); + fvdbg("sector: %ld esectno: %d\n", sector, esectno); + + w25_sectorerase(priv, esectno); + SET_ERASED(priv); + } + + /* Put the cached sector data into the erase state and mart the cache as dirty + * (but don't update the FLASH yet. The caller will do that at a more optimal + * time). + */ + + memset(dest, W25_ERASED_STATE, W25_SECTOR512_SIZE); + SET_DIRTY(priv); +} +#endif + +/************************************************************************************ + * Name: w25_cachewrite + ************************************************************************************/ + +#if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY) +static void w25_cachewrite(FAR struct w25_dev_s *priv, FAR const uint8_t *buffer, + off_t sector, size_t nsectors) +{ + FAR uint8_t *dest; + + for (; nsectors > 0; nsectors--) + { + /* First, make sure that the erase block containing 512 byte sector is in + * memory. + */ + + dest = w25_cacheread(priv, sector); + + /* Erase the block containing this sector if it is not already erased. + * The erased indicated will be cleared when the data from the erase sector + * is read into the cache and set here when we erase the sector. + */ + + if (!IS_ERASED(priv)) + { + off_t esectno = sector >> (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); + fvdbg("sector: %ld esectno: %d\n", sector, esectno); + + w25_sectorerase(priv, esectno); + SET_ERASED(priv); + } + + /* Copy the new sector data into cached erase block */ + + memcpy(dest, buffer, W25_SECTOR512_SIZE); + SET_DIRTY(priv); + + /* Set up for the next 512 byte sector */ + + buffer += W25_SECTOR512_SIZE; + sector++; + } + + /* Flush the last erase block left in the cache */ + + w25_cacheflush(priv); +} +#endif + +/************************************************************************************ + * Name: w25_erase + ************************************************************************************/ + +static int w25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks) +{ +#ifdef CONFIG_W25_READONLY + return -EACESS +#else + FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; + size_t blocksleft = nblocks; + + fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock access to the SPI bus until we complete the erase */ + + w25_lock(priv->spi); + + while (blocksleft-- > 0) + { + /* Erase each sector */ + +#ifdef CONFIG_W25_SECTOR512 + w25_cacheerase(priv, startblock); +#else + w25_sectorerase(priv, startblock); +#endif + startblock++; + } + +#ifdef CONFIG_W25_SECTOR512 + /* Flush the last erase block left in the cache */ + + w25_cacheflush(priv); +#endif + + w25_unlock(priv->spi); + return (int)nblocks; +#endif +} + +/************************************************************************************ + * Name: w25_bread + ************************************************************************************/ + +static ssize_t w25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, + FAR uint8_t *buffer) +{ +#ifdef CONFIG_W25_SECTOR512 + ssize_t nbytes; + + fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* On this device, we can handle the block read just like the byte-oriented read */ + + nbytes = w25_read(dev, startblock << W25_SECTOR512_SHIFT, nblocks << W25_SECTOR512_SHIFT, buffer); + if (nbytes > 0) + { + return nbytes >> W25_SECTOR512_SHIFT; + } + + return (int)nbytes; +#else + FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; + ssize_t nbytes; + + fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* On this device, we can handle the block read just like the byte-oriented read */ + + nbytes = w25_read(dev, startblock << W25_SECTOR_SHIFT, nblocks << W25_SECTOR_SHIFT, buffer); + if (nbytes > 0) + { + return nbytes >> W25_SECTOR_SHIFT; + } + + return (int)nbytes; +#endif +} + +/************************************************************************************ + * Name: w25_bwrite + ************************************************************************************/ + +static ssize_t w25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, + FAR const uint8_t *buffer) +{ +#ifdef CONFIG_W25_READONLY + return -EACCESS; +#else + FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; + + fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock the SPI bus and write all of the pages to FLASH */ + + w25_lock(priv->spi); + +#if defined(CONFIG_W25_SECTOR512) + w25_cachewrite(priv, buffer, startblock, nblocks); +#else + w25_pagewrite(priv, buffer, startblock << W25_SECTOR_SHIFT, + nblocks << W25_SECTOR_SHIFT); +#endif + w25_unlock(priv->spi); + + return nblocks; +#endif +} + +/************************************************************************************ + * Name: w25_read + ************************************************************************************/ + +static ssize_t w25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer) +{ + FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; + + fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + + /* Lock the SPI bus and select this FLASH part */ + + w25_lock(priv->spi); + w25_byteread(priv, buffer, offset, nbytes); + w25_unlock(priv->spi); + + fvdbg("return nbytes: %d\n", (int)nbytes); + return nbytes; +} + +/************************************************************************************ + * Name: w25_ioctl + ************************************************************************************/ + +static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) +{ + FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; + int ret = -EINVAL; /* Assume good command with bad parameters */ + + fvdbg("cmd: %d \n", cmd); + + switch (cmd) + { + case MTDIOC_GEOMETRY: + { + FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg); + if (geo) + { + /* Populate the geometry structure with information need to know + * the capacity and how to access the device. + * + * NOTE: that the device is treated as though it where just an array + * of fixed size blocks. That is most likely not true, but the client + * will expect the device logic to do whatever is necessary to make it + * appear so. + */ + +#ifdef CONFIG_W25_SECTOR512 + geo->blocksize = (1 << W25_SECTOR512_SHIFT); + geo->erasesize = (1 << W25_SECTOR512_SHIFT); + geo->neraseblocks = priv->nsectors << (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); +#else + geo->blocksize = W25_SECTOR_SIZE; + geo->erasesize = W25_SECTOR_SIZE; + geo->neraseblocks = priv->nsectors; +#endif + ret = OK; + + fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + geo->blocksize, geo->erasesize, geo->neraseblocks); + } + } + break; + + case MTDIOC_BULKERASE: + { + /* Erase the entire device */ + + w25_lock(priv->spi); + ret = w25_chiperase(priv); + w25_unlock(priv->spi); + } + break; + + case MTDIOC_XIPBASE: + default: + ret = -ENOTTY; /* Bad command */ + break; + } + + fvdbg("return %d\n", ret); + return ret; +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: w25_initialize + * + * Description: + * Create an initialize MTD device instance. MTD devices are not registered + * in the file system, but are created as instances that can be bound to + * other functions (such as a block or character driver front end). + * + ************************************************************************************/ + +FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) +{ + FAR struct w25_dev_s *priv; + int ret; + + fvdbg("spi: %p\n", spi); + + /* Allocate a state structure (we allocate the structure instead of using + * a fixed, static allocation so that we can handle multiple FLASH devices. + * The current implementation would handle only one FLASH part per SPI + * device (only because of the SPIDEV_FLASH definition) and so would have + * to be extended to handle multiple FLASH parts on the same SPI bus. + */ + + priv = (FAR struct w25_dev_s *)kzalloc(sizeof(struct w25_dev_s)); + if (priv) + { + /* Initialize the allocated structure */ + + priv->mtd.erase = w25_erase; + priv->mtd.bread = w25_bread; + priv->mtd.bwrite = w25_bwrite; + priv->mtd.read = w25_read; + priv->mtd.ioctl = w25_ioctl; + priv->spi = spi; + + /* Deselect the FLASH */ + + SPI_SELECT(spi, SPIDEV_FLASH, false); + + /* Identify the FLASH chip and get its capacity */ + + ret = w25_readid(priv); + if (ret != OK) + { + /* Unrecognized! Discard all of that work we just did and return NULL */ + + fdbg("Unrecognized\n"); + kfree(priv); + priv = NULL; + } + else + { + /* Make sure the the FLASH is unprotected so that we can write into it */ + +#ifndef CONFIG_W25_READONLY + w25_unprotect(priv); +#endif + +#ifdef CONFIG_W25_SECTOR512 /* Simulate a 512 byte sector */ + /* Allocate a buffer for the erase block cache */ + + priv->sector = (FAR uint8_t *)kmalloc(W25_SECTOR_SIZE); + if (!priv->sector) + { + /* Allocation failed! Discard all of that work we just did and return NULL */ + + fdbg("Allocation failed\n"); + kfree(priv); + priv = NULL; + } +#endif + } + } + + /* Return the implementation-specific state structure as the MTD device */ + + fvdbg("Return %p\n", priv); + return (FAR struct mtd_dev_s *)priv; +} diff --git a/nuttx/include/nuttx/analog/adc.h b/nuttx/include/nuttx/analog/adc.h index 873f5d9da7..f654bff05e 100644 --- a/nuttx/include/nuttx/analog/adc.h +++ b/nuttx/include/nuttx/analog/adc.h @@ -47,6 +47,7 @@ ************************************************************************************/ #include +#include #include #include @@ -78,7 +79,7 @@ struct adc_msg_s { uint8_t am_channel; /* The 8-bit ADC Channel */ int32_t am_data; /* ADC convert result (4 bytes) */ -} __attribute__((__packed__)); +} packed_struct; struct adc_fifo_s { diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 733d58eec6..1e0af43826 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/compiler.h * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -92,6 +92,14 @@ # define reentrant_function # define naked_function +/* The inline_function attribute informs GCC that the function should always + * be inlined, regardless of the level of optimization. The noinline_function + * indicates that the function should never be inlined. + */ + +# define inline_function __attribute__ ((always_inline)) +# define noinline_function __attribute__ ((noinline)) + /* GCC has does not use storage classes to qualify addressing */ # define FAR @@ -224,10 +232,15 @@ # define noreturn_function # define packed_struct -/* SDCC does support "naked" function s*/ +/* SDCC does support "naked" functions */ # define naked_function __naked +/* SDCC does not support forced inlining. */ + +# define inline_function +# define noinline_function + /* The reentrant attribute informs SDCC that the function * must be reentrant. In this case, SDCC will store input * arguments on the stack to support reentrancy. @@ -320,11 +333,13 @@ # define weak_function # define weak_const_function -/* The Zilog compiler does not support the noreturn, packed, or naked attributes */ +/* The Zilog compiler does not support the noreturn, packed, naked attributes */ # define noreturn_function # define packed_struct # define naked_function +# define inline_function +# define noinline_function /* The Zilog compiler does not support the reentrant attribute */ @@ -406,7 +421,8 @@ # define packed_struct # define reentrant_function # define naked_function - +# define inline_function +# define noinline_function # define FAR # define NEAR diff --git a/nuttx/include/nuttx/mtd.h b/nuttx/include/nuttx/mtd.h index 5b955a45f4..44582c4124 100644 --- a/nuttx/include/nuttx/mtd.h +++ b/nuttx/include/nuttx/mtd.h @@ -220,6 +220,19 @@ EXTERN FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_dev_s *dev); EXTERN FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev); + +/**************************************************************************** + * Name: w25_initialize + * + * Description: + * Create an initialized MTD device instance. MTD devices are not registered + * in the file system, but are created as instances that can be bound to + * other functions (such as a block or character driver front end). + * + ****************************************************************************/ + +EXTERN FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *dev); + #undef EXTERN #ifdef __cplusplus } From 0ad18342423b507db7984051b47a0710436ed05a Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 16 Sep 2012 12:26:14 -0700 Subject: [PATCH 89/95] Minor correctness fixes. --- Tools/px_uploader.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index dfb53980a9..7dbd1802bb 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python ############################################################################ # # Copyright (C) 2012 PX4 Development Team. All rights reserved. @@ -148,16 +149,16 @@ class uploader(object): + uploader.EOC) self.__getSync() - def __trySync(self): - c = self.__recv() - if (c != self.INSYNC): - #print("unexpected 0x%x instead of INSYNC" % ord(c)) - return False; - c = self.__recv() - if (c != self.OK): - #print("unexpected 0x%x instead of OK" % ord(c)) - return False - return True +# def __trySync(self): +# c = self.__recv() +# if (c != self.INSYNC): +# #print("unexpected 0x%x instead of INSYNC" % ord(c)) +# return False; +# c = self.__recv() +# if (c != self.OK): +# #print("unexpected 0x%x instead of OK" % ord(c)) +# return False +# return True # send the GET_DEVICE command and wait for an info parameter def __getInfo(self, param): @@ -196,6 +197,7 @@ class uploader(object): self.__send(uploader.READ_MULTI + chr(len(data)) + uploader.EOC) + self.port.flush() programmed = self.__recv(len(data)) if (programmed != data): print("got " + binascii.hexlify(programmed)) From 1947d55686c1c86349b4f0bb1153c81cd04c618c Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 16 Sep 2012 21:05:40 +0000 Subject: [PATCH 90/95] Add W25 FLASH support to fire-stm32v2 and shenzhou boards; a fiew enc28j60 updates git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5162 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/TODO | 9 +- nuttx/configs/fire-stm32v2/src/Makefile | 12 +- .../configs/fire-stm32v2/src/fire-internal.h | 12 ++ nuttx/configs/fire-stm32v2/src/up_w25.c | 153 ++++++++++++++++++ nuttx/configs/shenzhou/src/Makefile | 4 + .../configs/shenzhou/src/shenzhou-internal.h | 12 ++ nuttx/configs/shenzhou/src/up_w25.c | 153 ++++++++++++++++++ nuttx/drivers/net/Kconfig | 9 ++ nuttx/drivers/net/enc28j60.c | 25 +-- nuttx/drivers/net/enc28j60.h | 8 +- 10 files changed, 370 insertions(+), 27 deletions(-) create mode 100644 nuttx/configs/fire-stm32v2/src/up_w25.c create mode 100644 nuttx/configs/shenzhou/src/up_w25.c diff --git a/nuttx/TODO b/nuttx/TODO index ae42d6c1c7..72a94290b9 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated August 12, 2012) +NuttX TODO List (Last updated September 16, 2012) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with @@ -548,13 +548,6 @@ o Network (net/, drivers/net) Status: Open Priority: Low... fix defconfig files as necessary. - Title: UNFINISHED ENC28J60 DRIVER - Description: So far, I have not come up with a usable hardware platform to - verify the ENC28J60 Ethernet driver (drivers/net/enc28j60.c). - So it is untested. - Status: Open - Priority: Low unless you need it. - o USB (drivers/usbdev, drivers/usbhost) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/configs/fire-stm32v2/src/Makefile b/nuttx/configs/fire-stm32v2/src/Makefile index 4c4fd1d417..d605a8f3bf 100644 --- a/nuttx/configs/fire-stm32v2/src/Makefile +++ b/nuttx/configs/fire-stm32v2/src/Makefile @@ -56,10 +56,6 @@ else CSRCS += up_userleds.c endif -ifeq ($(CONFIG_ENC28J60),y) -CSRCS += up_enc28j60.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += up_buttons.c endif @@ -68,6 +64,14 @@ ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif +ifeq ($(CONFIG_ENC28J60),y) +CSRCS += up_enc28j60.c +endif + +ifeq ($(CONFIG_MTD_W25),y) +CSRCS += up_w25.c +endif + ifeq ($(CONFIG_USBMSC),y) CSRCS += up_usbmsc.c endif diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index 0260d8e33c..e9f7a85089 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -303,6 +303,18 @@ void stm32_selectlcd(void); int stm32_sdinitialize(int minor); +/**************************************************************************** + * Name: stm32_w25initialize + * + * Description: + * Initialize and register the W25 FLASH file system. + * + ****************************************************************************/ + +#ifdef CONFIG_MTD_W25 +int stm32_w25initialize(int minor); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_FIRE_STM32V2_SRC_FIRE_INTERNAL_H */ diff --git a/nuttx/configs/fire-stm32v2/src/up_w25.c b/nuttx/configs/fire-stm32v2/src/up_w25.c new file mode 100644 index 0000000000..a3460a1588 --- /dev/null +++ b/nuttx/configs/fire-stm32v2/src/up_w25.c @@ -0,0 +1,153 @@ +/**************************************************************************** + * config/fire-stm32v2/src/up_w25.c + * arch/arm/src/board/up_w25.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include + +#ifdef CONFIG_STM32_SPI1 +# include +# include +# include +#endif + +#include "fire-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ +/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ + +#define HAVE_W25 1 +#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) +# undef HAVE_W25 +#endif + +/* Can't support W25 features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef HAVE_W25 +#endif + +/* Can't support both FAT and NXFFS */ + +#if defined(CONFIG_FS_FAT) && defined(CONFIG_FS_NXFFS) +# warning "Can't support both FAT and NXFFS -- using FAT" +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_w25initialize + * + * Description: + * Initialize and register the W25 FLASH file system. + * + ****************************************************************************/ + +int stm32_w25initialize(int minor) +{ +#ifdef HAVE_W25 + FAR struct spi_dev_s *spi; + FAR struct mtd_dev_s *mtd; +#ifndef CONFIG_FS_NXFFS + uint8_t devname[12]; +#endif + int ret; + + /* Get the SPI port */ + + spi = up_spiinitialize(2); + if (!spi) + { + fdbg("ERROR: Failed to initialize SPI port 2\n"); + return -ENODEV; + } + + /* Now bind the SPI interface to the SST 25 SPI FLASH driver */ + + mtd = sst25_initialize(spi); + if (!mtd) + { + fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + return -ENODEV; + } + +#ifndef CONFIG_FS_NXFFS + /* And finally, use the FTL layer to wrap the MTD driver as a block driver */ + + ret = ftl_initialize(minor, mtd); + if (ret < 0) + { + fdbg("ERROR: Initialize the FTL layer\n"); + return ret; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + return ret; + } + + /* Mount the file system at /mnt/w25 */ + + snprintf(devname, 12, "/mnt/w25%c", a + minor); + ret = mount(NULL, devname, "nxffs", 0, NULL); + if (ret < 0) + { + fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + return ret; + } +#endif +#endif + return OK; +} diff --git a/nuttx/configs/shenzhou/src/Makefile b/nuttx/configs/shenzhou/src/Makefile index 11e36f136e..50ddaa5cad 100644 --- a/nuttx/configs/shenzhou/src/Makefile +++ b/nuttx/configs/shenzhou/src/Makefile @@ -68,6 +68,10 @@ ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif +ifeq ($(CONFIG_MTD_W25),y) +CSRCS += up_w25.c +endif + ifeq ($(CONFIG_USBMSC),y) CSRCS += up_usbmsc.c endif diff --git a/nuttx/configs/shenzhou/src/shenzhou-internal.h b/nuttx/configs/shenzhou/src/shenzhou-internal.h index 6f9683a56f..19460bc998 100644 --- a/nuttx/configs/shenzhou/src/shenzhou-internal.h +++ b/nuttx/configs/shenzhou/src/shenzhou-internal.h @@ -270,5 +270,17 @@ int stm32_usbhost_initialize(void); int stm32_sdinitialize(int minor); +/**************************************************************************** + * Name: stm32_w25initialize + * + * Description: + * Initialize and register the W25 FLASH file system. + * + ****************************************************************************/ + +#ifdef CONFIG_MTD_W25 +int stm32_w25initialize(int minor); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SHENZHOUL_SRC_SHENZHOU_INTERNAL_H */ diff --git a/nuttx/configs/shenzhou/src/up_w25.c b/nuttx/configs/shenzhou/src/up_w25.c new file mode 100644 index 0000000000..aa547f6fe4 --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_w25.c @@ -0,0 +1,153 @@ +/**************************************************************************** + * config/shenzhou/src/up_w25.c + * arch/arm/src/board/up_w25.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include + +#ifdef CONFIG_STM32_SPI1 +# include +# include +# include +#endif + +#include "shenzhou-internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ +/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ + +#define HAVE_W25 1 +#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) +# undef HAVE_W25 +#endif + +/* Can't support W25 features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef HAVE_W25 +#endif + +/* Can't support both FAT and NXFFS */ + +#if defined(CONFIG_FS_FAT) && defined(CONFIG_FS_NXFFS) +# warning "Can't support both FAT and NXFFS -- using FAT" +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_w25initialize + * + * Description: + * Initialize and register the W25 FLASH file system. + * + ****************************************************************************/ + +int stm32_w25initialize(int minor) +{ +#ifdef HAVE_W25 + FAR struct spi_dev_s *spi; + FAR struct mtd_dev_s *mtd; +#ifndef CONFIG_FS_NXFFS + uint8_t devname[12]; +#endif + int ret; + + /* Get the SPI port */ + + spi = up_spiinitialize(2); + if (!spi) + { + fdbg("ERROR: Failed to initialize SPI port 2\n"); + return -ENODEV; + } + + /* Now bind the SPI interface to the SST 25 SPI FLASH driver */ + + mtd = sst25_initialize(spi); + if (!mtd) + { + fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + return -ENODEV; + } + +#ifndef CONFIG_FS_NXFFS + /* And finally, use the FTL layer to wrap the MTD driver as a block driver */ + + ret = ftl_initialize(minor, mtd); + if (ret < 0) + { + fdbg("ERROR: Initialize the FTL layer\n"); + return ret; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + return ret; + } + + /* Mount the file system at /mnt/w25 */ + + snprintf(devname, 12, "/mnt/w25%c", a + minor); + ret = mount(NULL, devname, "nxffs", 0, NULL); + if (ret < 0) + { + fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + return ret; + } +#endif +#endif + return OK; +} diff --git a/nuttx/drivers/net/Kconfig b/nuttx/drivers/net/Kconfig index b5c09bf018..a42d35fea8 100644 --- a/nuttx/drivers/net/Kconfig +++ b/nuttx/drivers/net/Kconfig @@ -25,6 +25,7 @@ config ENC28J60 References: ENC28J60 Data Sheet, Stand-Alone Ethernet Controller with SPI Interface, DS39662C, 2008 Microchip Technology Inc. + if ENC28J60 config ENC28J60_NINTERFACES int "Number of physical ENC28J60" @@ -61,6 +62,14 @@ config ENC28J60_HALFDUPPLEX default n ---help--- Default is full duplex + +config ENC28J60_DUMPPACKET + bool "Dump Packets" + default n + ---help--- + If selected, the ENC28J60 driver will dump the contents of each + packet to the console. + endif config NET_E1000 diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 654d0ae61e..bb79910b3f 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -150,7 +150,7 @@ #define ALIGNED_BUFSIZE ((CONFIG_NET_BUFSIZE + 255) & ~255) #define PKTMEM_TX_START 0x0000 /* Start TX buffer at 0 */ -#define PKTMEM_TX_ENDP1 ALIGNED_BUFSIZE /* Allow TX buffer for one frame + */ +#define PKTMEM_TX_ENDP1 ALIGNED_BUFSIZE /* Allow TX buffer for one frame */ #define PKTMEM_RX_START PKTMEM_TX_ENDP1 /* Followed by RX buffer */ #define PKTMEM_RX_END PKTMEM_END /* RX buffer goes to the end of SRAM */ @@ -1352,7 +1352,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) /* Copy the data data from the receive buffer to priv->dev.d_buf */ enc_rdbuffer(priv, priv->dev.d_buf, priv->dev.d_len); - enc_dumppacket("Received Packet", priv->ld_dev.d_buf, priv->ld_dev.d_len); + enc_dumppacket("Received Packet", priv->dev.d_buf, priv->dev.d_len); /* Dispatch the packet to uIP */ @@ -1419,9 +1419,12 @@ static void enc_irqworker(FAR void *arg) while ((eir = enc_rdgreg(priv, ENC_EIR) & EIR_ALLINTS) != 0) { /* Handle interrupts according to interrupt register register bit - * settings - * - * DMAIF: The DMA interrupt indicates that the DMA module has completed + * settings. + */ + + nllvdbg("EIR: %02x\n", eir); + + /* DMAIF: The DMA interrupt indicates that the DMA module has completed * its memory copy or checksum calculation. Additionally, this interrupt * will be caused if the host controller cancels a DMA operation by * manually clearing the DMAST bit. Once set, DMAIF can only be cleared @@ -1538,6 +1541,8 @@ static void enc_irqworker(FAR void *arg) uint8_t pktcnt = enc_rdbreg(priv, ENC_EPKTCNT); if (pktcnt > 0) { + nllvdbg("EPKTCNT: %02x\n", pktcnt); + #ifdef CONFIG_ENC28J60_STATS if (pktcnt > priv->stats.maxpktcnt) { @@ -1856,11 +1861,9 @@ static int enc_ifup(struct uip_driver_s *dev) */ enc_wrphy(priv, ENC_PHIE, PHIE_PGEIE | PHIE_PLNKIE); - enc_bfsgreg(priv, ENC_EIE, EIE_INTIE | EIE_PKTIE); - enc_bfsgreg(priv, ENC_EIR, EIR_DMAIF | EIR_LINKIF | EIR_TXIF | - EIR_TXERIF | EIR_RXERIF | EIR_PKTIF); - enc_wrgreg(priv, ENC_EIE, EIE_INTIE | EIE_PKTIE | EIE_LINKIE | - EIE_TXIE | EIE_TXERIE | EIE_RXERIE); + enc_bfcgreg(priv, ENC_EIR, EIR_ALLINTS); + enc_wrgreg(priv, ENC_EIE, EIE_INTIE | EIE_PKTIE | EIE_LINKIE | + EIE_TXIE | EIE_TXERIE | EIE_RXERIE); /* Enable the receiver */ @@ -2289,7 +2292,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) enc_wrbreg(priv, ENC_MAIPGL, 0x12); - /* Set ack-to-Back Inter-Packet Gap */ + /* Set Back-to-Back Inter-Packet Gap */ enc_wrbreg(priv, ENC_MABBIPG, 0x15); #endif diff --git a/nuttx/drivers/net/enc28j60.h b/nuttx/drivers/net/enc28j60.h index 3c787c5339..dab9cc5cf3 100644 --- a/nuttx/drivers/net/enc28j60.h +++ b/nuttx/drivers/net/enc28j60.h @@ -131,10 +131,10 @@ #define ECON1_BSEL_SHIFT (0) /* Bits 0-1: Bank select */ #define ECON1_BSEL_MASK (3 << ECON1_BSEL_SHIFT) -# define ECON1_BSEL_BANK0 (0 << 0) /* Bank 0 */ -# define ECON1_BSEL_BANK1 (1 << 1) /* Bank 1 */ -# define ECON1_BSEL_BANK2 (2 << 0) /* Bank 2 */ -# define ECON1_BSEL_BANK3 (3 << 0) /* Bank 3 */ +# define ECON1_BSEL_BANK0 (0 << ECON1_BSEL_SHIFT) /* Bank 0 */ +# define ECON1_BSEL_BANK1 (1 << ECON1_BSEL_SHIFT) /* Bank 1 */ +# define ECON1_BSEL_BANK2 (2 << ECON1_BSEL_SHIFT) /* Bank 2 */ +# define ECON1_BSEL_BANK3 (3 << ECON1_BSEL_SHIFT) /* Bank 3 */ #define ECON1_RXEN (1 << 2) /* Bit 2: Receive Enable */ #define ECON1_TXRTS (1 << 3) /* Bit 3: Transmit Request to Send */ #define ECON1_CSUMEN (1 << 4) /* Bit 4: DMA Checksum Enable */ From cdaf7270614ab2294b6654bffbd7b6bc88c73389 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 16 Sep 2012 22:01:23 +0000 Subject: [PATCH 91/95] More uIP webserver changes from Kate git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5163 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/include/netutils/httpd.h | 8 ++++++-- apps/netutils/README.txt | 8 +++++--- apps/netutils/webserver/httpd.c | 6 ++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/apps/include/netutils/httpd.h b/apps/include/netutils/httpd.h index bcecca73ba..8ba9e2f7b0 100644 --- a/apps/include/netutils/httpd.h +++ b/apps/include/netutils/httpd.h @@ -84,9 +84,13 @@ extern "C" { #define HTTPD_IOBUFFER_SIZE (3*UIP_TCP_MSS) -/* this is the maximum size of a file path */ +/* This is the maximum size of a file path */ +#if defined(CONFIG_NETUTILS_HTTPD_MMAP) || defined(CONFIG_NETUTILS_HTTPD_SENDFILE) +#define HTTPD_MAX_FILENAME PATH_MAX +#else #define HTTPD_MAX_FILENAME 20 +#endif /**************************************************************************** * Public types @@ -96,7 +100,7 @@ struct httpd_fs_file { char *data; int len; -#ifdef CONFIG_NETUTILS_HTTPD_MMAP +#if defined(CONFIG_NETUTILS_HTTPD_MMAP) || defined(CONFIG_NETUTILS_HTTPD_SENDFILE) int fd; #endif }; diff --git a/apps/netutils/README.txt b/apps/netutils/README.txt index 73e6689fec..e97bf5a618 100644 --- a/apps/netutils/README.txt +++ b/apps/netutils/README.txt @@ -14,8 +14,8 @@ uIP Applications This directory contains most of the network applications contained under the uIP-1.0 apps directory. As the uIP apps/README says, -these applications "are not all heavily tested." These uIP apps -include: +these applications "are not all heavily tested." These uIP-based +apps include: dhcpc - Dynamic Host Configuration Protocol (DHCP) client. See apps/include/netutils/dhcpc.h for interface information. @@ -29,7 +29,9 @@ include: for interface information. You may find additional information on these apps in the uIP forum -accessible through: http://www.sics.se/~adam/uip/index.php/Main_Page +accessible through: http://www.sics.se/~adam/uip/index.php/Main_Page . +Some of these (such as the uIP web server) have grown some additional +functionality due primarily to NuttX user contributions. Other Network Applications ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index 0c0ee0389d..b482b1e035 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -100,6 +100,7 @@ static const char g_httpcontenttypehtml[] = "Content-type: text/html\r\n\r\n"; static const char g_httpcontenttypejpg[] = "Content-type: image/jpeg\r\n\r\n"; static const char g_httpcontenttypeplain[] = "Content-type: text/plain\r\n\r\n"; static const char g_httpcontenttypepng[] = "Content-type: image/png\r\n\r\n"; +static const char g_httpcontenttypejs[] = "Content-type: text/javascript\r\n\r\n"; #ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE static const char g_httpextensionshtml[] = ".shtml"; @@ -109,6 +110,7 @@ static const char g_httpextensioncss[] = ".css"; static const char g_httpextensionpng[] = ".png"; static const char g_httpextensiongif[] = ".gif"; static const char g_httpextensionjpg[] = ".jpg"; +static const char g_httpextensionjs[] = ".js"; static const char g_http404path[] = "/404.html"; #ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE @@ -391,6 +393,10 @@ static int send_headers(struct httpd_state *pstate, const char *statushdr, int l { ret = httpd_addchunk(pstate, g_httpcontenttypejpg, strlen(g_httpcontenttypejpg)); } + else if (strncmp(g_httpextensionjs, ptr, strlen(g_httpextensionjs)) == 0) + { + ret = httpd_addchunk(pstate, g_httpcontenttypejs, strlen(g_httpcontenttypejs)); + } else { ret = httpd_addchunk(pstate, g_httpcontenttypeplain, strlen(g_httpcontenttypeplain)); From 01e52526cf764e8670cd920696e5485e64d1df36 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 16 Sep 2012 16:42:37 -0700 Subject: [PATCH 92/95] Turn off function instrumentation for inline functions; thanks Greg. --- nuttx/include/nuttx/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 1e0af43826..d74fcbea08 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -97,7 +97,7 @@ * indicates that the function should never be inlined. */ -# define inline_function __attribute__ ((always_inline)) +# define inline_function __attribute__ ((always_inline,no_instrument_function)) # define noinline_function __attribute__ ((noinline)) /* GCC has does not use storage classes to qualify addressing */ From 4cbc1c8d86396b0bccab57478888e215e3f95b3f Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 16 Sep 2012 17:11:58 -0700 Subject: [PATCH 93/95] Re-enable the I2C lock around ACK sending pending a possible upstream fix. --- nuttx/arch/arm/src/stm32/stm32_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c index 2d1a7142c5..a4b10b55c6 100644 --- a/nuttx/arch/arm/src/stm32/stm32_i2c.c +++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c @@ -1199,7 +1199,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) stm32_i2c_traceevent(priv, I2CEVENT_RCVBYTE, priv->dcnt); #ifdef CONFIG_I2C_POLLED - //irqstate_t state = irqsave(); + irqstate_t state = irqsave(); #endif /* Receive a byte */ @@ -1215,7 +1215,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) priv->dcnt--; #ifdef CONFIG_I2C_POLLED - //irqrestore(state); + irqrestore(state); #endif } From 44adaa736ce684083da13524ed58c80f1ccf4b68 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 16 Sep 2012 23:41:26 -0700 Subject: [PATCH 94/95] A system command that knows how to reflash the bootloader on the PX4FMU. --- apps/systemcmds/bl_update/Makefile | 42 +++++++ apps/systemcmds/bl_update/bl_update.c | 174 ++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 apps/systemcmds/bl_update/Makefile create mode 100644 apps/systemcmds/bl_update/bl_update.c diff --git a/apps/systemcmds/bl_update/Makefile b/apps/systemcmds/bl_update/Makefile new file mode 100644 index 0000000000..9d0e156f60 --- /dev/null +++ b/apps/systemcmds/bl_update/Makefile @@ -0,0 +1,42 @@ +############################################################################ +# +# Copyright (C) 2012 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# +# Build the eeprom tool. +# + +APPNAME = bl_update +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 4096 + +include $(APPDIR)/mk/app.mk diff --git a/apps/systemcmds/bl_update/bl_update.c b/apps/systemcmds/bl_update/bl_update.c new file mode 100644 index 0000000000..8bfc292348 --- /dev/null +++ b/apps/systemcmds/bl_update/bl_update.c @@ -0,0 +1,174 @@ +/**************************************************************************** + * + * Copyright (C) 2012 PX4 Development Team. All rights reserved. + * Author: Lorenz Meier + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name PX4 nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/** + * @file bl_update.c + * + * STM32F4 bootloader update tool. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "systemlib/systemlib.h" +#include "systemlib/param/param.h" +#include "systemlib/err.h" + +__EXPORT int bl_update_main(int argc, char *argv[]); + +int +bl_update_main(int argc, char *argv[]) +{ + if (argc != 2) + errx(1, "missing firmware filename"); + + int fd = open(argv[1], O_RDONLY); + if (fd < 0) + err(1, "open %s", argv[1]); + + struct stat s; + if (stat(argv[1], &s) < 0) + err(1, "stat %s", argv[1]); + + /* sanity-check file size */ + if (s.st_size > 16384) + errx(1, "%s: file too large", argv[1]); + + uint8_t *buf = malloc(s.st_size); + if (buf == NULL) + errx(1, "failed to allocate %u bytes for firmware buffer", s.st_size); + + if (read(fd, buf, s.st_size) != s.st_size) + err(1, "firmware read error"); + close(fd); + + uint32_t *hdr = (uint32_t *)buf; + if ((hdr[0] < 0x20000000) || /* stack not below RAM */ + (hdr[0] > (0x20000000 + (128 * 1024))) || /* stack not above RAM */ + (hdr[1] < 0x08000000) || /* entrypoint not below flash */ + ((hdr[1] - 0x08000000) > 16384)) { /* entrypoint not outside bootloader */ + free(buf); + errx(1, "not a bootloader image"); + } + + warnx("image validated, erasing bootloader..."); + usleep(10000); + + /* prevent other tasks from running while we do this */ + sched_lock(); + + /* unlock the control register */ + volatile uint32_t *keyr = (volatile uint32_t *)0x40023c04; + *keyr = 0x45670123U; + *keyr = 0xcdef89abU; + + volatile uint32_t *sr = (volatile uint32_t *)0x40023c0c; + volatile uint32_t *cr = (volatile uint32_t *)0x40023c10; + volatile uint8_t *base = (volatile uint8_t *)0x08000000; + + /* check the control register */ + if (*cr & 0x80000000) { + warnx("WARNING: flash unlock failed, flash aborted"); + goto flash_end; + } + + /* erase the bootloader sector */ + *cr = 0x2; + *cr = 0x10002; + + /* wait for the operation to complete */ + while (*sr & 0x1000) { + } + if (*sr & 0xf2) { + warnx("WARNING: erase error 0x%02x", *sr); + goto flash_end; + } + + /* verify the erase */ + for (int i = 0; i < s.st_size; i++) { + if (base[i] != 0xff) { + warnx("WARNING: erase failed at %d - retry update, DO NOT reboot", i); + goto flash_end; + } + } + + warnx("flashing..."); + + /* now program the bootloader - speed is not critical so use x8 mode */ + for (int i = 0; i < s.st_size; i++) { + + /* program a byte */ + *cr = 1; + base[i] = buf[i]; + + /* wait for the operation to complete */ + while (*sr & 0x1000) { + } + if (*sr & 0xf2) { + warnx("WARNING: program error 0x%02x", *sr); + goto flash_end; + } + } + + /* re-lock the flash control register */ + *cr = 0x80000000; + + warnx("verifying..."); + + /* now run a verify pass */ + for (int i = 0; i < s.st_size; i++) { + if (base[i] != buf[i]) { + warnx("WARNING: verify failed at %u - retry update, DO NOT reboot", i); + goto flash_end; + } + } + + warnx("bootloader update complete"); + +flash_end: + /* unlock the scheduler */ + sched_unlock(); + + free(buf); + exit(0); +} From 5a8dda3343bc35e93015629590ea83bf362c6845 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 16 Sep 2012 23:42:00 -0700 Subject: [PATCH 95/95] It's mostly harmless, so turn on the bootloader update tool. --- nuttx/configs/px4fmu/nsh/appconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/nuttx/configs/px4fmu/nsh/appconfig b/nuttx/configs/px4fmu/nsh/appconfig index a16768b3b7..0c83a5579b 100644 --- a/nuttx/configs/px4fmu/nsh/appconfig +++ b/nuttx/configs/px4fmu/nsh/appconfig @@ -53,6 +53,7 @@ CONFIGURED_APPS += systemcmds/boardinfo CONFIGURED_APPS += systemcmds/mixer CONFIGURED_APPS += systemcmds/eeprom CONFIGURED_APPS += systemcmds/led +CONFIGURED_APPS += systemcmds/bl_update #CONFIGURED_APPS += systemcmds/calibration # Tutorial code from