dmi_encoder_put_bcd

Synopsis

#include <opendmi/encoder.h>

dmi_encoder_put_bcd(encoder, type, value)

Description

The dmi_encoder_put_bcd macro spells value out as the decimal digits sizeof(type) bytes hold, two per byte, using dmi_encode_bcd, and writes them. The cursor is advanced.

Parameters

encoder

Encoder to write to.

type

Wire-format type to write (e.g. dmi_byte_t).

value

Value to write.

Return value

true on success, false if the buffer cannot grow.

Errors

DMI_ERROR_OUT_OF_MEMORY

Buffer of the writer cannot grow.