C API for BALTECH SDK

§ BcdToBin

bool BcdToBin

Converts a BCD Number (must only contain nibbles 0-9, not A-F) to a binary number.

Input and Output data are MSB encoded.

The length of the destination data is the length of the source data (in bytes) multiplied by 0.83048 (and rounded down to the next byte boundary).

Some source data's binary representation is longer than the calculated destination length. If such source data could occur, an additional leading zerobyte has to be inserted in front of the source data

0x12 0x34 => 0x04 0xD2

Definition at line 2973 of file typedefs.h.