1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-10 18:24:11 +01:00
LibrePilot/flight/PiOS/STM32F10x/Libraries
stac 02e0017cbb stm32 lib: declare read-only parameters as const
Many of the STM32 library functions take a pointer to an
initialization structure.  In nearly every case, this struct
is a read-only (ie. const) parameter.

It is advantageous (and good coding practice) to actually declare
read-only data as const so that the compiler can place the const data
in the .rodata section which resides in flash and doesn't consume any
RAM.  This has the added bonus advantage that it is impossible for the
running application to corrupt the read-only data.

In order to allow passing pointers to const data into the library
functions, it is essential that the function prototypes also declare
their associated read-only parameters as const.  This commit adds
the const attribute to those parameters that are actually read-only.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@758 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-13 04:23:15 +00:00
..
CMSIS Moved STM32 specific PiOS Libraries. 2010-03-04 06:14:14 +00:00
dosfs Moved STM32 specific PiOS Libraries. 2010-03-04 06:14:14 +00:00
FreeRTOS/Source Moved STM32 specific PiOS Libraries. 2010-03-04 06:14:14 +00:00
minIni Turn on -Werror on openpilot firmware build 2010-05-24 16:33:46 +00:00
msd Moved STM32 specific PiOS Libraries. 2010-03-04 06:14:14 +00:00
STM32_USB-FS-Device_Driver Moved STM32 specific PiOS Libraries. 2010-03-04 06:14:14 +00:00
STM32F10x_StdPeriph_Driver stm32 lib: declare read-only parameters as const 2010-06-13 04:23:15 +00:00