C API for BALTECH SDK

§ BinToBcd

bool BinToBcd

Converts a binary Number to a BCD encoded 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 1.2041 (and rounded up to the next byte boundary).

This is not exactly the inverse of BcdToBin, since the length may differ.

0x04 0xD2 => 0x12 0x34

Definition at line 2995 of file typedefs.h.