aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-04-29 22:05:49 -0400
committerPaul Selkirk <paul@psgd.org>2017-04-29 22:05:49 -0400
commite0e97a5217bbb2a198d23ac632de97b4ebe0e44a (patch)
treef63587064c97f8ba1bcd20e1796e4528dd6aed9f /projects/cli-test
parente234cacf79a496d20a113d1141e7607089fc6e8e (diff)
cli-test doesn't use the tasker, even though it might have previously used a semaphore from the rtos
Diffstat (limited to 'projects/cli-test')
-rw-r--r--projects/cli-test/mgmt-cli.c10
1 files 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);