From d2ecd94debd768bf03d2f5b0ec4640d3456a6100 Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 25 Mar 2009 16:30:24 +0000 Subject: [PATCH] Update at91 demo to new kernel config. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2429 38d2e660-2303-0410-9eaa-f027e97ec537 --- examples/at91sam7s/cfg/cfg_monitor.h | 48 +++++++++++++ .../at91sam7s/cfg/{cfg_kern.h => cfg_proc.h} | 71 +++++++++++++------ examples/at91sam7s/cfg/cfg_sem.h | 48 +++++++++++++ examples/at91sam7s/cfg/cfg_signal.h | 48 +++++++++++++ 4 files changed, 194 insertions(+), 21 deletions(-) create mode 100644 examples/at91sam7s/cfg/cfg_monitor.h rename examples/at91sam7s/cfg/{cfg_kern.h => cfg_proc.h} (62%) create mode 100644 examples/at91sam7s/cfg/cfg_sem.h create mode 100644 examples/at91sam7s/cfg/cfg_signal.h diff --git a/examples/at91sam7s/cfg/cfg_monitor.h b/examples/at91sam7s/cfg/cfg_monitor.h new file mode 100644 index 00000000..6391b407 --- /dev/null +++ b/examples/at91sam7s/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 1 + +#endif /* CFG_MONITOR_H */ diff --git a/examples/at91sam7s/cfg/cfg_kern.h b/examples/at91sam7s/cfg/cfg_proc.h similarity index 62% rename from examples/at91sam7s/cfg/cfg_kern.h rename to examples/at91sam7s/cfg/cfg_proc.h index bc4594a4..745634da 100644 --- a/examples/at91sam7s/cfg/cfg_kern.h +++ b/examples/at91sam7s/cfg/cfg_proc.h @@ -36,35 +36,64 @@ * \author Bernie Innocenti */ -#ifndef CFG_KERN_H -#define CFG_KERN_H +#ifndef CFG_PROC_H +#define CFG_PROC_H /** * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" */ -#define CONFIG_KERN 1 +#define CONFIG_KERN 1 /** - * \name Optional kernel features - * \{ + * Kernel interrupt supervisor. + * $WIZ$ type = "boolean" */ -#define CONFIG_KERN_SCHED 1 ///< Process schedling -#define CONFIG_KERN_SIGNALS 1 ///< Inter-process signals -#define CONFIG_KERN_IRQ 0 ///< Interrupt supervisor -#define CONFIG_KERN_HEAP 0 ///< Dynamic memory allocation -#define CONFIG_KERN_SEMAPHORES 1 ///< Re-entrant mutual exclusion primitives -#define CONFIG_KERN_MONITOR 1 ///< Process monitor -#define CONFIG_KERN_PREEMPT 0 ///< Preemptive process scheduling -#define CONFIG_KERN_PRI 0 ///< Priority-based scheduling policy -/*\}*/ +#define CONFIG_KERN_IRQ 0 -/// [ms] Time sharing quantum (a prime number prevents interference effects) -#define CONFIG_KERN_QUANTUM 47 +/** + * Dynamic memory allocation for processes. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_HEAP 0 -/// Module logging level. -#define KERN_LOG_LEVEL LOG_LVL_ERR +/** + * Preemptive process scheduling. WARNING: Experimental, still incomplete! + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PREEMPT 0 -/// Module logging format. -#define KERN_LOG_FORMAT LOG_FMT_VERBOSE +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 0 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = "0" + */ +#define CONFIG_KERN_QUANTUM 47 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE -#endif /* CFG_KERN_H */ +#endif /* CFG_PROC_H */ diff --git a/examples/at91sam7s/cfg/cfg_sem.h b/examples/at91sam7s/cfg/cfg_sem.h new file mode 100644 index 00000000..86ed110d --- /dev/null +++ b/examples/at91sam7s/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 1 + +#endif /* CFG_SEM_H */ diff --git a/examples/at91sam7s/cfg/cfg_signal.h b/examples/at91sam7s/cfg/cfg_signal.h new file mode 100644 index 00000000..ed85119b --- /dev/null +++ b/examples/at91sam7s/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 1 + +#endif /* CFG_SIGNAL_H */ -- 2.25.1