FreeRTOS USART driver echo test tasks.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "freertos_usart_serial.h"
#include "demo-tasks.h"
Macros | |
#define | RX_BUFFER_SIZE (79) |
#define | USART_BAUD_RATE (115200) |
Functions | |
portBASE_TYPE | are_usart_echo_tasks_still_running (void) |
void | create_usart_echo_test_tasks (Usart *usart_base, uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority) |
static void | usart_echo_rx_task (void *pvParameters) |
static void | usart_echo_tx_task (void *pvParameters) |
Variables | |
const uint8_t * | echo_strings [] |
static uint8_t | receive_buffer [RX_BUFFER_SIZE] = {0} |
static uint32_t | rx_task_loops = 0UL |
#define RX_BUFFER_SIZE (79) |
Referenced by create_usart_echo_test_tasks(), usart_echo_rx_task(), and usart_echo_tx_task().
#define USART_BAUD_RATE (115200) |
Referenced by create_usart_echo_test_tasks().
portBASE_TYPE are_usart_echo_tasks_still_running | ( | void | ) |
References pdFAIL, pdPASS, and rx_task_loops.
Referenced by prvLEDTimerCallback().
void create_usart_echo_test_tasks | ( | Usart * | usart_base, |
uint16_t | stack_depth_words, | ||
unsigned portBASE_TYPE | task_priority | ||
) |
|
static |
References configASSERT, echo_strings, freertos_usart_serial_read_packet(), RX_BUFFER_SIZE, and rx_task_loops.
Referenced by create_usart_echo_test_tasks().
|
static |
References configASSERT, echo_strings, freertos_usart_write_packet_async(), portTICK_RATE_MS, portTickType, RX_BUFFER_SIZE, STATUS_OK, vTaskDelay(), xSemaphoreHandle, and xSemaphoreTake.
Referenced by create_usart_echo_test_tasks().
const uint8_t* echo_strings[] |
Referenced by usart_echo_rx_task(), and usart_echo_tx_task().
|
static |
Referenced by create_usart_echo_test_tasks().
|
static |
Referenced by are_usart_echo_tasks_still_running(), and usart_echo_rx_task().