ttl-fpga/sw/kousaten/src/fpga_global.h

21 lines
550 B
C
Raw Normal View History

2019-06-16 21:27:42 +02:00
#ifndef FPGA_GLOBAL_H
#define FPGA_GLOBAL_H
#include <errno.h>
2019-06-17 22:08:24 +02:00
enum log_level {LL_CRITICAL = 0,
2019-06-16 21:27:42 +02:00
LL_ERROR,
2019-06-17 22:08:24 +02:00
LL_WARNING,
LL_INFO,
LL_DEBUG,
2019-06-16 21:27:42 +02:00
LL_COUNT};
enum log_level report(enum log_level log_level, const char *format, ...);
2019-06-19 18:32:59 +02:00
void set_log_level(enum log_level log_level);
2019-06-16 21:27:42 +02:00
/* Error codes */
#define ECONN 1000 /* Tried to connect to already connected port */
2019-06-19 18:32:59 +02:00
#define ETYPE 1001 /* Tried an operation on a cell that does not support it */
2019-06-21 20:31:34 +02:00
#define ERECONF 1100 /* Tried to set a configuration bit to multiple values */
2019-06-16 21:27:42 +02:00
#endif // FPGA_GLOBAL_H