1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00
Arduino/hardware/arduino/avr
Matthijs Kooijman ece02e93bd Instead of #defining true and false, include stdbool.h
In C++, true and false are language keywords, so there is no need to
define them as macros. Including stdbool.h in C++ effectively changes
nothing. In C, true, false and also the bool type are not available, but
including stdbool.h will make them available.

Using stdbool.h means that we get true, false and the bool type in
whatever way the compiler thinks is best, which seems like a good idea
to me.

This also fixes the following compiler warnings if a .c file includes
both stdbool.h and Arduino.h:

	warning: "true" redefined [enabled by default]
	 #define true 0x1

	warning: "false" redefined [enabled by default]
	#define false 0x0

This fixes #1570 and helps toward fixing #1728.

This only changed the AVR core, the SAM core already doesn't define true
and false (but doesn't include stdbool.h either).
2014-02-19 16:09:29 +01:00
..
bootloaders merge 2013-10-14 12:42:42 +02:00
cores/arduino Instead of #defining true and false, include stdbool.h 2014-02-19 16:09:29 +01:00
firmwares Merged 1.0.5 2013-04-03 13:51:04 +02:00
libraries Revert "SPI library to new format" 2013-11-21 15:05:36 +01:00
variants Merge branch 'master' into ide-1.5.x 2014-02-12 17:17:33 +01:00
boards.txt In boards.txt, rename atmega328diecimila to diecimila 2013-12-08 18:16:31 +01:00
platform.txt Compile with -x assembler-with-cpp instead of -assembler-with-cpp. 2014-01-21 21:57:35 +01:00
programmers.txt Set correct speed of Arduino ISP programmer 2013-04-06 01:59:25 +02:00