Subversion Repositories svn.mios32

Rev

Rev 1744 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1744 Rev 2425
Line 1... Line 1...
1
// $Id: freertos_utils.c 1744 2013-04-12 21:36:32Z tk $
1
// $Id: freertos_utils.c 2425 2016-11-03 00:44:22Z tk $
2
//! \defgroup FREERTOS_UTILS
2
//! \defgroup FREERTOS_UTILS
3
//!
3
//!
4
//! Utility functions for FreeRTOS
4
//! Utility functions for FreeRTOS
5
//!
5
//!
6
//! Contains functions for performance stat measurements as desribed under:
6
//! Contains functions for performance stat measurements as desribed under:
Line 8... Line 8...
8
//!
8
//!
9
//! In order to enable performance measurements, add following definitions to
9
//! In order to enable performance measurements, add following definitions to
10
//! your mios32_config.h file:
10
//! your mios32_config.h file:
11
//! \code
11
//! \code
12
//! #define configGENERATE_RUN_TIME_STATS           1
12
//! #define configGENERATE_RUN_TIME_STATS           1
-
 
13
//! #if configGENERATE_RUN_TIME_STATS
13
//! #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS  FREERTOS_UTILS_PerfCounterInit
14
//! #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS  FREERTOS_UTILS_PerfCounterInit
14
//! #define portGET_RUN_TIME_COUNTER_VALUE          FREERTOS_UTILS_PerfCounterGet
15
//! #define portGET_RUN_TIME_COUNTER_VALUE          FREERTOS_UTILS_PerfCounterGet
-
 
16
//! #endif
15
//! \endcode
17
//! \endcode
16
//!
18
//!
17
//! Add following include statement to your Makefile:
19
//! Add following include statement to your Makefile:
18
//! \code
20
//! \code
19
//! # For performance measurings
21
//! # For performance measurings
Line 70... Line 72...
70
72
71
/////////////////////////////////////////////////////////////////////////////
73
/////////////////////////////////////////////////////////////////////////////
72
// Local functions
74
// Local functions
73
/////////////////////////////////////////////////////////////////////////////
75
/////////////////////////////////////////////////////////////////////////////
74
76
75
#if configGENERATE_RUN_TIME_STATS != 0
77
#if configGENERATE_RUN_TIME_STATS
76
static void PerfTimerIRQ(void);
78
static void PerfTimerIRQ(void);
77
#endif
-
 
78
static s32 FREERTOS_UTILS_PrintBuffer(char *buffer);
79
static s32 FREERTOS_UTILS_PrintBuffer(char *buffer);
-
 
80
#endif
79
81
80
82
81
/////////////////////////////////////////////////////////////////////////////
83
/////////////////////////////////////////////////////////////////////////////
82
// Local variables
84
// Local variables
83
/////////////////////////////////////////////////////////////////////////////
85
/////////////////////////////////////////////////////////////////////////////
Line 166... Line 168...
166
168
167
169
168
/////////////////////////////////////////////////////////////////////////////
170
/////////////////////////////////////////////////////////////////////////////
169
// Sends individual SysEx strings to MIOS terminal which are separated by \n
171
// Sends individual SysEx strings to MIOS terminal which are separated by \n
170
/////////////////////////////////////////////////////////////////////////////
172
/////////////////////////////////////////////////////////////////////////////
-
 
173
#if configGENERATE_RUN_TIME_STATS
171
static s32 FREERTOS_UTILS_PrintBuffer(char *buffer)
174
static s32 FREERTOS_UTILS_PrintBuffer(char *buffer)
172
{
175
{
173
  s32 status = 0;
176
  s32 status = 0;
174
177
175
  // print buffer line by line
178
  // print buffer line by line
Line 190... Line 193...
190
    // until 0 was read
193
    // until 0 was read
191
  } while( status >= 0 && !end_of_string );
194
  } while( status >= 0 && !end_of_string );
192
195
193
  return status;
196
  return status;
194
}
197
}
-
 
198
#endif
195
199
196
//! \}
200
//! \}
197
201
198
202
199
#if configGENERATE_RUN_TIME_STATS != 0
203
#if configGENERATE_RUN_TIME_STATS != 0