From 1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 00:57:38 +0200 Subject: Nuke trailing whitespace. Signed-off-by: Ralf Baechle --- yamdrv/README.yamdrv | 52 ++++++++++++++++++++++++++-------------------------- yamdrv/mcs2h.c | 30 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 41 deletions(-) (limited to 'yamdrv') diff --git a/yamdrv/README.yamdrv b/yamdrv/README.yamdrv index f76ac10..280a3ce 100644 --- a/yamdrv/README.yamdrv +++ b/yamdrv/README.yamdrv @@ -11,23 +11,23 @@ yam3 default to COM4 0x3e8 irq3 ---------- Added : bitrate/baudrate configuration. -Added : mcs file may be loaded from yamcfg. +Added : mcs file may be loaded from yamcfg. One mcs file is affected to each bitrate. - + mcs data for 1200 and 9600 bds are preloaded in the driver but may be changed by yamcfg. options of yamcfg : - [iobase ] - [irq ] - [bitrate ] + [iobase ] + [irq ] + [bitrate ] [baudrate ] - [duplex ] - [hold ] + [duplex ] + [hold ] [txdelay ] - [txtail ] - [slottime ] + [txtail ] + [slottime ] [persist ] [load ] @@ -52,26 +52,26 @@ The program yamcfg get or set the parameters of the yam driver yamcfg -h gives a minimum help Example setup of yam0 for 1 serial port (com2) : - + file /etc/ax25/axports : - port0 F1OAT-9 9600 256 2 VHF (9600 bit/s) + port0 F1OAT-9 9600 256 2 VHF (9600 bit/s) commands : setserial /dev/cua0 port 0 # to avoid conflict with yam driver insmod yam yamcfg yam0 io 0x2f8 irq 3 - ifconfig yam0 hw ax25 f1oat-9 up - - + ifconfig yam0 hw ax25 f1oat-9 up + + Example setup of yam0,3 for 4 serial port (com1->com4) : - + file /etc/ax25/axports : - port0 F1OAT-9 9600 256 2 VHF (9600 bit/s) - port1 F1OAT-8 9600 256 2 UHF1 (9600 bit/s) - port2 F1OAT-7 9600 256 2 UHF2 (9600 bit/s) - port3 F1OAT-8 9600 256 2 UHF3 (9600 bit/s) - + port0 F1OAT-9 9600 256 2 VHF (9600 bit/s) + port1 F1OAT-8 9600 256 2 UHF1 (9600 bit/s) + port2 F1OAT-7 9600 256 2 UHF2 (9600 bit/s) + port3 F1OAT-8 9600 256 2 UHF3 (9600 bit/s) + commands : setserial /dev/cua0 port 0 # to avoid conflict with yam driver setserial /dev/cua1 port 0 # to avoid conflict with yam driver @@ -80,13 +80,13 @@ Example setup of yam0,3 for 4 serial port (com1->com4) : insmod yam yamcfg yam2 irq 5 yamcfg yam3 irq 7 - ifconfig yam0 hw ax25 f1oat-9 up - ifconfig yam1 hw ax25 f1oat-8 up - ifconfig yam2 hw ax25 f1oat-7 up - ifconfig yam3 hw ax25 f1oat-6 up - + ifconfig yam0 hw ax25 f1oat-9 up + ifconfig yam1 hw ax25 f1oat-8 up + ifconfig yam2 hw ax25 f1oat-7 up + ifconfig yam3 hw ax25 f1oat-6 up + + - Good test !!! 73's Frederic F1OAT and Jean-Paul F6FBB diff --git a/yamdrv/mcs2h.c b/yamdrv/mcs2h.c index 6914965..bf1ae72 100644 --- a/yamdrv/mcs2h.c +++ b/yamdrv/mcs2h.c @@ -6,12 +6,12 @@ int in2hex(char *ptr) { char str[3]; int val; - + memcpy(str, ptr, 2); str[2] = '\0'; - + sscanf(str, "%x", &val); - + return val; } @@ -19,7 +19,7 @@ unsigned char swap(unsigned char c) { unsigned char r = 0; int i; - + for (i = 0 ; i < 8 ; i++) { r <<= 1; @@ -34,12 +34,12 @@ int in4hex(char *ptr) { char str[5]; int val; - + memcpy(str, ptr, 4); str[4] = '\0'; - + sscanf(str, "%x", &val); - + return val; } @@ -50,22 +50,22 @@ int main(int ac, char *av[]) time_t temps; FILE *fptr; char buf[256]; - + if (ac != 3) { fprintf(stderr, "format : mcs2h 1200|9600 filename\n"); return 1; } - + fptr = fopen(av[2], "r"); if (fptr == NULL) { fprintf(stderr, "file %s not found\n", av[2]); return 1; } - + time(&temps); - + printf( "/*\n" " *\n" " * File %s converted to h format by mcs2h\n" @@ -84,10 +84,10 @@ int main(int ac, char *av[]) nb = in2hex(buf+1); add = in4hex(buf+3); type = in2hex(buf+7); - + if (type != 0) continue; - + if (first) first = 0; else @@ -98,9 +98,9 @@ int main(int ac, char *av[]) printf("0x%02x%s", swap(in2hex(buf+9+i*2)), (i < (nb-1)) ? "," : ""); } } - + printf(" };\n"); - + fclose(fptr); return 0; } -- cgit v1.2.3