Moving the function prototypes to headers (#128)

* Removing StackMacros.h

* Moving 4 Function Prototypes out of the C files into the headers

* Revert "Removing StackMacros.h"

This reverts commit cdd8307817048c794d038588aa00833b0532401b.
diff --git a/include/task.h b/include/task.h
index 7dd1032..e6f9067 100644
--- a/include/task.h
+++ b/include/task.h
@@ -1541,6 +1541,52 @@
 
 #endif
 
+#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )
+ 
+     /**
+      * task.h
+      * <pre>void vApplicationStackOverflowHook( TaskHandle_t xTask char *pcTaskName); </pre>
+      * 
+      * The application stack overflow hook is called when a stack overflow is detected for a task.
+      * 
+      * Details on stack overflow detection can be found here: https://www.freertos.org/Stacks-and-stack-overflow-checking.html
+      *  
+      * @param xTask the task that just exceeded its stack boundaries.
+      * @param pcTaskName A character string containing the name of the offending task.
+      */
+     void vApplicationStackOverflowHook( TaskHandle_t xTask,
+                                               char * pcTaskName ); 
+ 
+#endif 
+ 
+#if  (  configUSE_TICK_HOOK > 0 )
+    /** 
+     *  task.h
+     *  <pre>void vApplicationTickHook( void ); </pre>
+     * 
+     * This hook function is called in the system tick handler after any OS work is completed.
+     */
+    void vApplicationTickHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */
+
+#endif
+
+#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+    /**
+     * task.h
+     * <pre>void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize ) </pre>
+     * 
+     * This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Idle Task TCB.  This function is required when 
+     * configSUPPORT_STATIC_ALLOCATION is set.  For more information see this URI: https://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
+     * 
+     * @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer
+     * @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for thie idle task
+     * @param pulIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
+     */
+    void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
+                                               StackType_t ** ppxIdleTaskStackBuffer,
+                                               uint32_t * pulIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */
+#endif
+
 /**
  * task.h
  * <pre>BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );</pre>
diff --git a/include/timers.h b/include/timers.h
index 834dc40..be90c9e 100644
--- a/include/timers.h
+++ b/include/timers.h
@@ -1324,6 +1324,25 @@
     UBaseType_t uxTimerGetTimerNumber( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;
 #endif
 
+#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+
+    /**
+     * task.h
+     * <pre>void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize ) </pre>
+     * 
+     * This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Timer Task TCB.  This function is required when 
+     * configSUPPORT_STATIC_ALLOCATION is set.  For more information see this URI: https://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
+     * 
+     * @param ppxTimerTaskTCBBuffer   A handle to a statically allocated TCB buffer
+     * @param ppxTimerTaskStackBuffer A handle to a statically allocated Stack buffer for thie idle task
+     * @param pulTimerTaskStackSize   A pointer to the number of elements that will fit in the allocated stack buffer
+     */
+    void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
+                                          StackType_t ** ppxTimerTaskStackBuffer,
+                                              uint32_t * pulTimerTaskStackSize );
+
+#endif
+
 /* *INDENT-OFF* */
 #ifdef __cplusplus
     }
diff --git a/tasks.c b/tasks.c
index 2029fbe..7af040d 100644
--- a/tasks.c
+++ b/tasks.c
@@ -402,28 +402,6 @@
 

 /*-----------------------------------------------------------*/

 

-/* Callback function prototypes. --------------------------*/

-#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )

-

-    extern void vApplicationStackOverflowHook( TaskHandle_t xTask,

-                                               char * pcTaskName );

-

-#endif

-

-#if ( configUSE_TICK_HOOK > 0 )

-

-    extern void vApplicationTickHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */

-

-#endif

-

-#if ( configSUPPORT_STATIC_ALLOCATION == 1 )

-

-    extern void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,

-                                               StackType_t ** ppxIdleTaskStackBuffer,

-                                               uint32_t * pulIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */

-

-#endif

-

 /* File private functions. --------------------------------*/

 

 /**

diff --git a/timers.c b/timers.c
index b7bdb87..8d3dcf1 100644
--- a/timers.c
+++ b/timers.c
@@ -144,18 +144,6 @@
 

 /*-----------------------------------------------------------*/

 

-    #if ( configSUPPORT_STATIC_ALLOCATION == 1 )

-

-/* If static allocation is supported then the application must provide the

- * following callback function - which enables the application to optionally

- * provide the memory that will be used by the timer task as the task's stack

- * and TCB. */

-        extern void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,

-                                                    StackType_t ** ppxTimerTaskStackBuffer,

-                                                    uint32_t * pulTimerTaskStackSize );

-

-    #endif

-

 /*

  * Initialise the infrastructure used by the timer service task if it has not

  * been initialised already.