@@ -2314,7 +2314,7 @@ PyObject* meth_read_sdcard(PyObject* self,
23142314 PyObject* obj = NULL ;
23152315 unsigned long index = 0 ;
23162316 unsigned long size = 0 ;
2317- if (!PyArg_ParseTuple (args, arg_parse (" Ok :" , __FUNCTION__), &obj, &index, &size)) {
2317+ if (!PyArg_ParseTuple (args, arg_parse (" Okk :" , __FUNCTION__), &obj, &index, &size)) {
23182318 return NULL ;
23192319 }
23202320 if (!PyNeoDeviceEx_CheckExact (obj)) {
@@ -2995,10 +2995,10 @@ PyObject* meth_get_last_api_error(PyObject* self, PyObject* args)
29952995 char buffer[512 ];
29962996 return set_ics_exception (exception_runtime_error (), dll_get_error (buffer));
29972997 }
2998- ice::Function<int __stdcall (void *, int *)> icsneoGetLastAPIError (lib, " icsneoGetLastAPIError" );
2999- ice::Function<int __stdcall (int , char *, char *, int *, int *, int *, int *)> icsneoGetErrorInfo (
2998+ ice::Function<int __stdcall (void *, unsigned long *)> icsneoGetLastAPIError (lib, " icsneoGetLastAPIError" );
2999+ ice::Function<int __stdcall (unsigned long , char *, char *, int *, int *, int *, int *)> icsneoGetErrorInfo (
30003000 lib, " icsneoGetErrorInfo" );
3001- int error = 0 ;
3001+ unsigned long error = 0 ;
30023002 auto gil = PyAllowThreads ();
30033003 if (!icsneoGetLastAPIError (handle, &error)) {
30043004 gil.restore ();
@@ -3019,7 +3019,7 @@ PyObject* meth_get_last_api_error(PyObject* self, PyObject* args)
30193019 &restart_needed)) {
30203020 return set_ics_exception (exception_runtime_error (), " icsneoGetErrorInfo() Failed" );
30213021 }
3022- return Py_BuildValue (" i , s, s, i, i" , error, description_short, description_long, severity, restart_needed);
3022+ return Py_BuildValue (" k , s, s, i, i" , error, description_short, description_long, severity, restart_needed);
30233023 } catch (ice::Exception& ex) {
30243024 return set_ics_exception (exception_runtime_error (), (char *)ex.what ());
30253025 }
@@ -3616,7 +3616,7 @@ PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args)
36163616 (void )self;
36173617 PyObject* obj = NULL ;
36183618 unsigned long networks = 0 ;
3619- if (!PyArg_ParseTuple (args, arg_parse (" Oi :" , __FUNCTION__), &obj, &networks)) {
3619+ if (!PyArg_ParseTuple (args, arg_parse (" Ok :" , __FUNCTION__), &obj, &networks)) {
36203620 return NULL ;
36213621 }
36223622 if (!PyNeoDeviceEx_CheckExact (obj)) {
@@ -3719,7 +3719,7 @@ PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args)
37193719 (void )self;
37203720 PyObject* obj = NULL ;
37213721 unsigned long channel = 0 ;
3722- if (!PyArg_ParseTuple (args, arg_parse (" Oi :" , __FUNCTION__), &obj, &channel)) {
3722+ if (!PyArg_ParseTuple (args, arg_parse (" Ok :" , __FUNCTION__), &obj, &channel)) {
37233723 return NULL ;
37243724 }
37253725 if (!PyNeoDeviceEx_CheckExact (obj)) {
@@ -3823,10 +3823,10 @@ PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args)
38233823{
38243824 (void )self;
38253825 PyObject* obj = NULL ;
3826- int bitrate = 0 ;
3826+ unsigned long bitrate = 0 ;
38273827 int net_id = 0 ;
38283828 int options = 0 ;
3829- if (!PyArg_ParseTuple (args, arg_parse (" Oiii :" , __FUNCTION__), &obj, &bitrate, &net_id)) {
3829+ if (!PyArg_ParseTuple (args, arg_parse (" Okii :" , __FUNCTION__), &obj, &bitrate, &net_id, &options )) {
38303830 return NULL ;
38313831 }
38323832 if (!PyNeoDeviceEx_CheckExact (obj)) {
@@ -3842,7 +3842,7 @@ PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args)
38423842 char buffer[512 ];
38433843 return set_ics_exception (exception_runtime_error (), dll_get_error (buffer));
38443844 }
3845- ice::Function<int __stdcall (void *, int , int , int )> icsneoSetBitRateEx (lib, " icsneoSetBitRateEx" );
3845+ ice::Function<int __stdcall (void *, unsigned long , int , int )> icsneoSetBitRateEx (lib, " icsneoSetBitRateEx" );
38463846 auto gil = PyAllowThreads ();
38473847 if (!icsneoSetBitRateEx (handle, bitrate, net_id, options)) {
38483848 gil.restore ();
@@ -4957,7 +4957,7 @@ PyObject* meth_uart_write(PyObject* self, PyObject* args)
49574957 Py_buffer data = {};
49584958 uint8_t flags = 0 ;
49594959 bool check_size = true ;
4960- if (!PyArg_ParseTuple (args, arg_parse (" OIy*|bp :" , __FUNCTION__), &obj, &port, &data, &flags, &check_size)) {
4960+ if (!PyArg_ParseTuple (args, arg_parse (" OIy*|Bp :" , __FUNCTION__), &obj, &port, &data, &flags, &check_size)) {
49614961 return NULL ;
49624962 }
49634963
@@ -5003,7 +5003,7 @@ PyObject* meth_uart_read(PyObject* self, PyObject* args)
50035003 EUartPort_t port = eUART0;
50045004 unsigned int bytesToRead = 256 ;
50055005 uint8_t flags = 0 ;
5006- if (!PyArg_ParseTuple (args, arg_parse (" OI|Is :" , __FUNCTION__), &obj, &port, &bytesToRead, &flags)) {
5006+ if (!PyArg_ParseTuple (args, arg_parse (" OI|IB :" , __FUNCTION__), &obj, &port, &bytesToRead, &flags)) {
50075007 return NULL ;
50085008 }
50095009 // Get the device handle
@@ -5029,10 +5029,10 @@ PyObject* meth_uart_read(PyObject* self, PyObject* args)
50295029 size_t bytesActuallyRead = 0 ;
50305030 // int _stdcall icsneoUartRead(void* hObject, const EUartPort_t uart, void* bData, const size_t bytesToRead,
50315031 // size_t* bytesActuallyRead, uint8_t* flags)
5032- ice::Function<int __stdcall (void *, const EUartPort_t, const void *, const size_t , size_t *, uint8_t *)>
5032+ ice::Function<int __stdcall (void *, const EUartPort_t, void *, const size_t , size_t *, uint8_t *)>
50335033 icsneoUartRead (lib, " icsneoUartRead" );
50345034 auto gil = PyAllowThreads ();
5035- if (!icsneoUartRead (handle, port, ( void *) buffer, bytesToRead, &bytesActuallyRead, &flags)) {
5035+ if (!icsneoUartRead (handle, port, buffer, bytesToRead, &bytesActuallyRead, &flags)) {
50365036 gil.restore ();
50375037 free (buffer);
50385038 buffer = NULL ;
@@ -5096,7 +5096,7 @@ PyObject* meth_uart_get_baudrate(PyObject* self, PyObject* args)
50965096 (void )self;
50975097 PyObject* obj = NULL ;
50985098 EUartPort_t port = eUART0;
5099- if (!PyArg_ParseTuple (args, arg_parse (" OII :" , __FUNCTION__), &obj, &port)) {
5099+ if (!PyArg_ParseTuple (args, arg_parse (" OI :" , __FUNCTION__), &obj, &port)) {
51005100 return NULL ;
51015101 }
51025102 // Get the device handle
0 commit comments