OSDN Git Service

チケット #30722 BSP固有タスク用ディレクトリの新設
authorShinichiro Nakamura <shinta.main.jp@gmail.com>
Mon, 11 Feb 2013 13:37:23 +0000 (22:37 +0900)
committerShinichiro Nakamura <shinta.main.jp@gmail.com>
Mon, 11 Feb 2013 13:37:23 +0000 (22:37 +0900)
BSP固有のファイルがUZUMEディレクトリに散らかるのは美しくない。
今までBSP固有タスクをどこに新設するのか明らかでなかった。
kernel/config/bsp_xxxも考えられるが、
このディレクトリはより低い層の定義を扱うべきと判断した。
アプリケーションよりの実装はuzume/bsp_xxxに入れるという方向で
決着させたい考え。

uzumeapp/kernel/config/blackfin/bsp_bluetank/Makefile.config
uzumeapp/kernel/uzume/bsp_bluetank.cfg
uzumeapp/kernel/uzume/bsp_bluetank/display_task.c [new file with mode: 0644]
uzumeapp/kernel/uzume/bsp_bluetank/display_task.cfg [new file with mode: 0644]
uzumeapp/kernel/uzume/bsp_bluetank/display_task.h [new file with mode: 0644]

index df80b6c..32a0b02 100644 (file)
@@ -9,18 +9,20 @@ INCLUDES := $(INCLUDES) -I$(SRCDIR)/config/$(CPU)/$(SYS) \
                        -I$(SRCDIR)/config/$(CPU)/_common_bf592 \
                        -I$(SRCDIR)/pdic/simple_sio \
                        -I$(SRCDIR)/uzume \
-                       -I$(SRCDIR)/uzume/ntshell
+                       -I$(SRCDIR)/uzume/ntshell \
+                       -I$(SRCDIR)/uzume/bsp_bluetank
 COPTS := $(COPTS)
 LDFLAGS := $(LDFLAGS)
 
 #
 # カーネルに関する定義
 #
-KERNEL_DIR := $(KERNEL_DIR) :$(SRCDIR)/config/$(CPU)/$(SYS) :$(SRCDIR)/config/$(CPU)/_common_bf592 :$(SRCDIR)/pdic/simple_sio :$(SRCDIR)/uzume :$(SRCDIR)/uzume/ntshell
+KERNEL_DIR := $(KERNEL_DIR) :$(SRCDIR)/config/$(CPU)/$(SYS) :$(SRCDIR)/config/$(CPU)/_common_bf592 :$(SRCDIR)/pdic/simple_sio :$(SRCDIR)/uzume :$(SRCDIR)/uzume/ntshell :$(SRCDIR)/uzume/bsp_bluetank
 KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
 KERNEL_COBJS := $(KERNEL_COBJS) chip_config.o uart.o chip_debugboot.o chip_dump.o
-KERNEL_COBJS := $(KERNEL_COBJS) i2s_subsystem.o i2c_subsystem.o rotenc.o uzume_callback.o sgtl5000.o bsp_bluetank.o cmd_bluetank.o
-KERNEL_COBJS := $(KERNEL_COBJS) lcd.o bfin_util.o
+KERNEL_COBJS := $(KERNEL_COBJS) i2s_subsystem.o i2c_subsystem.o rotenc.o uzume_callback.o sgtl5000.o
+KERNEL_COBJS := $(KERNEL_COBJS) lcd.o bfin_util.o bsp_bluetank.o cmd_bluetank.o
+KERNEL_COBJS := $(KERNEL_COBJS) display_task.o
 KERNEL_COBJS := $(KERNEL_COBJS) ntlibc.o ntopt.o ntshell.o ntshell_task.o text_editor.o text_history.o vtrecv.o vtsend.o ntstdio.o
 
 #
index e9be80f..ac00810 100644 (file)
@@ -2,6 +2,7 @@
 #include "i2s.cfg"
 #include "rotenc.cfg"
 #include "ntshell_task.cfg"
+#include "display_task.cfg"
 
 INCLUDE("\"bsp_bluetank.h\"");
 
diff --git a/uzumeapp/kernel/uzume/bsp_bluetank/display_task.c b/uzumeapp/kernel/uzume/bsp_bluetank/display_task.c
new file mode 100644 (file)
index 0000000..5ebe47c
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * @file display_task.c
+ * @author Shinichiro Nakamura
+ * @brief
+ * @details
+ */
+
+#include <t_services.h>
+#include "display_task.h"
+
+void display_task(VP_INT exinf)
+{
+    syslog(LOG_NOTICE, "Display Task");
+    while (1) {
+        tslp_tsk(1000);
+        syslog(LOG_NOTICE, "Display...");
+    }
+}
+
diff --git a/uzumeapp/kernel/uzume/bsp_bluetank/display_task.cfg b/uzumeapp/kernel/uzume/bsp_bluetank/display_task.cfg
new file mode 100644 (file)
index 0000000..8998e76
--- /dev/null
@@ -0,0 +1,15 @@
+
+#define _MACRO_ONLY
+
+INCLUDE("\"display_task.h\"");
+
+CRE_TSK( DISPLAY_TASK,
+            {
+                TA_HLNG|TA_ACT,             /* 初期状態からアクティブ */
+                0,                          /* タスク引数 */
+                display_task,               /* タスク本体 */
+                DISPLAY_TASK_PRIORITY,      /* タスク優先順位 */
+                DISPLAY_TASK_STACK_SIZE,    /* タスク・スタックサイズ */
+                NULL                        /* タスク・スタック。NULLならシステムが準備 */
+             });
+
diff --git a/uzumeapp/kernel/uzume/bsp_bluetank/display_task.h b/uzumeapp/kernel/uzume/bsp_bluetank/display_task.h
new file mode 100644 (file)
index 0000000..241d176
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * @file display_task.h
+ * @author Shinichiro Nakamura
+ * @brief
+ * @details
+ */
+
+#ifndef DISPLAY_TASK_H
+#define DISPLAY_TASK_H
+
+#include <t_services.h>
+#include <s_services.h>
+
+#ifndef DISPLAY_TASK_PRIORITY
+#   define DISPLAY_TASK_PRIORITY    (7)
+#endif
+
+#ifndef DISPLAY_TASK_STACK_SIZE
+#   define DISPLAY_TASK_STACK_SIZE  (2048)
+#endif
+
+#ifndef _MACRO_ONLY
+void display_task(VP_INT exinf);
+#endif
+
+#endif
+