utilities.h
Go to the documentation of this file.
1 /*
2  * SocialLedge.com - Copyright (C) 2013
3  *
4  * This file is part of free software framework for embedded processors.
5  * You can use it and/or distribute it as long as this copyright header
6  * remains unmodified. The code is free for personal use and requires
7  * permission to use in a commercial product.
8  *
9  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
10  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
12  * I SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
13  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
14  *
15  * You can reach the author of this software at :
16  * p r e e t . w i k i @ g m a i l . c o m
17  */
18 
25 #ifndef UTILITIES_H__
26 #define UTILITIES_H__
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
32 
37 void delay_us(unsigned int micro_sec);
38 
43 void delay_ms(unsigned int milli_sec);
44 
48 char is_freertos_running();
49 
54 void log_boot_info(const char*);
55 
56 
68 #define PRINT_EXECUTION_SPEED() for(unsigned int __time=sys_get_uptime_us(); __time!=0; \
69  printf(" Finished in %u us\n", (unsigned int)sys_get_uptime_us()-__time),__time=0)
70 
71 
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 #endif /* UTILITIES_H__ */
void delay_us(unsigned int micro_sec)
Definition: utilities.c:37
void delay_ms(unsigned int milli_sec)
Definition: utilities.c:49
char is_freertos_running()
Definition: utilities.c:65
void log_boot_info(const char *)