diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/pykms/pykmsbase.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp index c371a0b..d013f1f 100644 --- a/py/pykms/pykmsbase.cpp +++ b/py/pykms/pykmsbase.cpp @@ -147,6 +147,12 @@ void init_pykmsbase(py::module &m) .value("BGR565", PixelFormat::BGR565) ; + py::enum_<SyncPolarity>(m, "SyncPolarity") + .value("Undefined", SyncPolarity::Undefined) + .value("Positive", SyncPolarity::Positive) + .value("Negative", SyncPolarity::Negative) + ; + py::class_<Videomode>(m, "Videomode") .def(py::init<>()) @@ -172,8 +178,14 @@ void init_pykmsbase(py::module &m) .def("__repr__", [](const Videomode& vm) { return "<pykms.Videomode " + to_string(vm.hdisplay) + "x" + to_string(vm.vdisplay) + ">"; }) .def("to_blob", &Videomode::to_blob) + + .def_property("hsync", &Videomode::hsync, &Videomode::set_hsync) + .def_property("vsync", &Videomode::vsync, &Videomode::set_vsync) ; + + m.def("videomode_from_timings", &videomode_from_timings); + py::class_<AtomicReq>(m, "AtomicReq") .def(py::init<Card&>(), py::keep_alive<1, 2>()) // Keep Card alive until this is destructed |