Function opentitanlib::util::bitbang::parse_sequence
source · pub fn parse_sequence<'a, 'wr, 'rd>(
input: &'a str,
num_pins: usize,
clock: Duration,
accumulator_rd: &'rd mut Vec<u8>,
accumulator_wr: &'wr mut Vec<u8>
) -> Result<(Box<[BitbangEntry<'rd, 'wr>]>, HashMap<&'a str, usize>)>
Expand description
This function parses the main string argument to opentitantool gpio bit-bang
, producing a
list of BitbangEntry
corresponding to the parsed instructions. The slices in the entries
will refer to one of the two “accumulator vectors” provided by the caller, which this function
will clear out and resize according to need.