cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F10x Standard Peripherals Library v3.1.0

swhite
Associate III
Posted on August 03, 2009 at 11:57

STM32F10x Standard Peripherals Library v3.1.0

1 REPLY 1
swhite
Associate III
Posted on May 17, 2011 at 13:19

This version of the library defines the 'bool' type, FALSE and TRUE in the stm32f10x.h header on line 345.

The C-99 ANSI C standard defines 'bool' in the header

http://www.opengroup.org/onlinepubs/000095399/basedefs/stdbool.h.html

along with the values 'false' and 'true'.

It also defines the symbol '__bool_true_false_are_defined'.

This obviously results in a conflict if the end-user includes stdbool.h . Also the library doesn't appear to ever refer to 'bool', 'FALSE' or 'TRUE' anywhere.

Therefore could ST please remove this from future versions of the library (it wasn't in v3.0.0) or at the least surround it by

#ifndef __bool_true_false_are_defined

#endif