annotate l476rg-hal-test/src/main.cpp @ 0:32a3b1785697

a rough draft of Hardware Abstraction Layer for C++ STM32L476RG drivers
author cin
date Thu, 12 Jan 2017 02:45:43 +0300
parents
children a0b14b11ad9f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
1 /*
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
2 ******************************************************************************
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
3 File: main.c
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
4 Info: Generated by Atollic TrueSTUDIO(R) 7.0.1 2017-01-12
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
5
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
6 The MIT License (MIT)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
7 Copyright (c) 2009-2016 Atollic AB
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
8
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
9 Permission is hereby granted, free of charge, to any person obtaining a copy
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
10 of this software and associated documentation files (the "Software"), to deal
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
11 in the Software without restriction, including without limitation the rights
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
13 copies of the Software, and to permit persons to whom the Software is
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
14 furnished to do so, subject to the following conditions:
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
15
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
16 The above copyright notice and this permission notice shall be included in all
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
17 copies or substantial portions of the Software.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
18
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
25 SOFTWARE.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
26 ******************************************************************************
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
27 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
28
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
29 /* Includes */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
30 #include "stm32l4xx.h"
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
31
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
32 /* Private macro */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
33 /* Private variables */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
34 /* Private function prototypes */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
35 /* Private functions */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
36
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
37 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
38 **===========================================================================
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
39 **
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
40 ** Abstract: main program
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
41 **
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
42 **===========================================================================
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
43 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
44 int main(void)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
45 {
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
46 int i = 0;
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
47
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
48 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
49 * IMPORTANT NOTE!
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
50 * The symbol VECT_TAB_SRAM needs to be defined when building the project
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
51 * if code has been located to RAM and interrupts are used.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
52 * Otherwise the interrupt table located in flash will be used.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
53 * See also the <system_*.c> file and how the SystemInit() function updates
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
54 * SCB->VTOR register.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
55 * E.g. SCB->VTOR = 0x20000000;
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
56 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
57
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
58 /* TODO - Add your application code here */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
59
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
60 /* Infinite loop */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
61 while (1)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
62 {
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
63 i++;
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
64 }
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
65 }