ATmegaxxxx - remove Timer2 references

This commit is contained in:
Phillip Stevens 2020-04-11 18:25:02 +10:00
parent 52e6dfbd31
commit 10fcd90af1

View file

@ -729,10 +729,12 @@ void vPortYieldFromTick( void ) __attribute__ ( ( hot, flatten, naked ) );
void vPortYieldFromTick( void ) void vPortYieldFromTick( void )
{ {
portSAVE_CONTEXT(); portSAVE_CONTEXT();
if( xTaskIncrementTick() != pdFALSE ) if( xTaskIncrementTick() != pdFALSE )
{ {
vTaskSwitchContext(); vTaskSwitchContext();
} }
portRESTORE_CONTEXT(); portRESTORE_CONTEXT();
__asm__ __volatile__ ( "ret" ); __asm__ __volatile__ ( "ret" );
@ -748,11 +750,6 @@ void prvSetupTimerInterrupt( void )
/* reset watchdog */ /* reset watchdog */
wdt_reset(); wdt_reset();
/* actual port tick rate in Hz, calculated */
portTickRateHz = configTICK_RATE_HZ;
/* initialise first second of ticks */
ticksRemainingInSec = portTickRateHz;
/* set up WDT Interrupt (rather than the WDT Reset). */ /* set up WDT Interrupt (rather than the WDT Reset). */
wdt_interrupt_enable( portUSE_WDTO ); wdt_interrupt_enable( portUSE_WDTO );
} }
@ -774,11 +771,6 @@ uint8_t ucLowByte;
/* We only have 8 bits so have to scale 1024 to get our required tick rate. */ /* We only have 8 bits so have to scale 1024 to get our required tick rate. */
ulCompareMatch /= portCLOCK_PRESCALER; ulCompareMatch /= portCLOCK_PRESCALER;
/* actual port tick rate in Hz, calculated */
portTickRateHz = (TickType_t) ((uint32_t) configCPU_CLOCK_HZ / ( portCLOCK_PRESCALER * ulCompareMatch ));
/* initialise first second of ticks */
ticksRemainingInSec = portTickRateHz;
/* Adjust for correct value. */ /* Adjust for correct value. */
ulCompareMatch -= ( uint32_t ) 1; ulCompareMatch -= ( uint32_t ) 1;