comparison BootLoader/Inc/base_bootloader.h @ 5:e65d01b6a17e

MOVE files for other applications
author JeanDo
date Fri, 15 Dec 2017 01:45:20 +0100
parents
children 97eafbcb81a9
comparison
equal deleted inserted replaced
4:89a87ddc2e47 5:e65d01b6a17e
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>&copy; 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 ------------------------------------------------------------------*/
43 #include "stm32f4xx_hal.h"
44 #include "tStructure.h"
45 #include "settings.h"
46 /* Exported types ------------------------------------------------------------*/
47 /* Exported constants --------------------------------------------------------*/
48
49 /* Exported macro ------------------------------------------------------------*/
50
51 #define TOP_LAYER 1
52 #define BACKGRD_LAYER 0
53
54 #define SURFMODE 1
55 #define DIVEMODE 2
56
57 typedef enum
58 {
59 ST_Boot = 0,
60 ST_Surface,
61 ST_Dive,
62 ST_Menu,
63 ST_END
64 } SState;
65
66 typedef enum
67 {
68 ACTION_IDLE_TICK = 0,
69 ACTION_IDLE_SECOND,
70 ACTION_MODE_CHANGE,
71 ACTION_TIMEOUT,
72 ACTION_BUTTON_CUSTOM,
73 ACTION_BUTTON_BACK,
74 ACTION_BUTTON_NEXT,
75 ACTION_BUTTON_ENTER,
76 ACTION_BUTTON_ENTER_FINAL,
77 ACTION_END
78 } SAction;
79
80 /* Exported macro ------------------------------------------------------------*/
81 /* Exported functions ------------------------------------------------------- */
82
83 uint32_t get_globalState(void);
84 void set_globalState(uint32_t newID);
85 void get_globalStateList(SStateList *output);
86 void set_globalState_Menu_Page(uint8_t page);
87 void set_globalState_Menu_Line(uint8_t line);
88 void get_idSpecificStateList(uint32_t id, SStateList *output);
89 void delayMicros(uint32_t micros);
90 void get_RTC_DateTime(RTC_DateTypeDef * sdatestructureget, RTC_TimeTypeDef * stimestructureget);
91 void set_RTC_DateTime(RTC_DateTypeDef * sdatestructure, RTC_TimeTypeDef * stimestructure);
92 uint8_t get_globalMode(void);
93 void set_globalMode(uint8_t newMode);
94 void set_globalState_Log_Page(uint8_t pageIsLine);
95 void set_globalState_Base(void);
96
97 void set_returnFromComm(void);
98
99 #endif /* BASE_BOOTLOADER_H */
100
101 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/