5
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * @copyright heinrichs weikamp
|
|
4 * @file settings_bootloader.c
|
|
5 * @author heinrichs/weikamp, Christian Weikamp
|
|
6 * @date 21-March-2016
|
|
7 * @version V1.0.1
|
|
8 * @since 24-Oct-2016
|
|
9 * @brief mini version for firmwareDataGetPointer() etc.
|
|
10 * 1.0.1 getLicence() included
|
|
11 ******************************************************************************
|
|
12 */
|
|
13
|
|
14
|
|
15 /* Includes ------------------------------------------------------------------*/
|
|
16 #include <string.h>
|
|
17 #include "settings.h"
|
|
18
|
|
19
|
|
20 /* always at 0x8080000, do not move -> bootloader access */
|
|
21 const SFirmwareData* firmwareDataGetPointer(void)
|
|
22 {
|
|
23 return (const SFirmwareData*)(0x08040000 + 0x00010000);
|
|
24 }
|
|
25
|
|
26
|
|
27 void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow)
|
|
28 {
|
|
29 if(RTEhigh && RTElow)
|
|
30 {
|
|
31 *RTEhigh = 0;
|
|
32 *RTElow = 0;
|
|
33 }
|
|
34 if(FONThigh && FONTlow)
|
|
35 {
|
|
36 *FONThigh = *(uint8_t *)0x08132000;
|
|
37 *FONTlow = *(uint8_t *)0x08132001;
|
|
38 }
|
|
39 }
|
|
40
|
|
41
|
|
42 uint8_t getLicence(void)
|
|
43 {
|
|
44 //return 0xFF;
|
|
45 //return LICENCEBONEX;
|
|
46 return hardwareDataGetPointer()->primaryLicence;
|
|
47 }
|