#include <stdio.h>
#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
+
+#define USED __attribute__((used))
+#define UNUSED __attribute__((unused))
#ifdef __AVR__
#include <avr/io.h>
#define SBIT(port,pin) ((*(volatile struct bits*)&port).b##pin)
-//TODO:
+//GCC bug PR61443
// Known to work: 4.8.4, 4.9.1
// Known to fail: 4.8.3, 4.9.0
+
+#if (GCC_VERSION < 40804) || (GCC_VERSION == 40900)
#define GCC_BUG_61443 1
+#endif /* PR61443 */
#else
// TODO: stm32