mbgtools-lx
4.2.8
|
Go to the source code of this file.
Data Structures | |
union | UL |
Macros | |
#define | _CSFAR |
#define | _ext extern |
#define | _frac(_x) ( ( (_x) == 0.0 ) ? 0.0 : ( (_x) - (double) ( (long) (_x) ) ) ) |
#define | _eos(_s) ( &(_s)[strlen( _s )] ) |
#define | MIN(_x, _y) ( ( (_x) < (_y) ) ? (_x) : (_y) ) |
#define | MAX(_x, _y) ( ( (_x) > (_y) ) ? (_x) : (_y) ) |
#define | SWAP(_x, _y) { temp = (_x); (_x) = (_y); (_y) = temp; } |
#define | SQR(_x) ( (_x) * (_x) ) |
#define | DP (double *) |
#define | bcd_from_bin(_x) ( ( ( (_x) / 10 ) << 4 ) | ( (_x) % 10 ) ) |
#define | bin_from_bcd(_x) ( ( ( (_x) >> 4 ) * 10 ) + ( (_x) & 0x0F ) ) |
#define | _CSUM_DEFINED |
#define | _csum(_p) checksum( (void _CSFAR *)(_p), sizeof( *(_p) ) ) |
#define | _set_csum(_p) (_p)->csum = _csum( (_p) ) |
#define | _valid_csum(_p) ( (_p)->csum == _csum( (_p) ) ) |
#define | _inrange(_val, _min, _max) ( ( (_val) >= (_min) ) && ( (_val) <= (_max) ) ) |
#define | _mask(_n) ( ( 1UL << (_n) ) - 1 ) |
#define | _idx_bit(_i) ( 1UL << (_i) ) |
#define | _is_supported(_i, _msk) ( ( (_msk) & _idx_bit( _i ) ) != 0 ) |
#define | _sgn(_x) ( ( ( _x ) < 0 ) ? -1 : 1 ) |
#define | _m(_Y1, _X1, _Y2, _X2) ( ( _Y2 -_Y1 ) / ( _X2 -_X1 ) ) |
#define | _b(_Y1, _X1, _Y2, _X2) ( ( ( _Y1 * _X2 ) - ( _Y2 * _X1 ) ) / ( _X2 -_X1 ) ) |
#define | _strncpy_0(_dst, _src) |
#define | _memfill(_p, _v) memset( _p, _v, sizeof( *(_p) ) ) |
#define | _memclr(_p) _memfill( _p, 0 ) |
#define | _dos_idle() geninterrupt( 0x28 ) |
Typedefs | |
typedef uint16_t | CSUM |
Functions | |
void | spaces_to_zeros (char *s) |
Replace whitespace ' ' characters by 0 characters. More... | |
CSUM | checksum (const void *vp, int n) |
Create a simple checksum. More... | |
#define _b | ( | _Y1, | |
_X1, | |||
_Y2, | |||
_X2 | |||
) | ( ( ( _Y1 * _X2 ) - ( _Y2 * _X1 ) ) / ( _X2 -_X1 ) ) |
#define _frac | ( | _x | ) | ( ( (_x) == 0.0 ) ? 0.0 : ( (_x) - (double) ( (long) (_x) ) ) ) |
#define _idx_bit | ( | _i | ) | ( 1UL << (_i) ) |
Definition at line 159 of file myutil.h.
Referenced by print_cfg_rx(), print_cfg_tx(), and set_new_tfom_flag().
Definition at line 151 of file myutil.h.
Referenced by check_valid_port_info().
#define _is_supported | ( | _i, | |
_msk | |||
) | ( ( (_msk) & _idx_bit( _i ) ) != 0 ) |
Definition at line 163 of file myutil.h.
Referenced by check_valid_port_info(), eval_pout(), set_new_icode_rx(), set_new_icode_tx(), and show_pout().
#define _m | ( | _Y1, | |
_X1, | |||
_Y2, | |||
_X2 | |||
) | ( ( _Y2 -_Y1 ) / ( _X2 -_X1 ) ) |
#define _mask | ( | _n | ) | ( ( 1UL << (_n) ) - 1 ) |
Definition at line 155 of file myutil.h.
Referenced by check_valid_port_info().
#define _memfill | ( | _p, | |
_v | |||
) | memset( _p, _v, sizeof( *(_p) ) ) |
#define _strncpy_0 | ( | _dst, | |
_src | |||
) |
#define bcd_from_bin | ( | _x | ) | ( ( ( (_x) / 10 ) << 4 ) | ( (_x) % 10 ) ) |
#define bin_from_bcd | ( | _x | ) | ( ( ( (_x) >> 4 ) * 10 ) + ( (_x) & 0x0F ) ) |
#define SWAP | ( | _x, | |
_y | |||
) | { temp = (_x); (_x) = (_y); (_y) = temp; } |
CSUM checksum | ( | const void * | vp, |
int | n | ||
) |
Create a simple checksum.
[in] | vp | Pointer to a data block |
[in] | n | Size of the datablock to calulate the checksum from. |
void spaces_to_zeros | ( | char * | s | ) |
Replace whitespace ' ' characters by 0 characters.
[in,out] | s | The string to be modified. |