FreeRTOS First Example
Macros | Functions | Variables
Main

main file More...

Macros

#define TOGGLE_TASK_PRIORITY   (tskIDLE_PRIORITY + 1)
 
#define QUEUE_LENGTH   (10)
 

Functions

static void TaskPWMCtrl (void *pParameter)
 PWM Ctrl from value received through a queue. More...
 
static void TaskADCRead (void *pParameter)
 Get ADC value and sent it through queue. More...
 
int main (void)
 main function
 

Variables

QueueHandle_t adc_queue
 Queue to send & receive ADC values.
 

Detailed Description

main file

This example shows how to communicate two tasks using a queue

Macro Definition Documentation

◆ QUEUE_LENGTH

#define QUEUE_LENGTH   (10)

Length of the queue

Definition at line 43 of file main.c.

◆ TOGGLE_TASK_PRIORITY

#define TOGGLE_TASK_PRIORITY   (tskIDLE_PRIORITY + 1)

Priority for the ToogleLed Task

Definition at line 40 of file main.c.

Function Documentation

◆ TaskADCRead()

static void TaskADCRead ( void *  pParameter)
static

Get ADC value and sent it through queue.

Parameters
pParameterUnused parameter
Returns
none

Definition at line 92 of file main.c.

◆ TaskPWMCtrl()

static void TaskPWMCtrl ( void *  pParameter)
static

PWM Ctrl from value received through a queue.

Parameters
pParameterUnused parameter
Returns
none

Definition at line 57 of file main.c.