# pysimavr package

## Subpackages

- pysimavr.examples package
  - Submodules
  - pysimavr.examples.delay module
  - pysimavr.examples.hello module
  - pysimavr.examples.simple module
  - pysimavr.examples.vcd module
  - Module contents
- pysimavr.swig package
  - Submodules
  - pysimavr.swig.ac_input module
  - pysimavr.swig.button module
  - pysimavr.swig.hd44780 module
  - pysimavr.swig.inverter module
  - pysimavr.swig.ledrow module
  - pysimavr.swig.sgm7 module
  - pysimavr.swig.simavr module
  - pysimavr.swig.spk module
  - pysimavr.swig.uart_buff module
  - pysimavr.swig.uart_udp module
  - Module contents

## Submodules

## pysimavr.about module

## pysimavr.ac module

class `pysimavr.ac.``Ac`(avr)

  Bases: `pysimavr.proxy.Proxy`

  `getirq`(pin)

## pysimavr.avr module

## pysimavr.button module

## pysimavr.connect module

`pysimavr.connect.``connect_irqs`(irq_out, irq_in, bidirectional=False)

`pysimavr.connect.``connect_pins_by_rule`(rule, device_map, vcd=None)

  rule example:

  B0 –> D4 -> vcd

  B1 <== D5 B2 => D6 # B3 <=> D7

## pysimavr.firmware module

class `pysimavr.firmware.``Firmware`(filename=None)

  Bases: `pysimavr.proxy.Proxy`

  `mcu`
  `read`(filename)

## pysimavr.inverter module

class `pysimavr.inverter.``Inverter`(avr)

  Bases: `pysimavr.proxy.Proxy`

  `getirq`(pin)
  `out`(i)

## pysimavr.lcd module

class `pysimavr.lcd.``Lcd`(avr, size=(20, 2))

  Bases: `pysimavr.proxy.Proxy`

  `get_char`(x, y)
  `getirq`(pin)
  `pinstate`(pin)
  `reset`()

## pysimavr.ledrow module

class `pysimavr.ledrow.``LedRow`(avr, size=8)

  Bases: `pysimavr.proxy.Proxy`

  `getirq`(pin)
  `pinstate`(i)
  `reset_dirty`(i)

    read and reset

## pysimavr.logger module

class `pysimavr.logger.``SimavrLogger`

  Bases: `object`

  `log`(line)
  `terminate`()

`pysimavr.logger.``init_simavr_logger`()

`pysimavr.logger.``terminate_simavr_logger`()

## pysimavr.proxy module

class `pysimavr.proxy.``Proxy`

  Bases: `object`

## pysimavr.sgm7 module

class `pysimavr.sgm7.``Sgm7`(avr, size=4)

  Bases: `pysimavr.proxy.Proxy`

  `digit_segments`(digit_index)
  `getirq`(pin)
  `pinindex`(pin_name)
  `pinstate`(pin)
  `reset_dirty`(digit_index)

    read and reset

## pysimavr.sim module

## pysimavr.spk module

## pysimavr.uart module

## pysimavr.udp module

## pysimavr.udpreader module

class `pysimavr.udpreader.``HypotheticDevice`(ip='127.0.0.1', port=4321, timeout=0.1)

  Bases: `pysimavr.udpreader.UdpHandler`

  This class is example how to implement a set of UART connected devices communicating via simple protocol: receives address byte and command and response with 2 bytes of data.

  `found_terminator`()

class `pysimavr.udpreader.``UdpHandler`(ip='127.0.0.1', port=4321, timeout=0.1)

  Bases: `asynchat.async_chat`

  Handler of UDP pipe from AVR simulator. It provides basic network facilities. It shall be subclassed to implement specific behavior.

  `collect_incoming_data`(data)
  `start`()
  `terminate`()

class `pysimavr.udpreader.``UdpReader`(ip='127.0.0.1', port=4321, timeout=0.1)

  Bases: `pysimavr.udpreader.UdpHandler`

  This handler does not answer anything. It accumulates data which it receives, i.e. does the same as the original one.

  `found_terminator`()
  `read`()

class `pysimavr.udpreader.``UdpRepeater`(ip='127.0.0.1', port=4321, timeout=0.1)

  Bases: `pysimavr.udpreader.UdpHandler`

  This handler repeats everything it receives back.

  `found_terminator`()

## pysimavr.vcdfile module

class `pysimavr.vcdfile.``VcdFile`(avr, filename='gtkwave_output.vcd', period=10)

  Bases: `pysimavr.proxy.Proxy`

  `add_signal`(irq, name=None, bits=1)
  `start`()
  `stop`()
  `terminate`()

## Module contents