summaryrefslogtreecommitdiffstats
path: root/app/bits.c
blob: 03d5c31beed6c326bcb19ce5ad205029d6f4424e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);

}