mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-10 21:21:51 +09:00
simpler method of delta coding
This commit is contained in:
@@ -109,6 +109,8 @@ abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolea
|
||||
* @param byteCount Number of bytes being transmitted
|
||||
*/
|
||||
protected fun applyBaudRateDelay(byteCount: Int) {
|
||||
if (baudRate <= 0) return
|
||||
|
||||
// Calculate delay in milliseconds
|
||||
// Baud rate is bits per second, and we assume 10 bits per byte (8 data bits + start/stop bits)
|
||||
val bitsTransmitted = byteCount * 10
|
||||
|
||||
Reference in New Issue
Block a user