[Cryptech-Commits] [sw/stm32] branch no-rtos updated: cli-test doesn't use the tasker, even though it might have previously used a semaphore from the rtos

git at cryptech.is git at cryptech.is
Sun Apr 30 02:11:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch no-rtos
in repository sw/stm32.

The following commit(s) were added to refs/heads/no-rtos by this push:
     new e0e97a5  cli-test doesn't use the tasker, even though it might have previously used a semaphore from the rtos
e0e97a5 is described below

commit e0e97a5217bbb2a198d23ac632de97b4ebe0e44a
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Sat Apr 29 22:05:49 2017 -0400

    cli-test doesn't use the tasker, even though it might have previously used a semaphore from the rtos
---
 projects/cli-test/mgmt-cli.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/projects/cli-test/mgmt-cli.c b/projects/cli-test/mgmt-cli.c
index d652b03..eacb944 100644
--- a/projects/cli-test/mgmt-cli.c
+++ b/projects/cli-test/mgmt-cli.c
@@ -39,7 +39,6 @@
 #include "stm-init.h"
 #include "stm-uart.h"
 #include "stm-led.h"
-#include "task.h"
 
 #include "mgmt-cli.h"
 #include "mgmt-fpga.h"
@@ -54,8 +53,6 @@
 #include "hal.h"
 #undef HAL_OK
 
-static tcb_t *cli_task;
-
 #ifndef CLI_UART_RECVBUF_SIZE
 #define CLI_UART_RECVBUF_SIZE  256
 #endif
@@ -101,7 +98,6 @@ static uint8_t uart_rx;
 void HAL_UART1_RxCpltCallback(UART_HandleTypeDef *huart)
 {
     ringbuf_write_char(&uart_ringbuf, uart_rx);
-    task_wake(cli_task);
 }
 
 static void uart_cli_print(struct cli_def *cli __attribute__ ((unused)), const char *buf)
@@ -114,8 +110,8 @@ static void uart_cli_print(struct cli_def *cli __attribute__ ((unused)), const c
 static ssize_t uart_cli_read(struct cli_def *cli __attribute__ ((unused)), void *buf, size_t count)
 {
     for (int i = 0; i < count; ++i) {
-        while (ringbuf_read_char(&uart_ringbuf, (uint8_t *)(buf + i)) == 0)
-            task_sleep();
+        while (ringbuf_read_char(&uart_ringbuf, (uint8_t *)(buf + i)) == 0) {
+	}
     }
     return (ssize_t)count;
 }
@@ -168,8 +164,6 @@ static int check_auth(const char *username, const char *password)
 
 int cli_main(void)
 {
-    cli_task = task_get_tcb();
-
     struct cli_def *cli;
     cli = mgmt_cli_init();
     cli_set_auth_callback(cli, check_auth);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list