view BootLoader/Src/settings_bootloader.c @ 7:2de06b1abed3

CLEAN retrieve original startup code. reset linker script.
author jDG
date Mon, 18 Dec 2017 14:03:55 +0100
parents e65d01b6a17e
children ea1003f63e44
line wrap: on
line source

/**
  ******************************************************************************
	* @copyright	heinrichs weikamp
  * @file   		settings_bootloader.c
  * @author 		heinrichs/weikamp, Christian Weikamp
  * @date				21-March-2016
  * @version		V1.0.1
  * @since			24-Oct-2016
  * @brief			mini version for firmwareDataGetPointer() etc.
	*							1.0.1 getLicence() included
  ******************************************************************************
  */


/* Includes ------------------------------------------------------------------*/
#include <string.h>
#include "settings.h"


/* always at 0x8080000, do not move -> bootloader access */
const SFirmwareData* firmwareDataGetPointer(void)
{
	return (const SFirmwareData*)(0x08040000 + 0x00010000);
}	


void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow)
{
	if(RTEhigh && RTElow)
	{
		*RTEhigh = 0;
		*RTElow = 0;
	}
	if(FONThigh && FONTlow)
	{
		*FONThigh = *(uint8_t *)0x08132000;
		*FONTlow = *(uint8_t *)0x08132001;
	}
}


uint8_t getLicence(void)
{
//return 0xFF;
//return LICENCEBONEX;
	return hardwareDataGetPointer()->primaryLicence;
}