diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..ecf2c27 --- /dev/null +++ b/common.h @@ -0,0 +1,13 @@ +#ifndef COMMON_H +#define COMMON_H + +/* cpu runs at 1mhz */ +#define F_CPU 1000000 + +#define sleepwhile(cond) \ + sleep_enable (); \ + while (cond) { sleep_cpu (); } \ + sleep_disable (); + +#endif /* COMMON_H */ + |