kopia lustrzana https://github.com/Hamlib/Hamlib
removed unused calc_ functions.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@301 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.1
rodzic
a069fad9f8
commit
92c0043aad
39
src/misc.c
39
src/misc.c
|
@ -6,7 +6,7 @@
|
|||
* Provides useful routines for data handling, used by backend
|
||||
* as well as by the frontend.
|
||||
*
|
||||
* $Id: misc.c,v 1.3 2000-10-16 21:53:22 f4cfe Exp $
|
||||
* $Id: misc.c,v 1.4 2000-12-22 01:16:17 javabear Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -83,43 +83,6 @@ void dump_hex(const unsigned char ptr[], size_t size)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert char to packed decimal
|
||||
* eg: 33 (0x21) => 0x33
|
||||
*
|
||||
*/
|
||||
|
||||
char calc_packed_from_char(unsigned char dec ) {
|
||||
|
||||
char d1,d2,pkd;
|
||||
|
||||
d1 = dec/10;
|
||||
d2 = dec - (d1 * 10);
|
||||
pkd = (d1*16)+d2;
|
||||
|
||||
return pkd;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert packed decimal to decimal
|
||||
* eg: 0x33 (51) => 33 decimal
|
||||
*
|
||||
*/
|
||||
|
||||
char calc_char_from_packed(unsigned char pkd ) {
|
||||
|
||||
char d1,d2,dec;
|
||||
|
||||
d1 = pkd/16;
|
||||
d2 = pkd - (d1 * 16);
|
||||
dec = (d1*10)+d2;
|
||||
|
||||
return dec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Convert a long long (eg. frequency in Hz) to 4-bit BCD digits,
|
||||
* packed two digits per octet, in little-endian order.
|
||||
|
|
20
src/misc.h
20
src/misc.h
|
@ -6,7 +6,7 @@
|
|||
* Provides useful routines for data handling, used by backends
|
||||
* as well as by the frontend.
|
||||
*
|
||||
* $Id: misc.h,v 1.3 2000-10-16 21:53:22 f4cfe Exp $
|
||||
* $Id: misc.h,v 1.4 2000-12-22 01:16:17 javabear Exp $
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -39,24 +39,6 @@
|
|||
#define Unhold_Decode(rig) {(rig)->state.hold_decode = 0;}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Convert char to packed decimal
|
||||
* eg: 33 (0x21) => 0x33
|
||||
*
|
||||
*/
|
||||
|
||||
char calc_packed_from_char(unsigned char dec );
|
||||
|
||||
|
||||
/*
|
||||
* Convert packed decimal to decimal
|
||||
* eg: 0x33 (51) => 33 decimal
|
||||
*
|
||||
*/
|
||||
|
||||
char calc_char_from_packed(unsigned char pkd );
|
||||
|
||||
/*
|
||||
* Do a hex dump of the unsigned char array.
|
||||
*/
|
||||
|
|
Ładowanie…
Reference in New Issue