OSDN Git Service

ピンの初期化をbsp_amakusa592.cに移した。
authortakemasa <suikan@users.sourceforge.jp>
Sat, 29 Dec 2012 07:42:27 +0000 (16:42 +0900)
committertakemasa <suikan@users.sourceforge.jp>
Sat, 29 Dec 2012 07:42:27 +0000 (16:42 +0900)
uzume_prototype/.gitignore
uzume_prototype/Makefile.depend
uzume_prototype/kernel/cfg/.gitignore
uzume_prototype/kernel/config/blackfin/bsp_amakusa592/Makefile.config
uzume_prototype/kernel/uzume/bsp_amakusa592.c [new file with mode: 0644]
uzume_prototype/kernel/uzume/bsp_amakusa592.cfg
uzume_prototype/kernel/uzume/bsp_amakusa592.h [new file with mode: 0644]
uzume_prototype/kernel/uzume/i2s_subsystem.c
uzume_prototype/kernel_cfg.c
uzume_prototype/kernel_obj.dat

index f853124..a6ad772 100644 (file)
@@ -5,3 +5,6 @@
 /jsp.syms
 /kernel_chk.s
 /html
+/kernel_cfg.c
+/kernel_chk.c
+/kernel_id.h
index 739578c..527f04a 100644 (file)
@@ -376,6 +376,33 @@ ssm2603.o: kernel/config/blackfin/cpu_defs.h \
        /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/include/stddef.h \
        kernel/include/itron.h kernel/uzume/ssm2603.c \
        kernel/config/blackfin/bsp_amakusa592/sys_defs.h 
+bsp_amakusa592.o: \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/defBF59x_base.h \
+       kernel/include/kernel.h kernel/config/blackfin/cpu_defs.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/stdint.h \
+       kernel/config/blackfin/_common_bf592/chip_defs.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/cdef_LPBlackfin.h \
+       kernel/uzume/bsp_amakusa592.h \
+       kernel/config/blackfin/_common_bf592/sys_rename.h \
+       kernel/include/t_config.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/defBF592-A.h \
+       kernel/include/serial.h kernel/config/blackfin/tool_config.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/cdefBF59x_base.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/cdefBF592-A.h \
+       kernel/config/blackfin/cpu_rename.h \
+       kernel/include/t_stddef.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/def_LPBlackfin.h \
+       kernel/include/t_services.h kernel/include/sil.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/include-fixed/limits.h \
+       kernel/config/blackfin/tool_defs.h kernel/include/t_syslog.h \
+       kernel/uzume/bsp_amakusa592.c \
+       kernel/config/blackfin/bsp_amakusa592/sys_config.h \
+       kernel/config/blackfin/cpu_config.h \
+       kernel/include/s_services.h \
+       /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/include/stddef.h \
+       kernel/include/itron.h \
+       kernel/config/blackfin/_common_bf592/chip_config.h \
+       kernel/config/blackfin/bsp_amakusa592/sys_defs.h 
 cpu_config.o: kernel/include/kernel.h \
        kernel/config/blackfin/cpu_defs.h \
        kernel/config/blackfin/_common_bf592/chip_defs.h \
@@ -918,6 +945,7 @@ kernel_cfg.o: \
        kernel/config/blackfin/_common_bf592/chip_defs.h \
        /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/stdint.h \
        /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/cdef_LPBlackfin.h \
+       kernel/uzume/bsp_amakusa592.h \
        kernel/config/blackfin/_common_bf592/sys_rename.h \
        kernel/include/t_config.h \
        /opt/uClinux2011R1RC4/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/include/defBF592-A.h \
index f47b484..fb31ce8 100644 (file)
@@ -17,7 +17,8 @@ LDFLAGS := $(LDFLAGS)
 #
 KERNEL_DIR := $(KERNEL_DIR) :$(SRCDIR)/config/$(CPU)/$(SYS) :$(SRCDIR)/config/$(CPU)/_common_bf592 :$(SRCDIR)/pdic/simple_sio :$(SRCDIR)/uzume
 KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) 
-KERNEL_COBJS := $(KERNEL_COBJS) chip_config.o uart.o chip_debugboot.o chip_dump.o i2s_subsystem.o i2c_subsystem.o ad7999.o uzume_callback.o ssm2603.o
+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 ad7999.o uzume_callback.o ssm2603.o bsp_amakusa592.o
 
 
 #
