CDX DBC Signal Copying

The same internal start-LSB offset is used in both buffers. Bit zero is the first byte’s least significant bit. Intel signals continue into increasing byte indices; Motorola signals continue into decreasing indices. Motorola offsets are not the external DBC start-MSB notation. Buffers may overlap: the complete signal is read before any destination bits change.

Contents

Functions

Function Description
CDX_dbc_copy_u32_le Copy a little-endian signal of up to 32 bits.
CDX_dbc_copy_u64_le Copy a little-endian signal of up to 64 bits.
CDX_dbc_copy_u32_be Copy a big-endian signal of up to 32 bits.
CDX_dbc_copy_u64_be Copy a big-endian signal of up to 64 bits.

Functions

CDX_dbc_copy_u32_le

Copy a little-endian signal of up to 32 bits.

1CDX_STATUS CDX_dbc_copy_u32_le(void *dst, uint32_t dst_size, void const *src, uint32_t src_size, uint16_t offset, uint8_t bits)

retval

  • CDX_STATUS_OK: Signal copied; surrounding destination bits preserved.
  • CDX_STATUS_BAD_PARAM: Invalid pointer, width or range; nothing written.

Parameters

  • void * dst: Nonnull writable destination buffer.
  • uint32_t dst_size: Destination size in bytes.
  • void const * src: Nonnull source buffer.
  • uint32_t src_size: Source size in bytes.
  • uint16_t offset: Internal least significant bit position in both buffers.
  • uint8_t bits: Signal width, 1 through 32; must fit in both buffers.

Location: cdx_dbc_copy.h:49

CDX_dbc_copy_u64_le

Copy a little-endian signal of up to 64 bits.

1CDX_STATUS CDX_dbc_copy_u64_le(void *dst, uint32_t dst_size, void const *src, uint32_t src_size, uint16_t offset, uint8_t bits)

retval

  • CDX_STATUS_OK: Signal copied; surrounding destination bits preserved.
  • CDX_STATUS_BAD_PARAM: Invalid pointer, width or range; nothing written.

Parameters

  • void * dst: Nonnull writable destination buffer.
  • uint32_t dst_size: Destination size in bytes.
  • void const * src: Nonnull source buffer.
  • uint32_t src_size: Source size in bytes.
  • uint16_t offset: Internal least significant bit position in both buffers.
  • uint8_t bits: Signal width, 1 through 64; must fit in both buffers.

Location: cdx_dbc_copy.h:61

CDX_dbc_copy_u32_be

Copy a big-endian signal of up to 32 bits.

1CDX_STATUS CDX_dbc_copy_u32_be(void *dst, uint32_t dst_size, void const *src, uint32_t src_size, uint16_t offset, uint8_t bits)

retval

  • CDX_STATUS_OK: Signal copied; surrounding destination bits preserved.
  • CDX_STATUS_BAD_PARAM: Invalid pointer, width or range; nothing written.

Parameters

  • void * dst: Nonnull writable destination buffer.
  • uint32_t dst_size: Destination size in bytes.
  • void const * src: Nonnull source buffer.
  • uint32_t src_size: Source size in bytes.
  • uint16_t offset: Internal start-LSB position, not external Motorola start-MSB.
  • uint8_t bits: Signal width, 1 through 32; must fit in both buffers.

Location: cdx_dbc_copy.h:73

CDX_dbc_copy_u64_be

Copy a big-endian signal of up to 64 bits.

1CDX_STATUS CDX_dbc_copy_u64_be(void *dst, uint32_t dst_size, void const *src, uint32_t src_size, uint16_t offset, uint8_t bits)

retval

  • CDX_STATUS_OK: Signal copied; surrounding destination bits preserved.
  • CDX_STATUS_BAD_PARAM: Invalid pointer, width or range; nothing written.

Parameters

  • void * dst: Nonnull writable destination buffer.
  • uint32_t dst_size: Destination size in bytes.
  • void const * src: Nonnull source buffer.
  • uint32_t src_size: Source size in bytes.
  • uint16_t offset: Internal start-LSB position, not external Motorola start-MSB.
  • uint8_t bits: Signal width, 1 through 64; must fit in both buffers.

Location: cdx_dbc_copy.h:85