diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-03-10 17:30:31 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-04-22 16:51:13 +0200 |
commit | 24d11d4976062e965fb64861808548c39f53714b (patch) | |
tree | 5fbfcc1722d163647c0ce0c395c6e5a1794fc7d4 /common.h | |
parent | e69b2bc45ff0940b475a1832d25e051240fbda32 (diff) | |
download | hourglass-24d11d4976062e965fb64861808548c39f53714b.tar.gz hourglass-24d11d4976062e965fb64861808548c39f53714b.tar.bz2 hourglass-24d11d4976062e965fb64861808548c39f53714b.zip |
Add common.h
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 */ + |