Pin Class Reference
|
yasimavr
|
Loading...
Searching...
No Matches
Pin Class Reference
MCU pin model. More...
#include <sim_pin.h>
Inheritance diagram for Pin:
Classes | |
| struct | controls_t |
Public Member Functions | |
| Pin (pin_id_t id) | |
| pin_id_t | id () const |
| void | set_external_state (const state_t &state) |
| void | set_external_state (StateEnum state, double level=0.0) |
| void | set_external_state (char state, double level=0.0) |
| void | set_gpio_controls (const controls_t &controls) |
| controls_t | gpio_controls () const |
| Pin (const Pin &)=delete | |
| Pin & | operator= (const Pin &)=delete |
Public Member Functions inherited from Wire | |
| Wire () | |
| Wire (Wire &other) | |
| Wire (const Wire &other) | |
| virtual | ~Wire () |
| DataSignal & | signal () |
| const state_t & | state () const |
| bool | digital_state () const |
| double | voltage () const |
| void | set_state (const state_t &state) |
| void | set_state (StateEnum state, double v=0.0) |
| void | set_state (char state, double v=0.0) |
| void | attach (Wire &other) |
| void | detach () |
| bool | attached (const Wire &other) const |
| bool | attached () const |
| std::vector< Wire * > | siblings () const |
| Wire & | operator= (Wire &other) |
| Wire & | operator= (const Wire &other) |
Friends | |
| class | PinManager |
| class | PinDriver |
Additional Inherited Members | |
Public Types inherited from Wire | |
| enum | StateEnum { State_Floating = 0x00 , State_PullUp = 0x03 , State_PullDown = 0x01 , State_Analog = 0x04 , State_High = 0x07 , State_Low = 0x05 , State_Shorted = 0x80 , State_Error = 0x90 } |
| enum | SignalId { Signal_StateChange = 0 , Signal_DigitalChange , Signal_VoltageChange } |
Static Public Member Functions inherited from Wire | |
| static StateEnum | char2state (char c) |
| static state_t | resolve_two_states (const state_t &a, const state_t &b) |
Protected Member Functions inherited from Wire | |
| void | auto_resolve_state () |
Detailed Description
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.
Constructor & Destructor Documentation
◆ Pin() [1/2]
|
explicit |
◆ Pin() [2/2]
|
delete |
Member Function Documentation
◆ gpio_controls()
|
inline |
Getter for the GPIO controls currently applied
◆ id()
|
inline |
◆ operator=()
◆ set_external_state() [1/3]
|
inline |
Set the state applied to the pin by the external circuit. Valid values for state are defined in Wire.
- See also
- Wire::char2state
◆ set_external_state() [2/3]
|
inline |
Set the state applied to the pin by the external circuit
◆ set_external_state() [3/3]
|
inline |
Set the state applied to the pin by the external circuit
◆ set_gpio_controls()
| void Pin::set_gpio_controls | ( | const controls_t & | controls | ) |
Set the controls for the internal circuit state
Friends And Related Symbol Documentation
◆ PinDriver
|
friend |
◆ PinManager
|
friend |
The documentation for this class was generated from the following files:
Generated by
Public Member Functions inherited from