From: Jan Novotny Date: Thu, 30 Apr 2015 12:20:45 +0000 (+0200) Subject: added custom test to see if memory mapped sensor control can be accessed X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/lx-cpu1/lx-dad.git/commitdiff_plain/2c6cd5785affdbb823a89c99c9333c4c35c52808 added custom test to see if memory mapped sensor control can be accessed --- diff --git a/sw/app/lx_dad/appl_tests.c b/sw/app/lx_dad/appl_tests.c index 253dc60..0a8d09c 100644 --- a/sw/app/lx_dad/appl_tests.c +++ b/sw/app/lx_dad/appl_tests.c @@ -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 }; +