Fixes the LTO build with GCC 4.9. Tested on the STM32F3DISCOVERY. I
assume the compiler was doing cross function optimisation, saw that
the same non-volatile address was read twice, and dropped the second
read.
Fixes#763.
Signed-off-by: Michael Hope <mlhx@google.com>
Remove duplicate consts.
Pull in the include files where functions and variables are declared.
Mark file local but duplicated variables as static.
Mark some variable declarations as extern.
Remove duplicated variable definition.
Signed-off-by: Michael Hope <mlhx@google.com>
This is an alternative to #ifdef's everywhere which is getting out of
hand.
Confirmed that the VCP is working on the STM32F3Discovery board and
ChebuzzF3 variant.
The STM32F3DISCOVERY board would crash when setting GPIOA Pin_13 or
Pin_14 to analog mode so they are excluded in the gpio initialisation.
The USART GPIO configuration did not work when using the F10x code. The
USART status and DMA registers are different too.
status in cli now prints cpu MHz, 72 when running off crystal, 64 when running off intrc.
corrected WHO_AM_I check for mpu6050 when it's used on alternate address (AD0 high).
corrected PWM driver to consider CPU clock for timer prescalers - now things properly work below 72MHz
added a neat hack for pitch angle calculation so that it's not affected when roll reaches 90deg
added proper math for vector rotation instead of small-angle approximation
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@225 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61