/* Definition of the button poll task described in the comments at the top of this file.  */
static void prvButtonPollTask(void *pvParameters)
/* Definition of the button poll task described in the comments at the top of this file.  */
static void prvButtonPollTask(void *pvParameters)
{
unsigned char ucLastState = pdFALSE, ucState;
xQueueMessage xMessage;
	for( ;; )
	{
		ucState = ( halButtonsPressed() & BUTTON_UP );
		if( ucState != 0 )
		{
			ucState = pdTRUE;
		}
		if( ucState != ucLastState )
		{
			xMessage.cMessageID = mainMESSAGE_BUTTON_UP;
			xMessage.ulMessageValue = ( unsigned long ) ucState;
			ucLastState = ucState;
			xQueueSend( xLCDQueue, &xMessage, portMAX_DELAY );
		}
		vTaskDelay( 10 / portTICK_RATE_MS );
	}
}