#ifndef BOOTFUNCTIONS_H_
#define BOOTFUNCTIONS_H_

#include <inttypes.h>

#include "config.h"
#include "boot.h"
#include "IDIBUS_BOOTLOADER_DEFS.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"

void FindBootloaderEnterReason(); 

uint8_t BootloaderData[PAGE_SIZE];

void  BootloaderDataHandler();

void LaunchApplication();

void  GetBootloaderInfo(volatile uint8_t *dst);
void  GetBootloaderStatus(volatile uint8_t *dst);
uint16_t GetNextBlockSize();
void  DisableAES();

#endif /* BOOTFUNCTIONS_H_ */