Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

C/C++ • Re: pigpio serial_write unsigned char?

$
0
0
I hit this recently with getopt_long(). When running on ARM it will return 255 and a test for (ret < 0) won't work.
It will return (int) -1. You truncated the result by assigning it to a char variable before the comparison, which is always the bug.

Statistics: Posted by jojopi — Thu Apr 24, 2025 11:05 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles