Class Pin
Defined in File sim_pin.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public Wire(Class Wire)
Class Documentation
-
class Pin : public Wire
MCU pin model.
Pin represents a external pad of the MCU used for GPIO. The pin has two electrical states given by the external circuit and the internal circuit (the GPIO port), which are resolved into a single electrical state. In case of conflict, the SHORTED state is set. The internal circuit state is set by GPIO controls.
Public Functions
-
explicit Pin(pin_id_t id)
-
inline pin_id_t id() const
-
inline void set_external_state(const state_t &state)
Set the state applied to the pin by the external circuit
-
inline void set_external_state(StateEnum state, double level = 0.0)
Set the state applied to the pin by the external circuit
-
inline void set_external_state(char state, double level = 0.0)
Set the state applied to the pin by the external circuit
-
void set_gpio_controls(const controls_t &controls)
Set the controls for the internal circuit state
-
inline controls_t gpio_controls() const
Getter for the GPIO controls currently applied
-
struct controls_t
Structure for defining the controls of a GPIO
-
explicit Pin(pin_id_t id)