URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 304 to Rev 305
- ↔ Reverse comparison
Rev 304 → Rev 305
/eco32/trunk/tools/shserout/ser0.out
0,0 → 1,42
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x0d |
char = 0x0a |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x0d |
char = 0x0a |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x2e |
char = 0x0d |
char = 0x0a |
char = 0x0d |
char = 0x0a |
/eco32/trunk/tools/shserout/Makefile
0,0 → 1,19
# |
# Makefile for "shserout" tool |
# |
|
BUILD = ../../build |
|
.PHONY: all install clean |
|
all: shserout |
|
install: shserout |
mkdir -p $(BUILD)/bin |
cp shserout $(BUILD)/bin |
|
shserout: shserout.c |
gcc -g -Wall -o shserout shserout.c |
|
clean: |
rm -f *~ shserout |
/eco32/trunk/tools/shserout/shserout.c
0,0 → 1,39
/* |
* shserout.c -- show output of serial line in readable format |
*/ |
|
|
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
|
|
#define LINE_SIZE 200 |
|
|
int main(int argc, char *argv[]) { |
FILE *inFile; |
char line[LINE_SIZE]; |
char *p; |
unsigned int n; |
|
if (argc != 2) { |
printf("usage: %s <serial line output file>\n", argv[0]); |
exit(1); |
} |
inFile = fopen(argv[1], "r"); |
if (inFile == NULL) { |
printf("error: cannot open input file '%s'\n", argv[1]); |
exit(1); |
} |
while (fgets(line, LINE_SIZE, inFile) != NULL) { |
p = strstr(line, "0x"); |
if (p == NULL) { |
continue; |
} |
n = strtoul(p, NULL, 0); |
printf("%c", n); |
} |
fclose(inFile); |
return 0; |
} |