/* Setup timer 1 compare match A to generate a tick interrupt.  */
static void prvSetupTimerInterrupt(void)
/* Setup timer 1 compare match A to generate a tick interrupt.  */
static void prvSetupTimerInterrupt(void)
{
unsigned long ulCompareMatch;
unsigned char ucHighByte, ucLowByte;
	ulCompareMatch = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
	ulCompareMatch /= portCLOCK_PRESCALER;
	ulCompareMatch -= ( unsigned long ) 1;
	ucLowByte = ( unsigned char ) ( ulCompareMatch & ( unsigned long ) 0xff );
	ulCompareMatch >>= 8;
	ucHighByte = ( unsigned char ) ( ulCompareMatch & ( unsigned long ) 0xff );
	OCR1AH = ucHighByte;
	OCR1AL = ucLowByte;
	ucLowByte = portCLEAR_COUNTER_ON_MATCH | portPRESCALE_64;
	TCCR1B = ucLowByte;
	TIMSK |= portCOMPARE_MATCH_A_INTERRUPT_ENABLE;
}