145 __upper_lower_t ints;
149 return dat.ints.lower;
161 __upper_lower_t ints;
165 return dat.ints.upper;
176#define __log_mini(level, message, ...) \
178 if (level <= LOG_LEVEL) { \
179 uint _debug_cpsr = spin1_int_disable(); \
180 fprintf(stderr, message "\n", ##__VA_ARGS__); \
181 spin1_mode_restore(_debug_cpsr); \
187#define log_mini_error(message, ...) \
188 __log_mini(LOG_ERROR, message, ##__VA_ARGS__)
192#define log_mini_warning(message, ...) \
193 __log_mini(LOG_WARNING, message, ##__VA_ARGS__)
197#define log_mini_info(message, ...) \
198 __log_mini(LOG_INFO, message, ##__VA_ARGS__)
202#define log_mini_debug(message, ...) \
203 __log_mini(LOG_DEBUG, message, ##__VA_ARGS__)
void log_error(const char *message,...)
This function logs errors. Errors usually indicate a serious fault in the program,...
void log_warning(const char *message,...)
This function logs warnings.
static uint32_t double_to_upper(double d)
Type-pun the higher 32 bits of a double as a 32-bit unsigned integer.
static uint32_t float_to_int(float f)
Type-pun a float as a 32-bit unsigned integer.
void log_debug(const char *message,...)
This function logs debugging messages. This level of message is normally not printed except when the ...
static uint32_t double_to_lower(double d)
Type-pun the lower 32 bits of a double as a 32-bit unsigned integer.
void log_info(const char *message,...)
This function logs informational messages. This is the lowest level of message normally printed.