Microchip® Advanced Software Framework

task_demo.h File Reference

FreeRTOS Web/DSP Demo.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <FreeRTOS.h>
#include <StackMacros.h>
#include <croutine.h>
#include <list.h>
#include <mpu_wrappers.h>
#include <portable.h>
#include <projdefs.h>
#include <queue.h>
#include <semphr.h>
#include <task.h>
#include <timers.h>
#include <pmc.h>
#include <sysclk.h>

Macros

#define SLIDER_SELECTOR_NB   (9UL)
 
#define SLIDER_SELECTOR_RANGE   (255UL / SLIDER_SELECTOR_NB)
 
#define WAIT_FOR_TOUCH_EVENT   {while (app_hold) vTaskDelay(instructions_delay);}
 Wait for user to touch screen. More...
 

Functions

void create_dsp_task (uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority)
 Create the DSP task. More...
 
void create_gfx_task (uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority)
 Create the GFX task. More...
 
void create_qtouch_task (uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority)
 Create the QTouch task. More...
 
void create_webserver_task (uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority)
 Create the Webserver task. More...
 

Variables

uint32_t app_hold
 Used to block the application on instruction screen. More...
 
const portTickType instructions_delay
 Small delay to hold tasks, during instruction screen. More...
 

#define SLIDER_SELECTOR_NB   (9UL)
#define SLIDER_SELECTOR_RANGE   (255UL / SLIDER_SELECTOR_NB)

Referenced by demo_process_qt_status().

#define WAIT_FOR_TOUCH_EVENT   {while (app_hold) vTaskDelay(instructions_delay);}

Wait for user to touch screen.

Referenced by dsp_task(), http_task(), qtouch_task(), and webserver_task().

void create_dsp_task ( uint16_t  stack_depth_words,
unsigned portBASE_TYPE  task_priority 
)

Create the DSP task.

Parameters
stack_depth_wordsTask stack size in 32 bits word.
task_priorityTask priority.

References dsp_task(), NULL, vSemaphoreCreateBinary, xSemaphoreTake, and xTaskCreate.

Referenced by main().

void create_gfx_task ( uint16_t  stack_depth_words,
unsigned portBASE_TYPE  task_priority 
)

Create the GFX task.

Parameters
stack_depth_wordsTask stack size in 32 bits word.
task_priorityTask priority.

Initialize display.

Create the task as described above.

void create_qtouch_task ( uint16_t  stack_depth_words,
unsigned portBASE_TYPE  task_priority 
)

Create the QTouch task.

Parameters
stack_depth_wordsTask stack size in 32 bits word.
task_priorityTask priority.

Initialize communication interface

Reset QT device

Check communication is ready and able to read Chip ID

Infinite loop here

Read setup block

Modify setup block parameters for specific example

Write setup block

Create the task as described above.

References demo_set_qt_param(), init_interface(), NULL, qt_get_comm_ready(), qt_hardware_reset(), qt_read_setup_block(), qt_write_setup_block(), qtouch_task(), setup_block, STATUS_OK, and xTaskCreate.

Referenced by main().

void create_webserver_task ( uint16_t  stack_depth_words,
unsigned portBASE_TYPE  task_priority 
)

Create the Webserver task.

Parameters
stack_depth_wordsTask stack size in 32 bits word.
task_priorityTask priority.

Create the task as described above.

References NULL, webserver_task(), and xTaskCreate.

Referenced by main().

uint32_t app_hold

Used to block the application on instruction screen.

Used to block the application on instruction screen.

const portTickType instructions_delay

Small delay to hold tasks, during instruction screen.