diff options
author | Stephane D'Alu <sdalu@sdalu.com> | 2016-07-07 23:17:36 +0200 |
---|---|---|
committer | Stephane D'Alu <sdalu@sdalu.com> | 2016-07-07 23:17:36 +0200 |
commit | 022cad04527a776e4b60a8211206a0ed2d402fcb (patch) | |
tree | 0a3626bbfcf9cc09e146b6f8d392a47e2ffd2efc /testhal/NRF51/NRF51822/RNG/main.c | |
parent | c7f7b70596d200afb76c3c8a24d4ddaaa61a2f1e (diff) | |
download | ChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.tar.gz ChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.tar.bz2 ChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.zip |
code cleanup, fixed testhal
Diffstat (limited to 'testhal/NRF51/NRF51822/RNG/main.c')
-rw-r--r-- | testhal/NRF51/NRF51822/RNG/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testhal/NRF51/NRF51822/RNG/main.c b/testhal/NRF51/NRF51822/RNG/main.c index b9572b8..6542d42 100644 --- a/testhal/NRF51/NRF51822/RNG/main.c +++ b/testhal/NRF51/NRF51822/RNG/main.c @@ -48,7 +48,7 @@ static void cmd_random(BaseSequentialStream *chp, int argc, char *argv[]) { for (i = 0 ; i < size ; i++) {
chprintf(chp, "%02x ", random_buffer[i]);
- if (nl = (((i+1) % 20) == 0))
+ if ((nl = (((i+1) % 20)) == 0))
chprintf(chp, "\r\n");
}
if (!nl)
@@ -60,7 +60,7 @@ static void cmd_random(BaseSequentialStream *chp, int argc, char *argv[]) { /*
* Shell
*/
-#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
+static THD_WORKING_AREA(shell_wa, 1024);
static const ShellCommand commands[] = {
{"random", cmd_random},
@@ -105,7 +105,8 @@ int main(void) { * Shell manager initialization.
*/
shellInit();
- shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
+ chThdCreateStatic(shell_wa, sizeof(shell_wa), NORMALPRIO,
+ shellThread, (void *)&shell_cfg1);
/*
|