utilities.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRINT_EXECUTION_SPEED()
 

Functions

void delay_us (unsigned int micro_sec)
 
void delay_ms (unsigned int milli_sec)
 
char is_freertos_running ()
 
void log_boot_info (const char *)
 

Detailed Description

04172012 : Initial

Macro Definition Documentation

#define PRINT_EXECUTION_SPEED ( )
Value:
for(unsigned int __time=sys_get_uptime_us(); __time!=0; \
printf(" Finished in %u us\n", (unsigned int)sys_get_uptime_us()-__time),__time=0)
printf("Recorder started: %s\n", uiTraceStart()?"OK":"ERROR")
uint64_t sys_get_uptime_us(void)
Definition: lpc_sys.cpp:103

Macro that can be used to print the timing/performance of a block Example:

1 PRINT_EXECUTION_SPEED()
2 {
3  // ...
4 }
5 // At the end, the time taken between this block will be printed

Function Documentation

void delay_ms ( unsigned int  milli_sec)

Delays in milliseconds

Parameters
milli_secThe delay in milliseconds.

If FreeRTOS is running, we should sleep the calling task instead of polling using the full CPU.

void delay_us ( unsigned int  micro_sec)

Delays in microseconds

Parameters
micro_secThe delay in microseconds
char is_freertos_running ( )
Returns
non-zero result if FreeRTOS is running
void log_boot_info ( const char *  )

Logs CPU boot information to the Storage "boot.csv" is appended with the time this function is called