Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opentitantool] Tolerate 1% deviation either way
If doing bitbanging and specifying a pause between segments of the waveform, the delay may not be an exact multiple of the base bitbanging sample frequency, as in this example: ``` opentitantool gpio bitbang --clock 115200Hz -s "0100001001 1ms 0100001001" CN9_6 ``` The code was intended to round off to a whole number of samples, as long as the actual time is within 1% of what was requested (115 sample times in the case above). However the original code had a bug meaning that it would accept only 99%-100% of the requested period, rather than 99%-101%. Change-Id: I79fd67926fedd7fb6dbae27d6314a28bc0b7f2e1 Signed-off-by: Jes B. Klinke <[email protected]>
- Loading branch information