@@ -608,21 +608,19 @@ PyMethodDef IcsMethods[] = {
608608 meth_get_device_name,
609609 METH_VARARGS,
610610 _DOC_GET_DEVICE_NAME),
611- _EZ_ICS_STRUCT_METHOD (" get_imei" ,
612- " icsneoGetIMEI" ,
613- " GetIMEI" ,
614- meth_get_imei,
615- METH_VARARGS,
616- _DOC_GET_IMEI),
611+ _EZ_ICS_STRUCT_METHOD (" get_imei" , " icsneoGetIMEI" , " GetIMEI" , meth_get_imei, METH_VARARGS, _DOC_GET_IMEI),
617612 _EZ_ICS_STRUCT_METHOD (" get_component_versions" ,
618613 " icsneoGetComponentVersions" ,
619614 " GetComponentVersions" ,
620615 meth_get_component_versions,
621616 METH_VARARGS,
622617 _DOC_GET_COMPONENT_VERSIONS),
623-
624-
625-
618+ _EZ_ICS_STRUCT_METHOD (" request_set_neovi_miscio" ,
619+ " icsneoRequestSetNeoVIMiscIO" ,
620+ " RequestSetNeoVIMiscIO" ,
621+ meth_request_set_neovi_miscio,
622+ METH_VARARGS,
623+ _DOC_REQUEST_SET_NEOVI_MISCIO),
626624
627625 { " override_library_name" , (PyCFunction)meth_override_library_name, METH_VARARGS, _DOC_OVERRIDE_LIBRARY_NAME },
628626 { " get_library_path" , (PyCFunction)meth_get_library_path, METH_NOARGS, " " },
@@ -5465,7 +5463,8 @@ PyObject* meth_get_device_name(PyObject* self, PyObject* args) // icsneoGetDevic
54655463 }
54665464}
54675465
5468- PyObject* meth_get_imei (PyObject* self, PyObject* args) { // icsneoGetIMEI
5466+ PyObject* meth_get_imei (PyObject* self, PyObject* args)
5467+ { // icsneoGetIMEI
54695468 (void )self;
54705469 PyObject* obj = NULL ;
54715470 if (!PyArg_ParseTuple (args, arg_parse (" O:" , __FUNCTION__), &obj)) {
@@ -5503,8 +5502,7 @@ PyObject* meth_get_component_versions(PyObject* self, PyObject* args) // icsneoG
55035502#ifndef _USE_INTERNAL_HEADER_
55045503 (void )self;
55055504 (void )args;
5506- return set_ics_exception (exception_runtime_error (),
5507- " icsneoGetComponentVersions is not available" );
5505+ return set_ics_exception (exception_runtime_error (), " icsneoGetComponentVersions is not available" );
55085506#else
55095507 (void )self;
55105508 PyObject* obj = NULL ;
@@ -5526,7 +5524,8 @@ PyObject* meth_get_component_versions(PyObject* self, PyObject* args) // icsneoG
55265524 char buffer[512 ];
55275525 return set_ics_exception (exception_runtime_error (), dll_get_error (buffer));
55285526 }
5529- ice::Function<int __stdcall (void *, VersionReport*, uint64_t *, bool )> icsneoGetComponentVersions (lib, " icsneoGetComponentVersions" );
5527+ ice::Function<int __stdcall (void *, VersionReport*, uint64_t *, bool )> icsneoGetComponentVersions (
5528+ lib, " icsneoGetComponentVersions" );
55305529 auto gil = PyAllowThreads ();
55315530 std::vector<VersionReport> version_reports;
55325531 version_reports.reserve (length);
@@ -5547,8 +5546,6 @@ PyObject* meth_get_component_versions(PyObject* self, PyObject* args) // icsneoG
55475546 return set_ics_exception (exception_runtime_error (), " Failed to allocate version_report" );
55485547 }
55495548
5550-
5551-
55525549 // Get the internal buffer from version_report
55535550 Py_buffer buffer = {};
55545551 if (PyObject_GetBuffer (obj, &buffer, PyBUF_CONTIG) != 0 ) {
@@ -5564,4 +5561,59 @@ PyObject* meth_get_component_versions(PyObject* self, PyObject* args) // icsneoG
55645561 return set_ics_exception (exception_runtime_error (), (char *)ex.what ());
55655562 }
55665563#endif
5567- }
5564+ }
5565+
5566+ PyObject* meth_request_set_neovi_miscio (PyObject* self, PyObject* args) // icsneoRequestSetNeoVIMiscIO
5567+ {
5568+ (void )self;
5569+ PyObject* obj = NULL ;
5570+ uint32_t ddrs = 0 ;
5571+ uint32_t ddrs_mask = 0 ;
5572+ uint32_t states = 0 ;
5573+ uint32_t states_mask = 0 ;
5574+ uint32_t leds = 0 ;
5575+ uint32_t leds_mask = 0 ;
5576+ if (!PyArg_ParseTuple (args,
5577+ arg_parse (" OIIIIII:" , __FUNCTION__),
5578+ &obj,
5579+ &ddrs,
5580+ &ddrs_mask,
5581+ &states,
5582+ &states_mask,
5583+ &leds,
5584+ &leds_mask)) {
5585+ return NULL ;
5586+ }
5587+ if (!PyNeoDeviceEx_CheckExact (obj)) {
5588+ return set_ics_exception (exception_runtime_error (), " Argument must be of type " MODULE_NAME " .PyNeoDeviceEx" );
5589+ }
5590+ void * handle = NULL ;
5591+ if (!PyNeoDeviceEx_GetHandle (obj, &handle)) {
5592+ return NULL ;
5593+ }
5594+ try {
5595+ ice::Library* lib = dll_get_library ();
5596+ if (!lib) {
5597+ char buffer[512 ];
5598+ return set_ics_exception (exception_runtime_error (), dll_get_error (buffer));
5599+ }
5600+ // int _stdcall icsneoRequestSetNeoVIMiscIO(void* hObject,
5601+ // uint32_t ddrs,
5602+ // uint32_t ddrs_mask,
5603+ // uint32_t states,
5604+ // uint32_t states_mask,
5605+ // uint32_t leds,
5606+ // uint32_t leds_mask)
5607+ ice::Function<int __stdcall (void *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )>
5608+ icsneoRequestSetNeoVIMiscIO (lib, " icsneoRequestSetNeoVIMiscIO" );
5609+ auto gil = PyAllowThreads ();
5610+ if (!icsneoRequestSetNeoVIMiscIO (handle, ddrs, ddrs_mask, states, states_mask, leds, leds_mask)) {
5611+ gil.restore ();
5612+ return set_ics_exception (exception_runtime_error (), " icsneoRequestSetNeoVIMiscIO() Failed" );
5613+ }
5614+ gil.restore ();
5615+ Py_RETURN_NONE;
5616+ } catch (ice::Exception& ex) {
5617+ return set_ics_exception (exception_runtime_error (), (char *)ex.what ());
5618+ }
5619+ }
0 commit comments