pub fn ram_buffer_handler(
buff_trip: usize,
bs_sender: &Sender<Vec<u8>>,
) -> Result<(RamBuffer, usize, bool), RegisterError>
Expand description
Manage the RAM buffers for event data
This will make a decision based on the buff_trip value if a buffer is “full”, and in that case, read it out, send the data over the channel elsewhere and switch to the other half of the buffer. If buff_trip == DATABUF_TOTAL_SIZE, the buffer will be switched by the firmware.
§Arguments:
- buff_trip : size which triggers buffer readout.