diff --git a/uzume_prototype/kernel/uzume/bsp_amakusa592.c b/uzume_prototype/kernel/uzume/bsp_amakusa592.c
new file mode 100644 (file)
index 0000000..a7d00aa
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * @file bsp_amakusa592.c
+ * @author takemasa
+ * @brief Amakusa BF592ボード用のリソース
+ * @details
+ * ここにはBSP専用のリソースを置く。実際にはボードの初期化子を置く。
+ */
+#include <s_services.h>
+#include <t_services.h>
+#include <cdefBF592-A.h>
+#include <bsp_amakusa592.h>
+
+void board_initialize(VP_INT exinf)
+{
+    // ADSP-BF592 PORTG設定
+    // DR0PRI, RSCK0, RFS0, TD0PRI, TSCK0, TSF0をMUXで0 ( Primary func )にする
+    *pPORTG_MUX &= ~0x00ee;
+
+    // ADSP-BF592 PORTG設定
+    // DR0PRI, RSCK0, RFS0, TD0PRI, TSCK0, TSF0をFERでイネーブルにする
+    *pPORTG_FER = 0x00ee;
+
+}
index a5d9d45..54f0147 100644 (file)
@@ -1,3 +1,11 @@
 #include "i2c0_m.cfg"
 #include "i2s.cfg"
 #include "ad7999.cfg"
+
+INCLUDE("\"bsp_amakusa592.h\"");
+
+ATT_INI({
+        TA_NULL,                /* 高級言語でインターフェースする */
+        0,                      /* イニシャライザに渡すパラメタ。0はTWI0 */
+        board_initialize       /* イニシャライザ本体 */
+        });
diff --git a/uzume_prototype/kernel/uzume/bsp_amakusa592.h b/uzume_prototype/kernel/uzume/bsp_amakusa592.h
new file mode 100644 (file)
index 0000000..bdf89aa
--- /dev/null
@@ -0,0 +1,22 @@
+/**
+ * @file bsp_amakusa592.h
+ * @author takemasa
+ * @brief Amakusa BF592ボード用のリソース
+ * @details
+ * ここにはBSP専用のリソースを置く。実際にはボードの初期化子を置く。
+ */
+
+#ifndef BSP_AMAKUSA592_H_
+#define BSP_AMAKUSA592_H_
+
+/**
+ * \brief ボード・イニシャライザ
+ * \param exinf 0を渡す。関数からは無視される。
+ * \details
+ * BSP用のイニシャライザである。アプリケーションに依存せず、uzumeが
+ * 必要とする初期化処理をおここで行う。具体的にはI2S用のピンの割付を行う
+ */
+void board_initialize(VP_INT exinf);
+
+
+#endif /* BSP_AMAKUSA592_H_ */
index ce6e14a..a5951e1 100644 (file)
@@ -118,14 +118,6 @@ static void setup_sport0(void)
     *pDMA1_CONFIG = 0;
 
 
-    // ADSP-BF592 PORTG設定
-    // DR0PRI, RSCK0, RFS0, TD0PRI, TSCK0, TSF0をMUXで0 ( Primary func )にする
-    *pPORTG_MUX &= ~0x00ee;
-
-    // ADSP-BF592 PORTG設定
-    // DR0PRI, RSCK0, RFS0, TD0PRI, TSCK0, TSF0をFERでイネーブルにする
-    *pPORTG_FER = 0x00ee;
-
        // I2S設定
        // Sport0 受信設定 
        // 外部クロック, 外部同期信号,
index 5b8f3a1..7a2e04f 100644 (file)
@@ -30,6 +30,7 @@
 #include "i2c_subsystem.h"
 #include "i2s_subsystem.h"
 #include "ad7999.h"
+#include "bsp_amakusa592.h"
 
 
        /* Object initializer [task] */
@@ -159,6 +160,7 @@ _kernel_call_inirtn(void)
        timer_initialize( (VP_INT)(0) );
        serial_initialize( (VP_INT)(0) );
        i2c_master_initialize( (VP_INT)(0) );
+       board_initialize( (VP_INT)(0) );
 }
 
 void
index da12776..c8ccee3 100644 (file)
Binary files a/uzume_prototype/kernel_obj.dat and b/uzume_prototype/kernel_obj.dat differ