pe42420

class rfblocks.pe42420(c1: str | None = None, c2: str | None = None)[source]

Encapsulates control of the PE42420 RF switch.

Documentation for the SPDT RF switches rfblocks module which uses the PE42420 can be found here: SPDT RF Switches

Parameters:
  • c1 (str) – The PE42420 CTRL1 controller pin.

  • c2 (str) – The PE42420 CTRL2 controller pin.

class State(value)[source]

An enum containing the possible states for the switch. (pe42420.State.OFF, pe42420.State.RF1, pe42420.State.RF2)

chip_reset() str[source]

Reset the chip internal logic to default states.

Returns:

A string containing the controller commands required to reset the chip.

config_state(state: State) str[source]

Configure the switch state

Parameters:

state (State) – Set the switch to this state

Returns:

A string containing the controller commands required to set the switch hardware configuration.

pin_config() str[source]

Initialize controller pin configuration.

Returns:

A string specifying the commands required to initialize the connected controller pins.