flipperzero_sys

Function bit_buffer_write_bytes_with_parity

Source
pub unsafe extern "C" fn bit_buffer_write_bytes_with_parity(
    buf: *const BitBuffer,
    dest: *mut c_void,
    size_bytes: usize,
    bits_written: *mut usize,
)
Expand description

Write a BitBuffer instance’s entire contents to an arbitrary memory location.

Additionally, place a parity bit after each byte.

The destination memory must be allocated. Additionally, the destination capacity must be no less than the source data size plus parity.

§Arguments

  • buf (direction in) - pointer to a BitBuffer instance to write from
  • dest (direction out) - pointer to the destination memory location
  • size_bytes (direction in) - maximum destination data size, in bytes
  • bits_written (direction out) - actual number of bits written, in bits

Note: Parity bits are placed starting with the most significant bit of each byte and moving up. Note: Example: DDDDDDDD PDDDDDDD DPDDDDDD DDP…