1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
/// Check the `util` module to see how the `Card` structure is implemented.
pub mod utils;
use crate::utils::*;
pub fn main() {
let card = Card::open_global();
let resources = card.resource_handles().unwrap();
for connector in resources.connectors().iter() {
let info = card.get_connector(*connector, false).unwrap();
println!("Connector {:?}: {:?}", info.interface(), info.state());
if info.state() == drm::control::connector::State::Connected {
println!("\t Modes:\n{:#?}", info.modes());
}
}
}
|