]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-dad.git/commitdiff
added custom test to see if memory mapped sensor control can be accessed
authorJan Novotny <caca@caca>
Thu, 30 Apr 2015 12:20:45 +0000 (14:20 +0200)
committerJan Novotny <caca@caca>
Thu, 30 Apr 2015 12:22:31 +0000 (14:22 +0200)
sw/app/lx_dad/appl_tests.c

index 253dc60062d8c8e8ff50d89046c698a22f015016..0a8d09c5c627aa177cecb6dc3cf1dcfd3eade84b 100644 (file)
@@ -266,6 +266,15 @@ int cmd_do_goaddr(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
   return 0;
 }
 
+int cmd_do_mujtest(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
+{
+       volatile uint32_t *testaddr  = (volatile uint32_t *)0x8000400C;
+       int p=(int) strtol(param[1], (char **)NULL, 10);
+       printf("jen muj testovaci vypis %X\n", p);
+       *testaddr = p;
+       return 0;
+}
+
 cmd_des_t const cmd_des_test_memusage={0, 0,
                         "memusage","report memory usage",cmd_do_test_memusage,
                         {0,
@@ -311,6 +320,8 @@ cmd_des_t const cmd_des_testmpu={0, 0,
 cmd_des_t const cmd_des_goaddr={0, 0,
                        "goaddr","run from address",
                        cmd_do_goaddr,{(void*)0}};
+                       
+cmd_des_t const cmd_des_mujtest={0,0,"mujtest","run my simple test", cmd_do_mujtest,{(void*)0}};
 
 cmd_des_t const *const cmd_appl_tests[]={
   &cmd_des_test_memusage,
@@ -325,5 +336,7 @@ cmd_des_t const *const cmd_appl_tests[]={
   &cmd_des_testsdram,
   &cmd_des_testmpu,
   &cmd_des_goaddr,
+  &cmd_des_mujtest,
   NULL
 };
+