The second parameter, int 512, is the character to fill s with. Note that while this parameter is received as an int, it is converted to an unsigned char when used to fill memory, to ensure that the function keeps just the eight bits needed from the received integer.
May be write memset((void*)&sdc->buf.data[1],0xff,512); ??
https://github.com/samstyle/Xpeccy/blob/0c7c288ead6d94c197f0ccbf57e68b64b5744f75/src/libxpeccy/sdcard.c#L90
The second parameter, int
512
, is the character to fill s with. Note that while this parameter is received as an int, it is converted to an unsigned char when used to fill memory, to ensure that the function keeps just the eight bits needed from the received integer. May be writememset((void*)&sdc->buf.data[1],0xff,512);
??