diff options
author | root <root@lab.panaceas.james.local> | 2019-02-19 18:08:31 +0000 |
---|---|---|
committer | root <root@lab.panaceas.james.local> | 2019-02-19 18:08:31 +0000 |
commit | 9bbf1d200534cd946c4776e29457f989147b45b2 (patch) | |
tree | 6d167a3bede4ae9da3912562ad9fb5baf76d6770 /app/bits.c | |
parent | b3c6320899d6b27899ab3c67c745e8d3b29af3a2 (diff) | |
download | clock-9bbf1d200534cd946c4776e29457f989147b45b2.tar.gz clock-9bbf1d200534cd946c4776e29457f989147b45b2.tar.bz2 clock-9bbf1d200534cd946c4776e29457f989147b45b2.zip |
everything working, even with fucked phy
Diffstat (limited to 'app/bits.c')
-rw-r--r-- | app/bits.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,22 +1,22 @@ #include "project.h" -void dump_bits(char *wot,uint8_t *bits) +void dump_bits (char *wot, uint8_t *bits) { -char buf[128]; -char *ptr=buf; -unsigned i=60; + char buf[128]; + char *ptr = buf; + unsigned i = 60; -ptr+=sprintf(buf,"%s bits: ",wot); + ptr += sprintf (buf, "%s bits: ", wot); -while (i--) -*(ptr++)=*(bits++) ? '1':'0'; + while (i--) + * (ptr++) = * (bits++) ? '1' : '0'; -*(ptr++)='\r'; -*(ptr++)='\n'; -*ptr=0; -usart1_write(buf,(unsigned) (ptr-buf),1); + * (ptr++) = '\r'; + * (ptr++) = '\n'; + *ptr = 0; + usart1_write (buf, (unsigned) (ptr - buf), 1); } |