The unified diff between revisions [3dc5e7ac..] and [dc88787e..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'log.h'
# # old_revision [3dc5e7ac4bcb952cc267892653dd78ed095d8778] # new_revision [dc88787ecd1d574feba045763baed2a7651ff33d] # # add_file "log.h" # content [fede3a6a34aacff791c89f16fb97f7f373f53fc7] # ============================================================ --- /dev/null +++ log.h fede3a6a34aacff791c89f16fb97f7f373f53fc7 @@ -0,0 +1,38 @@ +/* log.h */ + +#ifndef __LOG_H +#define __LOG_H + +#include "types.h" + +char log_get_byte(void); +void log_put_byte(char c); +void log_put_uint16(unsigned int i); +void log_put_uint(unsigned int i); +void log_put_float(float f); +void log_put_header(unsigned int timestamp); +void log_put_array(char *data, int length); +void log_put_config(void); + +void log_mark_busy(void); +void log_mark_idle(void); +unsigned int log_read_busytime(void); + +/* Needed by log.c and sdcard.c only */ +#define LOG_MAGIC 0x00000CFC +#define LOG_MAGIC_CONFIG 0x00C07F18 + +#define LOG_BUFFERSIZE 4096 + +extern unsigned int log_bufferstart; +extern unsigned int log_bufferend; +extern bool log_enabled; +extern char log_buffer[]; + +extern unsigned int log_generation; + +#define LOG_BUFFER_EMPTY (log_bufferstart == log_bufferend) +#define LOG_BUFFER_BYTES ((log_bufferend - log_bufferstart) % \ + LOG_BUFFERSIZE) + +#endif /* __LOG_H */