Mercurial > public > ostc4
annotate BootLoader/Inc/base_bootloader.h @ 28:7eabbb5b30ac
... Fighting with internal oscillator.
author | JeanDo |
---|---|
date | Wed, 10 Jan 2018 19:59:50 +0100 |
parents | 97eafbcb81a9 |
children | ea1003f63e44 |
rev | line source |
---|---|
5 | 1 /** |
2 ****************************************************************************** | |
3 * @file LTDC/LTDC_Display_2Layers/Inc/main.h | |
4 * @author MCD Application Team | |
5 * @version V1.0.1 | |
6 * @date 26-February-2014 | |
7 * @brief Header for main.c module | |
8 ****************************************************************************** | |
9 * @attention | |
10 * | |
11 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> | |
12 * | |
13 * Redistribution and use in source and binary forms, with or without modification, | |
14 * are permitted provided that the following conditions are met: | |
15 * 1. Redistributions of source code must retain the above copyright notice, | |
16 * this list of conditions and the following disclaimer. | |
17 * 2. Redistributions in binary form must reproduce the above copyright notice, | |
18 * this list of conditions and the following disclaimer in the documentation | |
19 * and/or other materials provided with the distribution. | |
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors | |
21 * may be used to endorse or promote products derived from this software | |
22 * without specific prior written permission. | |
23 * | |
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
34 * | |
35 ****************************************************************************** | |
36 */ | |
37 | |
38 /* Define to prevent recursive inclusion -------------------------------------*/ | |
39 #ifndef BASE_BOOTLOADER_H | |
40 #define BASE_BOOTLOADER_H | |
41 | |
42 /* Includes ------------------------------------------------------------------*/ | |
25
97eafbcb81a9
FIX move bootloader SFirmwareData at fixed address 0x0800A000
jdg@air
parents:
5
diff
changeset
|
43 |
97eafbcb81a9
FIX move bootloader SFirmwareData at fixed address 0x0800A000
jdg@air
parents:
5
diff
changeset
|
44 #define STM32F429xx |
97eafbcb81a9
FIX move bootloader SFirmwareData at fixed address 0x0800A000
jdg@air
parents:
5
diff
changeset
|
45 |
5 | 46 #include "stm32f4xx_hal.h" |
25
97eafbcb81a9
FIX move bootloader SFirmwareData at fixed address 0x0800A000
jdg@air
parents:
5
diff
changeset
|
47 |
5 | 48 #include "tStructure.h" |
49 #include "settings.h" | |
25
97eafbcb81a9
FIX move bootloader SFirmwareData at fixed address 0x0800A000
jdg@air
parents:
5
diff
changeset
|
50 |
5 | 51 /* Exported types ------------------------------------------------------------*/ |
52 /* Exported constants --------------------------------------------------------*/ | |
53 | |
54 /* Exported macro ------------------------------------------------------------*/ | |
55 | |
56 #define TOP_LAYER 1 | |
57 #define BACKGRD_LAYER 0 | |
58 | |
59 #define SURFMODE 1 | |
60 #define DIVEMODE 2 | |
61 | |
62 typedef enum | |
63 { | |
64 ST_Boot = 0, | |
65 ST_Surface, | |
66 ST_Dive, | |
67 ST_Menu, | |
68 ST_END | |
69 } SState; | |
70 | |
71 typedef enum | |
72 { | |
73 ACTION_IDLE_TICK = 0, | |
74 ACTION_IDLE_SECOND, | |
75 ACTION_MODE_CHANGE, | |
76 ACTION_TIMEOUT, | |
77 ACTION_BUTTON_CUSTOM, | |
78 ACTION_BUTTON_BACK, | |
79 ACTION_BUTTON_NEXT, | |
80 ACTION_BUTTON_ENTER, | |
81 ACTION_BUTTON_ENTER_FINAL, | |
82 ACTION_END | |
83 } SAction; | |
84 | |
85 /* Exported macro ------------------------------------------------------------*/ | |
86 /* Exported functions ------------------------------------------------------- */ | |
87 | |
88 uint32_t get_globalState(void); | |
89 void set_globalState(uint32_t newID); | |
90 void get_globalStateList(SStateList *output); | |
91 void set_globalState_Menu_Page(uint8_t page); | |
92 void set_globalState_Menu_Line(uint8_t line); | |
93 void get_idSpecificStateList(uint32_t id, SStateList *output); | |
94 void delayMicros(uint32_t micros); | |
95 void get_RTC_DateTime(RTC_DateTypeDef * sdatestructureget, RTC_TimeTypeDef * stimestructureget); | |
96 void set_RTC_DateTime(RTC_DateTypeDef * sdatestructure, RTC_TimeTypeDef * stimestructure); | |
97 uint8_t get_globalMode(void); | |
98 void set_globalMode(uint8_t newMode); | |
99 void set_globalState_Log_Page(uint8_t pageIsLine); | |
100 void set_globalState_Base(void); | |
101 | |
102 void set_returnFromComm(void); | |
103 | |
104 #endif /* BASE_BOOTLOADER_H */ | |
105 | |
106 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |