Cleaned up header inclusion.

Now all examples are including only the modules they really need. Also
each header file of the library is including only the necessary headers
making it possible to use these modules in parallel with other
implementations that may collide with the definitions in other modules.
This commit is contained in:
Piotr Esden-Tempski 2010-03-04 19:16:24 +01:00
parent 9b4b4b1c83
commit d84c4030b2
13 changed files with 24 additions and 13 deletions

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32.h>
#include <libopenstm32/rcc.h>
#include <libopenstm32/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32/common.h>
#include <libopenstm32/rcc.h>
#include <libopenstm32/gpio.h>
#include <libopenstm32/timer.h>

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32.h>
#include <libopenstm32/rcc.h>
#include <libopenstm32/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32.h>
#include <libopenstm32/rcc.h>
#include <libopenstm32/gpio.h>
void gpio_setup(void)
{

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32.h>
#include <libopenstm32/rcc.h>
void clock_setup(void)
{

View File

@ -17,7 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopenstm32.h>
#include <libopenstm32/rcc.h>
#include <libopenstm32/gpio.h>
#include <libopenstm32/usart.h>
void clock_setup(void)
{

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_ADC_H
#define LIBOPENSTM32_ADC_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- Convenience macros -------------------------------------------------- */

View File

@ -27,7 +27,8 @@
#ifndef LIBOPENSTM32_FLASH_H
#define LIBOPENSTM32_FLASH_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- FLASH registers ----------------------------------------------------- */

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_I2C_H
#define LIBOPENSTM32_I2C_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- Convenience macros -------------------------------------------------- */

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_NVIC_H
#define LIBOPENSTM32_NVIC_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- NVIC Registers ------------------------------------------------------ */
/* ISER: Interrupt Set Enable Registers */

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_RTC_H
#define LIBOPENSTM32_RTC_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- RTC registers ------------------------------------------------------- */

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_SPI_H
#define LIBOPENSTM32_SPI_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* Registers can be accessed as 16bit or 32bit values. */

View File

@ -20,7 +20,8 @@
#ifndef LIBOPENSTM32_USART_H
#define LIBOPENSTM32_USART_H
#include <libopenstm32.h>
#include <libopenstm32/memorymap.h>
#include <libopenstm32/common.h>
/* --- Convenience macros -------------------------------------------------- */