Skip to content

Commit

Permalink
Fixed references to "processor" instance variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ccattuto authored and thegecko committed Jul 19, 2022
1 parent b00c331 commit 3269ed1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/rtt/rtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RTT {
this.processor = processor;
}

async init (processor) {
async init () {
let scanBlockSize = 0x1000 ;
let scanStride = 0x0800;

Expand Down Expand Up @@ -115,10 +115,10 @@ class RTT {
buf.WrOff = await this.processor.readMem32(buf.bufAddr + 12);

if (buf.WrOff > buf.RdOff) {
var data = await processor.readBytes(buf.pBuffer + buf.RdOff, buf.WrOff - buf.RdOff);
var data = await this.processor.readBytes(buf.pBuffer + buf.RdOff, buf.WrOff - buf.RdOff);
} else if (buf.WrOff < buf.RdOff) {
let data1 = await processor.readBytes(buf.pBuffer + buf.RdOff, buf.SizeOfBuffer - buf.RdOff);
let data2 = await processor.readBytes(buf.pBuffer, buf.WrOff);
let data1 = await this.processor.readBytes(buf.pBuffer + buf.RdOff, buf.SizeOfBuffer - buf.RdOff);
let data2 = await this.processor.readBytes(buf.pBuffer, buf.WrOff);
var data = new Uint8Array(data1.length + data2.length);
data.set(data1, 0);
data.set(data2, data1.length);
Expand Down

0 comments on commit 3269ed1

Please sign in to comment.