Implement DeviceType and icsneo_getProductName

This commit is contained in:
Paul Hollinsky
2018-09-26 20:43:49 -04:00
parent bbcc5b2d7b
commit 06b7181492
17 changed files with 83 additions and 43 deletions
+9
View File
@@ -201,4 +201,13 @@ bool icsneo_setPollingMessageLimit(const neodevice_t* device, size_t newLimit) {
device->device->setPollingMessageLimit(newLimit);
return true;
}
bool icsneo_getProductName(const neodevice_t* device, char* str, size_t* maxLength) {
if(!icsneo_isValidNeoDevice(device))
return false;
*maxLength = device->device->getType().toString().copy(str, *maxLength);
str[*maxLength + 1] = '\0';
return true;
}