class HotPlugDetection
Defined at line 33 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.h
Manages the GPIO connected to the HDMI HPD (Hot-Plug Detect) pin.
Public Members
static const size_t kOnStateChangeTargetSize
Public Methods
zx::result<std::unique_ptr<HotPlugDetection>> Create (fdf::Namespace & incoming, OnStateChangeHandler on_state_change)
Factory method intended for production use.
`on_state_change` is called when the HPD pin state changes. The initial
state is HPD not detected. The target call must outlive the newly created
HotPlugDetection instance. The target may be called on an arbitrary thread.
Defined at line 27 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc
void HotPlugDetection (const HotPlugDetection & )
Defined at line 63 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.h
HotPlugDetection & operator= (const HotPlugDetection & )
Defined at line 64 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.h
void HotPlugDetection (fidl::ClientEnd<fuchsia_hardware_gpio::Gpio> pin_gpio, zx::interrupt pin_gpio_interrupt, OnStateChangeHandler on_state_change, fdf::SynchronizedDispatcher irq_handler_dispatcher)
Production code should prefer the Create() factory method.
`pin_gpio` is a FIDL client for the driver of the GPIO connected to the
HDMI plug's HPD (Hot-Plug Detect) pin. `pin_gpio_interrupt` is the
interrupt generated by the GPIO driver for the HDMI plug's HPD pin.
`on_state_change` is called when the HPD (Hot-Plug Detection) state
changes. The target call must outlive the newly created HotPlugDetection
instance. The target may be called on an arbitrary thread.
Defined at line 102 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc
void ~HotPlugDetection ()
Defined at line 114 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc
HotPlugDetectionState CurrentState ()
The most recently reported HPD state.
The state change handler will be called when the HPD state changes from the
value returned here.
Defined at line 143 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc
zx::result<> Init ()
Initialization work that is not suitable for the constructor.
Called by Create().
Defined at line 148 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc
zx::result<> UpdateState ()
Updates internal state state to reflect the current HPD pin GPIO state.
Should be called in response to GPIO state change interrupts.
Defined at line 185 of file ../../src/graphics/display/drivers/amlogic-display/hot-plug-detection.cc