Skip to content

Commit 4d3192f

Browse files
committed
Add BoardConfig bindings for USB product/vendor strings and UVC config
1 parent 601ef2f commit 4d3192f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/DeviceBindings.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
343343
py::enum_<BoardConfig::GPIO::Pull> boardConfigGpioPull(boardConfigGpio, "Pull", DOC(dai, BoardConfig, GPIO, Pull));
344344
py::enum_<BoardConfig::GPIO::Drive> boardConfigGpioDrive(boardConfigGpio, "Drive", DOC(dai, BoardConfig, GPIO, Drive));
345345
py::class_<BoardConfig::UART> boardConfigUart(boardConfig, "UART", DOC(dai, BoardConfig, UART));
346+
py::class_<BoardConfig::UVC> boardConfigUvc(boardConfig, "UVC", DOC(dai, BoardConfig, UVC));
346347
struct PyClock{};
347348
py::class_<PyClock> clock(m, "Clock");
348349

@@ -379,6 +380,8 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
379380
.def_readwrite("flashBootedVid", &BoardConfig::USB::flashBootedVid)
380381
.def_readwrite("flashBootedPid", &BoardConfig::USB::flashBootedPid)
381382
.def_readwrite("maxSpeed", &BoardConfig::USB::maxSpeed)
383+
.def_readwrite("productName", &BoardConfig::USB::productName)
384+
.def_readwrite("manufacturer", &BoardConfig::USB::manufacturer)
382385
;
383386

384387
// Bind BoardConfig::Network
@@ -456,6 +459,17 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
456459
.def_readwrite("tmp", &BoardConfig::UART::tmp)
457460
;
458461

462+
// Bind BoardConfig::UVC
463+
boardConfigUvc
464+
.def(py::init<>())
465+
.def(py::init<uint16_t, uint16_t>())
466+
.def_readwrite("cameraName", &BoardConfig::UVC::cameraName)
467+
.def_readwrite("width", &BoardConfig::UVC::width)
468+
.def_readwrite("height", &BoardConfig::UVC::height)
469+
.def_readwrite("frameType", &BoardConfig::UVC::frameType)
470+
.def_readwrite("enable", &BoardConfig::UVC::enable)
471+
;
472+
459473
// Bind BoardConfig
460474
boardConfig
461475
.def(py::init<>())
@@ -474,6 +488,7 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
474488
.def_readwrite("logSizeMax", &BoardConfig::logSizeMax, DOC(dai, BoardConfig, logSizeMax))
475489
.def_readwrite("logVerbosity", &BoardConfig::logVerbosity, DOC(dai, BoardConfig, logVerbosity))
476490
.def_readwrite("logDevicePrints", &BoardConfig::logDevicePrints, DOC(dai, BoardConfig, logDevicePrints))
491+
.def_readwrite("uvc", &BoardConfig::uvc, DOC(dai, BoardConfig, uvc))
477492
;
478493

479494
// Bind Device::Config

0 commit comments

Comments
 (0)