From 24d11d4976062e965fb64861808548c39f53714b Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 10 Mar 2014 17:30:31 +0100 Subject: Add common.h --- common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 common.h (limited to 'common.h') 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 */ + -- cgit v1.2.3