summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 248a588)
raw | patch | inline | side by side (parent: 248a588)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 27 Mar 2017 12:20:09 +0000 (15:20 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Wed, 17 May 2017 08:06:26 +0000 (11:06 +0300) |
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py/pykms/pykmsbase.cpp | patch | blob | history |
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index c371a0b76accf503c072d2459b91a2969cf87b06..d013f1f38cd39ef6827b4a038f274f872028fa99 100644 (file)
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
.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<>())
.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