X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tools%2Fcarlu%2Fsrc%2Ftest.c;h=daf88c61a251380d2aaf8b9ce827297e18854329;hb=12d3f1ba6ba522cd1ef11483d813fe2c2e64f04b;hp=148f89a0540556d32c4549db065da251f5121246;hpb=a5cc1f3fc4462940dd9fabb45a865d372d24d1f4;p=carl9170fw.git diff --git a/tools/carlu/src/test.c b/tools/carlu/src/test.c index 148f89a..daf88c6 100644 --- a/tools/carlu/src/test.c +++ b/tools/carlu/src/test.c @@ -1,9 +1,9 @@ /* - * carl9170user - userspace testing utility for ar9170 devices + * carlu - userspace testing utility for ar9170 devices * * Various tests * - * Copyright 2009, 2010 Christian Lamparter + * Copyright 2009-2011 Christian Lamparter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -220,3 +220,18 @@ int carlu_gpio_test(struct carlu *ar) CHK(carlu_cmd_read_mem(ar, AR9170_GPIO_REG_PORT_DATA, &gpio)); info("GPIO state:%x\n", gpio); } + +int carlu_random_test(struct carlu *ar) +{ + uint32_t buf[4096]; + int err, i; + + err = carlu_cmd_mem_watch(ar, AR9170_RAND_REG_NUM, sizeof(buf), buf); + if (err) + return err; + + for (i = 0; i < ARRAY_SIZE(buf); i++) + info("%.2x %.2x ", buf[i] & 0xff, buf[i] >> 8); + + info("\n"); +}