/* The LCD is written two by more than one task so is controlled by a 'gatekeeper' task. This is the only task that is actually permitted to access the LCD directly. Other tasks wanting to display a message send the message to the gatekeeper.  */
void vLCDTask(void *pvParameters)
/* The LCD is written two by more than one task so is controlled by a 'gatekeeper' task. This is the only task that is actually permitted to access the LCD directly. Other tasks wanting to display a message send the message to the gatekeeper.  */
void vLCDTask(void *pvParameters)
{
xLCDMessage xMessage;
	LCD_init();
	LCD_cur_off();
    LCD_cls();    
    LCD_gotoxy( 1, 1 );
    LCD_puts( "www.FreeRTOS.org" );
	for( ;; )
	{
		while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS );
		LCD_cls();
		LCD_gotoxy( ( xMessage.xColumn & 0x07 ) + 1, ( xMessage.xColumn & 0x01 ) + 1 );
		LCD_puts( xMessage.pcMessage );
	}
}