34 #define Hold_Decode(rig) {(rig)->state.hold_decode = 1;}
35 #define Unhold_Decode(rig) {(rig)->state.hold_decode = 0;}
43 void dump_hex(
const unsigned char ptr[],
size_t size);
53 extern HAMLIB_EXPORT(
unsigned char *)
to_bcd(
unsigned char bcd_data[],
unsigned long long freq,
unsigned bcd_len);
54 extern HAMLIB_EXPORT(
unsigned long long)
from_bcd(const
unsigned char bcd_data[],
unsigned bcd_len);
59 extern HAMLIB_EXPORT(
unsigned char *)
to_bcd_be(
unsigned char bcd_data[],
unsigned long long freq,
unsigned bcd_len);
60 extern HAMLIB_EXPORT(
unsigned long long)
from_bcd_be(const
unsigned char bcd_data[],
unsigned bcd_len);
65 #define isreturn(c) ((c) == 10 || (c) == 13)
69 #ifdef HAVE_INTTYPES_H
72 #ifdef HAVE_SYS_TIME_H
double freq_t
Frequency type, Frequency type unit in Hz, able to hold SHF frequencies.
Definition: rig.h:276
void rig_force_cache_timeout(struct timeval *tv)
Helper for forcing cache timeout next call.
Definition: misc.c:838
unsigned char * to_bcd(unsigned char bcd_data[], unsigned long long freq, unsigned bcd_len)
Convert from binary to 4-bit BCD digits, little-endian.
Definition: misc.c:74
unsigned long long from_bcd_be(const unsigned char bcd_data[], unsigned bcd_len)
Convert 4-bit BCD digits to binary, big-endian.
Definition: misc.c:179
unsigned char * to_bcd_be(unsigned char bcd_data[], unsigned long long freq, unsigned bcd_len)
Convert from binary to 4-bit BCD digits, big-endian.
Definition: misc.c:144
unsigned long long from_bcd(const unsigned char bcd_data[], unsigned bcd_len)
Convert BCD digits, little-endian, to a long long (e.g. frequency in Hz)
Definition: misc.c:114
Hamlib rig data structures.
void dump_hex(const unsigned char ptr[], size_t size)
Do a hex dump of the unsigned char array.
Definition: debug.c:66
int rig_check_cache_timeout(const struct timeval *tv, int timeout)
Helper for checking cache timeout.
Definition: misc.c:798
int sprintf_freq(char *str, freq_t)
Pretty print a frequency.
Definition: misc.c:212