ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
pc_bit_writer Struct Reference

LSB-first bit writer over the caller's output buffer; overflow latches once cap is exceeded. More...

#include <bitio.h>

Public Attributes

uint8_t * out
 
size_t cap
 
size_t cnt
 bytes written so far
 
uint32_t acc
 bit accumulator (LSB-first)
 
int nbits
 bits currently buffered (< 8 between calls)
 
bool overflow
 

Detailed Description

LSB-first bit writer over the caller's output buffer; overflow latches once cap is exceeded.

Definition at line 28 of file bitio.h.

Member Data Documentation

◆ out

uint8_t* pc_bit_writer::out

Definition at line 30 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().

◆ cap

size_t pc_bit_writer::cap

Definition at line 31 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().

◆ cnt

size_t pc_bit_writer::cnt

bytes written so far

Definition at line 32 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().

◆ acc

uint32_t pc_bit_writer::acc

bit accumulator (LSB-first)

Definition at line 33 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().

◆ nbits

int pc_bit_writer::nbits

bits currently buffered (< 8 between calls)

Definition at line 34 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().

◆ overflow

bool pc_bit_writer::overflow

Definition at line 35 of file bitio.h.

Referenced by pc_bitw_align(), and pc_bitw_put().


The documentation for this struct was generated from the following file: