]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
Replace the static prvSetupTimerInterrupt() function in the Cortex-M port layers...
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM4F / port.c
index d7dc1443dc95f7850773a9665381552bbfcb74da..99ffeaa39680156c11f88db2966a66c2e7e660f9 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.1.1\r
- * Copyright (C) 2018 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.2.1\r
+ * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
  * this software and associated documentation files (the "Software"), to deal in\r
        #define portNVIC_SYSTICK_CLK_BIT        ( 0 )\r
 #endif\r
 \r
-/* The __weak attribute does not work as you might expect with the Keil tools\r
-so the configOVERRIDE_DEFAULT_TICK_CONFIGURATION constant must be set to 1 if\r
-the application writer wants to provide their own implementation of\r
-vPortSetupTimerInterrupt().  Ensure configOVERRIDE_DEFAULT_TICK_CONFIGURATION\r
-is defined. */\r
+/* Legacy macro for backward compatibility only.  This macro used to be used to\r
+replace the function that configures the clock used to generate the tick\r
+interrupt (prvSetupTimerInterrupt()), but now the function is declared weak so\r
+the application writer can override it by simply defining a function of the\r
+same name (vApplicationSetupTickInterrupt()). */\r
 #ifndef configOVERRIDE_DEFAULT_TICK_CONFIGURATION\r
        #define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 0\r
 #endif\r
@@ -678,7 +678,7 @@ void xPortSysTickHandler( void )
                        vTaskStepTick( ulCompleteTickPeriods );\r
                        portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;\r
 \r
-                       /* Exit with interrpts enabled. */\r
+                       /* Exit with interrupts enabled. */\r
                        __enable_irq();\r
                }\r
        }\r
@@ -693,7 +693,7 @@ void xPortSysTickHandler( void )
  */\r
 #if( configOVERRIDE_DEFAULT_TICK_CONFIGURATION == 0 )\r
 \r
-       void vPortSetupTimerInterrupt( void )\r
+       __weak void vPortSetupTimerInterrupt( void )\r
        {\r
                /* Calculate the constants required to configure the tick interrupt. */\r
                #if( configUSE_TICKLESS_IDLE == 1 )\r