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:
parent
9b4b4b1c83
commit
d84c4030b2
@ -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)
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 -------------------------------------------------- */
|
||||
|
||||
|
@ -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 ----------------------------------------------------- */
|
||||
|
||||
|
@ -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 -------------------------------------------------- */
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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 ------------------------------------------------------- */
|
||||
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -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 -------------------------------------------------- */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user