-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Description
Took me a while (and loads of headless chicken debugs) to notice SMB writeBlock doesn't support ArrayBuffer (but readBlock supports it!).
Here's a suggestion modules/pins/i2c/i2c.c:162:
if(xsmcIsInstanceOf(xsArg(i), xsArrayBufferPrototype))
{
l = xsGetArrayBufferLength(xsArg(i));
if ((len + l) > sizeof(buffer))
xsUnknownError("40 byte write limit");
c_memmove(&buffer[len], xsmcToArrayBuffer(xsArg(i)), l);
len += l;
}
else
{
xsmcGet(xsVar(0), xsArg(i), xsID_length);
l = xsmcToInteger(xsVar(0));
if ((len + l) > sizeof(buffer))
xsUnknownError("40 byte write limit");
for (j = 0; j < l; j++) {
xsmcGet(xsVar(0), xsArg(i), j);
buffer[len++] = xsmcToInteger(xsVar(0));
}
}
Metadata
Metadata
Assignees
Labels
No labels