Skip to content

Commit

Permalink
Change to use Transfer for one byte transfer on CMSIS-DAP
Browse files Browse the repository at this point in the history
  • Loading branch information
kkitayam committed Oct 26, 2023
1 parent 5f02a94 commit b13f482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyocd/probe/pydapaccess/dap_access_cmsis_dap.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def encode_data(self):
"""
assert self.get_empty() is False
self._data_encoded = True
if self._block_allowed:
if self._block_allowed and (self._read_count > 1 or self._write_count > 1):
data = self._encode_transfer_block_data()
else:
data = self._encode_transfer_data()
Expand All @@ -478,7 +478,7 @@ def decode_data(self, data):
"""
assert self.get_empty() is False
assert self._data_encoded is True
if self._block_allowed:
if self._block_allowed and (self._read_count > 1 or self._write_count > 1):
data = self._decode_transfer_block_data(data)
else:
data = self._decode_transfer_data(data)
Expand Down

0 comments on commit b13f482

Please sign in to comment.