You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
875 B

#ifndef BOOTFUNCTIONS_H_
#define BOOTFUNCTIONS_H_
#include <inttypes.h>
#include "config.h"
#include "boot.h"
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <avr/boot.h>
#include <avr/wdt.h>
#include "System.h"
#include "RSLink.h"
#include "AES.h"
#include "boot.h"
#include "MEMORY.h"
//FLAG FIELD
#define IDIFMW_REASON_NoReason (1<<0)
#define IDIFMW_REASON_EnterFromApplication (1<<1) //EEPROM FLAG
#define IDIFMW_REASON_EnterForced (1<<2) //Address detection
#define IDIFMW_REASON_NoFmwDetected (1<<3)
uint8_t FindBootloaderEnterReason();
uint8_t BootloaderUpdateInit(FMW_INFO new_FmwInfo);
uint8_t BootloaderUpdateEnd();
uint8_t BootloaderUpdateHandler();
void readDeviceData(flash_datablock_t* data, uint32_t addr);
void LaunchApplication();
#endif /* BOOTFUNCTIONS_H_ */