2 * FreeRTOS Kernel V10.0.1
\r
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software.
\r
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
22 * http://www.FreeRTOS.org
\r
23 * http://aws.amazon.com/freertos
\r
25 * 1 tab == 4 spaces!
\r
28 /******************************************************************************
\r
29 * This project provides two demo applications. A simple blinky style project,
\r
30 * and a more comprehensive test and demo application. The
\r
31 * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to
\r
32 * select between the two. The simply blinky demo is implemented and described
\r
33 * in main_blinky.c. The more comprehensive test and demo application is
\r
34 * implemented and described in main_full.c.
\r
36 * This file implements the code that is not demo specific, including the
\r
37 * hardware setup and standard FreeRTOS hook functions.
\r
39 * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON
\r
40 * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO
\r
41 * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!
\r
45 /* Scheduler include files. */
\r
46 #include "FreeRTOS.h"
\r
50 /* Library includes. */
\r
54 /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
\r
55 or 0 to run the more comprehensive test and demo application. */
\r
56 #define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
\r
58 /*-----------------------------------------------------------*/
\r
61 * Configure the hardware as necessary to run this demo.
\r
63 static void prvSetupHardware( void );
\r
66 * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
\r
67 * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
\r
69 #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
\r
70 extern void main_blinky( void );
\r
72 extern void main_full( void );
\r
73 #endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */
\r
75 /* Prototypes for the standard FreeRTOS callback/hook functions implemented
\r
76 within this file. */
\r
77 void vApplicationMallocFailedHook( void );
\r
78 void vApplicationIdleHook( void );
\r
79 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
\r
80 void vApplicationTickHook( void );
\r
82 /*-----------------------------------------------------------*/
\r
86 /* Configure the hardware ready to run the demo. */
\r
89 /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
\r
91 #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
\r
103 /*-----------------------------------------------------------*/
\r
105 static void prvSetupHardware( void )
\r
110 /*-----------------------------------------------------------*/
\r
112 void vApplicationMallocFailedHook( void )
\r
114 /* Called if a call to pvPortMalloc() fails because there is insufficient
\r
115 free memory available in the FreeRTOS heap. pvPortMalloc() is called
\r
116 internally by FreeRTOS API functions that create tasks, queues, software
\r
117 timers, and semaphores. The size of the FreeRTOS heap is set by the
\r
118 configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
\r
120 /* Force an assert. */
\r
121 configASSERT( ( volatile void * ) NULL );
\r
123 /*-----------------------------------------------------------*/
\r
125 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
\r
127 ( void ) pcTaskName;
\r
130 /* Run time stack overflow checking is performed if
\r
131 configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
\r
132 function is called if a stack overflow is detected. */
\r
134 /* Force an assert. */
\r
135 configASSERT( ( volatile void * ) NULL );
\r
137 /*-----------------------------------------------------------*/
\r
139 void vApplicationIdleHook( void )
\r
141 volatile size_t xFreeHeapSpace;
\r
143 /* This is just a trivial example of an idle hook. It is called on each
\r
144 cycle of the idle task. It must *NOT* attempt to block. In this case the
\r
145 idle task just queries the amount of FreeRTOS heap that remains. See the
\r
146 memory management section on the http://www.FreeRTOS.org web site for memory
\r
147 management options. If there is a lot of heap memory free then the
\r
148 configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up
\r
150 xFreeHeapSpace = xPortGetFreeHeapSize();
\r
152 /* Remove compiler warning about xFreeHeapSpace being set but never used. */
\r
153 ( void ) xFreeHeapSpace;
\r
155 /*-----------------------------------------------------------*/
\r
157 void vApplicationTickHook( void )
\r
159 #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )
\r
161 extern void vFullDemoTickHook( void );
\r
163 /* The full demo includes some tests that execute in an interrupt
\r
164 context, and the tick hook is used for this purpose. */
\r
165 vFullDemoTickHook();
\r
169 /*-----------------------------------------------------------*/
\r
196 * \brief Getting Started Application.
\r
198 * Copyright (c) 2011-2015 Atmel Corporation. All rights reserved.
\r
200 * \asf_license_start
\r
204 * Redistribution and use in source and binary forms, with or without
\r
205 * modification, are permitted provided that the following conditions are met:
\r
207 * 1. Redistributions of source code must retain the above copyright notice,
\r
208 * this list of conditions and the following disclaimer.
\r
210 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
211 * this list of conditions and the following disclaimer in the documentation
\r
212 * and/or other materials provided with the distribution.
\r
214 * 3. The name of Atmel may not be used to endorse or promote products derived
\r
215 * from this software without specific prior written permission.
\r
217 * 4. This software may only be redistributed and used in connection with an
\r
218 * Atmel microcontroller product.
\r
220 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
\r
221 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
222 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
223 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
\r
224 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
225 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
\r
226 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
\r
227 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
\r
228 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
\r
229 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
230 * POSSIBILITY OF SUCH DAMAGE.
\r
232 * \asf_license_stop
\r
237 * \mainpage Getting Started Application
\r
241 * The Getting Started example will help new users get familiar with Atmel's
\r
242 * SAM family of microcontrollers. This basic application shows the startup
\r
243 * sequence of a chip and how to use its core peripherals.
\r
245 * \section Requirements
\r
247 * This package can be used with SAM evaluation kits.
\r
249 * \section Description
\r
251 * The demonstration program makes the LED(s) on the board blink at a fixed rate.
\r
252 * This rate is generated by using Time tick timer. The blinking can be stopped
\r
253 * using the push button.
\r
257 * -# Build the program and download it inside the evaluation board.
\r
258 * -# On the computer, open and configure a terminal application
\r
259 * (e.g. HyperTerminal on Microsoft Windows) with these settings:
\r
264 * - No flow control
\r
265 * -# Start the application.
\r
266 * -# The LED(s) should start blinking on the board. In the terminal window, the
\r
267 * following text should appear (values depend on the board and chip used):
\r
269 -- Getting Started Example xxx --
\r
271 -- Compiled: xxx xx xxxx xx:xx:xx --
\r
273 * -# Pressing and release button 1 should make one LED stop & restart
\r
275 * -# If the button 2 available, pressing button 2 should make the other LED
\r
276 * stop & restart blinking.
\r
280 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
\r
283 #include "FreeRTOS.h"
\r
287 #include "stdio_serial.h"
\r
288 #include "conf_board.h"
\r
289 #include "conf_clock.h"
\r
291 /** IRQ priority for PIO (The lower the value, the greater the priority) */
\r
292 // [main_def_pio_irq_prior]
\r
293 #define IRQ_PRIOR_PIO 0
\r
294 // [main_def_pio_irq_prior]
\r
296 /** LED0 blink time, LED1 blink half this time, in ms */
\r
297 #define BLINK_PERIOD 1000
\r
299 #define STRING_EOL "\r"
\r
300 #define STRING_HEADER "-- Getting Started Example --\r\n" \
\r
301 "-- "BOARD_NAME" --\r\n" \
\r
302 "-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
\r
304 /** LED0 blinking control. */
\r
305 // [main_var_led0_control]
\r
306 volatile bool g_b_led0_active = true;
\r
307 // [main_var_led0_control]
\r
310 /** LED1 blinking control. */
\r
311 // [main_var_led1_control]
\r
312 volatile bool g_b_led1_active = true;
\r
313 // [main_var_led1_control]
\r
316 /** Global g_ul_ms_ticks in milliseconds since start of application */
\r
317 // [main_var_ticks]
\r
318 volatile uint32_t g_ul_ms_ticks = 0;
\r
319 // [main_var_ticks]
\r
330 /* Prototypes for the standard FreeRTOS callback/hook functions implemented
\r
331 within this file. */
\r
332 void vApplicationMallocFailedHook( void );
\r
333 void vApplicationIdleHook( void );
\r
334 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
\r
335 void vApplicationTickHook( void );
\r
339 * \brief Process Buttons Events
\r
341 * Change active states of LEDs when corresponding button events happened.
\r
343 static void ProcessButtonEvt(uint8_t uc_button)
\r
345 // [main_button1_evnt_process]
\r
346 if (uc_button == 0) {
\r
347 g_b_led0_active = !g_b_led0_active;
\r
348 if (!g_b_led0_active) {
\r
349 ioport_set_pin_level(LED0_GPIO, IOPORT_PIN_LEVEL_HIGH);
\r
352 // [main_button1_evnt_process]
\r
355 // [main_button2_evnt_process]
\r
356 g_b_led1_active = !g_b_led1_active;
\r
358 /* Enable LED#2 and TC if they were enabled */
\r
359 if (g_b_led1_active) {
\r
360 ioport_set_pin_level(LED1_GPIO, IOPORT_PIN_LEVEL_LOW);
\r
363 /* Disable LED#2 and TC if they were disabled */
\r
365 ioport_set_pin_level(LED1_GPIO, IOPORT_PIN_LEVEL_HIGH);
\r
368 // [main_button2_evnt_process]
\r
374 * \brief Handler for System Tick interrupt.
\r
376 * Process System Tick Event
\r
377 * Increments the g_ul_ms_ticks counter.
\r
379 // [main_systick_handler]
\r
380 void _SysTick_Handler(void)
\r
384 // [main_systick_handler]
\r
387 * \brief Handler for Button 1 rising edge interrupt.
\r
389 * Handle process led1 status change.
\r
391 // [main_button1_handler]
\r
392 static void Button1_Handler(uint32_t id, uint32_t mask)
\r
394 if (PIN_PUSHBUTTON_1_ID == id && PIN_PUSHBUTTON_1_MASK == mask) {
\r
395 ProcessButtonEvt(0);
\r
398 // [main_button1_handler]
\r
400 #ifndef BOARD_NO_PUSHBUTTON_2
\r
402 * \brief Handler for Button 2 falling edge interrupt.
\r
404 * Handle process led2 status change.
\r
406 // [main_button2_handler]
\r
407 static void Button2_Handler(uint32_t id, uint32_t mask)
\r
409 if (PIN_PUSHBUTTON_2_ID == id && PIN_PUSHBUTTON_2_MASK == mask) {
\r
410 ProcessButtonEvt(1);
\r
413 // [main_button2_handler]
\r
417 * \brief Configure the Pushbuttons
\r
419 * Configure the PIO as inputs and generate corresponding interrupt when
\r
420 * pressed or released.
\r
422 static void configure_buttons(void)
\r
424 // [main_button1_configure]
\r
425 /* Configure Pushbutton 1 */
\r
426 pmc_enable_periph_clk(PIN_PUSHBUTTON_1_ID);
\r
427 pio_set_debounce_filter(PIN_PUSHBUTTON_1_PIO, PIN_PUSHBUTTON_1_MASK, 10);
\r
428 /* Interrupt on rising edge */
\r
429 pio_handler_set(PIN_PUSHBUTTON_1_PIO, PIN_PUSHBUTTON_1_ID,
\r
430 PIN_PUSHBUTTON_1_MASK, PIN_PUSHBUTTON_1_ATTR, Button1_Handler);
\r
431 NVIC_EnableIRQ((IRQn_Type) PIN_PUSHBUTTON_1_ID);
\r
432 pio_handler_set_priority(PIN_PUSHBUTTON_1_PIO,
\r
433 (IRQn_Type) PIN_PUSHBUTTON_1_ID, IRQ_PRIOR_PIO);
\r
434 pio_enable_interrupt(PIN_PUSHBUTTON_1_PIO, PIN_PUSHBUTTON_1_MASK);
\r
435 // [main_button1_configure]
\r
436 #ifndef BOARD_NO_PUSHBUTTON_2
\r
437 // [main_button2_configure]
\r
438 /* Configure Pushbutton 2 */
\r
439 pmc_enable_periph_clk(PIN_PUSHBUTTON_2_ID);
\r
440 pio_set_debounce_filter(PIN_PUSHBUTTON_2_PIO, PIN_PUSHBUTTON_2_MASK, 10);
\r
441 /* Interrupt on falling edge */
\r
442 pio_handler_set(PIN_PUSHBUTTON_2_PIO, PIN_PUSHBUTTON_2_ID,
\r
443 PIN_PUSHBUTTON_2_MASK, PIN_PUSHBUTTON_2_ATTR, Button2_Handler);
\r
444 NVIC_EnableIRQ((IRQn_Type) PIN_PUSHBUTTON_2_ID);
\r
445 pio_handler_set_priority(PIN_PUSHBUTTON_2_PIO,
\r
446 (IRQn_Type) PIN_PUSHBUTTON_2_ID, IRQ_PRIOR_PIO);
\r
447 pio_enable_interrupt(PIN_PUSHBUTTON_2_PIO, PIN_PUSHBUTTON_2_MASK);
\r
448 // [main_button2_configure]
\r
453 * Interrupt handler for TC0 interrupt. Toggles the state of LED\#2.
\r
455 // [main_tc0_handler]
\r
456 #ifndef BOARD_NO_LED_1
\r
457 void TC0_Handler(void)
\r
459 volatile uint32_t ul_dummy;
\r
461 /* Clear status bit to acknowledge interrupt */
\r
462 ul_dummy = tc_get_status(TC0, 0);
\r
464 /* Avoid compiler warning */
\r
468 /** Toggle LED state. */
\r
469 ioport_toggle_pin_level(LED1_GPIO);
\r
474 // [main_tc0_handler]
\r
477 * Configure Timer Counter 0 to generate an interrupt every 250ms.
\r
479 // [main_tc_configure]
\r
480 static void configure_tc(void)
\r
483 uint32_t ul_tcclks;
\r
484 uint32_t ul_sysclk = sysclk_get_cpu_hz();
\r
486 /* Configure PMC */
\r
487 pmc_enable_periph_clk(ID_TC0);
\r
489 /* Enable PCK output */
\r
490 pmc_disable_pck(PMC_PCK_3);
\r
491 pmc_switch_pck_to_sclk(PMC_PCK_3, PMC_PCK_PRES_CLK_1);
\r
492 pmc_enable_pck(PMC_PCK_3);
\r
495 /** Configure TC for a 4Hz frequency and trigger on RC compare. */
\r
496 tc_find_mck_divisor(4, ul_sysclk, &ul_div, &ul_tcclks, ul_sysclk);
\r
497 tc_init(TC0, 0, ul_tcclks | TC_CMR_CPCTRG);
\r
498 tc_write_rc(TC0, 0, (ul_sysclk / ul_div) / 4);
\r
500 /* Configure and enable interrupt on RC compare */
\r
501 NVIC_EnableIRQ((IRQn_Type) ID_TC0);
\r
502 tc_enable_interrupt(TC0, 0, TC_IER_CPCS);
\r
505 /** Start the counter if LED1 is enabled. */
\r
506 if (g_b_led1_active) {
\r
514 // [main_tc_configure]
\r
517 * Configure UART console.
\r
519 // [main_console_configure]
\r
520 static void configure_console(void)
\r
522 const usart_serial_options_t uart_serial_options = {
\r
523 .baudrate = CONF_UART_BAUDRATE,
\r
524 #ifdef CONF_UART_CHAR_LENGTH
\r
525 .charlength = CONF_UART_CHAR_LENGTH,
\r
527 .paritytype = CONF_UART_PARITY,
\r
528 #ifdef CONF_UART_STOP_BITS
\r
529 .stopbits = CONF_UART_STOP_BITS,
\r
533 /* Configure console UART. */
\r
534 sysclk_enable_peripheral_clock(CONSOLE_UART_ID);
\r
535 stdio_serial_init(CONF_UART, &uart_serial_options);
\r
538 // [main_console_configure]
\r
541 * \brief Wait for the given number of milliseconds (using the g_ul_ms_ticks
\r
542 * generated by the SAM's microcontrollers's system tick).
\r
544 * \param ul_dly_ticks Delay to wait for, in milliseconds.
\r
547 static void mdelay(uint32_t ul_dly_ticks)
\r
549 uint32_t ul_cur_ticks;
\r
551 ul_cur_ticks = g_ul_ms_ticks;
\r
552 while ((g_ul_ms_ticks - ul_cur_ticks) < ul_dly_ticks);
\r
557 * \brief getting-started Application entry point.
\r
559 * \return Unused (ANSI-C compatibility).
\r
564 //! [main_step_sys_init]
\r
565 /* Initialize the SAM system */
\r
568 //! [main_step_sys_init]
\r
570 #ifndef BOARD_NO_PUSHBUTTON_2
\r
571 #if (SAMV71 || SAMV70 || SAMS70 || SAME70)
\r
572 if (GPIO_PUSH_BUTTON_2 == PIO_PB12_IDX) {
\r
573 matrix_set_system_io(matrix_get_system_io() | CCFG_SYSIO_SYSIO12);
\r
575 ioport_set_pin_dir(GPIO_PUSH_BUTTON_2, IOPORT_DIR_INPUT);
\r
576 ioport_set_pin_mode(GPIO_PUSH_BUTTON_2, GPIO_PUSH_BUTTON_2_FLAGS);
\r
577 ioport_set_pin_sense_mode(GPIO_PUSH_BUTTON_2, GPIO_PUSH_BUTTON_2_SENSE);
\r
580 //! [main_step_console_init]
\r
581 /* Initialize the console uart */
\r
582 configure_console();
\r
583 //! [main_step_console_init]
\r
585 /* Output example information */
\r
586 puts(STRING_HEADER);
\r
588 /* Configure systick for 1 ms */
\r
589 puts("Configure system tick to get 1ms tick period.\r");
\r
590 //! [main_step_systick_init]
\r
591 if (SysTick_Config(sysclk_get_cpu_hz() / 1000)) {
\r
592 puts("-F- Systick configuration error\r");
\r
595 //! [main_step_systick_init]
\r
597 #ifndef BOARD_NO_LED_1
\r
598 puts("Configure TC.\r");
\r
599 //! [main_step_tc_init]
\r
601 //! [main_step_tc_init]
\r
604 puts("Configure buttons with debouncing.\r");
\r
605 //! [main_step_btn_init]
\r
606 configure_buttons();
\r
607 //! [main_step_btn_init]
\r
609 printf("Press %s to Start/Stop the %s blinking.\r\n",
\r
610 PUSHBUTTON_1_NAME, LED_0_NAME);
\r
612 #ifndef BOARD_NO_PUSHBUTTON_2
\r
613 printf("Press %s to Start/Stop the %s blinking.\r\n",
\r
614 PUSHBUTTON_2_NAME, LED_1_NAME);
\r
617 //! [main_step_loop]
\r
619 /* Wait for LED to be active */
\r
620 while (!g_b_led0_active);
\r
622 /* Toggle LED state if active */
\r
623 if (g_b_led0_active) {
\r
624 ioport_toggle_pin_level(LED0_GPIO);
\r
628 /* Wait for 500ms */
\r
631 //! [main_step_loop]
\r
642 void vApplicationMallocFailedHook( void )
\r
644 /* Called if a call to pvPortMalloc() fails because there is insufficient
\r
645 free memory available in the FreeRTOS heap. pvPortMalloc() is called
\r
646 internally by FreeRTOS API functions that create tasks, queues, software
\r
647 timers, and semaphores. The size of the FreeRTOS heap is set by the
\r
648 configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
\r
650 /* Force an assert. */
\r
651 configASSERT( ( volatile void * ) NULL );
\r
653 /*-----------------------------------------------------------*/
\r
655 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
\r
657 ( void ) pcTaskName;
\r
660 /* Run time stack overflow checking is performed if
\r
661 configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
\r
662 function is called if a stack overflow is detected. */
\r
664 /* Force an assert. */
\r
665 configASSERT( ( volatile void * ) NULL );
\r
667 /*-----------------------------------------------------------*/
\r
669 void vApplicationIdleHook( void )
\r
671 volatile size_t xFreeHeapSpace;
\r
673 /* This is just a trivial example of an idle hook. It is called on each
\r
674 cycle of the idle task. It must *NOT* attempt to block. In this case the
\r
675 idle task just queries the amount of FreeRTOS heap that remains. See the
\r
676 memory management section on the http://www.FreeRTOS.org web site for memory
\r
677 management options. If there is a lot of heap memory free then the
\r
678 configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up
\r
680 xFreeHeapSpace = xPortGetFreeHeapSize();
\r
682 /* Remove compiler warning about xFreeHeapSpace being set but never used. */
\r
683 ( void ) xFreeHeapSpace;
\r
685 /*-----------------------------------------------------------*/
\r
687 void vApplicationTickHook( void )
\r
690 /*-----------------------------------------------------------*/
\r