diff options
| author | Uri Shaked | 2021-04-15 19:44:42 +0300 |
|---|---|---|
| committer | Uri Shaked | 2021-04-15 19:45:23 +0300 |
| commit | bda476fc34d709b321aeea25a6bcf86754d343da (patch) | |
| tree | f008d74e4fb4a64641f4a24aa9811a49c4d21924 /src/peripherals/twi.ts | |
| parent | docs: fix capitalization (diff) | |
| download | avr8js-bda476fc34d709b321aeea25a6bcf86754d343da.tar.gz avr8js-bda476fc34d709b321aeea25a6bcf86754d343da.tar.bz2 avr8js-bda476fc34d709b321aeea25a6bcf86754d343da.zip | |
fix(twi): broken repeated start #91
fix #91
Diffstat (limited to '')
| -rw-r--r-- | src/peripherals/twi.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peripherals/twi.ts b/src/peripherals/twi.ts index f74001c..0dd8377 100644 --- a/src/peripherals/twi.ts +++ b/src/peripherals/twi.ts @@ -119,7 +119,7 @@ export class AVRTWI { this.eventHandler.start(status !== STATUS_TWI_IDLE); } else if (value & TWCR_TWSTO) { this.eventHandler.stop(); - } else if (status === STATUS_START) { + } else if (status === STATUS_START || status === STATUS_REPEATED_START) { this.eventHandler.connectToSlave(twdrValue >> 1, twdrValue & 0x1 ? false : true); } else if (status === STATUS_SLAW_ACK || status === STATUS_DATA_SENT_ACK) { this.eventHandler.writeByte(twdrValue); |
