3 ms·
I see they did a trick in the code: Because binary literals were added late in C++14, it seems they used some library which defined 256 constants like B00000000
by nayuki 5y ago
I see they did a trick in the code: Because binary literals were added late in C++14, it seems they used some library which defined 256 constants like B00000000 = 0, B00000001 = 1, ..., B11111111 = 255.
- Moosdijk 5y agoNote quite. See [1] [1] https://www.arduino.cc/en/Reference/PortManipulation https://www.arduino.cc/en/Reference/PortManipulation
- kaszanka 5y agoYes, Arduino is the library that defines these macros: https://github.com/arduino/ArduinoCore-avr/blob/8f8df161ebf3d8bc595d226c3d3a9125383042a5/cores/arduino/binary.h https://github.com/arduino/ArduinoCore-avr/blob/8f8df161ebf3...