just like SPI.write(const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length) function.
if buff is defined as : uint8_t *buff, how to cast uint8_t * to char .
I find one solution like this:
char rx_buff = reinterpret_cast<char>(const_cast<uint8_t>(buff));
is there another better solution? thx.
Maybe I’m not understanding what the issue is - but can’t you just call it with a (char*) in front of buff? E.g.
// assuming buff is a uint8_t*
SPI.Write(..., ..., (char*)buff, ...);
1 Like