/* 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)
{
uint32_t ulCompareMatch;
uint8_t ucHighByte, ucLowByte;
	ulCompareMatch = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
	ulCompareMatch /= portCLOCK_PRESCALER;
	ulCompareMatch -= ( uint32_t ) 1;
	ucLowByte = ( uint8_t ) ( ulCompareMatch & ( uint32_t ) 0xff );
	ulCompareMatch >>= 8;
	ucHighByte = ( uint8_t ) ( ulCompareMatch & ( uint32_t ) 0xff );
	OCR1AH = ucHighByte;
	OCR1AL = ucLowByte;
	ucLowByte = portCLEAR_COUNTER_ON_MATCH | portPRESCALE_64;
	TCCR1B = ucLowByte;
	ucLowByte = TIMSK;
	ucLowByte |= portCOMPARE_MATCH_A_INTERRUPT_ENABLE;
	TIMSK = ucLowByte;
}