Skip to content

Commit

Permalink
default full trans to full read unless overriden -- testing
Browse files Browse the repository at this point in the history
  • Loading branch information
elcritch committed Nov 4, 2020
1 parent aac1c36 commit ac1da89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nesper/spis.nim
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ proc fullTrans*(dev: SpiDev;
spi_id.inc()
var tflags = flags
assert txlength.int() <= 8*len(txdata)
assert rxlength.int() >= 0
# assert rxlength.int() >= 0

result = new(SpiTrans)
result.dev = dev
Expand Down Expand Up @@ -219,7 +219,7 @@ proc fullTrans*(dev: SpiDev;

# Set RX Details
result.trn.rxlength =
if rxlength.int() <= 0:
if rxlength.int() < 0:
result.trn.length
else:
rxlength.uint()
Expand Down

0 comments on commit ac1da89

Please sign in to comment.