diff options
author | fishsoupisgood <github@madingley.org> | 2021-01-24 09:23:12 +0000 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2021-01-24 09:46:06 +0000 |
commit | fb71edfb6bc0702aa2ee1cc73d0822bbc37674ad (patch) | |
tree | 03fe3d9401f8050f90426316bbc665077d228591 /humidity_sensors/app/util.c | |
parent | 2647a6052f0dfeeedfd4127971afc60c331dda7d (diff) | |
download | heating-fb71edfb6bc0702aa2ee1cc73d0822bbc37674ad.tar.gz heating-fb71edfb6bc0702aa2ee1cc73d0822bbc37674ad.tar.bz2 heating-fb71edfb6bc0702aa2ee1cc73d0822bbc37674ad.zip |
working-ish sensor
Diffstat (limited to 'humidity_sensors/app/util.c')
-rw-r--r-- | humidity_sensors/app/util.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/humidity_sensors/app/util.c b/humidity_sensors/app/util.c new file mode 100644 index 0000000..04a17ae --- /dev/null +++ b/humidity_sensors/app/util.c @@ -0,0 +1,39 @@ +#include "project.h" + +#if 0 +void +assert_failed (u8 *file, u32 line) +{ + // avoid compiler warnings + (void) file; + (void) line; + + /* Infinite loop */ + while (1) { + } +} +#endif + +void +delay (__IO u32 n) +{ + /* Decrement nCount value */ + while (n--); +} + +void +delay_ms (__IO u32 n) +{ + while (n--) + delay (483); +} + +int +putchar (int c) +{ + if (c == '\n') + uart_tx ('\r'); + + uart_tx (c); + return (c); +} |