Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 369d3dcfef5c
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0f82729c8d8f
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jul 3, 2019

  1. applet.internal.benchmark: suppress setting pull resistors.

    We're not really interested in any electrical port features, so just
    pass args=None everywhere.
    whitequark committed Jul 3, 2019
    Copy the full SHA
    0f82729 View commit details
Showing with 4 additions and 3 deletions.
  1. +2 −2 software/glasgow/applet/internal/benchmark/__init__.py
  2. +2 −1 software/glasgow/device/hardware.py
4 changes: 2 additions & 2 deletions software/glasgow/applet/internal/benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ class BenchmarkApplet(GlasgowApplet, name="benchmark"):

def build(self, target, args):
self.mux_interface = iface = \
target.multiplexer.claim_interface(self, args, throttle="none")
target.multiplexer.claim_interface(self, args=None, throttle="none")
mode, self.__addr_mode = target.registers.add_rw(2)
error, self.__addr_error = target.registers.add_ro(1)
count, self.__addr_count = target.registers.add_rw(32)
@@ -130,7 +130,7 @@ def add_run_arguments(cls, parser, access):
help="run benchmark mode MODE (default: {})".format(" ".join(cls.__all_modes)))

async def run(self, device, args):
iface = await device.demultiplexer.claim_interface(self, self.mux_interface, args)
iface = await device.demultiplexer.claim_interface(self, self.mux_interface, args=None)

golden = bytearray()
while len(golden) < args.count:
3 changes: 2 additions & 1 deletion software/glasgow/device/hardware.py
Original file line number Diff line number Diff line change
@@ -470,7 +470,8 @@ async def set_pulls(self, spec, low=set(), high=set()):
struct.pack("BB", port_enable, port_value))
# Check if we've succeeded
if await self._status() & ST_ERROR:
raise GlasgowDeviceError("cannot set I/O port(s) {} pull resistors to low={} high={}"
raise GlasgowDeviceError("cannot set I/O port(s) {} pull resistors to "
"low={} high={}"
.format(spec or "(none)", low or "{}", high or "{}"))

async def _register_error(self, addr):