ESOS32
ESOSOn32-bitProcessors
include
stm32l4_ocm3
esos_stm32l4.h
Go to the documentation of this file.
1
/*
2
* "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3
* All rights reserved.
4
* (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5
*
6
* Permission to use, copy, modify, and distribute this software and its
7
* documentation for any purpose, without fee, and without written agreement is
8
* hereby granted, provided that the above copyright notice, the following
9
* two paragraphs and the authors appear in all copies of this software.
10
*
11
* IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14
* HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
*
16
* THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19
* ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21
*
22
* Please maintain this header in its entirety when copying/modifying
23
* these files.
24
*
25
*
26
*/
27
28
// Documentation for this file. If the \file tag isn't present,
29
// this file won't be documented.
35
#ifndef ESOS_STM32L4_H
36
#define ESOS_STM32L4_H
37
38
//#include "user_config.h"
39
40
#ifdef __linux
41
/*
42
* Oh! We're running on a real computer (PC/Linux/etc.)
43
* So let's emulate the MCU instead
44
*/
45
46
#define pcrlf() printf("\n")
47
48
// Emulate the STM32L4's registers in RAM variable
49
// The user must provide these variables in the user file
50
// extern uint8_t PIE1; etc. etc. etc.
51
52
#else
53
/*
54
* OK! We have a real microprocessor, so start including the real
55
* hardware files for the compiler
56
*/
57
58
// LIBOPENCM3
59
#include <libopencm3/stm32/flash.h>
60
#include <libopencm3/stm32/gpio.h>
61
#include <libopencm3/stm32/i2c.h>
62
#include <libopencm3/stm32/rcc.h>
63
#include <libopencm3/stm32/rng.h>
64
#include <libopencm3/stm32/usart.h>
65
#include <libopencm3/cm3/nvic.h>
66
#include <libopencm3/cm3/systick.h>
67
#include <libopencm3/stm32/adc.h>
68
69
#endif // __linux
70
71
// include the IRQ mask definitions
72
#ifdef ESOS_USE_IRQS
73
#include "esos_stm32l4_irq.h"
74
#endif
75
76
#ifdef ESOS_USE_SERIAL_PORT
77
#include "esos_stm32l4_rs232.h"
78
#endif
79
80
#ifdef ESOS_USE_SPI
81
#include <libopencm3/stm32/spi.h>
82
#include "
esos_stm32l4_spi.h
"
83
#endif
84
85
#ifdef ESOS_USE_I2C
86
#include <libopencm3/stm32/i2c.h>
87
#include "
esos_stm32l4_i2c.h
"
88
#endif
89
90
91
#endif // ESOS_STM32L4_H
esos_stm32l4_spi.h
This file contains routines which define, configure and allow use of the SPI service on the ST Microe...
esos_stm32l4_i2c.h
This file contains routines which define, configure and allow use of the I2C service on the ST Microe...
Generated by
1.8.17