X-Git-Url: https://git.ti.com/gitweb?p=android%2Fexternal-libkmsxx.git;a=blobdiff_plain;f=py%2Fpykms%2Fpykmsbase.cpp;h=d013f1f38cd39ef6827b4a038f274f872028fa99;hp=c371a0b76accf503c072d2459b91a2969cf87b06;hb=42e433c17db2f386ec3f93ec83802bbe86e1d5ab;hpb=248a58888dae562b3a9f636fecc5bbb46307cd9b 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_(m, "SyncPolarity") + .value("Undefined", SyncPolarity::Undefined) + .value("Positive", SyncPolarity::Positive) + .value("Negative", SyncPolarity::Negative) + ; + py::class_(m, "Videomode") .def(py::init<>()) @@ -172,8 +178,14 @@ void init_pykmsbase(py::module &m) .def("__repr__", [](const Videomode& vm) { return ""; }) .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_(m, "AtomicReq") .def(py::init(), py::keep_alive<1, 2>()) // Keep Card alive until this is destructed