summaryrefslogtreecommitdiffstats
path: root/app/bits.c
diff options
context:
space:
mode:
authorroot <root@lab.panaceas.james.local>2019-02-19 13:46:18 +0000
committerroot <root@lab.panaceas.james.local>2019-02-19 13:46:18 +0000
commitb3c6320899d6b27899ab3c67c745e8d3b29af3a2 (patch)
tree41dc7fc5d71a841a416d0d53923de5d1d44277e3 /app/bits.c
parentc84e85e0e9641b006a376fab456ac2efcfdb14e2 (diff)
downloadclock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.tar.gz
clock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.tar.bz2
clock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.zip
working ethernet
Diffstat (limited to 'app/bits.c')
-rw-r--r--app/bits.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/bits.c b/app/bits.c
new file mode 100644
index 0000000..03d5c31
--- /dev/null
+++ b/app/bits.c
@@ -0,0 +1,22 @@
+#include "project.h"
+
+void dump_bits(char *wot,uint8_t *bits)
+{
+char buf[128];
+char *ptr=buf;
+unsigned i=60;
+
+
+ptr+=sprintf(buf,"%s bits: ",wot);
+
+
+while (i--)
+*(ptr++)=*(bits++) ? '1':'0';
+
+
+*(ptr++)='\r';
+*(ptr++)='\n';
+*ptr=0;
+usart1_write(buf,(unsigned) (ptr-buf),1);
+
+}