30
+ − 1 ///////////////////////////////////////////////////////////////////////////////
+ − 2 /// -*- coding: UTF-8 -*-
+ − 3 ///
+ − 4 /// \file BootLoader/Src/settings_bootloader.c
+ − 5 /// \brief mini version for firmwareDataGetPointer() etc.
36
+ − 6 /// \author heinrichs weikamp gmbh
30
+ − 7 /// \date 21-March-2016
+ − 8 ///
+ − 9 /// $Id$
+ − 10 ///////////////////////////////////////////////////////////////////////////////
+ − 11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
+ − 12 ///
+ − 13 /// This program is free software: you can redistribute it and/or modify
+ − 14 /// it under the terms of the GNU General Public License as published by
+ − 15 /// the Free Software Foundation, either version 3 of the License, or
+ − 16 /// (at your option) any later version.
+ − 17 ///
+ − 18 /// This program is distributed in the hope that it will be useful,
+ − 19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
+ − 20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ − 21 /// GNU General Public License for more details.
+ − 22 ///
+ − 23 /// You should have received a copy of the GNU General Public License
+ − 24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
+ − 25 //////////////////////////////////////////////////////////////////////////////
+ − 26
+ − 27 /* Includes ------------------------------------------------------------------*/
+ − 28 #include <string.h>
+ − 29 #include "settings.h"
+ − 30
+ − 31 /* always at 0x8080000, do not move -> bootloader access */
+ − 32 const SFirmwareData* firmwareDataGetPointer(void)
+ − 33 {
+ − 34 return (const SFirmwareData*)(0x08040000 + 0x00010000);
+ − 35 }
+ − 36
+ − 37
+ − 38 void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow)
+ − 39 {
+ − 40 if(RTEhigh && RTElow)
+ − 41 {
+ − 42 *RTEhigh = 0;
+ − 43 *RTElow = 0;
+ − 44 }
+ − 45 if(FONThigh && FONTlow)
+ − 46 {
+ − 47 *FONThigh = *(uint8_t *)0x08132000;
+ − 48 *FONTlow = *(uint8_t *)0x08132001;
+ − 49 }
+ − 50 }
+ − 51
+ − 52
+ − 53 uint8_t getLicence(void)
+ − 54 {
+ − 55 //return 0xFF;
+ − 56 //return LICENCEBONEX;
+ − 57 return hardwareDataGetPointer()->primaryLicence;
+ − 58 }