Commit c00f290c authored by Tristan Gingold's avatar Tristan Gingold

test_vme.c: add show-func.

parent 1fdb8ecb
......@@ -550,6 +550,26 @@ do_leds (void)
play_leds (pat3, sizeof (pat3) / sizeof (unsigned short));
}
void
do_show_functions (void)
{
int i;
for (i = 0; i < 8; i++)
{
int j;
struct vme_function fn;
read_vme_function (&fn, i);
printf ("F%d: amcap=%016lx adem=%08x ader=%08x am=%02x\n",
i, fn.amcap, fn.adem, fn.ader, fn.am);
for (j = 0; j < 64; j++)
if ((fn.amcap >> j) & 1)
printf (" %02x", j);
printf ("\n");
}
}
int
main (int argc, char **argv)
{
......@@ -801,6 +821,8 @@ main (int argc, char **argv)
am = 0x38;
do_test_dma_with_len (am, 0x10000, 0x40000);
}
else if (strcmp (action, "show-func") == 0)
do_show_functions ();
else
printf ("unknown action\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment