/* Looks at the direction the string is currently being scrolled in, and moves the index into the portion of the string that can be seen on the display either forward or backward as appropriate.  */
static prvScrollString(unsigned char *pucDirection, unsigned short *pusPosition, size_t xStringLength)
/* Looks at the direction the string is currently being scrolled in, and moves the index into the portion of the string that can be seen on the display either forward or backward as appropriate.  */
static prvScrollString(unsigned char *pucDirection, unsigned short *pusPosition, size_t xStringLength)
{
	if( *pucDirection == lcdRIGHT_TO_LEFT )
	{
		( *pusPosition )++;
		if( ( *pusPosition ) == ( xStringLength - ( lcdSTRING_LEN - 1 ) ) )
		{
			*pucDirection = lcdLEFT_TO_RIGHT;
			( *pusPosition )--;		}
	}
	else
	{
		( *pusPosition )--;
		if( *pusPosition == 0U )
		{
			*pucDirection = lcdRIGHT_TO_LEFT;		}
	}
}