From 5b13764dec3063f88a953d14976baaa11cdff1c4 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Mon, 17 Feb 2020 21:59:55 -0500 Subject: [PATCH] small changes to compile with latest avr-gcc --- portable/GCC/ATMega323/port.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/portable/GCC/ATMega323/port.c b/portable/GCC/ATMega323/port.c index 1d968f0e8..1f56e83a5 100644 --- a/portable/GCC/ATMega323/port.c +++ b/portable/GCC/ATMega323/port.c @@ -48,10 +48,10 @@ Changes from V2.6.0 #define portFLAGS_INT_ENABLED ( ( StackType_t ) 0x80 ) /* Hardware constants for timer 1. */ -#define portCLEAR_COUNTER_ON_MATCH ( ( uint8_t ) 0x08 ) -#define portPRESCALE_64 ( ( uint8_t ) 0x03 ) +#define portCLEAR_COUNTER_ON_MATCH ( ( uint8_t ) (1 << CTC10) ) +#define portPRESCALE_64 ( ( uint8_t ) ((1 << CS11) | (1 << CS10)) ) #define portCLOCK_PRESCALER ( ( uint32_t ) 64 ) -#define portCOMPARE_MATCH_A_INTERRUPT_ENABLE ( ( uint8_t ) 0x10 ) +#define portCOMPARE_MATCH_A_INTERRUPT_ENABLE ( ( uint8_t ) (1 << OCIE1A) ) /*-----------------------------------------------------------*/ @@ -402,8 +402,8 @@ uint8_t ucHighByte, ucLowByte; * the context is saved at the start of vPortYieldFromTick(). The tick * count is incremented after the context is saved. */ - void SIG_OUTPUT_COMPARE1A( void ) __attribute__ ( ( signal, naked ) ); - void SIG_OUTPUT_COMPARE1A( void ) + void TIMER1_COMPA_vect( void ) __attribute__ ( ( signal, naked ) ); + void TIMER1_COMPA_vect( void ) { vPortYieldFromTick(); asm volatile ( "reti" ); @@ -415,8 +415,8 @@ uint8_t ucHighByte, ucLowByte; * tick count. We don't need to switch context, this can only be done by * manual calls to taskYIELD(); */ - void SIG_OUTPUT_COMPARE1A( void ) __attribute__ ( ( signal ) ); - void SIG_OUTPUT_COMPARE1A( void ) + void TIMER1_COMPA_vect( void ) __attribute__ ( ( signal ) ); + void TIMER1_COMPA_vect( void ) { xTaskIncrementTick(); }