FreeRTOS demo Co-routines implementations.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
Co-routines configuration | |
#define | UART_CO_ROUTINE_PRIORITY (configMAX_CO_ROUTINE_PRIORITIES - 1) |
#define | MAIN_CO_ROUTINE_PRIORITY (configMAX_CO_ROUTINE_PRIORITIES - 2) |
#define | MAIN_CO_ROUTINE_DELAY (100 / portTICK_RATE_MS) |
#define | GRAPH_CO_ROUTINE_PRIORITY (configMAX_CO_ROUTINE_PRIORITIES - 3) |
#define | GRAPH_CO_ROUTINE_DELAY (50 / portTICK_RATE_MS) |
#define | TERMINAL_CO_ROUTINE_PRIORITY (configMAX_CO_ROUTINE_PRIORITIES - 3) |
#define | ABOUT_CO_ROUTINE_PRIORITY (configMAX_CO_ROUTINE_PRIORITIES - 3) |
Functions | |
static void | cdc_rx_handler (uint8_t instance) |
Interrupt handler for reception from EDBG Virtual COM Port. More... | |
void | demo_co_routines_init (void) |
Initialize Co-routines and resources for demo. More... | |
void | vApplicationIdleHook (void) |
This idle task hook will schedule a co-routine each time it is called. More... | |
Co-routines for demo | |
static void | main_co_routine (CoRoutineHandle_t xHandle, UBaseType_t uxIndex) |
Main demo Co-routine. More... | |
static void | graph_co_routine (CoRoutineHandle_t xHandle, UBaseType_t uxIndex) |
Graph Co-routine. More... | |
static void | terminal_co_routine (CoRoutineHandle_t xHandle, UBaseType_t uxIndex) |
Terminal Co-routine. More... | |
static void | about_co_routine (CoRoutineHandle_t xHandle, UBaseType_t uxIndex) |
About Co-routine. More... | |
static void | uart_co_routine (CoRoutineHandle_t xHandle, UBaseType_t uxIndex) |
UART Co-routine. More... | |
Global constants and variables | |
static const char | menu_items_text [MENU_NUM_ITEMS][6] |
Labels for menu items. More... | |
static const char | about_text [] |
Text to display on about screen. More... | |
static struct usart_module | cdc_usart |
Instance for Embedded Debugger (EDBG) Virtual COM Port driver. More... | |
static uint8_t | graph_noise = 128 |
Pseudo-random noise for graph Co-routine. More... | |
static gfx_coord_t | x1 = 0 |
x coord for graph Co-routine More... | |
static uint8_t | terminal_buffer [TERMINAL_BUFFER_LINES][TERMINAL_BUFFER_COLUMNS] |
Buffer for terminal text. More... | |
static uint8_t | terminal_line_offset |
Index of latest terminal line (first to be printed) More... | |
static QueueHandle_t | terminal_in_queue |
Queue for incoming terminal characters. More... | |
static QueueHandle_t | graph_co_routine_queue |
Queue for sync graph Co-routine. More... | |
static QueueHandle_t | terminal_co_routine_queue |
Queue for sync terminal Co-routine. More... | |
static QueueHandle_t | about_co_routine_queue |
Queue for sync about Co-routine. More... | |
static | OLED1_CREATE_INSTANCE (oled1, OLED1_EXT_HEADER) |
Instance for OLED1 Xplained Pro LED and button driver. More... | |